PageSourceSearch

https://bigfinsdiveaccounting.base44.app/assets/index-CH9jwvLK.js

js bigfinsdiveaccounting.base44.app collected 2026-10-03 03:11:54 UTC 1,604,497 bytes, 893 lines download raw bytes

vendor: 6,319 bytes, lines 1-9
1var oM=e=>{throw TypeError(e)};var xw=(e,t,n)=>t.has(e)||oM("Cannot "+n);var Q=(e,t,n)=>(xw(e,t,"read from private field"),n?n.call(e):t.get(e)),He=(e,t,n)=>t.has(e)?oM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Me=(e,t,n,r)=>(xw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),vt=(e,t,n)=>(xw(e,t,"access private method"),n);var bg=(e,t,n,r)=>({set _(i){Me(e,t,i,n)},get _(){return Q(e,t,r)}});function OQ(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var wg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bw={exports:{}},jf={},ww={exports:{}},St={};/**
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 lM;function MQ(){if(lM)return St;lM=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;function m(V){return V===null||typeof V!="object"?null:(V=f&&V[f]||V["@@iterator"],typeof V=="function"?V:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function b(V,G,z){this.props=V,this.context=G,this.refs=v,this.updater=z||g}b.prototype.isReactComponent={},b.prototype.setState=function(V,G){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,G,"setState")},b.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function j(){}j.prototype=b.prototype;function w(V,G,z){this.props=V,this.context=G,this.refs=v,this.updater=z||g}var N=w.prototype=new j;N.constructor=w,x(N,b.prototype),N.isPureReactComponent=!0;var k=Array.isArray,C=Object.prototype.hasOwnProperty,A={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function P(V,G,z){var oe,pe={},ue=null,me=null;if(G!=null)for(oe in G.ref!==void 0&&(me=G.ref),G.key!==void 0&&(ue=""+G.key),G)C.call(G,oe)&&!E.hasOwnProperty(oe)&&(pe[oe]=G[oe]);var Ne=arguments.length-2;if(Ne===1)pe.children=z;else if(1<Ne){for(var ee=Array(Ne),de=0;de<Ne;de++)ee[de]=arguments[de+2];pe.children=ee}if(V&&V.defaultProps)for(oe in Ne=V.defaultProps,Ne)pe[oe]===void 0&&(pe[oe]=Ne[oe]);return{$$typeof:e,type:V,key:ue,ref:me,props:pe,_owner:A.current}}function D(V,G){return{$$typeof:e,type:V.type,key:G,ref:V.ref,props:V.props,_owner:V._owner}}function B(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function O(V){var G={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(z){return G[z]})}var M=/\/+/g;function $(V,G){return typeof V=="object"&&V!==null&&V.key!=null?O(""+V.key):G.toString(36)}function F(V,G,z,oe,pe){var ue=typeof V;(ue==="undefined"||ue==="boolean")&&(V=null);var me=!1;if(V===null)me=!0;else switch(ue){case"string":case"number":me=!0;break;case"object":switch(V.$$typeof){case e:case t:me=!0}}if(me)return me=V,pe=pe(me),V=oe===""?"."+$(me,0):oe,k(pe)?(z="",V!=null&&(z=V.replace(M,"$&/")+"/"),F(pe,G,z,"",function(de){return de})):pe!=null&&(B(pe)&&(pe=D(pe,z+(!pe.key||me&&me.key===pe.key?"":(""+pe.key).replace(M,"$&/")+"/")+V)),G.push(pe)),1;if(me=0,oe=oe===""?".":oe+":",k(V))for(var Ne=0;Ne<V.length;Ne++){ue=V[Ne];var ee=oe+$(ue,Ne);me+=F(ue,G,z,ee,pe)}else if(ee=m(V),typeof ee=="function")for(V=ee.call(V),Ne=0;!(ue=V.next()).done;)ue=ue.value,ee=oe+$(ue,Ne++),me+=F(ue,G,z,ee,pe);else if(ue==="object")throw G=String(V),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return me}function W(V,G,z){if(V==null)return V;var oe=[],pe=0;return F(V,oe,"","",function(ue){return G.call(z,ue,pe++)}),oe}function q(V){if(V._status===-1){var G=V._result;G=G(),G.then(function(z){(V._status===0||V._status===-1)&&(V._status=1,V._result=z)},function(z){(V._status===0||V._status===-1)&&(V._status=2,V._result=z)}),V._status===-1&&(V._status=0,V._result=G)}if(V._status===1)return V._result.default;throw V._result}var K={current:null},L={transition:null},H={ReactCurrentDispatcher:K,ReactCurrentBatchConfig:L,ReactCurrentOwner:A};function I(){throw Error("act(...) is not supported in production builds of React.")}return St.Children={map:W,forEach:function(V,G,z){W(V,function(){G.apply(this,arguments)},z)},count:function(V){var G=0;return W(V,function(){G++}),G},toArray:function(V){return W(V,function(G){return G})||[]},only:function(V){if(!B(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},St.Component=b,St.Fragment=n,St.Profiler=i,St.PureComponent=w,St.StrictMode=r,St.Suspense=c,St.__SECRET_INT
vendor: 8,308 bytes, lines 9-33
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,St.act=I,St.cloneElement=function(V,G,z){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var oe=x({},V.props),pe=V.key,ue=V.ref,me=V._owner;if(G!=null){if(G.ref!==void 0&&(ue=G.ref,me=A.current),G.key!==void 0&&(pe=""+G.key),V.type&&V.type.defaultProps)var Ne=V.type.defaultProps;for(ee in G)C.call(G,ee)&&!E.hasOwnProperty(ee)&&(oe[ee]=G[ee]===void 0&&Ne!==void 0?Ne[ee]:G[ee])}var ee=arguments.length-2;if(ee===1)oe.children=z;else if(1<ee){Ne=Array(ee);for(var de=0;de<ee;de++)Ne[de]=arguments[de+2];oe.children=Ne}return{$$typeof:e,type:V.type,key:pe,ref:ue,props:oe,_owner:me}},St.createContext=function(V){return V={$$typeof:a,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:s,_context:V},V.Consumer=V},St.createElement=P,St.createFactory=function(V){var G=P.bind(null,V);return G.type=V,G},St.createRef=function(){return{current:null}},St.forwardRef=function(V){return{$$typeof:l,render:V}},St.isValidElement=B,St.lazy=function(V){return{$$typeof:h,_payload:{_status:-1,_result:V},_init:q}},St.memo=function(V,G){return{$$typeof:d,type:V,compare:G===void 0?null:G}},St.startTransition=function(V){var G=L.transition;L.transition={};try{V()}finally{L.transition=G}},St.unstable_act=I,St.useCallback=function(V,G){return K.current.useCallback(V,G)},St.useContext=function(V){return K.current.useContext(V)},St.useDebugValue=function(){},St.useDeferredValue=function(V){return K.current.useDeferredValue(V)},St.useEffect=function(V,G){return K.current.useEffect(V,G)},St.useId=function(){return K.current.useId()},St.useImperativeHandle=function(V,G,z){return K.current.useImperativeHandle(V,G,z)},St.useInsertionEffect=function(V,G){return K.current.useInsertionEffect(V,G)},St.useLayoutEffect=function(V,G){return K.current.useLayoutEffect(V,G)},St.useMemo=function(V,G){return K.current.useMemo(V,G)},St.useReducer=function(V,G,z){return K.current.useReducer(V,G,z)},St.useRef=function(V){return K.current.useRef(V)},St.useState=function(V){return K.current.useState(V)},St.useSyncExternalStore=function(V,G,z){return K.current.useSyncExternalStore(V,G,z)},St.useTransition=function(){return K.current.useTransition()},St.version="18.3.1",St}var cM;function ix(){return cM||(cM=1,ww.exports=MQ()),ww.exports}/**
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 uM;function RQ(){if(uM)return jf;uM=1;var e=ix(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,d){var h,f={},m=null,g=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(h in c)r.call(c,h)&&!s.hasOwnProperty(h)&&(f[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)f[h]===void 0&&(f[h]=c[h]);return{$$typeof:t,type:l,key:m,ref:g,props:f,_owner:i.current}}return jf.Fragment=n,jf.jsx=a,jf.jsxs=a,jf}var dM;function DQ(){return dM||(dM=1,bw.exports=RQ()),bw.exports}var o=DQ(),_=ix();const X=Ot(_),wA=OQ({__proto__:null,default:X},[_]);var jg={},jw={exports:{}},qr={},Sw={exports:{}},_w={};/**
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 */var fM;function IQ(){return fM||(fM=1,(function(e){function t(L,H){var I=L.length;L.push(H);e:for(;0<I;){var V=I-1>>>1,G=L[V];if(0<i(G,H))L[V]=H,L[I]=G,I=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var H=L[0],I=L.pop();if(I!==H){L[0]=I;e:for(var V=0,G=L.length,z=G>>>1;V<z;){var oe=2*(V+1)-1,pe=L[oe],ue=oe+1,me=L[ue];if(0>i(pe,I))ue<G&&0>i(me,pe)?(L[V]=me,L[ue]=I,V=ue):(L[V]=pe,L[oe]=I,V=oe);else if(ue<G&&0>i(me,I))L[V]=me,L[ue]=I,V=ue;else break e}}return H}function i(L,H){var I=L.sortIndex-H.sortIndex;return I!==0?I:L.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],d=[],h=1,f=null,m=3,g=!1,x=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(L){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=L)r(d),H.sortIndex=H.expirationTime,t(c,H);else break;H=n(d)}}function k(L){if(v=!1,N(L),!x)if(n(c)!==null)x=!0,q(C);else{var H=n(d);H!==null&&K(k,H.startTime-L)}}function C(L,H){x=!1,v&&(v=!1,j(P),P=-1),g=!0;var I=m;try{for(N(H),f=n(c);f!==null&&(!(f.expirationTime>H)||L&&!O());){var V=f.callback;if(typeof V=="function"){f.callback=null,m=f.priorityLevel;var G=V(f.expirationTime<=H);H=e.unstable_now(),typeof G=="function"?f.callback=G:f===n(c)&&r(c),N(H)}else r(c);f=n(c)}if(f!==null)var z=!0;else{var oe=n(d);oe!==null&&K(k,oe.startTime-H),z=!1}return z}finally{f=null,m=I,g=!1}}var A=!1,E=null,P=-1,D=5,B=-1;function O(){return!(e.unstable_now()-B<D)}function M(){if(E!==null){var L=e.unstable_now();B=L;var H=!0;try{H=E(!0,L)}finally{H?$():(A=!1,E=null)}}else A=!1}var $;if(typeof w=="function")$=function(){w(M)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=M,$=function(){W.postMessage(null)}}else $=function(){b(M,0)};function q(L){E=L,A||(A=!0,$())}function K(L,H){P=b(function(){L(e.unstable_now())},H)}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(L){L.callback=null},e.unstable_continueExecution=function(){x||g||(x=!0,q(C))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(L){switch(m){case 1:case 2:case 3:var H=3;break;default:H=m}var I=m;m=H;try{return L()}finally{m=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,H){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var I=m;m=L;try{return H()}finally{m=I}},e.unstable_scheduleCallback=function(L,H,I){var V=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?V+I:V):I=V,L){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=I+G,L={id:h++,callback:H,priorityLevel:L,startTime:I,expirationTime:G,sortIndex:-1},I>V?(L.sortIndex=I,t(d,L),n(c)===null&&L===n(d)&&(v?(j(P),P=-1):v=!0,K(k,I-V))):(L.sortIndex=G,t(c,L),x||g||(x=!0,q(C))),L},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(L){var H=m;return function(){var I=m;m=H;try{return L.apply(this,arguments)}finally{m=I}}}})(_w)),_w}var hM;function LQ(){return hM||(hM=1,Sw.exports=IQ()),Sw.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 pM;function $Q(){if(pM)return qr;pM=1;var e=ix(),t=LQ();function n(u){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+u,y=1;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y]);return"Minified React error #"+u+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(u,p){a(u,p),a(u+"Capture",p)}
vendor: 24,477 bytes, lines 33-37
33function a(u,p){for(i[u]=p,u=0;u<p.length;u++)r.add(p[u])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},f={};function m(u){return c.call(f,u)?!0:c.call(h,u)?!1:d.test(u)?f[u]=!0:(h[u]=!0,!1)}function g(u,p,y,S){if(y!==null&&y.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return S?!1:y!==null?!y.acceptsBooleans:(u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-");default:return!1}}function x(u,p,y,S){if(p===null||typeof p>"u"||g(u,p,y,S))return!0;if(S)return!1;if(y!==null)switch(y.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function v(u,p,y,S,T,R,U){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=S,this.attributeNamespace=T,this.mustUseProperty=y,this.propertyName=u,this.type=p,this.sanitizeURL=R,this.removeEmptyString=U}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){b[u]=new v(u,0,!1,u,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var p=u[0];b[p]=new v(p,1,!1,u[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(u){b[u]=new v(u,2,!1,u.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){b[u]=new v(u,2,!1,u,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(u){b[u]=new v(u,3,!1,u.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(u){b[u]=new v(u,3,!0,u,null,!1,!1)}),["capture","download"].forEach(function(u){b[u]=new v(u,4,!1,u,null,!1,!1)}),["cols","rows","size","span"].forEach(function(u){b[u]=new v(u,6,!1,u,null,!1,!1)}),["rowSpan","start"].forEach(function(u){b[u]=new v(u,5,!1,u.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function w(u){return u[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(u){var p=u.replace(j,w);b[p]=new v(p,1,!1,u,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var p=u.replace(j,w);b[p]=new v(p,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(u){var p=u.replace(j,w);b[p]=new v(p,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(u){b[u]=new v(u,1,!1,u.toLowerCase(),null,!1,!1)}),b.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(u){b[u]=new v(u,1,!1,u.toLowerCase(),null,!0,!0)});function N(u,p,y,S){var T=b.hasOwnProperty(p)?b[p]:null;(T!==null?T.type!==0:S||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(x(p,y,T,S)&&(y=null),S||T===null?m(p)&&(y===null?u.removeAttribute(p):u.setAttribute(p,""+y)):T.mustUseProperty?u[T.propertyName]=y===null?T.type===3?!1:"":y:(p=T.attributeName,S=T.attributeNamespace,y===null?u.removeAttribute(p):(T=T.type,y=T===3||T===4&&y===!0?"":""+y,S?u.setAttributeNS(S,p,y):u.setAttribute(p,y))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),O=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),L=Symbol.iterator;function H(u){return u===null||typeof u!="object"?null:(u=L&&u[L]||u["@@iterator"],typeof u=="function"?u:null)}var I=Object.assign,V;function G(u){if(V===void 0)try{throw Error()}catch(y){var p=y.stack.trim().match(/\n( *(at )?)/);V=p&&p[1]||""}return`
34`+V+u}var z=!1;function oe(u,p){if(!u||z)return"";z=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(le){var S=le}Reflect.construct(u,[],p)}else{try{p.call()}catch(le){S=le}u.call(p.prototype)}else{try{throw Error()}catch(le){S=le}u()}}catch(le){if(le&&S&&typeof le.stack=="string"){for(var T=le.stack.split(`
35`),R=S.stack.split(`
36`),U=T.length-1,Y=R.length-1;1<=U&&0<=Y&&T[U]!==R[Y];)Y--;for(;1<=U&&0<=Y;U--,Y--)if(T[U]!==R[Y]){if(U!==1||Y!==1)do if(U--,Y--,0>Y||T[U]!==R[Y]){var J=`
37`+T[U].replace(" at new "," at ");return u.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",u.displayName)),J}while(1<=U&&0<=Y);break}}}finally{z=!1,Error.prepareStackTrace=y}return(u=u?u.displayName||u.name:"")?G(u):""}function pe(u){switch(u.tag){case 5:return G(u.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return u=oe(u.type,!1),u;case 11:return u=oe(u.type.render,!1),u;case 1:return u=oe(u.type,!0),u;default:return""}}function ue(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case E:return"Fragment";case A:return"Portal";case D:return"Profiler";case P:return"StrictMode";case $:return"Suspense";case F:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case O:return(u.displayName||"Context")+".Consumer";case B:return(u._context.displayName||"Context")+".Provider";case M:var p=u.render;return u=u.displayName,u||(u=p.displayName||p.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case W:return p=u.displayName||null,p!==null?p:ue(u.type)||"Memo";case q:p=u._payload,u=u._init;try{return ue(u(p))}catch{}}return null}function me(u){var p=u.type;switch(u.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=p.render,u=u.displayName||u.name||"",p.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(p);case 8:return p===P?"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 p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function Ne(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function ee(u){var p=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function de(u){var p=ee(u)?"checked":"value",y=Object.getOwnPropertyDescriptor(u.constructor.prototype,p),S=""+u[p];if(!u.hasOwnProperty(p)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,R=y.set;return Object.defineProperty(u,p,{configurable:!0,get:function(){return T.call(this)},set:function(U){S=""+U,R.call(this,U)}}),Object.defineProperty(u,p,{enumerable:y.enumerable}),{getValue:function(){return S},setValue:function(U){S=""+U},stopTracking:function(){u._valueTracker=null,delete u[p]}}}}function be(u){u._valueTracker||(u._valueTracker=de(u))}function ae(u){if(!u)return!1;var p=u._valueTracker;if(!p)return!0;var y=p.getValue(),S="";return u&&(S=ee(u)?u.checked?"true":"false":u.value),u=S,u!==y?(p.setValue(u),!0):!1}function Ke(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function Ue(u,p){var y=p.checked;return I({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??u._wrapperState.initialChecked})}function jt(u,p){var y=p.defaultValue==null?"":p.defaultValue,S=p.checked!=null?p.checked:p.defaultChecked;y=Ne(p.value!=null?p.value:y),u._wrapperState={initialChecked:S,initialValue:y,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function qe(u,p){p=p.checked,p!=null&&N(u,"checked",p,!1)}function Rt(u,p){qe(u,p);var y=Ne(p.value),S=p.type;if(y!=null)S==="number"?(y===0&&u.value===""||u.value!=y)&&(u.value=""+y):u.value!==""+y&&(u.value=""+y);else if(S==="submit"||S==="reset"){u.removeAttribute("value");return}p.hasOwnProperty("value")?vn(u,p.type,y):p.hasOwnProperty("defaultValue")&&vn(u,p.type,Ne(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(u.defaultChecked=!!p.defaultChecked)}function nr(u,p,y){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var S=p.type;if(!(S!=="submit"&&S!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+u._wrapperState.initialValue,y||p===u.value||(u.value=p),u.defaultValue=p}y=u.name,y!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,y!==""&&(u.name=y)}function vn(u,p,y){(p!=="number"||Ke(u.ownerDocument)!==u)&&(y==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+y&&(u.defaultValue=""+y))}var _r=Array.isArray;function Hn(u,p,y,S){if(u=u.options,p){p={};for(var T=0;T<y.length;T++)p["$"+y[T]]=!0;for(y=0;y<u.length;y++)T=p.hasOwnProperty("$"+u[y].value),u[y].selected!==T&&(u[y].selected=T),T&&S&&(u[y].defaultSelected=!0)}else{for(y=""+Ne(y),p=null,T=0;T<u.length;T++){if(u[T].value===y){u[T].selected=!0,S&&(u[T].defaultSelected=!0);return}p!==null||u[T].disabled||(p=u[T])}p!==null&&(p.selected=!0)}}function Nr(u,p){if(p.dangerouslySetInnerHTML!=null)throw Error(n(91));return I({},p,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function ge(u,p){var y=p.value;if(y==null){if(y=p.children,p=p.defaultValue,y!=null){if(p!=null)throw Error(n(92));if(_r(y)){if(1<y.length)throw Error(n(93));y=y[0]}p=y}p==null&&(p=""),y=p}u._wrapperState={initialValue:Ne(y)}}function Je(u,p){var y=Ne(p.value),S=Ne(p.defaultValue);y!=null&&(y=""+y,y!==u.value&&(u.value=y),p.defaultValue==null&&u.defaultValue!==y&&(u.defaultValue=y)),S!=null&&(u.defaultValue=""+S)}function At(u){var p=u.textContent;p===u._wrapperState.initialValue&&p!==""&&p!==null&&(u.value=p)}function fe(u){switch(u){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 we(u,p){return u==null||u==="http://www.w3.org/1999/xhtml"?fe(p):u==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var Ve,tt=(function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,y,S,T){MSApp.execUnsafeLocalFunction(function(){return u(p,y,S,T)})}:u})(function(u,p){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=p;else{for(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=Ve.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;p.firstChild;)u.appendChild(p.firstChild)}});function bt(u,p){if(p){var y=u.firstChild;if(y&&y===u.lastChild&&y.nodeType===3){y.nodeValue=p;return}}u.textContent=p}var on={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},rr=["Webkit","ms","Moz","O"];Object.keys(on).forEach(function(u){rr.forEach(function(p){p=p+u.charAt(0).toUpperCase()+u.substring(1),on[p]=on[u]})});function Kn(u,p,y){return p==null||typeof p=="boolean"||p===""?"":y||typeof p!="number"||p===0||on.hasOwnProperty(u)&&on[u]?(""+p).trim():p+"px"}function Dr(u,p){u=u.style;for(var y in p)if(p.hasOwnProperty(y)){var S=y.indexOf("--")===0,T=Kn(y,p[y],S);y==="float"&&(y="cssFloat"),S?u.setProperty(y,T):u[y]=T}}var Ys=I({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 Rn(u,p){if(p){if(Ys[u]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(n(137,u));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(n(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(n(61))}if(p.style!=null&&typeof p.style!="object")throw Error(n(62))}}function Dt(u,p){if(u.indexOf("-")===-1)return typeof p.is=="string";switch(u){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 zt=null;function R0(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var D0=null,vc=null,xc=null;function _E(u){if(u=of(u)){if(typeof D0!="function")throw Error(n(280));var p=u.stateNode;p&&(p=Dm(p),D0(u.stateNode,u.type,p))}}function NE(u){vc?xc?xc.push(u):xc=[u]:vc=u}function CE(){if(vc){var u=vc,p=xc;if(xc=vc=null,_E(u),p)for(u=0;u<p.length;u++)_E(p[u])}}function PE(u,p){return u(p)}function AE(){}var I0=!1;function kE(u,p,y){if(I0)return u(p,y);I0=!0;try{return PE(u,p,y)}finally{I0=!1,(vc!==null||xc!==null)&&(AE(),CE())}}function Fd(u,p){var y=u.stateNode;if(y===null)return null;var S=Dm(y);if(S===null)return null;y=S[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(u=u.type,S=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!S;break e;default:u=!1}if(u)return null;if(y&&typeof y!="function")throw Error(n(231,p,typeof y));return y}var L0=!1;if(l)try{var Bd={};Object.defineProperty(Bd,"passive",{get:function(){L0=!0}}),window.addEventListener("test",Bd,Bd),window.removeEventListener("test",Bd,Bd)}catch{L0=!1}function $Y(u,p,y,S,T,R,U,Y,J){var le=Array.prototype.slice.call(arguments,3);try{p.apply(y,le)}catch(xe){this.onError(xe)}}var qd=!1,hm=null,pm=!1,$0=null,FY={onError:function(u){qd=!0,hm=u}};function BY(u,p,y,S,T,R,U,Y,J){qd=!1,hm=null,$Y.apply(FY,arguments)}function qY(u,p,y,S,T,R,U,Y,J){if(BY.apply(this,arguments),qd){if(qd){var le=hm;qd=!1,hm=null}else throw Error(n(198));pm||(pm=!0,$0=le)}}function Jo(u){var p=u,y=u;if(u.alternate)for(;p.return;)p=p.return;else{u=p;do p=u,(p.flags&4098)!==0&&(y=p.return),u=p.return;while(u)}return p.tag===3?y:null}function EE(u){if(u.tag===13){var p=u.memoizedState;if(p===null&&(u=u.alternate,u!==null&&(p=u.memoizedState)),p!==null)return p.dehydrated}return null}function TE(u){if(Jo(u)!==u)throw Error(n(188))}function zY(u){var p=u.alternate;if(!p){if(p=Jo(u),p===null)throw Error(n(188));return p!==u?null:u}for(var y=u,S=p;;){var T=y.return;if(T===null)break;var R=T.alternate;if(R===null){if(S=T.return,S!==null){y=S;continue}break}if(T.child===R.child){for(R=T.child;R;){if(R===y)return TE(T),u;if(R===S)return TE(T),p;R=R.sibling}throw Error(n(188))}if(y.return!==S.return)y=T,S=R;else{for(var U=!1,Y=T.child;Y;){if(Y===y){U=!0,y=T,S=R;break}if(Y===S){U=!0,S=T,y=R;break}Y=Y.sibling}if(!U){for(Y=R.child;Y;){if(Y===y){U=!0,y=R,S=T;break}if(Y===S){U=!0,S=R,y=T;break}Y=Y.sibling}if(!U)throw Error(n(189))}}if(y.alternate!==S)throw Error(n(190))}if(y.tag!==3)throw Error(n(188));return y.stateNode.current===y?u:p}function OE(u){return u=zY(u),u!==null?ME(u):null}function ME(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var p=ME(u);if(p!==null)return p;u=u.sibling}return null}var RE=t.unstable_scheduleCallback,DE=t.unstable_cancelCallback,UY=t.unstable_shouldYield,VY=t.unstable_requestPaint,xn=t.unstable_now,WY=t.unstable_getCurrentPriorityLevel,F0=t.unstable_ImmediatePriority,IE=t.unstable_UserBlockingPriority,mm=t.unstable_NormalPriority,HY=t.unstable_LowPriority,LE=t.unstable_IdlePriority,gm=null,vs=null;function KY(u){if(vs&&typeof vs.onCommitFiberRoot=="function")try{vs.onCommitFiberRoot(gm,u,void 0,(u.current.flags&128)===128)}catch{}}var Ki=Math.clz32?Math.clz32:XY,GY=Math.log,YY=Math.LN2;function XY(u){return u>>>=0,u===0?32:31-(GY(u)/YY|0)|0}var ym=64,vm=4194304;function zd(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function xm(u,p){var y=u.pendingLanes;if(y===0)return 0;var S=0,T=u.suspendedLanes,R=u.pingedLanes,U=y&268435455;if(U!==0){var Y=U&~T;Y!==0?S=zd(Y):(R&=U,R!==0&&(S=zd(R)))}else U=y&~T,U!==0?S=zd(U):R!==0&&(S=zd(R));if(S===0)return 0;if(p!==0&&p!==S&&(p&T)===0&&(T=S&-S,R=p&-p,T>=R||T===16&&(R&4194240)!==0))return p;if((S&4)!==0&&(S|=y&16),p=u.entangledLanes,p!==0)for(u=u.entanglements,p&=S;0<p;)y=31-Ki(p),T=1<<y,S|=u[y],p&=~T;return S}function QY(u,p){switch(u){case 1:case 2:case 4:return p+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 p+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 JY(u,p){for(var y=u.suspendedLanes,S=u.pingedLanes,T=u.expirationTimes,R=u.pendingLanes;0<R;){var U=31-Ki(R),Y=1<<U,J=T[U];J===-1?((Y&y)===0||(Y&S)!==0)&&(T[U]=QY(Y,p)):J<=p&&(u.expiredLanes|=Y),R&=~Y}}function B0(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function $E(){var u=ym;return ym<<=1,(ym&4194240)===0&&(ym=64),u}function q0(u){for(var p=[],y=0;31>y;y++)p.push(u);return p}function Ud(u,p,y){u.pendingLanes|=p,p!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,p=31-Ki(p),u[p]=y}function ZY(u,p){var y=u.pendingLanes&~p;u.pendingLanes=p,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=p,u.mutableReadLanes&=p,u.entangledLanes&=p,p=u.entanglements;var S=u.eventTimes;for(u=u.expirationTimes;0<y;){var T=31-Ki(y),R=1<<T;p[T]=0,S[T]=-1,u[T]=-1,y&=~R}}function z0(u,p){var y=u.entangledLanes|=p;for(u=u.entanglements;y;){var S=31-Ki(y),T=1<<S;T&p|u[S]&p&&(u[S]|=p),y&=~T}}var Ft=0;function FE(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var BE,U0,qE,zE,UE,V0=!1,bm=[],qa=null,za=null,Ua=null,Vd=new Map,Wd=new Map,Va=[],eX="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 VE(u,p){switch(u){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":Vd.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wd.delete(p.pointerId)}}function Hd(u,p,y,S,T,R){return u===null||u.nativeEvent!==R?(u={blockedOn:p,domEventName:y,eventSystemFlags:S,nativeEvent:R,targetContainers:[T]},p!==null&&(p=of(p),p!==null&&U0(p)),u):(u.eventSystemFlags|=S,p=u.targetContainers,T!==null&&p.indexOf(T)===-1&&p.push(T),u)}function tX(u,p,y,S,T){switch(p){case"focusin":return qa=Hd(qa,u,p,y,S,T),!0;case"dragenter":return za=Hd(za,u,p,y,S,T),!0;case"mouseover":return Ua=Hd(Ua,u,p,y,S,T),!0;case"pointerover":var R=T.pointerId;return Vd.set(R,Hd(Vd.get(R)||null,u,p,y,S,T)),!0;case"gotpointercapture":return R=T.pointerId,Wd.set(R,Hd(Wd.get(R)||null,u,p,y,S,T)),!0}return!1}function WE(u){var p=Zo(u.target);if(p!==null){var y=Jo(p);if(y!==null){if(p=y.tag,p===13){if(p=EE(y),p!==null){u.blockedOn=p,UE(u.priority,function(){qE(y)});return}}else if(p===3&&y.stateNode.current.memoizedState.isDehydrated){u.blockedOn=y.tag===3?y.stateNode.containerInfo:null;return}}}u.blockedOn=null}function wm(u){if(u.blockedOn!==null)return!1;for(var p=u.targetContainers;0<p.length;){var y=H0(u.domEventName,u.eventSystemFlags,p[0],u.nativeEvent);if(y===null){y=u.nativeEvent;var S=new y.constructor(y.type,y);zt=S,y.target.dispatchEvent(S),zt=null}else return p=of(y),p!==null&&U0(p),u.blockedOn=y,!1;p.shift()}return!0}function HE(u,p,y){wm(u)&&y.delete(p)}function nX(){V0=!1,qa!==null&&wm(qa)&&(qa=null),za!==null&&wm(za)&&(za=null),Ua!==null&&wm(Ua)&&(Ua=null),Vd.forEach(HE),Wd.forEach(HE)}function Kd(u,p){u.blockedOn===p&&(u.blockedOn=null,V0||(V0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nX)))}function Gd(u){function p(T){return Kd(T,u)}if(0<bm.length){Kd(bm[0],u);for(var y=1;y<bm.length;y++){var S=bm[y];S.blockedOn===u&&(S.blockedOn=null)}}for(qa!==null&&Kd(qa,u),za!==null&&Kd(za,u),Ua!==null&&Kd(Ua,u),Vd.forEach(p),Wd.forEach(p),y=0;y<Va.length;y++)S=Va[y],S.blockedOn===u&&(S.blockedOn=null);for(;0<Va.length&&(y=Va[0],y.blockedOn===null);)WE(y),y.blockedOn===null&&Va.shift()}var bc=k.ReactCurrentBatchConfig,jm=!0;function rX(u,p,y,S){var T=Ft,R=bc.transition;bc.transition=null;try{Ft=1,W0(u,p,y,S)}finally{Ft=T,bc.transition=R}}function iX(u,p,y,S){var T=Ft,R=bc.transition;bc.transition=null;try{Ft=4,W0(u,p,y,S)}finally{Ft=T,bc.transition=R}}function W0(u,p,y,S){if(jm){var T=H0(u,p,y,S);if(T===null)cb(u,p,S,Sm,y),VE(u,S);else if(tX(T,u,p,y,S))S.stopPropagation();else if(VE(u,S),p&4&&-1<eX.indexOf(u)){for(;T!==null;){var R=of(T);if(R!==null&&BE(R),R=H0(u,p,y,S),R===null&&cb(u,p,S,Sm,y),R===T)break;T=R}T!==null&&S.stopPropagation()}else cb(u,p,S,null,y)}}var Sm=null;function H0(u,p,y,S){if(Sm=null,u=R0(S),u=Zo(u),u!==null)if(p=Jo(u),p===null)u=null;else if(y=p.tag,y===13){if(u=EE(p),u!==null)return u;u=null}else if(y===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;u=null}else p!==u&&(u=null);return Sm=u,null}function KE(u){switch(u){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"invali
37d":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(WY()){case F0:return 1;case IE:return 4;case mm:case HY:return 16;case LE:return 536870912;default:return 16}default:return 16}}var Wa=null,K0=null,_m=null;function GE(){if(_m)return _m;var u,p=K0,y=p.length,S,T="value"in Wa?Wa.value:Wa.textContent,R=T.length;for(u=0;u<y&&p[u]===T[u];u++);var U=y-u;for(S=1;S<=U&&p[y-S]===T[R-S];S++);return _m=T.slice(u,1<S?1-S:void 0)}function Nm(u){var p=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&p===13&&(u=13)):u=p,u===10&&(u=13),32<=u||u===13?u:0}function Cm(){return!0}function YE(){return!1}function ni(u){function p(y,S,T,R,U){this._reactName=y,this._targetInst=T,this.type=S,this.nativeEvent=R,this.target=U,this.currentTarget=null;for(var Y in u)u.hasOwnProperty(Y)&&(y=u[Y],this[Y]=y?y(R):R[Y]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?Cm:YE,this.isPropagationStopped=YE,this}return I(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var y=this.nativeEvent;y&&(y.preventDefault?y.preventDefault():typeof y.returnValue!="unknown"&&(y.returnValue=!1),this.isDefaultPrevented=Cm)},stopPropagation:function(){var y=this.nativeEvent;y&&(y.stopPropagation?y.stopPropagation():typeof y.cancelBubble!="unknown"&&(y.cancelBubble=!0),this.isPropagationStopped=Cm)},persist:function(){},isPersistent:Cm}),p}var wc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},G0=ni(wc),Yd=I({},wc,{view:0,detail:0}),sX=ni(Yd),Y0,X0,Xd,Pm=I({},Yd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J0,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==Xd&&(Xd&&u.type==="mousemove"?(Y0=u.screenX-Xd.screenX,X0=u.screenY-Xd.screenY):X0=Y0=0,Xd=u),Y0)},movementY:function(u){return"movementY"in u?u.movementY:X0}}),XE=ni(Pm),aX=I({},Pm,{dataTransfer:0}),oX=ni(aX),lX=I({},Yd,{relatedTarget:0}),Q0=ni(lX),cX=I({},wc,{animationName:0,elapsedTime:0,pseudoElement:0}),uX=ni(cX),dX=I({},wc,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),fX=ni(dX),hX=I({},wc,{data:0}),QE=ni(hX),pX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mX={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"},gX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yX(u){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(u):(u=gX[u])?!!p[u]:!1}function J0(){return yX}var vX=I({},Yd,{key:function(u){if(u.key){var p=pX[u.key]||u.key;if(p!=="Unidentified")return p}
vendor: 17,411 bytes, lines 37-38
37return u.type==="keypress"?(u=Nm(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?mX[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J0,charCode:function(u){return u.type==="keypress"?Nm(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?Nm(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),xX=ni(vX),bX=I({},Pm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JE=ni(bX),wX=I({},Yd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J0}),jX=ni(wX),SX=I({},wc,{propertyName:0,elapsedTime:0,pseudoElement:0}),_X=ni(SX),NX=I({},Pm,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),CX=ni(NX),PX=[9,13,27,32],Z0=l&&"CompositionEvent"in window,Qd=null;l&&"documentMode"in document&&(Qd=document.documentMode);var AX=l&&"TextEvent"in window&&!Qd,ZE=l&&(!Z0||Qd&&8<Qd&&11>=Qd),eT=" ",tT=!1;function nT(u,p){switch(u){case"keyup":return PX.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rT(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var jc=!1;function kX(u,p){switch(u){case"compositionend":return rT(p);case"keypress":return p.which!==32?null:(tT=!0,eT);case"textInput":return u=p.data,u===eT&&tT?null:u;default:return null}}function EX(u,p){if(jc)return u==="compositionend"||!Z0&&nT(u,p)?(u=GE(),_m=K0=Wa=null,jc=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return ZE&&p.locale!=="ko"?null:p.data;default:return null}}var TX={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 iT(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p==="input"?!!TX[u.type]:p==="textarea"}function sT(u,p,y,S){NE(S),p=Om(p,"onChange"),0<p.length&&(y=new G0("onChange","change",null,y,S),u.push({event:y,listeners:p}))}var Jd=null,Zd=null;function OX(u){ST(u,0)}function Am(u){var p=Pc(u);if(ae(p))return u}function MX(u,p){if(u==="change")return p}var aT=!1;if(l){var eb;if(l){var tb="oninput"in document;if(!tb){var oT=document.createElement("div");oT.setAttribute("oninput","return;"),tb=typeof oT.oninput=="function"}eb=tb}else eb=!1;aT=eb&&(!document.documentMode||9<document.documentMode)}function lT(){Jd&&(Jd.detachEvent("onpropertychange",cT),Zd=Jd=null)}function cT(u){if(u.propertyName==="value"&&Am(Zd)){var p=[];sT(p,Zd,u,R0(u)),kE(OX,p)}}function RX(u,p,y){u==="focusin"?(lT(),Jd=p,Zd=y,Jd.attachEvent("onpropertychange",cT)):u==="focusout"&&lT()}function DX(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return Am(Zd)}function IX(u,p){if(u==="click")return Am(p)}function LX(u,p){if(u==="input"||u==="change")return Am(p)}function $X(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var Gi=typeof Object.is=="function"?Object.is:$X;function ef(u,p){if(Gi(u,p))return!0;if(typeof u!="object"||u===null||typeof p!="object"||p===null)return!1;var y=Object.keys(u),S=Object.keys(p);if(y.length!==S.length)return!1;for(S=0;S<y.length;S++){var T=y[S];if(!c.call(p,T)||!Gi(u[T],p[T]))return!1}return!0}function uT(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function dT(u,p){var y=uT(u);u=0;for(var S;y;){if(y.nodeType===3){if(S=u+y.textContent.length,u<=p&&S>=p)return{node:y,offset:p-u};u=S}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=uT(y)}}function fT(u,p){return u&&p?u===p?!0:u&&u.nodeType===3?!1:p&&p.nodeType===3?fT(u,p.parentNode):"contains"in u?u.contains(p):u.compareDocumentPosition?!!(u.compareDocumentPosition(p)&16):!1:!1}function hT(){for(var u=window,p=Ke();p instanceof u.HTMLIFrameElement;){try{var y=typeof p.contentWindow.location.href=="string"}catch{y=!1}if(y)u=p.contentWindow;else break;p=Ke(u.document)}return p}function nb(u){var p=u&&u.nodeName&&u.nodeName.toLowerCase();return p&&(p==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||p==="textarea"||u.contentEditable==="true")}function FX(u){var p=hT(),y=u.focusedElem,S=u.selectionRange;if(p!==y&&y&&y.ownerDocument&&fT(y.ownerDocument.documentElement,y)){if(S!==null&&nb(y)){if(p=S.start,u=S.end,u===void 0&&(u=p),"selectionStart"in y)y.selectionStart=p,y.selectionEnd=Math.min(u,y.value.length);else if(u=(p=y.ownerDocument||document)&&p.defaultView||window,u.getSelection){u=u.getSelection();var T=y.textContent.length,R=Math.min(S.start,T);S=S.end===void 0?R:Math.min(S.end,T),!u.extend&&R>S&&(T=S,S=R,R=T),T=dT(y,R);var U=dT(y,S);T&&U&&(u.rangeCount!==1||u.anchorNode!==T.node||u.anchorOffset!==T.offset||u.focusNode!==U.node||u.focusOffset!==U.offset)&&(p=p.createRange(),p.setStart(T.node,T.offset),u.removeAllRanges(),R>S?(u.addRange(p),u.extend(U.node,U.offset)):(p.setEnd(U.node,U.offset),u.addRange(p)))}}for(p=[],u=y;u=u.parentNode;)u.nodeType===1&&p.push({element:u,left:u.scrollLeft,top:u.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<p.length;y++)u=p[y],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var BX=l&&"documentMode"in document&&11>=document.documentMode,Sc=null,rb=null,tf=null,ib=!1;function pT(u,p,y){var S=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;ib||Sc==null||Sc!==Ke(S)||(S=Sc,"selectionStart"in S&&nb(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),tf&&ef(tf,S)||(tf=S,S=Om(rb,"onSelect"),0<S.length&&(p=new G0("onSelect","select",null,p,y),u.push({event:p,listeners:S}),p.target=Sc)))}function km(u,p){var y={};return y[u.toLowerCase()]=p.toLowerCase(),y["Webkit"+u]="webkit"+p,y["Moz"+u]="moz"+p,y}var _c={animationend:km("Animation","AnimationEnd"),animationiteration:km("Animation","AnimationIteration"),animationstart:km("Animation","AnimationStart"),transitionend:km("Transition","TransitionEnd")},sb={},mT={};l&&(mT=document.createElement("div").style,"AnimationEvent"in window||(delete _c.animationend.animation,delete _c.animationiteration.animation,delete _c.animationstart.animation),"TransitionEvent"in window||delete _c.transitionend.transition);function Em(u){if(sb[u])return sb[u];if(!_c[u])return u;var p=_c[u],y;for(y in p)if(p.hasOwnProperty(y)&&y in mT)return sb[u]=p[y];return u}var gT=Em("animationend"),yT=Em("animationiteration"),vT=Em("animationstart"),xT=Em("transitionend"),bT=new Map,wT="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 Ha(u,p){bT.set(u,p),s(p,[u])}for(var ab=0;ab<wT.length;ab++){var ob=wT[ab],qX=ob.toLowerCase(),zX=ob[0].toUpperCase()+ob.slice(1);Ha(qX,"on"+zX)}Ha(gT,"onAnimationEnd"),Ha(yT,"onAnimationIteration"),Ha(vT,"onAnimationStart"),Ha("dblclick","onDoubleClick"),Ha("focusin","onFocus"),Ha("focusout","onBlur"),Ha(xT,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nf="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(" "),UX=new Set("cancel close invalid load scroll toggle".split(" ").concat(nf));function jT(u,p,y){var S=u.type||"unknown-event";u.currentTarget=y,qY(S,p,void 0,u),u.currentTarget=null}function ST(u,p){p=(p&4)!==0;for(var y=0;y<u.length;y++){var S=u[y],T=S.event;S=S.listeners;e:{var R=void 0;if(p)for(var U=S.length-1;0<=U;U--){var Y=S[U],J=Y.instance,le=Y.currentTarget;if(Y=Y.listener,J!==R&&T.isPropagationStopped())break e;jT(T,Y,le),R=J}else for(U=0;U<S.length;U++){if(Y=S[U],J=Y.instance,le=Y.currentTarget,Y=Y.listener,J!==R&&T.isPropagationStopped())break e;jT(T,Y,le),R=J}}}if(pm)throw u=$0,pm=!1,$0=null,u}function nn(u,p){var y=p[mb];y===void 0&&(y=p[mb]=new Set);var S=u+"__bubble";y.has(S)||(_T(p,u,2,!1),y.add(S))}function lb(u,p,y){var S=0;p&&(S|=4),_T(y,u,S,p)}var Tm="_reactListening"+Math.random().toString(36).slice(2);function rf(u){if(!u[Tm]){u[Tm]=!0,r.forEach(function(y){y!=="selectionchange"&&(UX.has(y)||lb(y,!1,u),lb(y,!0,u))});var p=u.nodeType===9?u:u.ownerDocument;p===null||p[Tm]||(p[Tm]=!0,lb("selectionchange",!1,p))}}function _T(u,p,y,S){switch(KE(p)){case 1:var T=rX;break;case 4:T=iX;break;default:T=W0}y=T.bind(null,p,y,u),T=void 0,!L0||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(T=!0),S?T!==void 0?u.addEventListener(p,y,{capture:!0,passive:T}):u.addEventListener(p,y,!0):T!==void 0?u.addEventListener(p,y,{passive:T}):u.addEventListener(p,y,!1)}function cb(u,p,y,S,T){var R=S;if((p&1)===0&&(p&2)===0&&S!==null)e:for(;;){if(S===null)return;var U=S.tag;if(U===3||U===4){var Y=S.stateNode.containerInfo;if(Y===T||Y.nodeType===8&&Y.parentNode===T)break;if(U===4)for(U=S.return;U!==null;){var J=U.tag;if((J===3||J===4)&&(J=U.stateNode.containerInfo,J===T||J.nodeType===8&&J.parentNode===T))return;U=U.return}for(;Y!==null;){if(U=Zo(Y),U===null)return;if(J=U.tag,J===5||J===6){S=R=U;continue e}Y=Y.parentNode}}S=S.return}kE(function(){var le=R,xe=R0(y),Se=[];e:{var ve=bT.get(u);if(ve!==void 0){var Re=G0,Le=u;switch(u){case"keypress":if(Nm(y)===0)break e;case"keydown":case"keyup":Re=xX;break;case"focusin":Le="focus",Re=Q0;break;case"focusout":Le="blur",Re=Q0;break;case"beforeblur":case"afterblur":Re=Q0;break;case"click":if(y.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Re=XE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Re=oX;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Re=jX;break;case gT:case yT:case vT:Re=uX;break;case xT:Re=_X;break;case"scroll":Re=sX;break;case"wheel":Re=CX;break;case"copy":case"cut":case"paste":Re=fX;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Re=JE}var Be=(p&4)!==0,bn=!Be&&u==="scroll",ie=Be?ve!==null?ve+"Capture":null:ve;Be=[];for(var Z=le,se;Z!==null;){se=Z;var Ae=se.stateNode;if(se.tag===5&&Ae!==null&&(se=Ae,ie!==null&&(Ae=Fd(Z,ie),Ae!=null&&Be.push(sf(Z,Ae,se)))),bn)break;Z=Z.return}0<Be.length&&(ve=new Re(ve,Le,null,y,xe),Se.push({event:ve,listeners:Be}))}}if((p&7)===0){e:{if(ve=u==="mouseover"||u==="pointerover",Re=u==="mouseout"||u==="pointerout",ve&&y!==zt&&(Le=y.relatedTarget||y.fromElement)&&(Zo(Le)||Le[Xs]))break e;if((Re||ve)&&(ve=xe.window===xe?xe:(ve=xe.ownerDocument)?ve.defaultView||ve.parentWindow:window,Re?(Le=y.relatedTarget||y.toElement,Re=le,Le=Le?Zo(Le):null,Le!==null&&(bn=Jo(Le),Le!==bn||Le.tag!==5&&Le.tag!==6)&&(Le=null)):(Re=null,Le=le),Re!==Le)){if(Be=XE,Ae="onMouseLeave",ie="onMouseEnter",Z="mouse",(u==="pointerout"||u==="pointerover")&&(Be=JE,Ae="onPointerLeave",ie="onPointerEnter",Z="pointer"),bn=Re==null?ve:Pc(Re),se=Le==null?ve:Pc(Le),ve=new Be(Ae,Z+"leave",Re,y,xe),ve.target=bn,ve.relatedTarget=se,Ae=null,Zo(xe)===le&&(Be=new Be(ie,Z+"enter",Le,y,xe),Be.target=se,Be.relatedTarget=bn,Ae=Be),bn=Ae,Re&&Le)t:{for(Be=Re,ie=Le,Z=0,se=Be;se;se=Nc(se))Z++;for(se=0,Ae=ie;Ae;Ae=Nc(Ae))se++;for(;0<Z-se;)Be=Nc(Be),Z--;for(;0<se-Z;)ie=Nc(ie),se--;for(;Z--;){if(Be===ie||ie!==null&&Be===ie.alternate)break t;Be=Nc(Be),ie=Nc(ie)}Be=null}else Be=null;Re!==null&&NT(Se,ve,Re,Be,!1),Le!==null&&bn!==null&&NT(Se,bn,Le,Be,!0)}}e:{if(ve=le?Pc(le):window,Re=ve.nodeName&&ve.nodeName.toLowerCase(),Re==="select"||Re==="input"&&ve.type==="file")var ze=MX;else if(iT(ve))if(aT)ze=LX;else{ze=DX;var Xe=RX}else(Re=ve.nodeName)&&Re.toLowerCase()==="input"&&(ve.type==="checkbox"||ve.type==="radio")&&(ze=IX);if(ze&&(ze=ze(u,le))){sT(Se,ze,y,xe);break e}Xe&&Xe(u,ve,le),u==="focusout"&&(Xe=ve._wrapperState)&&Xe.controlled&&ve.type==="number"&&vn(ve,"number",ve.value)}switch(Xe=le?Pc(le):window,u){case"focusin":(iT(Xe)||Xe.contentEditable==="true")&&(Sc=Xe,rb=le,tf=null);break;case"focusout":tf=rb=Sc=null;break;case"mousedown":ib=!0;break;case"contextmenu":case"mouseup":case"dragend":ib=!1,pT(Se,y,xe);break;case"selectionchange":if(BX)break;case"keydown":case"keyup":pT(Se,y,xe)}var Qe;if(Z0)e:{switch(u){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else jc?nT(u,y)&&(nt="onCompositionEnd"):u==="keydown"&&y.keyCode===229&&(nt="onCompositionStart");nt&&(ZE&&y.locale!=="ko"&&(jc||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&jc&&(Qe=GE()):(Wa=xe,K0="value"in Wa?Wa.value:Wa.textContent,jc=!0)),Xe=Om(le,nt),0<Xe.length&&(nt=new QE(nt,u,null,y,xe),Se.push({event:nt,listeners:Xe}),Qe?nt.data=Qe:(Qe=rT(y),Qe!==null&&(nt.data=Qe)))),(Qe=AX?kX(u,y):EX(u,y))&&(le=Om(le,"onBeforeInput"),0<le.length&&(xe=new QE("onBeforeInput","beforeinput",null,y,xe),Se.push({event:xe,listeners:le}),xe.data=Qe))}ST(Se,p)})}function sf(u,p,y){return{instance:u,listener:p,currentTarget:y}}function Om(u,p){for(var y=p+"Capture",S=[];u!==null;){var T=u,R=T.stateNode;T.tag===5&&R!==null&&(T=R,R=Fd(u,y),R!=null&&S.unshift(sf(u,R,T)),R=Fd(u,p),R!=null&&S.push(sf(u,R,T))),u=u.return}return S}function Nc(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u||null}function NT(u,p,y,S,T){for(var R=p._reactName,U=[];y!==null&&y!==S;){var Y=y,J=Y.alternate,le=Y.stateNode;if(J!==null&&J===S)break;Y.tag===5&&le!==null&&(Y=le,T?(J=Fd(y,R),J!=null&&U.unshift(sf(y,J,Y))):T||(J=Fd(y,R),J!=null&&U.push(sf(y,J,Y)))),y=y.return}U.length!==0&&u.push({event:p,listeners:U})}var VX=/\r\n?/g,WX=/\u0000|\uFFFD/g;function CT(u){return(typeof u=="string"?u:""+u).replace(VX,`
38`).replace(WX,"")}function Mm(u,p,y){if(p=CT(p),CT(u)!==p&&y)throw Error(n(425))}function Rm(){}var ub=null,db=null;function fb(u,p){return u==="textarea"||u==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var hb=typeof setTimeout=="function"?setTimeout:void 0,HX=typeof clearTimeout=="function"?clearTimeout:void 0,PT=typeof Promise=="function"?Promise:void 0,KX=typeof queueMicrotask=="function"?queueMicrotask:typeof PT<"u"?function(u){return PT.resolve(null).then(u).catch(GX)}:hb;function GX(u){setTimeout(function(){throw u})}function pb(u,p){var y=p,S=0;do{var T=y.nextSibling;if(u.removeChild(y),T&&T.nodeType===8)if(y=T.data,y==="/$"){if(S===0){u.removeChild(T),Gd(p);return}S--}else y!=="$"&&y!=="$?"&&y!=="$!"||S++;y=T}while(y);Gd(p)}function Ka(u){for(;u!=null;u=u.nextSibling){var p=u.nodeType;if(p===1||p===3)break;if(p===8){if(p=u.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return u}function AT(u){u=u.previousSibling;for(var p=0;u;){if(u.nodeType===8){var y=u.data;if(y==="$"||y==="$!"||y==="$?"){if(p===0)return u;p--}else y==="/$"&&p++}u=u.previousSibling}return null}var Cc=Math.random().toString(36).slice(2),xs="__reactFiber$"+Cc,af="__reactProps$"+Cc,Xs="__reactContainer$"+Cc,mb="__reactEvents$"+Cc,YX="__reactListeners$"+Cc,XX="__reactHandles$"+Cc;function Zo(u){var p=u[xs];if(p)return p;for(var y=u.parentNode;y;){if(p=y[Xs]||y[xs]){if(y=p.alternate,p.child!==null||y!==null&&y.child!==null)for(u=AT(u);u!==null;){if(y=u[xs])return y;u=AT(u)}return p}u=y,y=u.parentNode}return null}function of(u){return u=u[xs]||u[Xs],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function Pc(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(n(33))}function Dm(u){return u[af]||null}var gb=[],Ac=-1;function Ga(u){return{current:u}}
vendor: 7,319 bytes, line 38
38function rn(u){0>Ac||(u.current=gb[Ac],gb[Ac]=null,Ac--)}function Gt(u,p){Ac++,gb[Ac]=u.current,u.current=p}var Ya={},dr=Ga(Ya),Ir=Ga(!1),el=Ya;function kc(u,p){var y=u.type.contextTypes;if(!y)return Ya;var S=u.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===p)return S.__reactInternalMemoizedMaskedChildContext;var T={},R;for(R in y)T[R]=p[R];return S&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=p,u.__reactInternalMemoizedMaskedChildContext=T),T}function Lr(u){return u=u.childContextTypes,u!=null}function Im(){rn(Ir),rn(dr)}function kT(u,p,y){if(dr.current!==Ya)throw Error(n(168));Gt(dr,p),Gt(Ir,y)}function ET(u,p,y){var S=u.stateNode;if(p=p.childContextTypes,typeof S.getChildContext!="function")return y;S=S.getChildContext();for(var T in S)if(!(T in p))throw Error(n(108,me(u)||"Unknown",T));return I({},y,S)}function Lm(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Ya,el=dr.current,Gt(dr,u),Gt(Ir,Ir.current),!0}function TT(u,p,y){var S=u.stateNode;if(!S)throw Error(n(169));y?(u=ET(u,p,el),S.__reactInternalMemoizedMergedChildContext=u,rn(Ir),rn(dr),Gt(dr,u)):rn(Ir),Gt(Ir,y)}var Qs=null,$m=!1,yb=!1;function OT(u){Qs===null?Qs=[u]:Qs.push(u)}function QX(u){$m=!0,OT(u)}function Xa(){if(!yb&&Qs!==null){yb=!0;var u=0,p=Ft;try{var y=Qs;for(Ft=1;u<y.length;u++){var S=y[u];do S=S(!0);while(S!==null)}Qs=null,$m=!1}catch(T){throw Qs!==null&&(Qs=Qs.slice(u+1)),RE(F0,Xa),T}finally{Ft=p,yb=!1}}return null}var Ec=[],Tc=0,Fm=null,Bm=0,wi=[],ji=0,tl=null,Js=1,Zs="";function nl(u,p){Ec[Tc++]=Bm,Ec[Tc++]=Fm,Fm=u,Bm=p}function MT(u,p,y){wi[ji++]=Js,wi[ji++]=Zs,wi[ji++]=tl,tl=u;var S=Js;u=Zs;var T=32-Ki(S)-1;S&=~(1<<T),y+=1;var R=32-Ki(p)+T;if(30<R){var U=T-T%5;R=(S&(1<<U)-1).toString(32),S>>=U,T-=U,Js=1<<32-Ki(p)+T|y<<T|S,Zs=R+u}else Js=1<<R|y<<T|S,Zs=u}function vb(u){u.return!==null&&(nl(u,1),MT(u,1,0))}function xb(u){for(;u===Fm;)Fm=Ec[--Tc],Ec[Tc]=null,Bm=Ec[--Tc],Ec[Tc]=null;for(;u===tl;)tl=wi[--ji],wi[ji]=null,Zs=wi[--ji],wi[ji]=null,Js=wi[--ji],wi[ji]=null}var ri=null,ii=null,ln=!1,Yi=null;function RT(u,p){var y=Ci(5,null,null,0);y.elementType="DELETED",y.stateNode=p,y.return=u,p=u.deletions,p===null?(u.deletions=[y],u.flags|=16):p.push(y)}function DT(u,p){switch(u.tag){case 5:var y=u.type;return p=p.nodeType!==1||y.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(u.stateNode=p,ri=u,ii=Ka(p.firstChild),!0):!1;case 6:return p=u.pendingProps===""||p.nodeType!==3?null:p,p!==null?(u.stateNode=p,ri=u,ii=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(y=tl!==null?{id:Js,overflow:Zs}:null,u.memoizedState={dehydrated:p,treeContext:y,retryLane:1073741824},y=Ci(18,null,null,0),y.stateNode=p,y.return=u,u.child=y,ri=u,ii=null,!0):!1;default:return!1}}function bb(u){return(u.mode&1)!==0&&(u.flags&128)===0}function wb(u){if(ln){var p=ii;if(p){var y=p;if(!DT(u,p)){if(bb(u))throw Error(n(418));p=Ka(y.nextSibling);var S=ri;p&&DT(u,p)?RT(S,y):(u.flags=u.flags&-4097|2,ln=!1,ri=u)}}else{if(bb(u))throw Error(n(418));u.flags=u.flags&-4097|2,ln=!1,ri=u}}}function IT(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;ri=u}function qm(u){if(u!==ri)return!1;if(!ln)return IT(u),ln=!0,!1;var p;if((p=u.tag!==3)&&!(p=u.tag!==5)&&(p=u.type,p=p!=="head"&&p!=="body"&&!fb(u.type,u.memoizedProps)),p&&(p=ii)){if(bb(u))throw LT(),Error(n(418));for(;p;)RT(u,p),p=Ka(p.nextSibling)}if(IT(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));e:{for(u=u.nextSibling,p=0;u;){if(u.nodeType===8){var y=u.data;if(y==="/$"){if(p===0){ii=Ka(u.nextSibling);break e}p--}else y!=="$"&&y!=="$!"&&y!=="$?"||p++}u=u.nextSibling}ii=null}}else ii=ri?Ka(u.stateNode.nextSibling):null;return!0}function LT(){for(var u=ii;u;)u=Ka(u.nextSibling)}function Oc(){ii=ri=null,ln=!1}function jb(u){Yi===null?Yi=[u]:Yi.push(u)}var JX=k.ReactCurrentBatchConfig;function lf(u,p,y){if(u=y.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(y._owner){if(y=y._owner,y){if(y.tag!==1)throw Error(n(309));var S=y.stateNode}if(!S)throw Error(n(147,u));var T=S,R=""+u;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===R?p.ref:(p=function(U){var Y=T.refs;U===null?delete Y[R]:Y[R]=U},p._stringRef=R,p)}if(typeof u!="string")throw Error(n(284));if(!y._owner)throw Error(n(290,u))}return u}function zm(u,p){throw u=Object.prototype.toString.call(p),Error(n(31,u==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":u))}function $T(u){var p=u._init;return p(u._payload)}function FT(u){function p(ie,Z){if(u){var se=ie.deletions;se===null?(ie.deletions=[Z],ie.flags|=16):se.push(Z)}}function y(ie,Z){if(!u)return null;for(;Z!==null;)p(ie,Z),Z=Z.sibling;return null}function S(ie,Z){for(ie=new Map;Z!==null;)Z.key!==null?ie.set(Z.key,Z):ie.set(Z.index,Z),Z=Z.sibling;return ie}function T(ie,Z){return ie=io(ie,Z),ie.index=0,ie.sibling=null,ie}function R(ie,Z,se){return ie.index=se,u?(se=ie.alternate,se!==null?(se=se.index,se<Z?(ie.flags|=2,Z):se):(ie.flags|=2,Z)):(ie.flags|=1048576,Z)}function U(ie){return u&&ie.alternate===null&&(ie.flags|=2),ie}function Y(ie,Z,se,Ae){return Z===null||Z.tag!==6?(Z=hw(se,ie.mode,Ae),Z.return=ie,Z):(Z=T(Z,se),Z.return=ie,Z)}function J(ie,Z,se,Ae){var ze=se.type;return ze===E?xe(ie,Z,se.props.children,Ae,se.key):Z!==null&&(Z.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===q&&$T(ze)===Z.type)?(Ae=T(Z,se.props),Ae.ref=lf(ie,Z,se),Ae.return=ie,Ae):(Ae=fg(se.type,se.key,se.props,null,ie.mode,Ae),Ae.ref=lf(ie,Z,se),Ae.return=ie,Ae)}function le(ie,Z,se,Ae){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==se.containerInfo||Z.stateNode.implementation!==se.implementation?(Z=pw(se,ie.mode,Ae),Z.return=ie,Z):(Z=T(Z,se.children||[]),Z.return=ie,Z)}function xe(ie,Z,se,Ae,ze){return Z===null||Z.tag!==7?(Z=ul(se,ie.mode,Ae,ze),Z.return=ie,Z):(Z=T(Z,se),Z.return=ie,Z)}function Se(ie,Z,se){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Z=hw(""+Z,ie.mode,se),Z.return=ie,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case C:return se=fg(Z.type,Z.key,Z.props,null,ie.mode,se),se.ref=lf(ie,null,Z),se.return=ie,se;case A:return Z=pw(Z,ie.mode,se),Z.return=ie,Z;case q:var Ae=Z._init;return Se(ie,Ae(Z._payload),se)}if(_r(Z)||H(Z))return Z=ul(Z,ie.mode,se,null),Z.return=ie,Z;zm(ie,Z)}return null}function ve(ie,Z,se,Ae){var ze=Z!==null?Z.key:null;if(typeof se=="string"&&se!==""||typeof se=="number")return ze!==null?null:Y(ie,Z,""+se,Ae);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case C:return se.key===ze?J(ie,Z,se,Ae):null;case A:return se.key===ze?le(ie,Z,se,Ae):null;case q:return ze=se._init,ve(ie,Z,ze(se._payload),Ae)}if(_r(se)||H(se))return ze!==null?null:xe(ie,Z,se,Ae,null);zm(ie,se)}return null}function Re(ie,Z,se,Ae,ze){if(typeof Ae=="string"&&Ae!==""||typeof Ae=="number")return ie=ie.get(se)||null,Y(Z,ie,""+Ae,ze);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case C:return ie=ie.get(Ae.key===null?se:Ae.key)||null,J(Z,ie,Ae,ze);case A:return ie=ie.get(Ae.key===null?se:Ae.key)||null,le(Z,ie,Ae,ze);case q:var Xe=Ae._init;return Re(ie,Z,se,Xe(Ae._payload),ze)}if(_r(Ae)||H(Ae))return ie=ie.get(se)||null,xe(Z,ie,Ae,ze,null);zm(Z,Ae)}return null}function Le(ie,Z,se,Ae){for(var ze=null,Xe=null,Qe=Z,nt=Z=0,Xn=null;Qe!==null&&nt<se.length;nt++){Qe.index>
vendor: 11,483 bytes, line 38
38nt?(Xn=Qe,Qe=null):Xn=Qe.sibling;var Et=ve(ie,Qe,se[nt],Ae);if(Et===null){Qe===null&&(Qe=Xn);break}u&&Qe&&Et.alternate===null&&p(ie,Qe),Z=R(Et,Z,nt),Xe===null?ze=Et:Xe.sibling=Et,Xe=Et,Qe=Xn}if(nt===se.length)return y(ie,Qe),ln&&nl(ie,nt),ze;if(Qe===null){for(;nt<se.length;nt++)Qe=Se(ie,se[nt],Ae),Qe!==null&&(Z=R(Qe,Z,nt),Xe===null?ze=Qe:Xe.sibling=Qe,Xe=Qe);return ln&&nl(ie,nt),ze}for(Qe=S(ie,Qe);nt<se.length;nt++)Xn=Re(Qe,ie,nt,se[nt],Ae),Xn!==null&&(u&&Xn.alternate!==null&&Qe.delete(Xn.key===null?nt:Xn.key),Z=R(Xn,Z,nt),Xe===null?ze=Xn:Xe.sibling=Xn,Xe=Xn);return u&&Qe.forEach(function(so){return p(ie,so)}),ln&&nl(ie,nt),ze}function Be(ie,Z,se,Ae){var ze=H(se);if(typeof ze!="function")throw Error(n(150));if(se=ze.call(se),se==null)throw Error(n(151));for(var Xe=ze=null,Qe=Z,nt=Z=0,Xn=null,Et=se.next();Qe!==null&&!Et.done;nt++,Et=se.next()){Qe.index>nt?(Xn=Qe,Qe=null):Xn=Qe.sibling;var so=ve(ie,Qe,Et.value,Ae);if(so===null){Qe===null&&(Qe=Xn);break}u&&Qe&&so.alternate===null&&p(ie,Qe),Z=R(so,Z,nt),Xe===null?ze=so:Xe.sibling=so,Xe=so,Qe=Xn}if(Et.done)return y(ie,Qe),ln&&nl(ie,nt),ze;if(Qe===null){for(;!Et.done;nt++,Et=se.next())Et=Se(ie,Et.value,Ae),Et!==null&&(Z=R(Et,Z,nt),Xe===null?ze=Et:Xe.sibling=Et,Xe=Et);return ln&&nl(ie,nt),ze}for(Qe=S(ie,Qe);!Et.done;nt++,Et=se.next())Et=Re(Qe,ie,nt,Et.value,Ae),Et!==null&&(u&&Et.alternate!==null&&Qe.delete(Et.key===null?nt:Et.key),Z=R(Et,Z,nt),Xe===null?ze=Et:Xe.sibling=Et,Xe=Et);return u&&Qe.forEach(function(TQ){return p(ie,TQ)}),ln&&nl(ie,nt),ze}function bn(ie,Z,se,Ae){if(typeof se=="object"&&se!==null&&se.type===E&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case C:e:{for(var ze=se.key,Xe=Z;Xe!==null;){if(Xe.key===ze){if(ze=se.type,ze===E){if(Xe.tag===7){y(ie,Xe.sibling),Z=T(Xe,se.props.children),Z.return=ie,ie=Z;break e}}else if(Xe.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===q&&$T(ze)===Xe.type){y(ie,Xe.sibling),Z=T(Xe,se.props),Z.ref=lf(ie,Xe,se),Z.return=ie,ie=Z;break e}y(ie,Xe);break}else p(ie,Xe);Xe=Xe.sibling}se.type===E?(Z=ul(se.props.children,ie.mode,Ae,se.key),Z.return=ie,ie=Z):(Ae=fg(se.type,se.key,se.props,null,ie.mode,Ae),Ae.ref=lf(ie,Z,se),Ae.return=ie,ie=Ae)}return U(ie);case A:e:{for(Xe=se.key;Z!==null;){if(Z.key===Xe)if(Z.tag===4&&Z.stateNode.containerInfo===se.containerInfo&&Z.stateNode.implementation===se.implementation){y(ie,Z.sibling),Z=T(Z,se.children||[]),Z.return=ie,ie=Z;break e}else{y(ie,Z);break}else p(ie,Z);Z=Z.sibling}Z=pw(se,ie.mode,Ae),Z.return=ie,ie=Z}return U(ie);case q:return Xe=se._init,bn(ie,Z,Xe(se._payload),Ae)}if(_r(se))return Le(ie,Z,se,Ae);if(H(se))return Be(ie,Z,se,Ae);zm(ie,se)}return typeof se=="string"&&se!==""||typeof se=="number"?(se=""+se,Z!==null&&Z.tag===6?(y(ie,Z.sibling),Z=T(Z,se),Z.return=ie,ie=Z):(y(ie,Z),Z=hw(se,ie.mode,Ae),Z.return=ie,ie=Z),U(ie)):y(ie,Z)}return bn}var Mc=FT(!0),BT=FT(!1),Um=Ga(null),Vm=null,Rc=null,Sb=null;function _b(){Sb=Rc=Vm=null}function Nb(u){var p=Um.current;rn(Um),u._currentValue=p}function Cb(u,p,y){for(;u!==null;){var S=u.alternate;if((u.childLanes&p)!==p?(u.childLanes|=p,S!==null&&(S.childLanes|=p)):S!==null&&(S.childLanes&p)!==p&&(S.childLanes|=p),u===y)break;u=u.return}}function Dc(u,p){Vm=u,Sb=Rc=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&p)!==0&&($r=!0),u.firstContext=null)}function Si(u){var p=u._currentValue;if(Sb!==u)if(u={context:u,memoizedValue:p,next:null},Rc===null){if(Vm===null)throw Error(n(308));Rc=u,Vm.dependencies={lanes:0,firstContext:u}}else Rc=Rc.next=u;return p}var rl=null;function Pb(u){rl===null?rl=[u]:rl.push(u)}function qT(u,p,y,S){var T=p.interleaved;return T===null?(y.next=y,Pb(p)):(y.next=T.next,T.next=y),p.interleaved=y,ea(u,S)}function ea(u,p){u.lanes|=p;var y=u.alternate;for(y!==null&&(y.lanes|=p),y=u,u=u.return;u!==null;)u.childLanes|=p,y=u.alternate,y!==null&&(y.childLanes|=p),y=u,u=u.return;return y.tag===3?y.stateNode:null}var Qa=!1;function Ab(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zT(u,p){u=u.updateQueue,p.updateQueue===u&&(p.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function ta(u,p){return{eventTime:u,lane:p,tag:0,payload:null,callback:null,next:null}}function Ja(u,p,y){var S=u.updateQueue;if(S===null)return null;if(S=S.shared,(kt&2)!==0){var T=S.pending;return T===null?p.next=p:(p.next=T.next,T.next=p),S.pending=p,ea(u,y)}return T=S.interleaved,T===null?(p.next=p,Pb(S)):(p.next=T.next,T.next=p),S.interleaved=p,ea(u,y)}function Wm(u,p,y){if(p=p.updateQueue,p!==null&&(p=p.shared,(y&4194240)!==0)){var S=p.lanes;S&=u.pendingLanes,y|=S,p.lanes=y,z0(u,y)}}function UT(u,p){var y=u.updateQueue,S=u.alternate;if(S!==null&&(S=S.updateQueue,y===S)){var T=null,R=null;if(y=y.firstBaseUpdate,y!==null){do{var U={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};R===null?T=R=U:R=R.next=U,y=y.next}while(y!==null);R===null?T=R=p:R=R.next=p}else T=R=p;y={baseState:S.baseState,firstBaseUpdate:T,lastBaseUpdate:R,shared:S.shared,effects:S.effects},u.updateQueue=y;return}u=y.lastBaseUpdate,u===null?y.firstBaseUpdate=p:u.next=p,y.lastBaseUpdate=p}function Hm(u,p,y,S){var T=u.updateQueue;Qa=!1;var R=T.firstBaseUpdate,U=T.lastBaseUpdate,Y=T.shared.pending;if(Y!==null){T.shared.pending=null;var J=Y,le=J.next;J.next=null,U===null?R=le:U.next=le,U=J;var xe=u.alternate;xe!==null&&(xe=xe.updateQueue,Y=xe.lastBaseUpdate,Y!==U&&(Y===null?xe.firstBaseUpdate=le:Y.next=le,xe.lastBaseUpdate=J))}if(R!==null){var Se=T.baseState;U=0,xe=le=J=null,Y=R;do{var ve=Y.lane,Re=Y.eventTime;if((S&ve)===ve){xe!==null&&(xe=xe.next={eventTime:Re,lane:0,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null});e:{var Le=u,Be=Y;switch(ve=p,Re=y,Be.tag){case 1:if(Le=Be.payload,typeof Le=="function"){Se=Le.call(Re,Se,ve);break e}Se=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=Be.payload,ve=typeof Le=="function"?Le.call(Re,Se,ve):Le,ve==null)break e;Se=I({},Se,ve);break e;case 2:Qa=!0}}Y.callback!==null&&Y.lane!==0&&(u.flags|=64,ve=T.effects,ve===null?T.effects=[Y]:ve.push(Y))}else Re={eventTime:Re,lane:ve,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},xe===null?(le=xe=Re,J=Se):xe=xe.next=Re,U|=ve;if(Y=Y.next,Y===null){if(Y=T.shared.pending,Y===null)break;ve=Y,Y=ve.next,ve.next=null,T.lastBaseUpdate=ve,T.shared.pending=null}}while(!0);if(xe===null&&(J=Se),T.baseState=J,T.firstBaseUpdate=le,T.lastBaseUpdate=xe,p=T.shared.interleaved,p!==null){T=p;do U|=T.lane,T=T.next;while(T!==p)}else R===null&&(T.shared.lanes=0);al|=U,u.lanes=U,u.memoizedState=Se}}function VT(u,p,y){if(u=p.effects,p.effects=null,u!==null)for(p=0;p<u.length;p++){var S=u[p],T=S.callback;if(T!==null){if(S.callback=null,S=y,typeof T!="function")throw Error(n(191,T));T.call(S)}}}var cf={},bs=Ga(cf),uf=Ga(cf),df=Ga(cf);function il(u){if(u===cf)throw Error(n(174));return u}function kb(u,p){switch(Gt(df,p),Gt(uf,u),Gt(bs,cf),u=p.nodeType,u){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:we(null,"");break;default:u=u===8?p.parentNode:p,p=u.namespaceURI||null,u=u.tagName,p=we(p,u)}rn(bs),Gt(bs,p)}function Ic(){rn(bs),rn(uf),rn(df)}function WT(u){il(df.current);var p=il(bs.current),y=we(p,u.type);p!==y&&(Gt(uf,u),Gt(bs,y))}function Eb(u){uf.current===u&&(rn(bs),rn(uf))}var un=Ga(0);function Km(u){for(var p=u;p!==null;){if(p.tag===13){var y=p.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||y.data==="$?"||y.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Tb=[];function Ob(){for(var u=0;u<Tb.length;u++)Tb[u]._workInProgressVersionPrimary=null;Tb.length=0}var Gm=k.ReactCurrentDispatcher,Mb=k.ReactCurrentBatchConfig,sl=0,dn=null,Dn=null,Gn=null,Ym=!1,ff=!1,hf=0,ZX=0;function fr(){throw Error(n(321))}function Rb(u,p){if(p===null)return!1;for(var y=0;y<p.length&&y<u.length;y++)if(!Gi(u[y],p[y]))return!1;return!0}function Db(u,p,y,S,T,R){if(sl=R,dn=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,Gm.current=u===null||u.memoizedState===null?rQ:iQ,u=y(S,T),ff){R=0;do{if(ff=!1,hf=0,25<=R)throw Error(n(301));R+=1,Gn=Dn=null,p.updateQueue=null,Gm.current=sQ,u=y(S,T)}while(ff)}if(Gm.current=Jm,p=Dn!==null&&Dn.next!==null,sl=0,Gn=Dn=dn=null,Ym=!1,p)throw Error(n(300));return u}function Ib(){var u=hf!==0;return hf=0,u}function ws(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gn===null?dn.memoizedState=Gn=u:Gn=Gn.next=u,Gn}function _i(){if(Dn===null){var u=dn.alternate;u=u!==null?u.memoizedState:null}else u=Dn.next;var p=Gn===null?dn.memoizedState:Gn.next;if(p!==null)Gn=p,Dn=u;else{if(u===null)throw Error(n(310));Dn=u,u={memoizedState:Dn.memoizedState,baseState:Dn.baseState,baseQueue:Dn.baseQueue,queue:Dn.queue,next:null},Gn===null?dn.memoizedState=Gn=u:Gn=Gn.next=u}return Gn}function pf(u,p){return typeof p=="function"?p(u):p}function Lb(u){var p=_i(),y=p.queue;if(y===null)throw Error(n(311));y.lastRenderedReducer=u;var S=Dn,T=S.baseQueue,R=y.pending;if(R!==null){if(T!==null){var U=T.next;T.next=R.next,R.next=U}S.baseQueue=T=R,y.pending=null}if(T!==null){R=T.next,S=S.baseState;var Y=U=null,J=null,le=R;do{var xe=le.lane;if((sl&xe)===xe)J!==null&&(J=J.next={lane:0,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),S=le.hasEagerState?le.eagerState:u(S,le.action);else{var Se={lane:xe,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null};J===null?(Y=J=Se,U=S):J=J.next=Se,dn.lanes|=xe,al|=xe}le=le.next}while(le!==null&&le!==R);J===null?U=S:J.next=Y,Gi(S,p.memoizedState)||($r=!0),p.memoizedState=S,p.baseState=U,p.baseQueue=J,y.lastRenderedState=S}if(u=y.interleaved,u!==null){T=u;do R=T.lane,dn.lanes|=R,al|=R,T=T.next;while(T!==u)}else T===null&&(y.lanes=0);return[p.memoizedState,y.dispatch]}function $b(u){var p=_i(),y=p.queue;if(y===null)throw Error(n(311));y.lastRenderedReducer=u;var S=y.dispatch,T=y.pending,R=p.memoizedState;if(T!==null){y.pending=null;var U=T=T.next;do R=u(R,U.action),U=U.next;while(U!==T);Gi(R,p.memoizedState)||($r=!0),p.memoizedState=R,p.baseQueue===null&&(p.baseState=R),y.lastRenderedState=R}return[R,S]}function HT(){}function KT(u,p){var y=dn,S=_i(),T=p(),R=!Gi(S.memoizedState,T);if(R&&(S.memoizedState=T,$r=!0),S=S.queue,Fb(XT.bind(null,y,S,u),[u]),S.getSnapshot!==p||R||Gn!==null&&Gn.memoizedState.tag&1){if(y.flags|=2048,mf(9,YT.bind(null,y,S,T,p),void 0,null),Yn===null)throw Error(n(349));(sl&30)!==0||GT(y,p,T)}return T}function GT(u,p,y){u.flags|=16384,u={getSnapshot:p,value:y},p=dn.updateQueue,p===null?(p={lastEffect:null,stores:null},dn.updateQueue=p,p.stores=[u]):(y=p.stores,y===null?p.stores=[u]:y.push(u))}function YT(u,p,y,S){p.value=y,p.getSnapshot=S,QT(p)&&JT(u)}function XT(u,p,y){return y(function(){QT(p)&&JT(u)})}function QT(u){var p=u.getSnapshot;u=u.value;try{var y=p();return!Gi(u,y)}catch{return!0}}function JT(u){var p=ea(u,1);p!==null&&Zi(p,u,1,-1)}function ZT(u){var p=ws();return typeof u=="function"&&(u=u()),p.memoizedState=p.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pf,lastRenderedState:u}
vendor: 4,077 bytes, line 38
38,p.queue=u,u=u.dispatch=nQ.bind(null,dn,u),[p.memoizedState,u]}function mf(u,p,y,S){return u={tag:u,create:p,destroy:y,deps:S,next:null},p=dn.updateQueue,p===null?(p={lastEffect:null,stores:null},dn.updateQueue=p,p.lastEffect=u.next=u):(y=p.lastEffect,y===null?p.lastEffect=u.next=u:(S=y.next,y.next=u,u.next=S,p.lastEffect=u)),u}function eO(){return _i().memoizedState}function Xm(u,p,y,S){var T=ws();dn.flags|=u,T.memoizedState=mf(1|p,y,void 0,S===void 0?null:S)}function Qm(u,p,y,S){var T=_i();S=S===void 0?null:S;var R=void 0;if(Dn!==null){var U=Dn.memoizedState;if(R=U.destroy,S!==null&&Rb(S,U.deps)){T.memoizedState=mf(p,y,R,S);return}}dn.flags|=u,T.memoizedState=mf(1|p,y,R,S)}function tO(u,p){return Xm(8390656,8,u,p)}function Fb(u,p){return Qm(2048,8,u,p)}function nO(u,p){return Qm(4,2,u,p)}function rO(u,p){return Qm(4,4,u,p)}function iO(u,p){if(typeof p=="function")return u=u(),p(u),function(){p(null)};if(p!=null)return u=u(),p.current=u,function(){p.current=null}}function sO(u,p,y){return y=y!=null?y.concat([u]):null,Qm(4,4,iO.bind(null,p,u),y)}function Bb(){}function aO(u,p){var y=_i();p=p===void 0?null:p;var S=y.memoizedState;return S!==null&&p!==null&&Rb(p,S[1])?S[0]:(y.memoizedState=[u,p],u)}function oO(u,p){var y=_i();p=p===void 0?null:p;var S=y.memoizedState;return S!==null&&p!==null&&Rb(p,S[1])?S[0]:(u=u(),y.memoizedState=[u,p],u)}function lO(u,p,y){return(sl&21)===0?(u.baseState&&(u.baseState=!1,$r=!0),u.memoizedState=y):(Gi(y,p)||(y=$E(),dn.lanes|=y,al|=y,u.baseState=!0),p)}function eQ(u,p){var y=Ft;Ft=y!==0&&4>y?y:4,u(!0);var S=Mb.transition;Mb.transition={};try{u(!1),p()}finally{Ft=y,Mb.transition=S}}function cO(){return _i().memoizedState}function tQ(u,p,y){var S=no(u);if(y={lane:S,action:y,hasEagerState:!1,eagerState:null,next:null},uO(u))dO(p,y);else if(y=qT(u,p,y,S),y!==null){var T=Pr();Zi(y,u,S,T),fO(y,p,S)}}function nQ(u,p,y){var S=no(u),T={lane:S,action:y,hasEagerState:!1,eagerState:null,next:null};if(uO(u))dO(p,T);else{var R=u.alternate;if(u.lanes===0&&(R===null||R.lanes===0)&&(R=p.lastRenderedReducer,R!==null))try{var U=p.lastRenderedState,Y=R(U,y);if(T.hasEagerState=!0,T.eagerState=Y,Gi(Y,U)){var J=p.interleaved;J===null?(T.next=T,Pb(p)):(T.next=J.next,J.next=T),p.interleaved=T;return}}catch{}finally{}y=qT(u,p,T,S),y!==null&&(T=Pr(),Zi(y,u,S,T),fO(y,p,S))}}function uO(u){var p=u.alternate;return u===dn||p!==null&&p===dn}function dO(u,p){ff=Ym=!0;var y=u.pending;y===null?p.next=p:(p.next=y.next,y.next=p),u.pending=p}function fO(u,p,y){if((y&4194240)!==0){var S=p.lanes;S&=u.pendingLanes,y|=S,p.lanes=y,z0(u,y)}}var Jm={readContext:Si,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useInsertionEffect:fr,useLayoutEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useMutableSource:fr,useSyncExternalStore:fr,useId:fr,unstable_isNewReconciler:!1},rQ={readContext:Si,useCallback:function(u,p){return ws().memoizedState=[u,p===void 0?null:p],u},useContext:Si,useEffect:tO,useImperativeHandle:function(u,p,y){return y=y!=null?y.concat([u]):null,Xm(4194308,4,iO.bind(null,p,u),y)},useLayoutEffect:function(u,p){return Xm(4194308,4,u,p)},useInsertionEffect:function(u,p){return Xm(4,2,u,p)},useMemo:function(u,p){var y=ws();return p=p===void 0?null:p,u=u(),y.memoizedState=[u,p],u},useReducer:function(u,p,y){var S=ws();return p=y!==void 0?y(p):p,S.memoizedState=S.baseState=p,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:p},S.queue=u,u=u.dispatch=tQ.bind(null,dn,u),[S.memoizedState,u]},useRef:function(u){var p=ws();return u={current:u},p.memoizedState=u},useState:ZT,useDebugValue:Bb,useDeferredValue:function(u){return ws().memoizedState=u},useTransition:function(){var u=ZT(!1),p=u[0];return u=eQ.bind(null,u[1]),ws().memoizedState=u,[p,u]},useMutableSource:function(){},useSyncExternalStore:function(u,p,y){var S=dn,T=ws();if(ln){if(y===void 0)throw Error(n(407));y=y()}else{if(y=p(),Yn===null)throw Error(n(349));(sl&30)!==0||GT(S,p,y)}T.memoizedState=y;var R={value:y,getSnapshot:p};
vendor: 4,209 bytes, lines 38-40
38return T.queue=R,tO(XT.bind(null,S,R,u),[u]),S.flags|=2048,mf(9,YT.bind(null,S,R,y,p),void 0,null),y},useId:function(){var u=ws(),p=Yn.identifierPrefix;if(ln){var y=Zs,S=Js;y=(S&~(1<<32-Ki(S)-1)).toString(32)+y,p=":"+p+"R"+y,y=hf++,0<y&&(p+="H"+y.toString(32)),p+=":"}else y=ZX++,p=":"+p+"r"+y.toString(32)+":";return u.memoizedState=p},unstable_isNewReconciler:!1},iQ={readContext:Si,useCallback:aO,useContext:Si,useEffect:Fb,useImperativeHandle:sO,useInsertionEffect:nO,useLayoutEffect:rO,useMemo:oO,useReducer:Lb,useRef:eO,useState:function(){return Lb(pf)},useDebugValue:Bb,useDeferredValue:function(u){var p=_i();return lO(p,Dn.memoizedState,u)},useTransition:function(){var u=Lb(pf)[0],p=_i().memoizedState;return[u,p]},useMutableSource:HT,useSyncExternalStore:KT,useId:cO,unstable_isNewReconciler:!1},sQ={readContext:Si,useCallback:aO,useContext:Si,useEffect:Fb,useImperativeHandle:sO,useInsertionEffect:nO,useLayoutEffect:rO,useMemo:oO,useReducer:$b,useRef:eO,useState:function(){return $b(pf)},useDebugValue:Bb,useDeferredValue:function(u){var p=_i();return Dn===null?p.memoizedState=u:lO(p,Dn.memoizedState,u)},useTransition:function(){var u=$b(pf)[0],p=_i().memoizedState;return[u,p]},useMutableSource:HT,useSyncExternalStore:KT,useId:cO,unstable_isNewReconciler:!1};function Xi(u,p){if(u&&u.defaultProps){p=I({},p),u=u.defaultProps;for(var y in u)p[y]===void 0&&(p[y]=u[y]);return p}return p}function qb(u,p,y,S){p=u.memoizedState,y=y(S,p),y=y==null?p:I({},p,y),u.memoizedState=y,u.lanes===0&&(u.updateQueue.baseState=y)}var Zm={isMounted:function(u){return(u=u._reactInternals)?Jo(u)===u:!1},enqueueSetState:function(u,p,y){u=u._reactInternals;var S=Pr(),T=no(u),R=ta(S,T);R.payload=p,y!=null&&(R.callback=y),p=Ja(u,R,T),p!==null&&(Zi(p,u,T,S),Wm(p,u,T))},enqueueReplaceState:function(u,p,y){u=u._reactInternals;var S=Pr(),T=no(u),R=ta(S,T);R.tag=1,R.payload=p,y!=null&&(R.callback=y),p=Ja(u,R,T),p!==null&&(Zi(p,u,T,S),Wm(p,u,T))},enqueueForceUpdate:function(u,p){u=u._reactInternals;var y=Pr(),S=no(u),T=ta(y,S);T.tag=2,p!=null&&(T.callback=p),p=Ja(u,T,S),p!==null&&(Zi(p,u,S,y),Wm(p,u,S))}};function hO(u,p,y,S,T,R,U){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(S,R,U):p.prototype&&p.prototype.isPureReactComponent?!ef(y,S)||!ef(T,R):!0}function pO(u,p,y){var S=!1,T=Ya,R=p.contextType;return typeof R=="object"&&R!==null?R=Si(R):(T=Lr(p)?el:dr.current,S=p.contextTypes,R=(S=S!=null)?kc(u,T):Ya),p=new p(y,R),u.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Zm,u.stateNode=p,p._reactInternals=u,S&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=T,u.__reactInternalMemoizedMaskedChildContext=R),p}function mO(u,p,y,S){u=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(y,S),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(y,S),p.state!==u&&Zm.enqueueReplaceState(p,p.state,null)}function zb(u,p,y,S){var T=u.stateNode;T.props=y,T.state=u.memoizedState,T.refs={},Ab(u);var R=p.contextType;typeof R=="object"&&R!==null?T.context=Si(R):(R=Lr(p)?el:dr.current,T.context=kc(u,R)),T.state=u.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(qb(u,p,R,y),T.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(p=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),p!==T.state&&Zm.enqueueReplaceState(T,T.state,null),Hm(u,y,T,S),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308)}function Lc(u,p){try{var y="",S=p;do y+=pe(S),S=S.return;while(S);var T=y}catch(R){T=`
39Error generating stack: `+R.message+`
40`+R.stack}return{value:u,source:p,stack:T,digest:null}}function Ub(u,p,y){return{value:u,source:null,stack:y??null,digest:p??null}}function Vb(u,p){try{console.error(p.value)}catch(y){setTimeout(function(){throw y})}}var aQ=typeof WeakMap=="function"?WeakMap:Map;function gO(u,p,y){y=ta(-1,y),y.tag=3,y.payload={element:null};var S=p.value;
vendor: 16,516 bytes, line 40
40return y.callback=function(){ag||(ag=!0,sw=S),Vb(u,p)},y}function yO(u,p,y){y=ta(-1,y),y.tag=3;var S=u.type.getDerivedStateFromError;if(typeof S=="function"){var T=p.value;y.payload=function(){return S(T)},y.callback=function(){Vb(u,p)}}var R=u.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(y.callback=function(){Vb(u,p),typeof S!="function"&&(eo===null?eo=new Set([this]):eo.add(this));var U=p.stack;this.componentDidCatch(p.value,{componentStack:U!==null?U:""})}),y}function vO(u,p,y){var S=u.pingCache;if(S===null){S=u.pingCache=new aQ;var T=new Set;S.set(p,T)}else T=S.get(p),T===void 0&&(T=new Set,S.set(p,T));T.has(y)||(T.add(y),u=bQ.bind(null,u,p,y),p.then(u,u))}function xO(u){do{var p;if((p=u.tag===13)&&(p=u.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return u;u=u.return}while(u!==null);return null}function bO(u,p,y,S,T){return(u.mode&1)===0?(u===p?u.flags|=65536:(u.flags|=128,y.flags|=131072,y.flags&=-52805,y.tag===1&&(y.alternate===null?y.tag=17:(p=ta(-1,1),p.tag=2,Ja(y,p,1))),y.lanes|=1),u):(u.flags|=65536,u.lanes=T,u)}var oQ=k.ReactCurrentOwner,$r=!1;function Cr(u,p,y,S){p.child=u===null?BT(p,null,y,S):Mc(p,u.child,y,S)}function wO(u,p,y,S,T){y=y.render;var R=p.ref;return Dc(p,T),S=Db(u,p,y,S,R,T),y=Ib(),u!==null&&!$r?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~T,na(u,p,T)):(ln&&y&&vb(p),p.flags|=1,Cr(u,p,S,T),p.child)}function jO(u,p,y,S,T){if(u===null){var R=y.type;return typeof R=="function"&&!fw(R)&&R.defaultProps===void 0&&y.compare===null&&y.defaultProps===void 0?(p.tag=15,p.type=R,SO(u,p,R,S,T)):(u=fg(y.type,null,S,p,p.mode,T),u.ref=p.ref,u.return=p,p.child=u)}if(R=u.child,(u.lanes&T)===0){var U=R.memoizedProps;if(y=y.compare,y=y!==null?y:ef,y(U,S)&&u.ref===p.ref)return na(u,p,T)}return p.flags|=1,u=io(R,S),u.ref=p.ref,u.return=p,p.child=u}function SO(u,p,y,S,T){if(u!==null){var R=u.memoizedProps;if(ef(R,S)&&u.ref===p.ref)if($r=!1,p.pendingProps=S=R,(u.lanes&T)!==0)(u.flags&131072)!==0&&($r=!0);else return p.lanes=u.lanes,na(u,p,T)}return Wb(u,p,y,S,T)}function _O(u,p,y){var S=p.pendingProps,T=S.children,R=u!==null?u.memoizedState:null;if(S.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gt(Fc,si),si|=y;else{if((y&1073741824)===0)return u=R!==null?R.baseLanes|y:y,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:u,cachePool:null,transitions:null},p.updateQueue=null,Gt(Fc,si),si|=u,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},S=R!==null?R.baseLanes:y,Gt(Fc,si),si|=S}else R!==null?(S=R.baseLanes|y,p.memoizedState=null):S=y,Gt(Fc,si),si|=S;return Cr(u,p,T,y),p.child}function NO(u,p){var y=p.ref;(u===null&&y!==null||u!==null&&u.ref!==y)&&(p.flags|=512,p.flags|=2097152)}function Wb(u,p,y,S,T){var R=Lr(y)?el:dr.current;return R=kc(p,R),Dc(p,T),y=Db(u,p,y,S,R,T),S=Ib(),u!==null&&!$r?(p.updateQueue=u.updateQueue,p.flags&=-2053,u.lanes&=~T,na(u,p,T)):(ln&&S&&vb(p),p.flags|=1,Cr(u,p,y,T),p.child)}function CO(u,p,y,S,T){if(Lr(y)){var R=!0;Lm(p)}else R=!1;if(Dc(p,T),p.stateNode===null)tg(u,p),pO(p,y,S),zb(p,y,S,T),S=!0;else if(u===null){var U=p.stateNode,Y=p.memoizedProps;U.props=Y;var J=U.context,le=y.contextType;typeof le=="object"&&le!==null?le=Si(le):(le=Lr(y)?el:dr.current,le=kc(p,le));var xe=y.getDerivedStateFromProps,Se=typeof xe=="function"||typeof U.getSnapshotBeforeUpdate=="function";Se||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(Y!==S||J!==le)&&mO(p,U,S,le),Qa=!1;var ve=p.memoizedState;U.state=ve,Hm(p,S,U,T),J=p.memoizedState,Y!==S||ve!==J||Ir.current||Qa?(typeof xe=="function"&&(qb(p,y,xe,S),J=p.memoizedState),(Y=Qa||hO(p,y,Y,S,ve,J,le))?(Se||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(p.flags|=4194308)):(typeof U.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=S,p.memoizedState=J),U.props=S,U.state=J,U.context=le,S=Y):(typeof U.componentDidMount=="function"&&(p.flags|=4194308),S=!1)}else{U=p.stateNode,zT(u,p),Y=p.memoizedProps,le=p.type===p.elementType?Y:Xi(p.type,Y),U.props=le,Se=p.pendingProps,ve=U.context,J=y.contextType,typeof J=="object"&&J!==null?J=Si(J):(J=Lr(y)?el:dr.current,J=kc(p,J));var Re=y.getDerivedStateFromProps;(xe=typeof Re=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(Y!==Se||ve!==J)&&mO(p,U,S,J),Qa=!1,ve=p.memoizedState,U.state=ve,Hm(p,S,U,T);var Le=p.memoizedState;Y!==Se||ve!==Le||Ir.current||Qa?(typeof Re=="function"&&(qb(p,y,Re,S),Le=p.memoizedState),(le=Qa||hO(p,y,le,S,ve,Le,J)||!1)?(xe||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(S,Le,J),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(S,Le,J)),typeof U.componentDidUpdate=="function"&&(p.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof U.componentDidUpdate!="function"||Y===u.memoizedProps&&ve===u.memoizedState||(p.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||Y===u.memoizedProps&&ve===u.memoizedState||(p.flags|=1024),p.memoizedProps=S,p.memoizedState=Le),U.props=S,U.state=Le,U.context=J,S=le):(typeof U.componentDidUpdate!="function"||Y===u.memoizedProps&&ve===u.memoizedState||(p.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||Y===u.memoizedProps&&ve===u.memoizedState||(p.flags|=1024),S=!1)}return Hb(u,p,y,S,R,T)}function Hb(u,p,y,S,T,R){NO(u,p);var U=(p.flags&128)!==0;if(!S&&!U)return T&&TT(p,y,!1),na(u,p,R);S=p.stateNode,oQ.current=p;var Y=U&&typeof y.getDerivedStateFromError!="function"?null:S.render();return p.flags|=1,u!==null&&U?(p.child=Mc(p,u.child,null,R),p.child=Mc(p,null,Y,R)):Cr(u,p,Y,R),p.memoizedState=S.state,T&&TT(p,y,!0),p.child}function PO(u){var p=u.stateNode;p.pendingContext?kT(u,p.pendingContext,p.pendingContext!==p.context):p.context&&kT(u,p.context,!1),kb(u,p.containerInfo)}function AO(u,p,y,S,T){return Oc(),jb(T),p.flags|=256,Cr(u,p,y,S),p.child}var Kb={dehydrated:null,treeContext:null,retryLane:0};function Gb(u){return{baseLanes:u,cachePool:null,transitions:null}}function kO(u,p,y){var S=p.pendingProps,T=un.current,R=!1,U=(p.flags&128)!==0,Y;if((Y=U)||(Y=u!==null&&u.memoizedState===null?!1:(T&2)!==0),Y?(R=!0,p.flags&=-129):(u===null||u.memoizedState!==null)&&(T|=1),Gt(un,T&1),u===null)return wb(p),u=p.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((p.mode&1)===0?p.lanes=1:u.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(U=S.children,u=S.fallback,R?(S=p.mode,R=p.child,U={mode:"hidden",children:U},(S&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=U):R=hg(U,S,0,null),u=ul(u,S,y,null),R.return=p,u.return=p,R.sibling=u,p.child=R,p.child.memoizedState=Gb(y),p.memoizedState=Kb,u):Yb(p,U));if(T=u.memoizedState,T!==null&&(Y=T.dehydrated,Y!==null))return lQ(u,p,U,S,Y,T,y);if(R){R=S.fallback,U=p.mode,T=u.child,Y=T.sibling;var J={mode:"hidden",children:S.children};return(U&1)===0&&p.child!==T?(S=p.child,S.childLanes=0,S.pendingProps=J,p.deletions=null):(S=io(T,J),S.subtreeFlags=T.subtreeFlags&14680064),Y!==null?R=io(Y,R):(R=ul(R,U,y,null),R.flags|=2),R.return=p,S.return=p,S.sibling=R,p.child=S,S=R,R=p.child,U=u.child.memoizedState,U=U===null?Gb(y):{baseLanes:U.baseLanes|y,cachePool:null,transitions:U.transitions},R.memoizedState=U,R.childLanes=u.childLanes&~y,p.memoizedState=Kb,S}return R=u.child,u=R.sibling,S=io(R,{mode:"visible",children:S.children}),(p.mode&1)===0&&(S.lanes=y),S.return=p,S.sibling=null,u!==null&&(y=p.deletions,y===null?(p.deletions=[u],p.flags|=16):y.push(u)),p.child=S,p.memoizedState=null,S}function Yb(u,p){return p=hg({mode:"visible",children:p},u.mode,0,null),p.return=u,u.child=p}function eg(u,p,y,S){return S!==null&&jb(S),Mc(p,u.child,null,y),u=Yb(p,p.pendingProps.children),u.flags|=2,p.memoizedState=null,u}function lQ(u,p,y,S,T,R,U){if(y)return p.flags&256?(p.flags&=-257,S=Ub(Error(n(422))),eg(u,p,U,S)):p.memoizedState!==null?(p.child=u.child,p.flags|=128,null):(R=S.fallback,T=p.mode,S=hg({mode:"visible",children:S.children},T,0,null),R=ul(R,T,U,null),R.flags|=2,S.return=p,R.return=p,S.sibling=R,p.child=S,(p.mode&1)!==0&&Mc(p,u.child,null,U),p.child.memoizedState=Gb(U),p.memoizedState=Kb,R);if((p.mode&1)===0)return eg(u,p,U,null);if(T.data==="$!"){if(S=T.nextSibling&&T.nextSibling.dataset,S)var Y=S.dgst;return S=Y,R=Error(n(419)),S=Ub(R,S,void 0),eg(u,p,U,S)}if(Y=(U&u.childLanes)!==0,$r||Y){if(S=Yn,S!==null){switch(U&-U){case 4:T=2;break;case 16:T=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:T=32;break;case 536870912:T=268435456;break;default:T=0}T=(T&(S.suspendedLanes|U))!==0?0:T,T!==0&&T!==R.retryLane&&(R.retryLane=T,ea(u,T),Zi(S,u,T,-1))}return dw(),S=Ub(Error(n(421))),eg(u,p,U,S)}return T.data==="$?"?(p.flags|=128,p.child=u.child,p=wQ.bind(null,u),T._reactRetry=p,null):(u=R.treeContext,ii=Ka(T.nextSibling),ri=p,ln=!0,Yi=null,u!==null&&(wi[ji++]=Js,wi[ji++]=Zs,wi[ji++]=tl,Js=u.id,Zs=u.overflow,tl=p),p=Yb(p,S.children),p.flags|=4096,p)}function EO(u,p,y){u.lanes|=p;var S=u.alternate;S!==null&&(S.lanes|=p),Cb(u.return,p,y)}function Xb(u,p,y,S,T){var R=u.memoizedState;R===null?u.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:S,tail:y,tailMode:T}:(R.isBackwards=p,R.rendering=null,R.renderingStartTime=0,R.last=S,R.tail=y,R.tailMode=T)}function TO(u,p,y){var S=p.pendingProps,T=S.revealOrder,R=S.tail;if(Cr(u,p,S.children,y),S=un.current,(S&2)!==0)S=S&1|2,p.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=p.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&EO(u,y,p);else if(u.tag===19)EO(u,y,p);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===p)break e;for(;u.sibling===null;){if(u.return===null||u.return===p)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}S&=1}if(Gt(un,S),(p.mode&1)===0)p.memoizedState=null;else switch(T){case"forwards":for(y=p.child,T=null;y!==null;)u=y.alternate,u!==null&&Km(u)===null&&(T=y),y=y.sibling;y=T,y===null?(T=p.child,p.child=null):(T=y.sibling,y.sibling=null),Xb(p,!1,T,y,R);break;case"backwards":for(y=null,T=p.child,p.child=null;T!==null;){if(u=T.alternate,u!==null&&Km(u)===null){p.child=T;break}u=T.sibling,T.sibling=y,y=T,T=u}Xb(p,!0,y,null,R);break;case"together":Xb(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function tg(u,p){(p.mode&1)===0&&u!==null&&(u.alternate=null,p.alternate=null,p.flags|=2)}function na(u,p,y){if(u!==null&&(p.dependencies=u.dependencies),al|=p.lanes,(y&p.childLanes)===0)return null;if(u!==null&&p.child!==u.child)throw Error(n(153));if(p.child!==null){for(u=p.child,y=io(u,u.pendingProps),p.child=y,y.return=p;u.sibling!==null;)u=u.sibling,y=y.sibling=io(u,u.pendingProps),y.return=p;y.sibling=null}return p.child}function cQ(u,p,y){switch(p.tag){case 3:PO(p),Oc();break;case 5:WT(p);break;case 1:Lr(p.type)&&Lm(p);break;case 4:kb(p,p.stateNode.containerInfo);break;case 10:var S=p.type._context,T=p.memoizedProps.value;Gt(Um,S._currentValue),S._currentValue=T;break;case 13:if(S=p.memoizedState,S!==null)return S.dehydrated!==null?(Gt(un,un.current&1),p.flags|=128,null):(y&p.child.childLanes)!==0?kO(u,p,y):(Gt(un,un.current&1),u=na(u,p,y),u!==null?u.sibling:null);Gt(un,un.current&1);break;case 19:if(S=(y&p.childLanes)!==0,(u.flags&128)!==0){if(S)return TO(u,p,y);p.flags|=128}if(T=p.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),Gt(un,un.current),S)break;return null;case 22:case 23:return p.lanes=0,_O(u,p,y)}return na(u,p,y)}var OO,Qb,MO,RO;OO=function(u,p){for(var y=p.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===p)break;for(;y.sibling===null;){if(y.return===null||y.return===p)return;y=y.return}y.sibling.return=y.return,y=y.sibling}},Qb=function(){},MO=function(u,p,y,S){var T=u.memoizedProps;if(T!==S){u=p.stateNode,il(bs.current);var R=null;switch(y){case"input":T=Ue(u,T),S=Ue(u,S),R=[];break;case"select":T=I({},T,{value:void 0}),S=I({},S,{value:void 0}),R=[];break;case"textarea":T=Nr(u,T),S=Nr(u,S),R=[];break;default:typeof T.onClick!="function"&&typeof S.onClick=="function"&&(u.onclick=Rm)}Rn(y,S);var U;y=null;for(le in T)if(!S.hasOwnProperty(le)&&T.hasOwnProperty(le)&&T[le]!=null)if(le==="style"){var Y=T[le];for(U in Y)Y.hasOwnProperty(U)&&(y||(y={}),y[U]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(i.hasOwnProperty(le)?R||(R=[]):(R=R||[]).push(le,null));for(le in S){var J=S[le];if(Y=T!=null?T[le]:void 0,S.hasOwnProperty(le)&&J!==Y&&(J!=null||Y!=null))if(le==="style")if(Y){for(U in Y)!Y.hasOwnProperty(U)||J&&J.hasOwnProperty(U)||(y||(y={}),y[U]="");for(U in J)J.hasOwnProperty(U)&&Y[U]!==J[U]&&(y||(y={}),y[U]=J[U])}else y||(R||(R=[]),R.push(le,y)),y=J;else le==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,Y=Y?Y.__html:void 0,J!=null&&Y!==J&&(R=R||[]).push(le,J)):le==="children"?typeof J!="string"&&typeof J!="number"||(R=R||[]).push(le,""+J):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(i.hasOwnProperty(le)?(J!=null&&le==="onScroll"&&nn("scroll",u),R||Y===J||(R=[])):(R=R||[]).push(le,J))}y&&(R=R||[]).push("style",y);var le=R;(p.updateQueue=le)&&(p.flags|=4)}},RO=function(u,p,y,S){y!==S&&(p.flags|=4)};function gf(u,p){if(!ln)switch(u.tailMode){case"hidden":p=u.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?u.tail=null:y.sibling=null;break;case"collapsed":y=u.tail;for(var S=null;y!==null;)y.alternate!==null&&(S=y),y=y.sibling;S===null?p||u.tail===null?u.tail=null:u.tail.sibling=null:S.sibling=null}}function hr(u){var p=u.alternate!==null&&u.alternate.child===u.child,y=0,S=0;if(p)for(var T=u.child;T!==null;)y|=T.lanes|T.childLanes,S|=T.subtreeFlags&14680064,S|=T.flags&14680064,T.return=u,T=T.sibling;else for(T=u.child;T!==null;)y|=T.lanes|T.childLanes,S|=T.subtreeFlags,S|=T.flags,T.return=u,T=T.sibling;return u.subtreeFlags|=S,u.childLanes=y,p}function uQ(u,p,y){var S=p.pendingProps;switch(xb(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hr(p),null;case 1:return Lr(p.type)&&Im(),hr(p),null;case 3:return S=p.stateNode,Ic(),rn(Ir),rn(dr),Ob(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(u===null||u.child===null)&&(qm(p)?p.flags|=4:u===null||u.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,Yi!==null&&(lw(Yi),Yi=null))),Qb(u,p),hr(p),null;case 5:Eb(p);var T=il(df.current);if(y=p.type,u!==null&&p.stateNode!=null)MO(u,p,y,S,T),u.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!S){if(p.stateNode===null)throw Error(n(166));return hr(p),null}if(u=il(bs.current),qm(p)){S=p.stateNode,y=p.type;var R=p.memoizedProps;switch(S[xs]=p,S[af]=R,u=(p.mode&1)!==0,y){case"dialog":nn("cancel",S),nn("close",S);break;case"iframe":case"object":case"embed":nn("load",S);break;case"video":case"audio":for(T=0;T<nf.length;T++)nn(nf[T],S);break;case"source":nn("error",S);break;case"img":case"image":case"link":nn("error",S),nn("load",S);break;case"details":nn("toggle",S);break;case"input":jt(S,R),nn("invalid",S);break;case"select":S._wrapperState={wasMultiple:!!R.multiple},nn("invalid",S);break;case"textarea":ge(S,R),nn("invalid",S)}Rn(y,R),T=null;for(var U in R)if(R.hasOwnProperty(U)){var Y=R[U];U==="children"?typeof Y=="string"?S.textContent!==Y&&(R.suppressHydrationWarning!==!0&&Mm(S.textContent,Y,u),T=["children",Y]):typeof Y=="number"&&S.textContent!==""+Y&&(R.suppressHydrationWarning!==!0&&Mm(S.textContent,Y,u),T=["children",""+Y]):i.hasOwnProperty(U)&&Y!=null&&U==="onScroll"&&nn("scroll",S)}switch(y){case"input":be(S),nr(S,R,!0);break;case"textarea":be(S),At(S);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(S.onclick=Rm)}S=T,p.updateQueue=S,S!==null&&(p.flags|=4)}else{U=T.nodeType===9?T:T.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=fe(y)),u==="http://www.w3.org/1999/xhtml"?y==="script"?(u=U.createElement("div"),u.innerHTML="<script><\/script>
40",u=u.removeChild(u.firstChild)):typeof S.is=="string"?u=U.createElement(y,{is:S.is}):(u=U.createElement(y),y==="select"&&(U=u,S.multiple?U.multiple=!0:S.size&&(U.size=S.size))):u=U.createElementNS(u,y),u[xs]=p,u[af]=S,OO(u,p,!1,!1),p.stateNode=u;e:{switch(U=Dt(y,S),y){case"dialog":nn("cancel",u),nn("close",u),T=S;break;case"iframe":case"object":case"embed":nn("load",u),T=S;break;case"video":case"audio":for(T=0;T<nf.length;T++)nn(nf[T],u);T=S;break;case"source":nn("error",u),T=S;break;case"img":case"image":case"link":nn("error",u),nn("load",u),T=S;break;case"details":nn("toggle",u),T=S;break;case"input":jt(u,S),T=Ue(u,S),nn("invalid",u);break;case"option":T=S;break;case"select":u._wrapperState={wasMultiple:!!S.multiple},T=I({},S,{value:void 0}),nn("invalid",u);break;case"textarea":ge(u,S),T=Nr(u,S),nn("invalid",u);break;default:T=S}Rn(y,T),Y=T;for(R in Y)if(Y.hasOwnProperty(R)){var J=Y[R];R==="style"?Dr(u,J):R==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&tt(u,J)):R==="children"?typeof J=="string"?(y!=="textarea"||J!=="")&&bt(u,J):typeof J=="number"&&bt(u,""+J):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?J!=null&&R==="onScroll"&&nn("scroll",u):J!=null&&N(u,R,J,U))}switch(y){case"input":be(u),nr(u,S,!1);break;case"textarea":be(u),At(u);break;case"option":S.value!=null&&u.setAttribute("value",""+Ne(S.value));break;case"select":u.multiple=!!S.multiple,R=S.value,R!=null?Hn(u,!!S.multiple,R,!1):S.defaultValue!=null&&Hn(u,!!S.multiple,S.defaultValue,!0);break;default:typeof T.onClick=="function"&&(u.onclick=Rm)}switch(y){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}}S&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return hr(p),null;case 6:if(u&&p.stateNode!=null)RO(u,p,u.memoizedProps,S);else{if(typeof S!="string"&&p.stateNode===null)throw Error(n(166));if(y=il(df.current),il(bs.current),qm(p)){if(S=p.stateNode,y=p.memoizedProps,S[xs]=p,(R=S.nodeValue!==y)&&(u=ri,u!==null))switch(u.tag){case 3:Mm(S.nodeValue,y,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&Mm(S.nodeValue,y,(u.mode&1)!==0)}R&&(p.flags|=4)}else S=(y.nodeType===9?y:y.ownerDocument).createTextNode(S),S[xs]=p,p.stateNode=S}return hr(p),null;case 13:if(rn(un),S=p.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(ln&&ii!==null&&(p.mode&1)!==0&&(p.flags&128)===0)LT(),Oc(),p.flags|=98560,R=!1;else if(R=qm(p),S!==null&&S.dehydrated!==null){if(u===null){if(!R)throw Error(n(318));if(R=p.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[xs]=p}else Oc(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;hr(p),R=!1}else Yi!==null&&(lw(Yi),Yi=null),R=!0;if(!R)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=y,p):(S=S!==null,S!==(u!==null&&u.memoizedState!==null)&&S&&(p.child.flags|=8192,(p.mode&1)!==0&&(u===null||(un.current&1)!==0?In===0&&(In=3):dw())),p.updateQueue!==null&&(p.flags|=4),hr(p),null);case 4:return Ic(),Qb(u,p),u===null&&rf(p.stateNode.containerInfo),hr(p),null;case 10:return Nb(p.type._context),hr(p),null;case 17:return Lr(p.type)&&Im(),hr(p),null;case 19:if(rn(un),R=p.memoizedState,R===null)return hr(p),null;if(S=(p.flags&128)!==0,U=R.rendering,U===null)if(S)gf(R,!1);else{if(In!==0||u!==null&&(u.flags&128)!==0)for(u=p.child;u!==null;){if(U=Km(u),U!==null){for(p.flags|=128,gf(R,!1),S=U.updateQueue,S!==null&&(p.updateQueue=S,p.flags|=4),p.subtreeFlags=0,S=y,y=p.child;y!==null;)R=y,u=S,R.flags&=14680066,U=R.alternate,U===null?(R.childLanes=0,R.lanes=u,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=U.childLanes,R.lanes=U.lanes,R.child=U.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=U.memoizedProps,R.memoizedState=U.memoizedState,R.updateQueue=U.updateQueue,R.type=U.type,u=U.dependencies,R.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),y=y.sibling;return Gt(un,un.current&1|2),p.child}u=u.sibling}R.tail!==null&&xn()>Bc&&(p.flags|=128,S=!0,gf(R,!1),p.lanes=4194304)}else{if(!S)if(u=Km(U),u!==null){if(p.flags|=128,S=!0,y=u.updateQueue,y!==null&&(p.updateQueue=y,p.flags|=4),gf(R,!0),R.tail===null&&R.tailMode==="hidden"&&!U.alternate&&!ln)return hr(p),null}else 2*xn()-R.renderingStartTime>Bc&&y!==1073741824&&(p.flags|=128,S=!0,gf(R,!1),p.lanes=4194304);R.isBackwards?(U.sibling=p.child,p.child=U):(y=R.last,y!==null?y.sibling=U:p.child=U,R.last=U)}return R.tail!==null?(p=R.tail,R.rendering=p,R.tail=p.sibling,R.renderingStartTime=xn(),p.sibling=null,y=un.current,Gt(un,S?y&1|2:y&1),p):(hr(p),null);case 22:case 23:return uw(),S=p.memoizedState!==null,u!==null&&u.memoizedState!==null!==S&&(p.flags|=8192),S&&(p.mode&1)!==0?(si&1073741824)!==0&&(hr(p),p.subtreeFlags&6&&(p.flags|=8192)):hr(p),null;case 24:return null;case 25:return null}throw Error(n(156,p.tag))}function dQ(u,p){switch(xb(p),p.tag){case 1:return Lr(p.type)&&Im(),u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 3:return Ic(),rn(Ir),rn(dr),Ob(),u=p.flags,(u&65536)!==0&&(u&128)===0?(p.flags=u&-65537|128,p):null;case 5:return Eb(p),null;case 13:if(rn(un),u=p.memoizedState,u!==null&&u.dehydrated!==null){if(p.alternate===null)throw Error(n(340));Oc()}return u=p.flags,u&65536?(p.flags=u&-65537|128,p):null;case 19:return rn(un),null;case 4:return Ic(),null;case 10:return Nb(p.type._context),null;case 22:case 23:return uw(),null;case 24:return null;default:return null}}var ng=!1,pr=!1,fQ=typeof WeakSet=="function"?WeakSet:Set,De=null;function $c(u,p){var y=u.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(S){pn(u,p,S)}else y.current=null}function Jb(u,p,y){try{y()}catch(S){pn(u,p,S)}}var DO=!1;function hQ(u,p){if(ub=jm,u=hT(),nb(u)){if("selectionStart"in u)var y={start:u.selectionStart,end:u.selectionEnd};else e:{y=(y=u.ownerDocument)&&y.defaultView||window;var S=y.getSelection&&y.getSelection();if(S&&S.rangeCount!==0){y=S.anchorNode;var T=S.anchorOffset,R=S.focusNode;S=S.focusOffset;try{y.nodeType,R.nodeType}catch{y=null;break e}var U=0,Y=-1,J=-1,le=0,xe=0,Se=u,ve=null;t:for(;;){for(var Re;Se!==y||T!==0&&Se.nodeType!==3||(Y=U+T),Se!==R||S!==0&&Se.nodeType!==3||(J=U+S),Se.nodeType===3&&(U+=Se.n
vendor: 17,767 bytes, line 40
40odeValue.length),(Re=Se.firstChild)!==null;)ve=Se,Se=Re;for(;;){if(Se===u)break t;if(ve===y&&++le===T&&(Y=U),ve===R&&++xe===S&&(J=U),(Re=Se.nextSibling)!==null)break;Se=ve,ve=Se.parentNode}Se=Re}y=Y===-1||J===-1?null:{start:Y,end:J}}else y=null}y=y||{start:0,end:0}}else y=null;for(db={focusedElem:u,selectionRange:y},jm=!1,De=p;De!==null;)if(p=De,u=p.child,(p.subtreeFlags&1028)!==0&&u!==null)u.return=p,De=u;else for(;De!==null;){p=De;try{var Le=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var Be=Le.memoizedProps,bn=Le.memoizedState,ie=p.stateNode,Z=ie.getSnapshotBeforeUpdate(p.elementType===p.type?Be:Xi(p.type,Be),bn);ie.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:var se=p.stateNode.containerInfo;se.nodeType===1?se.textContent="":se.nodeType===9&&se.documentElement&&se.removeChild(se.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ae){pn(p,p.return,Ae)}if(u=p.sibling,u!==null){u.return=p.return,De=u;break}De=p.return}return Le=DO,DO=!1,Le}function yf(u,p,y){var S=p.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var T=S=S.next;do{if((T.tag&u)===u){var R=T.destroy;T.destroy=void 0,R!==void 0&&Jb(p,y,R)}T=T.next}while(T!==S)}}function rg(u,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&u)===u){var S=y.create;y.destroy=S()}y=y.next}while(y!==p)}}function Zb(u){var p=u.ref;if(p!==null){var y=u.stateNode;switch(u.tag){case 5:u=y;break;default:u=y}typeof p=="function"?p(u):p.current=u}}function IO(u){var p=u.alternate;p!==null&&(u.alternate=null,IO(p)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(p=u.stateNode,p!==null&&(delete p[xs],delete p[af],delete p[mb],delete p[YX],delete p[XX])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function LO(u){return u.tag===5||u.tag===3||u.tag===4}function $O(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||LO(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function ew(u,p,y){var S=u.tag;if(S===5||S===6)u=u.stateNode,p?y.nodeType===8?y.parentNode.insertBefore(u,p):y.insertBefore(u,p):(y.nodeType===8?(p=y.parentNode,p.insertBefore(u,y)):(p=y,p.appendChild(u)),y=y._reactRootContainer,y!=null||p.onclick!==null||(p.onclick=Rm));else if(S!==4&&(u=u.child,u!==null))for(ew(u,p,y),u=u.sibling;u!==null;)ew(u,p,y),u=u.sibling}function tw(u,p,y){var S=u.tag;if(S===5||S===6)u=u.stateNode,p?y.insertBefore(u,p):y.appendChild(u);else if(S!==4&&(u=u.child,u!==null))for(tw(u,p,y),u=u.sibling;u!==null;)tw(u,p,y),u=u.sibling}var ir=null,Qi=!1;function Za(u,p,y){for(y=y.child;y!==null;)FO(u,p,y),y=y.sibling}function FO(u,p,y){if(vs&&typeof vs.onCommitFiberUnmount=="function")try{vs.onCommitFiberUnmount(gm,y)}catch{}switch(y.tag){case 5:pr||$c(y,p);case 6:var S=ir,T=Qi;ir=null,Za(u,p,y),ir=S,Qi=T,ir!==null&&(Qi?(u=ir,y=y.stateNode,u.nodeType===8?u.parentNode.removeChild(y):u.removeChild(y)):ir.removeChild(y.stateNode));break;case 18:ir!==null&&(Qi?(u=ir,y=y.stateNode,u.nodeType===8?pb(u.parentNode,y):u.nodeType===1&&pb(u,y),Gd(u)):pb(ir,y.stateNode));break;case 4:S=ir,T=Qi,ir=y.stateNode.containerInfo,Qi=!0,Za(u,p,y),ir=S,Qi=T;break;case 0:case 11:case 14:case 15:if(!pr&&(S=y.updateQueue,S!==null&&(S=S.lastEffect,S!==null))){T=S=S.next;do{var R=T,U=R.destroy;R=R.tag,U!==void 0&&((R&2)!==0||(R&4)!==0)&&Jb(y,p,U),T=T.next}while(T!==S)}Za(u,p,y);break;case 1:if(!pr&&($c(y,p),S=y.stateNode,typeof S.componentWillUnmount=="function"))try{S.props=y.memoizedProps,S.state=y.memoizedState,S.componentWillUnmount()}catch(Y){pn(y,p,Y)}Za(u,p,y);break;case 21:Za(u,p,y);break;case 22:y.mode&1?(pr=(S=pr)||y.memoizedState!==null,Za(u,p,y),pr=S):Za(u,p,y);break;default:Za(u,p,y)}}function BO(u){var p=u.updateQueue;if(p!==null){u.updateQueue=null;var y=u.stateNode;y===null&&(y=u.stateNode=new fQ),p.forEach(function(S){var T=jQ.bind(null,u,S);y.has(S)||(y.add(S),S.then(T,T))})}}function Ji(u,p){var y=p.deletions;if(y!==null)for(var S=0;S<y.length;S++){var T=y[S];try{var R=u,U=p,Y=U;e:for(;Y!==null;){switch(Y.tag){case 5:ir=Y.stateNode,Qi=!1;break e;case 3:ir=Y.stateNode.containerInfo,Qi=!0;break e;case 4:ir=Y.stateNode.containerInfo,Qi=!0;break e}Y=Y.return}if(ir===null)throw Error(n(160));FO(R,U,T),ir=null,Qi=!1;var J=T.alternate;J!==null&&(J.return=null),T.return=null}catch(le){pn(T,p,le)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)qO(p,u),p=p.sibling}function qO(u,p){var y=u.alternate,S=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(Ji(p,u),js(u),S&4){try{yf(3,u,u.return),rg(3,u)}catch(Be){pn(u,u.return,Be)}try{yf(5,u,u.return)}catch(Be){pn(u,u.return,Be)}}break;case 1:Ji(p,u),js(u),S&512&&y!==null&&$c(y,y.return);break;case 5:if(Ji(p,u),js(u),S&512&&y!==null&&$c(y,y.return),u.flags&32){var T=u.stateNode;try{bt(T,"")}catch(Be){pn(u,u.return,Be)}}if(S&4&&(T=u.stateNode,T!=null)){var R=u.memoizedProps,U=y!==null?y.memoizedProps:R,Y=u.type,J=u.updateQueue;if(u.updateQueue=null,J!==null)try{Y==="input"&&R.type==="radio"&&R.name!=null&&qe(T,R),Dt(Y,U);var le=Dt(Y,R);for(U=0;U<J.length;U+=2){var xe=J[U],Se=J[U+1];xe==="style"?Dr(T,Se):xe==="dangerouslySetInnerHTML"?tt(T,Se):xe==="children"?bt(T,Se):N(T,xe,Se,le)}switch(Y){case"input":Rt(T,R);break;case"textarea":Je(T,R);break;case"select":var ve=T._wrapperState.wasMultiple;T._wrapperState.wasMultiple=!!R.multiple;var Re=R.value;Re!=null?Hn(T,!!R.multiple,Re,!1):ve!==!!R.multiple&&(R.defaultValue!=null?Hn(T,!!R.multiple,R.defaultValue,!0):Hn(T,!!R.multiple,R.multiple?[]:"",!1))}T[af]=R}catch(Be){pn(u,u.return,Be)}}break;case 6:if(Ji(p,u),js(u),S&4){if(u.stateNode===null)throw Error(n(162));T=u.stateNode,R=u.memoizedProps;try{T.nodeValue=R}catch(Be){pn(u,u.return,Be)}}break;case 3:if(Ji(p,u),js(u),S&4&&y!==null&&y.memoizedState.isDehydrated)try{Gd(p.containerInfo)}catch(Be){pn(u,u.return,Be)}break;case 4:Ji(p,u),js(u);break;case 13:Ji(p,u),js(u),T=u.child,T.flags&8192&&(R=T.memoizedState!==null,T.stateNode.isHidden=R,!R||T.alternate!==null&&T.alternate.memoizedState!==null||(iw=xn())),S&4&&BO(u);break;case 22:if(xe=y!==null&&y.memoizedState!==null,u.mode&1?(pr=(le=pr)||xe,Ji(p,u),pr=le):Ji(p,u),js(u),S&8192){if(le=u.memoizedState!==null,(u.stateNode.isHidden=le)&&!xe&&(u.mode&1)!==0)for(De=u,xe=u.child;xe!==null;){for(Se=De=xe;De!==null;){switch(ve=De,Re=ve.child,ve.tag){case 0:case 11:case 14:case 15:yf(4,ve,ve.return);break;case 1:$c(ve,ve.return);var Le=ve.stateNode;if(typeof Le.componentWillUnmount=="function"){S=ve,y=ve.return;try{p=S,Le.props=p.memoizedProps,Le.state=p.memoizedState,Le.componentWillUnmount()}catch(Be){pn(S,y,Be)}}break;case 5:$c(ve,ve.return);break;case 22:if(ve.memoizedState!==null){VO(Se);continue}}Re!==null?(Re.return=ve,De=Re):VO(Se)}xe=xe.sibling}e:for(xe=null,Se=u;;){if(Se.tag===5){if(xe===null){xe=Se;try{T=Se.stateNode,le?(R=T.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(Y=Se.stateNode,J=Se.memoizedProps.style,U=J!=null&&J.hasOwnProperty("display")?J.display:null,Y.style.display=Kn("display",U))}catch(Be){pn(u,u.return,Be)}}}else if(Se.tag===6){if(xe===null)try{Se.stateNode.nodeValue=le?"":Se.memoizedProps}catch(Be){pn(u,u.return,Be)}}else if((Se.tag!==22&&Se.tag!==23||Se.memoizedState===null||Se===u)&&Se.child!==null){Se.child.return=Se,Se=Se.child;continue}if(Se===u)break e;for(;Se.sibling===null;){if(Se.return===null||Se.return===u)break e;xe===Se&&(xe=null),Se=Se.return}xe===Se&&(xe=null),Se.sibling.return=Se.return,Se=Se.sibling}}break;case 19:Ji(p,u),js(u),S&4&&BO(u);break;case 21:break;default:Ji(p,u),js(u)}}function js(u){var p=u.flags;if(p&2){try{e:{for(var y=u.return;y!==null;){if(LO(y)){var S=y;break e}y=y.return}throw Error(n(160))}switch(S.tag){case 5:var T=S.stateNode;S.flags&32&&(bt(T,""),S.flags&=-33);var R=$O(u);tw(u,R,T);break;case 3:case 4:var U=S.stateNode.containerInfo,Y=$O(u);ew(u,Y,U);break;default:throw Error(n(161))}}catch(J){pn(u,u.return,J)}u.flags&=-3}p&4096&&(u.flags&=-4097)}function pQ(u,p,y){De=u,zO(u)}function zO(u,p,y){for(var S=(u.mode&1)!==0;De!==null;){var T=De,R=T.child;if(T.tag===22&&S){var U=T.memoizedState!==null||ng;if(!U){var Y=T.alternate,J=Y!==null&&Y.memoizedState!==null||pr;Y=ng;var le=pr;if(ng=U,(pr=J)&&!le)for(De=T;De!==null;)U=De,J=U.child,U.tag===22&&U.memoizedState!==null?WO(T):J!==null?(J.return=U,De=J):WO(T);for(;R!==null;)De=R,zO(R),R=R.sibling;De=T,ng=Y,pr=le}UO(u)}else(T.subtreeFlags&8772)!==0&&R!==null?(R.return=T,De=R):UO(u)}}function UO(u){for(;De!==null;){var p=De;if((p.flags&8772)!==0){var y=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:pr||rg(5,p);break;case 1:var S=p.stateNode;if(p.flags&4&&!pr)if(y===null)S.componentDidMount();else{var T=p.elementType===p.type?y.memoizedProps:Xi(p.type,y.memoizedProps);S.componentDidUpdate(T,y.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var R=p.updateQueue;R!==null&&VT(p,R,S);break;case 3:var U=p.updateQueue;if(U!==null){if(y=null,p.child!==null)switch(p.child.tag){case 5:y=p.child.stateNode;break;case 1:y=p.child.stateNode}VT(p,U,y)}break;case 5:var Y=p.stateNode;if(y===null&&p.flags&4){y=Y;var J=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&y.focus();break;case"img":J.src&&(y.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var le=p.alternate;if(le!==null){var xe=le.memoizedState;if(xe!==null){var Se=xe.dehydrated;Se!==null&&Gd(Se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}pr||p.flags&512&&Zb(p)}catch(ve){pn(p,p.return,ve)}}if(p===u){De=null;break}if(y=p.sibling,y!==null){y.return=p.return,De=y;break}De=p.return}}function VO(u){for(;De!==null;){var p=De;if(p===u){De=null;break}var y=p.sibling;if(y!==null){y.return=p.return,De=y;break}De=p.return}}function WO(u){for(;De!==null;){var p=De;try{switch(p.tag){case 0:case 11:case 15:var y=p.return;try{rg(4,p)}catch(J){pn(p,y,J)}break;case 1:var S=p.stateNode;if(typeof S.componentDidMount=="function"){var T=p.return;try{S.componentDidMount()}catch(J){pn(p,T,J)}}var R=p.return;try{Zb(p)}catch(J){pn(p,R,J)}break;case 5:var U=p.return;try{Zb(p)}catch(J){pn(p,U,J)}}}catch(J){pn(p,p.return,J)}if(p===u){De=null;break}var Y=p.sibling;if(Y!==null){Y.return=p.return,De=Y;break}De=p.return}}var mQ=Math.ceil,ig=k.ReactCurrentDispatcher,nw=k.ReactCurrentOwner,Ni=k.ReactCurrentBatchConfig,kt=0,Yn=null,Nn=null,sr=0,si=0,Fc=Ga(0),In=0,vf=null,al=0,sg=0,rw=0,xf=null,Fr=null,iw=0,Bc=1/0,ra=null,ag=!1,sw=null,eo=null,og=!1,to=null,lg=0,bf=0,aw=null,cg=-1,ug=0;function Pr(){return(kt&6)!==0?xn():cg!==-1?cg:cg=xn()}function no(u){return(u.mode&1)===0?1:(kt&2)!==0&&sr!==0?sr&-sr:JX.transition!==null?(ug===0&&(ug=$E()),ug):(u=Ft,u!==0||(u=window.event,u=u===void 0?16:KE(u.type)),u)}function Zi(u,p,y,S){if(50<bf)throw bf=0,aw=null,Error(n(185));Ud(u,y,S),((kt&2)===0||u!==Yn)&&(u===Yn&&((kt&2)===0&&(sg|=y),In===4&&ro(u,sr)),Br(u,S),y===1&&kt===0&&(p.mode&1)===0&&(Bc=xn()+500,$m&&Xa()))}function Br(u,p){var y=u.callbackNode;JY(u,p);var S=xm(u,u===Yn?sr:0);if(S===0)y!==null&&DE(y),u.callbackNode=null,u.callbackPriority=0;else if(p=S&-S,u.callbackPriority!==p){if(y!=null&&DE(y),p===1)u.tag===0?QX(KO.bind(null,u)):OT(KO.bind(null,u)),KX(function(){(kt&6)===0&&Xa()}),y=null;else{switch(FE(S)){case 1:y=F0;break;case 4:y=IE;break;case 16:y=mm;break;case 536870912:y=LE;break;default:y=mm}y=tM(y,HO.bind(null,u))}u.callbackPriority=p,u.callbackNode=y}}function HO(u,p){if(cg=-1,ug=0,(kt&6)!==0)throw Error(n(327));var y=u.callbackNode;if(qc()&&u.callbackNode!==y)return null;var S=xm(u,u===Yn?sr:0);if(S===0)return null;if((S&30)!==0||(S&u.expiredLanes)!==0||p)p=dg(u,S);else{p=S;var T=kt;kt|=2;var R=YO();(Yn!==u||sr!==p)&&(ra=null,Bc=xn()+500,ll(u,p));do try{vQ();break}catch(Y){GO(u,Y)}while(!0);_b(),ig.current=R,kt=T,Nn!==null?p=0:(Yn=null,sr=0,p=In)}if(p!==0){if(p===2&&(T=B0(u),T!==0&&(S=T,p=ow(u,T))),p===1)throw y=vf,ll(u,0),ro(u,S),Br(u,xn()),y;if(p===6)ro(u,S);else{if(T=u.current.alternate,(S&30)===0&&!gQ(T)&&(p=dg(u,S),p===2&&(R=B0(u),R!==0&&(S=R,p=ow(u,R))),p===1))throw y=vf,ll(u,0),ro(u,S),Br(u,xn()),y;switch(u.finishedWork=T,u.finishedLanes=S,p){case 0:case 1:throw Error(n(345));case 2:cl(u,Fr,ra);break;case 3:if(ro(u,S),(S&130023424)===S&&(p=iw+500-xn(),10<p)){if(xm(u,0)!==0)break;if(T=u.suspendedLanes,(T&S)!==S){Pr(),u.pingedLanes|=u.suspendedLanes&T;break}u.timeoutHandle=hb(cl.bind(null,u,Fr,ra),p);break}cl(u,Fr,ra);break;case 4:if(ro(u,S),(S&4194240)===S)break;for(p=u.eventTimes,T=-1;0<S;){var U=31-Ki(S);R=1<<U,U=p[U],U>T&&(T=U),S&=~R}if(S=T,S=xn()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*mQ(S/1960))-S,10<S){u.timeoutHandle=hb(cl.bind(null,u,Fr,ra),S);break}cl(u,Fr,ra);break;case 5:cl(u,Fr,ra);break;default:throw Error(n(329))}}}return Br(u,xn()),u.callbackNode===y?HO.bind(null,u):null}function ow(u,p){var y=xf;return u.current.memoizedState.isDehydrated&&(ll(u,p).flags|=256),u=dg(u,p),u!==2&&(p=Fr,Fr=y,p!==null&&lw(p)),u}function lw(u){Fr===null?Fr=u:Fr.push.apply(Fr,u)}function gQ(u){for(var p=u;;){if(p.flags&16384){var y=p.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var S=0;S<y.length;S++){var T=y[S],R=T.getSnapshot;T=T.value;try{if(!Gi(R(),T))return!1}catch{return!1}}}if(y=p.child,p.subtreeFlags&16384&&y!==null)y.return=p,p=y;else{if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function ro(u,p){for(p&=~rw,p&=~sg,u.suspendedLanes|=p,u.pingedLanes&=~p,u=u.expirationTimes;0<p;){var y=31-Ki(p),S=1<<y;u[y]=-1,p&=~S}}function KO(u){if((kt&6)!==0)throw Error(n(327));qc();var p=xm(u,0);if((p&1)===0)return Br(u,xn()),null;var y=dg(u,p);if(u.tag!==0&&y===2){var S=B0(u);S!==0&&(p=S,y=ow(u,S))}if(y===1)throw y=vf,ll(u,0),ro(u,p),Br(u,xn()),y;if(y===6)throw Error(n(345));return u.finishedWork=u.current.alternate,u.finishedLanes=p,cl(u,Fr,ra),Br(u,xn()),null}function cw(u,p){var y=kt;kt|=1;try{return u(p)}finally{kt=y,kt===0&&(Bc=xn()+500,$m&&Xa())}}function ol(u){to!==null&&to.tag===0&&(kt&6)===0&&qc();var p=kt;kt|=1;var y=Ni.transition,S=Ft;try{if(Ni.transition=null,Ft=1,u)return u()}finally{Ft=S,Ni.transition=y,kt=p,(kt&6)===0&&Xa()}}function uw(){si=Fc.current,rn(Fc)}function ll(u,p){u.finishedWork=null,u.finishedLanes=0;var y=u.timeoutHandle;if(y!==-1&&(u.timeoutHandle=-1,HX(y)),Nn!==null)for(y=Nn.return;y!==null;){var S=y;switch(xb(S),S.tag){case 1:S=S.type.childContextTypes,S!=null&&Im();break;case 3:Ic(),rn(Ir),rn(dr),Ob();break;case 5:Eb(S);break;case 4:Ic();break;case 13:rn(un);break;case 19:rn(un);break;case 10:Nb(S.type._context);break;case 22:case 23:uw()}y=y.return}if(Yn=u,Nn=u=io(u.current,null),sr=si=p,In=0,vf=null,rw=sg=al=0,Fr=xf=null,rl!==null){for(p=0;p<rl.length;p++)if(y=rl[p],S=y.interleaved,S!==null){y.interleaved=null;var T=S.next,R=y.pending;if(R!==null){var U=R.next;R.next=T,S.next=U}y.pending=S}rl=null}return u}function GO(u,p){do{var y=Nn;try{if(_b(),Gm.current=Jm,Ym){for(var S=dn.memoizedState;S!==null;){var T=S.queue;T!==null&&(T.pending=null),S=S.next}Ym=!1}if(sl=0,Gn=Dn=dn=null,ff=!1,hf=0,nw.current=null,y===null||y.return===null){In=1,vf=p,Nn=null;break}e:{var R=u,U=y.return,Y=y,J=p;if(p=sr,Y.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var le=J,xe=Y,Se=xe.tag;if((xe.mode&1)===0&&(Se===0||Se===11||Se===15)){var ve=xe.alternate;ve?(xe.updateQueue=ve.updateQueue,xe.memoizedState=ve.memoizedState,xe.lanes=ve.lanes):(xe.updateQueue=null,xe.memoizedState=null)}var Re=xO(U);if(Re!==null){Re.flags&=-257,bO(Re,U,Y,R,p),Re.mode&1&&vO(R,le,p),p=Re,J=le;var Le=p.updateQueue;if(Le===null){var Be=new Set;Be.add(J),p.updateQueue=Be}else Le.add(J);break e}else{if((p&1)===0){vO(R,le,p),dw();break e}J=Error(n(426))}}else if(ln&&Y.mode&1){var bn=xO(U);if(bn!==null){(bn.flags&65536)===0&&(bn.flags|=256),bO(bn,U,Y,R,p),jb(Lc(J,Y));break e}}R=J=Lc(J,Y),In!==4&&(In=2),xf===null?xf=[R]:xf.push(R),R=U;do{switch(R.tag){case 3:R.flags|=65536,p&=-p,R.lanes|=p;var ie=gO(R,J,p);UT(R,ie);break e;case 1:Y=J;var Z=R.type,se=R.stateNode;if((R.flags&128)===0&&(typeof Z.getDerivedStateFromError=="function"||se!==null&&typeof se.componentDidCatch=="function"&&(eo===null||!eo.has(se)))){R.flags|=65536,p&=-p,R.lanes|=p;var Ae=yO(R,Y,p);UT(R,Ae);break e}}R=R.return}while(R!==null)}QO(y)}catch(ze){p=ze,Nn===y&&y!==null&&(Nn=y=y.return);continue}break}while(!0)}function YO(){var u=ig.current;return ig.current=Jm,u===null?Jm:u}function dw(){(In===0||In===3||In===2)&&(In=4),Yn===null||(al&268435455)===0&&(sg&268435455)===0||ro(Yn,sr)}function dg(u,p){var y=kt;kt|=2;var S=YO();(Yn!==u||sr!==p)&&(ra=null,ll(u,p));do try{yQ();break}catch(T){GO(u,T)}while(!0);if(_b(),kt=y,ig.current=S,Nn!==null)throw Error(n(261));return Yn=null,sr=0,In}function yQ(){for(;Nn!==null;)XO(Nn)}function vQ(){for(;Nn!==null&&!UY();)XO(Nn)}function XO(u){var p=eM(u.alternate,u,si);u.memoizedProps=u.pendingProps,p===null?QO(u):Nn=p,nw.current=null}function QO(u){var p=u;do{var y=p.alternate;if(u=p.return,(p.flags&32768)===0){if(y=uQ(y,p,si),y!==null){Nn=y;return}}else{if(y=dQ(y,p),y!==null){y.flags&=32767,Nn=y;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{In=6,Nn=null;return}}if(p=p.sibling,p!==null){Nn=p;return}Nn=p=u}while(p!==null);In===0&&(In=5)}function cl(u,p,y){var S=Ft,T=Ni.transition;try{Ni.transition=null,Ft=1,xQ(u,p,y,S)}finally{Ni.transition=T,Ft=S}return null}function xQ(u,p,y,S){do qc();while(to!==null);
vendor: 5,960 bytes, line 40
40if((kt&6)!==0)throw Error(n(327));y=u.finishedWork;var T=u.finishedLanes;if(y===null)return null;if(u.finishedWork=null,u.finishedLanes=0,y===u.current)throw Error(n(177));u.callbackNode=null,u.callbackPriority=0;var R=y.lanes|y.childLanes;if(ZY(u,R),u===Yn&&(Nn=Yn=null,sr=0),(y.subtreeFlags&2064)===0&&(y.flags&2064)===0||og||(og=!0,tM(mm,function(){return qc(),null})),R=(y.flags&15990)!==0,(y.subtreeFlags&15990)!==0||R){R=Ni.transition,Ni.transition=null;var U=Ft;Ft=1;var Y=kt;kt|=4,nw.current=null,hQ(u,y),qO(y,u),FX(db),jm=!!ub,db=ub=null,u.current=y,pQ(y),VY(),kt=Y,Ft=U,Ni.transition=R}else u.current=y;if(og&&(og=!1,to=u,lg=T),R=u.pendingLanes,R===0&&(eo=null),KY(y.stateNode),Br(u,xn()),p!==null)for(S=u.onRecoverableError,y=0;y<p.length;y++)T=p[y],S(T.value,{componentStack:T.stack,digest:T.digest});if(ag)throw ag=!1,u=sw,sw=null,u;return(lg&1)!==0&&u.tag!==0&&qc(),R=u.pendingLanes,(R&1)!==0?u===aw?bf++:(bf=0,aw=u):bf=0,Xa(),null}function qc(){if(to!==null){var u=FE(lg),p=Ni.transition,y=Ft;try{if(Ni.transition=null,Ft=16>u?16:u,to===null)var S=!1;else{if(u=to,to=null,lg=0,(kt&6)!==0)throw Error(n(331));var T=kt;for(kt|=4,De=u.current;De!==null;){var R=De,U=R.child;if((De.flags&16)!==0){var Y=R.deletions;if(Y!==null){for(var J=0;J<Y.length;J++){var le=Y[J];for(De=le;De!==null;){var xe=De;switch(xe.tag){case 0:case 11:case 15:yf(8,xe,R)}var Se=xe.child;if(Se!==null)Se.return=xe,De=Se;else for(;De!==null;){xe=De;var ve=xe.sibling,Re=xe.return;if(IO(xe),xe===le){De=null;break}if(ve!==null){ve.return=Re,De=ve;break}De=Re}}}var Le=R.alternate;if(Le!==null){var Be=Le.child;if(Be!==null){Le.child=null;do{var bn=Be.sibling;Be.sibling=null,Be=bn}while(Be!==null)}}De=R}}if((R.subtreeFlags&2064)!==0&&U!==null)U.return=R,De=U;else e:for(;De!==null;){if(R=De,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:yf(9,R,R.return)}var ie=R.sibling;if(ie!==null){ie.return=R.return,De=ie;break e}De=R.return}}var Z=u.current;for(De=Z;De!==null;){U=De;var se=U.child;if((U.subtreeFlags&2064)!==0&&se!==null)se.return=U,De=se;else e:for(U=Z;De!==null;){if(Y=De,(Y.flags&2048)!==0)try{switch(Y.tag){case 0:case 11:case 15:rg(9,Y)}}catch(ze){pn(Y,Y.return,ze)}if(Y===U){De=null;break e}var Ae=Y.sibling;if(Ae!==null){Ae.return=Y.return,De=Ae;break e}De=Y.return}}if(kt=T,Xa(),vs&&typeof vs.onPostCommitFiberRoot=="function")try{vs.onPostCommitFiberRoot(gm,u)}catch{}S=!0}return S}finally{Ft=y,Ni.transition=p}}return!1}function JO(u,p,y){p=Lc(y,p),p=gO(u,p,1),u=Ja(u,p,1),p=Pr(),u!==null&&(Ud(u,1,p),Br(u,p))}function pn(u,p,y){if(u.tag===3)JO(u,u,y);else for(;p!==null;){if(p.tag===3){JO(p,u,y);break}else if(p.tag===1){var S=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(eo===null||!eo.has(S))){u=Lc(y,u),u=yO(p,u,1),p=Ja(p,u,1),u=Pr(),p!==null&&(Ud(p,1,u),Br(p,u));break}}p=p.return}}function bQ(u,p,y){var S=u.pingCache;S!==null&&S.delete(p),p=Pr(),u.pingedLanes|=u.suspendedLanes&y,Yn===u&&(sr&y)===y&&(In===4||In===3&&(sr&130023424)===sr&&500>xn()-iw?ll(u,0):rw|=y),Br(u,p)}function ZO(u,p){p===0&&((u.mode&1)===0?p=1:(p=vm,vm<<=1,(vm&130023424)===0&&(vm=4194304)));var y=Pr();u=ea(u,p),u!==null&&(Ud(u,p,y),Br(u,y))}function wQ(u){var p=u.memoizedState,y=0;p!==null&&(y=p.retryLane),ZO(u,y)}function jQ(u,p){var y=0;switch(u.tag){case 13:var S=u.stateNode,T=u.memoizedState;T!==null&&(y=T.retryLane);break;case 19:S=u.stateNode;break;default:throw Error(n(314))}S!==null&&S.delete(p),ZO(u,y)}var eM;eM=function(u,p,y){if(u!==null)if(u.memoizedProps!==p.pendingProps||Ir.current)$r=!0;else{if((u.lanes&y)===0&&(p.flags&128)===0)return $r=!1,cQ(u,p,y);$r=(u.flags&131072)!==0}else $r=!1,ln&&(p.flags&1048576)!==0&&MT(p,Bm,p.index);switch(p.lanes=0,p.tag){case 2:var S=p.type;tg(u,p),u=p.pendingProps;var T=kc(p,dr.current);Dc(p,y),T=Db(null,p,S,u,T,y);var R=Ib();return p.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Lr(S)?(R=!0,Lm(p)):R=!1,p.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,Ab(p),T.updater=Zm,p.stateNode=T,T._reactInternals=p,zb(p,S,u,y),p=Hb(null,p,S,!0,R,y)):(p.tag=0,ln&&R&&vb(p),Cr(null,p,T,y),p=p.child),p;case 16:S=p.elementType;e:{switch(tg(u,p),u=p.pendingProps,T=S._init,S=T(S._payload),p.type=S,T=p.tag=_Q(S),u=Xi(S,u),T){case 0:p=Wb(null,p,S,u,y);break e;case 1:p=CO(null,p,S,u,y);break e;case 11:p=wO(null,p,S,u,y);break e;case 14:p=jO(null,p,S,Xi(S.type,u),y);break e}throw Error(n(306,S,""))}return p;case 0:return S=p.type,T=p.pendingProps,T=p.elementType===S?T:Xi(S,T),Wb(u,p,S,T,y);case 1:return S=p.type,T=p.pendingProps,T=p.elementType===S?T:Xi(S,T),CO(u,p,S,T,y);case 3:e:{if(PO(p),u===null)throw Error(n(387));S=p.pendingProps,R=p.memoizedState,T=R.element,zT(u,p),Hm(p,S,null,y);var U=p.memoizedState;if(S=U.element,R.isDehydrated)if(R={element:S,isDehydrated:!1,cache:U.cache,pendingSuspenseBoundaries:U.pendingSuspenseBoundaries,transitions:U.transitions},p.updateQueue.baseState=R,p.memoizedState=R,p.flags&256){T=Lc(Error(n(423)),p),p=AO(u,p,S,y,T);break e}else if(S!==T){T=Lc(Error(n(424)),p),p=AO(u,p,S,y,T);break e}else for(ii=Ka(p.stateNode.containerInfo.firstChild),ri=p,ln=!0,Yi=null,y=BT(p,null,S,y),p.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Oc(),S===T){p=na(u,p,y);break e}Cr(u,p,S,y)}p=p.child}return p;case 5:return WT(p),u===null&&wb(p),S=p.type,T=p.pendingProps,R=u!==null?u.memoizedProps:null,U=T.children,fb(S,T)?U=null:R!==null&&fb(S,R)&&(p.flags|=32),NO(u,p),Cr(u,p,U,y),p.child;case 6:return u===null&&wb(p),null;case 13:return kO(u,p,y);case 4:return kb(p,p.stateNode.containerInfo),S=p.pendingProps,u===null?p.child=Mc(p,null,S,y):Cr(u,p,S,y),p.child;case 11:return S=p.type,T=p.pendingProps,T=p.elementType===S?T:Xi(S,T),wO(u,p,S,T,y);case 7:return Cr(u,p,p.pendingProps,y),p.child;case 8:return Cr(u,p,p.pendingProps.children,y),p.child;case 12:return Cr(u,p,p.pendingProps.children,y),p.child;
vendor: 8,434 bytes, line 40
40case 10:e:{if(S=p.type._context,T=p.pendingProps,R=p.memoizedProps,U=T.value,Gt(Um,S._currentValue),S._currentValue=U,R!==null)if(Gi(R.value,U)){if(R.children===T.children&&!Ir.current){p=na(u,p,y);break e}}else for(R=p.child,R!==null&&(R.return=p);R!==null;){var Y=R.dependencies;if(Y!==null){U=R.child;for(var J=Y.firstContext;J!==null;){if(J.context===S){if(R.tag===1){J=ta(-1,y&-y),J.tag=2;var le=R.updateQueue;if(le!==null){le=le.shared;var xe=le.pending;xe===null?J.next=J:(J.next=xe.next,xe.next=J),le.pending=J}}R.lanes|=y,J=R.alternate,J!==null&&(J.lanes|=y),Cb(R.return,y,p),Y.lanes|=y;break}J=J.next}}else if(R.tag===10)U=R.type===p.type?null:R.child;else if(R.tag===18){if(U=R.return,U===null)throw Error(n(341));U.lanes|=y,Y=U.alternate,Y!==null&&(Y.lanes|=y),Cb(U,y,p),U=R.sibling}else U=R.child;if(U!==null)U.return=R;else for(U=R;U!==null;){if(U===p){U=null;break}if(R=U.sibling,R!==null){R.return=U.return,U=R;break}U=U.return}R=U}Cr(u,p,T.children,y),p=p.child}return p;case 9:return T=p.type,S=p.pendingProps.children,Dc(p,y),T=Si(T),S=S(T),p.flags|=1,Cr(u,p,S,y),p.child;case 14:return S=p.type,T=Xi(S,p.pendingProps),T=Xi(S.type,T),jO(u,p,S,T,y);case 15:return SO(u,p,p.type,p.pendingProps,y);case 17:return S=p.type,T=p.pendingProps,T=p.elementType===S?T:Xi(S,T),tg(u,p),p.tag=1,Lr(S)?(u=!0,Lm(p)):u=!1,Dc(p,y),pO(p,S,T),zb(p,S,T,y),Hb(null,p,S,!0,u,y);case 19:return TO(u,p,y);case 22:return _O(u,p,y)}throw Error(n(156,p.tag))};function tM(u,p){return RE(u,p)}function SQ(u,p,y,S){this.tag=u,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ci(u,p,y,S){return new SQ(u,p,y,S)}function fw(u){return u=u.prototype,!(!u||!u.isReactComponent)}function _Q(u){if(typeof u=="function")return fw(u)?1:0;if(u!=null){if(u=u.$$typeof,u===M)return 11;if(u===W)return 14}return 2}function io(u,p){var y=u.alternate;return y===null?(y=Ci(u.tag,p,u.key,u.mode),y.elementType=u.elementType,y.type=u.type,y.stateNode=u.stateNode,y.alternate=u,u.alternate=y):(y.pendingProps=p,y.type=u.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=u.flags&14680064,y.childLanes=u.childLanes,y.lanes=u.lanes,y.child=u.child,y.memoizedProps=u.memoizedProps,y.memoizedState=u.memoizedState,y.updateQueue=u.updateQueue,p=u.dependencies,y.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},y.sibling=u.sibling,y.index=u.index,y.ref=u.ref,y}function fg(u,p,y,S,T,R){var U=2;if(S=u,typeof u=="function")fw(u)&&(U=1);else if(typeof u=="string")U=5;else e:switch(u){case E:return ul(y.children,T,R,p);case P:U=8,T|=8;break;case D:return u=Ci(12,y,p,T|2),u.elementType=D,u.lanes=R,u;case $:return u=Ci(13,y,p,T),u.elementType=$,u.lanes=R,u;case F:return u=Ci(19,y,p,T),u.elementType=F,u.lanes=R,u;case K:return hg(y,T,R,p);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case B:U=10;break e;case O:U=9;break e;case M:U=11;break e;case W:U=14;break e;case q:U=16,S=null;break e}throw Error(n(130,u==null?u:typeof u,""))}return p=Ci(U,y,p,T),p.elementType=u,p.type=S,p.lanes=R,p}function ul(u,p,y,S){return u=Ci(7,u,S,p),u.lanes=y,u}function hg(u,p,y,S){return u=Ci(22,u,S,p),u.elementType=K,u.lanes=y,u.stateNode={isHidden:!1},u}function hw(u,p,y){return u=Ci(6,u,null,p),u.lanes=y,u}function pw(u,p,y){return p=Ci(4,u.children!==null?u.children:[],u.key,p),p.lanes=y,p.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},p}function NQ(u,p,y,S,T){this.tag=p,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=q0(0),this.expirationTimes=q0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=q0(0),this.identifierPrefix=S,this.onRecoverableError=T,this.mutableSourceEagerHydrationData=null}function mw(u,p,y,S,T,R,U,Y,J){return u=new NQ(u,p,y,Y,J),p===1?(p=1,R===!0&&(p|=8)):p=0,R=Ci(3,null,null,p),u.current=R,R.stateNode=u,R.memoizedState={element:S,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ab(R),u}function CQ(u,p,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:S==null?null:""+S,children:u,containerInfo:p,implementation:y}}function nM(u){if(!u)return Ya;u=u._reactInternals;e:{if(Jo(u)!==u||u.tag!==1)throw Error(n(170));var p=u;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Lr(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(n(171))}if(u.tag===1){var y=u.type;if(Lr(y))return ET(u,y,p)}return p}function rM(u,p,y,S,T,R,U,Y,J){return u=mw(y,S,!0,u,T,R,U,Y,J),u.context=nM(null),y=u.current,S=Pr(),T=no(y),R=ta(S,T),R.callback=p??null,Ja(y,R,T),u.current.lanes=T,Ud(u,T,S),Br(u,S),u}function pg(u,p,y,S){var T=p.current,R=Pr(),U=no(T);return y=nM(y),p.context===null?p.context=y:p.pendingContext=y,p=ta(R,U),p.payload={element:u},S=S===void 0?null:S,S!==null&&(p.callback=S),u=Ja(T,p,U),u!==null&&(Zi(u,T,U,R),Wm(u,T,U)),U}function mg(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function iM(u,p){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var y=u.retryLane;u.retryLane=y!==0&&y<p?y:p}}function gw(u,p){iM(u,p),(u=u.alternate)&&iM(u,p)}function PQ(){return null}var sM=typeof reportError=="function"?reportError:function(u){console.error(u)};function yw(u){this._internalRoot=u}gg.prototype.render=yw.prototype.render=function(u){var p=this._internalRoot;if(p===null)throw Error(n(409));pg(u,p,null,null)},gg.prototype.unmount=yw.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var p=u.containerInfo;ol(function(){pg(null,u,null,null)}),p[Xs]=null}};function gg(u){this._internalRoot=u}gg.prototype.unstable_scheduleHydration=function(u){if(u){var p=zE();u={blockedOn:null,target:u,priority:p};for(var y=0;y<Va.length&&p!==0&&p<Va[y].priority;y++);Va.splice(y,0,u),y===0&&WE(u)}};function vw(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function yg(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function aM(){}function AQ(u,p,y,S,T){if(T){if(typeof S=="function"){var R=S;S=function(){var le=mg(U);R.call(le)}}var U=rM(p,S,u,0,null,!1,!1,"",aM);return u._reactRootContainer=U,u[Xs]=U.current,rf(u.nodeType===8?u.parentNode:u),ol(),U}for(;T=u.lastChild;)u.removeChild(T);if(typeof S=="function"){var Y=S;S=function(){var le=mg(J);Y.call(le)}}var J=mw(u,0,!1,null,null,!1,!1,"",aM);return u._reactRootContainer=J,u[Xs]=J.current,rf(u.nodeType===8?u.parentNode:u),ol(function(){pg(p,J,y,S)}),J}function vg(u,p,y,S,T){var R=y._reactRootContainer;if(R){var U=R;if(typeof T=="function"){var Y=T;T=function(){var J=mg(U);Y.call(J)}}pg(p,U,u,T)}else U=AQ(y,p,u,T,S);return mg(U)}BE=function(u){switch(u.tag){case 3:var p=u.stateNode;if(p.current.memoizedState.isDehydrated){var y=zd(p.pendingLanes);y!==0&&(z0(p,y|1),Br(p,xn()),(kt&6)===0&&(Bc=xn()+500,Xa()))}break;case 13:ol(function(){var S=ea(u,1);if(S!==null){var T=Pr();Zi(S,u,1,T)}}),gw(u,1)}},U0=function(u){if(u.tag===13){var p=ea(u,134217728);if(p!==null){var y=Pr();Zi(p,u,134217728,y)}gw(u,134217728)}},qE=function(u){if(u.tag===13){var p=no(u),y=ea(u,p);if(y!==null){var S=Pr();Zi(y,u,p,S)}gw(u,p)}},zE=function(){return Ft},UE=function(u,p){var y=Ft;try{return Ft=u,p()}finally{Ft=y}},D0=function(u,p,y){switch(p){case"input":if(Rt(u,y),p=y.name,y.type==="radio"&&p!=null){for(y=u;y.parentNode;)y=y.parentNode;for(y=y.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<y.length;p++){var S=y[p];if(S!==u&&S.form===u.form){var T=Dm(S);if(!T)throw Error(n(90));ae(S),Rt(S,T)}}}break;case"textarea":Je(u,y);break;case"select":p=y.value,p!=null&&Hn(u,!!y.multiple,p,!1)}},PE=cw,AE=ol;var kQ={usingClientEntryPoint:!1,Events:[of,Pc,Dm,NE,CE,cw]},wf={findFiberByHostInstance:Zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"}
40,EQ={bundleType:wf.bundleType,version:wf.version,rendererPackageName:wf.rendererPackageName,rendererConfig:wf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=OE(u),u===null?null:u.stateNode},findFiberByHostInstance:wf.findFiberByHostInstance||PQ,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 xg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xg.isDisabled&&xg.supportsFiber)try{gm=xg.inject(EQ),vs=xg}catch{}}return qr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kQ,qr.createPortal=function(u,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vw(p))throw Error(n(200));return CQ(u,p,null,y)},qr.createRoot=function(u,p){if(!vw(u))throw Error(n(299));var y=!1,S="",T=sM;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onRecoverableError!==void 0&&(T=p.onRecoverableError)),p=mw(u,1,!1,null,null,y,!1,S,T),u[Xs]=p.current,rf(u.nodeType===8?u.parentNode:u),new yw(p)},qr.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var p=u._reactInternals;if(p===void 0)throw typeof u.render=="function"?Error(n(188)):(u=Object.keys(u).join(","),Error(n(268,u)));return u=OE(p),u=u===null?null:u.stateNode,u},qr.flushSync=function(u){return ol(u)},qr.hydrate=function(u,p,y){if(!yg(p))throw Error(n(200));return vg(null,u,p,!0,y)},qr.hydrateRoot=function(u,p,y){if(!vw(u))throw Error(n(405));var S=y!=null&&y.hydratedSources||null,T=!1,R="",U=sM;if(y!=null&&(y.unstable_strictMode===!0&&(T=!0),y.identifierPrefix!==void 0&&(R=y.identifierPrefix),y.onRecoverableError!==void 0&&(U=y.onRecoverableError)),p=rM(p,null,u,1,y??null,T,!1,R,U),u[Xs]=p.current,rf(u),S)for(u=0;u<S.length;u++)y=S[u],T=y._getVersion,T=T(y._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[y,T]:p.mutableSourceEagerHydrationData.push(y,T);return new gg(p)},qr.render=function(u,p,y){if(!yg(p))throw Error(n(200));return vg(null,u,p,!1,y)},qr.unmountComponentAtNode=function(u){if(!yg(u))throw Error(n(40));return u._reactRootContainer?(ol(function(){vg(null,null,u,!1,function(){u._reactRootContainer=null,u[Xs]=null})}),!0):!1},qr.unstable_batchedUpdates=cw,qr.unstable_renderSubtreeIntoContainer=function(u,p,y,S){if(!yg(y))throw Error(n(200));if(u==null||u._reactInternals===void 0)throw Error(n(38));return vg(u,p,y,!1,S)},qr.version="18.3.1-next-f1338f8080-20240426",qr}var mM;function MB(){if(mM)return jw.exports;mM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jw.exports=$Q(),jw.exports}var gM;function FQ(){if(gM)return jg;gM=1;var e=MB();return jg.createRoot=e.createRoot,jg.hydrateRoot=e.hydrateRoot,jg}var BQ=FQ();const qQ=Ot(BQ),zQ=20,UQ=1e6,fa={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Nw=0;function VQ(){return Nw=(Nw+1)%Number.MAX_VALUE,Nw.toString()}const Cw=new Map,yM=e=>{if(Cw.has(e))return;const t=setTimeout(()=>{Cw.delete(e),nh({type:fa.REMOVE_TOAST,toastId:e})},UQ);Cw.set(e,t)},WQ=(e,t)=>{switch(t.type){case fa.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,zQ)};case fa.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case fa.DISMISS_TOAST:{const{toastId:n}=t;return n?yM(n):e.toasts.forEach(r=>{yM(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case fa.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},oy=[];let ly={toasts:[]};function nh(e){ly=WQ(ly,e),oy.forEach(t=>{t(ly)})}function HQ({...e}){const t=VQ(),n=i=>nh({type:fa.UPDATE_TOAST,toast:{...i,id:t}}
vendor: 7,018 bytes, lines 40-115
40),r=()=>nh({type:fa.DISMISS_TOAST,toastId:t});return nh({type:fa.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function KQ(){const[e,t]=_.useState(ly);return _.useEffect(()=>(oy.push(t),()=>{const n=oy.indexOf(t);n>-1&&oy.splice(n,1)}),[e]),{...e,toast:HQ,dismiss:n=>nh({type:fa.DISMISS_TOAST,toastId:n})}}function RB(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=RB(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=RB(e))&&(r&&(r+=" "),r+=t);return r}const vM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xM=ot,sx=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return xM(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(d=>{const h=n==null?void 0:n[d],f=s==null?void 0:s[d];if(h===null)return null;const m=vM(h)||vM(f);return i[d][m]}),l=n&&Object.entries(n).reduce((d,h)=>{let[f,m]=h;return m===void 0||(d[f]=m),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:f,className:m,...g}=h;return Object.entries(g).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...s,...l}[v]):{...s,...l}[v]===b})?[...d,f,m]:d},[]);return xM(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.475.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const GQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DB=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.475.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var YQ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.475.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const XQ=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...l},c)=>_.createElement("svg",{ref:c,...YQ,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:DB("lucide",i),...l},[...a.map(([d,h])=>_.createElement(d,h)),...Array.isArray(s)?s:[s]]));/**
56 * @license lucide-react v0.475.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const je=(e,t)=>{const n=_.forwardRef(({className:r,...i},s)=>_.createElement(XQ,{ref:s,iconNode:t,className:DB(`lucide-${GQ(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.475.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const QQ=[["path",{d:"M12 22V8",key:"qkxhtm"}],["path",{d:"M5 12H2a10 10 0 0 0 20 0h-3",key:"1hv3nh"}],["circle",{cx:"12",cy:"5",r:"3",key:"rqqgnr"}]],Ui=je("Anchor",QQ);/**
66 * @license lucide-react v0.475.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const JQ=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ZQ=je("ArrowDown",JQ);/**
71 * @license lucide-react v0.475.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const eJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],tJ=je("ArrowRight",eJ);/**
76 * @license lucide-react v0.475.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const nJ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],rJ=je("ArrowUp",nJ);/**
81 * @license lucide-react v0.475.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const iJ=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],sJ=je("Banknote",iJ);/**
86 * @license lucide-react v0.475.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const aJ=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],cy=je("Bell",aJ);/**
91 * @license lucide-react v0.475.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const oJ=[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]],lJ=je("Bike",oJ);/**
96 * @license lucide-react v0.475.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const cJ=[["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"}]],IB=je("BookOpen",cJ);/**
101 * @license lucide-react v0.475.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const uJ=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Pw=je("Bot",uJ);/**
106 * @license lucide-react v0.475.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const dJ=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],fJ=je("Briefcase",dJ);/**
111 * @license lucide-react v0.475.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const hJ=[["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"}
115],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],bM=je("Building2",hJ);/**
116 * @license lucide-react v0.475.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const pJ=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],mJ=je("Calculator",pJ);/**
121 * @license lucide-react v0.475.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const gJ=[["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"}]],ax=je("CalendarDays",gJ);/**
126 * @license lucide-react v0.475.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const yJ=[["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"}]],vi=je("Calendar",yJ);/**
131 * @license lucide-react v0.475.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const vJ=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],LB=je("Camera",vJ);/**
136 * @license lucide-react v0.475.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const xJ=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],Na=je("Car",xJ);/**
141 * @license lucide-react v0.475.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const bJ=[["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"}]],wJ=je("ChartColumn",bJ);/**
146 * @license lucide-react v0.475.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const jJ=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],SJ=je("CheckCheck",jJ);/**
151 * @license lucide-react v0.475.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const _J=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qr=je("Check",_J);/**
156 * @license lucide-react v0.475.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const NJ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wp=je("ChevronDown",NJ);/**
161 * @license lucide-react v0.475.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const CJ=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],PJ=je("ChevronLeft",CJ);/**
166 * @license lucide-react v0.475.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const AJ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$B=je("ChevronRight",AJ);/**
171 * @license lucide-react v0.475.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const kJ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ox=je("ChevronUp",kJ);/**
176 * @license lucide-react v0.475.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const EJ=[["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"}]],EN=je("CircleAlert",EJ);/**
181 * @license lucide-react v0.475.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const TJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lx=je("CircleCheck",TJ);
185/**
186 * @license lucide-react v0.475.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const OJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],wM=je("CirclePlay",OJ);/**
191 * @license lucide-react v0.475.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const MJ=[["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"}]],jM=je("CircleX",MJ);/**
196 * @license lucide-react v0.475.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const RJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],FB=je("Circle",RJ);/**
201 * @license lucide-react v0.475.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const DJ=[["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"}]],IJ=je("ClipboardList",DJ);/**
206 * @license lucide-react v0.475.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const LJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]],$J=je("Clock3",LJ);/**
211 * @license lucide-react v0.475.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const FJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ga=je("Clock",FJ);/**
216 * @license lucide-react v0.475.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const BJ=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],BB=je("Compass",BJ);/**
221 * @license lucide-react v0.475.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const qJ=[["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"}]],qB=je("Copy",qJ);/**
226 * @license lucide-react v0.475.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const zJ=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Ey=je("CreditCard",zJ);/**
231 * @license lucide-react v0.475.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const UJ=[["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"}]],Mo=je("DollarSign",UJ);/**
236 * @license lucide-react v0.475.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const VJ=[["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"}]],SM=je("Download",VJ);/**
241 * @license lucide-react v0.475.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const WJ=[["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"}]],_M=je("EllipsisVertical",WJ);/**
246 * @license lucide-react v0.475.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const HJ=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],KJ=je("Ellipsis",HJ);/**
251 * @license lucide-react v0.475.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const GJ=[["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"}]],YJ=je("Eye",GJ);/**
256 * @license lucide-react v0.475.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const XJ=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],QJ=je("Facebook",XJ);/**
261 * @license lucide-react v0.475.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const JJ=[["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"}]],jA=je("FileText",JJ);/**
266 * @license lucide-react v0.475.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const ZJ=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],zB=je("Filter",ZJ);/**
271 * @license lucide-react v0.475.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const eZ=[["path",{d:"M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",key:"15baut"}],["path",{d:"M18 12v.5",key:"18hhni"}],["path",{d:"M16 17.93a9.77 9.77 0 0 1 0-11.86",key:"16dt7o"}],["path",{d:"M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",key:"l9di03"}],["path",{d:"M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4",key:"1kjonw"}],["path",{d:"m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98",key:"1zlm23"}
275]],UB=je("Fish",eZ);/**
276 * @license lucide-react v0.475.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const tZ=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],rh=je("GraduationCap",tZ);/**
281 * @license lucide-react v0.475.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const nZ=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],rZ=je("House",nZ);/**
286 * @license lucide-react v0.475.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const iZ=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}
290]],Hl=je("Image",iZ);/**
291 * @license lucide-react v0.475.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const sZ=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],VB=je("Instagram",sZ);/**
296 * @license lucide-react v0.475.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const aZ=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],oZ=je("LayoutDashboard",aZ);/**
301 * @license lucide-react v0.475.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const lZ=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],cZ=je("LayoutGrid",lZ);/**
306 * @license lucide-react v0.475.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const uZ=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],Ty=je("Leaf",uZ);/**
311 * @license lucide-react v0.475.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const dZ=[["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"}]],WB=je("Link2",dZ);/**
316 * @license lucide-react v0.475.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const fZ=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],NM=je("ListTodo",fZ);/**
321 * @license lucide-react v0.475.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const hZ=[["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"}]],pZ=je("List",hZ);/**
326 * @license lucide-react v0.475.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const mZ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],wr=je("LoaderCircle",mZ);/**
331 * @license lucide-react v0.475.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const gZ=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],yZ=je("LogIn",gZ);/**
336 * @license lucide-react v0.475.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const vZ=[["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"}]],xZ=je("LogOut",vZ);/**
341 * @license lucide-react v0.475.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const bZ=[["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"}]],pd=je("Mail",bZ);/**
346 * @license lucide-react v0.475.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const wZ=[["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"}]],jZ=je("MapPin",wZ);/**
351 * @license lucide-react v0.475.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const SZ=[["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"}]],_Z=je("Menu",SZ);/**
356 * @license lucide-react v0.475.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const NZ=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],SA=je("MessageCircle",NZ);/**
361 * @license lucide-react v0.475.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const CZ=[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]],PZ=je("Music2",CZ);/**
366 * @license lucide-react v0.475.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const AZ=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],$i=je("Package",AZ);/**
371 * @license lucide-react v0.475.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const kZ=[["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"}]],EZ=je("Palette",kZ);/**
376 * @license lucide-react v0.475.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const TZ=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],CM=je("Pause",TZ);/**
381 * @license lucide-react v0.475.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const OZ=[["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"}]],jp=je("Pen",OZ);/**
386 * @license lucide-react v0.475.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const MZ=[["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"}]],Sp=je("Pencil",MZ);/**
391 * @license lucide-react v0.475.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const RZ=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],HB=je("Percent",RZ);/**
396 * @license lucide-react v0.475.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const DZ=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],cx=je("Phone",DZ);/**
401 * @license lucide-react v0.475.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const IZ=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],KB=je("Play",IZ);/**
406 * @license lucide-react v0.475.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const LZ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],en=je("Plus",LZ);/**
411 * @license lucide-react v0.475.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const $Z=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],FZ=je("Printer",$Z);/**
416 * @license lucide-react v0.475.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const BZ=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],GB=je("Receipt",BZ);/**
421 * @license lucide-react v0.475.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const qZ=[["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"}]],zZ=je("RefreshCw",qZ);/**
426 * @license lucide-react v0.475.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const UZ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Da=je("Search",UZ);/**
431 * @license lucide-react v0.475.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const VZ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],WZ=je("Send",VZ);/**
436 * @license lucide-react v0.475.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const HZ=[["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"}]],uu=je("Settings",HZ);/**
441 * @license lucide-react v0.475.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const KZ=[["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"}]],GZ=je("Share2",KZ);/**
446 * @license lucide-react v0.475.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const YZ=[["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
450y:"oel41y"}]],uy=je("Shield",YZ);/**
451 * @license lucide-react v0.475.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const XZ=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],_A=je("Ship",XZ);/**
456 * @license lucide-react v0.475.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const QZ=[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]],YB=je("ShoppingBag",QZ);/**
461 * @license lucide-react v0.475.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const JZ=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],XB=je("ShoppingCart",JZ);/**
466 * @license lucide-react v0.475.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const ZZ=[["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"}]],NA=je("Sparkles",ZZ);/**
471 * @license lucide-react v0.475.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const eee=[["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"}]],PM=je("SquarePen",eee);/**
476 * @license lucide-react v0.475.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const tee=[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]],nee=je("Stethoscope",tee);/**
481 * @license lucide-react v0.475.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const ree=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Oy=je("Sun",ree);/**
486 * @license lucide-react v0.475.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const iee=[["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"}]],On=je("Trash2",iee);/**
491 * @license lucide-react v0.475.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const see=[["path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4",key:"foxbe7"}],["path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3",key:"18arnh"}],["path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",key:"ywahnh"}],["path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14",key:"ft0feo"}]],QB=je("TreePalm",see);/**
496 * @license lucide-react v0.475.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const aee=[["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"}]],oee=je("TrendingDown",aee);/**
501 * @license lucide-react v0.475.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const lee=[["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"}]],vh=je("TrendingUp",lee);
vendor: 4,757 bytes, lines 505-555
505/**
506 * @license lucide-react v0.475.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const cee=[["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"}]],uee=je("TriangleAlert",cee);/**
511 * @license lucide-react v0.475.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const dee=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],_p=je("Upload",dee);/**
516 * @license lucide-react v0.475.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const fee=[["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"}]],TN=je("UserCheck",fee);/**
521 * @license lucide-react v0.475.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const hee=[["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:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],ON=je("UserX",hee);/**
526 * @license lucide-react v0.475.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const pee=[["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"}]],Ca=je("User",pee);/**
531 * @license lucide-react v0.475.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const mee=[["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"}]],Jr=je("Users",mee);/**
536 * @license lucide-react v0.475.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const gee=[["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"}]],JB=je("Video",gee);/**
541 * @license lucide-react v0.475.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const yee=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],vee=je("Wallet",yee);/**
546 * @license lucide-react v0.475.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const xee=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],Kr=je("Waves",xee);/**
551 * @license lucide-react v0.475.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const bee=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xi=je("X",bee),CA="-",wee=e=>{const t=See(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(CA);return l[0]===""&&l.length!==1&&l.shift(),ZB(l,t)||jee(a)},getConflictingClassGroupIds:(a,l)=>{const c=n[a]||[];return l&&r[a]?[...c,...r[a]]:c}}},ZB=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?ZB(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(CA);return(a=t.validators.find(({validator:l})=>l(s)))==null?void 0:a.classGroupId},AM=/^\[(.+)\]$/,jee=e=>{if(AM.test(e)){const t=AM.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},See=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)MN(n[i],r,i,t);return r},MN=(e,t,n,r)=>{e.forEach(i=>
vendor: 6,701 bytes, line 555
555{if(typeof i=="string"){const s=i===""?t:kM(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(_ee(i)){MN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{MN(a,kM(t,s),n,r)})})},kM=(e,t)=>{let n=e;return t.split(CA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},_ee=e=>e.isThemeGetter,Nee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},RN="!",DN=":",Cee=DN.length,Pee=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,l=0,c=0,d;for(let x=0;x<i.length;x++){let v=i[x];if(a===0&&l===0){if(v===DN){s.push(i.slice(c,x)),c=x+Cee;continue}if(v==="/"){d=x;continue}}v==="["?a++:v==="]"?a--:v==="("?l++:v===")"&&l--}const h=s.length===0?i:i.substring(c),f=Aee(h),m=f!==h,g=d&&d>c?d-c:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:g}};if(t){const i=t+DN,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},Aee=e=>e.endsWith(RN)?e.substring(0,e.length-1):e.startsWith(RN)?e.substring(1):e,kee=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},Eee=e=>({cache:Nee(e.cacheSize),parseClassName:Pee(e),sortModifiers:kee(e),...wee(e)}),Tee=/\s+/,Oee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],l=e.trim().split(Tee);let c="";for(let d=l.length-1;d>=0;d-=1){const h=l[d],{isExternal:f,modifiers:m,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:v}=n(h);if(f){c=h+(c.length>0?" "+c:c);continue}let b=!!v,j=r(b?x.substring(0,v):x);if(!j){if(!b){c=h+(c.length>0?" "+c:c);continue}if(j=r(x),!j){c=h+(c.length>0?" "+c:c);continue}b=!1}const w=s(m).join(":"),N=g?w+RN:w,k=N+j;if(a.includes(k))continue;a.push(k);const C=i(j,b);for(let A=0;A<C.length;++A){const E=C[A];a.push(N+E)}c=h+(c.length>0?" "+c:c)}return c};function Mee(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=eq(t))&&(r&&(r+=" "),r+=n);return r}const eq=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=eq(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ree(e,...t){let n,r,i,s=a;function a(c){const d=t.reduce((h,f)=>f(h),e());return n=Eee(d),r=n.cache.get,i=n.cache.set,s=l,l(c)}function l(c){const d=r(c);if(d)return d;const h=Oee(c,n);return i(c,h),h}return function(){return s(Mee.apply(null,arguments))}}const Ln=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},tq=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nq=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dee=/^\d+\/\d+$/,Iee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lee=/\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$/,$ee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zc=e=>Dee.test(e),wt=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>!!e&&Number.isInteger(Number(e)),Aw=e=>e.endsWith("%")&&wt(e.slice(0,-1)),ia=e=>Iee.test(e),qee=()=>!0,zee=e=>Lee.test(e)&&!$ee.test(e),rq=()=>!1,Uee=e=>Fee.test(e),Vee=e=>Bee.test(e),Wee=e=>!$e(e)&&!Fe(e),Hee=e=>md(e,aq,rq),$e=e=>tq.test(e),dl=e=>md(e,oq,zee),kw=e=>md(e,Qee,wt),EM=e=>md(e,iq,rq),Kee=e=>md(e,sq,Vee),Sg=e=>md(e,lq,Uee),Fe=e=>nq.test(e),Sf=e=>gd(e,oq),Gee=e=>gd(e,Jee),TM=e=>gd(e,iq),Yee=e=>gd(e,aq),Xee=e=>gd(e,sq),_g=e=>gd(e,lq,!0),md=(e,t,n)=>{const r=tq.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gd=(e,t,n=!1)=>{const r=nq.exec(e);return r?r[1]?t(r[1]):n:!1},iq=e=>e==="position"||e==="percentage",sq=e=>e==="image"||e==="url",aq=e=>e==="length"||e==="size"||e==="bg-size",oq=e=>e==="length",Qee=e=>e==="number",Jee=e=>e==="family-name",lq=e=>e==="shadow",Zee=()=>{const e=Ln("color"),t=Ln("font"),n=Ln("text"),r=Ln("font-weight"),i=Ln("tracking"),s=Ln("leading"),a=Ln("breakpoint"),l=Ln("container"),c=Ln("spacing"),d=Ln("radius"),h=Ln("shadow"),f=Ln("inset-shadow"),m=Ln("text-shadow"),g=Ln("drop-shadow"),x=Ln("blur"),v=Ln("perspective"),b=Ln("aspect"),j=Ln("ease"),w=Ln("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),Fe,$e],A=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],P=()=>[Fe,$e,c],D=()=>[zc,"full","auto",...P()],B=()=>[ao,"none","subgrid",Fe,$e],O=()=>["auto",{span:["full",ao,Fe,$e]},ao,Fe,$e],M=()=>[ao,"auto",Fe,$e],$=()=>["auto","min","max","fr",Fe,$e],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...P()],K=()=>[zc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],L=()=>[e,Fe,$e],H=()=>[...k(),TM,EM,{position:[Fe,$e]}],I=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Yee,Hee,{size:[Fe,$e]}],G=()=>[Aw,Sf,dl],z=()=>["","none","full",d,Fe,$e],oe=()=>["",wt,Sf,dl],pe=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[wt,Aw,TM,EM],Ne=()=>["","none",x,Fe,$e],ee=()=>["none",wt,Fe,$e],de=()=>["none",wt,Fe,$e],be=()=>[wt,Fe,$e],ae=()=>[zc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ia],breakpoint:[ia],color:[qee],container:[ia],"drop-shadow":[ia],ease:["in","out","in-out"],font:[Wee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ia],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ia],shadow:[ia],spacing:["px",wt],text:[ia],"text-shadow":[ia],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zc,$e,Fe,b]}
vendor: 12,431 bytes, line 555
555],container:["container"],columns:[{columns:[wt,$e,Fe,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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"],sr:["sr-only","not-sr-only"],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:C()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[ao,"auto",Fe,$e]}],basis:[{basis:[zc,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wt,zc,"auto","initial","none",$e]}],grow:[{grow:["",wt,Fe,$e]}],shrink:[{shrink:["",wt,Fe,$e]}],order:[{order:[ao,"first","last","none",Fe,$e]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[l,"screen",...K()]}],"min-w":[{"min-w":[l,"screen","none",...K()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,Sf,dl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fe,kw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Aw,$e]}],"font-family":[{font:[Gee,$e,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Fe,$e]}],"line-clamp":[{"line-clamp":[wt,"none",Fe,kw]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",Fe,$e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Fe,$e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[wt,"from-font","auto",Fe,dl]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[wt,"auto",Fe,$e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe,$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe,$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:I()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ao,Fe,$e],radial:["",Fe,$e],conic:[ao,Fe,$e]},Xee,Kee]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wt,Fe,$e]}],"outline-w":[{outline:["",wt,Sf,dl]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,_g,Sg]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,_g,Sg]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[wt,dl]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,_g,Sg]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[wt,Fe,$e]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[wt]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Fe,$e]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[wt]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:I()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Fe,$e]}],filter:[{filter:["","none",Fe,$e]}],blur:[{blur:Ne()}],brightness:[{brightness:[wt,Fe,$e]}],contrast:[{contrast:[wt,Fe,$e]}],"drop-shadow":[{"drop-shadow":["","none",g,_g,Sg]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",wt,Fe,$e]}],"hue-rotate":[{"hue-rotate":[wt,Fe,$e]}],invert:[{invert:["",wt,Fe,$e]}],saturate:[{saturate:[wt,Fe,$e]}],sepia:[{sepia:["",wt,Fe,$e]}],"backdrop-filter":[{"backdrop-filter":["","none",Fe,$e]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[wt,Fe,$e]}],"backdrop-contrast":[{"backdrop-contrast":[wt,Fe,$e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wt,Fe,$e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wt,Fe,$e]}],"backdrop-invert":[{"backdrop-invert":["",wt,Fe,$e]}],"backdrop-opacity":[{"backdrop-opacity":[wt,Fe,$e]}],"backdrop-saturate":[{"backdrop-saturate":[wt,Fe,$e]}],"backdrop-sepia":[{"backdrop-sepia":["",wt,Fe,$e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Fe,$e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wt,"initial",Fe,$e]}],ease:[{ease:["linear","initial",j,Fe,$e]}],delay:[{delay:[wt,Fe,$e]}],animate:[{animate:["none",w,Fe,$e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Fe,$e]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}
vendor: 7,092 bytes, line 555
555],"skew-y":[{"skew-y":be()}],transform:[{transform:[Fe,$e,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Fe,$e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Fe,$e]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[wt,Sf,dl,kw]}],stroke:[{stroke:["none",...L()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cq=Ree(Zee);function Te(...e){return cq(ot(e))}const uq=_.forwardRef(({...e},t)=>o.jsx("div",{ref:t,className:"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}));uq.displayName="ToastProvider";const dq=_.forwardRef(({...e},t)=>o.jsx("div",{ref:t,className:"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}));dq.displayName="ToastViewport";const ete=sx("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"}}),fq=_.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,className:Te(ete({variant:t}),e),...n}));fq.displayName="Toast";const tte=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("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}));tte.displayName="ToastAction";const hq=_.forwardRef(({className:e,...t},n)=>o.jsx("button",{ref:n,className:Te("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,366 bytes, line 555
555/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:o.jsx(xi,{className:"h-4 w-4"})}));hq.displayName="ToastClose";const pq=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("text-sm font-semibold",e),...t}));pq.displayName="ToastTitle";const mq=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("text-sm opacity-90",e),...t}));mq.displayName="ToastDescription";function nte(){const{toasts:e}=KQ();return o.jsxs(uq,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return o.jsxs(fq,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[n&&o.jsx(pq,{children:n}),r&&o.jsx(mq,{children:r})]}),i,o.jsx(hq,{})]},t)}),o.jsx(dq,{})]})}var yd=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(){}},rte={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},mo,bA,jB,ite=(jB=class{constructor(){He(this,mo,rte);He(this,bA,!1)}setTimeoutProvider(e){Me(this,mo,e)}setTimeout(e,t){return Q(this,mo).setTimeout(e,t)}clearTimeout(e){Q(this,mo).clearTimeout(e)}setInterval(e,t){return Q(this,mo).setInterval(e,t)}clearInterval(e){Q(this,mo).clearInterval(e)}},mo=new WeakMap,bA=new WeakMap,jB),Sl=new ite;function ste(e){setTimeout(e,0)}var Kl=typeof window>"u"||"Deno"in globalThis;function Er(){}function ate(e,t){return typeof e=="function"?e(t):e}function IN(e){return typeof e=="number"&&e>=0&&e!==1/0}function gq(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ao(e,t){return typeof e=="function"?e(t):e}function Ri(e,t){return typeof e=="function"?e(t):e}function OM(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==PA(a,t.options))return!1}else if(!xh(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||s&&!s(t))}function MM(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Gl(t.options.mutationKey)!==Gl(s))return!1}else if(!xh(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function PA(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gl)(e)}function Gl(e){return JSON.stringify(e,(t,n)=>LN(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function xh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>xh(e[n],t[n])):!1}var ote=Object.prototype.hasOwnProperty;function yq(e,t){if(e===t)return e;const n=RM(e)&&RM(t);if(!n&&!(LN(e)&&LN(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),a=s.length,l=n?new Array(a):{};let c=0;for(let d=0;d<a;d++){const h=n?d:s[d],f=e[h],m=t[h];if(f===m){l[h]=f,(n?d<i:ote.call(e,h))&&c++;continue}if(f===null||m===null||typeof f!="object"||typeof m!="object"){l[h]=m;continue}const g=yq(f,m);l[h]=g,g===f&&c++}return i===a&&c===i?e:l}function My(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function RM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function LN(e){if(!DM(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!DM(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function DM(e){return Object.prototype.toString.call(e)==="[object Object]"}function lte(e){return new Promise(t=>{Sl.setTimeout(t,e)})}function $N(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yq(e,t):t}function cte(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ute(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var AA=Symbol();function vq(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>
555t.initialPromise:!e.queryFn||e.queryFn===AA?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xq(e,t){return typeof e=="function"?e(...t):!!e}var Tl,go,wu,SB,dte=(SB=class extends yd{constructor(){super();He(this,Tl);He(this,go);He(this,wu);Me(this,wu,t=>{if(!Kl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,go)||this.setEventListener(Q(this,wu))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,go))==null||t.call(this),Me(this,go,void 0))}setEventListener(t){var n;Me(this,wu,t),(n=Q(this,go))==null||n.call(this),Me(this,go,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Q(this,Tl)!==t&&(Me(this,Tl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,Tl)=="boolean"?Q(this,Tl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Tl=new WeakMap,go=new WeakMap,wu=new WeakMap,SB),kA=new dte;function FN(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var fte=ste;function hte(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=fte;const s=l=>{t?e.push(l):i(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Bn=hte(),ju,yo,Su,_B,pte=(_B=class extends yd{constructor(){super();He(this,ju,!0);He(this,yo);He(this,Su);Me(this,Su,t=>{if(!Kl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Q(this,yo)||this.setEventListener(Q(this,Su))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,yo))==null||t.call(this),Me(this,yo,void 0))}setEventListener(t){var n;Me(this,Su,t),(n=Q(this,yo))==null||n.call(this),Me(this,yo,t(this.setOnline.bind(this)))}setOnline(t){Q(this,ju)!==t&&(Me(this,ju,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Q(this,ju)}},ju=new WeakMap,yo=new WeakMap,Su=new WeakMap,_B),Ry=new pte;function mte(e){return Math.min(1e3*2**e,3e4)}function bq(e){return(e??"online")==="online"?Ry.isOnline():!0}var BN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wq(e){let t=!1,n=0,r;const i=FN(),s=()=>i.status!=="pending",a=v=>{var b;if(!s()){const j=new BN(v);m(j),(b=e.onCancel)==null||b.call(e,j)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>kA.isFocused()&&(e.networkMode==="always"||Ry.isOnline())&&e.canRun(),h=()=>bq(e.networkMode)&&e.canRun(),f=v=>{s()||(r==null||r(),i.resolve(v))},m=v=>{s()||(r==null||r(),i.reject(v))},g=()=>new Promise(v=>{var b;r=j=>{(s()||d())&&v(j)},(b=e.onPause)==null||b.call(e)}).then(()=>{var v;r=void 0,s()||(v=e.onContinue)==null||v.call(e)}),x=()=>{if(s())return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(j){v=Promise.reject(j)}Promise.resolve(v).then(f).catch(j=>{var A;if(s())return;const w=e.retry??(Kl?0:3),N=e.retryDelay??mte,k=typeof N=="function"?N(n,j):N,C=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,j);if(t||!C){m(j);return}n++,(A=e.onFail)==null||A.call(e,n,j),lte(k).then(()=>d()?void 0:g()).then(()=>{t?m(j):x()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?x():g().then(x),i)}}var Ol,NB,jq=(NB=class{constructor(){He(this,Ol)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),IN(this.gcTime)&&Me(this,Ol,Sl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kl?1/0:300*1e3))}clearGcTimeout(){Q(this,Ol)&&(Sl.clearTimeout(Q(this,Ol)),Me(this,Ol,void 0))}},Ol=new WeakMap,NB),Ml,_u,Mi,Rl,Qn,gp,Dl,rs,aa,CB,gte=(CB=class extends jq{constructor(t){super();He(this,rs);He(this,Ml);He(this,_u);He(this,Mi);He(this,Rl);He(this,Qn);He(this,gp);He(this,Dl);Me(this,Dl,!1),Me(this,gp,t.defaultOptions),this.setOptions(t.options),this.observers=[],Me(this,Rl,t.client),Me(this,Mi,Q(this,Rl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Me(this,Ml,IM(this.options)),this.state=t.state??Q(this,Ml),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Qn))==null?void 0:t.promise}setOptions(t){if(this.options={...Q(this,gp),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=IM(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),Me(this,Ml,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,Mi).remove(this)}setData(t,n){const r=$N(this.state.data,t,this.options);return vt(this,rs,aa).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){vt(this,rs,aa).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=Q(this,Qn))==null?void 0:r.promise;return(i=Q(this,Qn))==null||i.cancel(t),n?n.then(Er).catch(Er):Prom
555ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,Ml))}isActive(){return this.observers.some(t=>Ri(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===AA||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ao(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gq(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Qn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Qn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,Mi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Qn)&&(Q(this,Dl)?Q(this,Qn).cancel({revert:!0}):Q(this,Qn).cancelRetry()),this.scheduleGc()),Q(this,Mi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||vt(this,rs,aa).call(this,{type:"invalidate"})}async fetch(t,n){var c,d,h,f,m,g,x,v,b,j,w,N;if(this.state.fetchStatus!=="idle"&&((c=Q(this,Qn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Qn))return Q(this,Qn).continueRetry(),Q(this,Qn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(C=>C.options.queryFn);k&&this.setOptions(k.options)}const r=new AbortController,i=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(Me(this,Dl,!0),r.signal)})},s=()=>{const k=vq(this.options,n),A=(()=>{const E={client:Q(this,Rl),queryKey:this.queryKey,meta:this.meta};return i(E),E})();return Me(this,Dl,!1),this.options.persister?this.options.persister(k,A,this):k(A)},l=(()=>{const k={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Q(this,Rl),state:this.state,fetchFn:s};return i(k),k})();(d=this.options.behavior)==null||d.onFetch(l,this),Me(this,_u,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&vt(this,rs,aa).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta}),Me(this,Qn,wq({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:k=>{k instanceof BN&&k.revert&&this.setState({...Q(this,_u),fetchStatus:"idle"}),r.abort()},onFail:(k,C)=>{vt(this,rs,aa).call(this,{type:"failed",failureCount:k,error:C})},onPause:()=>{vt(this,rs,aa).call(this,{type:"pause"})},onContinue:()=>{vt(this,rs,aa).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const k=await Q(this,Qn).start();if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(g=(m=Q(this,Mi).config).onSuccess)==null||g.call(m,k,this),(v=(x=Q(this,Mi).config).onSettled)==null||v.call(x,k,this.state.error,this),k}catch(k){if(k instanceof BN){if(k.silent)return Q(this,Qn).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw vt(this,rs,aa).call(this,{type:"error",error:k}),(j=(b=Q(this,Mi).config).onError)==null||j.call(b,k,this),(N=(w=Q(this,Mi).config).onSettled)==null||N.call(w,this.state.data,k,this),k}finally{this.scheduleGc()}}},Ml=new WeakMap,_u=new WeakMap,Mi=new WeakMap,Rl=new WeakMap,Qn=new WeakMap,gp=new WeakMap,Dl=new WeakMap,rs=new WeakSet,aa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Sq(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Me(this,_u,t.manual?i:void 0),i;case"error":const s=t.error;
vendor: 13,763 bytes, line 555
555return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Bn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Q(this,Mi).notify({query:this,type:"updated",action:t})})},CB);function Sq(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bq(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function IM(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ur,Ct,yp,Ar,Il,Nu,la,vo,vp,Cu,Pu,Ll,$l,xo,Au,$t,Wf,qN,zN,UN,VN,WN,HN,KN,_q,PB,yte=(PB=class extends yd{constructor(t,n){super();He(this,$t);He(this,Ur);He(this,Ct);He(this,yp);He(this,Ar);He(this,Il);He(this,Nu);He(this,la);He(this,vo);He(this,vp);He(this,Cu);He(this,Pu);He(this,Ll);He(this,$l);He(this,xo);He(this,Au,new Set);this.options=n,Me(this,Ur,t),Me(this,vo,null),Me(this,la,FN()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,Ct).addObserver(this),LM(Q(this,Ct),this.options)?vt(this,$t,Wf).call(this):this.updateResult(),vt(this,$t,VN).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return GN(Q(this,Ct),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return GN(Q(this,Ct),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,vt(this,$t,WN).call(this),vt(this,$t,HN).call(this),Q(this,Ct).removeObserver(this)}setOptions(t){const n=this.options,r=Q(this,Ct);if(this.options=Q(this,Ur).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ri(this.options.enabled,Q(this,Ct))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");vt(this,$t,KN).call(this),Q(this,Ct).setOptions(this.options),n._defaulted&&!My(this.options,n)&&Q(this,Ur).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,Ct),observer:this});const i=this.hasListeners();i&&$M(Q(this,Ct),r,this.options,n)&&vt(this,$t,Wf).call(this),this.updateResult(),i&&(Q(this,Ct)!==r||Ri(this.options.enabled,Q(this,Ct))!==Ri(n.enabled,Q(this,Ct))||Ao(this.options.staleTime,Q(this,Ct))!==Ao(n.staleTime,Q(this,Ct)))&&vt(this,$t,qN).call(this);const s=vt(this,$t,zN).call(this);i&&(Q(this,Ct)!==r||Ri(this.options.enabled,Q(this,Ct))!==Ri(n.enabled,Q(this,Ct))||s!==Q(this,xo))&&vt(this,$t,UN).call(this,s)}getOptimisticResult(t){const n=Q(this,Ur).getQueryCache().build(Q(this,Ur),t),r=this.createResult(n,t);return xte(this,r)&&(Me(this,Ar,r),Me(this,Nu,this.options),Me(this,Il,Q(this,Ct).state)),r}getCurrentResult(){return Q(this,Ar)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&Q(this,la).status==="pending"&&Q(this,la).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){Q(this,Au).add(t)}getCurrentQuery(){return Q(this,Ct)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,Ur).defaultQueryOptions(t),r=Q(this,Ur).getQueryCache().build(Q(this,Ur),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return vt(this,$t,Wf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,Ar)))}createResult(t,n){var D;const r=Q(this,Ct),i=this.options,s=Q(this,Ar),a=Q(this,Il),l=Q(this,Nu),d=t!==r?t.state:Q(this,yp),{state:h}=t;let f={...h},m=!1,g;if(n._optimisticResults){const B=this.hasListeners(),O=!B&&LM(t,n),M=B&&$M(t,r,n,i);(O||M)&&(f={...f,...Sq(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:x,errorUpdatedAt:v,status:b}=f;g=f.data;let j=!1;if(n.placeholderData!==void 0&&g===void 0&&b==="pending"){let B;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(B=s.data,j=!0):B=typeof n.placeholderData=="function"?n.placeholderData((D=Q(this,Pu))==null?void 0:D.state.data,Q(this,Pu)):n.placeholderData,B!==void 0&&(b="success",g=$N(s==null?void 0:s.data,B,n),m=!0)}if(n.select&&g!==void 0&&!j)if(s&&g===(a==null?void 0:a.data)&&n.select===Q(this,vp))g=Q(this,Cu);else try{Me(this,vp,n.select),g=n.select(g),g=$N(s==null?void 0:s.data,g,n),Me(this,Cu,g),Me(this,vo,null)}catch(B){Me(this,vo,B)}Q(this,vo)&&(x=Q(this,vo),g=Q(this,Cu),v=Date.now(),b="error");const w=f.fetchStatus==="fetching",N=b==="pending",k=b==="error",C=N&&w,A=g!==void 0,P={status:b,fetchStatus:f.fetchStatus,isPending:N,isSuccess:b==="success",isError:k,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:f.dataUpdatedAt,error:x,errorUpdatedAt:v,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:w,isRefetching:w&&!N,isLoadingError:k&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&A,isStale:EA(t,n),refetch:this.refetch,promise:Q(this,la),isEnabled:Ri(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const B=$=>{P.status==="error"?$.reject(P.error):P.data!==void 0&&$.resolve(P.data)},O=()=>{const $=Me(this,la,P.promise=FN());B($)},M=Q(this,la);switch(M.status){case"pending":t.queryHash===r.queryHash&&B(M);break;case"fulfilled":(P.status==="error"||P.data!==M.value)&&O();break;case"rejected":(P.status!=="error"||P.error!==M.reason)&&O();break}}return P}updateResult(){const t=Q(this,Ar),n=this.createResult(Q(this,Ct),this.options);if(Me(this,Il,Q(this,Ct).state),Me(this,Nu,this.options),Q(this,Il).data!==void 0&&Me(this,Pu,Q(this,Ct)),My(n,t))return;Me(this,Ar,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!Q(this,Au).size)return!0;const a=new Set(s??Q(this,Au));return this.options.throwOnError&&a.add("error"),Object.keys(Q(this,Ar)).some(l=>{const c=l;return Q(this,Ar)[c]!==t[c]&&a.has(c)})};vt(this,$t,_q).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&vt(this,$t,VN).call(this)}},Ur=new WeakMap,Ct=new WeakMap,yp=new WeakMap,Ar=new WeakMap,Il=new WeakMap,Nu=new WeakMap,la=new WeakMap,vo=new WeakMap,vp=new WeakMap,Cu=new WeakMap,Pu=new WeakMap,Ll=new WeakMap,$l=new WeakMap,xo=new WeakMap,Au=new WeakMap,$t=new WeakSet,Wf=function(t){vt(this,$t,KN).call(this);let n=Q(this,Ct).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Er)),n},qN=function(){vt(this,$t,WN).call(this);const t=Ao(this.options.staleTime,Q(this,Ct));if(Kl||Q(this,Ar).isStale||!IN(t))return;const r=gq(Q(this,Ar).dataUpdatedAt,t)+1;Me(this,Ll,Sl.setTimeout(()=>{Q(this,Ar).isStale||this.updateResult()},r))},zN=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,Ct)):this.options.refetchInterval)??!1},UN=function(t){vt(this,$t,HN).call(this),Me(this,xo,t),!(Kl||Ri(this.options.enabled,Q(this,Ct))===!1||!IN(Q(this,xo))||Q(this,xo)===0)&&Me(this,$l,Sl.setInterval(()=>{(this.options.refetchIntervalInBackground||kA.isFocused())&&vt(this,$t,Wf).call(this)},Q(this,xo)))},VN=function(){vt(this,$t,qN).call(this),vt(this,$t,UN).call(this,vt(this,$t,zN).call(this))},WN=function(){Q(this,Ll)&&(Sl.clearTimeout(Q(this,Ll)),Me(this,Ll,void 0))},HN=function(){Q(this,$l)&&(Sl.clearInterval(Q(this,$l)),Me(this,$l,void 0))},KN=function(){const t=Q(this,Ur).getQueryCache().build(Q(this,Ur),this.options);if(t===Q(this,Ct))return;const n=Q(this,Ct);Me(this,Ct,t),Me(this,yp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_q=function(t){Bn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,Ar))}),Q(this,Ur).getQueryCache().notify({query:Q(this,Ct),type:"observerResultsUpdated"})})},PB);function vte(e,t){return Ri(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function LM(e,t){return vte(e,t)||e.state.data!==void 0&&GN(e,t,t.refetchOnMount)}function GN(e,t,n){if(Ri(t.enabled,e)!==!1&&Ao(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&EA(e,t)}return!1}function $M(e,t,n,r){return(e!==t||Ri(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&EA(e,n)}function EA(e,t){return Ri(t.enabled,e)!==!1&&e.isStaleByTime(Ao(t.staleTime,e))}function xte(e,t){return!My(e.getCurrentResult(),t)}function FM(e){return{onFetch:(t,n)=>{var h,f,m,g,x;const r=t.options,i=(m=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],a=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let v=!1;const b=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},j=vq(t.options,t.fetchOptions),w=async(N,k,C)=>{if(v)return Promise.reject();if(k==null&&N.pages.length)return Promise.resolve(N);const E=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:k,direction:C?"backward":"forward",meta:t.options.meta};return b(O),O})(),P=await j(E),{maxPages:D}=t.options,B=C?ute:cte;return{pages:B(N.pages,P,D),pageParams:B(N.pageParams,k,D)}};if(i&&s.length){const N=i==="backward",k=N?bte:BM,C={pages:s,pageParams:a},A=k(r,C);l=await w(C,A,N)}else{const N=e??s.length;do{const k=c===0?a[0]??r.initialPageParam:BM(r,l);if(c>0&&k==null)break;l=await w(l,k),c++}while(c<N)}return l};t.options.persister?t.fetchFn=()=>{var v,b;return(b=(v=t.options).persister)==null?void 0:b.call(v,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function BM(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function bte(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xp,Ns,kr,Fl,Cs,co,AB,wte=(AB=class extends jq{constructor(t){super();He(this,Cs);He(this,xp);He(this,Ns);He(this,kr);He(this,Fl);Me(this,xp,t.client),this.mutationId=t.mutationId,Me(this,kr,t.mutationCache),Me(this,Ns,[]),this.state=t.state||Nq(),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,Ns).includes(t)||(Q(this,Ns).push(t),this.clearGcTimeout(),Q(this,kr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Me(this,Ns,Q(this,Ns).filter(n=>n!==t)),this.scheduleGc(),Q(this,kr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,Ns).length||(this.state.status==="pending"?this.scheduleGc():Q(this,kr).remove(this))}continue(){var t;return((t=Q(this,Fl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,l,c,d,h,f,m,g,x,v,b,j,w,N,k,C,A,E,P,D;const n=()=>{vt(this,Cs,co).call(this,{type:"continue"})},r={client:Q(this,xp),meta:this.options.meta,mutationKey:this.options.mutationKey};Me(this,Fl,wq({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(B,O)=>{vt(this,Cs,co).call(this,{type:"failed",failureCount:B,error:O})},onPause:()=>{vt(this,Cs,co).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,kr).canRun(this)}));const i=this.state.status==="pending",s=!Q(this,Fl).canStart();try{if(i)n();else{vt(this,Cs,co).call(this,{type:"pending",variables:t,isPaused:s}),await((l=(a=Q(this,kr).config).onMutate)==null?void 0:l.call(a,t,this,r));const O=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,r));O!==this.state.context&&vt(this,Cs,co).call(this,{type:"pending",context:O,variables:t,isPaused:s})}const B=await Q(this,Fl).start();return await((f=(h=Q(this,kr).config).onSuccess)==null?void 0:f.call(h,B,t,this.state.context,this,r)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,r)),await((v=(x=Q(this,kr).config).onSettled)==null?void 0:v.call(x,B,null,this.state.variables,this.state.context,this,r)),await((j=(b=this.options).onSettled)==null?void 0:j.call(b,B,null,t,this.state.context,r)),vt(this,Cs,co).call(this,{type:"success",data:B}),B}catch(B){try{throw await((N=(w=Q(this,kr).config).onError)==null?void 0:N.call(w,B,t,this.state.context,this,r)),await((C=(k=this.options).onError)==null?void 0:C.call(k,B,t,this.state.context,r)),await((E=(A=Q(this,kr).config).onSettled)==null?void 0:E.call(A,void 0,B,this.state.variables,this.state.context,this,r)),await((D=(P=this.options).onSettled)==null?void 0:D.call(P,void 0,B,t,this.state.context,r)),B}finally{vt(this,Cs,co).call(this,{type:"error",error:B})}}finally{Q(this,kr).runNext(this)}}},xp=new WeakMap,Ns=new WeakMap,kr=new WeakMap,Fl=new WeakMap,Cs=new WeakSet,co=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};
555case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Bn.batch(()=>{Q(this,Ns).forEach(r=>{r.onMutationUpdate(t)}),Q(this,kr).notify({mutation:this,type:"updated",action:t})})},AB);function Nq(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ca,is,bp,kB,jte=(kB=class extends yd{constructor(t={}){super();He(this,ca);He(this,is);He(this,bp);this.config=t,Me(this,ca,new Set),Me(this,is,new Map),Me(this,bp,0)}build(t,n,r){const i=new wte({client:t,mutationCache:this,mutationId:++bg(this,bp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){Q(this,ca).add(t);const n=Ng(t);if(typeof n=="string"){const r=Q(this,is).get(n);r?r.push(t):Q(this,is).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Q(this,ca).delete(t)){const n=Ng(t);if(typeof n=="string"){const r=Q(this,is).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&Q(this,is).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ng(t);if(typeof n=="string"){const r=Q(this,is).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Ng(t);if(typeof n=="string"){const i=(r=Q(this,is).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Bn.batch(()=>{Q(this,ca).forEach(t=>{this.notify({type:"removed",mutation:t})}),Q(this,ca).clear(),Q(this,is).clear()})}getAll(){return Array.from(Q(this,ca))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>MM(n,r))}findAll(t={}){return this.getAll().filter(n=>MM(t,n))}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Bn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Er))))}},ca=new WeakMap,is=new WeakMap,bp=new WeakMap,kB);function Ng(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ua,bo,Vr,da,_a,dy,YN,EB,Ste=(EB=class extends yd{constructor(n,r){super();He(this,_a);He(this,ua);He(this,bo);He(this,Vr);He(this,da);Me(this,ua,n),this.setOptions(r),this.bindMethods(),vt(this,_a,dy).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=Q(this,ua).defaultMutationOptions(n),My(this.options,r)||Q(this,ua).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,Vr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Gl(r.mutationKey)!==Gl(this.options.mutationKey)?this.reset():((i=Q(this,Vr))==null?void 0:i.state.status)==="pending"&&Q(this,Vr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Q(this,Vr))==null||n.removeObserver(this)}onMutationUpdate(n){vt(this,_a,dy).call(this),vt(this,_a,YN).call(this,n)}getCurrentResult(){return Q(this,bo)}reset(){var n;(n=Q(this,Vr))==null||n.removeObserver(this),Me(this,Vr,void 0),vt(this,_a,dy).call(this),vt(this,_a,YN).call(this)}mutate(n,r){var i;return Me(this,da,r),(i=Q(this,Vr))==null||i.removeObserver(this),Me(this,Vr,Q(this,ua).getMutationCache().build(Q(this,ua),this.options)),Q(this,Vr).addObserver(this),Q(this,Vr).execute(n)}},ua=new WeakMap,bo=new WeakMap,Vr=new WeakMap,da=new WeakMap,_a=new WeakSet,dy=function(){var r;const n=((r=Q(this,Vr))==null?void 0:r.state)??Nq();Me(this,bo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},YN=function(n){Bn.batch(()=>{var r,i,s,a,l,c,d,h;if(Q(this,da)&&this.hasListeners()){const f=Q(this,bo).variables,m=Q(this,bo).context,g={client:Q(this,ua),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((i=(r=Q(this,da)).onSuccess)==null||i.call(r,n.data,f,m,g),(a=(s=Q(this,da)).onSettled)==null||a.call(s,n.data,null,f,m,g)):(n==null?void 0:n.type)==="error"&&((c=(l=Q(this,da)).onError)==null||c.call(l,n.error,f,m,g),(h=(d=Q(this,da)).onSettled)==null||h.call(d,void 0,n.error,f,m,g))}
vendor: 6,206 bytes, line 555
555this.listeners.forEach(f=>{f(Q(this,bo))})})},EB),Ps,TB,_te=(TB=class extends yd{constructor(t={}){super();He(this,Ps);this.config=t,Me(this,Ps,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??PA(i,n);let a=this.get(s);return a||(a=new gte({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){Q(this,Ps).has(t.queryHash)||(Q(this,Ps).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Q(this,Ps).get(t.queryHash);n&&(t.destroy(),n===t&&Q(this,Ps).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Bn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,Ps).get(t)}getAll(){return[...Q(this,Ps).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>OM(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>OM(t,r)):n}notify(t){Bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Bn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ps=new WeakMap,TB),mn,wo,jo,ku,Eu,So,Tu,Ou,OB,Nte=(OB=class{constructor(e={}){He(this,mn);He(this,wo);He(this,jo);He(this,ku);He(this,Eu);He(this,So);He(this,Tu);He(this,Ou);Me(this,mn,e.queryCache||new _te),Me(this,wo,e.mutationCache||new jte),Me(this,jo,e.defaultOptions||{}),Me(this,ku,new Map),Me(this,Eu,new Map),Me(this,So,0)}mount(){bg(this,So)._++,Q(this,So)===1&&(Me(this,Tu,kA.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,mn).onFocus())})),Me(this,Ou,Ry.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,mn).onOnline())})))}unmount(){var e,t;bg(this,So)._--,Q(this,So)===0&&((e=Q(this,Tu))==null||e.call(this),Me(this,Tu,void 0),(t=Q(this,Ou))==null||t.call(this),Me(this,Ou,void 0))}isFetching(e){return Q(this,mn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,wo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,mn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Q(this,mn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ao(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Q(this,mn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=Q(this,mn).get(r.queryHash),s=i==null?void 0:i.state.data,a=ate(t,s);if(a!==void 0)return Q(this,mn).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Bn.batch(()=>Q(this,mn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,mn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Q(this,mn);Bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Q(this,mn);return Bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Bn.batch(()=>Q(this,mn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Er).catch(Er)}invalidateQueries(e,t={}){return Bn.batch(()=>(Q(this,mn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Bn.batch(()=>Q(this,mn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Er)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Er)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Q(this,mn).build(this,t);return n.isStaleByTime(Ao(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Er).catch(Er)}fetchInfiniteQuery(e){return e.behavior=FM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Er).catch(Er)}ensureInfiniteQueryData(e){return e.behavior=FM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ry.isOnline()?Q(this,wo).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,mn)}getMutationCache(){return Q(this,wo)}getDefaultOptions(){return Q(this,jo)}setDefaultOptions(e){Me(this,jo,e)}setQueryDefaults(e,t){Q(this,ku).set(Gl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,ku).values()],n={};return t.forEach(r=>{xh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Q(this,Eu).set(Gl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,Eu).values()],n={};return t.forEach(r=>{xh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,jo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=PA(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===AA&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,jo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,mn).clear(),Q(this,wo).clear()}},mn=new WeakMap,wo=new WeakMap,jo=new WeakMap,ku=new WeakMap,Eu=new WeakMap,So=new WeakMap,Tu=new WeakMap,Ou=new WeakMap,OB),Cq=_.createContext(void 0),hn=e=>{const t=_.useContext(Cq);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Cte=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(Cq.Provider,{value:e,children:t})),Pq=_.createContext(!1),Pte=()=>_.useContext(Pq);Pq.Provider;function Ate(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
555var kte=_.createContext(Ate()),Ete=()=>_.useContext(kte),Tte=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ote=e=>{_.useEffect(()=>{e.clearReset()},[e])},Mte=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||xq(n,[e.error,r])),Rte=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Dte=(e,t)=>e.isLoading&&e.isFetching&&!t,Ite=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,qM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lte(e,t,n){var f,m,g,x,v;const r=Pte(),i=Ete(),s=hn(),a=s.defaultQueryOptions(e);(m=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,a),a._optimisticResults=r?"isRestoring":"optimistic",Rte(a),Tte(a,i),Ote(i);const l=!s.getQueryCache().get(a.queryHash),[c]=_.useState(()=>new t(s,a)),d=c.getOptimisticResult(a),h=!r&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(b=>{const j=h?c.subscribe(Bn.batchCalls(b)):Er;return c.updateResult(),j},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),_.useEffect(()=>{c.setOptions(a)},[a,c]),Ite(a,d))throw qM(a,c,i);if(Mte({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||x.call(g,a,d),a.experimental_prefetchInRender&&!Kl&&Dte(d,r)){const b=l?qM(a,c,i):(v=s.getQueryCache().get(a.queryHash))==null?void 0:v.promise;b==null||b.catch(Er).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function Ee(e,t){return Lte(e,yte)}function Ye(e,t){const n=hn(),[r]=_.useState(()=>new Ste(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const i=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(Bn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=_.useCallback((a,l)=>{r.mutate(a,l).catch(Er)},[r]);if(i.error&&xq(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const $te=new Nte({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function Fte(){const[e,t]=_.useState(!1),n=_.useRef(!1),[r,i]=_.useState(!1),s=_.useRef(!1),[a,l]=_.useState(!1),c=_.useRef(!1),d=_.useRef([]),h=_.useRef([]),f=_.useRef([]),m=_.useRef(null),g=(P=!1)=>{const D=document.createElement("div");return D.style.position="absolute",D.style.pointerEvents="none",D.style.transition="all 0.1s ease-in-out",D.style.zIndex="9999",P?D.style.border="2px solid #2563EB":(D.style.border="2px solid #95a5fc",D.style.backgroundColor="rgba(99, 102, 241, 0.05)"),D},x=(P,D,B=!1)=>{if(!D||!n.current)return;D.offsetWidth;const O=D.getBoundingClientRect();P.style.top=`${O.top+window.scrollY}px`,P.style.left=`${O.left+window.scrollX}px`,P.style.width=`${O.width}px`,P.style.height=`${O.height}px`;let M=P.querySelector("div");M||(M=document.createElement("div"),M.textContent=D.tagName.toLowerCase(),M.style.position="absolute",M.style.top="-27px",M.style.left="-2px",M.style.padding="2px 8px",M.style.fontSize="11px",M.style.fontWeight=B?"500":"400",M.style.color=B?"#ffffff":"#526cff",M.style.backgroundColor=B?"#526cff":"#DBEAFE",M.style.borderRadius="3px",M.style.boxShadow="none",M.style.minWidth="24px",M.style.textAlign="center",P.appendChild(M))},v=P=>{if(!P)return[];const D=[...document.querySelectorAll(`[data-source-location="${P}"]`)];return D.length>0?D:[...document.querySelectorAll(`[data-visual-selector-id="${P}"]`)]},b=()=>{d.current.forEach(P=>{P&&P.parentNode&&P.remove()}),d.current=[],f.current=[]},j=P=>{if(!n.current||s.current)return;if(c.current){b();return}if(P.target.tagName.toLowerCase()==="path"){b();return}const D=P.target.closest("[data-source-location], [data-visual-selector-id]");if(!D){b();return}const B=D.dataset.sourceLocation||D.dataset.visualSelectorId;if(D.dataset.sourceLocation,m.current===B){b();return}const O=v(B);b(),O.forEach(M=>{const $=g(!1);document.body.appendChild($),d.current.push($),x($,M)}),f.current=O},w=()=>{s.current||b()},N=P=>{var W;if(!n.current)return;if(c.current){P.preventDefault(),P.stopPropagation(),P.stopImmediatePropagation(),window.parent.postMessage({type:"close-dropdowns"},"*");return}if(P.target.tagName.toLowerCase()==="path")return;P.preventDefault(),P.stopPropagation(),P.stopImmediatePropagation();const D=P.target.closest("[data-source-location], [data-visual-selector-id]");if(!D)return;const B=D.dataset.sourceLocation||D.dataset.visualSelectorId;D.dataset.sourceLocation,h.current.forEach(q=>{q&&q.parentNode&&q.remove()}
555),h.current=[],v(B).forEach(q=>{const K=g(!0);document.body.appendChild(K),h.current.push(K),x(K,q,!0)}),m.current=B,b();const M=D.getBoundingClientRect(),$={top:M.top,left:M.left,right:M.right,bottom:M.bottom,width:M.width,height:M.height,centerX:M.left+M.width/2,centerY:M.top+M.height/2},F={type:"element-selected",tagName:D.tagName,classes:((W=D.className)==null?void 0:W.baseVal)||D.className||"",visualSelectorId:B,content:D.innerText,dataSourceLocation:D.dataset.sourceLocation,isDynamicContent:D.dataset.dynamicContent==="true",linenumber:D.dataset.linenumber,filename:D.dataset.filename,position:$};window.parent.postMessage(F,"*")},k=()=>{h.current.forEach(P=>{P&&P.parentNode&&P.remove()}),h.current=[],m.current=null},C=(P,D,B=!1)=>{const O=v(P);O.length!==0&&(O.forEach(M=>{var $;if(B)M.className=D;else{const F=(($=M.className)==null?void 0:$.baseVal)||M.className||"";M.className=cq(F,D)}}),setTimeout(()=>{var M,$;m.current===P&&h.current.forEach((F,W)=>{W<O.length&&x(F,O[W])}),f.current.length>0&&(($=(M=f.current[0])==null?void 0:M.dataset)==null?void 0:$.visualSelectorId)===P&&d.current.forEach((W,q)=>{q<f.current.length&&x(W,f.current[q])})},50))},A=(P,D)=>{const B=v(P);B.length!==0&&(B.forEach(O=>{O.innerText=D}),setTimeout(()=>{m.current===P&&h.current.forEach((O,M)=>{M<B.length&&x(O,B[M])})},50))},E=P=>{t(P),n.current=P,P?(document.body.style.cursor="crosshair",document.addEventListener("mouseover",j),document.addEventListener("mouseout",w),document.addEventListener("click",N,!0)):(b(),h.current.forEach(D=>{D&&D.parentNode&&D.remove()}),h.current=[],f.current=[],m.current=null,document.body.style.cursor="default",document.removeEventListener("mouseover",j),document.removeEventListener("mouseout",w),document.removeEventListener("click",N,!0))};return _.useEffect(()=>{document.querySelectorAll("[data-linenumber]:not([data-visual-selector-id])").forEach((O,M)=>{const $=`visual-id-${O.dataset.filename}-${O.dataset.linenumber}-${M}`;O.dataset.visualSelectorId=$});const D=()=>{if(m.current){const O=v(m.current);if(O.length>0){const $=O[0].getBoundingClientRect(),F=window.innerHeight,W=window.innerWidth,q=$.top<F&&$.bottom>0&&$.left<W&&$.right>0,K={top:$.top,left:$.left,right:$.right,bottom:$.bottom,width:$.width,height:$.height,centerX:$.left+$.width/2,centerY:$.top+$.height/2};window.parent.postMessage({type:"element-position-update",position:K,isInViewport:q,visualSelectorId:m.current},"*")}}},B=O=>{const M=O.data;switch(M.type){case"toggle-visual-edit-mode":E(M.data.enabled);break;case"update-classes":M.data&&M.data.classes!==void 0?C(M.data.visualSelectorId,M.data.classes,M.data.replace||!1):console.warn("[Agent] Invalid update-classes message:",M);break;case"unselect-element":k();break;case"refresh-page":window.location.reload();break;case"update-content":M.data&&M.data.content!==void 0?A(M.data.visualSelectorId,M.data.content):console.warn("[Agent] Invalid update-content message:",M);break;case"request-element-position":if(m.current){const $=v(m.current);if($.length>0){const W=$[0].getBoundingClientRect(),q=window.innerHeight,K=window.innerWidth,L=W.top<q&&W.bottom>0&&W.left<K&&W.right>0,H={top:W.top,left:W.left,right:W.right,bottom:W.bottom,width:W.width,height:W.height,centerX:W.left+W.width/2,centerY:W.top+W.height/2};window.parent.postMessage({type:"element-position-update",position:H,isInViewport:L,visualSelectorId:m.current},"*")}}break;case"popover-drag-state":M.data&&M.data.isDragging!==void 0&&(i(M.data.isDragging),s.current=M.data.isDragging,M.data.isDragging&&b());break;case"dropdown-state":M.data&&M.data.isOpen!==void 0&&(l(M.data.isOpen),c.current=M.data.isOpen,M.data.isOpen&&b());break}};return window.addEventListener("message",B),window.addEventListener("scroll",D,!0),document.addEventListener("scroll",D,!0),window.parent.postMessage({type:"visual-edit-agent-ready"},"*"),()=>{window.removeEventListener("message",B),window.removeEventListener("scroll",D,!0),document.removeEventListener("scroll",D,!0),document.removeEventListener("mouseover",j),document.removeEventListener("mouseout",w),document.removeEventListener("click",N,!0),b(),h.current.forEach(O=>{O&&O.parentNode&&O.remove()})}},[]),_.useEffect(()=>{n.current=e},[e]),_.useEffect(()=>{s.current=r},[r]),_.useEffect(()=>{c.current=a},[a]),_.useEffect(()=>{const P=()=>{if(m.current){const B=v(m.current);h.current.forEach((O,M)=>{M<B.length&&x(O,B[M])})}f.current.length>0&&d.current.forEach((B,O)=>{O<f.current.length&&x(B,f.current[O])})},D=new MutationObserver(B=>{B.some(M=>{const $=W=>
vendor: 4,376 bytes, lines 555-564
555{if(W.nodeType===Node.ELEMENT_NODE){if(W.dataset&&W.dataset.visualSelectorId)return!0;for(let q=0;q<W.children.length;q++)if($(W.children[q]))return!0}return!1};return M.type==="attributes"&&(M.attributeName==="style"||M.attributeName==="class"||M.attributeName==="width"||M.attributeName==="height")&&$(M.target)})&&setTimeout(P,50)});return D.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["style","class","width","height"]}),window.addEventListener("resize",P),window.addEventListener("scroll",P),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P),D.disconnect()}},[]),null}var Np=MB();const Bte=Ot(Np);/**
556 * @remix-run/router v1.23.0
557 *
558 * Copyright (c) Remix Software Inc.
559 *
560 * This source code is licensed under the MIT license found in the
561 * LICENSE.md file in the root directory of this source tree.
562 *
563 * @license MIT
564 */function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bh.apply(this,arguments)}var _o;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_o||(_o={}));const zM="popstate";function qte(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:a,hash:l}=r.location;return XN("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Dy(i)}return Ute(t,n,null,e)}function En(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Aq(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zte(){return Math.random().toString(36).substr(2,8)}function UM(e,t){return{usr:e.state,key:e.key,idx:t}}function XN(e,t,n,r){return n===void 0&&(n=null),bh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?vd(t):t,{state:n,key:t&&t.key||r||zte()})}function Dy(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function vd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ute(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,l=_o.Pop,c=null,d=h();d==null&&(d=0,a.replaceState(bh({},a.state,{idx:d}),""));function h(){return(a.state||{idx:null}).idx}function f(){l=_o.Pop;let b=h(),j=b==null?null:b-d;d=b,c&&c({action:l,location:v.location,delta:j})}function m(b,j){l=_o.Push;let w=XN(v.location,b,j);d=h()+1;let N=UM(w,d),k=v.createHref(w);try{a.pushState(N,"",k)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(k)}s&&c&&c({action:l,location:v.location,delta:1})}function g(b,j){l=_o.Replace;let w=XN(v.location,b,j);d=h();let N=UM(w,d),k=v.createHref(w);a.replaceState(N,"",k),s&&c&&c({action:l,location:v.location,delta:0})}function x(b){let j=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof b=="string"?b:Dy(b);return w=w.replace(/ $/,"%20"),En(j,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,j)}let v={get action(){return l},get location(){return e(i,a)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(zM,f),c=b,()=>{i.removeEventListener(zM,f),c=null}},createHref(b){return t(i,b)},createURL:x,encodeLocation(b){let j=x(b);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:m,replace:g,go(b){return a.go(b)}};return v}var VM;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(VM||(VM={}));function Vte(e,t,n){return n===void 0&&(n="/"),Wte(e,t,n)}function Wte(e,t,n,r){let i=typeof t=="string"?vd(t):t,s=TA(i.pathname||"/",n);if(s==null)return null;let a=kq(e);Hte(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let d=ine(s);l=tne(a[c],d)}return l}function kq(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(En(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
564id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=ko([r,c.relativePath]),h=n.concat(c);s.children&&s.children.length>0&&(En(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),kq(s.children,t,h,d)),!(s.path==null&&!s.index)&&t.push({path:d,score:Zte(d,s.index),routesMeta:h})};return e.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let c of Eq(s.path))i(s,a,c)}),t}function Eq(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=Eq(r.join("/")),l=[];return l.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Hte(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ene(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kte=/^:[\w-]+$/,Gte=3,Yte=2,Xte=1,Qte=10,Jte=-2,WM=e=>e==="*";function Zte(e,t){let n=e.split("/"),r=n.length;return n.some(WM)&&(r+=Jte),t&&(r+=Yte),n.filter(i=>!WM(i)).reduce((i,s)=>i+(Kte.test(s)?Gte:s===""?Xte:Qte),r)}function ene(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function tne(e,t,n){let{routesMeta:r}=e,i={},s="/",a=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,h=s==="/"?t:t.slice(s.length)||"/",f=nne({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),m=c.route;if(!f)return null;
vendor: 9,474 bytes, lines 564-573
564Object.assign(i,f.params),a.push({params:i,pathname:ko([s,f.pathname]),pathnameBase:lne(ko([s,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(s=ko([s,f.pathnameBase]))}return a}function nne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=rne(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((d,h,f)=>{let{paramName:m,isOptional:g}=h;if(m==="*"){let v=l[f]||"";a=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const x=l[f];return g&&!x?d[m]=void 0:d[m]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:a,pattern:e}}function rne(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Aq(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ine(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Aq(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function TA(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function sne(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?vd(e):e;return{pathname:n?n.startsWith("/")?n:ane(n,t):t,search:cne(r),hash:une(i)}}function ane(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ew(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function one(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Tq(e,t){let n=one(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Oq(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=vd(e):(i=bh({},e),En(!i.pathname||!i.pathname.includes("?"),Ew("?","pathname","search",i)),En(!i.pathname||!i.pathname.includes("#"),Ew("#","pathname","hash",i)),En(!i.search||!i.search.includes("#"),Ew("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),f-=1;i.pathname=m.join("/")}l=f>=0?t[f]:"/"}let c=sne(i,l),d=a&&a!=="/"&&a.endsWith("/"),h=(s||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}const ko=e=>e.join("/").replace(/\/\/+/g,"/"),lne=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cne=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,une=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function dne(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Mq=["post","put","patch","delete"];new Set(Mq);const fne=["get",...Mq];new Set(fne);/**
565 * React Router v6.30.1
566 *
567 * Copyright (c) Remix Software Inc.
568 *
569 * This source code is licensed under the MIT license found in the
570 * LICENSE.md file in the root directory of this source tree.
571 *
572 * @license MIT
573 */function wh(){return wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wh.apply(this,arguments)}const OA=_.createContext(null),hne=_.createContext(null),ac=_.createContext(null),ux=_.createContext(null),oc=_.createContext({outlet:null,matches:[],isDataRoute:!1}),Rq=_.createContext(null);function pne(e,t){let{relative:n}=t===void 0?{}:t;Cp()||En(!1);let{basename:r,navigator:i}=_.useContext(ac),{hash:s,pathname:a,search:l}=Lq(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:ko([r,a])),i.createHref({pathname:c,search:l,hash:s})}function Cp(){return _.useContext(ux)!=null}function xd(){return Cp()||En(!1),_.useContext(ux).location}function Dq(e){_.useContext(ac).static||_.useLayoutEffect(e)}function Iq(){let{isDataRoute:e}=_.useContext(oc);return e?Pne():mne()}function mne(){Cp()||En(!1);let e=_.useContext(OA),{basename:t,future:n,navigator:r}=_.useContext(ac),{matches:i}=_.useContext(oc),{pathname:s}=xd(),a=JSON.stringify(Tq(i,n.v7_relativeSplatPath)),l=_.useRef(!1);return Dq(()=>{l.current=!0}),_.useCallback(function(d,h){if(h===void 0&&(h={}),!l.current)return;if(typeof d=="number"){r.go(d);return}let f=Oq(d,JSON.parse(a),s,h.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ko([t,f.pathname])),(h.replace?r.replace:r.push)(f,h.state,h)},[t,r,a,s,e])}function Lq(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=_.useContext(ac),{matches:i}=_.useContext(oc),{pathname:s}=xd(),a=JSON.stringify(Tq(i,r.v7_relativeSplatPath));return _.useMemo(()=>Oq(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function gne(e,t){return yne(e,t)}function yne(e,t,n,r){Cp()||En(!1);let{navigator:i}=_.useContext(ac),{matches:s}=_.useContext(oc),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let d=xd(),h;if(t){var f;let b=typeof t=="string"?vd(t):t;c==="/"||(f=b.pathname)!=null&&f.startsWith(c)||En(!1),h=b}else h=d;let m=h.pathname||"/",g=m;if(c!=="/"){let b=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let x=Vte(e,{pathname:g}),v=jne(x&&x.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:ko([c,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:ko([c,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&v?_.createElement(ux.Provider,{value:{location:wh({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:_o.Pop}},v):v}function vne(){let e=Cne(),t=dne(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:i},n):null,null)}const xne=_.createElement(vne,null);class bne extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?_.createElement(oc.Provider,{value:this.props.routeContext},_.createElement(Rq.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wne(e){let{routeContext:t,match:n,children:r}=e,i=_.useContext(OA);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(oc.Provider,{value:t},r)}function jne(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let h=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);h>=0||En(!1),a=a.slice(0,Math.min(a.length,h+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<a.length;h++){let f=a[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(d=h),f.route.id){let{loaderData:m,errors:g}=n,x=f.route.loader&&m[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||x){c=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((h,f,m)=>{let g,x=!1,v=null,b=null;n&&(g=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||xne,c&&(d<0&&m===0?(Ane("route-fallback"),x=!0,b=null):d===m&&(x=!0,b=f.route.hydrateFallbackElement||null)));let j=t.concat(a.slice(0,m+1)),w=()=>{let N;return g?N=v:x?N=b:f.route.Component?N=_.createElement(f.route.Component,null):f.route.element?N=f.route.element:N=h,_.createElement(wne,{match:f,routeContext:{outlet:h,matches:j,isDataRoute:n!=null},children:N})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?_.createElement(bne,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:w(),routeC
573ontext:{outlet:null,matches:j,isDataRoute:!0}}):w()},null)}var $q=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})($q||{}),Fq=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Fq||{});function Sne(e){let t=_.useContext(OA);return t||En(!1),t}function _ne(e){let t=_.useContext(hne);return t||En(!1),t}function Nne(e){let t=_.useContext(oc);return t||En(!1),t}function Bq(e){let t=Nne(),n=t.matches[t.matches.length-1];return n.route.id||En(!1),n.route.id}function Cne(){var e;let t=_.useContext(Rq),n=_ne(),r=Bq();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Pne(){let{router:e}=Sne($q.UseNavigateStable),t=Bq(Fq.UseNavigateStable),n=_.useRef(!1);return Dq(()=>{n.current=!0}),_.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,wh({fromRouteId:t},s)))},[e,t])}const HM={};function Ane(e,t,n){HM[e]||(HM[e]=!0)}function kne(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function fy(e){En(!1)}function Ene(e){let{basename:t="/",children:n=null,location:r,navigationType:i=_o.Pop,navigator:s,static:a=!1,future:l}=e;Cp()&&En(!1);let c=t.replace(/^\/*/,"/"),d=_.useMemo(()=>({basename:c,navigator:s,static:a,future:wh({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof r=="string"&&(r=vd(r));let{pathname:h="/",search:f="",hash:m="",state:g=null,key:x="default"}=r,v=_.useMemo(()=>{let b=TA(h,c);return b==null?null:{location:{pathname:b,search:f,hash:m,state:g,key:x},navigationType:i}},[c,h,f,m,g,x,i]);return v==null?null:_.createElement(ac.Provider,{value:d},_.createElement(ux.Provider,{children:n,value:v}))}function Tne(e){let{children:t,location:n}=e;return gne(QN(t),n)}new Promise(()=>{});function QN(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,i)=>{if(!_.isValidElement(r))return;let s=[...t,i];if(r.type===_.Fragment){n.push.apply(n,QN(r.props.children,s));return}r.type!==fy&&En(!1),!r.props.index||!r.props.children||En(!1);let a={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=QN(r.props.children,s)),n.push(a)}),n}/**
574 * React Router DOM v6.30.1
575 *
576 * Copyright (c) Remix Software Inc.
577 *
578 * This source code is licensed under the MIT license found in the
579 * LICENSE.md file in the root directory of this source tree.
580 *
581 * @license MIT
582 */function JN(){return JN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JN.apply(this,arguments)}function One(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Mne(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Rne(e,t){return e.button===0&&(!t||t==="_self")&&!Mne(e)}const Dne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ine="6";try{window.__reactRouterVersion=Ine}catch{}const Lne="startTransition",KM=wA[Lne];function $ne(e){let{basename:t,children:n,future:r,window:i}=e,s=_.useRef();s.current==null&&(s.current=qte({window:i,v5Compat:!0}));let a=s.current,[l,c]=_.useState({action:a.action,location:a.location}),{v7_startTransition:d}=r||{},h=_.useCallback(f=>{d&&KM?KM(()=>c(f)):c(f)},[c,d]);return _.useLayoutEffect(()=>a.listen(h),[a,h]),_.useEffect(()=>kne(r),[r]),_.createElement(Ene,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const Fne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,du=_.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:d,preventScrollReset:h,viewTransition:f}=t,m=One(t,Dne),{basename:g}=_.useContext(ac),x,v=!1;
vendor: 4,416 bytes, line 582
582if(typeof d=="string"&&Bne.test(d)&&(x=d,Fne))try{let N=new URL(window.location.href),k=d.startsWith("//")?new URL(N.protocol+d):new URL(d),C=TA(k.pathname,g);k.origin===N.origin&&C!=null?d=C+k.search+k.hash:v=!0}catch{}let b=pne(d,{relative:i}),j=qne(d,{replace:a,state:l,target:c,preventScrollReset:h,relative:i,viewTransition:f});function w(N){r&&r(N),N.defaultPrevented||j(N)}return _.createElement("a",JN({},m,{href:x||b,onClick:v||s?r:w,ref:n,target:c}))});var GM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(GM||(GM={}));var YM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(YM||(YM={}));function qne(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,viewTransition:l}=t===void 0?{}:t,c=Iq(),d=xd(),h=Lq(e,{relative:a});return _.useCallback(f=>{if(Rne(f,n)){f.preventDefault();let m=r!==void 0?r:Dy(d)===Dy(h);c(e,{replace:m,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[d,c,h,r,i,n,e,s,a,l])}function qq(e,t){return function(){return e.apply(t,arguments)}}const{toString:zne}=Object.prototype,{getPrototypeOf:MA}=Object,{iterator:dx,toStringTag:zq}=Symbol,fx=(e=>t=>{const n=zne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ps=e=>(e=e.toLowerCase(),t=>fx(t)===e),hx=e=>t=>typeof t===e,{isArray:bd}=Array,Mu=hx("undefined");function Pp(e){return e!==null&&!Mu(e)&&e.constructor!==null&&!Mu(e.constructor)&&Gr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Uq=ps("ArrayBuffer");function Une(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Uq(e.buffer),t}const Vne=hx("string"),Gr=hx("function"),Vq=hx("number"),Ap=e=>e!==null&&typeof e=="object",Wne=e=>e===!0||e===!1,hy=e=>{if(fx(e)!=="object")return!1;const t=MA(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zq in e)&&!(dx in e)},Hne=e=>{if(!Ap(e)||Pp(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Kne=ps("Date"),Gne=ps("File"),Yne=ps("Blob"),Xne=ps("FileList"),Qne=e=>Ap(e)&&Gr(e.pipe),Jne=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Gr(e.append)&&((t=fx(e))==="formdata"||t==="object"&&Gr(e.toString)&&e.toString()==="[object FormData]"))},Zne=ps("URLSearchParams"),[ere,tre,nre,rre]=["ReadableStream","Request","Response","Headers"].map(ps),ire=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kp(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),bd(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Pp(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let l;for(r=0;r<a;r++)l=s[r],t.call(null,e[l],l,e)}}function Wq(e,t){if(Pp(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const _l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hq=e=>!Mu(e)&&e!==_l;function ZN(){const{caseless:e,skipUndefined:t}=Hq(this)&&this||{},n={},r=(i,s)=>{const a=e&&Wq(n,s)||s;hy(n[a])&&hy(i)?n[a]=ZN(n[a],i):hy(i)?n[a]=ZN({},i):bd(i)?n[a]=i.slice():(!t||!Mu(i))&&(n[a]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&kp(arguments[i],r);return n}const sre=(e,t,n,{allOwnKeys:r}={})=>(kp(t,(i,s)=>{n&&Gr(i)?e[s]=qq(i,n):e[s]=i},{allOwnKeys:r}),e),are=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ore=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},lre=(e,t,n,r)=>{let i,s,a;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&MA(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},cre=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ure=e=>{if(!e)return null;if(bd(e))return e;let t=e.length;if(!Vq(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&MA(Uint8Array)),fre=(e,t)=>
vendor: 4,201 bytes, line 582
582{const r=(e&&e[dx]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},hre=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},pre=ps("HTMLFormElement"),mre=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),XM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gre=ps("RegExp"),Kq=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};kp(n,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(r[s]=a||i)}),Object.defineProperties(e,r)},yre=e=>{Kq(e,(t,n)=>{if(Gr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Gr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},vre=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return bd(e)?r(e):r(String(e).split(t)),n},xre=()=>{},bre=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wre(e){return!!(e&&Gr(e.append)&&e[zq]==="FormData"&&e[dx])}const jre=e=>{const t=new Array(10),n=(r,i)=>{if(Ap(r)){if(t.indexOf(r)>=0)return;if(Pp(r))return r;if(!("toJSON"in r)){t[i]=r;const s=bd(r)?[]:{};return kp(r,(a,l)=>{const c=n(a,i+1);!Mu(c)&&(s[l]=c)}),t[i]=void 0,s}}return r};return n(e,0)},Sre=ps("AsyncFunction"),_re=e=>e&&(Ap(e)||Gr(e))&&Gr(e.then)&&Gr(e.catch),Gq=((e,t)=>e?setImmediate:t?((n,r)=>(_l.addEventListener("message",({source:i,data:s})=>{i===_l&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),_l.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Gr(_l.postMessage)),Nre=typeof queueMicrotask<"u"?queueMicrotask.bind(_l):typeof process<"u"&&process.nextTick||Gq,Cre=e=>e!=null&&Gr(e[dx]),ce={isArray:bd,isArrayBuffer:Uq,isBuffer:Pp,isFormData:Jne,isArrayBufferView:Une,isString:Vne,isNumber:Vq,isBoolean:Wne,isObject:Ap,isPlainObject:hy,isEmptyObject:Hne,isReadableStream:ere,isRequest:tre,isResponse:nre,isHeaders:rre,isUndefined:Mu,isDate:Kne,isFile:Gne,isBlob:Yne,isRegExp:gre,isFunction:Gr,isStream:Qne,isURLSearchParams:Zne,isTypedArray:dre,isFileList:Xne,forEach:kp,merge:ZN,extend:sre,trim:ire,stripBOM:are,inherits:ore,toFlatObject:lre,kindOf:fx,kindOfTest:ps,endsWith:cre,toArray:ure,forEachEntry:fre,matchAll:hre,isHTMLForm:pre,hasOwnProperty:XM,hasOwnProp:XM,reduceDescriptors:Kq,freezeMethods:yre,toObjectSet:vre,toCamelCase:mre,noop:xre,toFiniteNumber:bre,findKey:Wq,global:_l,isContextDefined:Hq,isSpecCompliantForm:wre,toJSONObject:jre,isAsyncFn:Sre,isThenable:_re,setImmediate:Gq,asap:Nre,isIterable:Cre};function ft(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ce.inherits(ft,Error,{toJSON:function(){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}}});const Yq=ft.prototype,Xq={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xq[e]={value:e}});Object.defineProperties(ft,Xq);Object.defineProperty(Yq,"isAxiosError",{value:!0});ft.from=(e,t,n,r,i,s)=>{const a=Object.create(Yq);ce.toFlatObject(e,a,function(h){return h!==Error.prototype},d=>d!=="isAxiosError");const l=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return ft.call(a,l,c,n,r,i),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const Pre=null;function eC(e){return ce.isPlainObject(e)||ce.isArray(e)}function Qq(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function QM(e,t,n){return e?e.concat(t).map(function(i,s){return i=Qq(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Are(e){return ce.isArray(e)&&!e.some(eC)}const kre=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});
vendor: 4,223 bytes, line 582
582function px(e,t,n){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!ce.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||h,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(i))throw new TypeError("visitor must be a function");function d(x){if(x===null)return"";if(ce.isDate(x))return x.toISOString();if(ce.isBoolean(x))return x.toString();if(!c&&ce.isBlob(x))throw new ft("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(x)||ce.isTypedArray(x)?c&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function h(x,v,b){let j=x;if(x&&!b&&typeof x=="object"){if(ce.endsWith(v,"{}"))v=r?v:v.slice(0,-2),x=JSON.stringify(x);else if(ce.isArray(x)&&Are(x)||(ce.isFileList(x)||ce.endsWith(v,"[]"))&&(j=ce.toArray(x)))return v=Qq(v),j.forEach(function(N,k){!(ce.isUndefined(N)||N===null)&&t.append(a===!0?QM([v],k,s):a===null?v:v+"[]",d(N))}),!1}return eC(x)?!0:(t.append(QM(b,v,s),d(x)),!1)}const f=[],m=Object.assign(kre,{defaultVisitor:h,convertValue:d,isVisitable:eC});function g(x,v){if(!ce.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(x),ce.forEach(x,function(j,w){(!(ce.isUndefined(j)||j===null)&&i.call(t,j,ce.isString(w)?w.trim():w,v,m))===!0&&g(j,v?v.concat(w):[w])}),f.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return g(e),t}function JM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function RA(e,t){this._pairs=[],e&&px(e,this,t)}const Jq=RA.prototype;Jq.append=function(t,n){this._pairs.push([t,n])};Jq.toString=function(t){const n=t?function(r){return t.call(this,r,JM)}:JM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ere(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zq(e,t,n){if(!t)return e;const r=n&&n.encode||Ere;ce.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=ce.isURLSearchParams(t)?t.toString():new RA(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ZM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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(r){r!==null&&t(r)})}}const ez={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tre=typeof URLSearchParams<"u"?URLSearchParams:RA,Ore=typeof FormData<"u"?FormData:null,Mre=typeof Blob<"u"?Blob:null,Rre={isBrowser:!0,classes:{URLSearchParams:Tre,FormData:Ore,Blob:Mre},protocols:["http","https","file","blob","url","data"]},DA=typeof window<"u"&&typeof document<"u",tC=typeof navigator=="object"&&navigator||void 0,Dre=DA&&(!tC||["ReactNative","NativeScript","NS"].indexOf(tC.product)<0),Ire=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lre=DA&&window.location.href||"http://localhost",$re=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:DA,hasStandardBrowserEnv:Dre,hasStandardBrowserWebWorkerEnv:Ire,navigator:tC,origin:Lre},Symbol.toStringTag,{value:"Module"})),yr={...$re,...Rre};function Fre(e,t){return px(e,new yr.classes.URLSearchParams,{visitor:function(n,r,i,s){return yr.isNode&&ce.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Bre(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qre(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function tz(e){function t(n,r,i,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=s>=n.length;return a=!a&&ce.isArray(i)?i.length:a,c?(ce.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!ce.isObject(i[a]))&&
vendor: 5,412 bytes, lines 582-584
582(i[a]=[]),t(n,r,i[a],s)&&ce.isArray(i[a])&&(i[a]=qre(i[a])),!l)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const n={};return ce.forEachEntry(e,(r,i)=>{t(Bre(r),i,n,0)}),n}return null}function zre(e,t,n){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ep={transitional:ez,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ce.isObject(t);if(s&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return i?JSON.stringify(tz(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fre(t,this.formSerializer).toString();if((l=ce.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return px(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),zre(t)):t}],transformResponse:[function(t){const n=this.transitional||Ep.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(l){if(a)throw l.name==="SyntaxError"?ft.from(l,ft.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:yr.classes.FormData,Blob:yr.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=>{Ep.headers[e]={}});const Ure=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"]),Vre=e=>{const t={};let n,r,i;return e&&e.split(`
583`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Ure[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},eR=Symbol("internals");function _f(e){return e&&String(e).trim().toLowerCase()}function py(e){return e===!1||e==null?e:ce.isArray(e)?e.map(py):String(e)}function Wre(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Hre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Tw(e,t,n,r,i){if(ce.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ce.isString(t)){if(ce.isString(r))return t.indexOf(r)!==-1;if(ce.isRegExp(r))return r.test(t)}}function Kre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Gre(e,t){const n=ce.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,a){return this[r].call(this,t,i,s,a)},configurable:!0})})}let Yr=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(l,c,d){const h=_f(c);if(!h)throw new Error("header name must be a non-empty string");const f=ce.findKey(i,h);(!f||i[f]===void 0||d===!0||d===void 0&&i[f]!==!1)&&(i[f||c]=py(l))}const a=(l,c)=>ce.forEach(l,(d,h)=>s(d,h,c));if(ce.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(ce.isString(t)&&(t=t.trim())&&!Hre(t))a(Vre(t),n);else if(ce.isObject(t)&&ce.isIterable(t)){let l={},c,d;for(const h of t){if(!ce.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[d=h[0]]=(c=l[d])?ce.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(l,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=_f(t),t){const r=ce.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Wre(i);if(ce.isFunction(n))return n.call(this,i,r);if(ce.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_f(t),t){const r=ce.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Tw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(a){if(a=_f(a),a){const l=ce.findKey(r,a);l&&(!n||Tw(r,r[l],l,n))&&(delete r[l],i=!0)}}return ce.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Tw(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return ce.forEach(this,(i,s)=>{const a=ce.findKey(r,s);if(a){n[a]=py(i),delete n[s];return}const l=t?Kre(s):String(s).trim();l!==s&&delete n[s],n[l]=py(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ce.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ce.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
584`)}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,...n){const r=new this(t);
vendor: 8,314 bytes, line 584
584return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[eR]=this[eR]={accessors:{}}).accessors,i=this.prototype;function s(a){const l=_f(a);r[l]||(Gre(i,a),r[l]=!0)}return ce.isArray(t)?t.forEach(s):s(t),this}};Yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(Yr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ce.freezeMethods(Yr);function Ow(e,t){const n=this||Ep,r=t||n,i=Yr.from(r.headers);let s=r.data;return ce.forEach(e,function(l){s=l.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function nz(e){return!!(e&&e.__CANCEL__)}function wd(e,t,n){ft.call(this,e??"canceled",ft.ERR_CANCELED,t,n),this.name="CanceledError"}ce.inherits(wd,ft,{__CANCEL__:!0});function rz(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ft("Request failed with status code "+n.status,[ft.ERR_BAD_REQUEST,ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yre(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Xre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),h=r[s];a||(a=d),n[i]=c,r[i]=d;let f=s,m=0;for(;f!==i;)m+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-a<t)return;const g=h&&d-h;return g?Math.round(m*1e3/g):void 0}}function Qre(e,t){let n=0,r=1e3/t,i,s;const a=(d,h=Date.now())=>{n=h,i=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const h=Date.now(),f=h-n;f>=r?a(d,h):(i=d,s||(s=setTimeout(()=>{s=null,a(i)},r-f)))},()=>i&&a(i)]}const Iy=(e,t,n=3)=>{let r=0;const i=Xre(50,250);return Qre(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,c=a-r,d=i(c),h=a<=l;r=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&h?(l-a)/d:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},tR=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nR=e=>(...t)=>ce.asap(()=>e(...t)),Jre=yr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,yr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(yr.origin),yr.navigator&&/(msie|trident)/i.test(yr.navigator.userAgent)):()=>!0,Zre=yr.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const a=[e+"="+encodeURIComponent(t)];ce.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ce.isString(r)&&a.push("path="+r),ce.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function eie(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tie(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function iz(e,t,n){let r=!eie(t);return e&&(r||n==!1)?tie(e,t):t}const rR=e=>e instanceof Yr?{...e}:e;function Yl(e,t){t=t||{};const n={};function r(d,h,f,m){return ce.isPlainObject(d)&&ce.isPlainObject(h)?ce.merge.call({caseless:m},d,h):ce.isPlainObject(h)?ce.merge({},h):ce.isArray(h)?h.slice():h}function i(d,h,f,m){if(ce.isUndefined(h)){if(!ce.isUndefined(d))return r(void 0,d,f,m)}else return r(d,h,f,m)}function s(d,h){if(!ce.isUndefined(h))return r(void 0,h)}function a(d,h){if(ce.isUndefined(h)){if(!ce.isUndefined(d))return r(void 0,d)}else return r(void 0,h)}function l(d,h,f){if(f in t)return r(d,h);if(f in e)return r(void 0,d)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(d,h,f)=>i(rR(d),rR(h),f,!0)};return ce.forEach(Object.keys({...e,...t}),function(h){const f=c[h]||i,m=f(e[h],t[h],h);ce.isUndefined(m)&&f!==l||(n[h]=m)}),n}const sz=e=>{const t=Yl({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:l}=t;if(t.headers=a=Yr.from(a),t.url=Zq(iz(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ce.isFormData(n)){if(yr.hasStandardBrowserEnv||yr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(ce.isFunction(n.getHeaders)){const c=n.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([h,f])=>{d.includes(h.toLowerCase())&&a.set(h,f)})}}if(yr.hasStandardBrowserEnv&&(r&&ce.isFunction(r)&&(r=r(t)),r||r!==!1&&Jre(t.url))){const c=i&&s&&Zre.read(s);c&&a.set(i,c)}return t},nie=typeof XMLHttpRequest<"u",rie=nie&&function(e){return new Promise(function(n,r){const i=sz(e);let s=i.data;const a=Yr.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=i,h,f,m,g,x;function v(){g&&g(),x&&x(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function j(){if(!b)return;const N=Yr.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:e,request:b};rz(function(E){n(E),v()},function(E){r(E),v()},C),b=null}"onloadend"in b?b.onloadend=j:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(j)},b.onabort=function(){b&&(r(new ft("Request aborted",ft.ECONNABORTED,e,b)),b=null)},b.onerror=function(k){const C=k&&k.message?k.message:"Network Error",A=new ft(C,ft.ERR_NETWORK,e,b);A.event=k||null,r(A),b=null},b.ontimeout=function(){let k=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||ez;i.timeoutErrorMessage&&(k=i.timeoutErrorMessage),r(new ft(k,C.clarifyTimeoutError?ft.ETIMEDOUT:ft.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&ce.forEach(a.toJSON(),function(k,C){b.setRequestHeader(C,k)}),ce.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),l&&l!=="json"&&(b.responseType=i.responseType),d&&([m,x]=Iy(d,!0),b.addEventListener("progress",m)),c&&b.upload&&([f,g]=Iy(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(h=N=>{b&&(r(!N||N.type?new wd(null,e,b):N),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const w=Yre(i.url);if(w&&yr.protocols.indexOf(w)===-1){r(new ft("Unsupported protocol "+w+":",ft.ERR_BAD_REQUEST,e));return}b.send(s||null)})},iie=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(d){if(!i){i=!0,l();const h=d instanceof Error?d:this.reason;r.abort(h instanceof ft?h:new wd(h instanceof Error?h.message:h))}};let a=t&&setTimeout(()=>{a=null,s(new ft(`timeout ${t} of ms exceeded`,ft.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>ce.asap(l),c}},sie=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},aie=async function*(e,t){for await(const n of oie(e))yield*sie(n,t)},oie=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},iR=(e,t,n,r)=>{const i=aie(e,t);let s=0,a,l=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:h}=await i.next();if(d){l(),c.close();return}let f=h.byteLength;if(n){let m=s+=f;n(m)}c.enqueue(new Uint8Array(h))}catch(d){throw l(d),d}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},sR=64*1024,{isFunction:Cg}=ce,lie=(({Request:e,Response:t})=>({Request:e,Response:t}
vendor: 9,209 bytes, lines 584-587
584))(ce.global),{ReadableStream:aR,TextEncoder:oR}=ce.global,lR=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cie=e=>{e=ce.merge.call({skipUndefined:!0},lie,e);const{fetch:t,Request:n,Response:r}=e,i=t?Cg(t):typeof fetch=="function",s=Cg(n),a=Cg(r);if(!i)return!1;const l=i&&Cg(aR),c=i&&(typeof oR=="function"?(x=>v=>x.encode(v))(new oR):async x=>new Uint8Array(await new n(x).arrayBuffer())),d=s&&l&&lR(()=>{let x=!1;const v=new n(yr.origin,{body:new aR,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!v}),h=a&&l&&lR(()=>ce.isReadableStream(new r("").body)),f={stream:h&&(x=>x.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!f[x]&&(f[x]=(v,b)=>{let j=v&&v[x];if(j)return j.call(v);throw new ft(`Response type '${x}' is not supported`,ft.ERR_NOT_SUPPORT,b)})});const m=async x=>{if(x==null)return 0;if(ce.isBlob(x))return x.size;if(ce.isSpecCompliantForm(x))return(await new n(yr.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(x)||ce.isArrayBuffer(x))return x.byteLength;if(ce.isURLSearchParams(x)&&(x=x+""),ce.isString(x))return(await c(x)).byteLength},g=async(x,v)=>{const b=ce.toFiniteNumber(x.getContentLength());return b??m(v)};return async x=>{let{url:v,method:b,data:j,signal:w,cancelToken:N,timeout:k,onDownloadProgress:C,onUploadProgress:A,responseType:E,headers:P,withCredentials:D="same-origin",fetchOptions:B}=sz(x),O=t||fetch;E=E?(E+"").toLowerCase():"text";let M=iie([w,N&&N.toAbortSignal()],k),$=null;const F=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let W;try{if(A&&d&&b!=="get"&&b!=="head"&&(W=await g(P,j))!==0){let V=new n(v,{method:"POST",body:j,duplex:"half"}),G;if(ce.isFormData(j)&&(G=V.headers.get("content-type"))&&P.setContentType(G),V.body){const[z,oe]=tR(W,Iy(nR(A)));j=iR(V.body,sR,z,oe)}}ce.isString(D)||(D=D?"include":"omit");const q=s&&"credentials"in n.prototype,K={...B,signal:M,method:b.toUpperCase(),headers:P.normalize().toJSON(),body:j,duplex:"half",credentials:q?D:void 0};$=s&&new n(v,K);let L=await(s?O($,B):O(v,K));const H=h&&(E==="stream"||E==="response");if(h&&(C||H&&F)){const V={};["status","statusText","headers"].forEach(pe=>{V[pe]=L[pe]});const G=ce.toFiniteNumber(L.headers.get("content-length")),[z,oe]=C&&tR(G,Iy(nR(C),!0))||[];L=new r(iR(L.body,sR,z,()=>{oe&&oe(),F&&F()}),V)}E=E||"text";let I=await f[ce.findKey(f,E)||"text"](L,x);return!H&&F&&F(),await new Promise((V,G)=>{rz(V,G,{data:I,headers:Yr.from(L.headers),status:L.status,statusText:L.statusText,config:x,request:$})})}catch(q){throw F&&F(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new ft("Network Error",ft.ERR_NETWORK,x,$),{cause:q.cause||q}):ft.from(q,q&&q.code,x,$)}}},uie=new Map,az=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let a=s.length,l=a,c,d,h=uie;for(;l--;)c=s[l],d=h.get(c),d===void 0&&h.set(c,d=l?new Map:cie(t)),h=d;return d};az();const nC={http:Pre,xhr:rie,fetch:{get:az}};ce.forEach(nC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cR=e=>`- ${e}`,die=e=>ce.isFunction(e)||e===null||e===!1,oz={getAdapter:(e,t)=>{e=ce.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let a=0;a<n;a++){r=e[a];let l;if(i=r,!die(r)&&(i=nC[(l=String(r)).toLowerCase()],i===void 0))throw new ft(`Unknown adapter '${l}'`);if(i&&(ce.isFunction(i)||(i=i.get(t))))break;s[l||"#"+a]=i}if(!i){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=n?a.length>1?`since :
585`+a.map(cR).join(`
586`):" "+cR(a[0]):"as no adapter specified";throw new ft("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i},adapters:nC};function Mw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wd(null,e)}function uR(e){return Mw(e),e.headers=Yr.from(e.headers),e.data=Ow.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),oz.getAdapter(e.adapter||Ep.adapter,e)(e).then(function(r){return Mw(e),r.data=Ow.call(e,e.transformResponse,r),r.headers=Yr.from(r.headers),r},function(r){return nz(r)||(Mw(e),r&&r.response&&(r.response.data=Ow.call(e,e.transformResponse,r.response),r.response.headers=Yr.from(r.response.headers))),Promise.reject(r)})}const lz="1.12.2",mx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dR={};mx.transitional=function(t,n,r){function i(s,a){return"[Axios v"+lz+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,l)=>{if(t===!1)throw new ft(i(a," has been removed"+(n?" in "+n:"")),ft.ERR_DEPRECATED);return n&&!dR[a]&&(dR[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,l):!0}};mx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function fie(e,t,n){if(typeof e!="object")throw new ft("options must be an object",ft.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],a=t[s];if(a){const l=e[s],c=l===void 0||a(l,s,e);if(c!==!0)throw new ft("option "+s+" must be "+c,ft.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ft("Unknown option "+s,ft.ERR_BAD_OPTION)}}const my={assertOptions:fie,validators:mx},Ss=my.validators;let Bl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ZM,response:new ZM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
587`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yl(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&my.assertOptions(r,{silentJSONParsing:Ss.transitional(Ss.boolean),forcedJSONParsing:Ss.transitional(Ss.boolean),clarifyTimeoutError:Ss.transitional(Ss.boolean)},!1),i!=null&&(ce.isFunction(i)?n.paramsSerializer={serialize:i}:my.assertOptions(i,{encode:Ss.function,serialize:Ss.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),my.assertOptions(n,{baseUrl:Ss.spelling("baseURL"),withXsrfToken:Ss.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&ce.merge(s.common,s[n.method]);s&&ce.forEach(["delete","get","head","post","put","patch","common"],x=>{delete s[x]}),n.headers=Yr.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const d=[];this.interceptors.response.forEach(function(v){d.push(v.fulfilled,v.rejected)});let h,f=0,m;if(!c){const x=[uR.bind(this),void 0];for(x.unshift(...l),x.push(...d),m=x.length,h=Promise.resolve(n);f<m;)h=h.then(x[f++],x[f++]);return h}m=l.length;let g=n;for(;f<m;){const x=l[f++],v=l[f++];try{g=x(g)}catch(b){v.call(this,b);break}}try{h=uR.call(this,g)}catch(x){return Promise.reject(x)}for(f=0,m=d.length;f<m;)h=h.then(d[f++],d[f++]);return h}getUri(t){t=Yl(this.defaults,t);const n=iz(t.baseURL,t.url,t.allowAbsoluteUrls);return Zq(n,t.params,t.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(t){Bl.prototype[t]=function(n,r){return this.request(Yl(r||{},{method:t,url:n,data:(r||{}).data}))}});ce.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,l){return this.request(Yl(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Bl.prototype[t]=n(),Bl.prototype[t+"Form"]=n(!0)});let hie=class cz{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,l){r.reason||(r.reason=new wd(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cz(function(i){t=i}),cancel:t}}};function pie(e){return function(n){return e.apply(null,n)}}function mie(e){return ce.isObject(e)&&e.isAxiosError===!0}const rC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
587alContent: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};Object.entries(rC).forEach(([e,t])=>{rC[t]=e});function uz(e){const t=new Bl(e),n=qq(Bl.prototype.request,t);return ce.extend(n,Bl.prototype,t,{allOwnKeys:!0}),ce.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return uz(Yl(e,i))},n}const _n=uz(Ep);_n.Axios=Bl;_n.CanceledError=wd;_n.CancelToken=hie;_n.isCancel=nz;_n.VERSION=lz;_n.toFormData=px;_n.AxiosError=ft;_n.Cancel=_n.CanceledError;_n.all=function(t){return Promise.all(t)};_n.spread=pie;_n.isAxiosError=mie;_n.mergeConfig=Yl;_n.AxiosHeaders=Yr;_n.formToJSON=e=>tz(ce.isHTMLForm(e)?new FormData(e):e);_n.getAdapter=oz.getAdapter;_n.HttpStatusCode=rC;_n.default=_n;const{Axios:m$e,AxiosError:g$e,CanceledError:y$e,isCancel:v$e,CancelToken:x$e,VERSION:b$e,all:w$e,Cancel:j$e,isAxiosError:S$e,spread:_$e,toFormData:N$e,AxiosHeaders:C$e,HttpStatusCode:P$e,formToJSON:A$e,getAdapter:k$e,mergeConfig:E$e}=_n,gie=typeof window>"u",fR=!gie&&window.self!==window.top,Rw=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ar=[];for(let e=0;e<256;++e)ar.push((e+256).toString(16).slice(1));function yie(e,t=0){return(ar[e[t+0]]+ar[e[t+1]]+ar[e[t+2]]+ar[e[t+3]]+"-"+ar[e[t+4]]+ar[e[t+5]]+"-"+ar[e[t+6]]+ar[e[t+7]]+"-"+ar[e[t+8]]+ar[e[t+9]]+"-"+ar[e[t+10]]+ar[e[t+11]]+ar[e[t+12]]+ar[e[t+13]]+ar[e[t+14]]+ar[e[t+15]]).toLowerCase()}let Dw;const vie=new Uint8Array(16);function xie(){if(!Dw){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Dw=crypto.getRandomValues.bind(crypto)}return Dw(vie)}const bie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hR={randomUUID:bie};function wie(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??xie();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,yie(r)}function jie(e,t,n){return hR.randomUUID&&!e?hR.randomUUID():wie(e)}class Sie extends Error{constructor(t,n,r,i,s){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Hf({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const s=_n.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(s.defaults.headers.common.Authorization=`Bearer ${n}`),s.interceptors.request.use(a=>{typeof window<"u"&&a.headers.set("X-Origin-URL",window.location.href);const l=jie();if(a.requestId=l,fR)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+a.url,method:a.method,body:a.data instanceof FormData?"[FormData object]":a.data}},"*")}catch{}return a}),r&&s.interceptors.response.use(a=>{var l;const c=(l=a.config)===null||l===void 0?void 0:l.requestId;try{fR&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:a.status,response:a.data}},"*")}catch{}return a.data},a=>{var l,c,d,h,f,m,g,x;const v=((c=(l=a.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message)||((h=(d=a.response)===null||d===void 0?void 0:d.data)===null||h===void 0?void 0:h.detail)||a.message,b=new Sie(v,(f=a.response)===null||f===void 0?void 0:f.status,(g=(m=a.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.code,(x=a.response)===null||x===void 0?void 0:x.data,a);return i==null||i(b),Promise.reject(b)}),s}function pR(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({}
587,{get(i,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return Nie(t,n,s,r)}})}function _ie(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function Nie(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(s,a,l,c){const d={};return s&&(d.sort=s),a&&(d.limit=a),l&&(d.skip=l),c&&(d.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:d})},async filter(s,a,l,c,d){const h={q:JSON.stringify(s)};return a&&(h.sort=a),l&&(h.limit=l),c&&(h.skip=c),d&&(h.fields=Array.isArray(d)?d.join(","):d),e.get(i,{params:h})},async get(s){return e.get(`${i}/${s}`)},async create(s){return e.post(i,s)},async update(s,a){return e.put(`${i}/${s}`,a)},async delete(s){return e.delete(`${i}/${s}`)},async deleteMany(s){return e.delete(i,{data:s})},async bulkCreate(s){return e.post(`${i}/bulk`,s)},async importEntities(s){const a=new FormData;return a.append("file",s,s.name),e.post(`${i}/import`,a,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(s){const a=`entities:${t}:${n}`;return r().subscribeToRoom(a,{update_model:d=>{const h=_ie(d.data);if(h)try{s(h)}catch(f){console.error("[Base44 SDK] Subscription callback error:",f)}}})}}}function Cie(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:s,queryParams:a,...l}=i??{},c={...l,...s&&{path_params:s},...a&&{query_params:a}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,c)}}}function mR(e,t){const n=Cie(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(s,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${a} must receive an object with named parameters, received: ${l}`);let c,d;return l instanceof FormData||l&&Object.values(l).some(h=>h instanceof File)?(c=new FormData,Object.keys(l).forEach(h=>{l[h]instanceof File?c.append(h,l[h],l[h].name):typeof l[h]=="object"&&l[h]!==null?c.append(h,JSON.stringify(l[h])):c.append(h,l[h])}),d="multipart/form-data"):(c=l,d="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${a}`,c||l,{headers:{"Content-Type":d}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${a}`,c||l,{headers:{"Content-Type":d}})}}})}})}function Pie(e,t,n,r){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){var s;if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const a=i?new URL(i,window.location.origin).toString():window.location.href,l=`${(s=r.appBaseUrl)!==null&&s!==void 0?s:""}/login?from_url=${encodeURIComponent(a)}`;window.location.href=l},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"&&window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(s){console.error("Failed to remove token from localStorage:",s)}typeof window<"u"&&(i?window.location.href=i:window.location.reload())},setToken(i,s=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,s&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",i)}catch(a){console.error("Failed to save token to localStorage:",a)}},async loginViaEmailPassword(i,s,a){var l;try{const c=await e.post(`/apps/${n}/auth/login`,{email:i,password:s,...a&&{turnstile_token:a}}),{access_token:d,user:h}=c;return d&&this.setToken(d),{access_token:d,user:h}}catch(c){throw((l=c.response)===null||l===void 0?void 0:l.status)===401&&await this.logout(),c}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,s){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:s})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:s}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:s})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:s}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:s})},changePassword({userId:i,currentPassword:s,newPassword:a}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:s,new_password:a})}}}function Aie(e,t,n){return{async getAccessToken(r){const i=`/apps/${t}/auth/sso/accesstoken/${r}`,s={};return n&&(s["on-behalf-of"]=`Bearer ${n}`),e.get(i,{headers:s})}}}
587function kie(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token}}}function IA(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let s=null;if(typeof window<"u"&&window.location)try{const a=new URLSearchParams(window.location.search);if(s=a.get(n),s){if(r&&Eie(s,{storageKey:t}),i){a.delete(n);const l=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return s}}catch(a){console.error("Error retrieving token from URL:",a)}if(typeof window<"u"&&window.localStorage)try{return s=window.localStorage.getItem(t),s}catch(a){console.error("Error retrieving token from local storage:",a)}return null}function Eie(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function gR(e,t){return{async invoke(n,r){if(typeof r=="string")throw new Error(`Function ${n} must receive an object with named parameters, received: ${r}`);let i,s;return r instanceof FormData||r&&Object.values(r).some(a=>a instanceof File)?(i=new FormData,Object.keys(r).forEach(a=>{r[a]instanceof File?i.append(a,r[a],r[a].name):typeof r[a]=="object"&&r[a]!==null?i.append(a,JSON.stringify(r[a])):i.append(a,r[a])}),s="multipart/form-data"):(i=r,s="application/json"),e.post(`/apps/${t}/functions/${n}`,i||r,{headers:{"Content-Type":s}})}}}function yR({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const s=`/apps/${n}/agents`;return{getConversations:()=>e.get(`${s}/conversations`),getConversation:g=>e.get(`${s}/conversations/${g}`),listConversations:g=>e.get(`${s}/conversations`,{params:g}),createConversation:g=>e.post(`${s}/conversations`,g),addMessage:async(g,x)=>{const v=`/agent-conversations/${g.id}`;return await t().updateModel(v,{...g,messages:[...g.messages||[],x]}),e.post(`${s}/conversations/${g.id}/messages`,x)},subscribeToConversation:(g,x)=>{const v=`/agent-conversations/${g}`;return t().subscribeToRoom(v,{connect:()=>{},update_model:({data:j})=>{const w=JSON.parse(j);x==null||x(w)}})},getWhatsAppConnectURL:g=>{const x=`${r}/api/apps/${n}/agents/${encodeURIComponent(g)}/whatsapp`,v=i??IA();return v?`${x}?token=${v}`:x}}}function vR(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function Tie(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const Bs=Object.create(null);Bs.open="0";Bs.close="1";Bs.ping="2";Bs.pong="3";Bs.message="4";Bs.upgrade="5";Bs.noop="6";const gy=Object.create(null);Object.keys(Bs).forEach(e=>{gy[Bs[e]]=e});const iC={type:"error",data:"parser error"},dz=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fz=typeof ArrayBuffer=="function",hz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,LA=({type:e,data:t},n,r)=>dz&&t instanceof Blob?n?r(t):xR(t,r):fz&&(t instanceof ArrayBuffer||hz(t))?n?r(t):xR(new Blob([t]),r):r(Bs[e]+(t||"")),xR=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function bR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Iw;function Oie(e,t){if(dz&&e.data instanceof Blob)return e.data.arrayBuffer().then(bR).then(t);if(fz&&(e.data instanceof ArrayBuffer||hz(e.data)))return t(bR(e.data));LA(e,!1,n=>{Iw||(Iw=new TextEncoder),t(Iw.encode(n))})}const wR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
587+/",Kf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<wR.length;e++)Kf[wR.charCodeAt(e)]=e;const Mie=e=>{let t=e.length*.75,n=e.length,r,i=0,s,a,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),h=new Uint8Array(d);for(r=0;r<n;r+=4)s=Kf[e.charCodeAt(r)],a=Kf[e.charCodeAt(r+1)],l=Kf[e.charCodeAt(r+2)],c=Kf[e.charCodeAt(r+3)],h[i++]=s<<2|a>>4,h[i++]=(a&15)<<4|l>>2,h[i++]=(l&3)<<6|c&63;return d},Rie=typeof ArrayBuffer=="function",$A=(e,t)=>{if(typeof e!="string")return{type:"message",data:pz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Die(e.substring(1),t)}:gy[n]?e.length>1?{type:gy[n],data:e.substring(1)}:{type:gy[n]}:iC},Die=(e,t)=>{if(Rie){const n=Mie(e);return pz(n,t)}else return{base64:!0,data:e}},pz=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},mz="�",Iie=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,a)=>{LA(s,!1,l=>{r[a]=l,++i===n&&t(r.join(mz))})})},Lie=(e,t)=>{const n=e.split(mz),r=[];for(let i=0;i<n.length;i++){const s=$A(n[i],t);if(r.push(s),s.type==="error")break}return r};function $ie(){return new TransformStream({transform(e,t){Oie(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Lw;function Pg(e){return e.reduce((t,n)=>t+n.length,0)}function Ag(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Fie(e,t){Lw||(Lw=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(a,l){for(n.push(a);;){if(r===0){if(Pg(n)<1)break;const c=Ag(n,1);s=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Pg(n)<2)break;const c=Ag(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Pg(n)<8)break;const c=Ag(n,8),d=new DataView(c.buffer,c.byteOffset,c.length),h=d.getUint32(0);if(h>Math.pow(2,21)-1){l.enqueue(iC);break}i=h*Math.pow(2,32)+d.getUint32(4),r=3}else{if(Pg(n)<i)break;const c=Ag(n,i);l.enqueue($A(s?c:Lw.decode(c),t)),r=0}if(i===0||i>e){l.enqueue(iC);break}}}})}const gz=4;function An(e){if(e)return Bie(e)}function Bie(e){for(var t in An.prototype)e[t]=An.prototype[t];return e}An.prototype.on=An.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};An.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};An.prototype.off=An.prototype.removeListener=An.prototype.removeAllListeners=An.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};An.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};An.prototype.emitReserved=An.prototype.emit;An.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};An.prototype.hasListeners=function(e){return!!this.listeners(e).length};const gx=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Di=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),qie="arraybuffer";function yz(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const zie=Di.setTimeout,Uie=Di.clearTimeout;function yx(e,t){t.useNativeTimers?(e.setTimeoutFn=zie.bind(Di),e.clearTimeoutFn=Uie.bind(Di)):(e.setTimeoutFn=Di.setTimeout.bind(Di),e.clearTimeoutFn=Di.clearTimeout.bind(Di))}const Vie=1.33;function Wie(e){return typeof e=="string"?Hie(e):Math.ceil((e.byteLength||e.size)*Vie)}function Hie(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function vz(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Kie(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Gie(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");
vendor: 33,928 bytes, line 587
587t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class Yie extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class FA extends An{constructor(t){super(),this.writable=!1,yx(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Yie(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=$A(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Kie(t);return n.length?"?"+n:""}}class Xie extends FA{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Lie(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Iie(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=vz()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let xz=!1;try{xz=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Qie=xz;function Jie(){}class Zie extends Xie{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ms extends An{constructor(t,n,r){super(),this.createRequest=t,yx(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=yz(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Ms.requestsCount++,Ms.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Jie,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ms.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ms.requestsCount=0;Ms.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jR);else if(typeof addEventListener=="function"){const e="onpagehide"in Di?"pagehide":"unload";addEventListener(e,jR,!1)}}function jR(){for(let e in Ms.requests)Ms.requests.hasOwnProperty(e)&&Ms.requests[e].abort()}const ese=(function(){const e=bz({xdomain:!1});return e&&e.responseType!==null})();class tse extends Zie{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=ese&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ms(bz,this.uri(),t)}}function bz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Qie))return new XMLHttpRequest}catch{}if(!t)try{return new Di[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const wz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nse extends FA{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=wz?{}:yz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;LA(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&gx(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=vz()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const $w=Di.WebSocket||Di.MozWebSocket;class rse extends nse{createSocket(t,n,r){return wz?new $w(t,n,r):n?new $w(t,n):new $w(t)}doWrite(t,n){this.ws.send(n)}}class ise extends FA{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Fie(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=$ie();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),s())}).catch(l=>{})};s();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&gx(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const sse={websocket:rse,webtransport:ise,polling:tse},ase=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ose=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sC(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=ase.exec(e||""),s={},a=14;for(;a--;)s[ose[a]]=i[a]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=lse(s,s.path),s.queryKey=cse(s,s.query),s}function lse(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function cse(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const aC=typeof addEventListener=="function"&&typeof removeEventListener=="function",yy=[];aC&&addEventListener("offline",()=>{yy.forEach(e=>e())},!1);class Eo extends An{constructor(t,n){if(super(),this.binaryType=qie,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=sC(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=sC(n.host).host);yx(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Gie(this.opts.query)),aC&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},yy.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=gz,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Eo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Eo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Wie(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,gx(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Eo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),aC&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=yy.indexOf(this._offlineEventListener);r!==-1&&yy.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Eo.protocol=gz;class use extends Eo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Eo.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Eo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function s(){r||(r=!0,h(),n.close(),n=null)}const a=f=>{const m=new Error("probe error: "+f);m.transport=n.name,s(),this.emitReserved("upgradeError",m)};function l(){a("transport closed")}function c(){a("socket closed")}function d(f){n&&f.name!==n.name&&s()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};n.once("open",i),n.once("error",a),n.once("close",l),this.once("close",c),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let dse=class extends use{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>sse[i]).filter(i=>!!i)),super(t,r)}};function fse(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=sC(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const hse=typeof ArrayBuffer=="function",pse=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,jz=Object.prototype.toString,mse=typeof Blob=="function"||typeof Blob<"u"&&jz.call(Blob)==="[object BlobConstructor]",gse=typeof File=="function"||typeof File<"u"&&jz.call(File)==="[object FileConstructor]";function BA(e){return hse&&(e instanceof ArrayBuffer||pse(e))||mse&&e instanceof Blob||gse&&e instanceof File}function vy(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(vy(e[n]))return!0;return!1}if(BA(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vy(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vy(e[n]))return!0;return!1}function yse(e){const t=[],n=e.data,r=e;return r.data=oC(n,t),r.attachments=t.length,{packet:r,buffers:t}}function oC(e,t){if(!e)return e;if(BA(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=oC(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=oC(e[r],t));return n}return e}function vse(e,t){return e.data=lC(e.data,t),delete e.attachments,e}function lC(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=lC(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=lC(e[n],t));return e}const xse=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],bse=5;var Pt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Pt||(Pt={}));class wse{constructor(t){this.replacer=t}encode(t){return(t.type===Pt.EVENT||t.type===Pt.ACK)&&vy(t)?this.encodeAsBinary({type:t.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Pt.BINARY_EVENT||t.type===Pt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=yse(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function SR(e){return Object.prototype.toString.call(e)==="[object Object]"}class qA extends An{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Pt.BINARY_EVENT;r||n.type===Pt.BINARY_ACK?(n.type=r?Pt.EVENT:Pt.ACK,this.reconstructor=new jse(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(BA(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Pt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Pt.BINARY_EVENT||r.type===Pt.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(s,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(qA.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Pt.CONNECT:return SR(n);case Pt.DISCONNECT:return n===void 0;case Pt.CONNECT_ERROR:return typeof n=="string"||SR(n);case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&xse.indexOf(n[0])===-1);case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class jse{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=vse(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Sse=Object.freeze(Object.defineProperty({__proto__:null,Decoder:qA,Encoder:wse,get PacketType(){return Pt},protocol:bse},Symbol.toStringTag,{value:"Module"}));function ss(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const _se=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Sz extends An{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ss(t,"open",this.onopen.bind(this)),ss(t,"packet",this.onpacket.bind(this)),ss(t,"error",this.onerror.bind(this)),ss(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(_se.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const a={type:Pt.EVENT,data:n};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,f=n.pop();this._registerAckCallback(h,f),a.id=h}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),a=(...l)=>{this.io.clearTimeoutFn(s),n.apply(this,l)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(a,l)=>a?i(a):r(l);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Pt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Pt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(t);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(t);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Pt.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Pt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function jd(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}jd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};jd.prototype.reset=function(){this.attempts=0};jd.prototype.setMin=function(e){this.ms=e};jd.prototype.setMax=function(e){this.max=e};jd.prototype.setJitter=function(e){this.jitter=e};class cC extends An{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,yx(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new jd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Sse;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new dse(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ss(n,"open",function(){r.onopen(),t&&t()}),s=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},a=ss(n,"error",s);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ss(t,"ping",this.onping.bind(this)),ss(t,"data",this.ondata.bind(this)),ss(t,"error",this.onerror.bind(this)),ss(t,"close",this.onclose.bind(this)),ss(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){gx(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Sz(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
587cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Nf={};function xy(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=fse(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,a=Nf[i]&&s in Nf[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let c;return l?c=new cC(r,t):(Nf[i]||(Nf[i]=new cC(r,t)),c=Nf[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(xy,{Manager:cC,Socket:Sz,io:xy,connect:xy});function _R(e,t){var n;const r=xy(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(n=e.token)!==null&&n!==void 0?n:IA()}});return r.on("connect",async()=>{var i;return console.log("connect",r.id),(i=t.connect)===null||i===void 0?void 0:i.call(t)}),r.on("update_model",async i=>{var s;return(s=t.update_model)===null||s===void 0?void 0:s.call(t,i)}),r.on("error",async i=>{var s;return(s=t.error)===null||s===void 0?void 0:s.call(t,i)}),r.on("connect_error",async i=>{var s;return console.error("connect_error",i),(s=t.error)===null||s===void 0?void 0:s.call(t,i)}),r}function Nse({config:e}){let t={...e};const n={},r={connect:async()=>{const g=[];Object.keys(n).forEach(x=>{c(x);const v=f(x);v==null||v.forEach(({connect:b})=>{const j=async()=>b==null?void 0:b();g.push(j())})}),await Promise.all(g)},update_model:async g=>{const v=f(g.room).map(b=>{var j;return(j=b.update_model)===null||j===void 0?void 0:j.call(b,g)});await Promise.all(v)},error:async g=>{console.error("error",g);const x=Object.values(n).flat().map(v=>{var b;return(b=v.error)===null||b===void 0?void 0:b.call(v,g)});await Promise.all(x)}};let i=_R(e,r);function s(){a()}function a(){i&&i.disconnect()}function l(g){s(),t={...t,...g},i=_R(t,r)}function c(g){i.emit("join",g)}function d(g){i.emit("leave",g)}async function h(g,x){var v;const b=JSON.stringify(x);return(v=r.update_model)===null||v===void 0?void 0:v.call(r,{room:g,data:b})}function f(g){return n[g]}return{socket:i,subscribeToRoom:(g,x)=>(n[g]||(c(g),n[g]=[]),n[g].push(x),()=>{var v,b;n[g]=(b=(v=n[g])===null||v===void 0?void 0:v.filter(j=>j!==x))!==null&&b!==void 0?b:[],n[g].length===0&&d(g)}),updateConfig:l,updateModel:h,disconnect:a}}const Cf=typeof window<"u"?window:{base44SharedInstances:{}};function Cse(e,t){return Cf.base44SharedInstances||(Cf.base44SharedInstances={}),Cf.base44SharedInstances[e]||(Cf.base44SharedInstances[e]={instance:t()}),Cf.base44SharedInstances[e].instance}const Pse="__user_heartbeat_event__",Ase="__initialization_event__",kse="__session_duration_event__",NR="analytics-enable",CR="base44_analytics_session_id",Ese={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},Tse="analytics",Wt=Cse(Tse,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...Ese,...Fse()}})),Ose=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r})=>{var i;const{maxQueueSize:s,throttleTime:a,batchSize:l}=Wt.config;if(!(!((i=Wt.config)===null||i===void 0)&&i.enabled))return{track:()=>{},cleanup:()=>{}};let c;const d=`${t}/api/apps/${n}/analytics/track/batch`,h=async N=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:N}})},f=N=>{try{const k=JSON.stringify({events:N}),C=new Blob([k],{type:"application/json"});return typeof navigator>"u"||k.length>6e4||!navigator.sendBeacon(d,C)}catch{return!1}},m=async(N,k={})=>
587{if(N.length===0)return;const C=await $se(r),A=N.map(Lse(C));try{(!k.isBeacon||!f(A))&&await h(A)}catch{}},g=()=>{AR(m,{throttleTime:a,batchSize:l})},x=N=>{if(Wt.requestsQueue.length>=s)return;const k=Ise();Wt.requestsQueue.push({...N,...k}),g()},v=()=>{AR(m,{throttleTime:a,batchSize:l}),c=kR(x),Rse()},b=()=>{PR(),c==null||c(),Dse(x);const N=Wt.requestsQueue.splice(0);m(N,{isBeacon:!0})},j=()=>{typeof window>"u"||(document.visibilityState==="hidden"?b():document.visibilityState==="visible"&&v())},w=()=>{PR(),c==null||c(),typeof window<"u"&&window.removeEventListener("visibilitychange",j)};return g(),c=kR(x),Mse(x),typeof window<"u"&&window.addEventListener("visibilitychange",j),{track:x,cleanup:w}};function PR(){Wt.isProcessing=!1}async function AR(e,t){if(Wt.isProcessing)return;Wt.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;Wt.isProcessing&&Wt.requestsQueue.length>0;){const i=Wt.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(s=>setTimeout(s,n))}Wt.isProcessing=!1}function kR(e){var t;if(Wt.isHeartBeatProcessing||((t=Wt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Wt.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:Pse})},Wt.config.heartBeatInterval);return()=>{clearInterval(n),Wt.isHeartBeatProcessing=!1}}function Mse(e){typeof window>"u"||Wt.wasInitializationTracked||(Wt.wasInitializationTracked=!0,e({eventName:Ase,properties:{referrer:document==null?void 0:document.referrer}}))}function Rse(){typeof window>"u"||Wt.sessionStartTime!==null||(Wt.sessionStartTime=new Date().toISOString())}function Dse(e){if(typeof window>"u"||Wt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Wt.sessionStartTime).getTime();Wt.sessionStartTime=null,e({eventName:kse,properties:{sessionDuration:t}})}function Ise(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function Lse(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Fw=null;async function $se(e){if(!Wt.sessionContext){if(!Fw){const t=Bse();Fw=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Wt.sessionContext=await Fw}return Wt.sessionContext}function Fse(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(NR);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(NR);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function Bse(){if(typeof window>"u")return Rw();try{const e=localStorage.getItem(CR);if(!e){const t=Rw();return localStorage.setItem(CR,t),t}return e}catch{return Rw()}}function qse(e){const{serverUrl:t="https://base44.app",appId:n,token:r,serviceToken:i,requiresAuth:s=!1,appBaseUrl:a,options:l,functionsVersion:c,headers:d}=e,h={serverUrl:t,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:n,token:r};let f=null;const m=()=>(f||(f=Nse({config:h})),f),g={...d,"X-App-Id":String(n)},x=c?{...g,"Base44-Functions-Version":c}:g,v=Hf({baseURL:`${t}/api`,headers:g,token:r,onError:l==null?void 0:l.onError}),b=Hf({baseURL:`${t}/api`,headers:x,token:r,interceptResponses:!1,onError:l==null?void 0:l.onError}),j=Hf({baseURL:`${t}/api`,headers:g,token:i,onError:l==null?void 0:l.onError}),w=Hf({baseURL:`${t}/api`,headers:x,token:i,interceptResponses:!1}),N=Pie(v,b,n,{appBaseUrl:a}),k={entities:pR({axios:v,appId:n,getSocket:m}),integrations:mR(v,n),auth:N,functions:gR(b,n),agents:yR({axios:v,getSocket:m,appId:n,serverUrl:t,token:r}),appLogs:vR(v,n),users:Tie(v,n),analytics:Ose({axiosClient:v,serverUrl:t,appId:n,userAuthModule:N}),cleanup:()=>{k.analytics.cleanup(),f&&f.disconnect()}},C={entities:pR({axios:j,appId:n,getSocket:m}),integrations:mR(j,n),sso:Aie(j,n,r),connectors:kie(j,n),functions:gR(w,n),agents:yR({axios:j,getSocket:m,appId:n,serverUrl:t,token:r}),appLogs:vR(j,n),cleanup:()=>{f&&f.disconnect()}};if(typeof window<"u"){const E=r||IA();E&&k.auth.setToken(E)}return s&&typeof window<"u"&&setTimeout(async()=>{try{await k.auth.isAuthenticated()||k.auth.redirectToLogin(window.location.href)}catch(E){console.error("Authentication check failed:",E),k.auth.redirectToLogin(window.location.href)}},0),{...k,setToken(E){k.auth.setToken(E),f&&f.updateConfig({token:E}),h.token=E},getConfig(){return{serverUrl:t,appId:n,requiresAuth:s}},get asServiceRole(){if(!i)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return C}}}const _z=typeof window>"u",zse=_z?{localStorage:new Map}:window,Bw=zse.localStorage,Use=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Pf=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>
587{if(_z)return t;const r=`base44_${Use(e)}`,i=new URLSearchParams(window.location.search),s=i.get(e);if(n){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(s)return Bw.setItem(r,s),s;if(t)return Bw.setItem(r,t),t;const a=Bw.getItem(r);return a||null},Vse=()=>({appId:Pf("app_id",{defaultValue:"69267dfe0b5f409d5189775b"}),serverUrl:Pf("server_url",{defaultValue:"https://base44.app"}),token:Pf("access_token",{removeFromUrl:!0}),fromUrl:Pf("from_url",{defaultValue:window.location.href}),functionsVersion:Pf("functions_version")}),Jc={...Vse()},{appId:Wse,serverUrl:Hse,token:Kse,functionsVersion:Gse}=Jc,ne=qse({appId:Wse,serverUrl:Hse,token:Kse,functionsVersion:Gse,requiresAuth:!1}),Nz=_.createContext(),Yse=({children:e})=>{const[t,n]=_.useState(null),[r,i]=_.useState(!1),[s,a]=_.useState(!0),[l,c]=_.useState(!0),[d,h]=_.useState(null),[f,m]=_.useState(null);_.useEffect(()=>{g()},[]);const g=async()=>{var j,w;try{c(!0),h(null);const N=Hf({baseURL:`${Jc.serverUrl}/api/apps/public`,headers:{"X-App-Id":Jc.appId},token:Jc.token,interceptResponses:!0});try{const k=await N.get(`/prod/public-settings/by-id/${Jc.appId}`);m(k),Jc.token?await x():(a(!1),i(!1)),c(!1)}catch(k){if(console.error("App state check failed:",k),k.status===403&&((w=(j=k.data)==null?void 0:j.extra_data)!=null&&w.reason)){const C=k.data.extra_data.reason;h(C==="auth_required"?{type:"auth_required",message:"Authentication required"}:C==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:C,message:k.message})}else h({type:"unknown",message:k.message||"Failed to load app"});c(!1),a(!1)}}catch(N){console.error("Unexpected error:",N),h({type:"unknown",message:N.message||"An unexpected error occurred"}),c(!1),a(!1)}},x=async()=>{try{a(!0);const j=await ne.auth.me();n(j),i(!0),a(!1)}catch(j){console.error("User auth check failed:",j),a(!1),i(!1),(j.status===401||j.status===403)&&h({type:"auth_required",message:"Authentication required"})}},v=(j=!0)=>{n(null),i(!1),j?ne.auth.logout(window.location.href):ne.auth.logout()},b=()=>{ne.auth.redirectToLogin(window.location.href)};return o.jsx(Nz.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:s,isLoadingPublicSettings:l,authError:d,appPublicSettings:f,logout:v,navigateToLogin:b,checkAppState:g},children:e})},Cz=()=>{const e=_.useContext(Nz);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};function ER(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vx(...e){return t=>{let n=!1;const r=e.map(i=>{const s=ER(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():ER(e[i],null)}}}}function yt(...e){return _.useCallback(vx(...e),e)}function Ro(e){const t=Qse(e),n=_.forwardRef((r,i)=>{const{children:s,...a}=r,l=_.Children.toArray(s),c=l.find(Zse);if(c){const d=c.props.children,h=l.map(f=>f===c?_.Children.count(d)>1?_.Children.only(null):_.isValidElement(d)?d.props.children:null:f);return o.jsx(t,{...a,ref:i,children:_.isValidElement(d)?_.cloneElement(d,void 0,h):null})}return o.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var Xse=Ro("Slot");function Qse(e){const t=_.forwardRef((n,r)=>{const{children:i,...s}=n;if(_.isValidElement(i)){const a=tae(i),l=eae(s,i.props);return i.type!==_.Fragment&&(l.ref=r?vx(r,a):a),_.cloneElement(i,l)}return _.Children.count(i)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pz=Symbol("radix.slottable");function Jse(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Pz,t}function Zse(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pz}function eae(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function tae(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const zA=sx("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),re=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const a=r?Xse:"button";return o.jsx(a,{className:Te(zA({variant:t,size:n,className:e})),ref:s,...i})});re.displayName="Button";const ye=_.forwardRef(({className:e,type:t,...n},r)=>o.jsx("input",{type:t,className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors 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-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));ye.displayName="Input";const lt=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
587lt.displayName="Card";const cr=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));cr.displayName="CardHeader";const vr=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("font-semibold leading-none tracking-tight",e),...t}));vr.displayName="CardTitle";const Az=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Az.displayName="CardDescription";const dt=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));dt.displayName="CardContent";const nae=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:Te("flex items-center p-6 pt-0",e),...t}));nae.displayName="CardFooter";function kn(e){return"/"+e.toLowerCase().replace(/ /g,"-")}const rae=900*1e3;function ms({children:e}){const[t,n]=_.useState(!0),[r,i]=_.useState(!1),s=_.useRef(null),a=_.useCallback(()=>{ne.auth.logout("CustomerRegistration")},[]),l=_.useCallback(()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(a,rae)},[a]);return _.useEffect(()=>{(async()=>{try{if(!await ne.auth.isAuthenticated()){window.location.href=kn("CustomerRegistration");return}const h=await ne.auth.me();if(!h||!h.id){await ne.auth.logout(),alert("Access denied. Your account has been removed."),window.location.href=kn("CustomerRegistration");return}if(!h.is_approved&&h.role!=="admin"){await ne.auth.logout(),alert("Your account is pending approval. Please contact an administrator."),window.location.href=kn("CustomerRegistration");return}i(!0),n(!1)}catch(d){console.error("RequireAuth error:",d),await ne.auth.logout(),alert("Access denied. Only invited staff members can access this system."),window.location.href=kn("CustomerRegistration")}})()},[]),_.useEffect(()=>{if(!r)return;const c=["mousedown","mousemove","keydown","scroll","touchstart","click"];return c.forEach(d=>{document.addEventListener(d,l,{passive:!0})}),l(),()=>{s.current&&clearTimeout(s.current),c.forEach(d=>{document.removeEventListener(d,l)})}},[r,l]),t||!r?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:o.jsx(wr,{className:"w-8 h-8 animate-spin text-cyan-600"})}):e}function iae(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sae=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aae=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oae={};function TR(e,t){return(oae.jsx?aae:sae).test(e)}const lae=/[ \t\n\f\r]/g;function cae(e){return typeof e=="object"?e.type==="text"?OR(e.value):!1:OR(e)}function OR(e){return e.replace(lae,"")===""}class Tp{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Tp.prototype.normal={};Tp.prototype.property={};Tp.prototype.space=void 0;function kz(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Tp(n,r,t)}function uC(e){return e.toLowerCase()}class Zr{constructor(t,n){this.attribute=n,this.property=t}}Zr.prototype.attribute="";Zr.prototype.booleanish=!1;Zr.prototype.boolean=!1;Zr.prototype.commaOrSpaceSeparated=!1;Zr.prototype.commaSeparated=!1;Zr.prototype.defined=!1;Zr.prototype.mustUseProperty=!1;Zr.prototype.number=!1;Zr.prototype.overloadedBoolean=!1;Zr.prototype.property="";Zr.prototype.spaceSeparated=!1;Zr.prototype.space=void 0;let uae=0;const mt=lc(),Cn=lc(),dC=lc(),Ce=lc(),Yt=lc(),fu=lc(),ai=lc();function lc(){return 2**++uae}const fC=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:Cn,commaOrSpaceSeparated:ai,commaSeparated:fu,number:Ce,overloadedBoolean:dC,spaceSeparated:Yt},Symbol.toStringTag,{value:"Module"})),qw=Object.keys(fC);class UA extends Zr{constructor(t,n,r,i){let s=-1;if(super(t,n),MR(this,"space",i),typeof r=="number")for(;++s<qw.length;){const a=qw[s];MR(this,qw[s],(r&fC[a])===fC[a])}}}UA.prototype.defined=!0;function MR(e,t,n){n&&(e[t]=n)}function Sd(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new UA(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[uC(r)]=r,n[uC(s.attribute)]=r}return new Tp(t,n,e.space)}const Ez=Sd({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:Ce,ariaColIndex:Ce,ariaColSpan:Ce,ariaControl
vendor: 5,436 bytes, line 587
587s:Yt,ariaCurrent:null,ariaDescribedBy:Yt,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Yt,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Yt,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yt,ariaLevel:Ce,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Yt,ariaPlaceholder:null,ariaPosInSet:Ce,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Yt,ariaRowCount:Ce,ariaRowIndex:Ce,ariaRowSpan:Ce,ariaSelected:Cn,ariaSetSize:Ce,ariaSort:null,ariaValueMax:Ce,ariaValueMin:Ce,ariaValueNow:Ce,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tz(e,t){return t in e?e[t]:t}function Oz(e,t){return Tz(e,t.toLowerCase())}const dae=Sd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fu,acceptCharset:Yt,accessKey:Yt,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:Yt,autoFocus:mt,autoPlay:mt,blocking:Yt,capture:null,charSet:null,checked:mt,cite:null,className:Yt,cols:Ce,colSpan:null,content:null,contentEditable:Cn,controls:mt,controlsList:Yt,coords:Ce|fu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:dC,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:Yt,height:Ce,hidden:dC,high:Ce,href:null,hrefLang:null,htmlFor:Yt,httpEquiv:Yt,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:Yt,itemRef:Yt,itemScope:mt,itemType:Yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:Ce,manifest:null,max:null,maxLength:Ce,media:null,method:null,min:null,minLength:Ce,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:Ce,pattern:null,ping:Yt,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:Yt,required:mt,reversed:mt,rows:Ce,rowSpan:Ce,sandbox:Yt,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:Ce,sizes:null,slot:null,span:Ce,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ce,step:null,style:null,tabIndex:Ce,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:Cn,width:Ce,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yt,axis:null,background:null,bgColor:null,border:Ce,borderColor:null,bottomMargin:Ce,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ce,leftMargin:Ce,link:null,longDesc:null,lowSrc:null,marginHeight:Ce,marginWidth:Ce,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ce,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:Ce,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ce,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:Ce,security:null,unselectable:null},space:"html",transform:Oz}),fae=Sd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
587dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ai,accentHeight:Ce,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ce,amplitude:Ce,arabicForm:null,ascent:Ce,attributeName:null,attributeType:null,azimuth:Ce,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ce,by:null,calcMode:null,capHeight:Ce,className:Yt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
587dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ce,diffuseConstant:Ce,direction:null,display:null,dur:null,divisor:Ce,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ce,enableBackground:null,end:null,event:null,exponent:Ce,externalResourcesRequired:null,fill:null,fillOpacity:Ce,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fu,g2:fu,glyphName:fu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ce,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ce,horizOriginX:Ce,horizOriginY:Ce,id:null,ideographic:Ce,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ce,k:Ce,k1:Ce,k2:Ce,k3:Ce,k4:Ce,kernelMatrix:ai,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ce,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ce,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ce,overlineThickness:Ce,paintOrder:null,panose1:null,path:null,pathLength:Ce,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ce,pointsAtY:Ce,pointsAtZ:Ce,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ai,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ai,rev:ai,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ai,requiredFeatures:ai,requiredFonts:ai,requiredFormats:ai,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ce,specularExponent:Ce,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ce,strikethroughThickness:Ce,string:null,stroke:null,strokeDashArray:ai,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ce,strokeOpacity:Ce,strokeWidth:null,style:null,surfaceScale:Ce,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ai,tabIndex:Ce,tableValues:null,target:null,targetX:Ce,targetY:Ce,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ai,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ce,underlineThickness:Ce,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ce,values:null,vAlphabetic:Ce,vMathematical:Ce,vectorEffect:null,vHanging:Ce,vIdeographic:Ce,version:null,vertAdvY:Ce,vertOriginX:Ce,vertOriginY:Ce,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ce,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tz}),Mz=Sd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,100 bytes, lines 587-588
587,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Rz=Sd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Oz}),Dz=Sd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),hae={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pae=/[A-Z]/g,RR=/-[a-z]/g,mae=/^data[-\w.:]+$/i;function gae(e,t){const n=uC(t);let r=t,i=Zr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&mae.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(RR,vae);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!RR.test(s)){let a=s.replace(pae,yae);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=UA}return new i(r,t)}function yae(e){return"-"+e.toLowerCase()}function vae(e){return e.charAt(1).toUpperCase()}const xae=kz([Ez,dae,Mz,Rz,Dz],"html"),VA=kz([Ez,fae,Mz,Rz,Dz],"svg");function bae(e){return e.join(" ").trim()}var Uc={},zw,DR;function wae(){if(DR)return zw;DR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
588`,d="/",h="*",f="",m="comment",g="declaration";zw=function(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var j=1,w=1;function N($){var F=$.match(t);F&&(j+=F.length);var W=$.lastIndexOf(c);w=~W?$.length-W:w+$.length}function k(){var $={line:j,column:w};return function(F){return F.position=new C($),P(),F}}function C($){this.start=$,this.end={line:j,column:w},this.source=b.source}C.prototype.content=v;function A($){var F=new Error(b.source+":"+j+":"+w+": "+$);if(F.reason=$,F.filename=b.source,F.line=j,F.column=w,F.source=v,!b.silent)throw F}function E($){var F=$.exec(v);if(F){var W=F[0];return N(W),v=v.slice(W.length),F}}function P(){E(n)}function D($){var F;for($=$||[];F=B();)F!==!1&&$.push(F);return $}function B(){var $=k();if(!(d!=v.charAt(0)||h!=v.charAt(1))){for(var F=2;f!=v.charAt(F)&&(h!=v.charAt(F)||d!=v.charAt(F+1));)++F;if(F+=2,f===v.charAt(F-1))return A("End of comment missing");var W=v.slice(2,F-2);return w+=2,N(W),v=v.slice(F),w+=2,$({type:m,comment:W})}}function O(){var $=k(),F=E(r);if(F){if(B(),!E(i))return A("property missing ':'");var W=E(s),q=$({type:g,property:x(F[0].replace(e,f)),value:W?x(W[0].replace(e,f)):f});return E(a),q}}function M(){var $=[];D($);for(var F;F=O();)F!==!1&&($.push(F),D($));return $}return P(),M()};function x(v){return v?v.replace(l,f):f}return zw}var IR;function jae(){if(IR)return Uc;IR=1;var e=Uc&&Uc.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.default=n;var t=e(wae());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),l=typeof i=="function";return a.forEach(function(c){if(c.type==="declaration"){var d=c.property,h=c.value;l?i(d,h,c):h&&(s=s||{},s[d]=h)}}),s}return Uc}var Af={},LR;function Sae(){if(LR)return Af;LR=1,Object.defineProperty(Af,"__esModule",{value:!0}),Af.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(d){return!d||n.test(d)||e.test(d)},a=function(d,h){return h.toUpperCase()},l=function(d,h){return"".concat(h,"-")},c=function(d,h){return h===void 0&&(h={}),s(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(i,l):d=d.replace(r,l),d.replace(t,a))};return Af.camelCase=c,Af}var kf,$R;function _ae(){if($R)return kf;$R=1;var e=kf&&kf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(jae()),n=Sae();function r(i,s){var a={};
vendor: 2,744 bytes, line 588
588return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(a[(0,n.camelCase)(l,s)]=c)}),a}return r.default=r,kf=r,kf}var Nae=_ae();const Cae=Ot(Nae),Iz=Lz("end"),WA=Lz("start");function Lz(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Pae(e){const t=WA(e),n=Iz(e);if(t&&n)return{start:t,end:n}}function ih(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?FR(e.position):"start"in e||"end"in e?FR(e):"line"in e||"column"in e?hC(e):""}function hC(e){return BR(e&&e.line)+":"+BR(e&&e.column)}function FR(e){return hC(e&&e.start)+"-"+hC(e&&e.end)}function BR(e){return e&&typeof e=="number"?e:1}class jr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=ih(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}jr.prototype.file="";jr.prototype.name="";jr.prototype.reason="";jr.prototype.message="";jr.prototype.stack="";jr.prototype.column=void 0;jr.prototype.line=void 0;jr.prototype.ancestors=void 0;jr.prototype.cause=void 0;jr.prototype.fatal=void 0;jr.prototype.place=void 0;jr.prototype.ruleId=void 0;jr.prototype.source=void 0;const HA={}.hasOwnProperty,Aae=new Map,kae=/[A-Z]/g,Eae=new Set(["table","tbody","thead","tfoot","tr"]),Tae=new Set(["td","th"]),$z="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Oae(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bae(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,347 bytes, line 588
588if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Fae(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?VA:xae,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Fz(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Fz(e,t,n){if(t.type==="element")return Mae(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Rae(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Iae(e,t,n);if(t.type==="mdxjsEsm")return Dae(e,t);if(t.type==="root")return Lae(e,t,n);if(t.type==="text")return $ae(e,t)}function Mae(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=VA,e.schema=i),e.ancestors.push(t);const s=qz(e,t.tagName,!1),a=qae(e,t);let l=GA(e,t);return Eae.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!cae(c):!0})),Bz(e,a,s,t),KA(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Rae(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}jh(e,t.position)}function Dae(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jh(e,t.position)}function Iae(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=VA,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:qz(e,t.name,!0),a=zae(e,t),l=GA(e,t);return Bz(e,a,s,t),KA(a,l),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Lae(e,t,n){const r={};return KA(r,GA(e,t)),e.create(t,e.Fragment,r,n)}function $ae(e,t){return t.value}function Bz(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function KA(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fae(e,t,n){return r;function r(i,s,a,l){const d=Array.isArray(a.children)?n:t;return l?d(s,a,l):d(s,a)}}function Bae(e,t){return n;function n(r,i,s,a){const l=Array.isArray(s.children),c=WA(r);return t(i,s,a,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function qae(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&HA.call(t.properties,i)){const s=Uae(e,i,t.properties[i]);if(s){const[a,l]=s;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&Tae.has(t.tagName)?r=l:n[a]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function zae(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else jh(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else jh(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function GA(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Aae;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const d=i.get(c)||0;a=c+"-"+d,i.set(c,d+1)}}const l=Fz(e,s,a);l!==void 0&&n.push(l)}return n}function Uae(e,t,n){const r=gae(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?iae(n):bae(n)),r.property==="style"){let i=typeof n=="object"?n:Vae(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Wae(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?hae[r.property]||r.property:r.attribute,n]}}function Vae(e,t){try{return Cae(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new jr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=$z+"#cannot-parse-style-attribute",i}}function qz(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const l=TR(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=a}else r=TR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return HA.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);jh(e)}function jh(e,t){const n=new jr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=$z+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Wae(e){const t={};let n;for(n in e)HA.call(e,n)&&(t[Hae(n)]=e[n]);return t}function Hae(e){let t=e.replace(kae,Kae);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Kae(e){return"-"+e.toLowerCase()}const Uw={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Gae={};function Yae(e,t){const n=Gae,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zz(e,r,i)}function zz(e,t,n){if(Xae(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qR(e.children,t,n)}return Array.isArray(e)?qR(e,t,n):""}function qR(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=zz(e[i],t,n);return r.join("")}function Xae(e){return!!(e&&typeof e=="object")}const zR=document.createElement("i");function YA(e){const t="&"+e+";";zR.innerHTML=t;const n=zR.textContent;
vendor: 10,925 bytes, line 588
588return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qs(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Ii(e,t){return e.length>0?(qs(e,e.length,0,t),e):t}const UR={}.hasOwnProperty;function Qae(e){const t={};let n=-1;for(;++n<e.length;)Jae(t,e[n]);return t}function Jae(e,t){let n;for(n in t){const i=(UR.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){UR.call(i,a)||(i[a]=[]);const l=s[a];Zae(i[a],Array.isArray(l)?l:l?[l]:[])}}}function Zae(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qs(e,0,0,r)}function Uz(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function hu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const As=qo(/[A-Za-z]/),hi=qo(/[\dA-Za-z]/),eoe=qo(/[#-'*+\--9=?A-Z^-~]/);function pC(e){return e!==null&&(e<32||e===127)}const mC=qo(/\d/),toe=qo(/[\dA-Fa-f]/),noe=qo(/[!-/:-@[-`{-~]/);function it(e){return e!==null&&e<-2}function Xr(e){return e!==null&&(e<0||e===32)}function Mt(e){return e===-2||e===-1||e===32}const roe=qo(new RegExp("\\p{P}|\\p{S}","u")),ioe=qo(/\s/);function qo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _d(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&hi(e.charCodeAt(n+1))&&hi(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Jt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(c){return Mt(c)?(e.enter(n),l(c)):t(c)}function l(c){return Mt(c)&&s++<i?(e.consume(c),l):(e.exit(n),t(c))}}const soe={tokenize:aoe};function aoe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Jt(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),s(l)}function s(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return it(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),a)}}const ooe={tokenize:loe},VR={tokenize:coe};function loe(e){const t=this,n=[];let r=0,i,s,a;return l;function l(N){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,d)(N)}return d(N)}function c(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const k=t.events.length;let C=k,A;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){A=t.events[C][1].end;break}j(r);let E=k;for(;E<t.events.length;)t.events[E][1].end={...A},E++;return qs(t.events,C+1,0,t.events.slice(k)),t.events.length=E,d(N)}return l(N)}function d(N){if(r===n.length){if(!i)return m(N);if(i.currentConstruct&&i.currentConstruct.concrete)return x(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(VR,h,f)(N)}function h(N){return i&&w(),j(r),m(N)}function f(N){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,x(N)}function m(N){return t.containerState={},e.attempt(VR,g,x)(N)}function g(N){return r++,n.push([t.currentConstruct,t.containerState]),m(N)}function x(N){if(N===null){i&&w(),j(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),v(N)}function v(N){if(N===null){b(e.exit("chunkFlow"),!0),j(0),e.consume(N);return}return it(N)?(e.consume(N),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(N),v)}function b(N,k){const C=t.sliceStream(N);if(k&&C.push(null),N.previous=s,s&&(s.next=N),s=N,i.defineSkip(N.start),i.write(C),t.parser.lazy[N.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;const E=t.events.length;let P=E,D,B;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(D){B=t.events[P][1].end;break}D=!0}for(j(r),A=E;A<t.events.length;)t.events[A][1].end={...B},A++;qs(t.events,P+1,0,t.events.slice(E)),t.events.length=A}}function j(N){let k=n.length;for(;k-- >N;){const C=n[k];t.containerState=C[1],C[0].exit.call(t,e)}n.length=N}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function coe(e,t,n){return Jt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function WR(e){if(e===null||Xr(e)||ioe(e))return 1;if(roe(e))return 2}function XA(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const gC={name:"attention",resolveAll:uoe,tokenize:doe};function uoe(e,t){let n=-1,r,i,s,a,l,c,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};HR(f,-c),HR(m,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Ii(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=Ii(d,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),d=Ii(d,XA(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=Ii(d,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=Ii(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,qs(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function doe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=WR(r);let s;return a;function a(c){return s=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===s)return e.consume(c),l;const d=e.exit("attentionSequence"),h=WR(c),f=!h||h===2&&i||n.includes(c),m=!i||i===2&&h||n.includes(r);return d._open=!!(s===42?f:f&&(i||!m)),d._close=!!(s===42?m:m&&(h||!f)),t(c)}}function HR(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const foe={name:"autolink",tokenize:hoe};function hoe(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(g){return As(g)?(e.consume(g),a):g===64?n(g):d(g)}function a(g){return g===43||g===45||g===46||hi(g)?(r=1,l(g)):d(g)}function l(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||hi(g))&&r++<32?(e.consume(g),l):(r=0,d(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||pC(g)?n(g):(e.consume(g),c)}function d(g){return g===64?(e.consume(g),h):eoe(g)?(e.consume(g),d):n(g)}function h(g){return hi(g)?f(g):n(g)}function f(g){return g===46?(e.consume(g),r=0,h):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||hi(g))&&r++<63){const x=g===45?m:f;return e.consume(g),x}return n(g)}}const xx={partial:!0,tokenize:poe};function poe(e,t,n){return r;function r(s){return Mt(s)?Jt(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||it(s)?t(s):n(s)}}const Vz={continuation:{tokenize:goe},exit:yoe,name:"blockQuote",tokenize:moe};function moe(e,t,n){const r=this;return i;function i(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Mt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function goe(e,t,n){const r=this;return i;function i(a){return Mt(a)?Jt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(Vz,t,n)(a)}}function yoe(e){e.exit("blockQuote")}const Wz={name:"characterEscape",tokenize:voe};function voe(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return noe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Hz={name:"characterReference",tokenize:xoe};function xoe(e,t,n){const r=this;let i=0,s,a;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,a=hi,h(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=toe,h):(e.enter("characterReferenceValue"),s=7,a=mC,h(f))}function h(f){if(f===59&&i){const m=e.exit("characterReferenceValue");return a===hi&&!YA(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<s?(e.consume(f),h):n(f)}}const KR={partial:!0,tokenize:woe},GR={concrete:!0,name:"codeFenced",tokenize:boe};function boe(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,l;return c;function c(A){return d(A)}function d(A){const E=r.events[r.events.length-1];return s=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=A,e.enter("co
588deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===l?(a++,e.consume(A),h):a<3?n(A):(e.exit("codeFencedFenceSequence"),Mt(A)?Jt(e,f,"whitespace")(A):f(A))}function f(A){return A===null||it(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(KR,v,k)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||it(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):Mt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jt(e,g,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),m)}function g(A){return A===null||it(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===null||it(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===l?n(A):(e.consume(A),x)}function v(A){return e.attempt(i,k,b)(A)}function b(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),j}function j(A){return s>0&&Mt(A)?Jt(e,w,"linePrefix",s+1)(A):w(A)}function w(A){return A===null||it(A)?e.check(KR,v,k)(A):(e.enter("codeFlowValue"),N(A))}function N(A){return A===null||it(A)?(e.exit("codeFlowValue"),w(A)):(e.consume(A),N)}function k(A){return e.exit("codeFenced"),t(A)}function C(A,E,P){let D=0;return B;function B(W){return A.enter("lineEnding"),A.consume(W),A.exit("lineEnding"),O}function O(W){return A.enter("codeFencedFence"),Mt(W)?Jt(A,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):M(W)}function M(W){return W===l?(A.enter("codeFencedFenceSequence"),$(W)):P(W)}function $(W){return W===l?(D++,A.consume(W),$):D>=a?(A.exit("codeFencedFenceSequence"),Mt(W)?Jt(A,F,"whitespace")(W):F(W)):P(W)}function F(W){return W===null||it(W)?(A.exit("codeFencedFence"),E(W)):P(W)}}}function woe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Vw={name:"codeIndented",tokenize:Soe},joe={partial:!0,tokenize:_oe};function Soe(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),Jt(e,s,"linePrefix",5)(d)}function s(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(d):n(d)}function a(d){return d===null?c(d):it(d)?e.attempt(joe,a,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||it(d)?(e.exit("codeFlowValue"),a(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function _oe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):it(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Jt(e,s,"linePrefix",5)(a)}function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):it(a)?i(a):n(a)}}const Noe={name:"codeText",previous:Poe,resolve:Coe,tokenize:Aoe};function Coe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Poe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Aoe(e,t,n){let r=0,i,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,h(f)):it(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||it(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),d)}function h(f){return f===96?(e.consume(f),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",d(f))}}class koe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ef(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ef(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ef(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ef(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ef(this.left,n.reverse())}}}function Ef(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Kz(e){const t={};let n=-1,r,i,s,a,l,c,d;const h=new koe(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Eoe(h,n)),n=t[n],d=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return qs(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function Eoe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,c=[],d={};let h,f,m=-1,g=n,x=0,v=0;const b=[v];for(;g;){for(;e.get(++i)[1]!==g;);s.push(i),g._tokenizer||(h=r.sliceStream(g),g.next||h.push(null),f&&a.defineSki
vendor: 22,849 bytes, line 588
588p(g.start),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),g._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=g,g=g.next}for(g=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(v=m+1,b.push(v),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(a.events=[],g?(g._tokenizer=void 0,g.previous=void 0):b.pop(),m=b.length;m--;){const j=l.slice(b[m],b[m+1]),w=s.pop();c.push([w,w+j.length-1]),e.splice(w,2,j)}for(c.reverse(),m=-1;++m<c.length;)d[x+c[m][0]]=x+c[m][1],x+=c[m][1]-c[m][0]-1;return d}const Toe={resolve:Moe,tokenize:Roe},Ooe={partial:!0,tokenize:Doe};function Moe(e){return Kz(e),e}function Roe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):it(l)?e.check(Ooe,a,s)(l):(e.consume(l),i)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Doe(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Jt(e,s,"linePrefix")}function s(a){if(a===null||it(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Gz(e,t,n,r,i,s,a,l,c){const d=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(j){return j===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(j),e.exit(s),m):j===null||j===32||j===41||pC(j)?n(j):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(j))}function m(j){return j===62?(e.enter(s),e.consume(j),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===62?(e.exit("chunkString"),e.exit(l),m(j)):j===null||j===60||it(j)?n(j):(e.consume(j),j===92?x:g)}function x(j){return j===60||j===62||j===92?(e.consume(j),g):g(j)}function v(j){return!h&&(j===null||j===41||Xr(j))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(j)):h<d&&j===40?(e.consume(j),h++,v):j===41?(e.consume(j),h--,v):j===null||j===32||j===40||pC(j)?n(j):(e.consume(j),j===92?b:v)}function b(j){return j===40||j===41||j===92?(e.consume(j),v):v(j)}}function Yz(e,t,n,r,i,s){const a=this;let l=0,c;return d;function d(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(s),h}function h(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(s),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):it(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||it(g)||l++>999?(e.exit("chunkString"),h(g)):(e.consume(g),c||(c=!Mt(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}}function Xz(e,t,n,r,i,s){let a;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,c):n(m)}function c(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),d(m))}function d(m){return m===a?(e.exit(s),c(a)):m===null?n(m):it(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Jt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||it(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:h)}function f(m){return m===a||m===92?(e.consume(m),h):h(m)}}function sh(e,t){let n;return r;function r(i){return it(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Mt(i)?Jt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ioe={name:"definition",tokenize:$oe},Loe={partial:!0,tokenize:Foe};function $oe(e,t,n){const r=this;let i;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return Yz.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=hu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Xr(g)?sh(e,d)(g):d(g)}function d(g){return Gz(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function h(g){return e.attempt(Loe,f,f)(g)}function f(g){return Mt(g)?Jt(e,m,"whitespace")(g):m(g)}function m(g){return g===null||it(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function Foe(e,t,n){return r;function r(l){return Xr(l)?sh(e,i)(l):n(l)}function i(l){return Xz(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Mt(l)?Jt(e,a,"whitespace")(l):a(l)}function a(l){return l===null||it(l)?t(l):n(l)}}const Boe={name:"hardBreakEscape",tokenize:qoe};function qoe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return it(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const zoe={name:"headingAtx",resolve:Uoe,tokenize:Voe};function Uoe(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qs(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Voe(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Xr(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||it(h)?(e.exit("atxHeading"),t(h)):Mt(h)?Jt(e,l,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function d(h){return h===null||h===35||Xr(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),d)}}const Woe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],YR=["pre","script","style","textarea"],Hoe={concrete:!0,name:"htmlFlow",resolveTo:Yoe,tokenize:Xoe},Koe={partial:!0,tokenize:Joe},Goe={partial:!0,tokenize:Qoe};function Yoe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Xoe(e,t,n){const r=this;let i,s,a,l,c;return d;function d(z){return h(z)}function h(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),f}function f(z){return z===33?(e.consume(z),m):z===47?(e.consume(z),s=!0,v):z===63?(e.consume(z),i=3,r.interrupt?t:I):As(z)?(e.consume(z),a=String.fromCharCode(z),b):n(z)}function m(z){return z===45?(e.consume(z),i=2,g):z===91?(e.consume(z),i=5,l=0,x):As(z)?(e.consume(z),i=4,r.interrupt?t:I):n(z)}function g(z){return z===45?(e.consume(z),r.interrupt?t:I):n(z)}function x(z){const oe="CDATA[";return z===oe.charCodeAt(l++)?(e.consume(z),l===oe.length?r.interrupt?t:M:x):n(z)}function v(z){return As(z)?(e.consume(z),a=String.fromCharCode(z),b):n(z)}function b(z){if(z===null||z===47||z===62||Xr(z)){const oe=z===47,pe=a.toLowerCase();return!oe&&!s&&YR.includes(pe)?(i=1,r.interrupt?t(z):M(z)):Woe.includes(a.toLowerCase())?(i=6,oe?(e.consume(z),j):r.interrupt?t(z):M(z)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(z):s?w(z):N(z))}return z===45||hi(z)?(e.consume(z),a+=String.fromCharCode(z),b):n(z)}function j(z){return z===62?(e.consume(z),r.interrupt?t:M):n(z)}function w(z){return Mt(z)?(e.consume(z),w):B(z)}function N(z){return z===47?(e.consume(z),B):z===58||z===95||As(z)?(e.consume(z),k):Mt(z)?(e.consume(z),N):B(z)}function k(z){return z===45||z===46||z===58||z===95||hi(z)?(e.consume(z),k):C(z)}function C(z){return z===61?(e.consume(z),A):Mt(z)?(e.consume(z),C):N(z)}function A(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),c=z,E):Mt(z)?(e.consume(z),A):P(z)}function E(z){return z===c?(e.consume(z),c=null,D):z===null||it(z)?n(z):(e.consume(z),E)}function P(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Xr(z)?C(z):(e.consume(z),P)}function D(z){return z===47||z===62||Mt(z)?N(z):n(z)}function B(z){return z===62?(e.consume(z),O):n(z)}function O(z){return z===null||it(z)?M(z):Mt(z)?(e.consume(z),O):n(z)}function M(z){return z===45&&i===2?(e.consume(z),q):z===60&&i===1?(e.consume(z),K):z===62&&i===4?(e.consume(z),V):z===63&&i===3?(e.consume(z),I):z===93&&i===5?(e.consume(z),H):it(z)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Koe,G,$)(z)):z===null||it(z)?(e.exit("htmlFlowData"),$(z)):(e.consume(z),M)}function $(z){return e.check(Goe,F,G)(z)}function F(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),W}function W(z){return z===null||it(z)?$(z):(e.enter("htmlFlowData"),M(z))}function q(z){return z===45?(e.consume(z),I):M(z)}function K(z){return z===47?(e.consume(z),a="",L):M(z)}function L(z){if(z===62){const oe=a.toLowerCase();return YR.includes(oe)?(e.consume(z),V):M(z)}return As(z)&&a.length<8?(e.consume(z),a+=String.fromCharCode(z),L):M(z)}function H(z){return z===93?(e.consume(z),I):M(z)}function I(z){return z===62?(e.consume(z),V):z===45&&i===2?(e.consume(z),I):M(z)}function V(z){return z===null||it(z)?(e.exit("htmlFlowData"),G(z)):(e.consume(z),V)}function G(z){return e.exit("htmlFlow"),t(z)}}function Qoe(e,t,n){const r=this;return i;function i(a){return it(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Joe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(xx,t,n)}}const Zoe={name:"htmlText",tokenize:ele};function ele(e,t,n){const r=this;let i,s,a;return l;function l(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),d):I===47?(e.consume(I),C):I===63?(e.consume(I),N):As(I)?(e.consume(I),P):n(I)}function d(I){return I===45?(e.consume(I),h):I===91?(e.consume(I),s=0,x):As(I)?(e.consume(I),w):n(I)}function h(I){return I===45?(e.consume(I),g):n(I)}function f(I){return I===null?n(I):I===45?(e.consume(I),m):it(I)?(a=f,K(I)):(e.consume(I),f)}function m(I){return I===45?(e.consume(I),g):f(I)}function g(I){return I===62?q(I):I===45?m(I):f(I)}function x(I){const V="CDATA[";return I===V.charCodeAt(s++)?(e.consume(I),s===V.length?v:x):n(I)}function v(I){return I===null?n(I):I===93?(e.consume(I),b):it(I)?(a=v,K(I)):(e.consume(I),v)}function b(I){return I===93?(e.consume(I),j):v(I)}function j(I){return I===62?q(I):I===93?(e.consume(I),j):v(I)}function w(I){return I===null||I===62?q(I):it(I)?(a=w,K(I)):(e.consume(I),w)}function N(I){return I===null?n(I):I===63?(e.consume(I),k):it(I)?(a=N,K(I)):(e.consume(I),N)}function k(I){return I===62?q(I):N(I)}function C(I){return As(I)?(e.consume(I),A):n(I)}function A(I){return I===45||hi(I)?(e.consume(I),A):E(I)}function E(I){return it(I)?(a=E,K(I)):Mt(I)?(e.consume(I),E):q(I)}function P(I){return I===45||hi(I)?(e.consume(I),P):I===47||I===62||Xr(I)?D(I):n(I)}function D(I){return I===47?(e.consume(I),q):I===58||I===95||As(I)?(e.consume(I),B):it(I)?(a=D,K(I)):Mt(I)?(e.consume(I),D):q(I)}function B(I){return I===45||I===46||I===58||I===95||hi(I)?(e.consume(I),B):O(I)}function O(I){return I===61?(e.consume(I),M):it(I)?(a=O,K(I)):Mt(I)?(e.consume(I),O):D(I)}function M(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,$):it(I)?(a=M,K(I)):Mt(I)?(e.consume(I),M):(e.consume(I),F)}function $(I){return I===i?(e.consume(I),i=void 0,W):I===null?n(I):it(I)?(a=$,K(I)):(e.consume(I),$)}function F(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Xr(I)?D(I):(e.consume(I),F)}function W(I){return I===47||I===62||Xr(I)?D(I):n(I)}function q(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function K(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),L}function L(I){return Mt(I)?Jt(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):H(I)}function H(I){return e.enter("htmlTextData"),a(I)}}const QA={name:"labelEnd",resolveAll:ile,resolveTo:sle,tokenize:ale},tle={tokenize:ole},nle={tokenize:lle},rle={tokenize:cle};function ile(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&qs(e,0,e.length,n),e}function sle(e,t){let n=e.length,r=0,i,s,a,l;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const c={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=Ii(l,e.slice(s+1,s+r+3)),l=Ii(l,[["enter",h,t]]),l=Ii(l,XA(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),l=Ii(l,[["exit",h,t],e[a-2],e[a-1],["exit",d,t]]),l=Ii(l,e.slice(a+1)),l=Ii(l,[["exit",c,t]]),qs(e,s,e.length,l),e}function ale(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return l;function l(m){return s?s._inactive?f(m):(a=r.parser.defined.includes(hu(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(tle,h,a?h:f)(m):m===91?e.attempt(nle,h,a?d:f)(m):a?h(m):f(m)}function d(m){return e.attempt(rle,h,f)(m)}function h(m){return t(m)}function f(m){return s._balanced=!0,n(m)}}function ole(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Xr(f)?sh(e,s)(f):s(f)}function s(f){return f===41?h(f):Gz(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Xr(f)?sh(e,c)(f):h(f)}function l(f){return n(f)}function c(f){return f===34||f===39||f===40?Xz(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function d(f){return Xr(f)?sh(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function lle(e,t,n){const r=this;return i;function i(l){return Yz.call(r,e,s,a,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(hu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function cle(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const ule={name:"labelStartImage",resolveAll:QA.resolveAll,tokenize:dle};function dle(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const fle={name:"labelStartLink",resolveAll:QA.resolveAll,tokenize:hle};function hle(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ww={name:"lineEnding",tokenize:ple};function ple(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Jt(e,t,"linePrefix")}}const by={name:"thematicBreak",tokenize:mle};function mle(e,t,n){let r=0,i;return s;function s(d){return e.enter("thematicBreak"),a(d)}function a(d){return i=d,l(d)}function l(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||it(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),Mt(d)?Jt(e,l,"whitespace")(d):l(d))}}const zr={continuation:{tokenize:xle},exit:wle,name:"list",tokenize:vle},gle={partial:!0,tokenize:jle},yle={partial:!0,tokenize:ble};function vle(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(g){const x=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:mC(g)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(by,n,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return mC(g)&&++a<10?(e.consume(g),c):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):n(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(xx,r.interrupt?n:h,e.attempt(gle,m,f))}function h(g){return r.containerState.initialBlankLine=!0,s++,m(g)}function f(g){return Mt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function xle(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(xx,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jt(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!Mt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yle,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jt(e,e.attempt(zr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ble(e,t,n){const r=this;return Jt(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function wle(e){e.exit(this.containerState.type)}function jle(e,t,n){const r=this;return Jt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Mt(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const XR={name:"setextUnderline",resolveTo:Sle,tokenize:_le};function Sle(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function _le(e,t,n){const r=this;let i;return s;function s(d){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=d,a(d)):n(d)}function a(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===i?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),Mt(d)?Jt(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||it(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Nle={tokenize:Cle};function Cle(e){const t=this,n=e.attempt(xx,r,e.attempt(this.parser.constructs.flowInitial,i,Jt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Toe,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ple={resolveAll:Jz()},Ale=Qz("string"),kle=Qz("text");function Qz(e){return{resolveAll:Jz(e==="text"?Ele:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,l);return a;function a(h){return d(h)?s(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return d(h)?(n.exit("data"),s(h)):(n.consume(h),c)}function d(h){if(h===null)return!0;const f=i[h];let m=-1;if(f)for(;++m<f.length;){const g=f[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Jz(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Ele(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,l=0,c;for(;s--;){const d=i[s];
vendor: 2,548 bytes, line 588
588if(typeof d=="string"){for(a=d.length;d.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(d===-2)c=!0,l++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Tle={42:zr,43:zr,45:zr,48:zr,49:zr,50:zr,51:zr,52:zr,53:zr,54:zr,55:zr,56:zr,57:zr,62:Vz},Ole={91:Ioe},Mle={[-2]:Vw,[-1]:Vw,32:Vw},Rle={35:zoe,42:by,45:[XR,by],60:Hoe,61:XR,95:by,96:GR,126:GR},Dle={38:Hz,92:Wz},Ile={[-5]:Ww,[-4]:Ww,[-3]:Ww,33:ule,38:Hz,42:gC,60:[foe,Zoe],91:fle,92:[Boe,Wz],93:QA,95:gC,96:Noe},Lle={null:[gC,Ple]},$le={null:[42,95]},Fle={null:[]},Ble=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$le,contentInitial:Ole,disable:Fle,document:Tle,flow:Rle,flowInitial:Mle,insideSpan:Lle,string:Dle,text:Ile},Symbol.toStringTag,{value:"Module"}));function qle(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],l=[];const c={attempt:E(C),check:E(A),consume:w,enter:N,exit:k,interrupt:E(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:f};let h=t.tokenize.call(d,c);return t.resolveAll&&s.push(t),d;function f(O){return a=Ii(a,O),b(),a[a.length-1]!==null?[]:(P(t,0),d.events=XA(s,d.events,d),d.events)}function m(O,M){return Ule(g(O),M)}function g(O){return zle(a,O)}function x(){const{_bufferIndex:O,_index:M,line:$,column:F,offset:W}=r;return{_bufferIndex:O,_index:M,line:$,column:F,offset:W}}function v(O){i[O.line]=O.column,B()}function b(){let O;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<M.length;)j(M.charCodeAt(r._bufferIndex));else j(M)}}function j(O){h=h(O)}function w(O){it(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,B()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=O}function N(O,M){const $=M||{};return $.type=O,$.start=x(),d.events.push(["enter",$,d]),l.push($),$}function k(O){const M=l.pop();return M.end=x(),d.events.push(["exit",M,d]),M}function C(O,M){P(O,M.from)}
vendor: 21,833 bytes, lines 588-594
588function A(O,M){M.restore()}function E(O,M){return $;function $(F,W,q){let K,L,H,I;return Array.isArray(F)?G(F):"tokenize"in F?G([F]):V(F);function V(ue){return me;function me(Ne){const ee=Ne!==null&&ue[Ne],de=Ne!==null&&ue.null,be=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(de)?de:de?[de]:[]];return G(be)(Ne)}}function G(ue){return K=ue,L=0,ue.length===0?q:z(ue[L])}function z(ue){return me;function me(Ne){return I=D(),H=ue,ue.partial||(d.currentConstruct=ue),ue.name&&d.parser.constructs.disable.null.includes(ue.name)?pe():ue.tokenize.call(M?Object.assign(Object.create(d),M):d,c,oe,pe)(Ne)}}function oe(ue){return O(H,I),W}function pe(ue){return I.restore(),++L<K.length?z(K[L]):q}}}function P(O,M){O.resolveAll&&!s.includes(O)&&s.push(O),O.resolve&&qs(d.events,M,d.events.length-M,O.resolve(d.events.slice(M),d)),O.resolveTo&&(d.events=O.resolveTo(d.events,d))}function D(){const O=x(),M=d.previous,$=d.currentConstruct,F=d.events.length,W=Array.from(l);return{from:F,restore:q};function q(){r=O,d.previous=M,d.currentConstruct=$,d.events.length=F,l=W,B()}}function B(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function zle(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Ule(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
589`;break}case-3:{a=`\r
590`;break}case-2:{a=t?" ":"	";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Vle(e){const r={constructs:Qae([Ble,...(e||{}).extensions||[]]),content:i(soe),defined:[],document:i(ooe),flow:i(Nle),lazy:{},string:i(Ale),text:i(kle)};return r;function i(s){return a;function a(l){return qle(r,s,l)}}}function Wle(e){for(;!Kz(e););return e}const QR=/[\0\t\n\r]/g;function Hle(){let e=1,t="",n=!0,r;return i;function i(s,a,l){const c=[];let d,h,f,m,g;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,t="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(QR.lastIndex=f,d=QR.exec(s),m=d&&d.index!==void 0?d.index:s.length,g=s.charCodeAt(m),!d){t=s.slice(f);break}if(g===10&&f===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<m&&(c.push(s.slice(f,m)),e+=m-f),g){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Kle=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gle(e){return e.replace(Kle,Yle)}function Yle(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Uz(n.slice(s?2:1),s?16:10)}return YA(n)||e}const Zz={}.hasOwnProperty;function Xle(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Qle(n)(Wle(Vle(n).document().write(Hle()(e,t,!0))))}function Qle(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(vn),autolinkProtocol:D,autolinkEmail:D,atxHeading:s(jt),blockQuote:s(de),characterEscape:D,characterReference:D,codeFenced:s(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(be,a),codeText:s(ae,a),codeTextData:D,data:D,codeFlowValue:D,definition:s(Ke),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Ue),hardBreakEscape:s(qe),hardBreakTrailing:s(qe),htmlFlow:s(Rt,a),htmlFlowData:D,htmlText:s(Rt,a),htmlTextData:D,image:s(nr),label:a,link:s(vn),listItem:s(Hn),listItemValue:m,listOrdered:s(_r,f),listUnordered:s(_r),paragraph:s(Nr),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(jt),strong:s(ge),thematicBreak:s(At)},exit:{atxHeading:c(),atxHeadingSequence:C,autolink:c(),autolinkEmail:ee,autolinkProtocol:Ne,blockQuote:c(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:ue,characterReference:me,codeFenced:c(b),codeFencedFence:v,codeFencedFenceInfo:g,codeFencedFenceMeta:x,codeFlowValue:B,codeIndented:c(j),codeText:c(W),codeTextData:B,data:B,definition:c(),definitionDestinationString:k,definitionLabelString:w,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c($),htmlFlowData:B,htmlText:c(F),htmlTextData:B,image:c(K),label:H,labelText:L,lineEnding:O,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:oe,resourceDestinationString:I,resourceTitleString:V,resource:G,setextHeading:c(P),setextHeadingLineSequence:E,setextHeadingText:A,strong:c(),thematicBreak:c()}};e8(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(fe){let we={type:"root",children:[]};const Ve={stack:[we],tokenStack:[],config:t,enter:l,exit:d,buffer:a,resume:h,data:n},tt=[];let bt=-1;for(;++bt<fe.length;)if(fe[bt][1].type==="listOrdered"||fe[bt][1].type==="listUnordered")if(fe[bt][0]==="enter")tt.push(bt);else{const on=tt.pop();bt=i(fe,on,bt)}for(bt=-1;++bt<fe.length;){const on=t[fe[bt][0]];Zz.call(on,fe[bt][1].type)&&on[fe[bt][1].type].call(Object.assign({sliceSerialize:fe[bt][2].sliceSerialize},Ve),fe[bt][1])}if(Ve.tokenStack.length>0){const on=Ve.tokenStack[Ve.tokenStack.length-1];(on[1]||JR).call(Ve,void 0,on[0])}for(we.position={start:oo(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:oo(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},bt=-1;++bt<t.transforms.length;)we=t.transforms[bt](we)||we;return we}function i(fe,we,Ve){let tt=we-1,bt=-1,on=!1,rr,Kn,Dr,Ys;for(;++tt<=Ve;){const Rn=fe[tt];switch(Rn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Rn[0]==="enter"?bt++:bt--,Ys=void 0;break}case"lineEndingBlank":{Rn[0]==="enter"&&(rr&&!Ys&&!bt&&!Dr&&(Dr=tt),Ys=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ys=void 0}if(!bt&&Rn[0]==="enter"&&Rn[1].type==="listItemPrefix"||bt===-1&&Rn[0]==="exit"&&(Rn[1].type==="listUnordered"||Rn[1].type==="listOrdered")){if(rr){let Dt=tt;for(Kn=void 0;Dt--;){const zt=fe[Dt];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;Kn&&(fe[Kn][1].type="lineEndingBlank",on=!0),zt[1].type="lineEnding",Kn=Dt}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}Dr&&(!Kn||Dr<Kn)&&(rr._spread=!0),rr.end=Object.assign({},Kn?fe[Kn][1].start:Rn[1].end),fe.splice(Kn||tt,0,["exit",rr,Rn[2]]),tt++,Ve++}if(Rn[1].type==="listItemPrefix"){const Dt={type:"listItem",_spread:!1,start:Object.assign({},Rn[1].start),end:void 0};rr=Dt,fe.splice(tt,0,["enter",Dt,Rn[2]]),tt++,Ve++,Dr=void 0,Ys=!0}}}return fe[we][1]._spread=on,Ve}function s(fe,we){return Ve;function Ve(tt){l.call(this,fe(tt),tt),we&&we.call(this,tt)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(fe,we,Ve){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([we,Ve||void 0]),fe.position={start:oo(we.start),end:void 0}}function c(fe){return we;function we(Ve){fe&&fe.call(this,Ve),d.call(this,Ve)}}function d(fe,we){const Ve=this.stack.pop(),tt=this.tokenStack.pop();if(tt)tt[0].type!==fe.type&&(we?we.call(this,fe,tt[0]):(tt[1]||JR).call(this,fe,tt[0]));else throw new Error("Cannot close `"+fe.type+"` ("+ih({start:fe.start,end:fe.end})+"): it’s not open");Ve.position.end=oo(fe.end)}function h(){return Yae(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(fe){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function g(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.lang=fe}function x(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.meta=fe}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe.replace(/(\r?\n|\r)$/g,"")}function w(fe){const we=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=we,Ve.identifier=hu(this.sliceSerialize(fe)).toLowerCase()}function N(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.title=fe}function k(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.url=fe}function C(fe){const we=this.stack[this.stack.length-1];if(!we.depth){const Ve=this.sliceSerialize(fe).length;we.depth=Ve}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function E(fe){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function D(fe){const Ve=this.stack[this.stack.length-1].children;let tt=Ve[Ve.length-1];(!tt||tt.type!=="text")&&(tt=Je(),tt.position={start:oo(fe.start),end:void 0},Ve.push(tt)),this.stack.push(tt)}function B(fe){const we=this.stack.pop();we.value+=this.sliceSerialize(fe),we.position.end=oo(fe.end)}function O(fe){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=we.children[we.children.length-1];Ve.position.end=oo(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(D.call(this,fe),B.call(this,fe))}function M(){this.data.atHardBreak=!0}function $(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function F(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function W(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.value=fe}function q(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=we,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function K(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=we,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function L(fe){const we=this.sliceSerialize(fe),Ve=this.stack[this.stack.length-2];Ve.label=Gle(we),Ve.identifier=hu(we).toLowerCase()}function H(){const fe=this.stack[this.stack.length-1],we=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const tt=fe.children;Ve.children=tt}else Ve.alt=we}function I(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.url=fe}function V(){const fe=this.resume(),we=this.stack[this.stack.length-1];we.title=fe}function G(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function oe(fe){const we=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=we,Ve.identifier=hu(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function pe(fe){this.data.characterReferenceType=fe.type}function ue(fe){const we=this.sliceSerialize(fe),Ve=this.data.characterReferenceType;let tt;Ve?(tt=Uz(we,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):tt=YA(we);const bt=this.stack[this.stack.length-1];bt.value+=tt}function me(fe){const we=this.stack.pop();we.position.end=oo(fe.end)}function Ne(fe){B.call(this,fe);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(fe)}function ee(fe){B.call(this,fe);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(fe)}function de(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ue(){return{type:"emphasis",children:[]}}function jt(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function Rt(){return{type:"html",value:""}}function nr(){return{type:"image",title:null,url:"",alt:null}}function vn(){return{type:"link",title:null,url:"",children:[]}}function _r(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Hn(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Nr(){return{type:"paragraph",children:[]}}function ge(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function oo(e){return{line:e.line,column:e.column,offset:e.offset}}function e8(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?e8(e,r):Jle(e,r)}}function Jle(e,t){let n;for(n in t)if(Zz.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function JR(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ih({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ih({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ih({start:t.start,end:t.end})+") is still open")}function Zle(e){const t=this;t.parser=n;function n(r){return Xle(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ece(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function tce(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
591`}]}function nce(e,t){const n=t.value?t.value+`
592`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function rce(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ice(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sce(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=_d(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function ace(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oce(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function t8(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function lce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);const i={src:_d(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function cce(e,t){const n={src:_d(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function uce(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function dce(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t8(e,t);const i={href:_d(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function fce(e,t){const n={href:_d(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hce(e,t,n){const r=e.all(t),i=n?pce(n):n8(t),s={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
593`}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
594`});const d={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,d),e.applyData(t,d)}function pce(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=n8(n[r])}return t}function n8(e){const t=e.spread;return t??e.children.length>1}function mce(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function gce(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yce(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function vce(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xce(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=WA(t.children[1]),c=Iz(t.children[t.children.length-1]);l&&c&&(a.position={start:l,end:c}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function bce(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const f=t.children[c],m={},g=a?a[c]:void 0;g&&(m.align=g);let x={type:"element",tagName:s,properties:m,children:[]};f&&(x.children=e.all(f),e.patch(f,x),x=e.applyData(f,x)),d.push(x)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function wce(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ZR=9,eD=32;function jce(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(tD(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(tD(t.slice(i),i>0,!1)),s.join("")}function tD(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===ZR||s===eD;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===ZR||s===eD;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Sce(e,t){const n={type:"text",value:jce(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function _ce(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Nce={blockquote:ece,break:tce,code:nce,delete:rce,emphasis:ice,footnoteReference:sce,heading:ace,html:oce,imageReference:lce,image:cce,inlineCode:uce,linkReference:dce,link:fce,listItem:hce,list:mce,paragraph:gce,root:yce,strong:vce,table:xce,tableCell:wce,tableRow:bce,text:Sce,thematicBreak:_ce,toml:kg,yaml:kg,definition:kg,footnoteDefinition:kg};function kg(){}const r8=-1,bx=0,ah=1,Ly=2,JA=3,ZA=4,ek=5,tk=6,i8=7,s8=8,nD=typeof self=="object"?self:globalThis,Cce=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case bx:case r8:return n(a,i);case ah:{const l=n([],i);for(const c of a)l.push(r(c));return l}case Ly:{const l=n({},i);for(const[c,d]of a)l[r(c)]=r(d);return l}case JA:return n(new Date(a),i);case ZA:{const{source:l,flags:c}=a;return n(new RegExp(l,c),i)}case ek:{const l=n(new Map,i);for(const[c,d]of a)l.set(r(c),r(d));return l}case tk:{const l=n(new Set,i);for(const c of a)l.add(r(c));return l}case i8:{const{name:l,message:c}=a;return n(new nD[l](c),i)}case s8:return n(BigInt(a),i);
vendor: 6,696 bytes, lines 594-596
594case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(new nD[s](a),i)};return r},rD=e=>Cce(new Map,e)(0),Vc="",{toString:Pce}={},{keys:Ace}=Object,Tf=e=>{const t=typeof e;if(t!=="object"||!e)return[bx,t];const n=Pce.call(e).slice(8,-1);switch(n){case"Array":return[ah,Vc];case"Object":return[Ly,Vc];case"Date":return[JA,Vc];case"RegExp":return[ZA,Vc];case"Map":return[ek,Vc];case"Set":return[tk,Vc];case"DataView":return[ah,n]}return n.includes("Array")?[ah,n]:n.includes("Error")?[i8,n]:[Ly,n]},Eg=([e,t])=>e===bx&&(t==="function"||t==="symbol"),kce=(e,t,n,r)=>{const i=(a,l)=>{const c=r.push(a)-1;return n.set(l,c),c},s=a=>{if(n.has(a))return n.get(a);let[l,c]=Tf(a);switch(l){case bx:{let h=a;switch(c){case"bigint":l=s8,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([r8],a)}return i([l,h],a)}case ah:{if(c){let m=a;return c==="DataView"?m=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(a)),i([c,[...m]],a)}const h=[],f=i([l,h],a);for(const m of a)h.push(s(m));return f}case Ly:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],f=i([l,h],a);for(const m of Ace(a))(e||!Eg(Tf(a[m])))&&h.push([s(m),s(a[m])]);return f}case JA:return i([l,a.toISOString()],a);case ZA:{const{source:h,flags:f}=a;return i([l,{source:h,flags:f}],a)}case ek:{const h=[],f=i([l,h],a);for(const[m,g]of a)(e||!(Eg(Tf(m))||Eg(Tf(g))))&&h.push([s(m),s(g)]);return f}case tk:{const h=[],f=i([l,h],a);for(const m of a)(e||!Eg(Tf(m)))&&h.push(s(m));return f}}const{message:d}=a;return i([l,{name:c,message:d}],a)};return s},iD=(e,{json:t,lossy:n}={})=>{const r=[];return kce(!(t||n),!!t,new Map,r)(e),r},$y=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rD(iD(e,t)):structuredClone(e):(e,t)=>rD(iD(e,t));function Ece(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Tce(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Oce(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ece,r=e.options.footnoteBackLabel||Tce,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const h=e.all(d),f=String(d.identifier).toUpperCase(),m=_d(f.toLowerCase());let g=0;const x=[],v=e.footnoteCounts.get(f);for(;v!==void 0&&++g<=v;){x.length>0&&x.push({type:"text",value:" "});let w=typeof n=="string"?n:n(c,g);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const b=h[h.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const w=b.children[b.children.length-1];w&&w.type==="text"?w.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...x)}else h.push(...x);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(d,j),l.push(j)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...$y(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
595`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
596`}]}}const a8=(function(e){if(e==null)return Ice;if(typeof e=="function")return wx(e);if(typeof e=="object")return Array.isArray(e)?Mce(e):Rce(e);if(typeof e=="string")return Dce(e);throw new Error("Expected function, string, or object as test")});function Mce(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=a8(e[n]);return wx(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Rce(e){const t=e;return wx(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Dce(e){return wx(t);function t(n){return n&&n.type===e}}function wx(e){return t;function t(n,r,i){return!!(Lce(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Ice(){return!0}function Lce(e){return e!==null&&typeof e=="object"&&"type"in e}const o8=[],$ce=!0,sD=!1,Fce="skip";function Bce(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=a8(i),a=r?-1:1;l(e,void 0,[])();function l(c,d,h){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const g=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=o8,x,v,b;if((!t||s(c,d,h[h.length-1]||void 0))&&(g=qce(n(c,h)),g[0]===sD))return g;if("children"in c&&c.children){const j=c;if(j.children&&g[0]!==Fce)for(v=(r?j.children.length:-1)+a,b=h.concat(j);v>-1&&v<j.children.length;){const w=j.children[v];if(x=l(w,v,b)(),x[0]===sD)return x;v=typeof x[1]=="number"?x[1]:v+a}}return g}}}function qce(e){return Array.isArray(e)?e:typeof e=="number"?[$ce,e]:e==null?o8:[e]}function l8(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Bce(e,s,l,i);function l(c,d){const h=d[d.length-1],f=h?h.children.indexOf(c):void 0;return a(c,f,h)}}const yC={}.hasOwnProperty,zce={};function Uce(e,t){const n=t||zce,r=new Map,i=new Map,s=new Map,a={...Nce,...n.handlers},l={all:d,applyData:Wce,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:c,options:n,patch:Vce,wrap:Kce};return l8(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const f=h.type==="definition"?r:i,m=String(h.identifier).toUpperCase();f.has(m)||f.set(m,h)}}),l;function c(h,f){const m=h.type,g=l.handlers[m];if(yC.call(l.handlers,m)&&g)return g(l,h,f);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in h){const{children:v,...b}=h,j=$y(b);return j.children=l.all(h),j}return $y(h)}return(l.options.unknownHandler||Hce)(l,h,f)}function d(h){const f=[];if("children"in h){const m=h.children;let g=-1;for(;++g<m.length;){const x=l.one(m[g],h);if(x){if(g&&m[g-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=aD(x.value)),!Array.isArray(x)&&x.type==="element")){const v=
vendor: 9,035 bytes, lines 596-600
596x.children[0];v&&v.type==="text"&&(v.value=aD(v.value))}Array.isArray(x)?f.push(...x):f.push(x)}}}return f}}function Vce(e,t){e.position&&(t.position=Pae(e))}function Wce(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,$y(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Hce(e,t){const n=t.data||{},r="value"in t&&!(yC.call(n,"hProperties")||yC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Kce(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
597`});++r<e.length;)r&&n.push({type:"text",value:`
598`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
599`}),n}function aD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oD(e,t){const n=Uce(e,t),r=n.one(e,void 0),i=Oce(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
600`},i),s}function Gce(e,t){return e&&"run"in e?async function(n,r){const i=oD(n,{file:r,...t});await e.run(i,r)}:function(n,r){return oD(n,{file:r,...e||t})}}function lD(e){if(e)throw e}var Hw,cD;function Yce(){if(cD)return Hw;cD=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},s=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!f)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},a=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},l=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return Hw=function c(){var d,h,f,m,g,x,v=arguments[0],b=1,j=arguments.length,w=!1;for(typeof v=="boolean"&&(w=v,v=arguments[1]||{},b=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});b<j;++b)if(d=arguments[b],d!=null)for(h in d)f=l(v,h),m=l(d,h),v!==m&&(w&&m&&(s(m)||(g=i(m)))?(g?(g=!1,x=f&&i(f)?f:[]):x=f&&s(f)?f:{},a(v,{name:h,newValue:c(w,x,m)})):typeof m<"u"&&a(v,{name:h,newValue:m}));return v},Hw}var Xce=Yce();const Kw=Ot(Xce);function vC(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qce(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...i);function l(c,...d){const h=e[++s];let f=-1;if(c){a(c);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,h?Jce(h,l)(...d):a(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Jce(e,t){let n;return r;function r(...a){const l=e.length>a.length;let c;l&&a.push(i);try{c=e.apply(this,a)}catch(d){const h=d;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(a,...l){n||(n=!0,t(a,...l))}function s(a){i(null,a)}}const _s={basename:Zce,dirname:eue,extname:tue,join:nue,sep:"/"};function Zce(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Op(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function eue(e){if(Op(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tue(e){Op(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function nue(...e){let t=-1,n;for(;++t<e.length;)Op(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rue(n)}function rue(e){Op(e);const t=e.codePointAt(0)===47;let n=iue(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iue(e,t){let n="",r=0,i=-1,s=0,a=-1,l,c;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function Op(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sue={cwd:aue};function aue(){return"/"}function xC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oue(e){if(typeof e=="string")e=new URL(e);else if(!xC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return lue(e)}function lue(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Gw=["history","path","basename","stem","extname","dirname"];class c8{constructor(t){let n;t?xC(t)?n={path:t}:typeof t=="string"||cue(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sue.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Gw.length;){const s=Gw[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Gw.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?_s.basename(this.path):void 0}set basename(t){Xw(t,"basename"),Yw(t,"basename"),this.path=_s.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_s.dirname(this.path):void 0}set dirname(t){uD(this.basename,"dirname"),this.path=_s.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_s.extname(this.path):void 0}set extname(t){if(Yw(t,"extname"),uD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_s.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){xC(t)&&(t=oue(t)),Xw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_s.basename(this.path,this.extname):void 0}set stem(t){Xw(t,"stem"),Yw(t,"stem"),this.path=_s.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new jr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yw(e,t){if(e&&e.includes(_s.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_s.sep+"`")}function Xw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cue(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uue=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),due={}.hasOwnProperty;
vendor: 6,384 bytes, line 600
600class nk extends uue{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Qce()}copy(){const t=new nk;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Kw(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zw("data",this.frozen),this.namespace[t]=n,this):due.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zw("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Tg(t),r=this.parser||this.Parser;return Qw("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Qw("process",this.parser||this.Parser),Jw("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const l=Tg(t),c=r.parse(l);r.run(c,l,function(h,f,m){if(h||!f||!m)return d(h);const g=f,x=r.stringify(g,m);pue(x)?m.value=x:m.result=x,d(h,m)});function d(h,f){h||!f?a(h):s?s(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Qw("processSync",this.parser||this.Parser),Jw("processSync",this.compiler||this.Compiler),this.process(t,i),fD("processSync","process",n),r;function i(s,a){n=!0,lD(s),r=a}}run(t,n,r){dD(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,l){const c=Tg(n);i.run(t,c,d);function d(h,f,m){const g=f||t;h?l(h):a?a(g):r(void 0,g,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),fD("runSync","run",r),i;function s(a,l){lD(a),i=l,r=!0}}stringify(t,n){this.freeze();const r=Tg(n),i=this.compiler||this.Compiler;return Jw("stringify",i),dD(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Zw("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...f]=d;c(h,f)}else a(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function a(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(d.plugins),d.settings&&(i.settings=Kw(!0,i.settings,d.settings))}function l(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const f=d[h];s(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,h){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===d){m=f;break}if(m===-1)r.push([d,...h]);else if(h.length>0){let[g,...x]=h;const v=r[m][1];vC(v)&&vC(g)&&(g=Kw(!0,v,g)),r[m]=[d,g,...x]}}}}const fue=new nk().freeze();function Qw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zw(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dD(e){if(!vC(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tg(e){return hue(e)?e:new c8(e)}function hue(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pue(e){return typeof e=="string"||mue(e)}function mue(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gue="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hD=[],pD={allowDangerousHtml:!0},yue=/^(https?|ircs?|mailto|xmpp)$/i,vue=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function xue(e){const t=bue(e),n=wue(e);return jue(t.runSync(t.parse(n),n),e)}function bue(e){const t=e.rehypePlugins||hD,n=e.remarkPlugins||hD,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pD}:pD;return fue().use(Zle).use(n).use(Gce,r).use(t)}function wue(e){const t=e.children||"",n=new c8;return typeof t=="string"&&(n.value=t),n}function jue(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Sue;for(const h of vue)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+gue+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),l8(e,d),Oae(e,{Fragment:o.Fragment,components:i,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function d(h,f,m){if(h.type==="raw"&&m&&typeof f=="number")return a?m.children.splice(f,1):m.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let g;for(g in Uw)if(Object.hasOwn(Uw,g)&&Object.hasOwn(h.properties,g)){const x=h.properties[g],v=Uw[g];
600(v===null||v.includes(h.tagName))&&(h.properties[g]=c(String(x||""),g,h))}}if(h.type==="element"){let g=n?!n.includes(h.tagName):s?s.includes(h.tagName):!1;if(!g&&r&&typeof f=="number"&&(g=!r(h,f,m)),g&&m&&typeof f=="number")return l&&h.children?m.children.splice(f,1,...h.children):m.children.splice(f,1),f}}}function Sue(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||yue.test(e.slice(0,t))?e:""}const _ue=[{icon:vh,text:"How many dives did each staff member complete this month?"},{icon:vi,text:"How many days of leave has each staff member taken this year?"},{icon:Jr,text:"Which customer has spent the most money with us?"},{icon:vh,text:"What are our top selling products?"},{icon:Jr,text:"Which customers have booked conservation programs?"},{icon:vi,text:"Show me sales summary for last month"}];function Nue(){const[e,t]=_.useState(""),[n,r]=_.useState([]),[i,s]=_.useState(!1),{data:a=[],isLoading:l}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list()}),{data:c=[],isLoading:d}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:h=[],isLoading:f}=Ee({queryKey:["customers"],queryFn:()=>ne.entities.Customer.list()}),{data:m=[],isLoading:g}=Ee({queryKey:["staff"],queryFn:()=>ne.entities.User.list()}),{data:x=[],isLoading:v}=Ee({queryKey:["leaveRequests"],queryFn:()=>ne.entities.LeaveRequest.list()}),{data:b=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),j=l||d||f||g||v,w=async k=>{const C=k||e;if(C.trim()){r(A=>[...A,{role:"user",content:C}]),t(""),s(!0);try{const A=`
601Here is the business data to analyze:
602
603STAFF MEMBERS (${m.length} total):
604${m.map(P=>`- ${P.full_name} (${P.email}, role: ${P.role})`).join(`
605`)}
606
607SALES RECORDS (${a.length} total):
608${a.map(P=>{const D=c.find(O=>O.id===P.product_id),B=m.find(O=>O.id===P.staff_id);return`- Sale ID: ${P.id}, Product: ${(D==null?void 0:D.name)||"Unknown"}, Customer: ${P.customer_name||"N/A"}, Staff: ${(B==null?void 0:B.full_name)||"Unassigned"}, Amount: ${P.total_amount} IDR, Date: ${P.start_date||P.sale_date}, Status: ${P.payment_status}`}).join(`
609`)}
610
611PRODUCTS (${c.length} total):
612${c.map(P=>`- ${P.name} (Category: ${P.category}, Price: ${P.price}
612 ${P.display_currency||"IDR"})`).join(`
613`)}
614
615CUSTOMERS (${h.length} total):
616${h.map(P=>`- ${P.name} (${P.email}, Dive Level: ${P.dive_level||"Not specified"})`).join(`
617`)}
618
619LEAVE REQUESTS (${x.length} total):
620${x.map(P=>{const D=m.find(B=>B.id===P.staff_id);return`- Staff: ${P.staff_name||(D==null?void 0:D.full_name)||"Unknown"}, Type: ${P.leave_type}, From: ${P.start_date}, To: ${P.end_date}, Status: ${P.status}`}).join(`
621`)}
622
623Today's date is: ${new Date().toISOString().split("T")[0]}
624`,E=await ne.integrations.Core.InvokeLLM({prompt:`You are a helpful business analytics assistant for Big Fins, a dive shop in Bali. 
625Analyze the following business data and answer the user's question clearly and concisely.
626Format your response nicely with bullet points or tables where appropriate.
627Use markdown formatting for better readability.
628If calculating totals or counts, show your work briefly.
629For currency, use IDR (Indonesian Rupiah) and format large numbers with thousands separators.
630
631${A}
632
633User's Question: ${C}
634
635Please provide a clear, helpful answer based on the data above.`});r(P=>[...P,{role:"assistant",content:E}])}catch{r(E=>[...E,{role:"assistant",content:"Sorry, I encountered an error while analyzing the data. Please try again."}])}finally{s(!1)}}},N=k=>{k.preventDefault(),w()};return o.jsx("div",{className:"min-h-screen bg-slate-50 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-4xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("div",{className:"p-2 rounded-xl bg-gradient-to-br from-violet-500 to-purple-600",children:o.jsx(NA,{className:"w-6 h-6 text-white"})}),o.jsx("h1",{className:"text-2xl font-semibold text-slate-800",children:"AI Reports"})]}),o.jsx("p",{className:"text-slate-500",children:"Ask questions about your business data in natural language"})]}),o.jsxs(lt,{className:"mb-6 min-h-[400px] flex flex-col",children:[o.jsx(dt,{className:"flex-1 p-6 overflow-y-auto max-h-[500px]",children:j?o.jsxs("div",{className:"flex items-center justify-center py-12",children:[o.jsx(wr,{className:"w-8 h-8 animate-spin text-violet-500"}),o.jsx("span",{className:"ml-3 text-slate-500",children:"Loading business data..."})]}):n.length===0?o.jsxs("div",{className:"text-center py-8",children:[o.jsx(Pw,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium text-slate-600 mb-2",children:"Ask me anything about your data"}),o.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"I can analyze sales, staff performance, customer spending, and more"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-left",children:_ue.map((k,C)=>o.jsxs("button",{onClick:()=>w(k.text),className:"flex items-start gap-3 p-3 rounded-lg border border-slate-200 hover:border-violet-300 hover:bg-violet-50 transition-colors text-left",children:[o.jsx(k.icon,{className:"w-5 h-5 text-violet-500 mt-0.5 flex-shrink-0"}),o.jsx("span",{className:"text-sm text-slate-600",children:k.text})]},C))})]}):o.jsxs("div",{className:"space-y-6",children:[n.map((k,C)=>o.jsxs("div",{className:`flex gap-3 ${k.role==="user"?"justify-end":""}`,children:[k.role==="assistant"&&o.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center flex-shrink-0",children:o.jsx(Pw,{className:"w-4 h-4 text-white"})}),o.jsx("div",{className:`max-w-[80%] rounded-2xl px-4 py-3 ${k.role==="user"?"bg-slate-800 text-white":"bg-slate-100 text-slate-700"}`,children:k.role==="user"?o.jsx("p",{children:k.content}):o.jsx(xue,{className:"prose prose-sm max-w-none prose-slate [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:k.content})}),k.role==="user"&&o.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-200 flex items-center justify-center flex-shrink-0",children:o.jsx(Ca,{className:"w-4 h-4 text-slate-600"})})]},C)),i&&o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center",children:o.jsx(Pw,{className:"w-4 h-4 text-white"})}),o.jsx("div",{className:"bg-slate-100 rounded-2xl px-4 py-3",children:o.jsx(wr,{className:"w-5 h-5 animate-spin text-violet-500"})})]})]})}),o.jsx("div",{className:"p-4 border-t",children:o.jsxs("form",{onSubmit:N,className:"flex gap-3",children:[o.jsx(ye,{value:e,onCh
vendor: 10,564 bytes, line 635
635ange:k=>t(k.target.value),placeholder:"Ask a question about your business data...",className:"flex-1",disabled:i||j}),o.jsx(re,{type:"submit",disabled:i||j||!e.trim(),className:"bg-gradient-to-r from-violet-600 to-purple-600 hover:from-violet-700 hover:to-purple-700",children:o.jsx(WZ,{className:"w-4 h-4"})})]})})]}),n.length>0&&o.jsx("div",{className:"text-center",children:o.jsx(re,{variant:"ghost",size:"sm",onClick:()=>r([]),className:"text-slate-400 hover:text-slate-600",children:"Clear conversation"})})]})})}function Cue(){return o.jsx(ms,{children:o.jsx(Nue,{})})}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Pue(e,t){const n=_.createContext(t),r=s=>{const{children:a,...l}=s,c=_.useMemo(()=>l,Object.values(l));return o.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function i(s){const a=_.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function ei(e,t=[]){let n=[];function r(s,a){const l=_.createContext(a),c=n.length;n=[...n,a];const d=f=>{var j;const{scope:m,children:g,...x}=f,v=((j=m==null?void 0:m[e])==null?void 0:j[c])||l,b=_.useMemo(()=>x,Object.values(x));return o.jsx(v.Provider,{value:b,children:g})};d.displayName=s+"Provider";function h(f,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||l,x=_.useContext(g);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,h]}const i=()=>{const s=n.map(a=>_.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return _.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,Aue(i,...t)]}function Aue(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((l,{useScope:c,scopeName:d})=>{const f=c(s)[`__scope${d}`];return{...l,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function rk(e){const t=e+"CollectionProvider",[n,r]=ei(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:b,children:j}=v,w=X.useRef(null),N=X.useRef(new Map).current;return o.jsx(i,{scope:b,itemMap:N,collectionRef:w,children:j})};a.displayName=t;const l=e+"CollectionSlot",c=Ro(l),d=X.forwardRef((v,b)=>{const{scope:j,children:w}=v,N=s(l,j),k=yt(b,N.collectionRef);return o.jsx(c,{ref:k,children:w})});d.displayName=l;const h=e+"CollectionItemSlot",f="data-radix-collection-item",m=Ro(h),g=X.forwardRef((v,b)=>{const{scope:j,children:w,...N}=v,k=X.useRef(null),C=yt(b,k),A=s(h,j);return X.useEffect(()=>(A.itemMap.set(k,{ref:k,...N}),()=>void A.itemMap.delete(k))),o.jsx(m,{[f]:"",ref:C,children:w})});g.displayName=h;function x(v){const b=s(e+"CollectionConsumer",v);return X.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const N=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((A,E)=>N.indexOf(A.ref.current)-N.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:d,ItemSlot:g},x,r]}var Mn=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},kue=wA[" useId ".trim().toString()]||(()=>{}),Eue=0;function cs(e){const[t,n]=_.useState(kue());return Mn(()=>{n(r=>r??String(Eue++))},[e]),t?`radix-${t}`:""}var Tue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=Tue.reduce((e,t)=>{const n=Ro(`Primitive.${t}`),r=_.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function u8(e,t){e&&Np.flushSync(()=>e.dispatchEvent(t))}function er(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Oue=wA[" useInsertionEffect ".trim().toString()]||Mn;function Pa({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=Mue({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const h=_.useRef(e!==void 0);_.useEffect(()=>{const f=h.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,r])}const d=_.useCallback(h=>{var f;if(l){const m=Rue(h)?h(e):h;m!==e&&((f=a.current)==null||f.call(a,m))}else s(h)},[l,e,s,a]);return[c,d]}function Mue({defaultProp:e,onChange:t}){const[n,r]=_.useState(e),i=_.useRef(n),s=_.useRef(t);return Oue(()=>{s.current=t},[t]),_.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function Rue(e){return typeof e=="function"}var Due=_.createContext(void 0);function Mp(e){const t=_.useContext(Due);return e||t||"ltr"}var e1="rovingFocusGroup.onEntryFocus",Iue={bubbles:!1,cancelable:!0},Rp="RovingFocusGroup",[bC,d8,Lue]=rk(Rp),[$ue,jx]=ei(Rp,[Lue]),[Fue,Bue]=$ue(Rp),f8=_.forwardRef((e,t)=>o.jsx(bC.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(bC.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(que,{...e,ref:t})})}));f8.displayName=Rp;var que=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...f}=e,m=_.useRef(null),g=yt(t,m),x=Mp(s),[v,b]=Pa({prop:a,defaultProp:l??null,onChange:c,caller:Rp}),[j,w]=_.useState(!1),N=er(d),k=d8(n),C=_.useRef(!1),[A,E]=_.useState(0);return _.useEffect(()=>{const P=m.current;if(P)return P.addEventListener(e1,N),()=>P.removeEventListener(e1,N)},[N]),o.jsx(Fue,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:v,onItemFocus:_.useCallback(P=>b(P),[b]),onItemShiftTab:_.useCallback(()=>w(!0),[]),onFocusableItemAdd:_.useCallback(()=>E(P=>P+1),[]),onFocusableItemRemove:_.useCallback(()=>E(P=>P-1),[]),children:o.jsx(Ge.div,{tabIndex:j||A===0?-1:0,"data-orientation":r,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{C.current=!0}),onFocus:Oe(e.onFocus,P=>{const D=!C.current;if(P.target===P.currentTarget&&D&&!j){const B=new CustomEvent(e1,Iue);if(P.currentTarget.dispatchEvent(B),!B.defaultPrevented){const O=k().filter(q=>q.focusable),M=O.find(q=>q.active),$=O.find(q=>q.id===v),W=[M,$,...O].filter(Boolean).map(q=>q.ref.current);m8(W,h)}}C.current=!1}),onBlur:Oe(e.onBlur,()=>w(!1))})})}),h8="RovingFocusGroupItem",p8=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=cs(),d=s||c,h=Bue(h8,n),f=h.currentTabStopId===d,m=d8(n),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:v}=h;return _.useEffect(()=>{if(r)return g(),()=>x()},[r,g,x]),o.jsx(bC.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:o.jsx(Ge.span,{tabIndex:f?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:Oe(e.onMouseDown,b=>{r?h.onItemFocus(d):b.preventDefault()}),onFocus:Oe(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:Oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){h.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const j=Vue(b,h.orientation,h.dir);if(j!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let N=m().filter(k=>k.focusable).map(k=>k.ref.current);if(j==="last")N.reverse();else if(j==="prev"||j==="next"){j==="prev"&&N.reverse();const k=N.indexOf(b.currentTarget);N=h.loop?Wue(N,k+1):N.slice(k+1)}setTimeout(()=>m8(N))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:v!=null}):a})})});p8.displayName=h8;var zue={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uue(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vue(e,t,n){const r=Uue(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return zue[r]}function m8(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Wue(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var g8=f8,y8=p8;function Hue(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var Sr=e=>{const{present:t,children:n}=e,r=Kue(t),i=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),s=yt(r.ref,Gue(i));return typeof n=="function"||r.isPresent?_.cloneElement(i,{ref:s}):null};Sr.displayName="Presence";function Kue(e){const[t,n]=_.useState(),r=_.useRef(null),i=_.useRef(e),s=_.useRef("none"),a=e?"mounted":"unmounted",[l,c]=Hue(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const d=Og(r.current);s.current=l==="mounted"?d:"none"},[l]),Mn(()=>{const d=r.current,h=i.current;if(h!==e){const m=s.current,g=Og(d);e?c("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(h&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Mn(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,f=g=>{const v=Og(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=g=>{g.target===t&&(s.current=Og(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:_.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Og(e){return(e==null?void 0:e.animationName)||"none"}function Gue(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sx="Tabs",[Yue]=ei(Sx,[jx]),v8=jx(),[Xue,ik]=Yue(Sx),x8=_.forwardRef((e,t)=>
635{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...d}=e,h=Mp(l),[f,m]=Pa({prop:r,onChange:i,defaultProp:s??"",caller:Sx});return o.jsx(Xue,{scope:n,baseId:cs(),value:f,onValueChange:m,orientation:a,dir:h,activationMode:c,children:o.jsx(Ge.div,{dir:h,"data-orientation":a,...d,ref:t})})});x8.displayName=Sx;var b8="TabsList",w8=_.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=ik(b8,n),a=v8(n);return o.jsx(g8,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:o.jsx(Ge.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});w8.displayName=b8;var j8="TabsTrigger",S8=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,a=ik(j8,n),l=v8(n),c=C8(a.baseId,r),d=P8(a.baseId,r),h=r===a.value;return o.jsx(y8,{asChild:!0,...l,focusable:!i,active:h,children:o.jsx(Ge.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:t,onMouseDown:Oe(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Oe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Oe(e.onFocus,()=>{const f=a.activationMode!=="manual";!h&&!i&&f&&a.onValueChange(r)})})})});S8.displayName=j8;var _8="TabsContent",N8=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...a}=e,l=ik(_8,n),c=C8(l.baseId,r),d=P8(l.baseId,r),h=r===l.value,f=_.useRef(h);return _.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),o.jsx(Sr,{present:i||h,children:({present:m})=>o.jsx(Ge.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:d,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&s})})});N8.displayName=_8;function C8(e,t){return`${e}-trigger-${t}`}function P8(e,t){return`${e}-content-${t}`}var Que=x8,A8=w8,k8=S8,E8=N8;const Dp=Que,Nd=_.forwardRef(({className:e,...t},n)=>o.jsx(A8,{ref:n,className:Te("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Nd.displayName=A8.displayName;const Wr=_.forwardRef(({className:e,...t},n)=>o.jsx(k8,{ref:n,className:Te("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 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",e),...t}));Wr.displayName=k8.displayName;const Fi=_.forwardRef(({className:e,...t},n)=>o.jsx(E8,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Fi.displayName=E8.displayName;var Jue="Label",T8=_.forwardRef((e,t)=>o.jsx(Ge.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));T8.displayName=Jue;var O8=T8;const Zue=sx("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),te=_.forwardRef(({className:e,...t},n)=>o.jsx(O8,{ref:n,className:Te(Zue(),e),...t}));te.displayName=O8.displayName;const ur=_.forwardRef(({className:e,...t},n)=>o.jsx("textarea",{className:Te("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ur.displayName="Textarea";function ede(e,t=globalThis==null?void 0:globalThis.document){const n=er(e);_.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}
vendor: 8,920 bytes, line 635
635var tde="DismissableLayer",wC="dismissableLayer.update",nde="dismissableLayer.pointerDownOutside",rde="dismissableLayer.focusOutside",mD,M8=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ip=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,d=_.useContext(M8),[h,f]=_.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=_.useState({}),x=yt(t,E=>f(E)),v=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),j=v.indexOf(b),w=h?v.indexOf(h):-1,N=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=j,C=ade(E=>{const P=E.target,D=[...d.branches].some(B=>B.contains(P));!k||D||(i==null||i(E),a==null||a(E),E.defaultPrevented||l==null||l())},m),A=ode(E=>{const P=E.target;[...d.branches].some(B=>B.contains(P))||(s==null||s(E),a==null||a(E),E.defaultPrevented||l==null||l())},m);return ede(E=>{w===d.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),_.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(mD=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),gD(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=mD)}},[h,m,n,d]),_.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),gD())},[h,d]),_.useEffect(()=>{const E=()=>g({});return document.addEventListener(wC,E),()=>document.removeEventListener(wC,E)},[]),o.jsx(Ge.div,{...c,ref:x,style:{pointerEvents:N?k?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,C.onPointerDownCapture)})});Ip.displayName=tde;var ide="DismissableLayerBranch",sde=_.forwardRef((e,t)=>{const n=_.useContext(M8),r=_.useRef(null),i=yt(t,r);return _.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),o.jsx(Ge.div,{...e,ref:i})});sde.displayName=ide;function ade(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=_.useRef(!1),i=_.useRef(()=>{});return _.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){R8(nde,n,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ode(e,t=globalThis==null?void 0:globalThis.document){const n=er(e),r=_.useRef(!1);return _.useEffect(()=>{const i=s=>{s.target&&!r.current&&R8(rde,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gD(){const e=new CustomEvent(wC);document.dispatchEvent(e)}function R8(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?u8(i,s):i.dispatchEvent(s)}var t1="focusScope.autoFocusOnMount",n1="focusScope.autoFocusOnUnmount",yD={bubbles:!1,cancelable:!0},lde="FocusScope",Lp=_.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=_.useState(null),d=er(i),h=er(s),f=_.useRef(null),m=yt(t,v=>c(v)),g=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let v=function(N){if(g.paused||!l)return;const k=N.target;l.contains(k)?f.current=k:uo(f.current,{select:!0})},b=function(N){if(g.paused||!l)return;const k=N.relatedTarget;k!==null&&(l.contains(k)||uo(f.current,{select:!0}))},j=function(N){if(document.activeElement===document.body)for(const C of N)C.removedNodes.length>0&&uo(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const w=new MutationObserver(j);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),w.disconnect()}}},[r,l,g.paused]),_.useEffect(()=>{if(l){xD.add(g);const v=document.activeElement;if(!l.contains(v)){const j=new CustomEvent(t1,yD);l.addEventListener(t1,d),l.dispatchEvent(j),j.defaultPrevented||(cde(pde(D8(l)),{select:!0}),document.activeElement===v&&uo(l))}return()=>{l.removeEventListener(t1,d),setTimeout(()=>{const j=new CustomEvent(n1,yD);l.addEventListener(n1,h),l.dispatchEvent(j),j.defaultPrevented||uo(v??document.body,{select:!0}),l.removeEventListener(n1,h),xD.remove(g)},0)}}},[l,d,h,g]);const x=_.useCallback(v=>{if(!n&&!r||g.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,j=document.activeElement;if(b&&j){const w=v.currentTarget,[N,k]=ude(w);N&&k?!v.shiftKey&&j===k?(v.preventDefault(),n&&uo(N,{select:!0})):v.shiftKey&&j===N&&(v.preventDefault(),n&&uo(k,{select:!0})):j===w&&v.preventDefault()}},[n,r,g.paused]);return o.jsx(Ge.div,{tabIndex:-1,...a,ref:m,onKeyDown:x})});Lp.displayName=lde;function cde(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(uo(r,{select:t}),document.activeElement!==n)return}function ude(e){const t=D8(e),n=vD(t,e),r=vD(t.reverse(),e);return[n,r]}function D8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function vD(e,t){for(const n of e)if(!dde(n,{upTo:t}))return n}function dde(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 fde(e){return e instanceof HTMLInputElement&&"select"in e}function uo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fde(e)&&t&&e.select()}}var xD=hde();function hde(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bD(e,t),e.unshift(t)},remove(t){var n;e=bD(e,t),(n=e[0])==null||n.resume()}}}function bD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pde(e){return e.filter(t=>t.tagName!=="A")}var mde="Portal",$p=_.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,s]=_.useState(!1);Mn(()=>s(!0),[]);const a=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Bte.createPortal(o.jsx(Ge.div,{...r,ref:t}),a):null});$p.displayName=mde;var r1=0;function _x(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wD()),document.body.insertAdjacentElement("beforeend",e[1]??wD()),r1++,()=>{r1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),r1--}},[])}function wD(){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 ks=function(){return ks=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ks.apply(this,arguments)};function I8(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gde(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var wy="right-scroll-bar-position",jy="width-before-scroll-bar",yde="with-scroll-bars-hidden",vde="--removed-body-scroll-bar-size";function i1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xde(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var bde=typeof window<"u"?_.useLayoutEffect:_.useEffect,jD=new WeakMap;function wde(e,t){var n=xde(null,function(r){return e.forEach(function(i){return i1(i,r)})});return bde(function(){var r=jD.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;
vendor: 4,224 bytes, lines 635-650
635i.forEach(function(l){s.has(l)||i1(l,null)}),s.forEach(function(l){i.has(l)||i1(l,a)})}jD.set(n,e)},[e]),n}function jde(e){return e}function Sde(e,t){t===void 0&&(t=jde);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(s),a=n}var c=function(){var h=a;a=[],h.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(h){a.push(h),d()},filter:function(h){return a=a.filter(h),n}}}};return i}function _de(e){e===void 0&&(e={});var t=Sde(null);return t.options=ks({async:!0,ssr:!1},e),t}var L8=function(e){var t=e.sideCar,n=I8(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return _.createElement(r,ks({},n))};L8.isSideCarExport=!0;function Nde(e,t){return e.useMedium(t),L8}var $8=_de(),s1=function(){},Nx=_.forwardRef(function(e,t){var n=_.useRef(null),r=_.useState({onScrollCapture:s1,onWheelCapture:s1,onTouchMoveCapture:s1}),i=r[0],s=r[1],a=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,h=e.enabled,f=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,v=e.inert,b=e.allowPinchZoom,j=e.as,w=j===void 0?"div":j,N=e.gapMode,k=I8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,A=wde([n,t]),E=ks(ks({},k),i);return _.createElement(_.Fragment,null,h&&_.createElement(C,{sideCar:$8,removeScrollBar:d,shards:f,noRelative:g,noIsolation:x,inert:v,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:N}),a?_.cloneElement(_.Children.only(l),ks(ks({},E),{ref:A})):_.createElement(w,ks({},E,{className:c,ref:A}),l))});Nx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nx.classNames={fullWidth:jy,zeroRight:wy};var Cde=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Pde(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cde();return t&&e.setAttribute("nonce",t),e}function Ade(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kde(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ede=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Pde())&&(Ade(t,n),kde(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tde=function(){var e=Ede();return function(t,n){_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},F8=function(){var e=Tde(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ode={left:0,top:0,right:0,gap:0},a1=function(e){return parseInt(e||"",10)||0},Mde=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[a1(n),a1(r),a1(i)]},Rde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ode;var t=Mde(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Dde=F8(),pu="data-scroll-locked",Ide=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
636  .`.concat(yde,` {
637   overflow: hidden `).concat(r,`;
638   padding-right: `).concat(l,"px ").concat(r,`;
639  }
640  body[`).concat(pu,`] {
641    overflow: hidden `).concat(r,`;
642    overscroll-behavior: contain;
643    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
644    padding-left: `.concat(i,`px;
645    padding-top: `).concat(s,`px;
646    padding-right: `).concat(a,`px;
647    margin-left:0;
648    margin-top:0;
649    margin-right: `).concat(l,"px ").concat(r,`;
650    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
650")].filter(Boolean).join(""),`
651  }
652  
653  .`).concat(wy,` {
654    right: `).concat(l,"px ").concat(r,`;
655  }
656  
657  .`).concat(jy,` {
658    margin-right: `).concat(l,"px ").concat(r,`;
659  }
660  
661  .`).concat(wy," .").concat(wy,` {
662    right: 0 `).concat(r,`;
663  }
664  
665  .`).concat(jy," .").concat(jy,` {
666    margin-right: 0 `).concat(r,`;
667  }
668  
669  body[`).concat(pu,`] {
670    `).concat(vde,": ").concat(l,`px;
671  }
672`)},SD=function(){var e=parseInt(document.body.getAttribute(pu)||"0",10);return isFinite(e)?e:0},Lde=function(){_.useEffect(function(){return document.body.setAttribute(pu,(SD()+1).toString()),function(){var e=SD()-1;e<=0?document.body.removeAttribute(pu):document.body.setAttribute(pu,e.toString())}},[])},$de=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Lde();var s=_.useMemo(function(){return Rde(i)},[i]);return _.createElement(Dde,{styles:Ide(s,!t,i,n?"":"!important")})},jC=!1;if(typeof window<"u")try{var Mg=Object.defineProperty({},"passive",{get:function(){return jC=!0,!0}});window.addEventListener("test",Mg,Mg),window.removeEventListener("test",Mg,Mg)}catch{jC=!1}var Wc=jC?{passive:!1}:!1,Fde=function(e){return e.tagName==="TEXTAREA"},B8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fde(e)&&n[t]==="visible")},Bde=function(e){return B8(e,"overflowY")},qde=function(e){return B8(e,"overflowX")},_D=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=q8(e,r);if(i){var s=z8(e,r),a=s[1],l=s[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zde=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ude=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},q8=function(e,t){return e==="v"?Bde(t):qde(t)},z8=function(e,t){return e==="v"?zde(t):Ude(t)},Vde=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wde=function(e,t,n,r,i){var s=Vde(e,window.getComputedStyle(t).direction),a=s*r,l=n.target,c=t.contains(l),d=!1,h=a>0,f=0,m=0;do{if(!l)break;var g=z8(e,l),x=g[0],v=g[1],b=g[2],j=v-b-s*x;(x||j)&&q8(e,l)&&(f+=j,m+=x);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(h&&Math.abs(f)<1||!h&&Math.abs(m)<1)&&(d=!0),d},Rg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ND=function(e){return[e.deltaX,e.deltaY]},CD=function(e){return e&&"current"in e?e.current:e},Hde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kde=function(e){return`
673  .block-interactivity-`.concat(e,` {pointer-events: none;}
674  .allow-interactivity-`).concat(e,` {pointer-events: all;}
675`)},Gde=0,Hc=[];function Yde(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),i=_.useState(Gde++)[0],s=_.useState(F8)[0],a=_.useRef(e);_.useEffect(function(){a.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=gde([e.lockRef.current],(e.shards||[]).map(CD),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=_.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var j=Rg(v),w=n.current,N="deltaX"in v?v.deltaX:w[0]-j[0],k="deltaY"in v?v.deltaY:w[1]-j[1],C,A=v.target,E=Math.abs(N)>Math.abs(k)?"h":"v";if("touches"in v&&E==="h"&&A.type==="range")return!1;var P=_D(E,A);if(!P)return!0;if(P?C=E:(C=E==="v"?"h":"v",P=_D(E,A)),!P)return!1;if(!r.current&&"changedTouches"in v&&(N||k)&&(r.current=C),!C)return!0;var D=r.current||C;return Wde(D,b,v,D==="h"?N:k)},[]),c=_.useCallback(function(v){var b=v;if(!(!Hc.length||Hc[Hc.length-1]!==s)){var j="deltaY"in b?ND(b):Rg(b),w=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&Hde(C.delta,j)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}
vendor: 4,102 bytes, line 675
675if(!w){var N=(a.current.shards||[]).map(CD).filter(Boolean).filter(function(C){return C.contains(b.target)}),k=N.length>0?l(b,N[0]):!a.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),d=_.useCallback(function(v,b,j,w){var N={name:v,delta:b,target:j,should:w,shadowParent:Xde(j)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(k){return k!==N})},1)},[]),h=_.useCallback(function(v){n.current=Rg(v),r.current=void 0},[]),f=_.useCallback(function(v){d(v.type,ND(v),v.target,l(v,e.lockRef.current))},[]),m=_.useCallback(function(v){d(v.type,Rg(v),v.target,l(v,e.lockRef.current))},[]);_.useEffect(function(){return Hc.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Wc),document.addEventListener("touchmove",c,Wc),document.addEventListener("touchstart",h,Wc),function(){Hc=Hc.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Wc),document.removeEventListener("touchmove",c,Wc),document.removeEventListener("touchstart",h,Wc)}},[]);var g=e.removeScrollBar,x=e.inert;return _.createElement(_.Fragment,null,x?_.createElement(s,{styles:Kde(i)}):null,g?_.createElement($de,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Qde=Nde($8,Yde);var Fp=_.forwardRef(function(e,t){return _.createElement(Nx,ks({},e,{ref:t,sideCar:Qde}))});Fp.classNames=Nx.classNames;var Jde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kc=new WeakMap,Dg=new WeakMap,Ig={},o1=0,U8=function(e){return e&&(e.host||U8(e.parentNode))},Zde=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=U8(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},efe=function(e,t,n,r){var i=Zde(t,Array.isArray(e)?e:[e]);Ig[n]||(Ig[n]=new WeakMap);var s=Ig[n],a=[],l=new Set,c=new Set(i),d=function(f){!f||l.has(f)||(l.add(f),d(f.parentNode))};i.forEach(d);var h=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))h(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",v=(Kc.get(m)||0)+1,b=(s.get(m)||0)+1;Kc.set(m,v),s.set(m,b),a.push(m),v===1&&x&&Dg.set(m,!0),b===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",m,j)}})};return h(t),l.clear(),o1++,function(){a.forEach(function(f){var m=Kc.get(f)-1,g=s.get(f)-1;Kc.set(f,m),s.set(f,g),m||(Dg.has(f)||f.removeAttribute(r),Dg.delete(f)),g||f.removeAttribute(n)}),o1--,o1||(Kc=new WeakMap,Kc=new WeakMap,Dg=new WeakMap,Ig={})}},Cx=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Jde(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),efe(r,i,n,"aria-hidden")):function(){return null}},Px="Dialog",[V8,W8]=ei(Px),[tfe,gs]=V8(Px),H8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=_.useRef(null),c=_.useRef(null),[d,h]=Pa({prop:r,defaultProp:i??!1,onChange:s,caller:Px});return o.jsx(tfe,{scope:t,triggerRef:l,contentRef:c,contentId:cs(),titleId:cs(),descriptionId:cs(),open:d,onOpenChange:h,onOpenToggle:_.useCallback(()=>h(f=>!f),[h]),modal:a,children:n})};H8.displayName=Px;var K8="DialogTrigger",G8=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(K8,n),s=yt(t,i.triggerRef);return o.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ok(i.open),...r,ref:s,onClick:Oe(e.onClick,i.onOpenToggle)})});G8.displayName=K8;var sk="DialogPortal",[nfe,Y8]=V8(sk,{forceMount:void 0}),X8=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=gs(sk,t);return o.jsx(nfe,{scope:t,forceMount:n,children:_.Children.map(r,a=>o.jsx(Sr,{present:n||s.open,children:o.jsx($p,{asChild:!0,container:i,children:a})}))})};X8.displayName=sk;var Fy="DialogOverlay",Q8=_.forwardRef((e,t)=>
vendor: 4,911 bytes, lines 675-679
675{const n=Y8(Fy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=gs(Fy,e.__scopeDialog);return s.modal?o.jsx(Sr,{present:r||s.open,children:o.jsx(ife,{...i,ref:t})}):null});Q8.displayName=Fy;var rfe=Ro("DialogOverlay.RemoveScroll"),ife=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(Fy,n);return o.jsx(Fp,{as:rfe,allowPinchZoom:!0,shards:[i.contentRef],children:o.jsx(Ge.div,{"data-state":ok(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xl="DialogContent",J8=_.forwardRef((e,t)=>{const n=Y8(Xl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=gs(Xl,e.__scopeDialog);return o.jsx(Sr,{present:r||s.open,children:s.modal?o.jsx(sfe,{...i,ref:t}):o.jsx(afe,{...i,ref:t})})});J8.displayName=Xl;var sfe=_.forwardRef((e,t)=>{const n=gs(Xl,e.__scopeDialog),r=_.useRef(null),i=yt(t,n.contentRef,r);return _.useEffect(()=>{const s=r.current;if(s)return Cx(s)},[]),o.jsx(Z8,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,s=>s.preventDefault())})}),afe=_.forwardRef((e,t)=>{const n=gs(Xl,e.__scopeDialog),r=_.useRef(!1),i=_.useRef(!1);return o.jsx(Z8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),Z8=_.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=gs(Xl,n),c=_.useRef(null),d=yt(t,c);return _x(),o.jsxs(o.Fragment,{children:[o.jsx(Lp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:o.jsx(Ip,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ok(l.open),...a,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(lfe,{titleId:l.titleId}),o.jsx(ufe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),ak="DialogTitle",eU=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(ak,n);return o.jsx(Ge.h2,{id:i.titleId,...r,ref:t})});eU.displayName=ak;var tU="DialogDescription",nU=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(tU,n);return o.jsx(Ge.p,{id:i.descriptionId,...r,ref:t})});nU.displayName=tU;var rU="DialogClose",iU=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gs(rU,n);return o.jsx(Ge.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});iU.displayName=rU;function ok(e){return e?"open":"closed"}var sU="DialogTitleWarning",[ofe,aU]=Pue(sU,{contentName:Xl,titleName:ak,docsSlug:"dialog"}),lfe=({titleId:e})=>{const t=aU(sU),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
676
677If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
678
679For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cfe="DialogDescriptionWarning",ufe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aU(cfe).contentName}}.`;return _.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},oU=H8,dfe=G8,lU=X8,lk=Q8,ck=J8,uk=eU,dk=nU,fk=iU;const tn=oU,ffe=lU,cU=_.forwardRef(({className:e,...t},n)=>o.jsx(lk,{ref:n,className:Te("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}));cU.displayName=lk.displayName;const Kt=_.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ffe,{children:[o.jsx(cU,{}),o.jsxs(ck,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
679nded-lg",e),...n,children:[t,o.jsxs(fk,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(xi,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Kt.displayName=ck.displayName;const Un=({className:e,...t})=>o.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Un.displayName="DialogHeader";const uU=({className:e,...t})=>o.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});uU.displayName="DialogFooter";const Vn=_.forwardRef(({className:e,...t},n)=>o.jsx(uk,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Vn.displayName=uk.displayName;const hk=_.forwardRef(({className:e,...t},n)=>o.jsx(dk,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));hk.displayName=dk.displayName;function hfe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let SC=1;class pfe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:SC++,a=this.toasts.find(c=>c.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:l,title:r}):c):this.addToast({title:r,...i,dismissible:l,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const l=i.then(async d=>{if(a=["resolve",d],X.isValidElement(d))s=!1,this.create({id:r,type:"default",message:d});else if(gfe(d)&&!d.ok){s=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,x=typeof f=="object"&&!X.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...x})}else if(d instanceof Error){s=!1;const f=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof f=="object"&&!X.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...x})}else if(n.success!==void 0){s=!1;const f=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof f=="object"&&!X.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...x})}}).catch(async d=>{if(a=["reject",d],n.error!==void 0){s=!1;const h=typeof n.error=="function"?await n.error(d):n.error,f=typeof n.description=="function"?await n.description(d):n.description,g=typeof h=="object"&&!X.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,h)=>l.then(()=>a[0]==="reject"?h(a[1]):d(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||SC++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Oi=new pfe,mfe=(e,t)=>
vendor: 455 bytes, line 679
679{const n=(t==null?void 0:t.id)||SC++;return Oi.addToast({title:e,...t,id:n}),n},gfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yfe=mfe,vfe=()=>Oi.toasts,xfe=()=>Oi.getActiveToasts(),gt=Object.assign(yfe,{success:Oi.success,info:Oi.info,warning:Oi.warning,error:Oi.error,custom:Oi.custom,message:Oi.message,promise:Oi.promise,dismiss:Oi.dismiss,loading:Oi.loading},{getHistory:vfe,getToasts:xfe});hf
vendor: 14,874 bytes, line 679
679e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
679pk(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mk(e){const[t,n]=_.useState(void 0);return Mn(()=>
679{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,l=d.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ax="Switch",[bfe]=ei(Ax),[wfe,jfe]=bfe(Ax),dU=_.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:d,form:h,...f}=e,[m,g]=_.useState(null),x=yt(t,N=>g(N)),v=_.useRef(!1),b=m?h||!!m.closest("form"):!0,[j,w]=Pa({prop:i,defaultProp:s??!1,onChange:d,caller:Ax});return o.jsxs(wfe,{scope:n,checked:j,disabled:l,children:[o.jsx(Ge.button,{type:"button",role:"switch","aria-checked":j,"aria-required":a,"data-state":mU(j),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:x,onClick:Oe(e.onClick,N=>{w(k=>!k),b&&(v.current=N.isPropagationStopped(),v.current||N.stopPropagation())})}),b&&o.jsx(pU,{control:m,bubbles:!v.current,name:r,value:c,checked:j,required:a,disabled:l,form:h,style:{transform:"translateX(-100%)"}})]})});dU.displayName=Ax;var fU="SwitchThumb",hU=_.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=jfe(fU,n);return o.jsx(Ge.span,{"data-state":mU(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});hU.displayName=fU;var Sfe="SwitchBubbleInput",pU=_.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const a=_.useRef(null),l=yt(a,s),c=pk(n),d=mk(t);return _.useEffect(()=>{const h=a.current;if(!h)return;const f=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==n&&g){const x=new Event("click",{bubbles:r});g.call(h,n),h.dispatchEvent(x)}},[c,n,r]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:l,style:{...i.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});pU.displayName=Sfe;function mU(e){return e?"checked":"unchecked"}var gU=dU,_fe=hU;const jn=_.forwardRef(({className:e,...t},n)=>o.jsx(gU,{className:Te("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm 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:n,children:o.jsx(_fe,{className:Te("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));jn.displayName=gU.displayName;function Nfe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),i=hn(),{data:s=[]}=Ee({queryKey:["diveSites"],queryFn:()=>ne.entities.DiveSite.list()}),a=Ye({mutationFn:h=>ne.entities.DiveSite.create(h),onSuccess:()=>{i.invalidateQueries({queryKey:["diveSites"]}),t(!1),r(null),gt.success("Dive site created")}}),l=Ye({mutationFn:({id:h,data:f})=>ne.entities.DiveSite.update(h,f),onSuccess:()=>{i.invalidateQueries({queryKey:["diveSites"]}),t(!1),r(null),gt.success("Dive site updated")}}),c=Ye({mutationFn:h=>ne.entities.DiveSite.delete(h),onSuccess:()=>{i.invalidateQueries({queryKey:["diveSites"]}),gt.success("Dive site deleted")}}),d=h=>{h.preventDefault();const f=new FormData(h.target),m={name:f.get("name"),location:f.get("location"),description:f.get("description"),max_divers:f.get("max_divers")?Number(f.get("max_divers")):void 0,is_active:f.get("is_active")==="on"};n?l.mutate({id:n.id,data:m}):a.mutate(m)};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("h3",{className:"text-lg font-medium",children:"Dive Sites"}),o.jsxs(re,{onClick:()=>{r(null),t(!0)},children:[o.jsx(en,{className:"w-4 h-4 mr-2"})," Add Site"]})]}),o.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(h=>o.jsx(lt,{className:h.is_active?"":"opacity-60",children:o.jsxs(dt,{className:"p-4 space-y-2",children:[o.jsxs("div",{className:"flex justify-between items-start",children:[o.jsx("h4",{className:"font-medium text-slate-800",children:h.name}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{r(h),t(!0)},children:o.jsx(Sp,{className:"w-3 h-3"})}),o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-500",onClick:()=>c.mutate(h.id),children:o.jsx(On,{className:"w-3 h-3"})})]})]}),h.location&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[o.jsx(jZ,{className:"w-4 h-4"}),h.location]}),h.max_divers&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[o.jsx(Jr,{className:"w-4 h-4"}),"Max ",h.max_divers," divers"]}),h.description&&o.jsx("p",{className:"text-sm text-slate-500 line-clamp-2",children:h.description}),!h.is_active&&o.jsx("span",{className:"text-xs text-amber-600",children:"Inactive"})]})},h.id))}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{children:[o.jsx(Un,{children:o.jsxs(Vn,{children:[n?"Edit":"Add"," Dive Site"]})}),o.jsxs("form",{onSubmit:d,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(te,{htmlFor:"name",children:"Site Name *"}),o.jsx(ye,{id:"name",name:"name",required:!0,defaultValue:n==null?void 0:n.name})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"location",children:"Location"}),o.jsx(ye,{id:"location",name:"location",defaultValue:n==null?void 0:n.location})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"max_divers",children:"Max Divers"}),o.jsx(ye,{id:"max_divers",name:"max_divers",type:"number",defaultValue:n==null?void 0:n.max_divers})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"description",children:"Description"}),o.jsx(ur,{id:"description",name:"description",defaultValue:n==null?void 0:n.description})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(jn,{id:"is_active",name:"is_active",defaultChecked:(n==null?void 0:n.is_active)!==!1}),o.jsx(te,{htmlFor:"is_active",children:"Active"})]}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{type:"submit",children:n?"Update":"Create"})]})]})]})})]})}function _C(e,[t,n]){return Math.min(n,Math.max(t,e))}const Cfe=["top","right","bottom","left"],Do=Math.min,di=Math.max,By=Math.round,Lg=Math.floor,Rs=e=>({x:e,y:e}
vendor: 25,812 bytes, line 679
679),Pfe={left:"right",right:"left",bottom:"top",top:"bottom"},Afe={start:"end",end:"start"};function NC(e,t,n){return di(e,Do(t,n))}function Aa(e,t){return typeof e=="function"?e(t):e}function ka(e){return e.split("-")[0]}function Cd(e){return e.split("-")[1]}function gk(e){return e==="x"?"y":"x"}function yk(e){return e==="y"?"height":"width"}const kfe=new Set(["top","bottom"]);function Es(e){return kfe.has(ka(e))?"y":"x"}function vk(e){return gk(Es(e))}function Efe(e,t,n){n===void 0&&(n=!1);const r=Cd(e),i=vk(e),s=yk(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=qy(a)),[a,qy(a)]}function Tfe(e){const t=qy(e);return[CC(e),t,CC(t)]}function CC(e){return e.replace(/start|end/g,t=>Afe[t])}const PD=["left","right"],AD=["right","left"],Ofe=["top","bottom"],Mfe=["bottom","top"];function Rfe(e,t,n){switch(e){case"top":case"bottom":return n?t?AD:PD:t?PD:AD;case"left":case"right":return t?Ofe:Mfe;default:return[]}}function Dfe(e,t,n,r){const i=Cd(e);let s=Rfe(ka(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(CC)))),s}function qy(e){return e.replace(/left|right|bottom|top/g,t=>Pfe[t])}function Ife(e){return{top:0,right:0,bottom:0,left:0,...e}}function yU(e){return typeof e!="number"?Ife(e):{top:e,right:e,bottom:e,left:e}}function zy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kD(e,t,n){let{reference:r,floating:i}=e;const s=Es(t),a=vk(t),l=yk(a),c=ka(t),d=s==="y",h=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(c){case"top":g={x:h,y:r.y-i.height};break;case"bottom":g={x:h,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-i.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Cd(t)){case"start":g[a]-=m*(n&&d?-1:1);break;case"end":g[a]+=m*(n&&d?-1:1);break}return g}const Lfe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:f}=kD(d,r,c),m=r,g={},x=0;for(let v=0;v<l.length;v++){const{name:b,fn:j}=l[v],{x:w,y:N,data:k,reset:C}=await j({x:h,y:f,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:d,platform:a,elements:{reference:e,floating:t}});h=w??h,f=N??f,g={...g,[b]:{...g[b],...k}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(d=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:h,y:f}=kD(d,m,c)),v=-1)}return{x:h,y:f,placement:m,strategy:i,middlewareData:g}};async function Sh(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:f="floating",altBoundary:m=!1,padding:g=0}=Aa(t,e),x=yU(g),b=l[m?f==="floating"?"reference":"floating":f],j=zy(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:h,strategy:c})),w=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),k=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},C=zy(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:N,strategy:c}):w);return{top:(j.top-C.top+x.top)/k.y,bottom:(C.bottom-j.bottom+x.bottom)/k.y,left:(j.left-C.left+x.left)/k.x,right:(C.right-j.right+x.right)/k.x}}const $fe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:c}=t,{element:d,padding:h=0}=Aa(e,t)||{};if(d==null)return{};const f=yU(h),m={x:n,y:r},g=vk(i),x=yk(g),v=await a.getDimensions(d),b=g==="y",j=b?"top":"left",w=b?"bottom":"right",N=b?"clientHeight":"clientWidth",k=s.reference[x]+s.reference[g]-m[g]-s.floating[x],C=m[g]-s.reference[g],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let E=A?A[N]:0;(!E||!await(a.isElement==null?void 0:a.isElement(A)))&&(E=l.floating[N]||s.floating[x]);const P=k/2-C/2,D=E/2-v[x]/2-1,B=Do(f[j],D),O=Do(f[w],D),M=B,$=E-v[x]-O,F=E/2-v[x]/2+P,W=NC(M,F,$),q=!c.arrow&&Cd(i)!=null&&F!==W&&s.reference[x]/2-(F<M?B:O)-v[x]/2<0,K=q?F<M?F-M:F-$:0;return{[g]:m[g]+K,data:{[g]:W,centerOffset:F-W-K,...q&&{alignmentOffset:K}},reset:q}}}),Ffe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...b}=Aa(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const j=ka(i),w=Es(l),N=ka(l)===l,k=await(c.isRTL==null?void 0:c.isRTL(d.floating)),C=m||(N||!v?[qy(l)]:Tfe(l)),A=x!=="none";!m&&A&&C.push(...Dfe(l,v,x,k));const E=[l,...C],P=await Sh(t,b),D=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&D.push(P[j]),f){const F=Efe(i,a,k);D.push(P[F[0]],P[F[1]])}if(B=[...B,{placement:i,overflows:D}],!D.every(F=>F<=0)){var O,M;const F=(((O=s.flip)==null?void 0:O.index)||0)+1,W=E[F];if(W&&(!(f==="alignment"?w!==Es(W):!1)||B.every(L=>Es(L.placement)===w?L.overflows[0]>0:!0)))return{data:{index:F,overflows:B},reset:{placement:W}};let q=(M=B.filter(K=>K.overflows[0]<=0).sort((K,L)=>K.overflows[1]-L.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(g){case"bestFit":{var $;const K=($=B.filter(L=>{if(A){const H=Es(L.placement);return H===w||H==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(H=>H>0).reduce((H,I)=>H+I,0)]).sort((L,H)=>L[1]-H[1])[0])==null?void 0:$[0];K&&(q=K);break}case"initialPlacement":q=l;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function ED(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function TD(e){return Cfe.some(t=>e[t]>=0)}const Bfe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Aa(e,t);switch(r){case"referenceHidden":{const s=await Sh(t,{...i,elementContext:"reference"}),a=ED(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:TD(a)}}}case"escaped":{const s=await Sh(t,{...i,altBoundary:!0}),a=ED(s,n.floating);return{data:{escapedOffsets:a,escaped:TD(a)}}}default:return{}}}}},vU=new Set(["left","top"]);async function qfe(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ka(n),l=Cd(n),c=Es(n)==="y",d=vU.has(a)?-1:1,h=s&&c?-1:1,f=Aa(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof x=="number"&&(g=l==="end"?x*-1:x),c?{x:g*h,y:m*d}:{x:m*d,y:g*h}}const zfe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=t,c=await qfe(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},Ufe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:j,y:w}=b;return{x:j,y:w}}},...c}=Aa(e,t),d={x:n,y:r},h=await Sh(t,c),f=Es(ka(i)),m=gk(f);let g=d[m],x=d[f];if(s){const b=m==="y"?"top":"left",j=m==="y"?"bottom":"right",w=g+h[b],N=g-h[j];g=NC(w,g,N)}if(a){const b=f==="y"?"top":"left",j=f==="y"?"bottom":"right",w=x+h[b],N=x-h[j];x=NC(w,x,N)}const v=l.fn({...t,[m]:g,[f]:x});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[f]:a}}}}}},Vfe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=Aa(e,t),h={x:n,y:r},f=Es(i),m=gk(f);let g=h[m],x=h[f];const v=Aa(l,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const N=m==="y"?"height":"width",k=s.reference[m]-s.floating[N]+b.mainAxis,C=s.reference[m]+s.reference[N]-b.mainAxis;g<k?g=k:g>C&&(g=C)}if(d){var j,w;const N=m==="y"?"width":"height",k=vU.has(ka(i)),C=s.reference[f]-s.floating[N]+(k&&((j=a.offset)==null?void 0:j[f])||0)+(k?0:b.crossAxis),A=s.reference[f]+s.reference[N]+(k?0:((w=a.offset)==null?void 0:w[f])||0)-(k?b.crossAxis:0);x<C?x=C:x>A&&(x=A)}return{[m]:g,[f]:x}}}},Wfe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:l}=t,{apply:c=()=>{},...d}=Aa(e,t),h=await Sh(t,d),f=ka(i),m=Cd(i),g=Es(i)==="y",{width:x,height:v}=s.floating;let b,j;f==="top"||f==="bottom"?(b=f,j=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(j=f,b=m==="end"?"top":"bottom");const w=v-h.top-h.bottom,N=x-h.left-h.right,k=Do(v-h[b],w),C=Do(x-h[j],N),A=!t.middlewareData.shift;let E=k,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),A&&!m){const B=di(h.left,0),O=di(h.right,0),M=di(h.top,0),$=di(h.bottom,0);g?P=x-2*(B!==0||O!==0?B+O:di(h.left,h.right)):E=v-2*(M!==0||$!==0?M+$:di(h.top,h.bottom))}await c({...t,availableWidth:P,availableHeight:E});const D=await a.getDimensions(l.floating);return x!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function kx(){return typeof window<"u"}function Pd(e){return xU(e)?(e.nodeName||"").toLowerCase():"#document"}function pi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vs(e){var t;return(t=(xU(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xU(e){return kx()?e instanceof Node||e instanceof pi(e).Node:!1}function us(e){return kx()?e instanceof Element||e instanceof pi(e).Element:!1}function zs(e){return kx()?e instanceof HTMLElement||e instanceof pi(e).HTMLElement:!1}function OD(e){return!kx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pi(e).ShadowRoot}const Hfe=new Set(["inline","contents"]);function Bp(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ds(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hfe.has(i)}const Kfe=new Set(["table","td","th"]);function Gfe(e){return Kfe.has(Pd(e))}const Yfe=[":popover-open",":modal"];function Ex(e){return Yfe.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xfe=["transform","translate","scale","rotate","perspective"],Qfe=["transform","translate","scale","rotate","perspective","filter"],Jfe=["paint","layout","strict","content"];function xk(e){const t=bk(),n=us(e)?ds(e):e;return Xfe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Qfe.some(r=>(n.willChange||"").includes(r))||Jfe.some(r=>(n.contain||"").includes(r))}function Zfe(e){let t=Io(e);for(;zs(t)&&!Ru(t);){if(xk(t))return t;if(Ex(t))return null;t=Io(t)}return null}function bk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ehe=new Set(["html","body","#document"]);function Ru(e){return ehe.has(Pd(e))}function ds(e){return pi(e).getComputedStyle(e)}function Tx(e){return us(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Io(e){if(Pd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||OD(e)&&e.host||Vs(e);return OD(t)?t.host:t}function bU(e){const t=Io(e);return Ru(t)?e.ownerDocument?e.ownerDocument.body:e.body:zs(t)&&Bp(t)?t:bU(t)}function _h(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=bU(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=pi(i);if(s){const l=PC(a);return t.concat(a,a.visualViewport||[],Bp(i)?i:[],l&&n?_h(l):[])}return t.concat(i,_h(i,[],n))}function PC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wU(e){const t=ds(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=zs(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=By(n)!==s||By(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function wk(e){return us(e)?e:e.contextElement}function mu(e){const t=wk(e);if(!zs(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=wU(t);let a=(s?By(n.width):n.width)/r,l=(s?By(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const the=Rs(0);function jU(e){const t=pi(e);return!bk()||!t.visualViewport?the:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nhe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pi(e)?!1:t}function Ql(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=wk(e);let a=Rs(1);t&&(r?us(r)&&(a=mu(r)):a=mu(e));const l=nhe(s,n,r)?jU(s):Rs(0);let c=(i.left+l.x)/a.x,d=(i.top+l.y)/a.y,h=i.width/a.x,f=i.height/a.y;if(s){const m=pi(s),g=r&&us(r)?pi(r):r;let x=m,v=PC(x);for(;v&&r&&g!==x;){const b=mu(v),j=v.getBoundingClientRect(),w=ds(v),N=j.left+(v.clientLeft+parseFloat(w.paddingLeft))*b.x,k=j.top+(v.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,d*=b.y,h*=b.x,f*=b.y,c+=N,d+=k,x=pi(v),v=PC(x)}}return zy({width:h,height:f,x:c,y:d})}function Ox(e,t){const n=Tx(e).scrollLeft;return t?t.left+n:Ql(Vs(e)).left+n}function SU(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ox(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function rhe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=Vs(r),l=t?Ex(t.floating):!1;if(r===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Rs(1);const h=Rs(0),f=zs(r);if((f||!f&&!s)&&((Pd(r)!=="body"||Bp(a))&&(c=Tx(r)),zs(r))){const g=Ql(r);d=mu(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}const m=a&&!f&&!s?SU(a,c):Rs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x+m.x,y:n.y*d.y-c.scrollTop*d.y+h.y+m.y}}function ihe(e){return Array.from(e.getClientRects())}function she(e){const t=Vs(e),n=Tx(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ox(e);const l=-n.scrollTop;return ds(r).direction==="rtl"&&(a+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}const MD=25;function ahe(e,t){const n=pi(e),r=Vs(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;const h=bk();(!h||h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const d=Ox(r);if(d<=0){const h=r.ownerDocument,f=h.body,m=getComputedStyle(f),g=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-g);x<=MD&&(s-=x)}else d<=MD&&(s+=d);return{width:s,height:a,x:l,y:c}}const ohe=new Set(["absolute","fixed"]);function lhe(e,t){const n=Ql(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=zs(e)?mu(e):Rs(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,d=r*s.y;return{width:a,height:l,x:c,y:d}}function RD(e,t,n){let r;if(t==="viewport")r=ahe(e,n);else if(t==="document")r=she(Vs(e));else if(us(t))r=lhe(t,n);else{const i=jU(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zy(r)}function _U(e,t){const n=Io(e);return n===t||!us(n)||Ru(n)?!1:ds(n).position==="fixed"||_U(n,t)}function che(e,t){const n=t.get(e);if(n)return n;let r=_h(e,[],!1).filter(l=>us(l)&&Pd(l)!=="body"),i=null;const s=ds(e).position==="fixed";let a=s?Io(e):e;for(;us(a)&&!Ru(a);){const l=ds(a),c=xk(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&ohe.has(i.position)||Bp(a)&&!c&&_U(e,a))?r=r.filter(h=>h!==a):i=l,a=Io(a)}return t.set(e,r),r}function uhe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Ex(t)?[]:che(t,this._c):[].concat(n),r],l=a[0],c=a.reduce((d,h)=>{const f=RD(t,h,i);return d.top=di(f.top,d.top),d.right=Do(f.right,d.right),d.bottom=Do(f.bottom,d.bottom),d.left=di(f.left,d.left),d},RD(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dhe(e){const{width:t,height:n}=wU(e);return{width:t,height:n}}function fhe(e,t,n){const r=zs(t),i=Vs(t),s=n==="fixed",a=Ql(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Rs(0);function d(){c.x=Ox(i)}if(r||!r&&!s)if((Pd(t)!=="body"||Bp(i))&&(l=Tx(t)),r){const g=Ql(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else i&&d();s&&!r&&i&&d();const h=i&&!r&&!s?SU(i,l):Rs(0),f=a.left+l.scrollLeft-c.x-h.x,m=a.top+l.scrollTop-c.y-h.y;return{x:f,y:m,width:a.width,height:a.height}}function l1(e){return ds(e).position==="static"}function DD(e,t){if(!zs(e)||ds(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Vs(e)===n&&(n=n.ownerDocument.body),n}function NU(e,t){const n=pi(e);if(Ex(e))return n;if(!zs(e)){let i=Io(e);for(;i&&!Ru(i);){if(us(i)&&!l1(i))return i;i=Io(i)}return n}let r=DD(e,t);for(;r&&Gfe(r)&&l1(r);)r=DD(r,t);return r&&Ru(r)&&l1(r)&&!xk(r)?n:r||Zfe(e)||n}const hhe=async function(e){const t=this.getOffsetParent||NU,n=this.getDimensions,r=await n(e.floating);return{reference:fhe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function phe(e){return ds(e).direction==="rtl"}const mhe={convertOffsetParentRelativeRectToViewportRelativeRect:rhe,getDocumentElement:Vs,getClippingRect:uhe,getOffsetParent:NU,getElementRects:hhe,getClientRects:ihe,getDimensions:dhe,getScale:mu,isElement:us,isRTL:phe};function CU(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ghe(e,t){let n=null,r;const i=Vs(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:h,top:f,width:m,height:g}=d;if(l||t(),!m||!g)return;const x=Lg(f),v=Lg(i.clientWidth-(h+m)),b=Lg(i.clientHeight-(f+g)),j=Lg(h),N={rootMargin:-x+"px "+-v+"px "+-b+"px "+-j+"px",threshold:di(0,Do(1,c))||1};let k=!0;function C(A){const E=A[0].intersectionRatio;if(E!==c){if(!k)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!CU(d,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(C,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,N)}n.observe(e)}return a(!0),s}function yhe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=wk(e),h=i||s?[...d?_h(d):[],..._h(t)]:[];h.forEach(j=>{i&&j.addEventListener("scroll",n,{passive:!0}),s&&j.addEventListener("resize",n)});const f=d&&l?ghe(d,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(j=>{let[w]=j;w&&w.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var N;(N=g)==null||N.observe(t)})),n()}),d&&!c&&g.observe(d),g.observe(t));let x,v=c?Ql(e):null;c&&b();function b(){const j=Ql(e);v&&!CU(v,j)&&n(),v=j,x=requestAnimationFrame(b)}return n(),()=>{var j;h.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(j=g)==null||j.disconnect(),g=null,c&&cancelAnimationFrame(x)}}const vhe=zfe,xhe=Ufe,bhe=Ffe,whe=Wfe,jhe=Bfe,ID=$fe,She=Vfe,_he=(e,t,n)=>{const r=new Map,i={platform:mhe,...n},s={...i.platform,_c:r};return Lfe(e,t,{...i,platform:s})};var Nhe=typeof document<"u",Che=function(){},Sy=Nhe?_.useLayoutEffect:Che;function Uy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Uy(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function PU(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LD(e,t){const n=PU(e);return Math.round(t*n)/n}function c1(e){const t=_.useRef(e);return Sy(()=>{t.current=e}),t}function Phe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[h,f]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=_.useState(r);Uy(m,r)||g(r);const[x,v]=_.useState(null),[b,j]=_.useState(null),w=_.useCallback(L=>{L!==A.current&&(A.current=L,v(L))},[]),N=_.useCallback(L=>{L!==E.current&&(E.current=L,j(L))},[]),k=s||x,C=a||b,A=_.useRef(null),E=_.useRef(null),P=_.useRef(h),D=c!=null,B=c1(c),O=c1(i),M=c1(d),$=_.useCallback(()=>{if(!A.current||!E.current)return;const L={placement:t,strategy:n,middleware:m};O.current&&(L.platform=O.current),_he(A.current,E.current,L).then(H=>{const I={...H,isPositioned:M.current!==!1};F.current&&!Uy(P.current,I)&&(P.current=I,Np.flushSync(()=>{f(I)}))})},[m,t,n,O,M]);Sy(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[d]);const F=_.useRef(!1);Sy(()=>(F.current=!0,()=>{F.current=!1}),[]),Sy(()=>{if(k&&(A.current=k),C&&(E.current=C),k&&C){if(B.current)return B.current(k,C,$);$()}},[k,C,$,B,D]);const W=_.useMemo(()=>({reference:A,floating:E,setReference:w,setFloating:N}),[w,N]),q=_.useMemo(()=>({reference:k,floating:C}),[k,C]),K=_.useMemo(()=>{const L={position:n,left:0,top:0};if(!q.floating)return L;const H=LD(q.floating,h.x),I=LD(q.floating,h.y);return l?{...L,transform:"translate("+H+"px, "+I+"px)",...PU(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:I}},[n,l,q.floating,h.x,h.y]);return _.useMemo(()=>({...h,update:$,refs:W,elements:q,floatingStyles:K}),[h,$,W,q,K])}const Ahe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ID({element:r.current,padding:i}).fn(n):{}:r?ID({element:r,padding:i}).fn(n):{}}}},khe=(e,t)=>({...vhe(e),options:[e,t]}),Ehe=(e,t)=>({...xhe(e),options:[e,t]}),The=(e,t)=>({...She(e),options:[e,t]}),Ohe=(e,t)=>({...bhe(e),options:[e,t]}),Mhe=(e,t)=>({...whe(e),options:[e,t]}),Rhe=(e,t)=>({...jhe(e),options:[e,t]}),Dhe=(e,t)=>({...Ahe(e),options:[e,t]});var Ihe="Arrow",AU=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return o.jsx(Ge.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});AU.displayName=Ihe;var Lhe=AU,jk="Popper",[kU,Ad]=ei(jk),[$he,EU]=kU(jk),TU=e=>{const{__scopePopper:t,children:n}=e,[r,i]=_.useState(null);return o.jsx($he,{scope:t,anchor:r,onAnchorChange:i,children:n})};TU.displayName=jk;var OU="PopperAnchor",MU=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=EU(OU,n),a=_.useRef(null),l=yt(t,a),c=_.useRef(null);return _.useEffect(()=>{const d=c.current;c.current=(r==null?void 0:r.current)||a.current,d!==c.current&&s.onAnchorChange(c.current)}),r?null:o.jsx(Ge.div,{...i,ref:l})});MU.displayName=OU;var Sk="PopperContent",[Fhe,Bhe]=kU(Sk),RU=_.forwardRef((e,t)=>{var me,Ne,ee,de,be,ae;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...v}=e,b=EU(Sk,n),[j,w]=_.useState(null),N=yt(t,Ke=>w(Ke)),[k,C]=_.useState(null),A=mk(k),E=(A==null?void 0:A.width)??0,P=(A==null?void 0:A.height)??0,D=r+(s!=="center"?"-"+s:""),B=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},O=Array.isArray(d)?d:[d],M=O.length>0,$={padding:B,boundary:O.filter(zhe),altBoundary:M},{refs:F,floatingStyles:W,placement:q,isPositioned:K,middlewareData:L}=Phe({strategy:"fixed",placement:D,whileElementsMounted:(...Ke)=>yhe(...Ke,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[khe({mainAxis:i+P,alignmentAxis:a}),c&&Ehe({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?The():void 0,...$}),c&&Ohe({...$}),Mhe({...$,apply:({elements:Ke,rects:Ue,availableWidth:jt,availableHeight:qe})=>{const{width:Rt,height:nr}=Ue.reference,vn=Ke.floating.style;vn.setProperty("--radix-popper-available-width",`${jt}px`),vn.setProperty("--radix-popper-available-height",`${qe}px`),vn.setProperty("--radix-popper-anchor-width",`${Rt}px`),vn.setProperty("--radix-popper-anchor-height",`${nr}px`)}}),k&&Dhe({element:k,padding:l}),Uhe({arrowWidth:E,arrowHeight:P}),m&&Rhe({strategy:"referenceHidden",...$})]}),[H,I]=LU(q),V=er(x);Mn(()=>{K&&(V==null||V())},[K,V]);const G=(me=L.arrow)==null?void 0:me.x,z=(Ne=L.arrow)==null?void 0:Ne.y,oe=((ee=L.arrow)==null?void 0:ee.centerOffset)!==0,[pe,ue]=_.useState();return Mn(()=>{j&&ue(window.getComputedStyle(j).zIndex)},[j]),o.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:K?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(de=L.transformOrigin)==null?void 0:de.x,(be=L.transformOrigin)==null?void 0:be.y].join(" "),...((ae=L.hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Fhe,{scope:n,placedSide:H,onArrowChange:C,arrowX:G,arrowY:z,shouldHideArrow:oe,children:o.jsx(Ge.div,{"data-side":H,"data-align":I,...v,ref:N,style:{...v.style,animation:K?void 0:"none"}})})})});RU.displayName=Sk;var DU="PopperArrow",qhe={top:"bottom",right:"left",bottom:"top",left:"r
679ight"},IU=_.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=Bhe(DU,r),a=qhe[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Lhe,{...i,ref:n,style:{...i.style,display:"block"}})})});IU.displayName=DU;function zhe(e){return e!==null}var Uhe=e=>({name:"transformOrigin",options:e,fn(t){var b,j,w;const{placement:n,rects:r,middlewareData:i}=t,a=((b=i.arrow)==null?void 0:b.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,h]=LU(n),f={start:"0%",center:"50%",end:"100%"}[h],m=(((j=i.arrow)==null?void 0:j.x)??0)+l/2,g=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let x="",v="";return d==="bottom"?(x=a?f:`${m}px`,v=`${-c}px`):d==="top"?(x=a?f:`${m}px`,v=`${r.floating.height+c}px`):d==="right"?(x=`${-c}px`,v=a?f:`${g}px`):d==="left"&&(x=`${r.floating.width+c}px`,v=a?f:`${g}px`),{data:{x,y:v}}}});function LU(e){const[t,n="center"]=e.split("-");return[t,n]}var _k=TU,Mx=MU,Nk=RU,Ck=IU,$U=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vhe="VisuallyHidden",Whe=_.forwardRef((e,t)=>o.jsx(Ge.span,{...e,ref:t,style:{...$U,...e.style}}));Whe.displayName=Vhe;var Hhe=[" ","Enter","ArrowUp","ArrowDown"],Khe=[" ","Enter"],Jl="Select",[Rx,Dx,Ghe]=rk(Jl),[kd]=ei(Jl,[Ghe,Ad]),Ix=Ad(),[Yhe,zo]=kd(Jl),[Xhe,Qhe]=kd(Jl),FU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:l,onValueChange:c,dir:d,name:h,autoComplete:f,disabled:m,required:g,form:x}=e,v=Ix(t),[b,j]=_.useState(null),[w,N]=_.useState(null),[k,C]=_.useState(!1),A=Mp(d),[E,P]=Pa({prop:r,defaultProp:i??!1,onChange:s,caller:Jl}),[D,B]=Pa({prop:a,defaultProp:l,onChange:c,caller:Jl}),O=_.useRef(null),M=b?x||!!b.closest("form"):!0,[$,F]=_.useState(new Set),W=Array.from($).map(q=>q.props.value).join(";");return o.jsx(_k,{...v,children:o.jsxs(Yhe,{required:g,scope:t,trigger:b,onTriggerChange:j,valueNode:w,onValueNodeChange:N,valueNodeHasChildren:k,onValueNodeHasChildrenChange:C,contentId:cs(),value:D,onValueChange:B,open:E,onOpenChange:P,dir:A,triggerPointerDownPosRef:O,disabled:m,children:[o.jsx(Rx.Provider,{scope:t,children:o.jsx(Xhe,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(q=>{F(K=>new Set(K).add(q))},[]),onNativeOptionRemove:_.useCallback(q=>{F(K=>{const L=new Set(K);return L.delete(q),L})},[]),children:n})}),M?o.jsxs(cV,{"aria-hidden":!0,required:g,tabIndex:-1,name:h,autoComplete:f,value:D,onChange:q=>B(q.target.value),disabled:m,form:x,children:[D===void 0?o.jsx("option",{value:""}):null,Array.from($)]},W):null]})})};FU.displayName=Jl;var BU="SelectTrigger",qU=_.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=Ix(n),a=zo(BU,n),l=a.disabled||r,c=yt(t,a.onTriggerChange),d=Dx(n),h=_.useRef("touch"),[f,m,g]=dV(v=>{const b=d().filter(N=>!N.disabled),j=b.find(N=>N.value===a.value),w=fV(b,v,j);w!==void 0&&a.onValueChange(w.value)}),x=v=>{l||(a.onOpenChange(!0),g()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return o.jsx(Mx,{asChild:!0,...s,children:o.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":uV(a.value)?"":void 0,...i,ref:c,onClick:Oe(i.onClick,v=>{v.currentTarget.focus(),h.current!=="mouse"&&x(v)}),onPointerDown:Oe(i.onPointerDown,v=>{h.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(x(v),v.preventDefault())}),onKeyDown:Oe(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&m(v.key),!(b&&v.key===" ")&&Hhe.includes(v.key)&&
vendor: 1,809 bytes, line 679
679(x(),v.preventDefault())})})})});qU.displayName=BU;var zU="SelectValue",UU=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...l}=e,c=zo(zU,n),{onValueNodeHasChildrenChange:d}=c,h=s!==void 0,f=yt(t,c.onValueNodeChange);return Mn(()=>{d(h)},[d,h]),o.jsx(Ge.span,{...l,ref:f,style:{pointerEvents:"none"},children:uV(c.value)?o.jsx(o.Fragment,{children:a}):s})});UU.displayName=zU;var Jhe="SelectIcon",VU=_.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return o.jsx(Ge.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});VU.displayName=Jhe;var Zhe="SelectPortal",WU=e=>o.jsx($p,{asChild:!0,...e});WU.displayName=Zhe;var Zl="SelectContent",HU=_.forwardRef((e,t)=>{const n=zo(Zl,e.__scopeSelect),[r,i]=_.useState();if(Mn(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Np.createPortal(o.jsx(KU,{scope:e.__scopeSelect,children:o.jsx(Rx.Slot,{scope:e.__scopeSelect,children:o.jsx("div",{children:e.children})})}),s):null}return o.jsx(GU,{...e,ref:t})});HU.displayName=Zl;var ts=10,[KU,Uo]=kd(Zl),epe="SelectContentImpl",tpe=Ro("SelectContent.RemoveScroll"),GU=_.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:v,avoidCollisions:b,...j}=e,w=zo(Zl,n),[N,k]=_.useState(null),[C,A]=_.useState(null),E=yt(t,me=>k(me)),[P,D]=_.useState(null),[B,O]=_.useState(null),M=Dx(n),[$,F]=_.useState(!1),W=_.useRef(!1);_.useEffect(()=>{if(N)return Cx(N)},[N]),_x();const q=_.useCallback(me=>{const[Ne,...ee]=M().map(ae=>ae.ref.current),[de]=ee.slice(-1),be=document.activeElement;for(const ae of me)if(ae===be||(ae==null||ae.scrollIntoView({block:"nearest"}
vendor: 13,026 bytes, line 679
679),ae===Ne&&C&&(C.scrollTop=0),ae===de&&C&&(C.scrollTop=C.scrollHeight),ae==null||ae.focus(),document.activeElement!==be))return},[M,C]),K=_.useCallback(()=>q([P,N]),[q,P,N]);_.useEffect(()=>{$&&K()},[$,K]);const{onOpenChange:L,triggerPointerDownPosRef:H}=w;_.useEffect(()=>{if(N){let me={x:0,y:0};const Ne=de=>{var be,ae;me={x:Math.abs(Math.round(de.pageX)-(((be=H.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(de.pageY)-(((ae=H.current)==null?void 0:ae.y)??0))}},ee=de=>{me.x<=10&&me.y<=10?de.preventDefault():N.contains(de.target)||L(!1),document.removeEventListener("pointermove",Ne),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",ee,{capture:!0})}}},[N,L,H]),_.useEffect(()=>{const me=()=>L(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[L]);const[I,V]=dV(me=>{const Ne=M().filter(be=>!be.disabled),ee=Ne.find(be=>be.ref.current===document.activeElement),de=fV(Ne,me,ee);de&&setTimeout(()=>de.ref.current.focus())}),G=_.useCallback((me,Ne,ee)=>{const de=!W.current&&!ee;(w.value!==void 0&&w.value===Ne||de)&&(D(me),de&&(W.current=!0))},[w.value]),z=_.useCallback(()=>N==null?void 0:N.focus(),[N]),oe=_.useCallback((me,Ne,ee)=>{const de=!W.current&&!ee;(w.value!==void 0&&w.value===Ne||de)&&O(me)},[w.value]),pe=r==="popper"?AC:YU,ue=pe===AC?{side:l,sideOffset:c,align:d,alignOffset:h,arrowPadding:f,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:v,avoidCollisions:b}:{};return o.jsx(KU,{scope:n,content:N,viewport:C,onViewportChange:A,itemRefCallback:G,selectedItem:P,onItemLeave:z,itemTextRefCallback:oe,focusSelectedItem:K,selectedItemText:B,position:r,isPositioned:$,searchRef:I,children:o.jsx(Fp,{as:tpe,allowPinchZoom:!0,children:o.jsx(Lp,{asChild:!0,trapped:w.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Oe(i,me=>{var Ne;(Ne=w.trigger)==null||Ne.focus({preventScroll:!0}),me.preventDefault()}),children:o.jsx(Ip,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:o.jsx(pe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:me=>me.preventDefault(),...j,...ue,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:Oe(j.onKeyDown,me=>{const Ne=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ne&&me.key.length===1&&V(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let de=M().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(me.key)&&(de=de.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const be=me.target,ae=de.indexOf(be);de=de.slice(ae+1)}setTimeout(()=>q(de)),me.preventDefault()}})})})})})})});GU.displayName=epe;var npe="SelectItemAlignedPosition",YU=_.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=zo(Zl,n),a=Uo(Zl,n),[l,c]=_.useState(null),[d,h]=_.useState(null),f=yt(t,E=>h(E)),m=Dx(n),g=_.useRef(!1),x=_.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:j,focusSelectedItem:w}=a,N=_.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&v&&b&&j){const E=s.trigger.getBoundingClientRect(),P=d.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),B=j.getBoundingClientRect();if(s.dir!=="rtl"){const be=B.left-P.left,ae=D.left-be,Ke=E.left-ae,Ue=E.width+Ke,jt=Math.max(Ue,P.width),qe=window.innerWidth-ts,Rt=_C(ae,[ts,Math.max(ts,qe-jt)]);l.style.minWidth=Ue+"px",l.style.left=Rt+"px"}else{const be=P.right-B.right,ae=window.innerWidth-D.right-be,Ke=window.innerWidth-E.right-ae,Ue=E.width+Ke,jt=Math.max(Ue,P.width),qe=window.innerWidth-ts,Rt=_C(ae,[ts,Math.max(ts,qe-jt)]);l.style.minWidth=Ue+"px",l.style.right=Rt+"px"}const O=m(),M=window.innerHeight-ts*2,$=v.scrollHeight,F=window.getComputedStyle(d),W=parseInt(F.borderTopWidth,10),q=parseInt(F.paddingTop,10),K=parseInt(F.borderBottomWidth,10),L=parseInt(F.paddingBottom,10),H=W+q+$+L+K,I=Math.min(b.offsetHeight*5,H),V=window.getComputedStyle(v),G=parseInt(V.paddingTop,10),z=parseInt(V.paddingBottom,10),oe=E.top+E.height/2-ts,pe=M-oe,ue=b.offsetHeight/2,me=b.offsetTop+ue,Ne=W+q+me,ee=H-Ne;if(Ne<=oe){const be=O.length>0&&b===O[O.length-1].ref.current;l.style.bottom="0px";const ae=d.clientHeight-v.offsetTop-v.offsetHeight,Ke=Math.max(pe,ue+(be?z:0)+ae+K),Ue=Ne+Ke;l.style.height=Ue+"px"}else{const be=O.length>0&&b===O[0].ref.current;l.style.top="0px";const Ke=Math.max(oe,W+v.offsetTop+(be?G:0)+ue)+ee;l.style.height=Ke+"px",v.scrollTop=Ne-oe+v.offsetTop}l.style.margin=`${ts}px 0`,l.style.minHeight=I+"px",l.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,s.trigger,s.valueNode,l,d,v,b,j,s.dir,r]);Mn(()=>N(),[N]);const[k,C]=_.useState();Mn(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const A=_.useCallback(E=>{E&&x.current===!0&&(N(),w==null||w(),x.current=!1)},[N,w]);return o.jsx(ipe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:o.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:o.jsx(Ge.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});YU.displayName=npe;var rpe="SelectPopperPosition",AC=_.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ts,...s}=e,a=Ix(n);return o.jsx(Nk,{...a,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});AC.displayName=rpe;var[ipe,Pk]=kd(Zl,{}),kC="SelectViewport",XU=_.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Uo(kC,n),a=Pk(kC,n),l=yt(t,s.onViewportChange),c=_.useRef(0);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),o.jsx(Rx.Slot,{scope:n,children:o.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Oe(i.onScroll,d=>{const h=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=a;if(m!=null&&m.current&&f){const g=Math.abs(c.current-h.scrollTop);if(g>0){const x=window.innerHeight-ts*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),j=Math.max(v,b);if(j<x){const w=j+g,N=Math.min(x,w),k=w-N;f.style.height=N+"px",f.style.bottom==="0px"&&(h.scrollTop=k>0?k:0,f.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});XU.displayName=kC;var QU="SelectGroup",[spe,ape]=kd(QU),ope=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=cs();return o.jsx(spe,{scope:n,id:i,children:o.jsx(Ge.div,{role:"group","aria-labelledby":i,...r,ref:t})})});ope.displayName=QU;var JU="SelectLabel",ZU=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=ape(JU,n);return o.jsx(Ge.div,{id:i.id,...r,ref:t})});ZU.displayName=JU;var Vy="SelectItem",[lpe,eV]=kd(Vy),tV=_.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,l=zo(Vy,n),c=Uo(Vy,n),d=l.value===r,[h,f]=_.useState(s??""),[m,g]=_.useState(!1),x=yt(t,w=>{var N;return(N=c.itemRefCallback)==null?void 0:N.call(c,w,r,i)}),v=cs(),b=_.useRef("touch"),j=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.jsx(lpe,{scope:n,value:r,disabled:i,textId:v,isSelected:d,onItemTextChange:_.useCallback(w=>{f(N=>N||((w==null?void 0:w.textContent)??"").trim())},[]),children:o.jsx(Rx.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:o.jsx(Ge.div,{role:"option","aria-labelledby":v,"data-highlighted":m?"":void 0,"aria-selected":d&&m,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:x,onFocus:Oe(a.onFocus,()=>g(!0)),onBlur:Oe(a.onBlur,()=>g(!1)),onClick:Oe(a.onClick,()=>{b.current!=="mouse"&&j()}),onPointerUp:Oe(a.onPointerUp,()=>{b.current==="mouse"&&j()}),onPointerDown:Oe(a.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:Oe(a.onPointerMove,w=>{var N;b.current=w.pointerType,i?(N=c.onItemLeave)==null||N.call(c):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(a.onPointerLeave,w=>{var N;w.currentTarget===document.activeElement&&((N=c.onItemLeave)==null||N.call(c))}),onKeyDown:Oe(a.onKeyDown,w=>{var k;((k=c.searchRef)==null?void 0:k.current)!==""&&w.key===" "||(Khe.includes(w.key)&&j(),w.key===" "&&w.preventDefault())})})})})});tV.displayName=Vy;var Gf="SelectItemText",nV=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=zo(Gf,n),l=Uo(Gf,n),c=eV(Gf,n),d=Qhe(Gf,n),[h,f]=_.useState(null),m=yt(t,j=>f(j),c.onItemTextChange,j=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,j,c.value,c.disabled)}),g=h==null?void 0:h.textContent,x=_.useMemo(()=>o.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=d;return Mn(()=>(v(x),()=>b(x)),[v,b,x]),o.jsxs(o.Fragment,{children:[o.jsx(Ge.span,{id:c.textId,...s,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Np.createPortal(s.children,a.valueNode):null]})});nV.displayName=Gf;var rV="SelectItemIndicator",iV=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return eV(rV,n).isSelected?o.jsx(Ge.span,{"aria-hidden":!0,...r,ref:t}):null});iV.displayName=rV;var EC="SelectScrollUpButton",sV=_.forwardRef((e,t)=>{const n=Uo(EC,e.__scopeSelect),r=Pk(EC,e.__scopeSelect),[i,s]=_.useState(!1),a=yt(t,r.onScrollButtonChange);return Mn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?o.jsx(oV,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});sV.displayName=EC;var TC="SelectScrollDownButton",aV=_.forwardRef((e,t)=>{const n=Uo(TC,e.__scopeSelect),r=Pk(TC,e.__scopeSelect),[i,s]=_.useState(!1),a=yt(t,r.onScrollButtonChange);return Mn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<d;s(h)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?o.jsx(oV,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});aV.displayName=TC;var oV=_.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Uo("SelectScrollButton",n),a=_.useRef(null),l=Dx(n),c=_.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),Mn(()=>{var h;const d=l().find(f=>f.ref.current===document.activeElement);(h=d==null?void 0:d.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),o.jsx(Ge.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Oe(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Oe(i.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Oe(i.onPointerLeave,()=>{c()})})}),cpe="SelectSeparator",lV=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return o.jsx(Ge.div,{"aria-hidden":!0,...r,ref:t})});lV.displayName=cpe;var OC="SelectArrow",upe=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ix(n),s=zo(OC,n),a=Uo(OC,n);return s.open&&a.position==="popper"?o.jsx(Ck,{...i,...r,ref:t}):null});upe.displayName=OC;var dpe="SelectBubbleInput",cV=_.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=_.useRef(null),s=yt(r,i),a=pk(t);return _.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&h){const f=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(f)}},[a,t]),o.jsx(Ge.select,{...n,style:{...$U,...n.style},ref:s,defaultValue:t})});cV.displayName=dpe;function uV(e){return e===""||e===void 0}function dV(e){const t=er(e),n=_.useRef(""),r=_.useRef(0),i=_.useCallback(a=>{const l=n.current+a;
679t(l),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=_.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function fV(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=fpe(e,Math.max(s,0));i.length===1&&(a=a.filter(d=>d!==n));const c=a.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function fpe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var hpe=FU,hV=qU,ppe=UU,mpe=VU,gpe=WU,pV=HU,ype=XU,mV=ZU,gV=tV,vpe=nV,xpe=iV,yV=sV,vV=aV,xV=lV;const ht=hpe,pt=ppe,ct=_.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(hV,{ref:r,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,o.jsx(mpe,{asChild:!0,children:o.jsx(wp,{className:"h-4 w-4 opacity-50"})})]}));ct.displayName=hV.displayName;const bV=_.forwardRef(({className:e,...t},n)=>o.jsx(yV,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(ox,{className:"h-4 w-4"})}));bV.displayName=yV.displayName;const wV=_.forwardRef(({className:e,...t},n)=>o.jsx(vV,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(wp,{className:"h-4 w-4"})}));wV.displayName=vV.displayName;const ut=_.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>o.jsx(gpe,{children:o.jsxs(pV,{ref:i,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[o.jsx(bV,{}),o.jsx(ype,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(wV,{})]})}));ut.displayName=pV.displayName;const bpe=_.forwardRef(({className:e,...t},n)=>o.jsx(mV,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));bpe.displayName=mV.displayName;const Pe=_.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(gV,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(xpe,{children:o.jsx(Qr,{className:"h-4 w-4"})})}),o.jsx(vpe,{children:t})]}));Pe.displayName=gV.displayName;const wpe=_.forwardRef(({className:e,...t},n)=>o.jsx(xV,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));wpe.displayName=xV.displayName;function jpe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState("Boat"),a=hn(),{data:l=[]}=Ee({queryKey:["vehicles"],queryFn:()=>ne.entities.Vehicle.list()}),c=Ye({mutationFn:m=>ne.entities.Vehicle.create(m),onSuccess:()=>{a.invalidateQueries({queryKey:["vehicles"]}),t(!1),r(null),gt.success("Vehicle created")}}),d=Ye({mutationFn:({id:m,data:g})=>ne.entities.Vehicle.update(m,g),onSuccess:()=>{a.invalidateQueries({queryKey:["vehicles"]}),t(!1),r(null),gt.success("Vehicle updated")}}),h=Ye({mutationFn:m=>ne.entities.Vehicle.delete(m),onSuccess:()=>{a.invalidateQueries({queryKey:["vehicles"]}),gt.success("Vehicle deleted")}}),f=m=>{m.preventDefault();const g=new FormData(m.target),x={name:g.get("name"),type:i,capacity:g.get("capacity")?Number(g.get("capacity")):void 0,driver_name:g.get("driver_name"),registration:g.get("registration"),notes:g.get("notes"),is_active:g.get("is_active")==="on"};n?d.mutate({id:n.id,data:x}):c.mutate(x)};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("h3",{className:"text-lg font-medium",children:"Vehicles"}),o.jsxs(re,{onClick:()=>{r(null),s("Boat"),t(!0)},children:[o.jsx(en,{className:"w-4 h-4 mr-2"})," Add Vehicle"]})]}),o.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:l.map(m=>o.jsx(lt,{className:m.is_active?"":"opacity-60",children:o.jsxs(dt,{className:"p-4 space-y-2",children:[o.jsxs("div",{className:"flex justify-between items-start",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-slate-800",children:m.name}),o.jsx("span",{className:"text-xs text-slate-500",children:m.type})]}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{r(m),s(m.type),t(!0)},children:o.jsx(Sp,{className:"w-3 h-3"})}),o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-500",onClick:()=>h.mutate(m.id),children:o.jsx(On,{className:"w-3 h-3"})})]})]}),m.capacity&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[o.jsx(Jr,{className:"w-4 h-4"}),"Capacity: ",m.capacity]}),m.driver_name&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[o.jsx(Na,{className:"w-4 h-4"}),"Driver: ",m.driver_name]}),m.registration&&o.jsxs("p",{className:"text-xs text-slate-500",children:["Reg: ",m.registration]}),!m.is_active&&o.jsx("span",{className:"text-xs text-amber-600",children:"Inactive"})]})},m.id))}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{children:[o.jsx(Un,{children:o.jsxs(Vn,{children:[n?"Edit":"Add"," Vehicle"]})}),o.jsxs("form",{onSubmit:f,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(te,{htmlFor:"name",children:"Vehicle Name *"}),o.jsx(ye,{id:"name",name:"name",required:!0,defaultValue:n==null?void 0:n.name})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Type *"}),o.jsxs(ht,{value:i,onValueChange:s,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Boat",children:"Boat"}),o.jsx(Pe,{value:"Car",children:"Car"}),o.jsx(Pe,{value:"Van",children:"Van"}),o.jsx(Pe,{value:"Truck",children:"Truck"}),o.jsx(Pe,{value:"Other",children:"Other"})]})]})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"capacity",children:"Capacity"}),o.jsx(ye,{id:"capacity",name:"capacity",type:"number",defaultValue:n==null?void 0:n.capacity})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"driver_name",children:"Driver Name"}),o.jsx(ye,{id:"driver_name",name:"driver_name",defaultValue:n==null?void 0:n.driver_name})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"registration",children:"Registration"}),o.jsx(ye,{id:"registration",name:"registration",defaultValue:n==null?void 0:n.registration})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"notes",children:"Notes"}),o.jsx(ur,{id:"notes",name:"notes",defaultValue:n==null?void 0:n.notes})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(jn,{id:"is_active",name:"is_active",defaultChecked:(n==null?void 0:n.is_active)!==!1}),o.jsx(te,{htmlFor:"is_active",children:"Active"})]}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{type:"submit",children:n?"Update":"Create"})]})]})]})})]})}function Spe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState("Tank"),[a,l]=_.useState("Good"),c=hn(),{data:d=[]}=Ee({queryKey:["equipment"],queryFn:()=>ne.entities.EquipmentItem.list()}),h=Ye({mutationFn:v=>ne.entities.EquipmentItem.create(v),onSuccess:()=>{c.invalidateQueries({queryKey:["equipment"]}),t(!1),r(null),gt.success("Equipment created")}}),f=Ye({mutationFn:({id:v,data:b})=>ne.entities.EquipmentItem.update(v,b),onSuccess:()=>{c.invalidateQueries({queryKey:["equipment"]}),t(!1),r(null),gt.success("Equipment updated")}}),m=Ye({mutationFn:v=>ne.entities.EquipmentItem.delete(v),onSuccess:()=>{c.invalidateQueries({queryKey:["equipment"]}),gt.success("Equipment deleted")}}),g=v=>{v.preventDefault();const b=new FormData(v.target),j={name:b.get("name"),type:i,serial_number:b.get("serial_number"),size:b.get("size"),condition:a,notes:b.get("notes"),is_active:b.get("is_active")==="on"};n?f.mutate({id:n.id,data:j}):h.mutate(j)},x={Excellent:"text-green-600",Good:"text-blue-600",Fair:"text-amber-600","Needs Maintenance":"text-orange-600","Out of Service":"text-red-600"};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("h3",{className:"text-lg font-medium",children:"Equipment Inventory"}),o.jsxs(re,{onClick:()=>{r(null),s("Tank"),l("Good"),t(!0)},children:[o.jsx(en,{className:"w-4 h-4 mr-2"})," Add Equipment"]})]}),o.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(v=>o.jsx(lt,{className:v.is_active?"":"opacity-60",children:o.jsxs(dt,{className:"p-4 space-y-2",children:[o.jsxs("div",{className:"flex justify-between items-start",children:[o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-slate-800",children:v.name}),o.jsx("span",{className:"text-xs text-slate-500",children:v.type})]}),o.jsxs("div",{className:"flex gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{r(v),s(v.type),l(v.condition||"Good"),t(!0)},children:o.jsx(Sp,{className:"w-3 h-3"})}),o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-500",onClick:()=>m.mutate(v.id),children:o.jsx(On,{className:"w-3 h-3"})})]})]}),v.serial_number&&o.jsxs("p",{className:"text-xs text-slate-500",children:["SN: ",v.serial_number]}),v.size&&o.jsxs("p",{className:"text-xs text-slate-500",children:["Size: ",v.size]}),o.jsx("p",{className:`text-sm font-medium ${x[v.condition]||"text-slate-600"}`,children:v.condition||"Good"}),!v.is_active&&o.jsx("span",{className:"text-xs text-amber-600",children:"Inactive"})]})},v.id))}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{children:[o.jsx(Un,{children:o.jsxs(Vn,{children:[n?"Edit":"Add"," Equipment"]})}),o.jsxs("form",{onSubmit:g,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(te,{htmlFor:"name",children:"Equipment Name *"}),o.jsx(ye,{id:"name",name:"name",required:!0,defaultValue:n==null?void 0:n.name})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Type *"}),o.jsxs(ht,{value:i,onValueChange:s,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Tank",children:"Tank"}),o.jsx(Pe,{value:"Regulator",children:"Regulator"}),o.jsx(Pe,{value:"BCD",children:"BCD"}),o.jsx(Pe,{value:"Wetsuit",children:"Wetsuit"}),o.jsx(Pe,{value:"Fins",children:"Fins"}),o.jsx(Pe,{value:"Mask",children:"Mask"}),o.jsx(Pe,{value:"Weight Belt",children:"Weight Belt"}),o.jsx(Pe,{value:"Dive Computer",children:"Dive Computer"}),o.jsx(Pe,{value:"Other",children:"Other"})]})]})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"serial_number",children:"Serial Number"}),o.jsx(ye,{id:"serial_number",name:"serial_number",defaultValue:n==null?void 0:n.serial_number})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"size",children:"Size"}),o.jsx(ye,{id:"size",name:"size",defaultValue:n==null?void 0:n.size})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Condition"}),o.jsxs(ht,{value:a,onValueChange:l,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Excellent",children:"Excellent"}),o.jsx(Pe,{value:"Good",children:"Good"}),o.jsx(Pe,{value:"Fair",children:"Fair"}),o.jsx(Pe,{value:"Needs Maintenance",children:"Needs Maintenance"}),o.jsx(Pe,{value:"Out of Service",children:"Out of Service"})]})]})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"notes",children:"Notes"}),o.jsx(ur,{id:"notes",name:"notes",defaultValue:n==null?void 0:n.notes})]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(jn,{id:"is_active",name:"is_active",defaultChecked:(n==null?void 0:n.is_active)!==!1}),o.jsx(te,{htmlFor:"is_active",children:"Active"})]}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{type:"submit",children:n?"Update":"Create"})]})]})]})})]})}function _pe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),i=hn(),{data:s=[]}=Ee({queryKey:["diveTimes"],queryFn:()=>ne.entities.DiveTime.list()}),{data:a=[]}=Ee({queryKey:["diveSites"],queryFn:()=>ne.entities.DiveSite.list()}),l=Ye({mutationFn:g=>ne.entities.DiveTime.create(g),onSuccess:()=>{i.invalidateQueries({queryKey:["diveTimes"]}),t(!1),r(null),gt.success("Dive time created")}}),c=Ye({mutationFn:({id:g,data:x})=>ne.entities.DiveTime.update(g,x),onSuccess:()=>{i.invalidateQueries({queryKey:["diveTimes"]}),t(!1),r(null),gt.success("Dive time updated")}}),d=Ye({mutationFn:g=>ne.entities.DiveTime.delete(g),onSuccess:()=>{i.invalidateQueries({queryKey:["diveTimes"]}),gt.success("Dive time deleted")}}),h=g=>{g.preventDefault();const x=new FormData(g.target),v=x.get("dive_site_id"),b={name:x.get("name"),time:x.get("time"),dive_site_id:v!=="none"?v:null,description:x.get("description")||"",is_active:x.get("is_active")==="on"};n?c.mutate({id:n.id,data:b}):l.mutate(b)},f=s.filter(g=>g.is_active),m=s.filter(g=>!g.is_active);return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-semibold text-slate-800",children:"Dive Times"}),o.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Manage dive time slots"})]}),o.jsxs(re,{onClick:()=>{r(null),t(!0)},className:"bg-gradient-to-r from-cyan-600 to-blue-600",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Dive Time"]})]}),f.length===0&&m.length===0?o.jsx(lt,{children:o.jsxs(dt,{className:"flex flex-col items-center justify-center py-12",children:[o.jsx(ga,{className:"w-12 h-12 text-slate-300 mb-3"}),o.jsx("p",{className:"text-slate-500",children:"No dive times yet"}),o.jsxs(re,{variant:"outline",className:"mt-4",onClick:()=>t(!0),children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Your First Dive Time"]})]})}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map(g=>{var x;return o.jsxs(lt,{className:"hover:shadow-lg transition-shadow",children:[o.jsx(cr,{children:o.jsxs(vr,{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ga,{className:"w-5 h-5 text-cyan-600"}),o.jsx("span",{className:"text-lg",children:g.name})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(re,{size:"icon",variant:"ghost",onClick:()=>{r(g),t(!0)},children:o.jsx(PM,{className:"w-4 h-4"})}),o.jsx(re,{size:"icon",variant:"ghost",onClick:()=>{confirm("Delete this dive time?")&&d.mutate(g.id)},children:o.jsx(On,{className:"w-4 h-4"})})]})]})}),o.jsx(dt,{children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"text-2xl font-bold text-cyan-700",children:g.time}),g.dive_site_id&&o.jsxs("div",{className:"flex items-center gap-1 text-sm text-cyan-600",children:[o.jsx(Ui,{className:"w-3 h-3"}),((x=a.find(v=>v.id===g.dive_site_id))==null?void 0:x.name)||"Unknown Site"]}),g.description&&o.jsx("p",{className:"text-sm text-slate-600",children:g.description})]})})]},g.id)})}),m.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h3",{className:"text-sm font-medium text-slate-500",children:"Inactive Dive Times"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 opacity-60",children:m.map(g=>o.jsxs(lt,{children:[o.jsx(cr,{children:o.jsxs(vr,{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ga,{className:"w-5 h-5 text-slate-400"}),o.jsx("span",{className:"text-lg",children:g.name})]}),o.jsx(re,{size:"icon",variant:"ghost",onClick:()=>{r(g),t(!0)},children:o.jsx(PM,{className:
679"w-4 h-4"})})]})}),o.jsx(dt,{children:o.jsx("div",{className:"text-xl font-bold text-slate-500",children:g.time})})]},g.id))})]})]}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{children:[o.jsx(Un,{children:o.jsx(Vn,{children:n?"Edit Dive Time":"Add Dive Time"})}),o.jsxs("form",{onSubmit:h,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(te,{htmlFor:"name",children:"Name *"}),o.jsx(ye,{id:"name",name:"name",placeholder:"e.g., Sunrise Dive, Morning Dive",defaultValue:n==null?void 0:n.name,required:!0})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"time",children:"Time *"}),o.jsx(ye,{id:"time",name:"time",type:"time",defaultValue:n==null?void 0:n.time,required:!0})]}),o.jsxs("div",{children:[o.jsxs(te,{htmlFor:"dive_site_id",className:"flex items-center gap-2",children:[o.jsx(Ui,{className:"w-4 h-4 text-cyan-600"}),"Associated Dive Site"]}),o.jsxs(ht,{name:"dive_site_id",defaultValue:(n==null?void 0:n.dive_site_id)||"none",children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select dive site (optional)"})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"none",children:"None"}),a.filter(g=>g.is_active).map(g=>o.jsx(Pe,{value:g.id,children:g.name},g.id))]})]})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"description",children:"Description"}),o.jsx(ur,{id:"description",name:"description",placeholder:"Optional description",defaultValue:n==null?void 0:n.description,rows:3})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{htmlFor:"is_active",children:"Active"}),o.jsx(jn,{id:"is_active",name:"is_active",defaultChecked:(n==null?void 0:n.is_active)??!0})]}),o.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{type:"submit",disabled:l.isPending||c.isPending,children:n?"Update":"Create"})]})]})]})})]})}function Npe(){return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Assets & Logistics"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage dive sites, vehicles, equipment, and dive times"})]}),o.jsxs(Dp,{defaultValue:"sites",className:"space-y-4",children:[o.jsxs(Nd,{children:[o.jsxs(Wr,{value:"sites",className:"flex items-center gap-2",children:[o.jsx(Ui,{className:"w-4 h-4"}),"Dive Sites"]}),o.jsxs(Wr,{value:"vehicles",className:"flex items-center gap-2",children:[o.jsx(Na,{className:"w-4 h-4"}),"Vehicles"]}),o.jsxs(Wr,{value:"equipment",className:"flex items-center gap-2",children:[o.jsx($i,{className:"w-4 h-4"}),"Equipment"]}),o.jsxs(Wr,{value:"times",className:"flex items-center gap-2",children:[o.jsx(ga,{className:"w-4 h-4"}),"Dive Times"]})]}),o.jsx(Fi,{value:"sites",className:"bg-white rounded-xl p-6 shadow-sm",children:o.jsx(Nfe,{})}),o.jsx(Fi,{value:"vehicles",className:"bg-white rounded-xl p-6 shadow-sm",children:o.jsx(jpe,{})}),o.jsx(Fi,{value:"equipment",className:"bg-white rounded-xl p-6 shadow-sm",children:o.jsx(Spe,{})}),o.jsx(Fi,{value:"times",className:"bg-white rounded-xl p-6 shadow-sm",children:o.jsx(_pe,{})})]})]})})}function Cpe(){return o.jsx(ms,{children:o.jsx(Npe,{})})}function xt(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 fs(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ppe(e,t){const n=xt(e);return isNaN(t)?fs(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function jV(e,t){const n=xt(e);if(isNaN(t))return fs(e,NaN);if(!t)return n;const r=n.getDate(),i=fs(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const s=i.getDate();return r>=s?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}const SV=6048e5,Ape=864e5,_V=6e4,NV=36e5,$g=43200,$D=1440;let kpe={};function Ed(){return kpe}function Du(e,t){var l,c,d,h;const n=Ed(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,i=xt(e),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Wy(e){return Du(e,{weekStartsOn:1}
679)}function CV(e){const t=xt(e),n=t.getFullYear(),r=fs(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Wy(r),s=fs(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const a=Wy(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Nh(e){const t=xt(e);return t.setHours(0,0,0,0),t}function Hy(e){const t=xt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Epe(e,t){const n=Nh(e),r=Nh(t),i=+n-Hy(n),s=+r-Hy(r);return Math.round((i-s)/Ape)}function Tpe(e){const t=CV(e),n=fs(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wy(n)}function _y(e,t){const n=xt(e),r=xt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Ope(e){return fs(e,Date.now())}function MC(e,t){const n=Nh(e),r=Nh(t);return+n==+r}function Mpe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Rpe(e){if(!Mpe(e)&&typeof e!="number")return!1;const t=xt(e);return!isNaN(Number(t))}function Dpe(e,t){const n=xt(e),r=xt(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function Ipe(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function Lpe(e,t){return+xt(e)-+xt(t)}function $pe(e){const t=xt(e);return t.setHours(23,59,59,999),t}function ha(e){const t=xt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Fpe(e){const t=xt(e);return+$pe(t)==+ha(t)}function Bpe(e,t){const n=xt(e),r=xt(t),i=_y(n,r),s=Math.abs(Dpe(n,r));let a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let l=_y(n,r)===-i;Fpe(xt(e))&&s===1&&_y(e,r)===1&&(l=!1),a=i*(s-Number(l))}return a===0?0:a}function qpe(e,t,n){const r=Lpe(e,t)/1e3;return Ipe(n==null?void 0:n.roundingMethod)(r)}function Ak(e,t){const n=xt(e.start),r=xt(e.end);let i=+n>+r;const s=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0);let l=1;const c=[];for(;+a<=s;)c.push(xt(a)),a.setDate(a.getDate()+l),a.setHours(0,0,0,0);return i?c.reverse():c}function No(e){const t=xt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zpe(e){const t=xt(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function PV(e){const t=xt(e),n=fs(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Upe(e,t){var l,c;const n=Ed(),r=n.weekStartsOn??((c=(l=n.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??0,i=xt(e),s=i.getDay(),a=(s<r?-7:0)+6-(s-r);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}const Vpe={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"}},Wpe=(e,t,n)=>{let r;const i=Vpe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function u1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Hpe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kpe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gpe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ype={date:u1({formats:Hpe,defaultWidth:"full"}),time:u1({formats:Kpe,defaultWidth:"full"}),dateTime:u1({formats:Gpe,defaultWidth:"full"})},Xpe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qpe=(e,t,n,r)=>Xpe[e];function Of(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}
vendor: 9,244 bytes, line 679
679const Jpe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zpe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eme={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"]},tme={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"]},nme={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"}},rme={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"}},ime=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},sme={ordinalNumber:ime,era:Of({values:Jpe,defaultWidth:"wide"}),quarter:Of({values:Zpe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Of({values:eme,defaultWidth:"wide"}),day:Of({values:tme,defaultWidth:"wide"}),dayPeriod:Of({values:nme,defaultWidth:"wide",formattingValues:rme,defaultFormattingWidth:"wide"})};function Mf(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?ome(l,f=>f.test(a)):ame(l,f=>f.test(a));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const h=t.slice(a.length);return{value:d,rest:h}}}function ame(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ome(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function lme(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(i.length);return{value:a,rest:l}}}const cme=/^(\d+)(th|st|nd|rd)?/i,ume=/\d+/i,dme={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},fme={any:[/^b/i,/^(a|c)/i]},hme={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},pme={any:[/1/i,/2/i,/3/i,/4/i]},mme={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},gme={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]},yme={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},vme={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]},xme={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},bme={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}},wme={ordinalNumber:lme({matchPattern:cme,parsePattern:ume,valueCallback:e=>parseInt(e,10)}),era:Mf({matchPatterns:dme,defaultMatchWidth:"wide",parsePatterns:fme,defaultParseWidth:"any"}),quarter:Mf({matchPatterns:hme,defaultMatchWidth:"wide",parsePatterns:pme,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Mf({matchPatterns:mme,defaultMatchWidth:"wide",parsePatterns:gme,defaultParseWidth:"any"}),day:Mf({matchPatterns:yme,defaultMatchWidth:"wide",parsePatterns:vme,defaultParseWidth:"any"}),dayPeriod:Mf({matchPatterns:xme,defaultMatchWidth:"any",parsePatterns:bme,defaultParseWidth:"any"})},AV={code:"en-US",formatDistance:Wpe,formatLong:Ype,formatRelative:Qpe,localize:sme,match:wme,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jme(e){const t=xt(e);return Epe(t,PV(t))+1}function Sme(e){const t=xt(e),n=+Wy(t)-+Tpe(t);return Math.round(n/SV)+1}function kV(e,t){var h,f,m,g;const n=xt(e),r=n.getFullYear(),i=Ed(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((g=(m=i.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,a=fs(e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const l=Du(a,t),c=fs(e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const d=Du(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function _me(e,t){var l,c,d,h;const n=Ed(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=kV(e,t),s=fs(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Du(s,t)}function Nme(e,t){const n=xt(e),r=+Du(n,t)-+_me(n,t);return Math.round(r/SV)+1}function Bt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const lo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Bt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Bt(n+1,2)},d(e,t){return Bt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Bt(e.getHours()%12||12,t.length)},H(e,t){return Bt(e.getHours(),t.length)},m(e,t){return Bt(e.getMinutes(),t.length)},s(e,t){return Bt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Bt(i,t.length)}},Gc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},FD={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return lo.y(e,t)},Y:function(e,t,n,r){const i=kV(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Bt(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Bt(s,t.length)},R:function(e,t){const n=CV(e);return Bt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Bt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Bt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Bt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return lo.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Bt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Nme(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Bt(i,t.length)},I:function(e,t,n){const r=Sme(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Bt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):lo.d(e,t)}
vendor: 4,225 bytes, line 679
679,D:function(e,t,n){const r=jme(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Bt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Bt(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Bt(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Bt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Gc.noon:r===0?i=Gc.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Gc.evening:r>=12?i=Gc.afternoon:r>=4?i=Gc.morning:i=Gc.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return lo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):lo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Bt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Bt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):lo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):lo.s(e,t)},S:function(e,t){return lo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return qD(r);case"XXXX":case"XX":return gl(r);case"XXXXX":case"XXX":default:return gl(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return qD(r);case"xxxx":case"xx":return gl(r);case"xxxxx":case"xxx":default:return gl(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+BD(r,":");case"OOOO":default:return"GMT"+gl(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+BD(r,":");
679case"zzzz":default:return"GMT"+gl(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Bt(r,t.length)},T:function(e,t,n){const r=e.getTime();return Bt(r,t.length)}};function BD(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Bt(s,2)}function qD(e,t){return e%60===0?(e>0?"-":"+")+Bt(Math.abs(e)/60,2):gl(e,t)}function gl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Bt(Math.trunc(r/60),2),s=Bt(r%60,2);return n+i+t+s}const zD=(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"})}},EV=(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"})}},Cme=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return zD(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",zD(r,t)).replace("{{time}}",EV(i,t))},Pme={p:EV,P:Cme},Ame=/^D+$/,kme=/^Y+$/,Eme=["D","DD","YY","YYYY"];function Tme(e){return Ame.test(e)}function Ome(e){return kme.test(e)}function Mme(e,t,n){const r=Rme(e,t,n);if(console.warn(r),Eme.includes(e))throw new RangeError(r)}function Rme(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Dme=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ime=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Lme=/^'([^]*?)'?$/,$me=/''/g,Fme=/[a-zA-Z]/;function _e(e,t,n){var h,f,m,g;const r=Ed(),i=r.locale??AV,s=r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=r.weekStartsOn??((g=(m=r.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,l=xt(e);if(!Rpe(l))throw new RangeError("Invalid time value");let c=t.match(Ime).map(x=>{const v=x[0];if(v==="p"||v==="P"){const b=Pme[v];return b(x,i.formatLong)}return x}).join("").match(Dme).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const v=x[0];if(v==="'")return{isToken:!1,value:Bme(x)};if(FD[v])return{isToken:!0,value:x};if(v.match(Fme))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:x}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const d={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return c.map(x=>{if(!x.isToken)return x.value;const v=x.value;(Ome(v)||Tme(v))&&Mme(v,t,String(e));const b=FD[v[0]];return b(l,v,i.localize,d)}).join("")}function Bme(e){const t=e.match(Lme);return t?t[1].replace($me,"'"):e}function qme(e,t,n){const r=Ed(),i=(n==null?void 0:n.locale)??r.locale??AV,s=2520,a=_y(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const l=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let c,d;a>0?(c=xt(t),d=xt(e)):(c=xt(e),d=xt(t));const h=qpe(d,c),f=(Hy(d)-Hy(c))/1e3,m=Math.round((h-f)/60);let g;if(m<2)return n!=null&&n.includeSeconds?h<5?i.formatDistance("lessThanXSeconds",5,l):h<10?i.formatDistance("lessThanXSeconds",10,l):h<20?i.formatDistance("lessThanXSeconds",20,l):h<40?i.formatDistance("halfAMinute",0,l):h<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):m===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",m,l);if(m<45)return i.formatDistance("xMinutes",m,l);if(m<90)return i.formatDistance("aboutXHours",1,l);if(m<$D){const x=Math.round(m/60);return i.formatDistance("aboutXHours",x,l)}else{if(m<s)return i.formatDistance("xDays",1,l);if(m<$g){const x=Math.round(m/$D);return i.formatDistance("xDays",x,l)}else if(m<$g*2)return g=Math.round(m/$g),i.formatDistance("aboutXMonths",g,l)}if(g=Bpe(d,c),g<12){const x=Math.round(m/$g);return i.formatDistance("xMonths",x,l)}else{const x=g%12,v=Math.trunc(g/12);return x<3?i.formatDistance("aboutXYears",v,l):x<9?i.formatDistance("overXYears",v,l):i.formatDistance("almostXYears",v+1,l)}}function zme(e,t){return qme(e,Ope(e),t)}function Ch(e,t){const n=xt(e),r=xt(t);return n.getTime()>r.getTime()}function Ume(e){return+xt(e)<Date.now()}function TV(e,t){const n=xt(e),r=xt(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Vme(e,t){return Ppe(e,-t)}function Vt(e,t){const r=Gme(e);let i;if(r.date){const c=Yme(r.date,2);i=Xme(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const s=i.getTime();let a=0,l;if(r.time&&(a=Qme(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(l=Jme(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(s+a),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(s+a+l)}
vendor: 4,153 bytes, line 679
679const Fg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Wme=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Hme=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Kme=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Gme(e){const t={},n=e.split(Fg.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Fg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Fg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Fg.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Yme(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?i:s*100,restDateString:e.slice((r[1]||r[2]).length)}}function Xme(e,t){if(t===null)return new Date(NaN);const n=e.match(Wme);if(!n)return new Date(NaN);const r=!!n[4],i=Rf(n[1]),s=Rf(n[2])-1,a=Rf(n[3]),l=Rf(n[4]),c=Rf(n[5])-1;if(r)return rge(t,l,c)?Zme(t,l,c):new Date(NaN);{const d=new Date(0);return!tge(t,s,a)||!nge(t,i)?new Date(NaN):(d.setUTCFullYear(t,s,Math.max(i,a)),d)}}function Rf(e){return e?parseInt(e):1}function Qme(e){const t=e.match(Hme);if(!t)return NaN;const n=d1(t[1]),r=d1(t[2]),i=d1(t[3]);return ige(n,r,i)?n*NV+r*_V+i*1e3:NaN}function d1(e){return e&&parseFloat(e.replace(",","."))||0}function Jme(e){if(e==="Z")return 0;const t=e.match(Kme);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return sge(r,i)?n*(r*NV+i*_V):NaN}function Zme(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,s=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+s),r}const ege=[31,null,31,30,31,30,31,31,30,31,30,31];function OV(e){return e%400===0||e%4===0&&e%100!==0}function tge(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(ege[t]||(OV(e)?29:28))}function nge(e,t){return t>=1&&t<=(OV(e)?366:365)}function rge(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function ige(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function sge(e,t){return t>=0&&t<=59}function gu(e,t){return jV(e,-t)}function Vo(){const{data:e,isLoading:t}=Ee({queryKey:["currentUser"],queryFn:()=>ne.auth.me()}),n=(e==null?void 0:e.role)==="admin",r=(e==null?void 0:e.staff_permissions)||{},i={isAdmin:n,canManageProducts:n||r.can_manage_products,canAddProducts:n||r.can_manage_products||r.can_manage_sales,canEditProducts:n||r.can_manage_products||r.can_manage_sales,canViewProducts:!0,canManageSales:n||r.can_manage_sales,canViewSales:!0,canManageCustomers:n||r.can_manage_customers,canViewCustomers:!0,canManageInvoices:n||r.can_manage_invoices,canViewInvoices:!0,canViewVendors:n||r.can_view_vendors,canManageVendors:n||r.can_manage_vendors,canRecordPayments:n||r.can_record_payments,canViewFinancials:n||r.can_view_financials,canViewRevenue:n||r.can_view_financials,canViewProfit:n||r.can_view_financials,canViewCosts:n||r.can_view_financials,canViewReports:n||r.can_view_reports,canAssignTasks:n||r.can_assign_tasks,canManageAssets:n||r.can_manage_assets,canAssignResources:n||r.can_assign_resources,canManageLeave:n||r.can_manage_leave};return{user:e,permissions:i,isLoading:t}}const UD={red:{bg:"bg-red-100",text:"text-red-700",border:"border-red-300"},orange:{bg:"bg-orange-100",text:"text-orange-700",border:"border-orange-300"},amber:{bg:"bg-amber-100",text:"text-amber-700",border:"border-amber-300"},yellow:{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-300"},lime:{bg:"bg-lime-100",text:"text-lime-700",border:"border-lime-300"},green:{bg:"bg-green-100",text:"text-green-700",border:"border-green-300"},emerald:{bg:"bg-emerald-100",text:"text-emerald-700",border:"border-emerald-300"},teal:{bg:"bg-teal-100",text:"text-teal-700",border:"border-teal-300"},cyan:{bg:"bg-cyan-100",text:"text-cyan-700",border:"border-cyan-300"},sky:{bg:"bg-sky-100",text:"text-sky-700",border:"border-sky-300"},blue:{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-300"},indigo:{bg:"bg-indigo-100",text:"text-indigo-700",border:"border-indigo-300"}
679,violet:{bg:"bg-violet-100",text:"text-violet-700",border:"border-violet-300"},purple:{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-300"},fuchsia:{bg:"bg-fuchsia-100",text:"text-fuchsia-700",border:"border-fuchsia-300"},pink:{bg:"bg-pink-100",text:"text-pink-700",border:"border-pink-300"},rose:{bg:"bg-rose-100",text:"text-rose-700",border:"border-rose-300"}};function age({currentDate:e,sales:t,products:n,staffMembers:r,leaveRequests:i,tasks:s=[],customers:a=[],resourceAssignments:l=[],diveSites:c=[],vehicles:d=[],equipment:h=[],diveTimes:f=[],onDayClick:m,onLeaveSelection:g,onDaySummaryClick:x,selectedDates:v}){const b=No(e),j=ha(e),w=Du(b),N=Upe(j),k=Ak({start:w,end:N}),C=$=>{const F=_e($,"yyyy-MM-dd"),W=t.filter(H=>{const I=H.start_date||H.sale_date;if(!I)return!1;const V=H.end_date||I;return F>=I&&F<=V}),q=i.filter(H=>H.status==="approved"&&H.start_date&&H.end_date&&F>=H.start_date&&F<=H.end_date),K=s.filter(H=>!H.date||!H.deadline?!1:F>=H.date&&F<=H.deadline),L=l.find(H=>H.date===F);return{sales:W,leave:q,tasks:K,assignment:L}},A=$=>{const F=_e($,"yyyy-MM-dd");return v.includes(F)},E=$=>r.find(F=>F.id===$),P=$=>{var F;return((F=E($))==null?void 0:F.full_name)||"Unassigned"},D=$=>{const F=E($);return UD[F==null?void 0:F.color_code]||UD.cyan},B=$=>{var F;return((F=n.find(W=>W.id===$))==null?void 0:F.name)||"Unknown"},O=$=>a.find(F=>F.id===$),M=$=>{var F;return((F=O($))==null?void 0:F.has_personal_gear)===!0};return o.jsxs("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden",children:[o.jsx("div",{className:"grid grid-cols-7 bg-slate-50 border-b",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map($=>o.jsx("div",{className:"py-2 text-center text-xs font-medium text-slate-500",children:$},$))}),o.jsx("div",{className:"grid grid-cols-7",children:k.map(($,F)=>{var G,z,oe;const{sales:W,leave:q,tasks:K,assignment:L}=C($),H=TV($,e),I=MC($,new Date),V=A($);return o.jsxs("div",{className:Te("min-h-[100px] border-b border-r p-1 transition-colors relative group",!H&&"bg-slate-50",V&&"bg-cyan-50 ring-2 ring-inset ring-cyan-500"),children:[o.jsxs("div",{className:"flex items-start justify-between mb-1",children:[o.jsx("div",{className:Te("text-sm font-medium w-6 h-6 flex items-center justify-center rounded-full cursor-pointer",I&&"bg-cyan-600 text-white",!I&&!H&&"text-slate-300",!I&&H&&"text-slate-700"),onClick:()=>x($),children:_e($,"d")}),o.jsx("button",{onClick:()=>g($),className:Te("w-5 h-5 flex items-center justify-center rounded-full transition-all opacity-0 group-hover:opacity-100",V?"bg-cyan-600 text-white opacity-100":"bg-slate-200 hover:bg-cyan-500 hover:text-white"),title:"Select for leave request",children:o.jsx(en,{className:"w-3 h-3"})})]}),o.jsxs("div",{className:"space-y-0.5 overflow-hidden max-h-[70px] cursor-pointer",onClick:()=>m($),children:[q.slice(0,1).map((pe,ue)=>o.jsxs("div",{className:"text-xs px-1 py-0.5 rounded bg-amber-100 text-amber-700 truncate",children:["🏖️ ",pe.staff_name]},`leave-${ue}`)),W.slice(0,2).map((pe,ue)=>{var Ue,jt;const me=_e($,"yyyy-MM-dd"),Ne=D(pe.staff_id),ee=M(pe.customer_id),be=(Array.isArray(pe.dive_sessions)?pe.dive_sessions:[]).filter(qe=>qe.date===me),ae=be.length>0&&((Ue=be[0])!=null&&Ue.dive_time_id)?f.find(qe=>qe.id===be[0].dive_time_id):null,Ke=ae?ae.time:"";return o.jsxs("div",{className:Te("text-xs px-1 py-0.5 rounded truncate flex items-center gap-1",Ne.bg,Ne.text),title:`${pe.customer_name} - ${B(pe.product_id)} (${P(pe.staff_id)})${ee?" - Has Own Gear":""}`,children:[Ke&&o.jsx("span",{className:"font-semibold flex-shrink-0",children:Ke}),o.jsx("span",{className:"truncate",children:((jt=pe.customer_name)==null?void 0:jt.split(" ")[0])||"Customer"}),ee&&o.jsx(Kr,{className:"w-3 h-3 flex-shrink-0"})]},`sale-${ue}`)}),K.slice(0,1).map((pe,ue)=>o.jsxs("div",{className:"text-xs px-1 py-0.5 rounded bg-purple-100 text-purple-700 truncate",title:`${pe.title} - Assigned to: ${pe.staff_name} - Deadline: ${_e(new Date(pe.deadline+"T00:00:00"),"MMM d")}`,children:["📋 ",pe.title," → ",pe.staff_name]},`task-${ue}`)),L&&o.jsxs("div",{className:"flex gap-1 items-center px-1",children:[((G=L.assigned_dive_site_ids)==null?void 0:G.length)>0&&o.jsx("div",{className:"text-xs text-cyan-600",title:`${L.assigned_dive_site_ids.length} site(s)`,children:o.jsx(Ui,{className:"w-3 h-3"})}),((z=L.assigned_vehicle_ids)==null?void 0:z.length)>0&&o.jsx("div",{className:"text-xs text-blue-600",title:`${L.assigned_vehicle_ids.length} vehicle(s)`,children:o.jsx(Na,{className:"w-3 h-3"})}),((oe=L.assigned_equipment_item_ids)==null?void 0:oe.length)>0&&o.jsx("div",{className:"text-xs text-purple-600",title:`${L.assigned_equipment_item_ids.length} equipment`,children:o.jsx($i,{className:"w-3 h-3"})})]}),(W.length>2||q.length>1||K.length>1)&&o.jsxs("div",{className:"text-xs text-slate-400 px-1",children:["+",Math.max(0,W.length-2)+Math.max(0,q.length-1)+Math.max(0,K.length-1)," more"]})]})]},F)})})]})}const oge=sx("inline-flex items-center rounded-md 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function st({className:e,variant:t,...n}){return o.jsx("div",{className:Te(oge({variant:t}),e),...n})}function lge({open:e,onOpenChange:t,date:n,sales:r,products:i,staffMembers:s,leaveRequests:a,diveSites:l=[],vehicles:c=[],equipment:d=[],customers:h=[],diveTimes:f=[],tasks:m=[]}){if(!n)return null;const g=_e(n,"yyyy-MM-dd"),x=r.filter(P=>{const D=P.start_date||P.sale_date;if(!D)return!1;const B=P.end_date||D;return g>=D&&g<=B}),v=a.filter(P=>P.status==="approved"&&P.start_date&&P.end_date&&g>=P.start_date&&g<=P.end_date),b=m.filter(P=>!P.date||!P.deadline?!1:g>=P.date&&g<=P.deadline),j=P=>{var D;return((D=s.find(B=>B.id===P))==null?void 0:D.full_name)||"Unassigned"},w=P=>{var D;return((D=i.find(B=>B.id===P))==null?void 0:D.name)||"Unknown"},N=P=>l.find(D=>D.id===P),k=P=>c.find(D=>D.id===P),C=P=>d.find(D=>D.id===P),A=P=>h.find(D=>D.id===P),E=P=>f.find(D=>D.id===P);return o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-w-md max-h-[80vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsxs(Vn,{className:"flex items-center gap-2",children:[o.jsx(vi,{className:"w-5 h-5 text-cyan-600"}),_e(n,"EEEE, MMMM d, yyyy")]})}),o.jsxs("div",{className:"space-y-4",children:[b.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:["Tasks (",b.length,")"]}),o.jsx("div",{className:"space-y-2",children:b.map((P,D)=>o.jsxs("div",{className:"p-3 bg-purple-50 rounded-lg border border-purple-100 space-y-2",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:P.title}),o.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 mt-1",children:[o.jsx(Ca,{className:"w-3 h-3"}),P.staff_name]})]}),o.jsx(st,{className:P.priority==="high"?"bg-red-100 text-red-700":P.priority==="medium"?"bg-yellow-100 text-yellow-700":"bg-blue-100 text-blue-700",children:P.priority})]}),P.description&&o.jsx("p",{className:"text-xs text-slate-600",children:P.description}),o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsxs("span",{className:"text-slate-500",children:["Deadline: ",_e(new Date(P.deadline+"T00:00:00"),"MMM d")]}),o.jsx(st,{variant:"outline",className:"text-xs",children:P.status.replace("_"," ")})]})]},D))})]}),v.length>0&&o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:"Staff on Leave"}),o.jsx("div",{className:"space-y-2",children:v.map((P,D)=>o.jsxs("div",{className:"flex items-center gap-2 p-2 bg-amber-50 rounded-lg",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-200 flex items-center justify-center text-amber-700",children:"🏖️"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-slate-800",children:P.staff_name}),o.jsx("p",{className:"text-xs text-slate-500",children:P.reason||"Personal leave"})]})]},D))})]}),x.length>0?o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:["Assignments (",x.length,")"]}),o.jsx("div",{className:"space-y-3 max-h-[400px] overflow-y-auto",children:x.map((P,D)=>{const O=(Array.isArray(P.dive_sessions)?P.dive_sessions:[]).filter(L=>L.date===g),M=O.map(L=>
679N(L.dive_site_id)).filter(Boolean),$=O.flatMap(L=>(L.vehicle_ids||[]).map(H=>k(H))).filter(Boolean),F=O.flatMap(L=>(L.equipment_ids||[]).map(H=>C(H))).filter(Boolean),W=O.map(L=>E(L.dive_time_id)).filter(Boolean),q=A(P.customer_id),K=q!=null&&q.has_personal_gear?q.personal_gear||[]:[];return o.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg space-y-2",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("p",{className:"font-medium text-slate-800",children:P.customer_name||"Unknown Customer"}),W.map((L,H)=>o.jsx(st,{className:"bg-amber-100 text-amber-700 text-xs",children:L.time},H))]}),o.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 mt-1",children:[o.jsx($i,{className:"w-3 h-3"}),w(P.product_id)]})]}),o.jsxs(st,{variant:"outline",className:"text-xs",children:[o.jsx(Ca,{className:"w-3 h-3 mr-1"}),j(P.staff_id)]})]}),K.length>0&&o.jsxs("div",{className:"pt-2 border-t border-slate-200",children:[o.jsx("p",{className:"text-xs font-medium text-slate-600 mb-1",children:"Customer's Own Gear:"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:K.map((L,H)=>o.jsx(st,{variant:"secondary",className:"text-xs",children:L},H))})]}),(M.length>0||$.length>0||F.length>0)&&o.jsxs("div",{className:"space-y-1 pt-2 border-t border-slate-200",children:[o.jsx("p",{className:"text-xs font-medium text-slate-600 mb-1",children:"Assigned Resources:"}),M.length>0&&o.jsx("div",{className:"text-xs text-cyan-700",children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(Ui,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{className:"space-y-0.5",children:M.map((L,H)=>o.jsxs("div",{children:[L.name," ",L.location&&`(${L.location})`]},H))})]})}),$.length>0&&o.jsx("div",{className:"text-xs text-blue-700",children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(Na,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{className:"space-y-0.5",children:$.map((L,H)=>o.jsxs("div",{children:[L.name," (",L.type,")"]},H))})]})}),F.length>0&&o.jsx("div",{className:"text-xs text-purple-700",children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx($i,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{className:"space-y-0.5",children:F.map((L,H)=>o.jsxs("div",{children:[L.name," (",L.type,")"]},H))})]})})]}),P.group_name&&o.jsxs("p",{className:"text-xs text-slate-400",children:["Group: ",P.group_name]})]},D)})})]}):v.length===0&&b.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-4",children:"No assignments for this day"})]})]})})}function cge({open:e,onOpenChange:t,sale:n}){const[r,i]=_.useState([]),[s,a]=_.useState(""),[l,c]=_.useState(!1),[d,h]=_.useState(""),[f,m]=_.useState(""),[g,x]=_.useState(!1),v=hn(),{data:b=[]}=Ee({queryKey:["diveSites"],queryFn:()=>ne.entities.DiveSite.list()}),{data:j=[]}=Ee({queryKey:["vehicles"],queryFn:()=>ne.entities.Vehicle.list()}),{data:w=[]}=Ee({queryKey:["equipment"],queryFn:()=>ne.entities.EquipmentItem.list()}),{data:N=[]}=Ee({queryKey:["diveTimes"],queryFn:()=>ne.entities.DiveTime.list()});_.useEffect(()=>{if(n){const L=Array.isArray(n.dive_sessions)?n.dive_sessions:[];i(L)}},[n]);const k=n!=null&&n.start_date&&(n!=null&&n.end_date)?Ak({start:new Date(n.start_date+"T00:00:00"),end:new Date(n.end_date+"T00:00:00")}):[],C=L=>{const H=_e(L,"yyyy-MM-dd");return r.filter(I=>I.date===H)},A=L=>{const H=_e(L,"yyyy-MM-dd");i([...r,{date:H,dive_time_id:"",dive_site_id:"",vehicle_ids:[],equipment_ids:[]}])},E=Ye({mutationFn:({id:L,data:H})=>ne.entities.Sale.update(L,H),onSuccess:()=>{v.invalidateQueries({queryKey:["sales"]}),t(!1),gt.success("Resources assigned")}}),P=Ye({mutationFn:L=>ne.entities.DiveSite.create(L),onSuccess:()=>{v.invalidateQueries({queryKey:["diveSites"]}),c(!1),a(""),gt.success("Dive site created")}}),D=Ye({mutationFn:L=>ne.entities.DiveTime.create(L),onSuccess:()=>{v.invalidateQueries({queryKey:["diveTimes"]}),x(!1),h(""),m(""),gt.success("Dive time created")}}),B=L=>{const H=r.filter((I,V)=>V!==L);i(H)},O=(L,H,I)=>{const V=[...r];V[L]={...V[L],[H]:I},i(V)},M=(L,H,I)=>{const V=[...r],G=Array.isArray(V[L][H])?V[L][H]:[];G.includes(I)?V[L][H]=G.filter(z=>z!==I):V[L][H]=[...G,I],i(V)},$=()=>{E.mutate({id:n.id,data:{dive_sessions:r}})},F=()=>{s.trim()&&P.mutate({name:s,is_active:!0})},W=()=>{!d.trim()||!f.trim()||D.mutate({name:d,time:f,is_active:!0})};if(!n)return null;const q=L=>N.find(H=>H.id===L),K=L=>b.find(H=>H.id===L);return o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-w-5xl max-h-[90vh] overflow-y-auto",children:[o.jsxs(Un,{children:[o.jsxs(Vn,{children:["Assign Resources - ",n.customer_name]}),o.jsx(hk,{children:n.start_date===n.end_date?`Single day: ${_e(new Date(n.start_date+"T00:00:00"),"MMM d, yyyy")}`:`${_e(new Date(n.start_date+"T00:00:00"),"MMM d")} to ${_e(new Date(n.end_date+"T00:00:00"),"MMM d, yyyy")}`})]}),o.jsxs(Dp,{defaultValue:k.length>0?_e(k[0],"yyyy-MM-dd"):"",className:"w-full",children:[o.jsx(Nd,{className:"w-full flex-wrap h-auto",children:k.map(L=>{const H=_e(L,"yyyy-MM-dd"),I=C(L);return o.jsxs(Wr,{value:H,className:"flex items-center gap-2",children:[o.jsx(vi,{className:"w-3 h-3"}),_e(L,"MMM d"),I.length>0&&o.jsx(st,{variant:"secondary",className:"ml-1 text-xs",children:I.length})]},H)})}),k.map(L=>{const H=_e(L,"yyyy-MM-dd"),I=r.map((V,G)=>({session:V,index:G})).filter(({session:V})=>V.date===H);
679return o.jsxs(Fi,{value:H,className:"space-y-4 mt-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-sm font-medium text-slate-700",children:_e(L,"EEEE, MMMM d, yyyy")}),o.jsxs(re,{size:"sm",onClick:()=>A(L),variant:"outline",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Session"]})]}),I.length===0?o.jsx("div",{className:"text-center py-8 text-slate-400 border-2 border-dashed rounded-lg",children:'No sessions for this date. Click "Add Session" above.'}):o.jsx("div",{className:"space-y-4",children:I.map(({session:V,index:G})=>{var pe;const z=q(V.dive_time_id),oe=K(V.dive_site_id);return o.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-slate-50",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h4",{className:"font-medium text-slate-700 flex items-center gap-2",children:[o.jsx(ga,{className:"w-4 h-4"}),V.dive_time_id?((pe=N.find(ue=>ue.id===V.dive_time_id))==null?void 0:pe.name)||"Session":"New Session"]}),o.jsx(re,{variant:"ghost",size:"sm",onClick:()=>B(G),children:o.jsx(On,{className:"w-4 h-4"})})]}),o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-600",children:"Dive Time"}),o.jsxs(ht,{value:V.dive_time_id,onValueChange:ue=>O(G,"dive_time_id",ue),children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select time..."})}),o.jsx(ut,{children:(N||[]).filter(ue=>ue.is_active).map(ue=>o.jsxs(Pe,{value:ue.id,children:[ue.time," - ",ue.name]},ue.id))})]}),z&&o.jsx("p",{className:"text-xs text-slate-500 mt-1",children:z.time})]}),o.jsxs("div",{children:[o.jsxs(te,{className:"text-xs text-slate-600 flex items-center gap-1",children:[o.jsx(Ui,{className:"w-3 h-3"}),"Dive Site"]}),o.jsxs(ht,{value:V.dive_site_id,onValueChange:ue=>O(G,"dive_site_id",ue),children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select dive site..."})}),o.jsx(ut,{children:(b||[]).filter(ue=>ue.is_active).map(ue=>o.jsxs(Pe,{value:ue.id,children:[ue.name," ",ue.location&&`(${ue.location})`]},ue.id))})]}),oe&&o.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[oe.name," ",oe.location&&`- ${oe.location}`]})]}),o.jsxs("div",{children:[o.jsxs(te,{className:"text-xs text-slate-600 flex items-center gap-1",children:[o.jsx(Na,{className:"w-3 h-3"}),"Vehicles"]}),o.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:(j||[]).filter(ue=>ue.is_active).map(ue=>o.jsx(st,{variant:(V.vehicle_ids||[]).includes(ue.id)?"default":"outline",className:"cursor-pointer",onClick:()=>M(G,"vehicle_ids",ue.id),children:ue.name},ue.id))})]}),o.jsxs("div",{children:[o.jsxs(te,{className:"text-xs text-slate-600 flex items-center gap-1",children:[o.jsx($i,{className:"w-3 h-3"}),"Equipment"]}),o.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:(w||[]).filter(ue=>ue.is_active).map(ue=>o.jsx(st,{variant:(V.equipment_ids||[]).includes(ue.id)?"default":"outline",className:"cursor-pointer",onClick:()=>M(G,"equipment_ids",ue.id),children:ue.name},ue.id))})]})]},G)})})]},H)})]}),o.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[l&&o.jsxs("div",{className:"border rounded-lg p-3 bg-cyan-50",children:[o.jsx(te,{children:"New Dive Site"}),o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.jsx(ye,{placeholder:"Site name",value:s,onChange:L=>a(L.target.value)}),o.jsx(re,{onClick:F,size:"sm",children:"Create"}),o.jsx(re,{onClick:()=>c(!1),variant:"outline",size:"sm",children:"Cancel"})]})]}),g&&o.jsxs("div",{className:"border rounded-lg p-3 bg-amber-50",children:[o.jsx(te,{children:"New Dive Time"}),o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.jsx(ye,{placeholder:"Name (e.g., Morning Dive)",value:d,onChange:L=>h(L.target.value)}),o.jsx(ye,{placeholder:"Time (HH:mm)",value:f,onChange:L=>m(L.target.value)}),o.jsx(re,{onClick:W,size:"sm",children:"Create"}),o.jsx(re,{onClick:()=>x(!1),variant:"outline",size:"sm",children:"Cancel"})]})]}),o.jsxs("div",{className:"flex gap-2",children:[!l&&o.jsxs(re,{onClick:()=>c(!0),variant:"outline",size:"sm",children:[o.jsx(en,{className:"w-3 h-3 mr-1"}),"New Site"]}),!g&&o.jsxs(re,{onClick:()=>x(!0),variant:"outline",size:"sm",children:[o.jsx(en,{className:"w-3 h-3 mr-1"}),"New Time"]})]}),o.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Total sessions: ",r.length," across ",k.length," day(s)"]})]}),o.jsxs("div",{className:"flex justify-end gap-3 border-t pt-4",children:[o.jsx(re,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{onClick:$,disabled:E.isPending,children:E.isPending?"Saving...":"Save Resources"})]})]})})}function uge({open:e,onOpenChange:t,date:n,sales:r,products:i,staffMembers:s,leaveRequests:a,diveSites:l=[],vehicles:c=[],equipment:d=[],customers:h=[],diveTimes:f=[],tasks:m=[],isAdmin:g=!1}){const[x,v]=_.useState(null),[b,j]=_.useState(!1);if(!n)return null;const w=_e(n,"yyyy-MM-dd"),N=r.filter(F=>{const W=F.start_date||F.sale_date;if(!W)return!1;const q=F.end_date||W;return w>=W&&w<=q}),k=a.filter(F=>F.status==="approved"&&F.start_date&&F.end_date&&w>=F.start_date&&w<=F.end_date),C=m.filter(F=>!F.date||!F.deadline?!1:w>=F.date&&w<=F.deadline),A=F=>{var W;return((W=s.find(q=>q.id===F))==null?void 0:W.full_name)||"Unassigned"},E=F=>{var W;return((W=i.find(q=>q.id===F))==null?void 0:W.name)||"Unknown"},P=F=>l.find(W=>W.id===F),D=F=>c.find(W=>W.id===F),B=F=>d.find(W=>W.id===F),O=F=>h.find(W=>W.id===F),M=F=>f.find(W=>W.id===F),$=N.length>0||k.length>0||C.length>0;return o.jsxs(o.Fragment,{children:[o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-w-lg max-h-[80vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsxs(Vn,{className:"flex items-center gap-2",children:[o.jsx(vi,{className:"w-5 h-5 text-cyan-600"}),_e(n,"EEEE, MMMM d, yyyy")]})}),o.jsxs("div",{className:"space-y-6",children:[!$&&o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No assignments, tasks, or leave for this date"}),C.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-3 flex items-center gap-2",children:[o.jsx($i,{className:"w-4 h-4 text-purple-600"}),"Tasks (",C.length,")"]}),o.jsx("div",{className:"space-y-2",children:C.map((F,W)=>{const q=(F.assigned_dive_site_ids||[]).map(H=>
679P(H)).filter(Boolean),K=(F.assigned_vehicle_ids||[]).map(H=>D(H)).filter(Boolean),L=(F.assigned_equipment_item_ids||[]).map(H=>B(H)).filter(Boolean);return o.jsxs("div",{className:"p-3 bg-purple-50 rounded-lg border border-purple-100",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:F.title}),o.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["Assigned to: ",F.staff_name]})]}),o.jsx(st,{className:F.priority==="high"?"bg-red-100 text-red-700":F.priority==="medium"?"bg-yellow-100 text-yellow-700":"bg-blue-100 text-blue-700",children:F.priority})]}),F.description&&o.jsx("p",{className:"text-xs text-slate-600 mb-2",children:F.description}),(q.length>0||K.length>0||L.length>0)&&o.jsxs("div",{className:"mt-2 pt-2 border-t border-purple-200 space-y-1",children:[o.jsx("p",{className:"text-xs font-medium text-purple-800 mb-1",children:"Required Assets:"}),q.length>0&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-cyan-800",children:[o.jsx(Ui,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{children:q.map(H=>H.name).join(", ")})]}),K.length>0&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-800",children:[o.jsx(Na,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{children:K.map(H=>H.name).join(", ")})]}),L.length>0&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-purple-800",children:[o.jsx($i,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{children:L.map(H=>H.name).join(", ")})]})]}),o.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-500 mt-2",children:[o.jsxs("span",{children:["Deadline: ",_e(new Date(F.deadline+"T00:00:00"),"MMM d, yyyy")]}),o.jsx(st,{variant:"outline",className:F.status==="completed"?"bg-green-50 text-green-700":F.status==="in_progress"?"bg-blue-50 text-blue-700":"bg-slate-50 text-slate-600",children:F.status.replace("_"," ")})]})]},W)})})]}),k.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-3 flex items-center gap-2",children:[o.jsx(QB,{className:"w-4 h-4 text-amber-600"}),"Staff on Leave (",k.length,")"]}),o.jsx("div",{className:"space-y-2",children:k.map((F,W)=>o.jsxs("div",{className:"p-3 bg-amber-50 rounded-lg border border-amber-100",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:F.staff_name}),o.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:F.start_date===F.end_date?_e(new Date(F.start_date+"T00:00:00"),"MMM d"):`${_e(new Date(F.start_date+"T00:00:00"),"MMM d")} - ${_e(new Date(F.end_date+"T00:00:00"),"MMM d")}`})]}),o.jsx(st,{className:"bg-amber-100 text-amber-700",children:F.leave_type.replace("_"," ")})]}),F.reason&&o.jsx("p",{className:"text-xs text-slate-600 mt-2",children:F.reason})]},W))})]}),N.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-3 flex items-center gap-2",children:[o.jsx($i,{className:"w-4 h-4 text-cyan-600"}),"Customer Assignments (",N.length,")"]}),o.jsx("div",{className:"space-y-3",children:N.map((F,W)=>{const K=(Array.isArray(F.dive_sessions)?F.dive_sessions:[]).filter(I=>I.date===w),L=O(F.customer_id),H=L!=null&&L.has_personal_gear?Array.isArray(L.personal_gear)?L.personal_gear:[]:[];return o.jsxs("div",{className:"p-3 bg-cyan-50 rounded-lg border border-cyan-100 space-y-2",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium text-slate-800",children:F.customer_name||"Customer"}),o.jsx("p",{className:"text-sm text-slate-600 mt-0.5",children:E(F.product_id)}),o.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[o.jsx(Ca,{className:"w-3 h-3 text-slate-400"}),o.jsxs("p",{className:"text-xs text-slate-500",children:["Staff: ",A(F.staff_id)]})]})]}),F.group_name&&o.jsx(st,{variant:"outline",className:"text-xs",children:F.group_name})]}),H.length>0&&o.jsxs("div",{className:"pt-2 border-t border-cyan-200",children:[o.jsx("p",{className:"text-xs font-medium text-cyan-800 mb
679-1",children:"Customer's Own Gear:"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:H.map((I,V)=>o.jsx(st,{variant:"secondary",className:"text-xs",children:I},V))})]}),K.length>0&&o.jsxs("div",{className:"space-y-2 pt-2 border-t border-cyan-200",children:[o.jsx("p",{className:"text-xs font-medium text-cyan-800",children:"Dive Sessions:"}),K.map((I,V)=>{const G=M(I==null?void 0:I.dive_time_id),z=P(I==null?void 0:I.dive_site_id),oe=Array.isArray(I==null?void 0:I.vehicle_ids)?I.vehicle_ids.map(ue=>D(ue)).filter(Boolean):[],pe=Array.isArray(I==null?void 0:I.equipment_ids)?I.equipment_ids.map(ue=>B(ue)).filter(Boolean):[];return o.jsxs("div",{className:"p-2 bg-white rounded border border-cyan-200",children:[G&&o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx(st,{className:"bg-amber-100 text-amber-700 text-xs",children:G.time}),o.jsx("span",{className:"text-xs text-slate-600",children:G.name})]}),z&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-cyan-800",children:[o.jsx(Ui,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsxs("div",{children:[z.name,z.location?` (${z.location})`:""]})]}),oe.length>0&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-800",children:[o.jsx(Na,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{children:oe.map(ue=>ue.name).join(", ")})]}),pe.length>0&&o.jsxs("div",{className:"flex items-start gap-2 text-xs text-purple-800",children:[o.jsx($i,{className:"w-3 h-3 mt-0.5 flex-shrink-0"}),o.jsx("div",{children:pe.map(ue=>ue.name).join(", ")})]})]},V)})]}),g&&o.jsxs(re,{size:"sm",variant:"outline",className:"w-full",onClick:()=>{v(F),j(!0)},children:[o.jsx(uu,{className:"w-3 h-3 mr-2"}),K.length>0?"Edit Sessions":"Assign Sessions"]})]},W)})})]})]})]})}),o.jsx(cge,{open:b,onOpenChange:j,sale:x})]})}const dge=[{value:"off",label:"Off"},{value:"off_in_lieu",label:"Off In Lieu"},{value:"leave",label:"Leave"},{value:"medical_certificate",label:"Medical Certificate"}];function fge({open:e,onOpenChange:t,selectedDates:n,onSubmit:r,isSubmitting:i}){const[s,a]=_.useState(""),[l,c]=_.useState("off"),d=[...n].sort(),h=d[0],f=d[d.length-1],m=()=>{r({start_date:h,end_date:f,leave_type:l,reason:s}),a(""),c("off")};return o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-w-md",children:[o.jsx(Un,{children:o.jsxs(Vn,{className:"flex items-center gap-2",children:[o.jsx(ax,{className:"w-5 h-5 text-cyan-600"}),"Request Leave"]})}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"p-3 bg-cyan-50 rounded-lg",children:[o.jsxs("p",{className:"text-sm text-cyan-700",children:[o.jsx("span",{className:"font-medium",children:"Selected dates:"})," ",h&&f&&(h===f?_e(new Date(h+"T00:00:00"),"MMM d, yyyy"):`${_e(new Date(h+"T00:00:00"),"MMM d")} - ${_e(new Date(f+"T00:00:00"),"MMM d, yyyy")}`)]}),o.jsxs("p",{className:"text-xs text-cyan-600 mt-1",children:[d.length," day(s) selected"]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Leave Type"}),o.jsxs(ht,{value:l,onValueChange:c,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsx(ut,{children:dge.map(g=>o.jsx(Pe,{value:g.value,children:g.label},g.value))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Reason (optional)"}),o.jsx(ur,{value:s,onChange:g=>a(g.target.value),placeholder:"Any additional notes...",rows:3})]})]}),o.jsxs(uU,{children:[o.jsx(re,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{onClick:m,disabled:i||n.length===0,className:"bg-cyan-600 hover:bg-cyan-700",children:i?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):"Submit Request"})]})]})})}const VD={off:{label:"Off",icon:QB,className:"bg-blue-100 text-blue-700"},off_in_lieu:{label:"Off In Lieu",icon:$J,className:"bg-purple-100 text-purple-700"},leave:{label:"Leave",icon:fJ,className:"bg-teal-100 text-teal-700"},medical_certificate:{label:"Medical",icon:nee,className:"bg-rose-100 text-rose-700"}};function hge({requests:e,isAdmin:t,onApprove:n,onReject:r,onDelete:i,currentUserId:s,isUpdating:a}){const l=e.filter(f=>f.status==="pending"),c=e.filter(f=>f.status!=="pending"),d={pending:{label:"Pending",className:"bg-amber-100 text-amber-700",icon:ga},approved:{label:"Approved",className:"bg-emerald-100 text-emerald-700",icon:Qr},rejected:{label:"Rejected",className:"bg-rose-100 text-rose-700",icon:xi}},h=({request:f})=>{const[m,g]=_.useState(!1),[x,v]=_.useState(""),b=d[f.status],j=b.icon,w=VD[f.leave_type]||VD.off,N=w.icon,k=()=>{m?(r(f.id,x),g(!1),v("")):g(!0)};return o.jsxs("div",{className:"p-3 bg-white border rounded-lg",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:f.staff_name}),o.jsx("div",{className:"flex items-center gap-2 mt-1",children:o.jsxs(st,{className:w.className,variant:"secondary",children:[o.jsx(N,{className:"w-3 h-3 mr-1"}),w.label]})}),o.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 mt-1",children:[o.jsx(vi,{className:"w-3 h-3"}),f.start_date&&f.end_date&&(f.start_date===f.end_date?_e(new Date(f.start_date+"T00:00:00"),"MMM d, yyyy"):`${_e(new Date(f.start_date+"T00:00:00"),"MMM d")} - ${_e(new Date(f.end_date+"T00:00:00"),"MMM d, yyyy")}`)]}),f.reason&&o.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f.reason}),f.admin_notes&&f.status==="rejected"&&o.jsxs("p",{className:"text-xs text-rose-600 mt-1 italic",children:["Note: ",f.admin_notes]})]}),o.jsxs(st,{className:b.className,children:[o.jsx(j,{className:"w-3 h-3 mr-1"}),b.label]})]}),t&&f.status==="pending"&&o.jsxs("div",{className:"space-y-2 mt-3 pt-3 border-t",children:[m&&o.jsx(ye,{placeholder:"Reason for rejection (optional)",value:x,onChange:C=>v(C.target.value),className:"text-sm"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(re,{size:"sm",variant:"outline",className:"flex-1 text-emerald-600 border-emerald-200 hover:bg-emerald-50",onClick:()=>n(f.id),disabled:a,children:[o.jsx(Qr,{className:"w-4 h-4 mr-1"}),"Approve"]}),o.jsxs(re,{size:"sm",variant:"outline",className:"flex-1 text-rose-600 border-rose-200 hover:bg-rose-50",onClick:k,disabled:a,children:[o.jsx(xi,{className:"w-4 h-4 mr-1"}),m?"Confirm":"Reject"]})]}),m&&o.jsx(re,{size:"sm",variant:"ghost",className:"w-full text-xs",onClick:()=>{g(!1),v("")},children:"Cancel"})]}),(t||f.staff_id===s)&&o.jsx("div",{className:"mt-3 pt-3 border-t",children:o.jsxs(re,{size:"sm",variant:"ghost",className:"w-full text-rose-600 hover:bg-rose-50",onClick:()=>{window.confirm("Are you sure you want to delete this leave request?")&&i(f.id)},disabled:a,children:[o.jsx(On,{className:"w-4 h-4 mr-1"}),"Delete Request"]})})]})};return o.jsxs("div",{className:"space-y-4",children:[l.length>0&&o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:["Pending Requests (",l.length,")"]}),o.jsx("div",{className:"space-y-2",children:l.map(f=>o.jsx(h,{request:f},f.id))})]}),c.length>0&&o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-medium text-slate-700 mb-2",children:"Recent Requests"}),o.jsx("div",{className:"space-y-2",children:c.slice(0,5).map(f=>o.jsx(h,{request:f},f.id))})]}),e.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-4",children:"No leave requests"})]})}var Lx="Checkbox",[pge]=ei(Lx),[mge,kk]=pge(Lx);function gge(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:a,name:l,onCheckedChange:c,required:d,value:h="on",internal_do_not_use_render:f}=e,[m,g]=Pa({prop:n,defaultProp:i??!1,onChange:c,caller:Lx}),[x,v]=_.useState(null),[b,j]=_.useState(null),w=_.useRef(!1),N=x?!!a||!!x.closest("form"):!0,k={checked:m,disabled:s,setChecked:g,control:x,setControl:v,name:l,form:a,value:h,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:To(i)?!1:i,isFormControl:N,bubbleInput:b,setBubbleInput:j};return o.jsx(mge,{scope:t,...k,children:yge(f)?f(k):r})}var MV="CheckboxTrigger",RV=_.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:a,disabled:l,checked:c,required:d,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:x}=kk(MV,e),v=yt(i,h),b=_.useRef(c);return _.useEffect(()=>{const j=s==null?void 0:s.form;if(j){const w=()=>f(b.current);return j.addEventListener("reset",w),()=>j.removeEventListener("reset",w)}},[s,f]),o.jsx(Ge.button,{type:"button",role:"checkbox","aria-checked":To(c)?"mixed":c,"aria-required":d,"data-state":FV(c),"data-disabled":l?"":void 0,disabled:l,value:a,...r,ref:v,onKeyDown:Oe(t,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:Oe(n,j=>{f(w=>To(w)?!0:!w),x&&g&&(m.current=j.isPropagationStopped(),m.current||j.stopPropagation())})})});RV.displayName=MV;var Ek=_.forwardRef((e,t)=>
679{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:d,form:h,...f}=e;return o.jsx(gge,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:d,name:r,form:h,value:c,internal_do_not_use_render:({isFormControl:m})=>o.jsxs(o.Fragment,{children:[o.jsx(RV,{...f,ref:t,__scopeCheckbox:n}),m&&o.jsx($V,{__scopeCheckbox:n})]})})});Ek.displayName=Lx;var DV="CheckboxIndicator",IV=_.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=kk(DV,n);return o.jsx(Sr,{present:r||To(s.checked)||s.checked===!0,children:o.jsx(Ge.span,{"data-state":FV(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});IV.displayName=DV;var LV="CheckboxBubbleInput",$V=_.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:l,disabled:c,name:d,value:h,form:f,bubbleInput:m,setBubbleInput:g}=kk(LV,e),x=yt(n,g),v=pk(s),b=mk(r);_.useEffect(()=>{const w=m;if(!w)return;const N=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(N,"checked").set,A=!i.current;if(v!==s&&C){const E=new Event("click",{bubbles:A});w.indeterminate=To(s),C.call(w,To(s)?!1:s),w.dispatchEvent(E)}},[m,v,s,i]);const j=_.useRef(To(s)?!1:s);return o.jsx(Ge.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??j.current,required:l,disabled:c,name:d,value:h,form:f,...t,tabIndex:-1,ref:x,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$V.displayName=LV;function yge(e){return typeof e=="function"}function To(e){return e==="indeterminate"}function FV(e){return To(e)?"indeterminate":e?"checked":"unchecked"}const qi=_.forwardRef(({className:e,...t},n)=>o.jsx(Ek,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(IV,{className:Te("flex items-center justify-center text-current"),children:o.jsx(Qr,{className:"h-4 w-4"})})}));qi.displayName=Ek.displayName;function vge({open:e,onOpenChange:t,selectedDate:n,staffMembers:r,onSubmit:i,isSubmitting:s}){const[a,l]=_.useState({title:"",description:"",staff_id:"",priority:"medium",status:"pending",deadline:""}),[c,d]=_.useState([]),[h,f]=_.useState([]),[m,g]=_.useState([]),{data:x=[]}=Ee({queryKey:["diveSites"],queryFn:()=>ne.entities.DiveSite.list(),enabled:e}),{data:v=[]}=Ee({queryKey:["vehicles"],queryFn:()=>ne.entities.Vehicle.list(),enabled:e}),{data:b=[]}=Ee({queryKey:["equipment"],queryFn:()=>ne.entities.EquipmentItem.list(),enabled:e}),j=w=>{w.preventDefault();const N=r.find(k=>k.id===a.staff_id);i({...a,staff_name:(N==null?void 0:N.full_name)||"",date:_e(n,"yyyy-MM-dd"),assigned_dive_site_ids:c,assigned_vehicle_ids:h,assigned_equipment_item_ids:m}),l({title:"",description:"",staff_id:"",priority:"medium",status:"pending",deadline:""}),d([]),f([]),g([])};return o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsxs(Vn,{children:["Create Task - ",n&&_e(n,"MMM d, yyyy")]})}),o.jsxs("form",{onSubmit:j,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx(te,{children:"Title"}),o.jsx(ye,{value:a.title,onChange:w=>l({...a,title:w.target.value}),placeholder:"Task title",required:!0})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Description"}),o.jsx(ur,{value:a.description,onChange:w=>l({...a,description:w.target.value}),placeholder:"Task description (optional)",rows:3})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Assign to Staff"}),o.jsxs(ht,{value:a.staff_id,onValueChange:w=>l({...a,staff_id:w}),required:!0,children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select staff member"})}),o.jsx(ut,{children:r.map(w=>o.jsx(Pe,{value:w.id,children:w.full_name},w.id))})]})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Priority"}),o.jsxs(ht,{value:a.priority,onValueChange:w=>l({...a,priority:w}),children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"low",children:"Low"}),o.jsx(Pe,{value:"medium",children:"Medium"}),o.jsx(Pe,{value:"high",children:"High"})]})]})]}),o.jsxs("div",{children:[o.jsx(te,{children:"Deadline (Optional)"}),o.jsx(ye,{type:"date",value:a.deadline,onChange:w=>l({...a,deadline:w.target.value})})]}),o.jsxs("div",{className:"space-y-4 pt-4 border-t",children:[o.jsx("h3",{className:"text-sm font-medium text-slate-700",children:"Required Assets (Optional)"}),x.length>0&&o.jsxs("div",{children:[o.jsxs(te,{className:"flex items-center gap-2 mb-2",children:[o.jsx(Ui,{className:"w-4 h-4 text-cyan-600"}),"Dive Sites"]}),o.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto border rounded-md p-2",children:x.map(w=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(qi,{id:`site-${w.id}`,checked:c.includes(w.id),onCheckedChange:N=>{d(N?[...c,w.id]:c.filter(k=>k!==w.id))}}),o.jsx("label",{htmlFor:`site-${w.id}`,className:"text-sm text-slate-700 cursor-pointer",children:w.name})]},w.id))})]}),v.length>0&&o.jsxs("div",{children:[o.jsxs(te,{className:"flex items-center gap-2 mb-2",children:[o.jsx(Na,{className:"w-4 h-4 text-blue-600"}),"Vehicles"]}),o.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto border rounded-md p-2",children:v.map(w=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(qi,{id:`vehicle-${w.id}`,checked:h.includes(w.id),onCheckedChange:N=>{f(N?[...h,w.id]:h.filter(k=>k!==w.id))}}),o.jsx("label",{htmlFor:`vehicle-${w.id}`,className:"text-sm text-slate-700 cursor-pointer",children:w.name})]},w.id))})]}),b.length>0&&o.jsxs("div",{children:[o.jsxs(te,{className:"flex items-center gap-2 mb-2",children:[o.jsx($i,{className:"w-4 h-4 text-purple-600"}),"Equipment"]}),o.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto border rounded-md p-2",children:b.map(w=>o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx(qi,{id:`equipment-${w.id}`,checked:m.includes(w.id),onCheckedChange:N=>{g(N?[...m,w.id]:m.filter(k=>k!==w.id))}}),o.jsxs("label",{htmlFor:`equipment-${w.id}`,className:"text-sm text-slate-700 cursor-pointer",children:[w.name," 
679(",w.type,")"]})]},w.id))})]})]}),o.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),o.jsx(re,{type:"submit",disabled:s,children:s?"Creating...":"Create Task"})]})]})]})})}const xge={low:"bg-slate-100 text-slate-700",medium:"bg-amber-100 text-amber-700",high:"bg-rose-100 text-rose-700"},bge={pending:ga,in_progress:FB,completed:lx};function wge({tasks:e,isAdmin:t,onDelete:n,onUpdateStatus:r,isUpdating:i,currentUser:s}){const a=[...e].sort((l,c)=>{const d={pending:0,in_progress:1,completed:2};return d[l.status]-d[c.status]});return e.length===0?o.jsx("p",{className:"text-sm text-slate-400 text-center py-4",children:"No tasks"}):o.jsx("div",{className:"space-y-2",children:a.map(l=>{const c=bge[l.status];return o.jsxs("div",{className:"bg-white rounded-lg border p-3 space-y-2",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:Te("font-medium text-sm",l.status==="completed"&&"line-through text-slate-400"),children:l.title}),l.description&&o.jsx("p",{className:"text-xs text-slate-500 mt-1",children:l.description}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx("p",{className:"text-xs text-slate-400",children:l.staff_name}),l.deadline&&o.jsxs("div",{className:Te("flex items-center gap-1 text-xs",Ume(Vt(l.deadline))&&l.status!=="completed"?"text-rose-600":"text-slate-400"),children:[o.jsx(vi,{className:"w-3 h-3"}),_e(Vt(l.deadline),"MMM d")]})]})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const d=l.status==="completed"?"pending":l.status==="pending"?"in_progress":"completed";r(l.id,d)},disabled:i,children:o.jsx(c,{className:"w-4 h-4"})}),(t||l.created_by===(s==null?void 0:s.email))&&o.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7 text-rose-600 hover:text-rose-700",onClick:()=>{window.confirm("Delete this task?")&&n(l.id)},disabled:i,children:o.jsx(On,{className:"w-4 h-4"})})]})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(st,{variant:"outline",className:xge[l.priority],children:l.priority}),o.jsx(st,{variant:"outline",className:"text-xs",children:l.status.replace("_"," ")})]})]},l.id)})})}var f1={exports:{}},h1={};/**
680 * @license React
681 * use-sync-external-store-shim.production.js
682 *
683 * Copyright (c) Meta Platforms, Inc. and affiliates.
684 *
685 * This source code is licensed under the MIT license found in the
686 * LICENSE file in the root directory of this source tree.
687 */var WD;function jge(){if(WD)return h1;WD=1;var e=ix();function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function l(f,m){var g=m(),x=r({inst:{value:g,getSnapshot:m}}),v=x[0].inst,b=x[1];return s(function(){v.value=g,v.getSnapshot=m,c(v)&&b({inst:v})},[f,g,m]),i(function(){return c(v)&&b({inst:v}),f(function(){c(v)&&b({inst:v})})},[f]),a(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function d(f,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return h1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,h1}var HD;function Sge(){return HD||(HD=1,f1.exports=jge()),f1.exports}var _ge=Sge();function Nge(){return _ge.useSyncExternalStore(Cge,()=>!0,()=>!1)}function Cge(){return()=>{}}var Tk="Avatar",[Pge]=ei(Tk),[Age,BV]=Pge(Tk),qV=_.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,s]=_.useState("idle");return o.jsx(Age,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:o.jsx(Ge.span,{...r,ref:t})})});qV.displayName=Tk;var zV="AvatarImage",UV=_.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=e,a=BV(zV,n),l=kge(r,s),c=er(d=>{i(d),a.onImageLoadingStatusChange(d)});return Mn(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?o.jsx(Ge.img,{...s,ref:t,src:r}):null});UV.displayName=zV;var VV="AvatarFallback",WV=_.forwardRef((e,t)=>
687{const{__scopeAvatar:n,delayMs:r,...i}=e,s=BV(VV,n),[a,l]=_.useState(r===void 0);return _.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&s.imageLoadingStatus!=="loaded"?o.jsx(Ge.span,{...i,ref:t}):null});WV.displayName=VV;function KD(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function kge(e,{referrerPolicy:t,crossOrigin:n}){const r=Nge(),i=_.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[a,l]=_.useState(()=>KD(s,e));return Mn(()=>{l(KD(s,e))},[s,e]),Mn(()=>{const c=f=>()=>{l(f)};if(!s)return;const d=c("loaded"),h=c("error");return s.addEventListener("load",d),s.addEventListener("error",h),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",d),s.removeEventListener("error",h)}},[s,n,t]),a}var HV=qV,KV=UV,GV=WV;const ya=_.forwardRef(({className:e,...t},n)=>o.jsx(HV,{ref:n,className:Te("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ya.displayName=HV.displayName;const Ph=_.forwardRef(({className:e,...t},n)=>o.jsx(KV,{ref:n,className:Te("aspect-square h-full w-full",e),...t}));Ph.displayName=KV.displayName;const va=_.forwardRef(({className:e,...t},n)=>o.jsx(GV,{ref:n,className:Te("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));va.displayName=GV.displayName;var YV="AlertDialog",[Ege]=ei(YV,[W8]),Ia=W8(),XV=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ia(t);return o.jsx(oU,{...r,...n,modal:!0})};XV.displayName=YV;var Tge="AlertDialogTrigger",Oge=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ia(n);return o.jsx(dfe,{...i,...r,ref:t})});Oge.displayName=Tge;var Mge="AlertDialogPortal",QV=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ia(t);return o.jsx(lU,{...r,...n})};QV.displayName=Mge;var Rge="AlertDialogOverlay",JV=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ia(n);return o.jsx(lk,{...i,...r,ref:t})});JV.displayName=Rge;var yu="AlertDialogContent",[Dge,Ige]=Ege(yu),Lge=Jse("AlertDialogContent"),ZV=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,s=Ia(n),a=_.useRef(null),l=yt(t,a),c=_.useRef(null);return o.jsx(ofe,{contentName:yu,titleName:e7,docsSlug:"alert-dialog",children:o.jsx(Dge,{scope:n,cancelRef:c,children:o.jsxs(ck,{role:"alertdialog",...s,...i,ref:l,onOpenAutoFocus:Oe(i.onOpenAutoFocus,d=>{var h;d.preventDefault(),(h=c.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[o.jsx(Lge,{children:r}),o.jsx(Fge,{contentRef:a})]})})})});ZV.displayName=yu;var e7="AlertDialogTitle",t7=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ia(n);return o.jsx(uk,{...i,...r,ref:t})});t7.displayName=e7;var n7="AlertDialogDescription",r7=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ia(n);return o.jsx(dk,{...i,...r,ref:t})});r7.displayName=n7;var $ge="AlertDialogAction",i7=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ia(n);return o.jsx(fk,{...i,...r,ref:t})});i7.displayName=$ge;var s7="AlertDialogCancel",a7=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Ige(s7,n),s=Ia(n),a=yt(t,i);return o.jsx(fk,{...s,...r,ref:a})});a7.displayName=s7;var Fge=({contentRef:e})=>{const t=`\`${yu}\` requires a description for the component to be accessible for screen reader users.
688
689You can add a description to the \`${yu}\` by passing a \`${n7}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
690
691Alternatively, 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 \`${yu}\`. 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.
692
693For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Bge=XV,qge=QV,o7=JV,l7=ZV,c7=i7,u7=a7,d7=t7,f7=r7;const $x=Bge,zge=qge,h7=_.forwardRef(({className:e,...t},n)=>o.jsx(o7,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));h7.displayName=o7.displayName;const qp=_.forwardRef(({className:e,...t},n)=>o.jsxs(zge,{children:[o.jsx(h7,{}),o.jsx(l7,{ref:n,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
693nded-lg",e),...t})]}));qp.displayName=l7.displayName;const zp=({className:e,...t})=>o.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});zp.displayName="AlertDialogHeader";const Up=({className:e,...t})=>o.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Up.displayName="AlertDialogFooter";const Vp=_.forwardRef(({className:e,...t},n)=>o.jsx(d7,{ref:n,className:Te("text-lg font-semibold",e),...t}));Vp.displayName=d7.displayName;const Wp=_.forwardRef(({className:e,...t},n)=>o.jsx(f7,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Wp.displayName=f7.displayName;const Hp=_.forwardRef(({className:e,...t},n)=>o.jsx(c7,{ref:n,className:Te(zA(),e),...t}));Hp.displayName=c7.displayName;const Kp=_.forwardRef(({className:e,...t},n)=>o.jsx(u7,{ref:n,className:Te(zA({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Kp.displayName=u7.displayName;function Uge({onUpload:e,isUploading:t}){const[n,r]=_.useState(!1),[i,s]=_.useState(""),a=_.useRef(null),l=async d=>{var f;const h=(f=d.target.files)==null?void 0:f[0];if(h){r(!0);try{const{file_url:m}=await ne.integrations.Core.UploadFile({file:h}),g=h.type.startsWith("video")?"video":"image";await e(m,g,i),s("")}catch(m){console.error("Upload failed:",m)}finally{r(!1),a.current&&(a.current.value="")}}},c=n||t;return o.jsxs("div",{className:"border-2 border-dashed border-slate-200 rounded-lg p-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Caption (optional)"}),o.jsx(ye,{value:i,onChange:d=>s(d.target.value),placeholder:"Add a caption...",disabled:c})]}),o.jsxs("div",{className:"pt-5",children:[o.jsx("input",{ref:a,type:"file",accept:"image/*,video/*",onChange:l,className:"hidden",disabled:c}),o.jsx(re,{onClick:()=>{var d;return(d=a.current)==null?void 0:d.click()},disabled:c,className:"bg-gradient-to-r from-cyan-600 to-blue-600",children:c?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_p,{className:"w-4 h-4 mr-2"}),"Upload"]})})]})]}),o.jsxs("p",{className:"text-xs text-slate-400 flex items-center gap-2",children:[o.jsx(Hl,{className:"w-3 h-3"}),o.jsx(JB,{className:"w-3 h-3"}),"Supports images and videos"]})]})}function Vge({media:e,onDelete:t,isDeleting:n}){const[r,i]=_.useState(null),[s,a]=_.useState(null),l=async(c,d)=>{c.stopPropagation(),a(d.id),await t(d.id),a(null)};return e.length===0?o.jsx("div",{className:"text-center text-slate-400 py-8",children:"No media uploaded yet"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:e.map(c=>o.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-slate-100 cursor-pointer group",onClick:()=>i(c),children:[c.file_type==="video"?o.jsxs("div",{className:"relative w-full h-full",children:[o.jsx("video",{src:c.file_url,className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:o.jsx(KB,{className:"w-10 h-10 text-white"})})]}):o.jsx("img",{src:c.file_url,alt:c.caption||"Media",className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
693parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:o.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-2 text-white",children:[c.caption&&o.jsx("p",{className:"text-sm truncate",children:c.caption}),o.jsxs("p",{className:"text-xs opacity-75",children:[c.uploaded_by," • ",_e(Vt(c.created_date),"MMM d")]})]})}),t&&o.jsx(re,{variant:"destructive",size:"icon",className:"absolute top-2 right-2 h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:d=>l(d,c),disabled:s===c.id,children:s===c.id?o.jsx(wr,{className:"w-3 h-3 animate-spin"}):o.jsx(On,{className:"w-3 h-3"})})]},c.id))}),o.jsx(tn,{open:!!r,onOpenChange:()=>i(null),children:o.jsxs(Kt,{className:"max-w-4xl p-0 bg-black border-none",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 z-10 text-white hover:bg-white/20",onClick:()=>i(null),children:o.jsx(xi,{className:"w-5 h-5"})}),(r==null?void 0:r.file_type)==="video"?o.jsx("video",{src:r==null?void 0:r.file_url,controls:!0,autoPlay:!0,className:"w-full max-h-[80vh]"}):o.jsx("img",{src:r==null?void 0:r.file_url,alt:(r==null?void 0:r.caption)||"Media",className:"w-full max-h-[80vh] object-contain"}),(r==null?void 0:r.caption)&&o.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent",children:[o.jsx("p",{className:"text-white",children:r.caption}),o.jsxs("p",{className:"text-white/60 text-sm",children:["Uploaded by ",r.uploaded_by," on ",_e(Vt(r.created_date),"MMM d, yyyy")]})]})]})})]})}const Wge=[{value:"new_to_diving",label:"New to Diving"},{value:"open_water",label:"Open Water Diver"},{value:"advanced_open_water",label:"Advanced Open Water"},{value:"rescue_diver",label:"Rescue Diver"},{value:"divemaster",label:"Divemaster"},{value:"instructor",label:"Instructor"}],Hge=["Mask","Fins","Wetsuit","BCD","Regulator","Computer","Camera"],GD=["Afghanistan","Albania","Algeria","Australia","Austria","Bangladesh","Belgium","Brazil","Canada","Chile","China","Colombia","Denmark","Egypt","Finland","France","Germany","Greece","Hungary","India","Indonesia","Ireland","Israel","Italy","Japan","Malaysia","Mexico","Netherlands","New Zealand","Norway","Pakistan","Peru","Philippines","Poland","Portugal","Republic of Korea","Romania","Russian Federation","Saudi Arabia","Singapore","South Africa","Spain","Sweden","Switzerland","Thailand","Turkey","Ukraine","United Arab Emirates","United Kingdom of Great Britain and Northern Ireland","United States of America","Viet Nam"];function Kge({customer:e,onSave:t,onCancel:n}){const[r,i]=_.useState({name:e.name||"",email:e.email||"",profile_picture:e.profile_picture||"",date_of_birth:e.date_of_birth||"",nationality:e.nationality||"",resident_country:e.resident_country||"",phone:e.phone||"",next_of_kin:e.next_of_kin||"",next_of_kin_contact:e.next_of_kin_contact||"",social_media:e.social_media||{},dive_level:e.dive_level||"",has_personal_gear:e.has_personal_gear||!1,personal_gear:e.personal_gear||[],notes:e.notes||"",medical_disclaimer_accepted:e.medical_disclaimer_accepted||!1}),[s,a]=_.useState(!1),l=_.useRef(null),[c,d]=_.useState(r.nationality),[h,f]=_.useState(!1),[m,g]=_.useState(r.resident_country),[x,v]=_.useState(!1),b=hn(),j=Ye({mutationFn:C=>ne.entities.Customer.update(e.id,C),onSuccess:()=>{b.invalidateQueries({queryKey:["customers"]}),b.invalidateQueries({queryKey:["registeredCustomers"]}),b.invalidateQueries({queryKey:["customerRecord"]}),b.invalidateQueries({queryKey:["sales"]}),t()}}),w=async C=>{var E;const A=(E=C.target.files)==null?void 0:E[0];if(A){a(!0);try{const{file_url:P}=await ne.integrations.Core.UploadFile({file:A});i(D=>({...D,profile_picture:P}))}catch(P){console.error("Failed to upload image:",P)}finally{a(!1)}}},N=C=>{i(A=>({...A,personal_gear:A.personal_gear.includes(C)?A.personal_gear.filter(E=>E!==C):[...A.personal_gear,C]}))},k=C=>{C.preventDefault(),j.mutate(r)};return o.jsxs("form",{onSubmit:k,className:"space-y-6",children:[o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[o.jsxs("div",{className:"relative w-24 h-24 rounded-full overflow-hidden bg-slate-100 border-2 border-dashed border-slate-300",children:[r.profile_picture?o.jsx("img",{src:r.profile_picture,alt:"Profile",className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center",children:o.jsx(Ca,{className:"w-10 h-10 text-slate-300"})}),s&&o.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:o.jsx(wr,{className:"w-6 h-6 text-white animate-spin"})})]}),o.jsx("input",{type:"file",ref:l,accept:"image/*",onChange:w,className:"hidden"}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:()=>l.current.click(),disabled:s,children:[o.jsx(LB,{className:"w-4 h-4 mr-2"})," Change Photo"]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Full Name *"}),o.jsx(ye,{value:r.name,onChange:C=>i(A=>({...A,name:C.target.value})),required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Email *"}),o.jsx(ye,{type:"email",value:r.email,onChange:C=>i(A=>({...A,email:C.target.value})),required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Date of Birth *"}),o.jsx(ye,{type:"date",value:r.date_of_birth,onChange:C=>i(A=>({...A,date_of_birth:C.target.value})),required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Phone Number *"}),o.jsx(ye,{type:"tel",value:r.phone,onChange:C=>i(A=>({...A,phone:C.target.value})),required:!0})]}),o.jsxs("div",{className:"space-y-2 relative",children:[o.jsx(te,{children:"Nationality *"}),o.jsx(ye,{required:!0,value:c,onChange:C=>{d(C.target.value),f(!0)},onFocus:()=>f(!0),onBlur:()=>setTimeout(()=>f(!1),200)}),h&&c&&o.jsx("div",{className:"absolute z-10 w-full mt-1 bg-white border rounded-lg shadow-lg max-h-48 overflow-y-auto",children:GD.filter(C=>C.toLowerCase().includes(c.toLowerCase())).slice(0,6).map(C=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-slate-50 text-sm",onClick:()=>{i(A=>({...A,nationality:C})),d(C),f(!1)},children:C},C))})]}),o.jsxs("div",{className:"space-y-2 relative",children:[o.jsx(te,{children:"Resident Country *"}),o.jsx(ye,{required:!0,value:m,onChange:C=>{g(C.target.value),v(!0)},onFocus:()=>v(!0),onBlur:()=>setTimeout(()=>v(!1),200)}),x&&m&&o.jsx("div",{className:"absolute z-10 w-full mt-1 bg-white border rounded-lg shadow-lg max-h-48 overflow-y-auto",children:GD.filter(C=>C.toLowerCase().includes(m.toLowerCase())).slice(0,6).map(C=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-slate-50 text-sm",onClick:()=>{i(A=>({...A,resident_country:C})),g(C),v(!1)},children:C},C))})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Next of Kin (Name & Relationship
693) *"}),o.jsx(ye,{value:r.next_of_kin,onChange:C=>i(A=>({...A,next_of_kin:C.target.value})),placeholder:"e.g., John Smith (Father)",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Next of Kin Contact *"}),o.jsx(ye,{type:"tel",value:r.next_of_kin_contact,onChange:C=>i(A=>({...A,next_of_kin_contact:C.target.value})),required:!0})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h3",{className:"font-medium text-slate-700 text-sm",children:"Social Media"}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs(te,{className:"flex items-center gap-1 text-xs",children:[o.jsx(VB,{className:"w-3 h-3"})," Instagram"]}),o.jsx(ye,{value:r.social_media.instagram||"",onChange:C=>i(A=>({...A,social_media:{...A.social_media,instagram:C.target.value}})),placeholder:"@username"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs(te,{className:"flex items-center gap-1 text-xs",children:[o.jsx(cx,{className:"w-3 h-3"})," WhatsApp"]}),o.jsx(ye,{value:r.social_media.whatsapp||"",onChange:C=>i(A=>({...A,social_media:{...A.social_media,whatsapp:C.target.value}}))})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs(te,{className:"flex items-center gap-1 text-xs",children:[o.jsx(SA,{className:"w-3 h-3"})," WeChat"]}),o.jsx(ye,{value:r.social_media.wechat||"",onChange:C=>i(A=>({...A,social_media:{...A.social_media,wechat:C.target.value}}))})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs(te,{className:"flex items-center gap-1 text-xs",children:[o.jsx(IB,{className:"w-3 h-3"})," RedNote"]}),o.jsx(ye,{value:r.social_media.rednote||"",onChange:C=>i(A=>({...A,social_media:{...A.social_media,rednote:C.target.value}}))})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Dive Certification Level *"}),o.jsxs(ht,{value:r.dive_level,onValueChange:C=>i(A=>({...A,dive_level:C})),required:!0,children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select level"})}),o.jsx(ut,{children:Wge.map(C=>o.jsx(Pe,{value:C.value,children:C.label},C.value))})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{children:"Has Personal Gear"}),o.jsx(jn,{checked:r.has_personal_gear,onCheckedChange:C=>i(A=>({...A,has_personal_gear:C,personal_gear:C?A.personal_gear:[]}))})]}),r.has_personal_gear&&o.jsx("div",{className:"flex flex-wrap gap-2",children:Hge.map(C=>o.jsx(re,{type:"button",variant:r.personal_gear.includes(C)?"default":"outline",size:"sm",onClick:()=>N(C),className:r.personal_gear.includes(C)?"bg-cyan-600 hover:bg-cyan-700":"",children:C},C))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Notes"}),o.jsx(ur,{value:r.notes,onChange:C=>i(A=>({...A,notes:C.target.value})),rows:2})]}),o.jsxs("div",{className:"flex items-start gap-3 p-3 bg-amber-50 border border-amber-200 rounded-lg",children:[o.jsx(qi,{id:"medical",checked:r.medical_disclaimer_accepted,onCheckedChange:C=>i(A=>({...A,medical_disclaimer_accepted:C}))}),o.jsx(te,{htmlFor:"medical",className:"text-sm text-slate-700 cursor-pointer",children:"Medical disclaimer accepted"})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx(re,{type:"button",variant:"outline",onClick:n,className:"flex-1",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600",disabled:j.isPending||!r.dive_level,children:j.isPending?"Saving...":"Save Changes"})]})]})}function YD({customer:e,group:t,media:n,currentUser:r,staffMembers:i,onDelete:s}){var K,L,H,I;const[a,l]=_.useState("info"),[c,d]=_.useState(!1),[h,f]=_.useState(!1),m=hn(),g=!!e,x=g?e.name:t.name,{data:v}=Ee({queryKey:["customerRecord",e==null?void 0:e.id],queryFn:async()=>e!=null&&e.id?await ne.entities.Customer.filter({id:e.id}):[],enabled:g&&!!(e!=null&&e.id)}),b=(v==null?void 0:v[0])||{},j=g?e.staffId===(r==null?void 0:r.id):(K=t==null?void 0:t.staffIds)==null?void 0:K.includes(r==null?void 0:r.id),w=(r==null?void 0:r.role)==="admin",N=w||((L=r==null?void 0:r.staff_permissions)==null?void 0:L.can_manage_customers),k=j||w||((H=r==null?void 0:r.staff_permissions)==null?void 0:H.can_manage_customers),{data:C=[]}=Ee({queryKey:["shareLinks",x],queryFn:()=>g?ne.entities.MediaShareLink.filter({customer_name:x,type:"customer"}):ne.entities.MediaShareLink.filter({group_name:x,type:"group"})}),A=Ye({mutationFn:V=>ne.entities.MediaShareLink.create(V),onSuccess:()=>m.invalidateQueries({queryKey:["shareLinks"]})}),E=async()=>{const V=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);await A.mutateAsync({token:V,type:g?"customer":"group",customer_name:g?x:null,group_name:g?null:x,is_active:!0})},P=()=>{const V=C[0];if(V){const G=`${window.location.origin}/SharedMedia?token=${V.token}`;navigator.clipboard.writeText(G),d(!0),gt.success("Link copied!"),setTimeout(()=>d(!1),2e3)}},D=V=>(V==null?void 0:V.split(" ").map(G=>G[0]).join("").toUpperCase().slice(0,2))||"?",B=Ye({mutationFn:V=>ne.entities.CustomerMedia.create(V),onSuccess:()=>m.invalidateQueries({queryKey:["customerMedia"]})}),O=Ye({mutationFn:V=>ne.entities.CustomerMedia.delete(V),onSuccess:()=>m.invalidateQueries({queryKey:["customerMedia"]})}),M=async(V,G,z)=>{await B.mutateAsync({customer_id:g?e.id:null,customer_name:g?e.name:null,group_name:g?null:t.name,file_url:V,file_type:G,caption:z,uploaded_by:(r==null?void 0:r.full_name)||(r==null?void 0:r.email)})},$=V=>{O.mutate(V)},F=Ye({mutationFn:V=>ne.entities.Customer.delete(V),onSuccess:()=>
693{m.invalidateQueries({queryKey:["registeredCustomers"]}),gt.success("Customer deleted successfully"),s&&s()}}),W=()=>{e!=null&&e.id&&F.mutate(e.id)},q=V=>i==null?void 0:i.find(G=>G.id===V);return o.jsxs("div",{className:"space-y-4",children:[g&&N&&e.status==="Registered"&&e.id&&o.jsx("div",{className:"flex justify-end",children:o.jsxs(re,{variant:"destructive",size:"sm",onClick:()=>f(!0),className:"flex items-center gap-2",children:[o.jsx(On,{className:"w-4 h-4"}),"Delete Customer"]})}),o.jsxs(Dp,{value:a,onValueChange:l,children:[o.jsxs(Nd,{children:[o.jsx(Wr,{value:"info",children:"Info"}),g&&N&&o.jsxs(Wr,{value:"edit",className:"flex items-center gap-1",children:[o.jsx(Sp,{className:"w-4 h-4"}),"Edit"]}),o.jsxs(Wr,{value:"media",className:"flex items-center gap-1",children:[o.jsx(Hl,{className:"w-4 h-4"}),"Media (",n.length,")"]})]}),o.jsxs(Fi,{value:"info",className:"space-y-4 mt-4",children:[k&&o.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(WB,{className:"w-4 h-4 text-slate-500"}),o.jsx("span",{className:"text-sm text-slate-600",children:"Share link for customer access"})]}),C.length>0?o.jsxs(re,{variant:"outline",size:"sm",onClick:P,children:[c?o.jsx(Qr,{className:"w-4 h-4 mr-1"}):o.jsx(qB,{className:"w-4 h-4 mr-1"}),c?"Copied!":"Copy Link"]}):o.jsx(re,{variant:"outline",size:"sm",onClick:E,disabled:A.isPending,children:"Generate Link"})]}),g?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Status"}),o.jsx(st,{variant:"outline",className:e.status==="Active"?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-slate-50 text-slate-600 border-slate-200",children:e.status})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Assigned Staff"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(ya,{className:"h-6 w-6",children:[o.jsx(Ph,{src:(I=q(e.staffId))==null?void 0:I.profile_picture}),o.jsx(va,{className:"text-xs bg-cyan-100 text-cyan-700",children:D(e.staffName)})]}),o.jsx("span",{className:"text-sm font-medium text-slate-800",children:e.staffName})]})]}),e.email&&o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Email"}),o.jsxs("p",{className:"text-sm text-slate-800 flex items-center gap-1",children:[o.jsx(pd,{className:"w-3 h-3"}),e.email]})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Dates"}),o.jsxs("p",{className:"text-sm text-slate-800 flex items-center gap-1",children:[o.jsx(vi,{className:"w-3 h-3"}),e.startDate&&_e(Vt(e.startDate),"MMM d"),e.endDate&&` - ${_e(Vt(e.endDate),"MMM d, yyyy")}`,!e.endDate&&e.startDate&&`, ${_e(Vt(e.startDate),"yyyy")}`]})]})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Latest Activity"}),o.jsx("p",{className:"text-sm text-slate-600",children:e.latestProduct})]}),e.groups.length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Groups"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:e.groups.map((V,G)=>o.jsx(st,{variant:"secondary",children:V},G))})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Sales History"}),o.jsxs("p",{className:"text-sm text-slate-600",children:[e.sales.length," total sales"]})]}),o.jsxs("div",{className:"p-3 rounded-lg border bg-slate-50",children:[o.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Medical Disclaimer"}),b.medical_disclaimer_accepted?o.jsx("p",{className:"text-sm text-emerald-700 font-medium",children:"✓ Accepted"}):o.jsx("p",{className:"text-sm text-rose-600 font-medium",children:"✗ Not accepted"}),b.notes&&o.jsxs("div",{className:"mt-2 pt-2 border-t",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Notes / Medical Info"}),o.jsx("p",{className:"text-sm text-slate-700",children:b.notes})]})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Status"}
693),o.jsx(st,{variant:"outline",className:t.status==="Active"?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-slate-50 text-slate-600 border-slate-200",children:t.status})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Dates"}),o.jsxs("p",{className:"text-sm text-slate-800 flex items-center gap-1",children:[o.jsx(vi,{className:"w-3 h-3"}),t.startDate&&_e(Vt(t.startDate),"MMM d"),t.endDate&&` - ${_e(Vt(t.endDate),"MMM d, yyyy")}`]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("p",{className:"text-xs text-slate-500 flex items-center gap-1",children:[o.jsx(Jr,{className:"w-3 h-3"}),"Customers (",t.customers.length,")"]}),o.jsx("div",{className:"flex flex-wrap gap-1",children:t.customers.map((V,G)=>o.jsx(st,{variant:"outline",children:V},G))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Assigned Staff"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:t.staffIds.map((V,G)=>{const z=q(V);return o.jsxs("div",{className:"flex items-center gap-2 bg-slate-100 rounded-full px-2 py-1",children:[o.jsxs(ya,{className:"h-5 w-5",children:[o.jsx(Ph,{src:z==null?void 0:z.profile_picture}),o.jsx(va,{className:"text-xs bg-cyan-100 text-cyan-700",children:D((z==null?void 0:z.full_name)||(z==null?void 0:z.email))})]}),o.jsx("span",{className:"text-xs text-slate-700",children:(z==null?void 0:z.full_name)||(z==null?void 0:z.email)||"Unknown"})]},G)})})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Total Sales"}),o.jsx("p",{className:"text-sm font-medium text-slate-800",children:t.sales.length})]})]})]}),g&&N&&b.id&&o.jsx(Fi,{value:"edit",className:"space-y-4 mt-4",children:o.jsx(Kge,{customer:b,onSave:()=>{m.invalidateQueries({queryKey:["customerRecord",e==null?void 0:e.id]}),l("info")},onCancel:()=>l("info")})}),o.jsxs(Fi,{value:"media",className:"space-y-4 mt-4",children:[k&&o.jsx(Uge,{onUpload:M,isUploading:B.isPending}),o.jsx(Vge,{media:n,onDelete:k?$:null,isDeleting:O.isPending}),!k&&n.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No media yet. Only assigned staff can upload."})]})]}),o.jsx($x,{open:h,onOpenChange:f,children:o.jsxs(qp,{children:[o.jsxs(zp,{children:[o.jsx(Vp,{children:"Delete Customer"}),o.jsxs(Wp,{children:["Are you sure you want to delete ",o.jsx("strong",{children:e==null?void 0:e.name}),"? This will permanently remove their registration data. This action cannot be undone."]})]}),o.jsxs(Up,{children:[o.jsx(Kp,{children:"Cancel"}),o.jsx(Hp,{onClick:W,className:"bg-rose-600 hover:bg-rose-700",children:"Delete Customer"})]})]})})]})}function Gge(){const[e,t]=_.useState(new Date),[n,r]=_.useState([]),[i,s]=_.useState(null),[a,l]=_.useState(null),[c,d]=_.useState(!1),[h,f]=_.useState(!1),[m,g]=_.useState(null),[x,v]=_.useState(!1),[b,j]=_.useState(""),[w,N]=_.useState(!1),{permissions:k,user:C}=Vo(),A=hn(),{data:E=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-start_date",1e3)}),{data:P=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:D=[]}=Ee({queryKey:["staff"],queryFn:()=>ne.entities.User.list()}),{data:B=[]}=Ee({queryKey:["leaveRequests"],queryFn:()=>ne.entities.LeaveRequest.list("-created_date",100)}),{data:O=[]}=Ee({queryKey:["tasks"],queryFn:()=>ne.entities.Task.list("-created_date",200)}),{data:M=[]}=Ee({queryKey:["customers"],queryFn:()=>ne.entities.Customer.list()}),{data:$=[]}=Ee({queryKey:["dailyResourceAssignments"],queryFn:()=>ne.entities.DailyResourceAssignment.list()}),{data:F=[]}=Ee({queryKey:["diveSites"],queryFn:()=>ne.entities.DiveSite.list()}),{data:W=[]}=Ee({queryKey:["vehicles"],queryFn:()=>ne.entities.Vehicle.list()}),{data:q=[]}=Ee({queryKey:["equipment"],queryFn:()=>ne.entities.EquipmentItem.list()}),{data:K=[]}=Ee({queryKey:["diveTimes"],queryFn:()=>ne.entities.DiveTime.list()}),L=Ye({mutationFn:ee=>ne.entities.LeaveRequest.create({...ee,staff_id:C.id,staff_name:C.full_name,status:"pending"}),onSuccess:()=>{A.invalidateQueries({queryKey:["leaveRequests"]}),d(!1),r([]),gt.success("Leave request submitted")}}),H=Ye({mutationFn:({id:ee,data:de})=>ne.entities.LeaveRequest.update(ee,de),onSuccess:()=>
693{A.invalidateQueries({queryKey:["leaveRequests"]}),gt.success("Leave request updated")}}),I=Ye({mutationFn:ee=>ne.entities.LeaveRequest.delete(ee),onSuccess:()=>{A.invalidateQueries({queryKey:["leaveRequests"]}),gt.success("Leave request deleted")}}),V=Ye({mutationFn:async ee=>{const de=await ne.entities.Task.create(ee),be=D.find(ae=>ae.id===ee.staff_id);if(be!=null&&be.email)try{await ne.integrations.Core.SendEmail({to:be.email,subject:`New Task Assigned: ${ee.title}`,body:`Hi ${be.full_name},
694
695You have been assigned a new task:
696
697Task: ${ee.title}
698${ee.description?`Description: ${ee.description}
699`:""}Priority: ${ee.priority}
700Deadline: ${_e(new Date(ee.deadline+"T00:00:00"),"MMMM d, yyyy")}
701
702Please complete this task by the deadline.
703
704Regards,
705Dive Monies Team`})}catch(ae){console.error("Failed to send email:",ae)}return de},onSuccess:()=>{A.invalidateQueries({queryKey:["tasks"]}),f(!1),g(null),gt.success("Task created and staff notified")}}),G=Ye({mutationFn:({id:ee,data:de})=>ne.entities.Task.update(ee,de),onSuccess:()=>{A.invalidateQueries({queryKey:["tasks"]}),gt.success("Task updated")}}),z=Ye({mutationFn:ee=>ne.entities.Task.delete(ee),onSuccess:()=>{A.invalidateQueries({queryKey:["tasks"]}),gt.success("Task deleted")}}),oe=ee=>{const de=_e(ee,"yyyy-MM-dd");E.some(ae=>{if(ae.staff_id!==(C==null?void 0:C.id))return!1;const Ke=ae.start_date||ae.sale_date;if(!Ke)return!1;const Ue=ae.end_date||Ke;return de>=Ke&&de<=Ue})?s(ee):r(ae=>ae.includes(de)?ae.filter(Ke=>Ke!==de):[...ae,de])},pe=ee=>{const de=_e(ee,"yyyy-MM-dd");r(be=>be.includes(de)?be.filter(ae=>ae!==de):[...be,de])},ue=ee=>{H.mutate({id:ee,data:{status:"approved"}})},me=(ee,de)=>{H.mutate({id:ee,data:{status:"rejected",admin_notes:de||void 0}})},Ne=ee=>{I.mutate(ee)};return o.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:[o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Calendar"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"View assignments and request leave"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs(re,{variant:"outline",onClick:()=>v(!0),children:[o.jsx(GZ,{className:"w-4 h-4 mr-2"}),"Share Calendar"]}),n.length>0&&o.jsxs(re,{onClick:()=>d(!0),className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Request Leave (",n.length," days)"]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[o.jsxs("div",{className:"lg:col-span-3 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between bg-white rounded-xl p-4 shadow-sm",children:[o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>t(gu(e,1)),children:o.jsx(PJ,{className:"w-5 h-5"})}),o.jsx("h2",{className:"text-lg font-medium text-slate-800",children:_e(e,"MMMM yyyy")}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>t(jV(e,1)),children:o.jsx($B,{className:"w-5 h-5"})})]}),o.jsx(age,{currentDate:e,sales:E,products:P,staffMembers:D,leaveRequests:B,tasks:O,customers:M,resourceAssignments:$,diveSites:F,vehicles:W,equipment:q,diveTimes:K,onDayClick:oe,onLeaveSelection:pe,onDaySummaryClick:l,selectedDates:n}),o.jsx("p",{className:"text-xs text-slate-400 text-center",children:"Click on unassigned dates to select them for leave request"})]}),o.jsxs("div",{className:"space-y-4",children:[k.isAdmin&&o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsx("div",{className:"flex items-center justify-between mb-3",children:o.jsxs("h3",{className:"font-medium text-slate-800 flex items-center gap-2",children:[o.jsx(NM,{className:"w-4 h-4 text-cyan-600"}),"Quick Task"]})}),o.jsxs(re,{onClick:()=>{g(new Date),f(!0)},className:"w-full",variant:"outline",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Assign Task"]})]}),o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsxs("h3",{className:"font-medium text-slate-800 mb-3 flex items-center gap-2",children:[o.jsx(ax,{className:"w-4 h-4 text-cyan-600"}),"Leave Requests"]}),o.jsx(hge,{requests:B,isAdmin:k.isAdmin,onApprove:ue,onReject:me,onDelete:Ne,currentUserId:C==null?void 0:C.id,isUpdating:H.isPending||I.isPending})]}),o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsxs("h3",{className:"font-medium text-slate-800 mb-3 flex items-center gap-2",children:[o.jsx(NM,{className:"w-4 h-4 text-cyan-600"}),"My Tasks"]}),o.jsx(wge,{tasks:O.filter(ee=>ee.created_by===(C==null?void 0:C.email)),isAdmin:k.isAdmin,currentUser:C,onDelete:ee=>z.mutate(ee),onUpdateStatus:(ee,de)=>G.mutate({id:ee,data:{status:de}}),isUpdating:G.isPending||z.isPending})]}),o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsx("h3",{className:"font-medium text-slate-800 mb-3",children:"Legend"}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded bg-cyan-100"}),o.jsx("span",{className:"text-slate-600",children:"Customer Assignment"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded bg-amber-100"}),o.jsx("span",{className:"text-slate-600",children:"Staff on Leave"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded bg-purple-100"}),o.jsx("span",{className:"text-slate-600",children:"Task"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded bg-cyan-50 ring-2 ring-cyan-500"}),o.jsx("span",{className:"text-slate-600",children:"Selected for Leave"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Kr,{className:"w-4 h-4 text-cyan-600"}),o.jsx("span",{className:"text-slate-600",children:"Has Own Gear"})]}),o.jsx("div",{className:"text-xs text-slate-400 pt-2 border-t",children:"Resources:"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center bg-cyan-50",children:o.jsx(uu,{className:"w-3 h-3 text-cyan-600"})}),o.jsx("span",{className:"text-slate-600",children:"Dive Site"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center bg-blue-50",children:o.jsx(uu,{className:"w-3 h-3 text-blue-600"})}),o.jsx("span",{className:"text-slate-600",children:"Vehicle"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center bg-purple-50",children:o.jsx(uu,{className:"w-3 h-3 text-purple-600"})}),o.jsx("span",{className:"text-slate-600",children:"Equipment"})]})]})]})]})]})]}),o.jsx(uge,{open:!!a,onOpenChange:()=>l(null),date:a,sales:E,products:P,staffMembers:D,leaveRequests:B,diveSites:F,vehicles:W,equipment:q,customers:M,diveTimes:K,tasks:O,isAdmin:k.isAdmin}),o.jsx(lge,{open:!!i,onOpenChange:()=>s(null),date:i,sales:E,products:P,staffMembers:D,leaveRequests:B,diveSites:F,vehicles:W,equipment:q,customers:M,diveTimes:K,tasks:O}),o.jsx(fge,{open:c,onOpenChange:d,selectedDates:n,onSubmit:ee=>L.mutate(ee),isSubmitting:L.isPending}),m&&o.jsx(vge,{open:h,onOpenChange:f,selectedDate:m,staffMembers:D,onSubmit:ee=>V.mutate(ee),isSubmitting:V.isPending}),o.jsx(tn,{open:x,onOpenChange:v,children:o.jsxs(Kt,{children:[o.jsxs(Un,{children:[o.jsx(Vn,{children:"Share Calendar"}),o.jsx(hk,{children:"Share a read-only link to the calendar with others."})]}),o.jsxs("div",{className:"space-y-4 py-4",children:[o.jsxs("div",{children:[o.jsx(te,{htmlFor:"share-link",children:"Calendar Link"}),o.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[o.jsx(ye,{id:"share-link",readOnly:!0,value:window.location.origin+kn("SharedCalendar"),className:"flex-1"}),o.jsx(re,{type:"button",size:"icon",variant:"outline",onClick:()=>{navigator.clipboard.writeText(window.location.origin+kn("SharedCalendar")),N(!0),gt.success("Link copied to clipboard!"),setTimeout(()=>N(!1),2e3)},children:w?o.jsx(Qr,{className:"w-4 h-4"}):o.jsx(qB,{className:"w-4 h-4"})})]})]}),o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("span",{className:"w-full border-t"})}),o.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:o.jsx("span",{className:"bg-white px-2 text-slate-500",children:"Or share via email"})})]}),o.jsxs("div",{children:[o.jsx(te,{htmlFor:"share-email",children:"Email Address"}),o.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[o.jsx(ye,{id:"share-email",type:"email",placeholder:"[email protected]",value:b,onChange:ee=>j(ee.target.value),className:"flex-1"}),o.jsx(re,{type:"button",size:"icon",disabled:!b,onClick:async()=>{try{await ne.integrations.Core.SendEmail({to:b,subject:"Dive Monies Shared Calendar",body:`Hi,
706
707Here is a link to the Dive Monies shared calendar:
708
709${window.location.origin+kn("SharedCalendar")}
710
711Regards,
712Dive Monies Team`}),gt.success("Calendar link sent successfully!"),v(!1),j("")}catch{gt.error("Failed to send email.")}},children:o.jsx(pd,{className:"w-4 h-4"})})]})]})]})]})})]})}function Yge(){return o.jsx(ms,{children:o.jsx(Gge,{})})}const Xge=[{value:"new_to_diving",label:"New to Diving"},{value:"open_water",label:"Open Water Diver"},{value:"advanced_open_water",label:"Advanced Open Water"},{value:"rescue_diver",label:"Rescue Diver"},{value:"divemaster",label:"Divemaster"},{value:"instructor",label:"Instructor"}],Qge=["Mask","Fins","Wetsuit","BCD","Regulator","Computer","Camera"],Bg=["Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia (Plurinational State of)","Bosnia and Herzegovina","Botswana","Brazil","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo","Costa Rica","Côte d'Ivoire","Croatia","Cuba","Cyprus","Czechia","Democratic People's Republic of Korea","Democratic Republic of the Congo","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran (Islamic Republic of)","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia (Federated States of)","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Macedonia","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Republic of Korea","Republic of Moldova","Romania","Russian Federation","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","S
712amoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syrian Arab Republic","Tajikistan","Thailand","Timor-Leste","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom of Great Britain and Northern Ireland","United Republic of Tanzania","United States of America","Uruguay","Uzbekistan","Vanuatu","Venezuela (Bolivarian Republic of)","Viet Nam","Yemen","Zambia","Zimbabwe"];function Jge(){const[e,t]=_.useState(!1),[n,r]=_.useState(!1),i=_.useRef(null),[s,a]=_.useState(!1),[l,c]=_.useState(""),[d,h]=_.useState(!1),[f,m]=_.useState(""),[g,x]=_.useState(!1),{data:v=[]}=Ee({queryKey:["diveShopProfile"],queryFn:()=>ne.entities.DiveShopProfile.list()}),b=v[0],[j,w]=_.useState({name:"",email:"",profile_picture:"",date_of_birth:"",nationality:"",resident_country:"",phone:"",social_media:{instagram:"",facebook:"",whatsapp:"",tiktok:"",wechat:"",rednote:""},dive_level:"",has_personal_gear:!1,personal_gear:[],notes:"",medical_disclaimer_accepted:!1,next_of_kin:"",next_of_kin_contact:""}),N=async E=>{var D;const P=(D=E.target.files)==null?void 0:D[0];if(P){r(!0);try{const{file_url:B}=await ne.integrations.Core.UploadFile({file:P});w(O=>({...O,profile_picture:B}))}catch(B){console.error("Failed to upload image:",B)}finally{r(!1)}}},k=Ye({mutationFn:E=>ne.entities.Customer.create(E),onSuccess:()=>t(!0)}),C=E=>{w(P=>({...P,personal_gear:P.personal_gear.includes(E)?P.personal_gear.filter(D=>D!==E):[...P.personal_gear,E]}))},A=E=>{E.preventDefault(),k.mutate(j)};return e?o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-blue-50 to-slate-50 flex items-center justify-center p-4",children:o.jsx(lt,{className:"max-w-md w-full text-center",children:o.jsxs(dt,{className:"p-8",children:[o.jsx("div",{className:"w-16 h-16 bg-emerald-100 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(lx,{className:"w-8 h-8 text-emerald-600"})}),o.jsx("h2",{className:"text-2xl font-semibold text-slate-800 mb-2",children:"Registration Complete!"}),o.jsx("p",{className:"text-slate-600 mb-6",children:"Thank you for registering. We're excited to have you dive with us!"}),(b==null?void 0:b.website)&&o.jsxs("div",{className:"border-t pt-6",children:[o.jsx("p",{className:"text-sm text-slate-500 mb-4",children:"Visit our website"}),o.jsx("a",{href:b.website,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-600 hover:underline",children:b.website})]})]})})}):o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-blue-50 to-slate-50 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-2xl mx-auto",children:[o.jsxs("div",{className:"flex justify-between items-start mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-slate-400",children:"Powered by"}),o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/c70cf4774_DiveMoniesLogo29Dec.jpg",alt:"Dive Monies",className:"h-8 w-auto rounded object-contain"})]}),o.jsxs(re,{variant:"ghost",size:"sm",onClick:()=>window.location.href=kn("StaffLogin"),className:"text-slate-500 hover:text-slate-700",children:[o.jsx(yZ,{className:"w-4 h-4 mr-2"}),"Staff Login"]})]}),o.jsx("div",{className:"text-center mb-8",children:b?o.jsxs(o.Fragment,{children:[b.logo_url&&o.jsx("img",{src:b.logo_url,alt:b.shop_name,className:"w-32 h-32 mx-auto mb-4 rounded-xl object-contain"}),o.jsxs("h1",{className:"text-3xl font-light text-slate-800",children:["Welcome to ",b.shop_name]}),o.jsx("p",{className:"text-slate-500 mt-2",children:"Please fill in your details to complete registration"})]}):o.jsxs(o.Fragment,{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800",children:"Welcome Diver"}),o.jsx("p",{className:"text-slate-500 mt-2",children:"Please fill in your details to complete registration"})]})}),o.jsx(lt,{className:"shadow-lg",children:o.jsx(dt,{className:"p-6",children:o.jsxs("form",{onSubmit:A,className:"space-y-6",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Profile Picture"}),o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[o.jsxs("div",{className:"relative w-32 h-32 rounded-full overflow-hidden bg-slate-100 border-2 border-dashed border-slate-300",children:[j.profile_picture?o.jsx("img",{src:j.profile_picture,alt:"Profile",className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center",children:o.jsx(Ca,{className:"w-12 h-12 text-slate-300"})}),n&&o.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:o.jsx(wr,{className:"w-8 h-8 text-white animate-spin"})})]}),o.jsx("input",{type:"file",ref:i,accept:"image/*",capture:"environment",onChange:N,className:"hidden"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:()=>{i.current.removeAttribute("capture"),i.current.click()},disabled:n,children:[o.jsx(Hl,{className:"w-4 h-4 mr-2"}),"Gallery"]}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:()=>{i.current.setAttribute("capture","environment"),i.current.click()},disabled:n,children:[o.jsx(LB,{className:"w-4 h-4 mr-2"}),"Camera"]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Personal Information"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Full Name *"}),o.jsx(ye,{value:j.name,onChange:E=>w(P=>({...P,name:E.target.value})),placeholder:"Your full name",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Email *"}),o.jsx(ye,{type:"email",value:j.email,onChange:E=>w(P=>({...P,email:E.target.value})),placeholder:"[email protected]",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Date of Birth *"}),o.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[o.jsxs(ht,{value:j.date_of_birth?new Date(j.date_of_birth).getDate().toString():"",onValueChange:E=>{const P=j.date_of_birth?new Date(j.date_of_birth):new Date(2e3,0,1);P.setDate(parseInt(E)),w(D=>({...D,date_of_birth:P.toISOString().split("T")[0]}))},children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Day"})}),o.jsx(ut,{children:Array.from({length:31},(E,P)=>o.jsx(Pe,{value:(P+1).toString(),children:P+1},P+1))})]}),o.jsxs(ht,{value:j.date_of_birth?new Date(j.date_of_birth).getMonth().toString():"",onValueChange:E=>{const P=j.date_of_birth?new Date(j.date_of_birth):new Date(2e3,0,1);P.setMonth(parseInt(E)),w(D=>({...D,date_of_birth:P.toISOString().split("T")[0]}))},children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Month"})}),o.jsx(ut,{children:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].map((E,P)=>o.jsx(Pe,{value:P.toString(),children:E},P))})]}),o.jsxs(ht,{value:j.date_of_birth?new Date(j.date_of_birth).getFullYear().toString():"",onValueChange:E=>{const P=j.date_of_birth?new Date(j.date_of_birth):new Date(2e3,0,1);P.setFullYear(parseInt(E)),w(D=>({...D,date_of_birth:P.toISOString().split("T")[0]}))},children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Year"})}),o.jsx(ut,{children:Array.from({length:80},(E,P)=>{const D=new Date().getFullYear()-10-P;return o.jsx(Pe,{value:D.toString(),children:D},D)})})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Phone Number *"}),o.jsx(ye,{type:"tel",value:j.phone,onChange:E=>w(P=>({...P,phone:E.target.value})),placeholder:"+1 234 567 8900",required:!0})]}),o.jsxs("div",{className:"space-y-2 relative",children:[o.jsx(te,{children:"Country (Nationality) *"}),o.jsx(ye,{required:!0,value:l||j.nationality,onChange:E=>{const P=E.target.value;c(P),h(!0),P||w(D=>
712({...D,nationality:"",resident_country:s?"":D.resident_country}))},onFocus:()=>h(!0),onBlur:()=>setTimeout(()=>h(!1),200),placeholder:"Country"}),d&&l&&o.jsxs("div",{className:"absolute z-10 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-48 overflow-y-auto",children:[Bg.filter(E=>E.toLowerCase().startsWith(l.toLowerCase())).slice(0,8).map(E=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-slate-50 text-sm",onClick:()=>{w(P=>({...P,nationality:E,resident_country:s?E:P.resident_country})),c(""),h(!1)},children:E},E)),Bg.filter(E=>E.toLowerCase().startsWith(l.toLowerCase())).length===0&&o.jsx("div",{className:"px-3 py-2 text-sm text-slate-400",children:"No matches found"})]})]}),o.jsxs("div",{className:"space-y-2 relative",children:[o.jsx(te,{children:"Current Resident Country *"}),o.jsx(ye,{required:!0,value:f||j.resident_country,onChange:E=>{const P=E.target.value;m(P),x(!0),P||w(D=>({...D,resident_country:""}))},onFocus:()=>x(!0),onBlur:()=>setTimeout(()=>x(!1),200),placeholder:"Country",disabled:s}),g&&f&&!s&&o.jsxs("div",{className:"absolute z-10 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-48 overflow-y-auto",children:[Bg.filter(E=>E.toLowerCase().startsWith(f.toLowerCase())).slice(0,8).map(E=>o.jsx("button",{type:"button",className:"w-full px-3 py-2 text-left hover:bg-slate-50 text-sm",onClick:()=>{w(P=>({...P,resident_country:E})),m(""),x(!1)},children:E},E)),Bg.filter(E=>E.toLowerCase().startsWith(f.toLowerCase())).length===0&&o.jsx("div",{className:"px-3 py-2 text-sm text-slate-400",children:"No matches found"})]}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.jsx(qi,{id:"same_as_nationality",checked:s,onCheckedChange:E=>{a(E),E&&(w(P=>({...P,resident_country:P.nationality})),m(""))}}),o.jsx(te,{htmlFor:"same_as_nationality",className:"text-sm text-slate-500 cursor-pointer",children:"Same as nationality"})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Social Media"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(VB,{className:"w-4 h-4"})," Instagram"]}),o.jsx(ye,{value:j.social_media.instagram,onChange:E=>w(P=>({...P,social_media:{...P.social_media,instagram:E.target.value}})),placeholder:"@username"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(QJ,{className:"w-4 h-4"})," Facebook"]}),o.jsx(ye,{value:j.social_media.facebook,onChange:E=>w(P=>({...P,social_media:{...P.social_media,facebook:E.target.value}})),placeholder:"Profile URL or name"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(PZ,{className:"w-4 h-4"})," TikTok"]}),o.jsx(ye,{value:j.social_media.tiktok,onChange:E=>w(P=>({...P,social_media:{...P.social_media,tiktok:E.target.value}})),placeholder:"@username"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(cx,{className:"w-4 h-4"})," WhatsApp"]}),o.jsx(ye,{value:j.social_media.whatsapp,onChange:E=>w(P=>({...P,social_media:{...P.social_media,whatsapp:E.target.value}})),placeholder:"+1 234 567 8900"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(SA,{className:"w-4 h-4"})," WeChat"]}),o.jsx(ye,{value:j.social_media.wechat,onChange:E=>w(P=>({...P,social_media:{...P.social_media,wechat:E.target.value}})),placeholder:"WeChat ID"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(IB,{className:"w-4 h-4"})," RedNote (小红书)"]}),o.jsx(ye,{value:j.social_media.rednote,onChange:E=>w(P=>({...P,social_media:{...P.social_media,rednote:E.target.value}})),placeholder:"RedNote ID"})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Emergency Contact"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Next of Kin (Name & Relationship
712) *"}),o.jsx(ye,{value:j.next_of_kin,onChange:E=>w(P=>({...P,next_of_kin:E.target.value})),placeholder:"e.g., John Smith (Father)",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Next of Kin Contact *"}),o.jsx(ye,{type:"tel",value:j.next_of_kin_contact,onChange:E=>w(P=>({...P,next_of_kin_contact:E.target.value})),placeholder:"+1 234 567 8900",required:!0})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Diving Experience"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"What is your current dive certification level? *"}),o.jsxs(ht,{value:j.dive_level,onValueChange:E=>w(P=>({...P,dive_level:E})),required:!0,children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select your dive level"})}),o.jsx(ut,{children:Xge.map(E=>o.jsx(Pe,{value:E.value,children:E.label},E.value))})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h3",{className:"font-medium text-slate-700 border-b pb-2",children:"Personal Gear"}),o.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-lg",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium text-slate-700",children:"Do you have personal dive gear?"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Select if you'll bring your own equipment"})]}),o.jsx(jn,{checked:j.has_personal_gear,onCheckedChange:E=>w(P=>({...P,has_personal_gear:E,personal_gear:E?P.personal_gear:[]}))})]}),j.has_personal_gear&&o.jsx("div",{className:"flex flex-wrap gap-2",children:Qge.map(E=>o.jsx(re,{type:"button",variant:j.personal_gear.includes(E)?"default":"outline",size:"sm",onClick:()=>C(E),className:j.personal_gear.includes(E)?"bg-cyan-600 hover:bg-cyan-700":"",children:E},E))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Additional Notes"}),o.jsx(ur,{value:j.notes,onChange:E=>w(P=>({...P,notes:E.target.value})),placeholder:"Any medical conditions, preferences, or special requests...",rows:3})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("h3",{className:"font-medium text-slate-700 border-b pb-2 flex items-center gap-2",children:[o.jsx(uee,{className:"w-4 h-4 text-amber-500"}),"Medical Disclaimer"]}),o.jsxs("div",{className:"p-4 bg-amber-50 border border-amber-200 rounded-lg space-y-3",children:[o.jsx("p",{className:"text-sm text-slate-700",children:"I confirm that I am in good physical health and have no medical conditions that would prevent me from participating in scuba diving activities. I understand that diving involves inherent risks and I accept full responsibility for my own safety."}),o.jsx("p",{className:"text-sm text-slate-700",children:"I agree to inform the dive staff of any medical conditions, medications, or concerns before any diving activity. I understand that I may be required to obtain medical clearance from a physician before diving."}),o.jsxs("div",{className:"flex items-start gap-3 pt-2",children:[o.jsx(qi,{id:"medical_disclaimer",checked:j.medical_disclaimer_accepted,onCheckedChange:E=>w(P=>({...P,medical_disclaimer_accepted:E}))}),o.jsx(te,{htmlFor:"medical_disclaimer",className:"text-sm font-medium text-slate-800 cursor-pointer",children:"I have read and agree to the medical disclaimer *"})]})]})]}),o.jsx(re,{type:"submit",className:"w-full h-12 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 text-lg",disabled:k.isPending||!j.medical_disclaimer_accepted||!j.dive_level,children:k.isPending?"Submitting...":"Complete Registration"})]})})})]})})}var RC=["Enter"," "],Zge=["ArrowDown","PageUp","Home"],p7=["ArrowUp","PageDown","End"],eye=[...Zge,...p7],tye={ltr:[...RC,"ArrowRight"],rtl:[...RC,"ArrowLeft"]},nye={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gp="Menu",[Ah,rye,iye]=rk(Gp),[cc,m7]=ei(Gp,[iye,Ad,jx]),Fx=Ad(),g7=jx(),[sye,uc]=cc(Gp),[aye,Yp]=cc(Gp),y7=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:s,modal:a=!0}=e,l=Fx(t),[c,d]=_.useState(null),h=_.useRef(!1),f=er(s),m=Mp(i);return _.useEffect(()=>{const g=()=>{h.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>h.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),o.jsx(_k,{...l,children:o.jsx(sye,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:d,children:o.jsx(aye,{scope:t,onClose:_.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:h,dir:m,modal:a,children:r})})})};y7.displayName=Gp;var oye="MenuAnchor",Ok=_.forwardRef((e,t)=>
vendor: 12,972 bytes, line 712
712{const{__scopeMenu:n,...r}=e,i=Fx(n);return o.jsx(Mx,{...i,...r,ref:t})});Ok.displayName=oye;var Mk="MenuPortal",[lye,v7]=cc(Mk,{forceMount:void 0}),x7=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,s=uc(Mk,t);return o.jsx(lye,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||s.open,children:o.jsx($p,{asChild:!0,container:i,children:r})})})};x7.displayName=Mk;var zi="MenuContent",[cye,Rk]=cc(zi),b7=_.forwardRef((e,t)=>{const n=v7(zi,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=uc(zi,e.__scopeMenu),a=Yp(zi,e.__scopeMenu);return o.jsx(Ah.Provider,{scope:e.__scopeMenu,children:o.jsx(Sr,{present:r||s.open,children:o.jsx(Ah.Slot,{scope:e.__scopeMenu,children:a.modal?o.jsx(uye,{...i,ref:t}):o.jsx(dye,{...i,ref:t})})})})}),uye=_.forwardRef((e,t)=>{const n=uc(zi,e.__scopeMenu),r=_.useRef(null),i=yt(t,r);return _.useEffect(()=>{const s=r.current;if(s)return Cx(s)},[]),o.jsx(Dk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dye=_.forwardRef((e,t)=>{const n=uc(zi,e.__scopeMenu);return o.jsx(Dk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),fye=Ro("MenuContent.ScrollLock"),Dk=_.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,disableOutsideScroll:x,...v}=e,b=uc(zi,n),j=Yp(zi,n),w=Fx(n),N=g7(n),k=rye(n),[C,A]=_.useState(null),E=_.useRef(null),P=yt(t,E,b.onContentChange),D=_.useRef(0),B=_.useRef(""),O=_.useRef(0),M=_.useRef(null),$=_.useRef("right"),F=_.useRef(0),W=x?Fp:_.Fragment,q=x?{as:fye,allowPinchZoom:!0}:void 0,K=H=>{var me,Ne;const I=B.current+H,V=k().filter(ee=>!ee.disabled),G=document.activeElement,z=(me=V.find(ee=>ee.ref.current===G))==null?void 0:me.textValue,oe=V.map(ee=>ee.textValue),pe=_ye(oe,I,z),ue=(Ne=V.find(ee=>ee.textValue===pe))==null?void 0:Ne.ref.current;(function ee(de){B.current=de,window.clearTimeout(D.current),de!==""&&(D.current=window.setTimeout(()=>ee(""),1e3))})(I),ue&&setTimeout(()=>ue.focus())};_.useEffect(()=>()=>window.clearTimeout(D.current),[]),_x();const L=_.useCallback(H=>{var V,G;return $.current===((V=M.current)==null?void 0:V.side)&&Cye(H,(G=M.current)==null?void 0:G.area)},[]);return o.jsx(cye,{scope:n,searchRef:B,onItemEnter:_.useCallback(H=>{L(H)&&H.preventDefault()},[L]),onItemLeave:_.useCallback(H=>{var I;L(H)||((I=E.current)==null||I.focus(),A(null))},[L]),onTriggerLeave:_.useCallback(H=>{L(H)&&H.preventDefault()},[L]),pointerGraceTimerRef:O,onPointerGraceIntentChange:_.useCallback(H=>{M.current=H},[]),children:o.jsx(W,{...q,children:o.jsx(Lp,{asChild:!0,trapped:i,onMountAutoFocus:Oe(s,H=>{var I;H.preventDefault(),(I=E.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:o.jsx(Ip,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:f,onInteractOutside:m,onDismiss:g,children:o.jsx(g8,{asChild:!0,...N,dir:j.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:A,onEntryFocus:Oe(c,H=>{j.isUsingKeyboardRef.current||H.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(Nk,{role:"menu","aria-orientation":"vertical","data-state":I7(b.open),"data-radix-menu-content":"",dir:j.dir,...w,...v,ref:P,style:{outline:"none",...v.style},onKeyDown:Oe(v.onKeyDown,H=>{const V=H.target.closest("[data-radix-menu-content]")===H.currentTarget,G=H.ctrlKey||H.altKey||H.metaKey,z=H.key.length===1;V&&(H.key==="Tab"&&H.preventDefault(),!G&&z&&K(H.key));const oe=E.current;if(H.target!==oe||!eye.includes(H.key))return;H.preventDefault();const ue=k().filter(me=>!me.disabled).map(me=>me.ref.current);p7.includes(H.key)&&ue.reverse(),jye(ue)}),onBlur:Oe(e.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(D.current),B.current="")}),onPointerMove:Oe(e.onPointerMove,kh(H=>{const I=H.target,V=F.current!==H.clientX;if(H.currentTarget.contains(I)&&V){const G=H.clientX>F.current?"right":"left";$.current=G,F.current=H.clientX}}))})})})})})})});b7.displayName=zi;var hye="MenuGroup",Ik=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Ge.div,{role:"group",...r,ref:t})});Ik.displayName=hye;var pye="MenuLabel",w7=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Ge.div,{...r,ref:t})});w7.displayName=pye;var Ky="MenuItem",XD="menu.itemSelect",Bx=_.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,s=_.useRef(null),a=Yp(Ky,e.__scopeMenu),l=Rk(Ky,e.__scopeMenu),c=yt(t,s),d=_.useRef(!1),h=()=>{const f=s.current;if(!n&&f){const m=new CustomEvent(XD,{bubbles:!0,cancelable:!0});f.addEventListener(XD,g=>r==null?void 0:r(g),{once:!0}),u8(f,m),m.defaultPrevented?d.current=!1:a.onClose()}};return o.jsx(j7,{...i,ref:c,disabled:n,onClick:Oe(e.onClick,h),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),d.current=!0},onPointerUp:Oe(e.onPointerUp,f=>{var m;d.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:Oe(e.onKeyDown,f=>{const m=l.searchRef.current!=="";n||m&&f.key===" "||RC.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Bx.displayName=Ky;var j7=_.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=e,a=Rk(Ky,n),l=g7(n),c=_.useRef(null),d=yt(t,c),[h,f]=_.useState(!1),[m,g]=_.useState("");return _.useEffect(()=>{const x=c.current;x&&g((x.textContent??"").trim())},[s.children]),o.jsx(Ah.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:o.jsx(y8,{asChild:!0,...l,focusable:!r,children:o.jsx(Ge.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:Oe(e.onPointerMove,kh(x=>{r?a.onItemLeave(x):(a.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,kh(x=>a.onItemLeave(x))),onFocus:Oe(e.onFocus,()=>f(!0)),onBlur:Oe(e.onBlur,()=>f(!1))})})})}),mye="MenuCheckboxItem",S7=_.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return o.jsx(A7,{scope:e.__scopeMenu,checked:n,children:o.jsx(Bx,{role:"menuitemcheckbox","aria-checked":Gy(n)?"mixed":n,...i,ref:t,"data-state":$k(n),onSelect:Oe(i.onSelect,()=>r==null?void 0:r(Gy(n)?!0:!n),{checkForDefaultPrevented:!1})})})});S7.displayName=mye;var _7="MenuRadioGroup",[gye,yye]=cc(_7,{value:void 0,onValueChange:()=>{}}),N7=_.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,s=er(r);return o.jsx(gye,{scope:e.__scopeMenu,value:n,onValueChange:s,children:o.jsx(Ik,{...i,ref:t})})});N7.displayName=_7;var C7="MenuRadioItem",P7=_.forwardRef((e,t)=>{const{value:n,...r}=e,i=yye(C7,e.__scopeMenu),s=n===i.value;return o.jsx(A7,{scope:e.__scopeMenu,checked:s,children:o.jsx(Bx,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":$k(s),onSelect:Oe(r.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})})});P7.displayName=C7;var Lk="MenuItemIndicator",[A7,vye]=cc(Lk,{checked:!1}),k7=_.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,s=vye(Lk,n);return o.jsx(Sr,{present:r||Gy(s.checked)||s.checked===!0,children:o.jsx(Ge.span,{...i,ref:t,"data-state":$k(s.checked)})})});k7.displayName=Lk;var xye="MenuSeparator",E7=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return o.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});E7.displayName=xye;var bye="MenuArrow",T7=_.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Fx(n);return o.jsx(Ck,{...i,...r,ref:t})});T7.displayName=bye;var wye="MenuSub",[O$e,O7]=cc(wye),Yf="MenuSubTrigger",M7=_.forwardRef((e,t)=>{const n=uc(Yf,e.__scopeMenu),r=Yp(Yf,e.__scopeMenu),i=O7(Yf,e.__scopeMenu),s=Rk(Yf,e.__scopeMenu),a=_.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,d={__scopeMenu:e.__scopeMenu},h=_.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return _.useEffect(()=>h,[h]),_.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),o.jsx(Ok,{asChild:!0,...d,children:o.jsx(j7,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":I7(n.open),...e,ref:vx(t,i.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,kh(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Oe(e.onPointerLeave,kh(f=>{var g,x;h();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const v=(x=n.content)==null?void 0:x.dataset.side,b=v==="right",j=b?-5:5,w=m[b?"left":"right"],N=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+j,y:f.clientY},{x:w,y:m.top},{x:N,y:m.top},{x:N,y:m.bottom},{x:w,y:m.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,f=>{var g;const m=s.searchRef.current!=="";e.disabled||m&&f.key===" "||tye[r.dir].includes(f.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),f.preventDefault())})})})});M7.displayName=Yf;var R7="MenuSubContent",D7=_.forwardRef((e,t)=>{const n=v7(zi,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=uc(zi,e.__scopeMenu),a=Yp(zi,e.__scopeMenu),l=O7(R7,e.__scopeMenu),c=_.useRef(null),d=yt(t,c);return o.jsx(Ah.Provider,{scope:e.__scopeMenu,children:o.jsx(Sr,{present:r||s.open,children:o.jsx(Ah.Slot,{scope:e.__scopeMenu,children:o.jsx(Dk,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var f;a.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,h=>{h.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,h=>{a.onClose(),h.preventDefault()}),onKeyDown:Oe(e.onKeyDown,h=>{var g;const f=h.currentTarget.contains(h.target),m=nye[a.dir].includes(h.key);f&&m&&(s.onOpenChange(!1),(g=l.trigger)==null||g.focus(),h.preventDefault())})})})})})});D7.displayName=R7;function I7(e){return e?"open":"closed"}function Gy(e){return e==="indeterminate"}function $k(e){return Gy(e)?"indeterminate":e?"checked":"unchecked"}function jye(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Sye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _ye(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Sye(e,Math.max(s,0));i.length===1&&(a=a.filter(d=>d!==n));const c=a.find(d=>d.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Nye(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const l=t[s],c=t[a],d=l.x,h=l.y,f=c.x,m=c.y;h>r!=m>r&&n<(f-d)*(r-h)/(m-h)+d&&(i=!i)}return i}function Cye(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Nye(n,t)}function kh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Pye=y7,Aye=Ok,kye=x7,Eye=b7,Tye=Ik,Oye=w7,Mye=Bx,Rye=S7,Dye=N7,Iye=P7,Lye=k7,$ye=E7,Fye=T7,Bye=M7,qye=D7,qx="DropdownMenu",[zye]=ei(qx,[m7]),Rr=m7(),[Uye,L7]=zye(qx),$7=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=Rr(t),d=_.useRef(null),[h,f]=Pa({prop:i,defaultProp:s??!1,onChange:a,caller:qx});return o.jsx(Uye,{scope:t,triggerId:cs(),triggerRef:d,contentId:cs(),open:h,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(m=>!m),[f]),modal:l,children:o.jsx(Pye,{...c,open:h,onOpenChange:f,dir:r,modal:l,children:n})})};$7.displayName=qx;var F7="DropdownMenuTrigger",B7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,s=L7(F7,n),a=Rr(n);return o.jsx(Aye,{asChild:!0,...a,children:o.jsx(Ge.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:vx(t,s.triggerRef),onPointerDown:Oe(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:Oe(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});B7.displayName=F7;var Vye="DropdownMenuPortal",q7=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Rr(t);return o.jsx(kye,{...r,...n})};q7.displayName=Vye;var z7="DropdownMenuContent",U7=_.forwardRef((e,t)=>
712{const{__scopeDropdownMenu:n,...r}=e,i=L7(z7,n),s=Rr(n),a=_.useRef(!1);return o.jsx(Eye,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,l=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,h=c.button===2||d;(!i.modal||h)&&(a.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)"}})});U7.displayName=z7;var Wye="DropdownMenuGroup",Hye=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Tye,{...i,...r,ref:t})});Hye.displayName=Wye;var Kye="DropdownMenuLabel",V7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Oye,{...i,...r,ref:t})});V7.displayName=Kye;var Gye="DropdownMenuItem",W7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Mye,{...i,...r,ref:t})});W7.displayName=Gye;var Yye="DropdownMenuCheckboxItem",H7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Rye,{...i,...r,ref:t})});H7.displayName=Yye;var Xye="DropdownMenuRadioGroup",Qye=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Dye,{...i,...r,ref:t})});Qye.displayName=Xye;var Jye="DropdownMenuRadioItem",K7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Iye,{...i,...r,ref:t})});K7.displayName=Jye;var Zye="DropdownMenuItemIndicator",G7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Lye,{...i,...r,ref:t})});G7.displayName=Zye;var eve="DropdownMenuSeparator",Y7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx($ye,{...i,...r,ref:t})});Y7.displayName=eve;var tve="DropdownMenuArrow",nve=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Fye,{...i,...r,ref:t})});nve.displayName=tve;var rve="DropdownMenuSubTrigger",X7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(Bye,{...i,...r,ref:t})});X7.displayName=rve;var ive="DropdownMenuSubContent",Q7=_.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Rr(n);return o.jsx(qye,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Q7.displayName=ive;var sve=$7,ave=B7,ove=q7,J7=U7,Z7=V7,eW=W7,tW=H7,nW=K7,rW=G7,iW=Y7,sW=X7,aW=Q7;const QD=sve,JD=ave,lve=_.forwardRef(({className:e,inset:t,children:n,...r},i)=>o.jsxs(sW,{ref:i,className:Te("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,o.jsx($B,{className:"ml-auto"})]}));lve.displayName=sW.displayName;const cve=_.forwardRef(({className:e,...t},n)=>o.jsx(aW,{ref:n,className:Te("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}));cve.displayName=aW.displayName;const DC=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(ove,{children:o.jsx(J7,{ref:r,sideOffset:t,className:Te("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
712de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));DC.displayName=J7.displayName;const yl=_.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(eW,{ref:r,className:Te("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]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));yl.displayName=eW.displayName;const uve=_.forwardRef(({className:e,children:t,checked:n,...r},i)=>o.jsxs(tW,{ref:i,className:Te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(rW,{children:o.jsx(Qr,{className:"h-4 w-4"})})}),t]}));uve.displayName=tW.displayName;const dve=_.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(nW,{ref:r,className:Te("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(rW,{children:o.jsx(FB,{className:"h-2 w-2 fill-current"})})}),t]}));dve.displayName=nW.displayName;const fve=_.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(Z7,{ref:r,className:Te("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));fve.displayName=Z7.displayName;const hve=_.forwardRef(({className:e,...t},n)=>o.jsx(iW,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));hve.displayName=iW.displayName;function pve(){const[e,t]=_.useState(""),[n,r]=_.useState("customers"),[i,s]=_.useState("All"),[a,l]=_.useState(null),[c,d]=_.useState(null),h=hn(),{data:f=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-sale_date",1e3)}),{data:m=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:g=[]}=Ee({queryKey:["staff"],queryFn:()=>ne.entities.User.list()}),{data:x=[]}=Ee({queryKey:["registeredCustomers"],queryFn:()=>ne.entities.Customer.list()}),{data:v=[]}=Ee({queryKey:["customerMedia"],queryFn:()=>ne.entities.CustomerMedia.list("-created_date")}),{data:b}=Ee({queryKey:["currentUser"],queryFn:()=>ne.auth.me()}),j=Ye({mutationFn:({id:O,data:M})=>ne.entities.Sale.update(O,M),onSuccess:()=>h.invalidateQueries({queryKey:["sales"]})}),w=(O,M)=>{O.forEach($=>{j.mutate({id:$,data:{booking_status:M}})})},N=new Date,k=O=>{var M;return((M=m.find($=>$.id===O))==null?void 0:M.name)||"Unknown"},C=O=>{const M=g.find($=>$.id===O);return M?M.full_name||M.email:"-"},A=_.useMemo(()=>{const O=new Map;return f.forEach(M=>{const $=M.customer_id||M.customer_name||M.customer_email;if(!$)return;O.has($)||O.set($,{id:M.customer_id,name:M.customer_name||M.customer_email||"Unknown",email:M.customer_email,sales:[],groups:new Set});const F=O.get($);F.sales.push(M),M.group_name&&F.groups.add(M.group_name)}),x.forEach(M=>{const $=M.id;O.has($)||O.set($,{id:M.id,name:M.name,email:M.email,profile_picture:M.profile_picture,sales:[],groups:new Set})}),Array.from(O.values()).map(M=>{var V,G;if(M.sales.length===0)return{...M,groups:[],status:"Registered",saleIds:[],staffId:null,staffName:"-",staffProfile:null,latestProduct:"No bookings yet",latestDate:null,startDate:null,endDate:null,mediaCount:v.filter(z=>z.customer_name===M.name).length};const $=M.sales.some(z=>z.booking_status==="postponed"),F=M.sales.every(z=>z.booking_status==="cancelled"),W=M.sales.some(z=>{if(z.booking_status==="cancelled"||z.booking_status==="postponed")return!1;const oe=z.payment_status==="Pending",pe=z.end_date||z.start_date,ue=pe&&Ch(Vt(pe),N);return oe||ue}),q=M.sales.sort((z,oe)=>new Date(oe.start_date||oe.sale_date)-new Date(z.start_date||z.sale_date))[0],K=M.sales.map(z=>({start:z.start_date||z.sale_date,end:z.end_date})),L=K.reduce((z,oe)=>oe.start<z?oe.start:z,(V=K[0])==null?void 0:V.start),H=K.filter(z=>z.end).reduce((z,oe)=>oe.end>z?oe.end:z,null);let I="Completed";return F?I="Cancelled":$?I="Postponed":W&&(I="Active"),{...M,groups:[...M.groups],status:I,saleIds:M.sales.map(z=>
712z.id),staffId:q.staff_id,staffName:C(q.staff_id),staffProfile:(G=g.find(z=>z.id===q.staff_id))==null?void 0:G.profile_picture,latestProduct:k(q.product_id),latestDate:q.start_date||q.sale_date,startDate:L,endDate:H,mediaCount:v.filter(z=>z.customer_name===M.name).length}}).sort((M,$)=>M.status==="Active"&&$.status!=="Active"?-1:M.status!=="Active"&&$.status==="Active"||M.status==="Registered"&&$.status!=="Registered"?1:M.status!=="Registered"&&$.status==="Registered"?-1:M.latestDate?$.latestDate?new Date($.latestDate)-new Date(M.latestDate):-1:1)},[f,m,g,v,x,N]),E=_.useMemo(()=>{const O=new Map;return f.forEach(M=>{if(!M.group_name)return;O.has(M.group_name)||O.set(M.group_name,{name:M.group_name,customers:new Set,sales:[],staffIds:new Set});const $=O.get(M.group_name);M.customer_name&&$.customers.add(M.customer_name),$.sales.push(M),M.staff_id&&$.staffIds.add(M.staff_id)}),Array.from(O.values()).map(M=>{var I;const $=M.sales.some(V=>V.booking_status==="postponed"),F=M.sales.every(V=>V.booking_status==="cancelled"),W=M.sales.some(V=>{if(V.booking_status==="cancelled"||V.booking_status==="postponed")return!1;const G=V.payment_status==="Pending",z=V.end_date||V.start_date,oe=z&&Ch(Vt(z),N);return G||oe}),q=M.sales.map(V=>({start:V.start_date||V.sale_date,end:V.end_date})),K=q.reduce((V,G)=>G.start<V?G.start:V,(I=q[0])==null?void 0:I.start),L=q.filter(V=>V.end).reduce((V,G)=>G.end>V?G.end:V,null);let H="Completed";return F?H="Cancelled":$?H="Postponed":W&&(H="Active"),{...M,customers:[...M.customers],staffIds:[...M.staffIds],status:H,saleIds:M.sales.map(V=>V.id),startDate:K,endDate:L,mediaCount:v.filter(V=>V.group_name===M.name).length}}).sort((M,$)=>M.status==="Active"&&$.status!=="Active"?-1:M.status!=="Active"&&$.status==="Active"?1:$.customers.length-M.customers.length)},[f,v,N]),P=A.filter(O=>{var M;return(i==="All"||O.status===i)&&(O.name.toLowerCase().includes(e.toLowerCase())||((M=O.email)==null?void 0:M.toLowerCase().includes(e.toLowerCase())))}),D=E.filter(O=>(i==="All"||O.status===i)&&O.name.toLowerCase().includes(e.toLowerCase())),B=O=>O.split(" ").map(M=>M[0]).join("").toUpperCase().slice(0,2);return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsx("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Customers & Groups"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage customers, groups, and their media"})]})}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between",children:[o.jsx(Dp,{value:n,onValueChange:r,children:o.jsxs(Nd,{className:"bg-white shadow-sm",children:[o.jsxs(Wr,{value:"customers",className:"flex items-center gap-2",children:[o.jsx(Ca,{className:"w-4 h-4"}),"Customers (",A.length,")"]}),o.jsxs(Wr,{value:"groups",className:"flex items-center gap-2",children:[o.jsx(Jr,{className:"w-4 h-4"}),"Groups (",E.length,")"]})]})}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(ht,{value:i,onValueChange:s,children:[o.jsx(ct,{className:"w-[140px] bg-white",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"All",children:"All Statuses"}),o.jsx(Pe,{value:"Active",children:"Active"}),o.jsx(Pe,{value:"Registered",children:"Registered"}),o.jsx(Pe,{value:"Postponed",children:"Postponed"}),o.jsx(Pe,{value:"Cancelled",children:"Cancelled"}),o.jsx(Pe,{value:"Completed",children:"Completed"})]})]}),o.jsxs("div",{className:"relative w-full sm:w-64",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{value:e,onChange:O=>t(O.target.value),placeholder:"Search...",className:"pl-10 bg-white"})]})]})]}),n==="customers"?o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[P.map((O,M)=>o.jsx("div",{className:"bg-white rounded-xl p-4 shadow-sm hover:shadow-md transition-shadow cursor-pointer",onClick:()=>l(O),children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(ya,{className:"h-12 w-12 bg-gradient-to-br from-cyan-500 to-blue-600",children:o.jsx(va,{className:"text-white",children:B(O.name)})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"font-medium text-slate-800 truncate",children:O.name}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(st,{variant:"outline",className:O.status==="Active"?"bg-emerald-50 text-emerald-700 border-emerald-200":O.status==="Registered"?"bg-blue-50 text-blue-700 border-blue-200":O.status==="Postponed"?"bg-amber-50 text-amber-700 border-amber-200":O.status==="Cancelled"?"bg-rose-50 text-rose-700 border-rose-200":"bg-slate-50 text-slate-600 border-slate-200",children:O.status}),o.jsxs(QD,{children:[o.jsx(JD,{asChild:!0,onClick:$=>$.stopPropagation(),children:o.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",children:o.jsx(_M,{className:"w-3 h-3"})})}),o.jsx(DC,{align:"end",onClick:$=>$.stopPropagation(),children:O.saleIds.length>0?o.jsxs(o.Fragment,{children:[o.jsxs(yl,{onClick:()=>w(O.saleIds,"active"),children:[o.jsx(wM,{className:"w-4 h-4 mr-2 text-emerald-600"}),"Set Active"]}),o.jsxs(yl,{onClick:()=>w(O.saleIds,"postponed"),children:[o.jsx(CM,{className:"w-4 h-4 mr-2 text-amber-600"}),"Postpone"]}),o.jsxs(yl,{onClick:()=>w(O.saleIds,"cancelled"),children:[o.jsx(jM,{className:"w-4 h-4 mr-2 text-rose-600"}),"Cancel"]})]}):o.jsx("div",{className:"px-2 py-2 text-xs text-slate-500",children:"No bookings to update"})})]})]})]}),o.jsx("p",{className:"text-sm text-slate-500 truncate",children:O.email||"-"}),O.startDate?o.jsxs("p",{className:"text-xs text-slate-500 flex items-center gap-1 mt-1",children:[o.jsx(vi,{className:"w-3 h-3"}),_e(Vt(O.startDate),"MMM d"),O.endDate&&` - ${_e(Vt(O.endDate),"MMM d")}`]}):O.status==="Registered"&&o.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"No bookings yet"}),o.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs text-slate-500",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs(ya,{className:"h-4 w-4",children:[o.jsx(Ph,{src:O.staffProfile}),o.jsx(va,{className:"text-[8px] bg-cyan-100 text-cyan-700",children:B(O.staffName)})]}),o.jsx("span",{children:O.staffName})]}),O.mediaCount>0&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(Hl,{className:"w-3 h-3"}),O.mediaCount]})]}),O.groups.length>0&&o.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[O.groups.slice(0,2).map(($,F)=>o.jsx(st,{variant:"secondary",className:"text-xs",children:$},F)),O.groups.length>2&&o.jsxs(st,{variant:"secondary",className:"text-xs",children:["+",O.groups.length-2]})]})]})]})},M)),P.length===0&&o.jsx("div",{className:"col-span-full text-center text-slate-400 py-12",children:"No customers found"})]}):o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[D.map((O,M)=>o.jsx("div",{className:"bg-white rounded-xl p-4 shadow-sm hover:shadow-md transition-shadow cursor-pointer",onClick:()=>d(O),children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-purple-500 to-indigo-600 flex items-center justify-center",children:o.jsx(Jr,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"font-medium text-slate-800 truncate",children:O.name}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(st,{variant:"outline",className:O.status==="Active"?"bg-emerald-50 text-emerald-700 border-emerald-200":O.status==="Postponed"?"bg-amber-50 text-amber-700 border-amber-200":O.status==="Cancelled"?"bg-rose-50 text-rose-700 border-rose-200":"bg-slate-50 text-slate-600 border-slate-200",children:O.status}),o.jsxs(QD,{children:[o.jsx(JD,{asChild:!0,onClick:$=>$.stopPropagation(),children:o.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",children:o.jsx(_M,{className:"w-3 h-3"})})}),o.jsxs(DC,{align:"end",onClick:$=>$.stopPropagation(),children:[o.jsxs(yl,{onClick:()=>w(O.saleIds,"active"),children:[o.jsx(wM,{className:"w-4 h-4 mr-2 text-emerald-600"}),"Set Active"]}),o.jsxs(yl,{onClick:()=>w(O.saleIds,"postponed"),children:[o.jsx(CM,{className:"w-4 h-4 mr-2 text-amber-600"}),"Postpone"]}),o.jsxs(yl,{onClick:()=>w(O.saleIds,"cancelled"),children:[o.jsx(jM,{className:"w-4 h-4 mr-2 text-rose-600"}),"Cancel"]})]})]})]})]}),o.jsxs("p",{className:"text-sm text-slate-500",children:[O.customers.length," customers"]}),O.startDate&&o.jsxs("p",{className:"text-xs text-slate-500 flex items-center gap-1 mt-1",children:[o.jsx(vi,{className:"w-3 h-3"}),_e(Vt(O.startDate),"MMM d"),O.endDate&&` - ${_e(Vt(O.endDate),"MMM d")}`]}),o.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs text-slate-500",children:[o.jsxs("div",{className:"flex -sp
712ace-x-1",children:[O.staffIds.slice(0,3).map(($,F)=>{const W=g.find(q=>q.id===$);return o.jsxs(ya,{className:"h-5 w-5 border border-white",children:[o.jsx(Ph,{src:W==null?void 0:W.profile_picture}),o.jsx(va,{className:"text-[8px] bg-cyan-100 text-cyan-700",children:B((W==null?void 0:W.full_name)||(W==null?void 0:W.email)||"?")})]},F)}),O.staffIds.length>3&&o.jsxs("span",{className:"text-xs text-slate-400 ml-1",children:["+",O.staffIds.length-3]})]}),O.mediaCount>0&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(Hl,{className:"w-3 h-3"}),O.mediaCount]})]})]})]})},M)),D.length===0&&o.jsx("div",{className:"col-span-full text-center text-slate-400 py-12",children:"No groups found"})]}),o.jsx(tn,{open:!!a,onOpenChange:()=>l(null),children:o.jsxs(Kt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:a==null?void 0:a.name})}),a&&o.jsx(YD,{customer:a,media:v.filter(O=>O.customer_name===a.name),currentUser:b,staffMembers:g,onDelete:()=>l(null)})]})}),o.jsx(tn,{open:!!c,onOpenChange:()=>d(null),children:o.jsxs(Kt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:c==null?void 0:c.name})}),c&&o.jsx(YD,{group:c,media:v.filter(O=>O.group_name===c.name),currentUser:b,staffMembers:g})]})})]})})}function mve(){return o.jsx(ms,{children:o.jsx(pve,{})})}function qg({title:e,value:t,subtitle:n,icon:r,trend:i,trendUp:s,className:a}){return o.jsxs(lt,{className:Te("relative overflow-hidden p-6 bg-white border-0 shadow-sm hover:shadow-md transition-all duration-300",a),children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-sm font-medium text-slate-500 tracking-wide uppercase",children:e}),o.jsx("p",{className:"text-3xl font-light text-slate-900 tracking-tight",children:t}),n&&o.jsx("p",{className:"text-sm text-slate-400",children:n}),i&&o.jsx("div",{className:Te("inline-flex items-center gap-1 text-sm font-medium",s?"text-emerald-600":"text-rose-500"),children:o.jsx("span",{children:i})})]}),r&&o.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-cyan-50 to-blue-50",children:o.jsx(r,{className:"w-6 h-6 text-cyan-600"})})]}),o.jsx("div",{className:"absolute -right-6 -bottom-6 w-24 h-24 rounded-full bg-gradient-to-br from-cyan-50/50 to-blue-50/50"})]})}var p1,ZD;function ti(){if(ZD)return p1;ZD=1;var e=Array.isArray;return p1=e,p1}var m1,eI;function oW(){if(eI)return m1;eI=1;var e=typeof wg=="object"&&wg&&wg.Object===Object&&wg;return m1=e,m1}var g1,tI;function Ws(){if(tI)return g1;tI=1;var e=oW(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return g1=n,g1}var y1,nI;function Xp(){if(nI)return y1;nI=1;var e=Ws(),t=e.Symbol;return y1=t,y1}var v1,rI;function gve(){if(rI)return v1;rI=1;var e=Xp(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(a){var l=n.call(a,i),c=a[i];try{a[i]=void 0;var d=!0}catch{}var h=r.call(a);return d&&(l?a[i]=c:delete a[i]),h}return v1=s,v1}var x1,iI;function yve(){if(iI)return x1;iI=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return x1=n,x1}var b1,sI;function La(){if(sI)return b1;sI=1;var e=Xp(),t=gve(),n=yve(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function a(l){return l==null?l===void 0?i:r:s&&s in Object(l)?t(l):n(l)}return b1=a,b1}var w1,aI;function $a(){if(aI)return w1;aI=1;function e(t){return t!=null&&typeof t=="object"}return w1=e,w1}var j1,oI;function Td(){if(oI)return j1;oI=1;var e=La(),t=$a(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return j1=r,j1}var S1,lI;function Fk(){if(lI)return S1;lI=1;var e=ti(),t=Td(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,a){if(e(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||a!=null&&s in Object(a)}return S1=i,S1}var _1,cI;function Wo(){if(cI)return _1;cI=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return _1=e,_1}var N1,uI;function Bk(){if(uI)return N1;uI=1;var e=La(),t=Wo(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function a(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==s}return N1=a,N1}var C1,dI;function vve(){if(dI)return C1;dI=1;
vendor: 2,489 bytes, line 712
712var e=Ws(),t=e["__core-js_shared__"];return C1=t,C1}var P1,fI;function xve(){if(fI)return P1;fI=1;var e=vve(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return P1=n,P1}var A1,hI;function lW(){if(hI)return A1;hI=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return A1=n,A1}var k1,pI;function bve(){if(pI)return k1;pI=1;var e=Bk(),t=xve(),n=Wo(),r=lW(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,l=Object.prototype,c=a.toString,d=l.hasOwnProperty,h=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!n(m)||t(m))return!1;var g=e(m)?h:s;return g.test(r(m))}return k1=f,k1}var E1,mI;function wve(){if(mI)return E1;mI=1;function e(t,n){return t==null?void 0:t[n]}return E1=e,E1}var T1,gI;function dc(){if(gI)return T1;gI=1;var e=bve(),t=wve();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return T1=n,T1}var O1,yI;function zx(){if(yI)return O1;yI=1;var e=dc(),t=e(Object,"create");return O1=t,O1}var M1,vI;function jve(){if(vI)return M1;vI=1;var e=zx();function t(){this.__data__=e?e(null):{},this.size=0}return M1=t,M1}var R1,xI;function Sve(){if(xI)return R1;xI=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return R1=e,R1}var D1,bI;function _ve(){if(bI)return D1;bI=1;var e=zx(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var a=this.__data__;if(e){var l=a[s];return l===t?void 0:l}return r.call(a,s)?a[s]:void 0}return D1=i,D1}var I1,wI;function Nve(){if(wI)return I1;wI=1;var e=zx(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return I1=r,I1}var L1,jI;function Cve(){if(jI)return L1;jI=1;var e=zx(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return L1=n,L1}var $1,SI;function Pve(){if(SI)return $1;SI=1;var e=jve(),t=Sve(),n=_ve(),r=Nve(),i=Cve();function s(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var d=a[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,$1=s,$1}var F1,_I;function Ave(){if(_I)return F1;_I=1;function e(){this.__data__=[],this.size=0}return F1=e,F1}var B1,NI;
vendor: 10,537 bytes, lines 712-720
712function qk(){if(NI)return B1;NI=1;function e(t,n){return t===n||t!==t&&n!==n}return B1=e,B1}var q1,CI;function Ux(){if(CI)return q1;CI=1;var e=qk();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return q1=t,q1}var z1,PI;function kve(){if(PI)return z1;PI=1;var e=Ux(),t=Array.prototype,n=t.splice;function r(i){var s=this.__data__,a=e(s,i);if(a<0)return!1;var l=s.length-1;return a==l?s.pop():n.call(s,a,1),--this.size,!0}return z1=r,z1}var U1,AI;function Eve(){if(AI)return U1;AI=1;var e=Ux();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return U1=t,U1}var V1,kI;function Tve(){if(kI)return V1;kI=1;var e=Ux();function t(n){return e(this.__data__,n)>-1}return V1=t,V1}var W1,EI;function Ove(){if(EI)return W1;EI=1;var e=Ux();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return W1=t,W1}var H1,TI;function Vx(){if(TI)return H1;TI=1;var e=Ave(),t=kve(),n=Eve(),r=Tve(),i=Ove();function s(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var d=a[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,H1=s,H1}var K1,OI;function zk(){if(OI)return K1;OI=1;var e=dc(),t=Ws(),n=e(t,"Map");return K1=n,K1}var G1,MI;function Mve(){if(MI)return G1;MI=1;var e=Pve(),t=Vx(),n=zk();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return G1=r,G1}var Y1,RI;function Rve(){if(RI)return Y1;RI=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Y1=e,Y1}var X1,DI;function Wx(){if(DI)return X1;DI=1;var e=Rve();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return X1=t,X1}var Q1,II;function Dve(){if(II)return Q1;II=1;var e=Wx();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Q1=t,Q1}var J1,LI;function Ive(){if(LI)return J1;LI=1;var e=Wx();function t(n){return e(this,n).get(n)}return J1=t,J1}var Z1,$I;function Lve(){if($I)return Z1;$I=1;var e=Wx();function t(n){return e(this,n).has(n)}return Z1=t,Z1}var ej,FI;function $ve(){if(FI)return ej;FI=1;var e=Wx();function t(n,r){var i=e(this,n),s=i.size;return i.set(n,r),this.size+=i.size==s?0:1,this}return ej=t,ej}var tj,BI;function Uk(){if(BI)return tj;BI=1;var e=Mve(),t=Dve(),n=Ive(),r=Lve(),i=$ve();function s(a){var l=-1,c=a==null?0:a.length;for(this.clear();++l<c;){var d=a[l];this.set(d[0],d[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,tj=s,tj}var nj,qI;function cW(){if(qI)return nj;qI=1;var e=Uk(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var a=arguments,l=i?i.apply(this,a):a[0],c=s.cache;if(c.has(l))return c.get(l);var d=r.apply(this,a);return s.cache=c.set(l,d)||c,d};return s.cache=new(n.Cache||e),s}return n.Cache=e,nj=n,nj}var rj,zI;function Fve(){if(zI)return rj;zI=1;var e=cW(),t=500;function n(r){var i=e(r,function(a){return s.size===t&&s.clear(),a}),s=i.cache;return i}return rj=n,rj}var ij,UI;function Bve(){if(UI)return ij;UI=1;var e=Fve(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(a,l,c,d){s.push(c?d.replace(n,"$1"):l||a)}),s});return ij=r,ij}var sj,VI;function Vk(){if(VI)return sj;VI=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return sj=e,sj}var aj,WI;function qve(){if(WI)return aj;WI=1;var e=Xp(),t=Vk(),n=ti(),r=Td(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function a(l){if(typeof l=="string")return l;if(n(l))return t(l,a)+"";if(r(l))return s?s.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return aj=a,aj}var oj,HI;function uW(){if(HI)return oj;HI=1;var e=qve();function t(n){return n==null?"":e(n)}return oj=t,oj}var lj,KI;function dW(){if(KI)return lj;KI=1;var e=ti(),t=Fk(),n=Bve(),r=uW();function i(s,a){return e(s)?s:t(s,a)?[s]:n(r(s))}return lj=i,lj}var cj,GI;function Hx(){if(GI)return cj;GI=1;var e=Td();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return cj=t,cj}var uj,YI;function Wk(){if(YI)return uj;YI=1;var e=dW(),t=Hx();function n(r,i){i=e(i,r);for(var s=0,a=i.length;r!=null&&s<a;)r=r[t(i[s++])];return s&&s==a?r:void 0}return uj=n,uj}var dj,XI;function fW(){if(XI)return dj;XI=1;var e=Wk();function t(n,r,i){var s=n==null?void 0:e(n,r);return s===void 0?i:s}return dj=t,dj}var zve=fW();const mi=Ot(zve);var fj,QI;function Uve(){if(QI)return fj;QI=1;function e(t){return t==null}return fj=e,fj}var Vve=Uve();const at=Ot(Vve);var hj,JI;function Wve(){if(JI)return hj;JI=1;var e=La(),t=ti(),n=$a(),r="[object String]";function i(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return hj=i,hj}var Hve=Wve();const ec=Ot(Hve);var Kve=Bk();const rt=Ot(Kve);var Gve=Wo();const Od=Ot(Gve);var pj={exports:{}},It={};/**
713 * @license React
714 * react-is.production.min.js
715 *
716 * Copyright (c) Facebook, Inc. and its affiliates.
717 *
718 * This source code is licensed under the MIT license found in the
719 * LICENSE file in the root directory of this source tree.
720 */var ZI;function Yve(){if(ZI)return It;ZI=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function v(b){if(typeof b=="object"&&b!==null){var j=b.$$typeof;switch(j){case e:switch(b=b.type,b){case n:case i:case r:case d:case h:return b;default:switch(b=b&&b.$$typeof,b){case l:case a:case c:case m:case f:case s:return b;default:return j}}case t:return j}}}return It.ContextConsumer=a,It.ContextProvider=s,It.Element=e,It.ForwardRef=c,It.Fragment=n,It.Lazy=m,It.Memo=f,It.Portal=t,It.Profiler=i,It.StrictMode=r,It.Suspense=d,It.SuspenseList=h,It.isAsyncMode=function(){return!1},It.isConcurrentMode=function(){return!1},It.isContextConsumer=function(b){return v(b)===a},It.isContextProvider=function(b){return v(b)===s},It.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},It.isForwardRef=function(b){return v(b)===c},It.isFragment=function(b){return v(b)===n},It.isLazy=function(b){return v(b)===m},It.isMemo=function(b){return v(b)===f},It.isPortal=function(b){return v(b)===t},It.isProfiler=function(b){return v(b)===i},It.isStrictMode=function(b){return v(b)===r},It.isSuspense=function(b){return v(b)===d},It.isSuspenseList=function(b){return v(b)===h},It.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===d||b===h||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===f||b.$$typeof===s||b.$$typeof===a||b.$$typeof===c||b.$$typeof===x||b.getModuleId!==void 0)},It.typeOf=v,It}var eL;function Xve(){return eL||(eL=1,pj.exports=Yve()),pj.exports}var Qve=Xve(),mj,tL;function hW(){if(tL)return mj;tL=1;var e=La(),t=$a(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return mj=r,mj}var gj,nL;function Jve(){if(nL)return gj;nL=1;var e=hW();function t(n){return e(n)&&n!=+n}return gj=t,gj}var Zve=Jve();const Md=Ot(Zve);var exe=hW();const txe=Ot(exe);var Tr=function(t){return t===0?0:t>0?1:-1},Nl=function(t){return ec(t)&&t.indexOf("%")===t.length-1},ke=function(t){return txe(t)&&!Md(t)},nxe=function(t){return at(t)},zn=function(t){return ke(t)||ec(t)},rxe=0,fc=function(t){var n=++rxe;return"".concat(t||"").concat(n)},Or=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ke(t)&&!ec(t))return r;var s;if(Nl(t)){var a=t.indexOf("%");s=n*parseFloat(t.slice(0,a))/100}else s=+t;return Md(s)&&(s=r),i&&s>n&&(s=n),s},Zc=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},ixe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},qn=function(t,n){return ke(t)&&ke(n)?function(r){return t+r*(n-t)}:function(){return n}};function Yy(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):mi(r,t))===n})}var sxe=function(t,n){return ke(t)&&ke(n)?t-n:ec(t)&&ec(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function vu(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function IC(e){"@babel/helpers - typeof";return IC=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},IC(e)}var axe=["viewBox","children"],oxe=["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
720dering","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"],rL=["points","pathLength"],yj={svg:axe,polygon:rL,polyline:rL},Hk=["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
720Capture","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"],Xy=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(_.isValidElement(t)&&(r=t.props),!Od(r))return null;var i={};return Object.keys(r).forEach(function(s){Hk.includes(s)&&(i[s]=n||function(a){return r[s](r,a)})}),i},lxe=function(t,n,r){return function(i){return t(n,r,i),null}},tc=function(t,n,r){if(!Od(t)||IC(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var a=t[s];Hk.includes(s)&&typeof a=="function"&&(i||(i={}),i[s]=lxe(a,n,r))}),i},cxe=["children"],uxe=["children"];function iL(e,t){if(e==null)return{};var n=dxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LC(e){"@babel/helpers - typeof";return LC=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},LC(e)}var sL={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},xa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},aL=null,vj=null,Kk=function e(t){if(t===aL&&Array.isArray(vj))return vj;var n=[];return _.Children.forEach(t,function(r){at(r)||(Qve.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),vj=n,aL=t,n};function gi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return xa(i)}):r=[xa(t)],Kk(e).forEach(function(i){var s=mi(i,"type.displayName")||mi(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function ci(e,t){var n=gi(e,t);return n&&n[0]}var oL=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ke(r)||r<=0||!ke(i)||i<=0)},fxe=["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"],hxe=function(t){return t&&t.type&&ec(t.type)&&fxe.indexOf(t.type)>=0},pW=function(t){return t&&LC(t)==="object"&&"clipDot"in t},pxe=function(t,n,r,i){var s,a=(s=yj==null?void 0:yj[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!rt(t)&&(i&&a.includes(n)||oxe.includes(n))||r&&Hk.includes(n)},We=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(_.isValidElement(t)&&(i=t.props),!Od(i))return null;var s={};
vendor: 4,472 bytes, line 720
720return Object.keys(i).forEach(function(a){var l;pxe((l=i)===null||l===void 0?void 0:l[a],a,n,r)&&(s[a]=i[a])}),s},$C=function e(t,n){if(t===n)return!0;var r=_.Children.count(t);if(r!==_.Children.count(n))return!1;if(r===0)return!0;if(r===1)return lL(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=t[i],a=n[i];if(Array.isArray(s)||Array.isArray(a)){if(!e(s,a))return!1}else if(!lL(s,a))return!1}return!0},lL=function(t,n){if(at(t)&&at(n))return!0;if(!at(t)&&!at(n)){var r=t.props||{},i=r.children,s=iL(r,cxe),a=n.props||{},l=a.children,c=iL(a,uxe);return i&&l?vu(s,c)&&$C(i,l):!i&&!l?vu(s,c):!1}return!1},cL=function(t,n){var r=[],i={};return Kk(t).forEach(function(s,a){if(hxe(s))r.push(s);else if(s){var l=xa(s.type),c=n[l]||{},d=c.handler,h=c.once;if(d&&(!h||!i[l])){var f=d(s,l,a);r.push(f),i[l]=!0}}}),r},mxe=function(t){var n=t&&t.type;return n&&sL[n]?sL[n]:null},gxe=function(t,n){return Kk(n).indexOf(t)},yxe=["children","width","height","viewBox","className","style","title","desc"];function FC(){return FC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FC.apply(this,arguments)}function vxe(e,t){if(e==null)return{};var n=xxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function BC(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,a=e.style,l=e.title,c=e.desc,d=vxe(e,yxe),h=i||{width:n,height:r,x:0,y:0},f=ot("recharts-surface",s);return X.createElement("svg",FC({},We(d,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),X.createElement("title",null,l),X.createElement("desc",null,c),t)}var bxe=["children","className"];function qC(){return qC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qC.apply(this,arguments)}function wxe(e,t){if(e==null)return{};var n=jxe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var _t=X.forwardRef(function(e,t){var n=e.children,r=e.className,i=wxe(e,bxe),s=ot("recharts-layer",r);return X.createElement("g",qC({className:s},We(i,!0),{ref:t}),n)}),ba=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s]},xj,uL;function Sxe(){if(uL)return xj;uL=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(s);++i<s;)a[i]=t[i+n];return a}return xj=e,xj}var bj,dL;function _xe(){if(dL)return bj;dL=1;var e=Sxe();function t(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:e(n,r,i)}return bj=t,bj}var wj,fL;function mW(){if(fL)return wj;fL=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",a="\\u200d",l=RegExp("["+a+e+i+s+"]");function c(d){return l.test(d)}return wj=c,wj}var jj,hL;function Nxe(){if(hL)return jj;hL=1;function e(t){return t.split("")}return jj=e,jj}var Sj,pL;function Cxe(){if(pL)return Sj;pL=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",a="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",h="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",x=d+"?",v="["+s+"]?",b="(?:"+g+"(?:"+[h,f,m].join("|")+")"+v+x+")*",j=v+x+b,w="(?:"+[h+l+"?",l,f,m,a].join("|")+")",N=RegExp(c+"(?="+c+")|"+w+j,"g");function k(C){return C.match(N)||[]}return Sj=k,Sj}var _j,mL;function Pxe(){if(mL)return _j;mL=1;var e=Nxe(),t=mW(),n=Cxe();function r(i){return t(i)?n(i):e(i)}return _j=r,_j}var Nj,gL;function Axe(){if(gL)return Nj;gL=1;var e=_xe(),t=mW(),n=Pxe(),r=uW();function i(s){return function(a){a=r(a);
vendor: 4,168 bytes, line 720
720var l=t(a)?n(a):void 0,c=l?l[0]:a.charAt(0),d=l?e(l,1).join(""):a.slice(1);return c[s]()+d}}return Nj=i,Nj}var Cj,yL;function kxe(){if(yL)return Cj;yL=1;var e=Axe(),t=e("toUpperCase");return Cj=t,Cj}var Exe=kxe();const Kx=Ot(Exe);function Qt(e){return function(){return e}}const gW=Math.cos,Qy=Math.sin,ys=Math.sqrt,Jy=Math.PI,Gx=2*Jy,zC=Math.PI,UC=2*zC,vl=1e-6,Txe=UC-vl;function yW(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Oxe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return yW;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Mxe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?yW:Oxe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,l=this._y1,c=r-t,d=i-n,h=a-t,f=l-n,m=h*h+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>vl)if(!(Math.abs(f*c-d*h)>vl)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-a,x=i-l,v=c*c+d*d,b=g*g+x*x,j=Math.sqrt(v),w=Math.sqrt(m),N=s*Math.tan((zC-Math.acos((v+m-b)/(2*j*w)))/2),k=N/w,C=N/j;Math.abs(k-1)>vl&&this._append`L${t+k*h},${n+k*f}`,this._append`A${s},${s},0,0,${+(f*g>h*x)},${this._x1=t+C*c},${this._y1=n+C*d}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),d=t+l,h=n+c,f=1^a,m=a?i-s:s-i;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>vl||Math.abs(this._y1-h)>vl)&&this._append`L${d},${h}`,r&&(m<0&&(m=m%UC+UC),m>Txe?this._append`A${r},${r},0,1,${f},${t-l},${n-c}A${r},${r},0,1,${f},${this._x1=d},${this._y1=h}`:m>vl&&this._append`A${r},${r},0,${+(m>=zC)},${f},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Gk(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Mxe(t)}function Yk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vW(e){this._context=e}vW.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 Yx(e){return new vW(e)}function xW(e){return e[0]}function bW(e){return e[1]}function wW(e,t){var n=Qt(!0),r=null,i=Yx,s=null,a=Gk(l);e=typeof e=="function"?e:e===void 0?xW:Qt(e),t=typeof t=="function"?t:t===void 0?bW:Qt(t);function l(c){var d,h=(c=Yk(c)).length,f,m=!1,g;for(r==null&&(s=i(g=a())),d=0;d<=h;++d)!(d<h&&n(f=c[d],d,c))===m&&((m=!m)?s.lineStart():s.lineEnd()),m&&s.point(+e(f,d,c),+t(f,d,c));if(g)return s=null,g+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Qt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Qt(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Qt(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),l):r},l}function zg(e,t,n){var r=null,i=Qt(!0),s=null,a=Yx,l=null,c=Gk(d);e=typeof e=="function"?e:e===void 0?xW:Qt(+e),t=typeof t=="function"?t:Qt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?bW:Qt
720(+n);function d(f){var m,g,x,v=(f=Yk(f)).length,b,j=!1,w,N=new Array(v),k=new Array(v);for(s==null&&(l=a(w=c())),m=0;m<=v;++m){if(!(m<v&&i(b=f[m],m,f))===j)if(j=!j)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),x=m-1;x>=g;--x)l.point(N[x],k[x]);l.lineEnd(),l.areaEnd()}j&&(N[m]=+e(b,m,f),k[m]=+t(b,m,f),l.point(r?+r(b,m,f):N[m],n?+n(b,m,f):k[m]))}if(w)return l=null,w+""||null}function h(){return wW().defined(i).curve(a).context(s)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:Qt(+f),r=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Qt(+f),d):e},d.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Qt(+f),d):r},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:Qt(+f),n=null,d):t},d.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Qt(+f),d):t},d.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Qt(+f),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(t)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(r).y(t)},d.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Qt(!!f),d):i},d.curve=function(f){return arguments.length?(a=f,s!=null&&(l=a(s)),d):a},d.context=function(f){return arguments.length?(f==null?s=l=null:l=a(s=f),d):s},d}class jW{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Rxe(e){return new jW(e,!0)}function Dxe(e){return new jW(e,!1)}const Xk={draw(e,t){const n=ys(t/Jy);e.moveTo(n,0),e.arc(0,0,n,0,Gx)}},Ixe={draw(e,t){const n=ys(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},SW=ys(1/3),Lxe=SW*2,$xe={draw(e,t){const n=ys(t/Lxe),r=n*SW;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Fxe={draw(e,t){const n=ys(t),r=-n/2;e.rect(r,r,n,n)}},Bxe=.8908130915292852,_W=Qy(Jy/10)/Qy(7*Jy/10),qxe=Qy(Gx/10)*_W,zxe=-gW(Gx/10)*_W,Uxe={draw(e,t){const n=ys(t*Bxe),r=qxe*n,i=zxe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const a=Gx*s/5,l=gW(a),c=Qy(a);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},Pj=ys(3),Vxe={draw(e,t){const n=-ys(t/(Pj*3));e.moveTo(0,n*2),e.lineTo(-Pj*n,-n),e.lineTo(Pj*n,-n),e.closePath()}},Pi=-.5,Ai=ys(3)/2,VC=1/ys(12),Wxe=(VC/2+1)*3,Hxe={draw(e,t){const n=ys(t/Wxe),r=n/2,i=n*VC,s=r,a=n*VC+n,l=-s,c=a;e.moveTo(r,i),e.lineTo(s,a),e.lineTo(l,c),e.lineTo(Pi*r-Ai*i,Ai*r+Pi*i),e.lineTo(Pi*s-Ai*a,Ai*s+Pi*a),e.lineTo(Pi*l-Ai*c,Ai*l+Pi*c),e.lineTo(Pi*r+Ai*i,Pi*i-Ai*r),e.lineTo(Pi*s+Ai*a,Pi*a-Ai*s),e.lineTo(Pi*l+Ai*c,Pi*c-Ai*l),e.closePath()}};function Kxe(e,t){let n=null,r=Gk(i);e=typeof e=="function"?e:Qt(e||Xk),t=typeof t=="function"?t:Qt(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:Qt(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:Qt(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function Zy(){}function ev(e,t,n){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+n)/6)}function NW(e){this._context=e}NW.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:ev(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:ev(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gxe(e){return new NW(e)}function CW(e){this._context=e}CW.prototype={areaStart:Zy,areaEnd:Zy,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:ev(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Yxe(e){return new CW(e)}function PW(e){this._context=e}PW.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ev(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xxe(e){return new PW(e)}function AW(e){this._context=e}AW.prototype={areaStart:Zy,areaEnd:Zy,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 Qxe(e){return new AW(e)}function vL(e){return e<0?-1:1}function xL(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),l=(s*i+a*r)/(r+i);return(vL(s)+vL(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(l))||0}function bL(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}
720function Aj(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,l=(s-r)/3;e._context.bezierCurveTo(r+l,i+l*t,s-l,a-l*n,s,a)}function tv(e){this._context=e}tv.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:Aj(this,this._t0,bL(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 n=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,Aj(this,bL(this,n=xL(this,e,t)),n);break;default:Aj(this,this._t0,n=xL(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kW(e){this._context=new EW(e)}(kW.prototype=Object.create(tv.prototype)).point=function(e,t){tv.prototype.point.call(this,t,e)};function EW(e){this._context=e}EW.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,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function Jxe(e){return new tv(e)}function Zxe(e){return new kW(e)}function TW(e){this._context=e}TW.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=wL(e),i=wL(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===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 wL(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function e0e(e){return new TW(e)}function Xx(e,t){this._context=e,this._t=t}Xx.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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function t0e(e){return new Xx(e,.5)}function n0e(e){return new Xx(e,0)}function r0e(e){return new Xx(e,1)}function Iu(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,l=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<l;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function WC(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function i0e(e,t){return e[t]}function s0e(e){const t=[];return t.key=e,t}function a0e(){var e=Qt([]),t=WC,n=Iu,r=i0e;function i(s){var a=Array.from(e.apply(this,arguments),s0e),l,c=a.length,d=-1,h;for(const f of s)for(l=0,++d;l<c;++l)(a[l][d]=[0,+r(f,a[l].key,d,s)]).data=f;for(l=0,h=Yk(t(a));l<c;++l)a[h[l]].index=l;return n(a,h),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:Qt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:Qt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?WC:typeof s=="function"?s:Qt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Iu,i):n},i}function o0e(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,a;i<s;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Iu(e,t)}}function l0e(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var a=0,l=0;a<i;++a)l+=e[a][n][1]||0;r[n][1]+=r[n][0]=-l/2}Iu(e,t)}}function c0e(e,t){if(!(!((a=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,a;r<s;++r){for(var l=0,c=0,d=0;l<a;++l){for(var h=e[t[l]],f=h[r][1]||0,m=h[r-1][1]||0,g=(f-m)/2,x=0;x<l;++x){var v=e[t[x]],b=v[r][1]||0,j=v[r-1][1]||0;g+=b-j}c+=f,d+=g*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=d/c)}i[r-1][1]+=i[r-1][0]=n,Iu(e,t)}}function Eh(e){"@babel/helpers - typeof";return Eh=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},Eh(e)}var u0e=["type","size","sizeType"];function HC(){return HC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HC.apply(this,arguments)}function jL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 15,088 bytes, lines 720-723
720t%2?jL(Object(n),!0).forEach(function(r){d0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function d0e(e,t,n){return t=f0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f0e(e){var t=h0e(e,"string");return Eh(t)=="symbol"?t:t+""}function h0e(e,t){if(Eh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p0e(e,t){if(e==null)return{};var n=m0e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var OW={symbolCircle:Xk,symbolCross:Ixe,symbolDiamond:$xe,symbolSquare:Fxe,symbolStar:Uxe,symbolTriangle:Vxe,symbolWye:Hxe},g0e=Math.PI/180,y0e=function(t){var n="symbol".concat(Kx(t));return OW[n]||Xk},v0e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*g0e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},x0e=function(t,n){OW["symbol".concat(Kx(t))]=n},Qk=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,a=t.sizeType,l=a===void 0?"area":a,c=p0e(t,u0e),d=SL(SL({},c),{},{type:r,size:s,sizeType:l}),h=function(){var b=y0e(r),j=Kxe().type(b).size(v0e(s,l,r));return j()},f=d.className,m=d.cx,g=d.cy,x=We(d,!0);return m===+m&&g===+g&&s===+s?X.createElement("path",HC({},x,{className:ot("recharts-symbols",f),transform:"translate(".concat(m,", ").concat(g,")"),d:h()})):null};Qk.registerSymbol=x0e;function Lu(e){"@babel/helpers - typeof";return Lu=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},Lu(e)}function KC(){return KC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KC.apply(this,arguments)}function _L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function b0e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_L(Object(n),!0).forEach(function(r){Th(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_L(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j0e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RW(r.key),r)}}function S0e(e,t,n){return t&&j0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _0e(e,t,n){return t=nv(t),N0e(e,MW()?Reflect.construct(t,n||[],nv(e).constructor):t.apply(e,n))}function N0e(e,t){if(t&&(Lu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C0e(e)}function C0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MW=function(){return!!e})()}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nv(e)}function P0e(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&&GC(e,t)}function GC(e,t){return GC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GC(e,t)}function Th(e,t,n){return t=RW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RW(e){var t=A0e(e,"string");return Lu(t)=="symbol"?t:t+""}function A0e(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ki=32,Jk=(function(e){function t(){return w0e(this,t),_0e(this,t,arguments)}return P0e(t,e),S0e(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=ki/2,a=ki/6,l=ki/3,c=r.inactive?i:r.color;if(r.type==="plainline")return X.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:ki,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return X.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(s,"h").concat(l,`
721            A`).concat(a,",").concat(a,",0,1,1,").concat(2*l,",").concat(s,`
722            H`).concat(ki,"M").concat(2*l,",").concat(s,`
723            A`).concat(a,",").concat(a,",0,1,1,").concat(l,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return X.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ki/8,"h").concat(ki,"v").concat(ki*3/4,"h").concat(-ki,"z"),className:"recharts-legend-icon"});if(X.isValidElement(r.legendIcon)){var d=b0e({},r);return delete d.legendIcon,X.cloneElement(r.legendIcon,d)}return X.createElement(Qk,{fill:c,cx:s,cy:s,size:ki,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,a=i.iconSize,l=i.layout,c=i.formatter,d=i.inactiveColor,h={x:0,y:0,width:ki,height:ki},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(g,x){var v=g.formatter||c,b=ot(Th(Th({"recharts-legend-item":!0},"legend-item-".concat(x),!0),"inactive",g.inactive));if(g.type==="none")return null;var j=rt(g.value)?null:g.value;ba(!rt(g.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 w=g.inactive?d:g.color;return X.createElement("li",KC({className:b,style:f,key:"legend-item-".concat(x)},tc(r.props,g,x)),X.createElement(BC,{width:a,height:a,viewBox:h,style:m},r.renderIcon(g)),X.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(j,g,x):j))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,a=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:s==="horizontal"?a:"left"};return X.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(_.PureComponent);Th(Jk,"displayName","Legend");Th(Jk,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var kj,NL;function k0e(){if(NL)return kj;NL=1;var e=Vx();function t(){this.__data__=new e,this.size=0}return kj=t,kj}var Ej,CL;function E0e(){if(CL)return Ej;CL=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Ej=e,Ej}var Tj,PL;function T0e(){if(PL)return Tj;PL=1;function e(t){return this.__data__.get(t)}return Tj=e,Tj}var Oj,AL;function O0e(){if(AL)return Oj;AL=1;function e(t){return this.__data__.has(t)}return Oj=e,Oj}var Mj,kL;function M0e(){if(kL)return Mj;kL=1;var e=Vx(),t=zk(),n=Uk(),r=200;function i(s,a){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([s,a]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(s,a),this.size=l.size,this}return Mj=i,Mj}var Rj,EL;function DW(){if(EL)return Rj;EL=1;var e=Vx(),t=k0e(),n=E0e(),r=T0e(),i=O0e(),s=M0e();function a(l){var c=this.__data__=new e(l);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=s,Rj=a,Rj}var Dj,TL;function R0e(){if(TL)return Dj;TL=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Dj=t,Dj}var Ij,OL;function D0e(){if(OL)return Ij;OL=1;function e(t){return this.__data__.has(t)}return Ij=e,Ij}var Lj,ML;function IW(){if(ML)return Lj;ML=1;var e=Uk(),t=R0e(),n=D0e();function r(i){var s=-1,a=i==null?0:i.length;for(this.__data__=new e;++s<a;)this.add(i[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Lj=r,Lj}var $j,RL;function LW(){if(RL)return $j;RL=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return $j=e,$j}var Fj,DL;function $W(){if(DL)return Fj;DL=1;function e(t,n){return t.has(n)}return Fj=e,Fj}var Bj,IL;function FW(){if(IL)return Bj;IL=1;var e=IW(),t=LW(),n=$W(),r=1,i=2;function s(a,l,c,d,h,f){var m=c&r,g=a.length,x=l.length;if(g!=x&&!(m&&x>g))return!1;var v=f.get(a),b=f.get(l);if(v&&b)return v==l&&b==a;var j=-1,w=!0,N=c&i?new e:void 0;for(f.set(a,l),f.set(l,a);++j<g;){var k=a[j],C=l[j];if(d)var A=m?d(C,k,j,l,a,f):d(k,C,j,a,l,f);if(A!==void 0){if(A)continue;w=!1;break}if(N){if(!t(l,function(E,P){if(!n(N,P)&&(k===E||h(k,E,c,d,f)))return N.push(P)})){w=!1;break}}else if(!(k===C||h(k,C,c,d,f))){w=!1;break}}return f.delete(a),f.delete(l),w}return Bj=s,Bj}var qj,LL;function I0e(){if(LL)return qj;LL=1;var e=Ws(),t=e.Uint8Array;return qj=t,qj}var zj,$L;function L0e(){if($L)return zj;$L=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,s){r[++n]=[s,i]}),r}return zj=e,zj}var Uj,FL;function Zk(){if(FL)return Uj;FL=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Uj=e,Uj}var Vj,BL;function $0e(){if(BL)return Vj;BL=1;var e=Xp(),t=I0e(),n=qk(),r=FW(),i=L0e(),s=Zk(),a=1,l=2,c="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Map]",m="[object Number]",g="[object RegExp]",x="[object Set]",v="[object String]",b="[object Symbol]",j="[object ArrayBuffer]",w="[object DataView]",N=e?e.prototype:void 0,k=N?N.valueOf:void 0;function C(A,E,P,D,B,O,M){switch(P){case w:if(A.byteLength!=E.byteLength||A.byteOffset!=E.byteOffset)return!1;A=A.buffer,E=E.buffer;case j:return!(A.byteLength!=E.byteLength||!O(new t(A),new t(E)));case c:case d:case m:return n(+A,+E);case h:return A.name==E.name&&A.message==E.message;case g:case v:return A==E+"";case f:var $=i;case x:var F=D&a;if($||($=s),A.size!=E.size&&!F)return!1;var W=M.get(A);if(W)return W==E;D|=l,M.set(A,E);var q=r($(A),$(E),D,B,O,M);return M.delete(A),q;case b:if(k)return k.call(A)==k.call(E)}return!1}return Vj=C,Vj}var Wj,qL;function BW(){if(qL)return Wj;qL=1;function e(t,n){for(var r=-1,i=n.length,s=t.length;++r<i;)t[s+r]=n[r];return t}return Wj=e,Wj}var Hj,zL;function F0e(){if(zL)return Hj;zL=1;var e=BW(),t=ti();function n(r,i,s){var a=i(r);return t(r)?a:e(a,s(r))}return Hj=n,Hj}var Kj,UL;function B0e(){if(UL)return Kj;UL=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=0,a=[];++r<i;){var l=t[r];n(l,r,t)&&(a[s++]=l)}return a}return Kj=e,Kj}var Gj,VL;function q0e(){if(VL)return Gj;VL=1;function e(){return[]}return Gj=e,Gj}var Yj,WL;function z0e(){if(WL)return Yj;WL=1;var e=B0e(),t=q0e(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(l){return r.call(a,l)}))}:t;return Yj=s,Yj}var Xj,HL;function U0e(){if(HL)return Xj;HL=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Xj=e,Xj}var Qj,KL;function V0e(){if(KL)return Qj;KL=1;var e=La(),t=$a(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Qj=r,Qj}var Jj,GL;function e2(){if(GL)return Jj;GL=1;var e=V0e(),t=$a(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return Jj=s,Jj}var Xf={exports:{}},Zj,YL;function W0e(){if(YL)return Zj;YL=1;function e(){return!1}return Zj=e,Zj}Xf.exports;var XL;function qW(){return XL||(XL=1,(function(e,t){var n=Ws(),r=W0e(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,l=a?n.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||r;e.exports=d})(Xf,Xf.exports)),Xf.exports}var eS,QL;function t2(){if(QL)return eS;QL=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var s=typeof r;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return eS=n,eS}var tS,JL;function n2(){if(JL)return tS;JL=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return tS=t,tS}var nS,ZL;function H0e(){if(ZL)return nS;ZL=1;var e=La(),t=n2(),n=$a(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",l="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",f="[object Object]",m="[object RegExp]",g="[object Set]",x="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",j="[object DataView]",w="[object Float32Array]",N="[object Float64Array]",k="[object Int8Array]",C="[object Int16Array]",A="[object Int32Array]",E="[object Uint8Array]",P="[object Uint8ClampedArray]",D="[object Uint16Array]",B="[object Uint32Array]",O={};O[w]=O[N]=O[k]=O[C]=O[A]=O[E]=O[P]=O[D]=O[B]=!0,O[r]=O[i]=O[b]=O[s]=O[j]=O[a]=O[l]=O[c]=O[d]=O[h]=O[f]=O[m]=O[g]=O[x]=O[v]=!1;function M($){return n($)&&t($.length)&&!!O[e($)]}return nS=M,nS}var rS,e4;function zW(){if(e4)return rS;e4=1;function e(t){return function(n){return t(n)}}return rS=e,rS}var Qf={exports:{}};Qf.exports;var t4;function K0e(){return t4||(t4=1,(function(e,t){var n=oW(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s&&n.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=l})(Qf,Qf.exports)),Qf.exports}var iS,n4;function UW(){if(n4)return iS;n4=1;var e=H0e(),t=zW(),n=K0e(),r=n&&n.isTypedArray,i=r?t(r):e;return iS=i,iS}var sS,r4;function G0e(){if(r4)return sS;r4=1;var e=U0e(),t=e2(),n=ti(),r=qW(),i=t2(),s=UW(),a=Object.prototype,l=a.hasOwnProperty;function c(d,h){var f=n(d),m=!f&&t(d),g=!f&&!m&&r(d),x=!f&&!m&&!g&&s(d),v=f||m||g||x,b=v?e(d.length,String):[],j=b.length;for(var w in d)(h||l.call(d,w))&&!(v&&(w=="length"||g&&(w=="offset"||w=="parent")||x&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,j)))&&b.push(w);return b}return sS=c,sS}var aS,i4;function Y0e(){if(i4)return aS;i4=1;var e=Object.prototype;
vendor: 3,080 bytes, line 723
723function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return aS=t,aS}var oS,s4;function VW(){if(s4)return oS;s4=1;function e(t,n){return function(r){return t(n(r))}}return oS=e,oS}var lS,a4;function X0e(){if(a4)return lS;a4=1;var e=VW(),t=e(Object.keys,Object);return lS=t,lS}var cS,o4;function Q0e(){if(o4)return cS;o4=1;var e=Y0e(),t=X0e(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var a=[];for(var l in Object(s))r.call(s,l)&&l!="constructor"&&a.push(l);return a}return cS=i,cS}var uS,l4;function Qp(){if(l4)return uS;l4=1;var e=Bk(),t=n2();function n(r){return r!=null&&t(r.length)&&!e(r)}return uS=n,uS}var dS,c4;function Qx(){if(c4)return dS;c4=1;var e=G0e(),t=Q0e(),n=Qp();function r(i){return n(i)?e(i):t(i)}return dS=r,dS}var fS,u4;function J0e(){if(u4)return fS;u4=1;var e=F0e(),t=z0e(),n=Qx();function r(i){return e(i,n,t)}return fS=r,fS}var hS,d4;function Z0e(){if(d4)return hS;d4=1;var e=J0e(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,a,l,c,d,h){var f=l&t,m=e(s),g=m.length,x=e(a),v=x.length;if(g!=v&&!f)return!1;for(var b=g;b--;){var j=m[b];if(!(f?j in a:r.call(a,j)))return!1}var w=h.get(s),N=h.get(a);if(w&&N)return w==a&&N==s;var k=!0;h.set(s,a),h.set(a,s);for(var C=f;++b<g;){j=m[b];var A=s[j],E=a[j];if(c)var P=f?c(E,A,j,a,s,h):c(A,E,j,s,a,h);if(!(P===void 0?A===E||d(A,E,l,c,h):P)){k=!1;break}C||(C=j=="constructor")}if(k&&!C){var D=s.constructor,B=a.constructor;D!=B&&"constructor"in s&&"constructor"in a&&!(typeof D=="function"&&D instanceof D&&typeof B=="function"&&B instanceof B)&&(k=!1)}return h.delete(s),h.delete(a),k}return hS=i,hS}var pS,f4;function ebe(){if(f4)return pS;f4=1;var e=dc(),t=Ws(),n=e(t,"DataView");return pS=n,pS}var mS,h4;function tbe(){if(h4)return mS;h4=1;var e=dc(),t=Ws(),n=e(t,"Promise");return mS=n,mS}var gS,p4;function WW(){if(p4)return gS;p4=1;var e=dc(),t=Ws(),n=e(t,"Set");return gS=n,gS}var yS,m4;function nbe(){if(m4)return yS;m4=1;var e=dc(),t=Ws(),n=e(t,"WeakMap");return yS=n,yS}var vS,g4;function rbe(){if(g4)return vS;g4=1;var e=ebe(),t=zk(),n=tbe(),r=WW(),i=nbe(),s=La(),a=lW(),l="[object Map]",c="[object Object]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",m="[object DataView]",g=a(e),x=a(t),v=a(n),b=a(r),j=a(i),w=s;return(e&&w(new e(new ArrayBuffer(1)))!=m||t&&w(new t)!=l||n&&w(n.resolve())!=d||r&&w(new r)!=h||i&&w(new i)!=f)&&(w=function(N){var k=s(N),C=k==c?N.constructor:void 0,A=C?a(C):"";if(A)switch(A){case g:return m;case x:return l;case v:return d;case b:return h;case j:return f}return k}),vS=w,vS}var xS,y4;function ibe(){if(y4)return xS;y4=1;var e=DW(),t=FW(),n=$0e(),r=Z0e(),i=rbe(),s=ti(),a=qW(),l=UW(),c=1,d="[object Arguments]",h="[object Array]",f="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function x(v,b,j,w,N,k){var C=s(v),A=s(b),E=C?h:i(v),P=A?h:i(b);E=E==d?f:E,P=P==d?f:P;var D=E==f,B=P==f,O=E==P;if(O&&a(v)){if(!a(b))return!1;C=!0,D=!1}if(O&&!D)return k||(k=new e),C||l(v)?t(v,b,j,w,N,k):n(v,b,E,j,w,N,k);if(!(j&c)){var M=D&&g.call(v,"__wrapped__"),$=B&&g.call(b,"__wrapped__");
vendor: 44,796 bytes, lines 723-730
723if(M||$){var F=M?v.value():v,W=$?b.value():b;return k||(k=new e),N(F,W,j,w,k)}}return O?(k||(k=new e),r(v,b,j,w,N,k)):!1}return xS=x,xS}var bS,v4;function r2(){if(v4)return bS;v4=1;var e=ibe(),t=$a();function n(r,i,s,a,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,s,a,n,l)}return bS=n,bS}var wS,x4;function sbe(){if(x4)return wS;x4=1;var e=DW(),t=r2(),n=1,r=2;function i(s,a,l,c){var d=l.length,h=d,f=!c;if(s==null)return!h;for(s=Object(s);d--;){var m=l[d];if(f&&m[2]?m[1]!==s[m[0]]:!(m[0]in s))return!1}for(;++d<h;){m=l[d];var g=m[0],x=s[g],v=m[1];if(f&&m[2]){if(x===void 0&&!(g in s))return!1}else{var b=new e;if(c)var j=c(x,v,g,s,a,b);if(!(j===void 0?t(v,x,n|r,c,b):j))return!1}}return!0}return wS=i,wS}var jS,b4;function HW(){if(b4)return jS;b4=1;var e=Wo();function t(n){return n===n&&!e(n)}return jS=t,jS}var SS,w4;function abe(){if(w4)return SS;w4=1;var e=HW(),t=Qx();function n(r){for(var i=t(r),s=i.length;s--;){var a=i[s],l=r[a];i[s]=[a,l,e(l)]}return i}return SS=n,SS}var _S,j4;function KW(){if(j4)return _S;j4=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return _S=e,_S}var NS,S4;function obe(){if(S4)return NS;S4=1;var e=sbe(),t=abe(),n=KW();function r(i){var s=t(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(a){return a===i||e(a,i,s)}}return NS=r,NS}var CS,_4;function lbe(){if(_4)return CS;_4=1;function e(t,n){return t!=null&&n in Object(t)}return CS=e,CS}var PS,N4;function cbe(){if(N4)return PS;N4=1;var e=dW(),t=e2(),n=ti(),r=t2(),i=n2(),s=Hx();function a(l,c,d){c=e(c,l);for(var h=-1,f=c.length,m=!1;++h<f;){var g=s(c[h]);if(!(m=l!=null&&d(l,g)))break;l=l[g]}return m||++h!=f?m:(f=l==null?0:l.length,!!f&&i(f)&&r(g,f)&&(n(l)||t(l)))}return PS=a,PS}var AS,C4;function ube(){if(C4)return AS;C4=1;var e=lbe(),t=cbe();function n(r,i){return r!=null&&t(r,i,e)}return AS=n,AS}var kS,P4;function dbe(){if(P4)return kS;P4=1;var e=r2(),t=fW(),n=ube(),r=Fk(),i=HW(),s=KW(),a=Hx(),l=1,c=2;function d(h,f){return r(h)&&i(f)?s(a(h),f):function(m){var g=t(m,h);return g===void 0&&g===f?n(m,h):e(f,g,l|c)}}return kS=d,kS}var ES,A4;function Rd(){if(A4)return ES;A4=1;function e(t){return t}return ES=e,ES}var TS,k4;function fbe(){if(k4)return TS;k4=1;function e(t){return function(n){return n==null?void 0:n[t]}}return TS=e,TS}var OS,E4;function hbe(){if(E4)return OS;E4=1;var e=Wk();function t(n){return function(r){return e(r,n)}}return OS=t,OS}var MS,T4;function pbe(){if(T4)return MS;T4=1;var e=fbe(),t=hbe(),n=Fk(),r=Hx();function i(s){return n(s)?e(r(s)):t(s)}return MS=i,MS}var RS,O4;function Hs(){if(O4)return RS;O4=1;var e=obe(),t=dbe(),n=Rd(),r=ti(),i=pbe();function s(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return RS=s,RS}var DS,M4;function GW(){if(M4)return DS;M4=1;function e(t,n,r,i){for(var s=t.length,a=r+(i?1:-1);i?a--:++a<s;)if(n(t[a],a,t))return a;return-1}return DS=e,DS}var IS,R4;function mbe(){if(R4)return IS;R4=1;function e(t){return t!==t}return IS=e,IS}var LS,D4;function gbe(){if(D4)return LS;D4=1;function e(t,n,r){for(var i=r-1,s=t.length;++i<s;)if(t[i]===n)return i;return-1}return LS=e,LS}var $S,I4;function ybe(){if(I4)return $S;I4=1;var e=GW(),t=mbe(),n=gbe();function r(i,s,a){return s===s?n(i,s,a):e(i,t,a)}return $S=r,$S}var FS,L4;function vbe(){if(L4)return FS;L4=1;var e=ybe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return FS=t,FS}var BS,$4;function xbe(){if($4)return BS;$4=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;)if(r(n,t[i]))return!0;return!1}return BS=e,BS}var qS,F4;function bbe(){if(F4)return qS;F4=1;function e(){}return qS=e,qS}var zS,B4;function wbe(){if(B4)return zS;B4=1;var e=WW(),t=bbe(),n=Zk(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return zS=i,zS}var US,q4;function jbe(){if(q4)return US;q4=1;var e=IW(),t=vbe(),n=xbe(),r=$W(),i=wbe(),s=Zk(),a=200;function l(c,d,h){var f=-1,m=t,g=c.length,x=!0,v=[],b=v;if(h)x=!1,m=n;else if(g>=a){var j=d?null:i(c);if(j)return s(j);x=!1,m=r,b=new e}else b=d?[]:v;e:for(;++f<g;){var w=c[f],N=d?d(w):w;if(w=h||w!==0?w:0,x&&N===N){for(var k=b.length;k--;)if(b[k]===N)continue e;d&&b.push(N),v.push(w)}else m(b,N,h)||(b!==v&&b.push(N),v.push(w))}return v}return US=l,US}var VS,z4;function Sbe(){if(z4)return VS;z4=1;var e=Hs(),t=jbe();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return VS=n,VS}var _be=Sbe();const U4=Ot(_be);function YW(e,t,n){return t===!0?U4(e,n):rt(t)?U4(e,t):e}function $u(e){"@babel/helpers - typeof";return $u=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},$u(e)}var Nbe=["ref"];function V4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V4(Object(n),!0).forEach(function(r){Jx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QW(r.key),r)}}function Pbe(e,t,n){return t&&W4(e.prototype,t),n&&W4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Abe(e,t,n){return t=rv(t),kbe(e,XW()?Reflect.construct(t,n||[],rv(e).constructor):t.apply(e,n))}function kbe(e,t){if(t&&($u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ebe(e)}function Ebe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XW=function(){return!!e})()}function rv(e){return rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rv(e)}function Tbe(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&&YC(e,t)}function YC(e,t){return YC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YC(e,t)}function Jx(e,t,n){return t=QW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QW(e){var t=Obe(e,"string");return $u(t)=="symbol"?t:t+""}function Obe(e,t){if($u(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($u(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Mbe(e,t){if(e==null)return{};var n=Rbe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rbe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Dbe(e){return e.value}function Ibe(e,t){if(X.isValidElement(e))return X.cloneElement(e,t);if(typeof e=="function")return X.createElement(e,t);t.ref;var n=Mbe(t,Nbe);return X.createElement(Jk,n)}var H4=1,ql=(function(e){function t(){var n;Cbe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Abe(this,t,[].concat(i)),Jx(n,"lastBoundingBox",{width:-1,height:-1}),n}return Tbe(t,e),Pbe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>H4||Math.abs(i.height-this.lastBoundingBox.height)>H4)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,a=i.align,l=i.verticalAlign,c=i.margin,d=i.chartWidth,h=i.chartHeight,f,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&s==="vertical"){var g=this.getBBoxSnapshot();f={left:((d||0)-g.width)/2}}else f=a==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var x=this.getBBoxSnapshot();m={top:((h||0)-x.height)/2}}else m=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return sa(sa({},f),m)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,a=i.width,l=i.height,c=i.wrapperStyle,d=i.payloadUniqBy,h=i.payload,f=sa(sa({position:"absolute",width:a||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return X.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(g){r.wrapperNode=g}},Ibe(s,sa(sa({},this.props),{},{payload:YW(h,d,Dbe)})))}}],[{key:"getWithHeight",value:function(r,i){var s=sa(sa({},this.defaultProps),r.props),a=s.layout;return a==="vertical"&&ke(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])})(_.PureComponent);Jx(ql,"displayName","Legend");Jx(ql,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var WS,K4;function Lbe(){if(K4)return WS;K4=1;var e=Xp(),t=e2(),n=ti(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return WS=i,WS}var HS,G4;function JW(){if(G4)return HS;G4=1;var e=BW(),t=Lbe();function n(r,i,s,a,l){var c=-1,d=r.length;for(s||(s=t),l||(l=[]);++c<d;){var h=r[c];i>0&&s(h)?i>1?n(h,i-1,s,a,l):e(l,h):a||(l[l.length]=h)}return l}return HS=n,HS}var KS,Y4;function $be(){if(Y4)return KS;Y4=1;function e(t){return function(n,r,i){for(var s=-1,a=Object(n),l=i(n),c=l.length;c--;){var d=l[t?c:++s];if(r(a[d],d,a)===!1)break}return n}}return KS=e,KS}var GS,X4;function Fbe(){if(X4)return GS;X4=1;var e=$be(),t=e();return GS=t,GS}var YS,Q4;function ZW(){if(Q4)return YS;Q4=1;var e=Fbe(),t=Qx();function n(r,i){return r&&e(r,i,t)}return YS=n,YS}var XS,J4;function Bbe(){if(J4)return XS;J4=1;var e=Qp();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var a=i.length,l=r?a:-1,c=Object(i);(r?l--:++l<a)&&s(c[l],l,c)!==!1;);return i}}return XS=t,XS}var QS,Z4;function i2(){if(Z4)return QS;Z4=1;var e=ZW(),t=Bbe(),n=t(e);return QS=n,QS}var JS,e$;function e9(){if(e$)return JS;e$=1;var e=i2(),t=Qp();function n(r,i){var s=-1,a=t(r)?Array(r.length):[];return e(r,function(l,c,d){a[++s]=i(l,c,d)}),a}return JS=n,JS}var ZS,t$;function qbe(){if(t$)return ZS;t$=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return ZS=e,ZS}var e_,n$;function zbe(){if(n$)return e_;n$=1;var e=Td();function t(n,r){if(n!==r){var i=n!==void 0,s=n===null,a=n===n,l=e(n),c=r!==void 0,d=r===null,h=r===r,f=e(r);if(!d&&!f&&!l&&n>r||l&&c&&h&&!d&&!f||s&&c&&h||!i&&h||!a)return 1;if(!s&&!l&&!f&&n<r||f&&i&&a&&!s&&!l||d&&i&&a||!c&&a||!h)return-1}return 0}return e_=t,e_}var t_,r$;function Ube(){if(r$)return t_;r$=1;var e=zbe();function t(n,r,i){for(var s=-1,a=n.criteria,l=r.criteria,c=a.length,d=i.length;++s<c;){var h=e(a[s],l[s]);if(h){if(s>=d)return h;var f=i[s];return h*(f=="desc"?-1:1)}}return n.index-r.index}return t_=t,t_}var n_,i$;function Vbe(){if(i$)return n_;i$=1;var e=Vk(),t=Wk(),n=Hs(),r=e9(),i=qbe(),s=zW(),a=Ube(),l=Rd(),c=ti();function d(h,f,m){f.length?f=e(f,function(v){return c(v)?function(b){return t(b,v.length===1?v[0]:v)}:v}):f=[l];var g=-1;f=e(f,s(n));var x=r(h,function(v,b,j){var w=e(f,function(N){return N(v)});return{criteria:w,index:++g,value:v}});return i(x,function(v,b){return a(v,b,m)})}return n_=d,n_}var r_,s$;function Wbe(){if(s$)return r_;s$=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return r_=e,r_}var i_,a$;function Hbe(){if(a$)return i_;a$=1;var e=Wbe(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var a=arguments,l=-1,c=t(a.length-i,0),d=Array(c);++l<c;)d[l]=a[i+l];l=-1;for(var h=Array(i+1);++l<i;)h[l]=a[l];return h[i]=s(d),e(r,this,h)}}return i_=n,i_}var s_,o$;function Kbe(){if(o$)return s_;o$=1;function e(t){return function(){return t}}return s_=e,s_}var a_,l$;function t9(){if(l$)return a_;l$=1;var e=dc(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return a_=t,a_}var o_,c$;function Gbe(){if(c$)return o_;c$=1;var e=Kbe(),t=t9(),n=Rd(),r=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return o_=r,o_}var l_,u$;function Ybe(){if(u$)return l_;u$=1;var e=800,t=16,n=Date.now;function r(i){var s=0,a=0;return function(){var l=n(),c=t-(l-a);if(a=l,c>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return l_=r,l_}var c_,d$;function Xbe(){if(d$)return c_;d$=1;var e=Gbe(),t=Ybe(),n=t(e);return c_=n,c_}var u_,f$;function Qbe(){if(f$)return u_;f$=1;var e=Rd(),t=Hbe(),n=Xbe();function r(i,s){return n(t(i,s,e),i+"")}return u_=r,u_}var d_,h$;function Zx(){if(h$)return d_;h$=1;var e=qk(),t=Qp(),n=t2(),r=Wo();function i(s,a,l){if(!r(l))return!1;var c=typeof a;return(c=="number"?t(l)&&n(a,l.length):c=="string"&&a in l)?e(l[a],s):!1}return d_=i,d_}var f_,p$;function Jbe(){if(p$)return f_;p$=1;var e=JW(),t=Vbe(),n=Qbe(),r=Zx(),i=n(function(s,a){if(s==null)return[];var l=a.length;return l>1&&r(s,a[0],a[1])?a=[]:l>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(s,e(a,1),[])});return f_=i,f_}var Zbe=Jbe();const s2=Ot(Zbe);function Oh(e){"@babel/helpers - typeof";return Oh=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},Oh(e)}function XC(){return XC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XC.apply(this,arguments)}function ewe(e,t){return iwe(e)||rwe(e,t)||nwe(e,t)||twe()}function twe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
724In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nwe(e,t){if(e){if(typeof e=="string")return m$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m$(e,t)}}function m$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rwe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function iwe(e){if(Array.isArray(e))return e}function g$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g$(Object(n),!0).forEach(function(r){swe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function swe(e,t,n){return t=awe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function awe(e){var t=owe(e,"string");return Oh(t)=="symbol"?t:t+""}function owe(e,t){if(Oh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lwe(e){return Array.isArray(e)&&zn(e[0])&&zn(e[1])?e.join(" ~ "):e}var cwe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,s=i===void 0?{}:i,a=t.itemStyle,l=a===void 0?{}:a,c=t.labelStyle,d=c===void 0?{}:c,h=t.payload,f=t.formatter,m=t.itemSorter,g=t.wrapperClassName,x=t.labelClassName,v=t.label,b=t.labelFormatter,j=t.accessibilityLayer,w=j===void 0?!1:j,N=function(){if(h&&h.length){var M={padding:0,margin:0},$=(m?s2(h,m):h).map(function(F,W){if(F.type==="none")return null;var q=h_({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},l),K=F.formatter||f||lwe,L=F.value,H=F.name,I=L,V=H;if(K&&I!=null&&V!=null){var G=K(L,H,F,W,h);if(Array.isArray(G)){var z=ewe(G,2);I=z[0],V=z[1]}else I=G}return X.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(W),style:q},zn(V)?X.createElement("span",{className:"recharts-tooltip-item-name"},V):null,zn(V)?X.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,X.createElement("span",{className:"recharts-tooltip-item-value"},I),X.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return X.createElement("ul",{className:"recharts-tooltip-item-list",style:M},$)}return null},k=h_({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),C=h_({margin:0},d),A=!at(v),E=A?v:"",P=ot("recharts-default-tooltip",g),D=ot("recharts-tooltip-label",x);A&&b&&h!==void 0&&h!==null&&(E=b(v,h));var B=w?{role:"status","aria-live":"assertive"}:{};return X.createElement("div",XC({className:P,style:k},B),X.createElement("p",{className:D,style:C},X.isValidElement(E)?E:"".concat(E)),N())};function Mh(e){"@babel/helpers - typeof";return Mh=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},Mh(e)}function Ug(e,t,n){return t=uwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uwe(e){var t=dwe(e,"string");return Mh(t)=="symbol"?t:t+""}function dwe(e,t){if(Mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Df="recharts-tooltip-wrapper",fwe={visibility:"hidden"};function hwe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ot(Df,Ug(Ug(Ug(Ug({},"".concat(Df,"-right"),ke(n)&&t&&ke(t.x)&&n>=t.x),"".concat(Df,"-left"),ke(n)&&t&&ke(t.x)&&n<t.x),"".concat(Df,"-bottom"),ke(r)&&t&&ke(t.y)&&r>=t.y),"".concat(Df,"-top"),ke(r)&&t&&ke(t.y)&&r<t.y))}function y$(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,s=e.position,a=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,d=e.viewBoxDimension;if(s&&ke(s[r]))return s[r];var h=n[r]-l-i,f=n[r]+i;if(t[r])return a[r]?h:f;if(a[r]){var m=h,g=c[r];return m<g?Math.max(f,c[r]):Math.max(h,c[r])}var x=f+l,v=c[r]+d;return x>v?Math.max(h,c[r]):Math.max(f,c[r])}function pwe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function mwe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,a=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,d,h,f;return a.height>0&&a.width>0&&n?(h=y$({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:a.width,viewBox:c,viewBoxDimension:c.width}),f=y$({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:a.height,viewBox:c,viewBoxDimension:c.height}),d=pwe({translateX:h,translateY:f,useTranslate3d:l})):d=fwe,{cssProperties:d,cssClasses:hwe({translateX:h,translateY:f,coordinate:n})}}function Fu(e){"@babel/helpers - typeof";return Fu=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},Fu(e)}function v$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function x$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(n),!0).forEach(function(r){JC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ywe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r9(r.key),r)}}function vwe(e,t,n){return t&&ywe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xwe(e,t,n){return t=iv(t),bwe(e,n9()?Reflect.construct(t,n||[],iv(e).constructor):t.apply(e,n))}function bwe(e,t){if(t&&(Fu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wwe(e)}function wwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n9=function(){return!!e})()}function iv(e){return iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iv(e)}function jwe(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&&QC(e,t)}function QC(e,t){return QC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QC(e,t)}function JC(e,t,n){return t=r9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r9(e){var t=Swe(e,"string");return Fu(t)=="symbol"?t:t+""}function Swe(e,t){if(Fu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var b$=1,_we=(function(e){function t(){var n;gwe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=xwe(this,t,[].concat(i)),JC(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),JC(n,"handleKeyDown",function(a){if(a.key==="Escape"){var l,c,d,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(d=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&d!==void 0?d:0}})}}),n}return jwe(t,e),vwe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>b$||Math.abs(r.height-this.state.lastBoundingBox.height)>b$)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,d=i.children,h=i.coordinate,f=i.hasPayload,m=i.isAnimationActive,g=i.offset,x=i.position,v=i.reverseDirection,b=i.useTranslate3d,j=i.viewBox,w=i.wrapperStyle,N=mwe({allowEscapeViewBox:a,coordinate:h,offsetTopLeft:g,position:x,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:j}),k=N.cssClasses,C=N.cssProperties,A=x$(x$({transition:m&&s?"transform ".concat(l,"ms ").concat(c):void 0},C),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&f?"visible":"hidden",position:"absolute",top:0,left:0},w);return X.createElement("div",{tabIndex:-1,className:k,style:A,ref:function(P){r.wrapperNode=P}},d)}}])})(_.PureComponent),Nwe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ho={isSsr:Nwe()};function Bu(e){"@babel/helpers - typeof";return Bu=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},Bu(e)}function w$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w$(Object(n),!0).forEach(function(r){a2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pwe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s9(r.key),r)}}function Awe(e,t,n){return t&&Pwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kwe(e,t,n){return t=sv(t),Ewe(e,i9()?Reflect.construct(t,n||[],sv(e).constructor):t.apply(e,n))}function Ewe(e,t){if(t&&(Bu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Twe(e)}function Twe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i9=function(){return!!e})()}function sv(e){return sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sv(e)}function Owe(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&&ZC(e,t)}function ZC(e,t){return ZC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZC(e,t)}function a2(e,t,n){return t=s9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s9(e){var t=Mwe(e,"string");return Bu(t)=="symbol"?t:t+""}function Mwe(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Rwe(e){return e.dataKey}function Dwe(e,t){return X.isValidElement(e)?X.cloneElement(e,t):typeof e=="function"?X.createElement(e,t):X.createElement(cwe,t)}var ui=(function(e){function t(){return Cwe(this,t),kwe(this,t,arguments)}return Owe(t,e),Awe(t,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,d=i.content,h=i.coordinate,f=i.filterNull,m=i.isAnimationActive,g=i.offset,x=i.payload,v=i.payloadUniqBy,b=i.position,j=i.reverseDirection,w=i.useTranslate3d,N=i.viewBox,k=i.wrapperStyle,C=x??[];f&&C.length&&(C=YW(x.filter(function(E){return E.value!=null&&(E.hide!==!0||r.props.includeHidden)}),v,Rwe));var A=C.length>0;return X.createElement(_we,{allowEscapeViewBox:a,animationDuration:l,animationEasing:c,isAnimationActive:m,active:s,coordinate:h,hasPayload:A,offset:g,position:b,reverseDirection:j,useTranslate3d:w,viewBox:N,wrapperStyle:k},Dwe(d,j$(j$({},this.props),{},{payload:C})))}}])})(_.PureComponent);a2(ui,"displayName","Tooltip");a2(ui,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ho.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 p_,S$;function Iwe(){if(S$)return p_;S$=1;var e=Ws(),t=function(){return e.Date.now()};return p_=t,p_}var m_,_$;function Lwe(){if(_$)return m_;_$=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return m_=t,m_}var g_,N$;function $we(){if(N$)return g_;N$=1;var e=Lwe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return g_=n,g_}var y_,C$;function a9(){if(C$)return y_;C$=1;var e=$we(),t=Wo(),n=Td(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=t(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var f=s.test(d);return f||a.test(d)?l(d.slice(2),f?2:8):i.test(d)?r:+d}return y_=c,y_}var v_,P$;function Fwe(){if(P$)return v_;P$=1;var e=Wo(),t=Iwe(),n=a9(),r="Expected a function",i=Math.max,s=Math.min;function a(l,c,d){var h,f,m,g,x,v,b=0,j=!1,w=!1,N=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(d)&&(j=!!d.leading,w="maxWait"in d,m=w?i(n(d.maxWait)||0,c):m,N="trailing"in d?!!d.trailing:N);function k($){var F=h,W=f;return h=f=void 0,b=$,g=l.apply(W,F),g}function C($){return b=$,x=setTimeout(P,c),j?k($):g}function A($){var F=$-v,W=$-b,q=c-F;return w?s(q,m-W):q}function E($){var F=$-v,W=$-b;return v===void 0||F>=c||F<0||w&&W>=m}function P(){var $=t();if(E($))return D($);x=setTimeout(P,A($))}function D($){return x=void 0,N&&h?k($):(h=f=void 0,g)}function B(){x!==void 0&&clearTimeout(x),b=0,h=v=f=x=void 0}function O(){return x===void 0?g:D(t())}function M(){var $=t(),F=E($);if(h=arguments,f=this,v=$,F){if(x===void 0)return C(v);if(w)return clearTimeout(x),x=setTimeout(P,c),k(v)}return x===void 0&&(x=setTimeout(P,c)),g}return M.cancel=B,M.flush=O,M}return v_=a,v_}var x_,A$;function Bwe(){if(A$)return x_;A$=1;var e=Fwe(),t=Wo(),n="Expected a function";function r(i,s,a){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(l="leading"in a?!!a.leading:l,c="trailing"in a?!!a.trailing:c),e(i,s,{leading:l,maxWait:s,trailing:c})}return x_=r,x_}var qwe=Bwe();const o9=Ot(qwe);function Rh(e){"@babel/helpers - typeof";return Rh=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},Rh(e)}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){zwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zwe(e,t,n){return t=Uwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uwe(e){var t=Vwe(e,"string");return Rh(t)=="symbol"?t:t+""}function Vwe(e,t){if(Rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wwe(e,t){return Ywe(e)||Gwe(e,t)||Kwe(e,t)||Hwe()}function Hwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
725In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kwe(e,t){if(e){if(typeof e=="string")return E$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E$(e,t)}}function E$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gwe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function Ywe(e){if(Array.isArray(e))return e}var av=_.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=e.width,a=s===void 0?"100%":s,l=e.height,c=l===void 0?"100%":l,d=e.minWidth,h=d===void 0?0:d,f=e.minHeight,m=e.maxHeight,g=e.children,x=e.debounce,v=x===void 0?0:x,b=e.id,j=e.className,w=e.onResize,N=e.style,k=N===void 0?{}:N,C=_.useRef(null),A=_.useRef();A.current=w,_.useImperativeHandle(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),C.current},configurable:!0})});var E=_.useState({containerWidth:i.width,containerHeight:i.height}),P=Wwe(E,2),D=P[0],B=P[1],O=_.useCallback(function($,F){B(function(W){var q=Math.round($),K=Math.round(F);return W.containerWidth===q&&W.containerHeight===K?W:{containerWidth:q,containerHeight:K}})},[]);_.useEffect(function(){var $=function(H){var I,V=H[0].contentRect,G=V.width,z=V.height;O(G,z),(I=A.current)===null||I===void 0||I.call(A,G,z)};v>0&&($=o9($,v,{trailing:!0,leading:!1}));var F=new ResizeObserver($),W=C.current.getBoundingClientRect(),q=W.width,K=W.height;return O(q,K),F.observe(C.current),function(){F.disconnect()}},[O,v]);var M=_.useMemo(function(){var $=D.containerWidth,F=D.containerHeight;if($<0||F<0)return null;ba(Nl(a)||Nl(c),`The width(%s) and height(%s) are both fixed numbers,
726       maybe you don't need to use a ResponsiveContainer.`,a,c),ba(!n||n>0,"The aspect(%s) must be greater than zero.",n);var W=Nl(a)?$:a,q=Nl(c)?F:c;n&&n>0&&(W?q=W/n:q&&(W=q*n),m&&q>m&&(q=m)),ba(W>0||q>0,`The width(%s) and height(%s) of chart should be greater than 0,
727       please check the style of container, or the props width(%s) and height(%s),
728       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
729       height and width.`,W,q,a,c,h,f,n);var K=!Array.isArray(g)&&xa(g.type).endsWith("Chart");return X.Children.map(g,function(L){return X.isValidElement(L)?_.cloneElement(L,Vg({width:W,height:q},K?{style:Vg({height:"100%",width:"100%",maxHeight:q,maxWidth:W},L.props.style)}:{})):L})},[n,g,c,m,f,h,D,a]);return X.createElement("div",{id:b?"".concat(b):void 0,className:ot("recharts-responsive-container",j),style:Vg(Vg({},k),{},{width:a,height:c,minWidth:h,minHeight:f,maxHeight:m}),ref:C},M)}),e0=function(t){return null};e0.displayName="Cell";function Dh(e){"@babel/helpers - typeof";return Dh=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},Dh(e)}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(n),!0).forEach(function(r){Xwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xwe(e,t,n){return t=Qwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qwe(e){var t=Jwe(e,"string");return Dh(t)=="symbol"?t:t+""}function Jwe(e,t){if(Dh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yc={widthCache:{},cacheCount:0},Zwe=2e3,e1e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},O$="recharts_measurement_span";function t1e(e){var t=eP({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var oh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ho.isSsr)return{width:0,height:0};var r=t1e(n),i=JSON.stringify({text:t,copyStyle:r});if(Yc.widthCache[i])return Yc.widthCache[i];try{var s=document.getElementById(O$);s||(s=document.createElement("span"),s.setAttribute("id",O$),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var a=eP(eP({},e1e),r);Object.assign(s.style,a),s.textContent="".concat(t);var l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return Yc.widthCache[i]=c,++Yc.cacheCount>Zwe&&(Yc.cacheCount=0,Yc.widthCache={}),c}catch{return{width:0,height:0}}},n1e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ih(e){"@babel/helpers - typeof";return Ih=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},Ih(e)}function ov(e,t){return a1e(e)||s1e(e,t)||i1e(e,t)||r1e()}function r1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
730In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i1e(e,t){if(e){if(typeof e=="string")return M$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M$(e,t)}}function M$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function a1e(e){if(Array.isArray(e))return e}function o1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R$(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c1e(r.key),r)}}function l1e(e,t,n){return t&&R$(e.prototype,t),n&&R$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c1e(e){var t=u1e(e,"string");return Ih(t)=="symbol"?t:t+""}function u1e(e,t){if(Ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var D$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,I$=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,d1e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,f1e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,l9={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},h1e=Object.keys(l9),eu="NaN";function p1e(e,t){return e*l9[t]}var Wg=(function(){function e(t,n){o1e(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!d1e.test(n)&&(this.num=NaN,this.unit=""),h1e.includes(n)&&(this.num=p1e(t,n),this.unit="px")}return l1e(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.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(n){var r,i=(r=f1e.exec(n))!==null&&r!==void 0?r:[],s=ov(i,3),a=s[1],l=s[2];return new e(parseFloat(a),l??"")}}])})();function c9(e){if(e.includes(eu))return eu;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=D$.exec(t))!==null&&n!==void 0?n:[],i=ov(r,4),s=i[1],a=i[2],l=i[3],c=Wg.parse(s??""),d=Wg.parse(l??""),h=a==="*"?c.multiply(d):c.divide(d);if(h.isNaN())return eu;t=t.replace(D$,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,m=(f=I$.exec(t))!==null&&f!==void 0?f:[],g=ov(m,4),x=g[1],v=g[2],b=g[3],j=Wg.parse(x??""),w=Wg.parse(b??""),N=v==="+"?j.add(w):j.subtract(w);if(N.isNaN())return eu;t=t.replace(I$,N.toString())}return t}var L$=/\(([^()]*)\)/;function m1e(e){for(var t=e;t.includes("(");){var n=L$.exec(t),r=ov(n,2),i=r[1];t=t.replace(L$,c9(i))}return t}function g1e(e){var t=e.replace(/\s+/g,"");return t=m1e(t),t=c9(t),t}function y1e(e){try{return g1e(e)}catch{return eu}}function b_(e){var t=y1e(e.slice(5,-1));return t===eu?"":t}var v1e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],x1e=["dx","dy","angle","className","breakAll"];function tP(){return tP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tP.apply(this,arguments)}function $$(e,t){if(e==null)return{};var n=b1e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function F$(e,t){return _1e(e)||S1e(e,t)||j1e(e,t)||w1e()}
730function w1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
731In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j1e(e,t){if(e){if(typeof e=="string")return B$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B$(e,t)}}function B$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function _1e(e){if(Array.isArray(e))return e}var u9=/[ \f\n\r\t\v\u2028\u2029]+/,d9=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var s=[];at(n)||(r?s=n.toString().split(""):s=n.toString().split(u9));var a=s.map(function(c){return{word:c,width:oh(c,i).width}}),l=r?0:oh(" ",i).width;return{wordsWithComputedWidth:a,spaceWidth:l}}catch{return null}},N1e=function(t,n,r,i,s){var a=t.maxLines,l=t.children,c=t.style,d=t.breakAll,h=ke(a),f=l,m=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return W.reduce(function(q,K){var L=K.word,H=K.width,I=q[q.length-1];if(I&&(i==null||s||I.width+H+r<Number(i)))I.words.push(L),I.width+=H+r;else{var V={words:[L],width:H};q.push(V)}return q},[])},g=m(n),x=function(W){return W.reduce(function(q,K){return q.width>K.width?q:K})};if(!h)return g;for(var v="…",b=function(W){var q=f.slice(0,W),K=d9({breakAll:d,style:c,children:q+v}).wordsWithComputedWidth,L=m(K),H=L.length>a||x(L).width>Number(i);return[H,L]},j=0,w=f.length-1,N=0,k;j<=w&&N<=f.length-1;){var C=Math.floor((j+w)/2),A=C-1,E=b(A),P=F$(E,2),D=P[0],B=P[1],O=b(C),M=F$(O,1),$=M[0];if(!D&&!$&&(j=C+1),D&&$&&(w=C-1),!D&&$){k=B;break}N++}return k||g},q$=function(t){var n=at(t)?[]:t.toString().split(u9);return[{words:n}]},C1e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,a=t.breakAll,l=t.maxLines;if((n||r)&&!Ho.isSsr){var c,d,h=d9({breakAll:a,children:i,style:s});if(h){var f=h.wordsWithComputedWidth,m=h.spaceWidth;c=f,d=m}else return q$(i);return N1e({breakAll:a,children:i,maxLines:l,style:s},c,d,n,r)}return q$(i)},z$="#808080",nc=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,a=t.lineHeight,l=a===void 0?"1em":a,c=t.capHeight,d=c===void 0?"0.71em":c,h=t.scaleToFit,f=h===void 0?!1:h,m=t.textAnchor,g=m===void 0?"start":m,x=t.verticalAnchor,v=x===void 0?"end":x,b=t.fill,j=b===void 0?z$:b,w=$$(t,v1e),N=_.useMemo(function(){return C1e({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:f,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,f,w.style,w.width]),k=w.dx,C=w.dy,A=w.angle,E=w.className,P=w.breakAll,D=$$(w,x1e);if(!zn(r)||!zn(s))return null;var B=r+(ke(k)?k:0),O=s+(ke(C)?C:0),M;switch(v){case"start":M=b_("calc(".concat(d,")"));break;case"middle":M=b_("calc(".concat((N.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:M=b_("calc(".concat(N.length-1," * -").concat(l,")"));break}var $=[];if(f){var F=N[0].width,W=w.width;$.push("scale(".concat((ke(W)?W/F:1)/F,")"))}return A&&$.push("rotate(".concat(A,", ").concat(B,", ").concat(O,")")),$.length&&(D.transform=$.join(" ")),X.createElement("text",tP({},We(D,!0),{x:B,y:O,className:ot("recharts-text",E),textAnchor:g,fill:j.includes("url")?z$:j}),N.map(function(q,K){var L=q.words.join(P?"":" ");return X.createElement("tspan",{x:B,dy:K===0?M:l,key:"".concat(L,"-").concat(K)},L)}))};function Oo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function P1e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function o2(e){let t,n,r;e.length!==2?(t=Oo,n=(l,c)=>Oo(e(l),c),r=(l,c)=>e(l)-c):(t=e===Oo||e===P1e?e:A1e,n=e,r=e);function i(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const f=d+h>>>1;n(l[f],c)<0?d=f+1:h=f}while(d<h)}return d}function s(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const f=d+h>>>1;n(l[f],c)<=0?d=f+1:h=f}while(d<h)}return d}function a(l,c,d=0,h=l.length){const f=i(l,c,d,h-1);return f>d&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:i,center:a,right:s}}function A1e(){return 0}function f9(e){return e===null?NaN:+e}function*k1e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const E1e=o2(Oo),Jp=E1e.right;o2(f9).center;class U$ extends Map{constructor(t,n=M1e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(V$(this,t))}has(t){return super.has(V$(this,t))}set(t,n){return super.set(T1e(this,t),n)}delete(t){return super.delete(O1e(this,t))}}function V$({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function T1e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function O1e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function M1e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function R1e(e=Oo){if(e===Oo)return h9;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function h9(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const D1e=Math.sqrt(50),I1e=Math.sqrt(10),L1e=Math.sqrt(2);function lv(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=D1e?10:s>=I1e?5:s>=L1e?2:1;let l,c,d;return i<0?(d=Math.pow(10,-i)/a,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*a,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=n&&n<2?lv(e,t,n*2):[l,c,d]}function nP(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?lv(t,e,n):lv(e,t,n);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(r)if(a<0)for(let d=0;d<l;++d)c[d]=(s-d)/-a;else for(let d=0;d<l;++d)c[d]=(s-d)*a;else if(a<0)for(let d=0;d<l;++d)c[d]=(i+d)/-a;else for(let d=0;d<l;++d)c[d]=(i+d)*a;return c}function rP(e,t,n){return t=+t,e=+e,n=+n,lv(e,t,n)[2]}function iP(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?rP(t,e,n):rP(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function W$(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function H$(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}
731function p9(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?h9:R1e(i);r>n;){if(r-n>600){const c=r-n+1,d=t-n+1,h=Math.log(c),f=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*f*(c-f)/c)*(d-c/2<0?-1:1),g=Math.max(n,Math.floor(t-d*f/c+m)),x=Math.min(r,Math.floor(t+(c-d)*f/c+m));p9(e,t,g,x,i)}const s=e[t];let a=n,l=r;for(If(e,n,t),i(e[r],s)>0&&If(e,n,r);a<l;){for(If(e,a,l),++a,--l;i(e[a],s)<0;)++a;for(;i(e[l],s)>0;)--l}i(e[n],s)===0?If(e,n,l):(++l,If(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function If(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function $1e(e,t,n){if(e=Float64Array.from(k1e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return H$(e);if(t>=1)return W$(e);var r,i=(r-1)*t,s=Math.floor(i),a=W$(p9(e,s).subarray(0,s+1)),l=H$(e.subarray(s+1));return a+(l-a)*(i-s)}}function F1e(e,t,n=f9){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,s=Math.floor(i),a=+n(e[s],s,e),l=+n(e[s+1],s+1,e);return a+(l-a)*(i-s)}}function B1e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function Wi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fa(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}const sP=Symbol("implicit");function l2(){var e=new U$,t=[],n=[],r=sP;function i(s){let a=e.get(s);if(a===void 0){if(r!==sP)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new U$;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return l2(t,n).unknown(r)},Wi.apply(i,arguments),i}function Lh(){var e=l2().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,l=!1,c=0,d=0,h=.5;delete e.unknown;function f(){var m=t().length,g=i<r,x=g?i:r,v=g?r:i;s=(v-x)/Math.max(1,m-c+d*2),l&&(s=Math.floor(s)),x+=(v-x-s*(m-c))*h,a=s*(1-c),l&&(x=Math.round(x),a=Math.round(a));var b=B1e(m).map(function(j){return x+s*j});return n(g?b.reverse():b)}return e.domain=function(m){return arguments.length?(t(m),f()):t()},e.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,l=!0,f()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(m){return arguments.length?(l=!!m,f()):l},e.padding=function(m){return arguments.length?(c=Math.min(1,d=+m),f()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),f()):c},e.paddingOuter=function(m){return arguments.length?(d=+m,f()):d},e.align=function(m){return arguments.length?(h=Math.max(0,Math.min(1,m)),f()):h},e.copy=function(){return Lh(t(),[r,i]).round(l).paddingInner(c).paddingOuter(d).align(h)},Wi.apply(f(),arguments)}function m9(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return m9(t())},e}function lh(){return m9(Lh.apply(null,arguments).paddingInner(1))}function c2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function g9(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Zp(){}var $h=.7,cv=1/$h,xu="\\s*([+-]?\\d+)\\s*",Fh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q1e=/^#([0-9a-f]{3,8})$/,z1e=new RegExp(`^rgb\\(${xu},${xu},${xu}\\)$`),U1e=new RegExp(`^rgb\\(${Ds},${Ds},${Ds}\\)$`),V1e=new RegExp(`^rgba\\(${xu},${xu},${xu},${Fh}\\)$`),W1e=new RegExp(`^rgba\\(${Ds},${Ds},${Ds},${Fh}\\)$`),H1e=new RegExp(`^hsl\\(${Fh},${Ds},${Ds}\\)$`),K1e=new RegExp(`^hsla\\(${Fh},${Ds},${Ds},${Fh}\\)$`),K$={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};c2(Zp,Bh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:G$,formatHex:G$,formatHex8:G1e,formatHsl:Y1e,formatRgb:Y$,toString:Y$});function G$(){return this.rgb().formatHex()}function G1e(){return this.rgb().formatHex8()}function Y1e(){return y9(this).formatHsl()}function Y$(){return this.rgb().formatRgb()}function Bh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=q1e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?X$(t):n===3?new Hr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Hg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hg(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=z1e.exec(e))?new Hr(t[1],t[2],t[3],1):(t=U1e.exec(e))?new Hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=V1e.exec(e))?Hg(t[1],t[2],t[3],t[4]):(t=W1e.exec(e))?Hg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=H1e.exec(e))?Z$(t[1],t[2]/100,t[3]/100,1):(t=K1e.exec(e))?Z$(t[1],t[2]/100,t[3]/100,t[4]):K$.hasOwnProperty(e)?X$(K$[e]):e==="transparent"?new Hr(NaN,NaN,NaN,0):null}
vendor: 4,677 bytes, line 731
731function X$(e){return new Hr(e>>16&255,e>>8&255,e&255,1)}function Hg(e,t,n,r){return r<=0&&(e=t=n=NaN),new Hr(e,t,n,r)}function X1e(e){return e instanceof Zp||(e=Bh(e)),e?(e=e.rgb(),new Hr(e.r,e.g,e.b,e.opacity)):new Hr}function aP(e,t,n,r){return arguments.length===1?X1e(e):new Hr(e,t,n,r??1)}function Hr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}c2(Hr,aP,g9(Zp,{brighter(e){return e=e==null?cv:Math.pow(cv,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$h:Math.pow($h,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hr(zl(this.r),zl(this.g),zl(this.b),uv(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:Q$,formatHex:Q$,formatHex8:Q1e,formatRgb:J$,toString:J$}));function Q$(){return`#${Cl(this.r)}${Cl(this.g)}${Cl(this.b)}`}function Q1e(){return`#${Cl(this.r)}${Cl(this.g)}${Cl(this.b)}${Cl((isNaN(this.opacity)?1:this.opacity)*255)}`}function J$(){const e=uv(this.opacity);return`${e===1?"rgb(":"rgba("}${zl(this.r)}, ${zl(this.g)}, ${zl(this.b)}${e===1?")":`, ${e})`}`}function uv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cl(e){return e=zl(e),(e<16?"0":"")+e.toString(16)}function Z$(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ls(e,t,n,r)}function y9(e){if(e instanceof ls)return new ls(e.h,e.s,e.l,e.opacity);if(e instanceof Zp||(e=Bh(e)),!e)return new ls;if(e instanceof ls)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,l=s-i,c=(s+i)/2;return l?(t===s?a=(n-r)/l+(n<r)*6:n===s?a=(r-t)/l+2:a=(t-n)/l+4,l/=c<.5?s+i:2-s-i,a*=60):l=c>0&&c<1?0:a,new ls(a,l,c,e.opacity)}function J1e(e,t,n,r){return arguments.length===1?y9(e):new ls(e,t,n,r??1)}function ls(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}c2(ls,J1e,g9(Zp,{brighter(e){return e=e==null?cv:Math.pow(cv,e),new ls(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$h:Math.pow($h,e),new ls(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Hr(w_(e>=240?e-240:e+120,i,r),w_(e,i,r),w_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ls(eF(this.h),Kg(this.s),Kg(this.l),uv(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=uv(this.opacity);return`${e===1?"hsl(":"hsla("}${eF(this.h)}, ${Kg(this.s)*100}%, ${Kg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function eF(e){return e=(e||0)%360,e<0?e+360:e}function Kg(e){return Math.max(0,Math.min(1,e||0))}function w_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const u2=e=>()=>e;function Z1e(e,t){return function(n){return e+n*t}}function eje(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function tje(e){return(e=+e)==1?v9:function(t,n){return n-t?eje(t,n,e):u2(isNaN(t)?n:t)}}function v9(e,t){var n=t-e;return n?Z1e(e,n):u2(isNaN(e)?t:e)}const tF=(function e(t){var n=tje(t);function r(i,s){var a=n((i=aP(i)).r,(s=aP(s)).r),l=n(i.g,s.g),c=n(i.b,s.b),d=v9(i.opacity,s.opacity);return function(h){return i.r=a(h),i.g=l(h),i.b=c(h),i.opacity=d(h),i+""}}return r.gamma=e,r})(1);function nje(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function rje(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ije(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=Dd(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(l){for(a=0;a<r;++a)s[a]=i[a](l);return s}}function sje(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function dv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function aje(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Dd(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var oP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,j_=new RegExp(oP.source,"g");function oje(e){return function(){return e}}function lje(e){return function(t){return e(t)+""}}function cje(e,t){var n=oP.lastIndex=j_.lastIndex=0,r,i,s,a=-1,l=[],c=[];for(e=e+"",t=t+"";(r=oP.exec(e))&&(i=j_.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(r=r[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,c.push({i:a,x:dv(r,i)}
vendor: 4,638 bytes, line 731
731)),n=j_.lastIndex;return n<t.length&&(s=t.slice(n),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?lje(c[0].x):oje(t):(t=c.length,function(d){for(var h=0,f;h<t;++h)l[(f=c[h]).i]=f.x(d);return l.join("")})}function Dd(e,t){var n=typeof t,r;return t==null||n==="boolean"?u2(t):(n==="number"?dv:n==="string"?(r=Bh(t))?(t=r,tF):cje:t instanceof Bh?tF:t instanceof Date?sje:rje(t)?nje:Array.isArray(t)?ije:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?aje:dv)(e,t)}function d2(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function uje(e,t){t===void 0&&(t=e,e=Dd);for(var n=0,r=t.length-1,i=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(i,i=t[++n]);return function(a){var l=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return s[l](a-l)}}function dje(e){return function(){return e}}function fv(e){return+e}var nF=[0,1];function Mr(e){return e}function lP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:dje(isNaN(t)?NaN:.5)}function fje(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function hje(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=lP(i,r),s=n(a,s)):(r=lP(r,i),s=n(s,a)),function(l){return s(r(l))}}function pje(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=lP(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(l){var c=Jp(e,l,1,r)-1;return s[c](i[c](l))}}function em(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function t0(){var e=nF,t=nF,n=Dd,r,i,s,a=Mr,l,c,d;function h(){var m=Math.min(e.length,t.length);return a!==Mr&&(a=fje(e[0],e[m-1])),l=m>2?pje:hje,c=d=null,f}function f(m){return m==null||isNaN(m=+m)?s:(c||(c=l(e.map(r),t,n)))(r(a(m)))}return f.invert=function(m){return a(i((d||(d=l(t,e.map(r),dv)))(m)))},f.domain=function(m){return arguments.length?(e=Array.from(m,fv),h()):e.slice()},f.range=function(m){return arguments.length?(t=Array.from(m),h()):t.slice()},f.rangeRound=function(m){return t=Array.from(m),n=d2,h()},f.clamp=function(m){return arguments.length?(a=m?!0:Mr,h()):a!==Mr},f.interpolate=function(m){return arguments.length?(n=m,h()):n},f.unknown=function(m){return arguments.length?(s=m,f):s},function(m,g){return r=m,i=g,h()}}function f2(){return t0()(Mr,Mr)}function mje(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qu(e){return e=hv(Math.abs(e)),e?e[1]:NaN}function gje(e,t){return function(n,r){for(var i=n.length,s=[],a=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[a=(a+1)%e.length];return s.reverse().join(t)}}function yje(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var vje=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qh(e){if(!(t=vje.exec(e)))throw new Error("invalid format: "+e);var t;return new h2({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]})}qh.prototype=h2.prototype;function h2(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+""}h2.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 xje(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var x9;function bje(e,t){var n=hv(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(x9=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+hv(e,Math.max(0,t+s-1))[0]}function rF(e,t){var n=hv(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const iF={"%":(e,t)=>
vendor: 4,886 bytes, line 731
731(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mje,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)=>rF(e*100,t),r:rF,s:bje,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sF(e){return e}var aF=Array.prototype.map,oF=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wje(e){var t=e.grouping===void 0||e.thousands===void 0?sF:gje(aF.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?sF:yje(aF.call(e.numerals,String)),a=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=qh(f);var m=f.fill,g=f.align,x=f.sign,v=f.symbol,b=f.zero,j=f.width,w=f.comma,N=f.precision,k=f.trim,C=f.type;C==="n"?(w=!0,C="g"):iF[C]||(N===void 0&&(N=12),k=!0,C="g"),(b||m==="0"&&g==="=")&&(b=!0,m="0",g="=");var A=v==="$"?n:v==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",E=v==="$"?r:/[%p]/.test(C)?a:"",P=iF[C],D=/[defgprs%]/.test(C);N=N===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function B(O){var M=A,$=E,F,W,q;if(C==="c")$=P(O)+$,O="";else{O=+O;var K=O<0||1/O<0;if(O=isNaN(O)?c:P(Math.abs(O),N),k&&(O=xje(O)),K&&+O==0&&x!=="+"&&(K=!1),M=(K?x==="("?x:l:x==="-"||x==="("?"":x)+M,$=(C==="s"?oF[8+x9/3]:"")+$+(K&&x==="("?")":""),D){for(F=-1,W=O.length;++F<W;)if(q=O.charCodeAt(F),48>q||q>57){$=(q===46?i+O.slice(F+1):O.slice(F))+$,O=O.slice(0,F);break}}}w&&!b&&(O=t(O,1/0));var L=M.length+O.length+$.length,H=L<j?new Array(j-L+1).join(m):"";switch(w&&b&&(O=t(H+O,H.length?j-$.length:1/0),H=""),g){case"<":O=M+O+$+H;break;case"=":O=M+H+O+$;break;case"^":O=H.slice(0,L=H.length>>1)+M+O+$+H.slice(L);break;default:O=H+M+O+$;break}return s(O)}return B.toString=function(){return f+""},B}function h(f,m){var g=d((f=qh(f),f.type="f",f)),x=Math.max(-8,Math.min(8,Math.floor(qu(m)/3)))*3,v=Math.pow(10,-x),b=oF[8+x/3];return function(j){return g(v*j)+b}}return{format:d,formatPrefix:h}}var Gg,p2,b9;jje({thousands:",",grouping:[3],currency:["$",""]});function jje(e){return Gg=wje(e),p2=Gg.format,b9=Gg.formatPrefix,Gg}function Sje(e){return Math.max(0,-qu(Math.abs(e)))}function _je(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qu(t)/3)))*3-qu(Math.abs(e)))}function Nje(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qu(t)-qu(e))+1}function w9(e,t,n,r){var i=iP(e,t,n),s;switch(r=qh(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=_je(i,a))&&(r.precision=s),b9(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Nje(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Sje(i))&&(r.precision=s-(r.type==="%")*2);break}}return p2(r)}function Ko(e){var t=e.domain;return e.ticks=function(n){var r=t();return nP(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return w9(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],l=r[s],c,d,h=10;for(l<a&&(d=a,a=l,l=d,d=i,i=s,s=d);h-- >0;){if(d=rP(a,l,n),d===c)return r[i]=a,r[s]=l,t(r);if(d>0)a=Math.floor(a/d)*d,l=Math.ceil(l/d)*d;else if(d<0)a=Math.ceil(a*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function pv(){var e=f2();return e.copy=function(){return em(e,pv())},Wi.apply(e,arguments),Ko(e)}function j9(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,fv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return j9(e).unknown(t)},e=arguments.length?Array.from(e,fv):[0,1],Ko(n)}function S9(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function lF(e){return Math.log(e)}function cF(e){return Math.exp(e)}function Cje(e){return-Math.log(-e)}function Pje(e){return-Math.exp(-e)}function Aje(e){return isFinite(e)?+("1e"+e):e<0?0:e}function kje(e){return e===10?Aje:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Eje(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 uF(e){return(t,n)=>-e(-t,n)}function m2(e){const t=e(lF,cF),n=t.domain;let r=10,i,s;function a(){return i=Eje(r),s=kje(r),n()[0]<0?(i=uF(i),s=uF(s),e(Cje,Pje)):e(lF,cF),t}return t.base=function(l){return arguments.length?(r=+l,a()):r},t.domain=function(l){return arguments.length?(n(l),a()):n()},t.ticks=l=>{const c=n();let d=c[0],h=c[c.length-1];const f=h<d;f&&([d,h]=[h,d]);let m=i(d),g=i(h),x,v;const b=l==null?10:+l;let j=[];if(!(r%1)&&g-m<b){if(m=Math.floor(m),g=Math.ceil(g),d>0){for(;m<=g;++m)for(x=1;x<r;
731++x)if(v=m<0?x/s(-m):x*s(m),!(v<d)){if(v>h)break;j.push(v)}}else for(;m<=g;++m)for(x=r-1;x>=1;--x)if(v=m>0?x/s(-m):x*s(m),!(v<d)){if(v>h)break;j.push(v)}j.length*2<b&&(j=nP(d,h,b))}else j=nP(m,g,Math.min(g-m,b)).map(s);return f?j.reverse():j},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=qh(c)).precision==null&&(c.trim=!0),c=p2(c)),l===1/0)return c;const d=Math.max(1,r*l/t.ticks().length);return h=>{let f=h/s(Math.round(i(h)));return f*r<r-.5&&(f*=r),f<=d?c(h):""}},t.nice=()=>n(S9(n(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),t}function _9(){const e=m2(t0()).domain([1,10]);return e.copy=()=>em(e,_9()).base(e.base()),Wi.apply(e,arguments),e}function dF(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function fF(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function g2(e){var t=1,n=e(dF(t),fF(t));return n.constant=function(r){return arguments.length?e(dF(t=+r),fF(t)):t},Ko(n)}function N9(){var e=g2(t0());return e.copy=function(){return em(e,N9()).constant(e.constant())},Wi.apply(e,arguments)}function hF(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Tje(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Oje(e){return e<0?-e*e:e*e}function y2(e){var t=e(Mr,Mr),n=1;function r(){return n===1?e(Mr,Mr):n===.5?e(Tje,Oje):e(hF(n),hF(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ko(t)}function v2(){var e=y2(t0());return e.copy=function(){return em(e,v2()).exponent(e.exponent())},Wi.apply(e,arguments),e}function Mje(){return v2.apply(null,arguments).exponent(.5)}function pF(e){return Math.sign(e)*e*e}function Rje(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function C9(){var e=f2(),t=[0,1],n=!1,r;function i(s){var a=Rje(e(s));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(s){return e.invert(pF(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,fv)).map(pF)),i):t.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return C9(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Wi.apply(i,arguments),Ko(i)}function P9(){var e=[],t=[],n=[],r;function i(){var a=0,l=Math.max(1,t.length);for(n=new Array(l-1);++a<l;)n[a-1]=F1e(e,a/l);return s}function s(a){return a==null||isNaN(a=+a)?r:t[Jp(n,a)]}return s.invertExtent=function(a){var l=t.indexOf(a);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},s.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let l of a)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Oo),i()},s.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},s.unknown=function(a){return arguments.length?(r=a,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return P9().domain(e).range(t).unknown(r)},Wi.apply(s,arguments)}function A9(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(c){return c!=null&&c<=c?i[Jp(r,c,0,n)]:s}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},a.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,l()):i.slice()},a.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},a.unknown=function(c){return arguments.length&&(s=c),a},a.thresholds=function(){return r.slice()},a.copy=function(){return A9().domain([e,t]).range(i).unknown(s)},Wi.apply(Ko(a),arguments)}function k9(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[Jp(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return k9().domain(e).range(t).unknown(n)},Wi.apply(i,arguments)}const S_=new Date,__=new Date;function Wn(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),l=i.ceil(s);return s-a<l-s?a:l},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<a)||!(l>0))return c;let d;do c.push(d=new Date(+s)),t(s,l),e(s);while(d<s&&s<a);return c},i.filter=s=>Wn(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!s(a););else for(;--l>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(S_.setTime(+s),__.setTime(+a),e(S_),e(__),Math.floor(n(S_,__))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const mv=Wn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):mv);mv.range;const pa=1e3,Bi=pa*60,ma=Bi*60,Ea=ma*24,x2=Ea*7,mF=Ea*30,N_=Ea*365,Pl=Wn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getUTCSeconds());Pl.range;const b2=Wn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pa)},(e,t)=>{e.setTime(+e+t*Bi)},(e,t)=>(t-e)/Bi,e=>e.getMinutes());b2.range;const w2=Wn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Bi)},(e,t)=>(t-e)/Bi,e=>e.getUTCMinutes());w2.range;const j2=Wn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pa-e.getMinutes()*Bi)},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getHours());j2.range;const S2=Wn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getUTCHours());S2.range;const tm=Wn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Bi)/Ea,e=>e.getDate()-1);tm.range;const n0=Wn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ea,e=>e.getUTCDate()-1);n0.range;const E9=Wn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ea,e=>Math.floor(e/Ea));E9.range;function hc(e){return Wn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Bi)/x2)}const r0=hc(0),gv=hc(1),Dje=hc(2),Ije=hc(3),zu=hc(4),Lje=hc(5),$je=hc(6);r0.range;gv.range;Dje.range;Ije.range;zu.range;Lje.range;$je.range;function pc(e){return Wn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/x2)}const i0=pc(0),yv=pc(1),Fje=pc(2),Bje=pc(3),Uu=pc(4),qje=pc(5),zje=pc(6);i0.range;yv.range;Fje.range;Bje.range;Uu.range;qje.range;zje.range;const _2=Wn(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());_2.range;const N2=Wn(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());N2.range;const Ta=Wn(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());Ta.every=e=>
vendor: 3,361 bytes, line 731
731!isFinite(e=Math.floor(e))||!(e>0)?null:Wn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ta.range;const Oa=Wn(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());Oa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Oa.range;function T9(e,t,n,r,i,s){const a=[[Pl,1,pa],[Pl,5,5*pa],[Pl,15,15*pa],[Pl,30,30*pa],[s,1,Bi],[s,5,5*Bi],[s,15,15*Bi],[s,30,30*Bi],[i,1,ma],[i,3,3*ma],[i,6,6*ma],[i,12,12*ma],[r,1,Ea],[r,2,2*Ea],[n,1,x2],[t,1,mF],[t,3,3*mF],[e,1,N_]];function l(d,h,f){const m=h<d;m&&([d,h]=[h,d]);const g=f&&typeof f.range=="function"?f:c(d,h,f),x=g?g.range(d,+h+1):[];return m?x.reverse():x}function c(d,h,f){const m=Math.abs(h-d)/f,g=o2(([,,b])=>b).right(a,m);if(g===a.length)return e.every(iP(d/N_,h/N_,f));if(g===0)return mv.every(Math.max(iP(d,h,f),1));const[x,v]=a[m/a[g-1][2]<a[g][2]/m?g-1:g];return x.every(v)}return[l,c]}const[Uje,Vje]=T9(Oa,N2,i0,E9,S2,w2),[Wje,Hje]=T9(Ta,_2,r0,tm,j2,b2);function C_(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 P_(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 Lf(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Kje(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,l=e.months,c=e.shortMonths,d=$f(i),h=Ff(i),f=$f(s),m=Ff(s),g=$f(a),x=Ff(a),v=$f(l),b=Ff(l),j=$f(c),w=Ff(c),N={a:K,A:L,b:H,B:I,c:null,d:wF,e:wF,f:gSe,g:CSe,G:ASe,H:hSe,I:pSe,j:mSe,L:O9,m:ySe,M:vSe,p:V,q:G,Q:_F,s:NF,S:xSe,u:bSe,U:wSe,V:jSe,w:SSe,W:_Se,x:null,X:null,y:NSe,Y:PSe,Z:kSe,"%":SF},k={a:z,A:oe,b:pe,B:ue,c:null,d:jF,e:jF,f:MSe,g:USe,G:WSe,H:ESe,I:TSe,j:OSe,L:R9,m:RSe,M:DSe,p:me,q:Ne,Q:_F,s:NF,S:ISe,u:LSe,U:$Se,V:FSe,w:BSe,W:qSe,x:null,X:null,y:zSe,Y:VSe,Z:HSe,"%":SF},C={a:B,A:O,b:M,B:$,c:F,d:xF,e:xF,f:cSe,g:vF,G:yF,H:bF,I:bF,j:sSe,L:lSe,m:iSe,M:aSe,p:D,q:rSe,Q:dSe,s:fSe,S:oSe,u:Jje,U:Zje,V:eSe,w:Qje,W:tSe,x:W,X:q,y:vF,Y:yF,Z:nSe,"%":uSe};N.x=A(n,N),N.X=A(r,N),N.c=A(t,N),k.x=A(n,k),k.X=A(r,k),k.c=A(t,k);function A(ee,de){return function(be){var ae=[],Ke=-1,Ue=0,jt=ee.length,qe,Rt,nr;for(be instanceof Date||(be=new Date(+be));++Ke<jt;)ee.charCodeAt(Ke)===37&&(ae.push(ee.slice(Ue,Ke)),(Rt=gF[qe=ee.charAt(++Ke)])!=null?qe=ee.charAt(++Ke):Rt=qe==="e"?" ":"0",(nr=de[qe])&&(qe=nr(be,Rt)),ae.push(qe),Ue=Ke+1);return ae.push(ee.slice(Ue,Ke)),ae.join("")}}function E(ee,de){return function(be){var ae=Lf(1900,void 0,1),Ke=P(ae,ee,be+="",0),Ue,jt;if(Ke!=be.length)return null;if("Q"in ae)return new Date(ae.Q);if("s"in ae)return new Date(ae.s*1e3+("L"in ae?ae.L:0));if(de&&!("Z"in ae)&&(ae.Z=0),"p"in ae&&(ae.H=ae.H%12+ae.p*12),ae.m===void 0&&(ae.m="q"in ae?ae.q:0),"V"in ae){if(ae.V<1||ae.V>53)return null;"w"in ae||(ae.w=1),"Z"in ae?(Ue=P_(Lf(ae.y,0,1)),jt=Ue.getUTCDay(),Ue=jt>4||jt===0?yv.ceil(Ue):yv(Ue),Ue=n0.offset(Ue,(ae.V-1)*7),ae.y=Ue.getUTCFullYear(),ae.m=Ue.getUTCMonth(),ae.d=Ue.getUTCDate()+(ae.w+6)%7):(Ue=C_(Lf(
vendor: 6,942 bytes, line 731
731ae.y,0,1)),jt=Ue.getDay(),Ue=jt>4||jt===0?gv.ceil(Ue):gv(Ue),Ue=tm.offset(Ue,(ae.V-1)*7),ae.y=Ue.getFullYear(),ae.m=Ue.getMonth(),ae.d=Ue.getDate()+(ae.w+6)%7)}else("W"in ae||"U"in ae)&&("w"in ae||(ae.w="u"in ae?ae.u%7:"W"in ae?1:0),jt="Z"in ae?P_(Lf(ae.y,0,1)).getUTCDay():C_(Lf(ae.y,0,1)).getDay(),ae.m=0,ae.d="W"in ae?(ae.w+6)%7+ae.W*7-(jt+5)%7:ae.w+ae.U*7-(jt+6)%7);return"Z"in ae?(ae.H+=ae.Z/100|0,ae.M+=ae.Z%100,P_(ae)):C_(ae)}}function P(ee,de,be,ae){for(var Ke=0,Ue=de.length,jt=be.length,qe,Rt;Ke<Ue;){if(ae>=jt)return-1;if(qe=de.charCodeAt(Ke++),qe===37){if(qe=de.charAt(Ke++),Rt=C[qe in gF?de.charAt(Ke++):qe],!Rt||(ae=Rt(ee,be,ae))<0)return-1}else if(qe!=be.charCodeAt(ae++))return-1}return ae}function D(ee,de,be){var ae=d.exec(de.slice(be));return ae?(ee.p=h.get(ae[0].toLowerCase()),be+ae[0].length):-1}function B(ee,de,be){var ae=g.exec(de.slice(be));return ae?(ee.w=x.get(ae[0].toLowerCase()),be+ae[0].length):-1}function O(ee,de,be){var ae=f.exec(de.slice(be));return ae?(ee.w=m.get(ae[0].toLowerCase()),be+ae[0].length):-1}function M(ee,de,be){var ae=j.exec(de.slice(be));return ae?(ee.m=w.get(ae[0].toLowerCase()),be+ae[0].length):-1}function $(ee,de,be){var ae=v.exec(de.slice(be));return ae?(ee.m=b.get(ae[0].toLowerCase()),be+ae[0].length):-1}function F(ee,de,be){return P(ee,t,de,be)}function W(ee,de,be){return P(ee,n,de,be)}function q(ee,de,be){return P(ee,r,de,be)}function K(ee){return a[ee.getDay()]}function L(ee){return s[ee.getDay()]}function H(ee){return c[ee.getMonth()]}function I(ee){return l[ee.getMonth()]}function V(ee){return i[+(ee.getHours()>=12)]}function G(ee){return 1+~~(ee.getMonth()/3)}function z(ee){return a[ee.getUTCDay()]}function oe(ee){return s[ee.getUTCDay()]}function pe(ee){return c[ee.getUTCMonth()]}function ue(ee){return l[ee.getUTCMonth()]}function me(ee){return i[+(ee.getUTCHours()>=12)]}function Ne(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var de=A(ee+="",N);return de.toString=function(){return ee},de},parse:function(ee){var de=E(ee+="",!1);return de.toString=function(){return ee},de},utcFormat:function(ee){var de=A(ee+="",k);return de.toString=function(){return ee},de},utcParse:function(ee){var de=E(ee+="",!0);return de.toString=function(){return ee},de}}}var gF={"-":"",_:" ",0:"0"},tr=/^\s*\d+/,Gje=/^%/,Yje=/[\\^$*+?|[\]().{}]/g;function Tt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function Xje(e){return e.replace(Yje,"\\$&")}function $f(e){return new RegExp("^(?:"+e.map(Xje).join("|")+")","i")}function Ff(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Qje(e,t,n){var r=tr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Jje(e,t,n){var r=tr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Zje(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eSe(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tSe(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function yF(e,t,n){var r=tr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function vF(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nSe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rSe(e,t,n){var r=tr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function iSe(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function xF(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sSe(e,t,n){var r=tr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function bF(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function aSe(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oSe(e,t,n){var r=tr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function lSe(e,t,n){var r=tr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function cSe(e,t,n){var r=tr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uSe(e,t,n){var r=Gje.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dSe(e,t,n){var r=tr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fSe(e,t,n){var r=tr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function wF(e,t){return Tt(e.getDate(),t,2)}function hSe(e,t){return Tt(e.getHours(),t,2)}function pSe(e,t){return Tt(e.getHours()%12||12,t,2)}function mSe(e,t){return Tt(1+tm.count(Ta(e),e),t,3)}function O9(e,t){return Tt(e.getMilliseconds(),t,3)}function gSe(e,t){return O9(e,t)+"000"}function ySe(e,t){return Tt(e.getMonth()+1,t,2)}function vSe(e,t){return Tt(e.getMinutes(),t,2)}function xSe(e,t){return Tt(e.getSeconds(),t,2)}function bSe(e){var t=e.getDay();return t===0?7:t}function wSe(e,t){return Tt(r0.count(Ta(e)-1,e),t,2)}function M9(e){var t=e.getDay();return t>=4||t===0?zu(e):zu.ceil(e)}function jSe(e,t){return e=M9(e),Tt(zu.count(Ta(e),e)+(Ta(e).getDay()===4),t,2)}function SSe(e){return e.getDay()}function _Se(e,t){return Tt(gv.count(Ta(e)-1,e),t,2)}function NSe(e,t){return Tt(e.getFullYear()%100,t,2)}function CSe(e,t){return e=M9(e),Tt(e.getFullYear()%100,t,2)}function PSe(e,t){return Tt(e.getFullYear()%1e4,t,4)}function ASe(e,t){var n=e.getDay();return e=n>=4||n===0?zu(e):zu.ceil(e),Tt(e.getFullYear()%1e4,t,4)}function kSe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tt(t/60|0,"0",2)+Tt(t%60,"0",2)}function jF(e,t){return Tt(e.getUTCDate(),t,2)}function ESe(e,t){return Tt(e.getUTCHours(),t,2)}function TSe(e,t){return Tt(e.getUTCHours()%12||12,t,2)}function OSe(e,t){return Tt(1+n0.count(Oa(e),e),t,3)}function R9(e,t){return Tt(e.getUTCMilliseconds(),t,3)}function MSe(e,t){return R9(e,t)+"000"}function RSe(e,t){return Tt(e.getUTCMonth()+1,t,2)}function DSe(e,t){return Tt(e.getUTCMinutes(),t,2)}function ISe(e,t){return Tt(e.getUTCSeconds(),t,2)}function LSe(e){var t=e.getUTCDay();return t===0?7:t}function $Se(e,t){return Tt(i0.count(Oa(e)-1,e),t,2)}function D9(e){var t=e.getUTCDay();return t>=4||t===0?Uu(e):Uu.ceil(e)}function FSe(e,t){return e=D9(e),Tt(Uu.count(Oa(e),e)+(Oa(e).getUTCDay()===4),t,2)}function BSe(e){return e.getUTCDay()}function qSe(e,t){return Tt(yv.count(Oa(e)-1,e),t,2)}function zSe(e,t){return Tt(e.getUTCFullYear()%100,t,2)}function USe(e,t){return e=D9(e),Tt(e.getUTCFullYear()%100,t,2)}function VSe(e,t){return Tt(e.getUTCFullYear()%1e4,t,4)}function WSe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Uu(e):Uu.ceil(e),Tt(e.getUTCFullYear()%1e4,t,4)}function HSe(){return"+0000"}function SF(){return"%"}function _F(e){return+e}function NF(e){return Math.floor(+e/1e3)}var Xc,I9,L9;KSe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
731ay","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 KSe(e){return Xc=Kje(e),I9=Xc.format,Xc.parse,L9=Xc.utcFormat,Xc.utcParse,Xc}function GSe(e){return new Date(e)}function YSe(e){return e instanceof Date?+e:+new Date(+e)}function C2(e,t,n,r,i,s,a,l,c,d){var h=f2(),f=h.invert,m=h.domain,g=d(".%L"),x=d(":%S"),v=d("%I:%M"),b=d("%I %p"),j=d("%a %d"),w=d("%b %d"),N=d("%B"),k=d("%Y");function C(A){return(c(A)<A?g:l(A)<A?x:a(A)<A?v:s(A)<A?b:r(A)<A?i(A)<A?j:w:n(A)<A?N:k)(A)}return h.invert=function(A){return new Date(f(A))},h.domain=function(A){return arguments.length?m(Array.from(A,YSe)):m().map(GSe)},h.ticks=function(A){var E=m();return e(E[0],E[E.length-1],A??10)},h.tickFormat=function(A,E){return E==null?C:d(E)},h.nice=function(A){var E=m();return(!A||typeof A.range!="function")&&(A=t(E[0],E[E.length-1],A??10)),A?m(S9(E,A)):h},h.copy=function(){return em(h,C2(e,t,n,r,i,s,a,l,c,d))},h}function XSe(){return Wi.apply(C2(Wje,Hje,Ta,_2,r0,tm,j2,b2,Pl,I9).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function QSe(){return Wi.apply(C2(Uje,Vje,Oa,N2,i0,n0,S2,w2,Pl,L9).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function s0(){var e=0,t=1,n,r,i,s,a=Mr,l=!1,c;function d(f){return f==null||isNaN(f=+f)?c:a(i===0?.5:(f=(s(f)-n)*i,l?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,t]=f,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(f){return arguments.length?(l=!!f,d):l},d.interpolator=function(f){return arguments.length?(a=f,d):a};function h(f){return function(m){var g,x;return arguments.length?([g,x]=m,a=f(g,x),d):[a(0),a(1)]}}return d.range=h(Dd),d.rangeRound=h(d2),d.unknown=function(f){return arguments.length?(c=f,d):c},function(f){return s=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),d}}function Go(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function $9(){var e=Ko(s0()(Mr));return e.copy=function(){return Go(e,$9())},Fa.apply(e,arguments)}function F9(){var e=m2(s0()).domain([1,10]);return e.copy=function(){return Go(e,F9()).base(e.base())},Fa.apply(e,arguments)}function B9(){var e=g2(s0());return e.copy=function(){return Go(e,B9()).constant(e.constant())},Fa.apply(e,arguments)}function P2(){var e=y2(s0());return e.copy=function(){return Go(e,P2()).exponent(e.exponent())},Fa.apply(e,arguments)}function JSe(){return P2.apply(null,arguments).exponent(.5)}function q9(){var e=[],t=Mr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Jp(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Oo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>$1e(e,s/r))},n.copy=function(){return q9(t).domain(e)},Fa.apply(n,arguments)}function a0(){var e=0,t=.5,n=1,r=1,i,s,a,l,c,d=Mr,h,f=!1,m;function g(v){return isNaN(v=+v)?m:(v=.5+((v=+h(v))-s)*(r*v<r*s?l:c),d(f?Math.max(0,Math.min(1,v)):v))}g.domain=function(v){return arguments.length?([e,t,n]=v,i=h(e=+e),s=h(t=+t),a=h(n=+n),l=i===s?0:.5/(s-i),c=s===a?0:.5/(a-s),r=s<i?-1:1,g):[e,t,n]},g.clamp=function(v){return arguments.length?(f=!!v,g):f},g.interpolator=function(v){return arguments.length?(d=v,g):d};function x(v){return function(b){var j,w,N;return arguments.length?([j,w,N]=b,d=uje(v,[j,w,N]),g):[d(0),d(.5),d(1)]}}return g.range=x(Dd),g.rangeRound=x(d2),g.unknown=function(v){return arguments.length?(m=v,g):m},function(v){return h=v,i=v(e),s=v(t),a=v(n),l=i===s?0:.5/(s-i),c=s===a?0:.5/(a-s),r=s<i?-1:1,g}}function z9(){var e=Ko(a0()(Mr));return e.copy=function(){return Go(e,z9())},Fa.apply(e,arguments)}function U9(){var e=m2(a0()).domain([.1,1,10]);return e.copy=function(){return Go(e,U9()).base(e.base())},Fa.apply(e,arguments)}function V9(){var e=g2(a0());return e.copy=function(){return Go(e,V9()).constant(e.constant())},Fa.apply(e,arguments)}function A2(){var e=y2(a0());return e.copy=function(){return Go(e,A2()).exponent(e.exponent())},Fa.apply(e,arguments)}function ZSe(){return A2.apply(null,arguments).exponent(.5)}const CF=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Lh,scaleDiverging:z9,scaleDivergingLog:U9,scaleDivergingPow:A2,scaleDivergingSqrt:ZSe,scaleDivergingSymlog:V9,scaleIdentity:j9,scaleImplicit:sP,scaleLinear:pv,scaleLog:_9,scaleOrdinal:l2,scalePoint:lh,scalePow:v2,scaleQuantile:P9,scaleQuantize:A9,scaleRadial:C9,scaleSequential:$9,scaleSequentialLog:F9,scaleSequentialPow:P2,scaleSequentialQuantile:q9,scaleSequentialSqrt:J
vendor: 69,363 bytes, lines 731-758
731Se,scaleSequentialSymlog:B9,scaleSqrt:Mje,scaleSymlog:N9,scaleThreshold:k9,scaleTime:XSe,scaleUtc:QSe,tickFormat:w9},Symbol.toStringTag,{value:"Module"}));var A_,PF;function o0(){if(PF)return A_;PF=1;var e=Td();function t(n,r,i){for(var s=-1,a=n.length;++s<a;){var l=n[s],c=r(l);if(c!=null&&(d===void 0?c===c&&!e(c):i(c,d)))var d=c,h=l}return h}return A_=t,A_}var k_,AF;function W9(){if(AF)return k_;AF=1;function e(t,n){return t>n}return k_=e,k_}var E_,kF;function e_e(){if(kF)return E_;kF=1;var e=o0(),t=W9(),n=Rd();function r(i){return i&&i.length?e(i,n,t):void 0}return E_=r,E_}var t_e=e_e();const Co=Ot(t_e);var T_,EF;function H9(){if(EF)return T_;EF=1;function e(t,n){return t<n}return T_=e,T_}var O_,TF;function n_e(){if(TF)return O_;TF=1;var e=o0(),t=H9(),n=Rd();function r(i){return i&&i.length?e(i,n,t):void 0}return O_=r,O_}var r_e=n_e();const l0=Ot(r_e);var M_,OF;function i_e(){if(OF)return M_;OF=1;var e=Vk(),t=Hs(),n=e9(),r=ti();function i(s,a){var l=r(s)?e:n;return l(s,t(a,3))}return M_=i,M_}var R_,MF;function s_e(){if(MF)return R_;MF=1;var e=JW(),t=i_e();function n(r,i){return e(t(r,i),1)}return R_=n,R_}var a_e=s_e();const o_e=Ot(a_e);var D_,RF;function l_e(){if(RF)return D_;RF=1;var e=r2();function t(n,r){return e(n,r)}return D_=t,D_}var c_e=l_e();const rc=Ot(c_e);var Id=1e9,u_e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},E2,cn=!0,Vi="[DecimalError] ",Ul=Vi+"Invalid argument: ",k2=Vi+"Exponent out of range: ",Ld=Math.floor,xl=Math.pow,d_e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fi,Jn=1e7,sn=7,K9=9007199254740991,vv=Ld(K9/sn),Ie={};Ie.absoluteValue=Ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ie.comparedTo=Ie.cmp=function(e){var t,n,r,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(r=s.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};Ie.decimalPlaces=Ie.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*sn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ie.dividedBy=Ie.div=function(e){return wa(this,new this.constructor(e))};Ie.dividedToIntegerBy=Ie.idiv=function(e){var t=this,n=t.constructor;return Ht(wa(t,new n(e),0,1),n.precision)};Ie.equals=Ie.eq=function(e){return!this.cmp(e)};Ie.exponent=function(){return Tn(this)};Ie.greaterThan=Ie.gt=function(e){return this.cmp(e)>0};Ie.greaterThanOrEqualTo=Ie.gte=function(e){return this.cmp(e)>=0};Ie.isInteger=Ie.isint=function(){return this.e>this.d.length-2};Ie.isNegative=Ie.isneg=function(){return this.s<0};Ie.isPositive=Ie.ispos=function(){return this.s>0};Ie.isZero=function(){return this.s===0};Ie.lessThan=Ie.lt=function(e){return this.cmp(e)<0};Ie.lessThanOrEqualTo=Ie.lte=function(e){return this.cmp(e)<1};Ie.logarithm=Ie.log=function(e){var t,n=this,r=n.constructor,i=r.precision,s=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fi))throw Error(Vi+"NaN");if(n.s<1)throw Error(Vi+(n.s?"NaN":"-Infinity"));return n.eq(fi)?new r(0):(cn=!1,t=wa(zh(n,s),zh(e,s),s),cn=!0,Ht(t,i))};Ie.minus=Ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?X9(t,e):G9(t,(e.s=-e.s,e))};Ie.modulo=Ie.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Vi+"NaN");return n.s?(cn=!1,t=wa(n,e,0,1).times(e),cn=!0,n.minus(t)):Ht(new r(n),i)};Ie.naturalExponential=Ie.exp=function(){return Y9(this)};Ie.naturalLogarithm=Ie.ln=function(){return zh(this)};Ie.negated=Ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ie.plus=Ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?G9(t,e):X9(t,(e.s=-e.s,e))};Ie.precision=Ie.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ul+e);if(t=Tn(i)+1,r=i.d.length-1,n=r*sn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Ie.squareRoot=Ie.sqrt=function(){var e,t,n,r,i,s,a,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Vi+"NaN")}for(e=Tn(l),cn=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Ts(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ld((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=a=n+3;;)if(s=r,r=s.plus(wa(l,s,a+2)).times(.5),Ts(s.d).slice(0,a)===(t=Ts(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Ht(s,n+1,0),s.times(s).eq(l)){r=s;break}}else if(t!="9999")break;a+=4}return cn=!0,Ht(r,n)};Ie.times=Ie.mul=function(e){var t,n,r,i,s,a,l,c,d,h=this,f=h.constructor,m=h.d,g=(e=new f(e)).d;if(!h.s||!e.s)return new f(0);for(e.s*=h.s,n=h.e+e.e,c=m.length,d=g.length,c<d&&(s=m,m=g,g=s,a=c,c=d,d=a),s=[],a=c+d,r=a;r--;)s.push(0);for(r=d;--r>=0;){for(t=0,i=c+r;i>r;)l=s[i]+g[r]*m[i-r-1]+t,s[i--]=l%Jn|0,t=l/Jn|0;s[i]=(s[i]+t)%Jn|0}for(;!s[--a];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,cn?Ht(e,f.precision):e};Ie.toDecimalPlaces=Ie.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Us(e,0,Id),t===void 0?t=r.rounding:Us(t,0,8),Ht(n,e+Tn(n)+1,t))};Ie.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ic(r,!0):(Us(e,0,Id),t===void 0?t=i.rounding:Us(t,0,8),r=Ht(new i(r),e+1,t),n=ic(r,!0,e+1)),n};Ie.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?ic(i):(Us(e,0,Id),t===void 0?t=s.rounding:Us(t,0,8),r=Ht(new s(i),e+Tn(i)+1,t),n=ic(r.abs(),!1,e+Tn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ie.toInteger=Ie.toint=function(){var e=this,t=e.constructor;return Ht(new t(e),Tn(e)+1,t.rounding)};Ie.toNumber=function(){return+this};Ie.toPower=Ie.pow=function(e){var t,n,r,i,s,a,l=this,c=l.constructor,d=12,h=+(e=new c(e));if(!e.s)return new c(fi);if(l=new c(l),!l.s){if(e.s<1)throw Error(Vi+"Infinity");return l}if(l.eq(fi))return l;if(r=c.precision,e.eq(fi))return Ht(l,r);if(t=e.e,n=e.d.length-1,a=t>=n,s=l.s,a){if((n=h<0?-h:h)<=K9){for(i=new c(fi),t=Math.ceil(r/sn+4),cn=!1;n%2&&(i=i.times(l),IF(i.d,t)),n=Ld(n/2),n!==0;)l=l.times(l),IF(l.d,t);return cn=!0,e.s<0?new c(fi).div(i):Ht(i,r)}}else if(s<0)throw Error(Vi+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,cn=!1,i=e.times(zh(l,r+d)),cn=!0,i=Y9(i),i.s=s,i};Ie.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Tn(i),r=ic(i,n<=s.toExpNeg||n>=s.toExpPos)):(Us(e,1,Id),t===void 0?t=s.rounding:Us(t,0,8),i=Ht(new s(i),e,t),n=Tn(i),r=ic(i,e<=n||n<=s.toExpNeg,e)),r};Ie.toSignificantDigits=Ie.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Us(e,1,Id),t===void 0?t=r.rounding:Us(t,0,8)),Ht(new r(n),e,t)};Ie.toString=Ie.valueOf=Ie.val=Ie.toJSON=Ie[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Tn(e),n=e.constructor;return ic(e,t<=n.toExpNeg||t>=n.toExpPos)};function G9(e,t){var n,r,i,s,a,l,c,d,h=e.constructor,f=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),cn?Ht(t,f):t;if(c=e.d,d=t.d,a=e.e,i=t.e,c=c.slice(),s=a-i,s){for(s<0?(r=c,s=-s,l=d.length):(r=d,i=a,l=c.length),a=Math.ceil(f/sn),l=a>l?a+1:l+1,s>l&&(s=l,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(l=c.length,s=d.length,l-s<0&&(s=l,r=d,d=c,c=r),n=0;s;)n=(c[--s]=c[s]+d[s]+n)/Jn|0,c[s]%=Jn;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,cn?Ht(t,f):t}function Us(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Ul+e)}function Ts(e){var t,n,r,i=e.length-1,s="",a=e[0];if(i>0){for(s+=a,t=1;t<i;t++)r=e[t]+"",n=sn-r.length,n&&(s+=po(n)),s+=r;a=e[t],r=a+"",n=sn-r.length,n&&(s+=po(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}var wa=(function(){function e(r,i){var s,a=0,l=r.length;for(r=r.slice();l--;)s=r[l]*i+a,r[l]=s%Jn|0,a=s/Jn|0;return a&&r.unshift(a),r}function t(r,i,s,a){var l,c;if(s!=a)c=s>a?1:-1;else for(l=c=0;l<s;l++)if(r[l]!=i[l]){c=r[l]>i[l]?1:-1;break}return c}function n(r,i,s){for(var a=0;s--;)r[s]-=a,a=r[s]<i[s]?1:0,r[s]=a*Jn+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,a){var l,c,d,h,f,m,g,x,v,b,j,w,N,k,C,A,E,P,D=r.constructor,B=r.s==i.s?1:-1,O=r.d,M=i.d;if(!r.s)return new D(r);if(!i.s)throw Error(Vi+"Division by zero");for(c=r.e-i.e,E=M.length,C=O.length,g=new D(B),x=g.d=[],d=0;M[d]==(O[d]||0);)++d;if(M[d]>(O[d]||0)&&--c,s==null?w=s=D.precision:a?w=s+(Tn(r)-Tn(i))+1:w=s,w<0)return new D(0);if(w=w/sn+2|0,d=0,E==1)for(h=0,M=M[0],w++;(d<C||h)&&w--;d++)N=h*Jn+(O[d]||0),x[d]=N/M|0,h=N%M|0;else{for(h=Jn/(M[0]+1)|0,h>1&&(M=e(M,h),O=e(O,h),E=M.length,C=O.length),k=E,v=O.slice(0,E),b=v.length;b<E;)v[b++]=0;P=M.slice(),P.unshift(0),A=M[0],M[1]>=Jn/2&&++A;do h=0,l=t(M,v,E,b),l<0?(j=v[0],E!=b&&(j=j*Jn+(v[1]||0)),h=j/A|0,h>1?(h>=Jn&&(h=Jn-1),f=e(M,h),m=f.length,b=v.length,l=t(f,v,m,b),l==1&&(h--,n(f,E<m?P:M,m))):(h==0&&(l=h=1),f=M.slice()),m=f.length,m<b&&f.unshift(0),n(v,f,b),l==-1&&(b=v.length,l=t(M,v,E,b),l<1&&(h++,n(v,E<b?P:M,b))),b=v.length):l===0&&(h++,v=[0]),x[d++]=h,l&&v[0]?v[b++]=O[k]||0:(v=[O[k]],b=1);while((k++<C||v[0]!==void 0)&&w--)}return x[0]||x.shift(),g.e=c,Ht(g,a?s+Tn(g)+1:s)}})();function Y9(e,t){var n,r,i,s,a,l,c=0,d=0,h=e.constructor,f=h.precision;if(Tn(e)>16)throw Error(k2+Tn(e));if(!e.s)return new h(fi);for(cn=!1,l=f,a=new h(.03125);e.abs().gte(.1);)e=e.times(a),d+=5;for(r=Math.log(xl(2,d))/Math.LN10*2+5|0,l+=r,n=i=s=new h(fi),h.precision=l;;){if(i=Ht(i.times(e),l),n=n.times(++c),a=s.plus(wa(i,n,l)),Ts(a.d).slice(0,l)===Ts(s.d).slice(0,l)){for(;d--;)s=Ht(s.times(s),l);return h.precision=f,t==null?(cn=!0,Ht(s,f)):s}s=a}}function Tn(e){for(var t=e.e*sn,n=e.d[0];n>=10;n/=10)t++;return t}function I_(e,t,n){if(t>e.LN10.sd())throw cn=!0,n&&(e.precision=n),Error(Vi+"LN10 precision limit exceeded");return Ht(new e(e.LN10),t)}function po(e){for(var t="";e--;)t+="0";return t}function zh(e,t){var n,r,i,s,a,l,c,d,h,f=1,m=10,g=e,x=g.d,v=g.constructor,b=v.precision;if(g.s<1)throw Error(Vi+(g.s?"NaN":"-Infinity"));if(g.eq(fi))return new v(0);if(t==null?(cn=!1,d=b):d=t,g.eq(10))return t==null&&(cn=!0),I_(v,d);if(d+=m,v.precision=d,n=Ts(x),r=n.charAt(0),s=Tn(g),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=Ts(g.d),r=n.charAt(0),f++;s=Tn(g),r>1?(g=new v("0."+n),s++):g=new v(r+"."+n.slice(1))}else return c=I_(v,d+2,b).times(s+""),g=zh(new v(r+"."+n.slice(1)),d-m).plus(c),v.precision=b,t==null?(cn=!0,Ht(g,b)):g;for(l=a=g=wa(g.minus(fi),g.plus(fi),d),h=Ht(g.times(g),d),i=3;;){if(a=Ht(a.times(h),d),c=l.plus(wa(a,new v(i),d)),Ts(c.d).slice(0,d)===Ts(l.d).slice(0,d))return l=l.times(2),s!==0&&(l=l.plus(I_(v,d+2,b).times(s+""))),l=wa(l,new v(f),d),v.precision=b,t==null?(cn=!0,Ht(l,b)):l;l=c,i+=2}}function DF(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Ld(n/sn),e.d=[],r=(n+1)%sn,n<0&&(r+=sn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=sn;r<i;)e.d.push(+t.slice(r,r+=sn));t=t.slice(r),r=sn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),cn&&(e.e>vv||e.e<-vv))throw Error(k2+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ht(e,t,n){var r,i,s,a,l,c,d,h,f=e.d;for(a=1,s=f[0];s>=10;s/=10)a++;if(r=t-a,r<0)r+=sn,i=t,d=f[h=0];else{if(h=Math.ceil((r+1)/sn),s=f.length,h>=s)return e;for(d=s=f[h],a=1;s>=10;s/=10)a++;r%=sn,i=r-sn+a}if(n!==void 0&&(s=xl(10,a-i-1),l=d/s%10|0,c=t<0||f[h+1]!==void 0||d%s,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?d/xl(10,a-i):0:f[h-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(s=Tn(e),f.length=1,t=t-s-1,f[0]=xl(10,(sn-t%sn)%sn),e.e=Ld(-t/sn)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=h,s=1,h--):(f.length=h+1,s=xl(10,sn-r),f[h]=i>0?(d/xl(10,a-i)%xl(10,i)|0)*s:0),c)for(;;)if(h==0){(f[0]+=s)==Jn&&(f[0]=1,++e.e);break}else{if(f[h]+=s,f[h]!=Jn)break;f[h--]=0,s=1}for(r=f.length;f[--r]===0;)f.pop();if(cn&&(e.e>vv||e.e<-vv))throw Error(k2+Tn(e));return e}function X9(e,t){var n,r,i,s,a,l,c,d,h,f,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),cn?Ht(t,g):t;if(c=e.d,f=t.d,r=t.e,d=e.e,c=c.slice(),a=d-r,a){for(h=a<0,h?(n=c,a=-a,l=f.length):(n=f,r=d,l=c.length),i=Math.max(Math.ceil(g/sn),l)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=f.length,h=i<l,h&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){h=c[i]<f[i];break}a=0}for(h&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>a;){if(c[--i]<f[i]){for(s=i;s&&c[--s]===0;)c[s]=Jn-1;--c[s],c[i]+=Jn}c[i]-=f[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,cn?Ht(t,g):t):new m(0)}function ic(e,t,n){var r,i=Tn(e),s=Ts(e.d),a=s.length;return t?(n&&(r=n-a)>0?s=s.charAt(0)+"."+s.slice(1)+po(r):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+po(-i-1)+s,n&&(r=n-a)>0&&(s+=po(r))):i>=a?(s+=po(i+1-a),n&&(r=n-i-1)>0&&(s=s+"."+po(r))):((r=i+1)<a&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(s+="."),s+=po(r))),e.s<0?"-"+s:s}function IF(e,t){if(e.length>t)return e.length=t,!0}function Q9(e){var t,n,r;function i(s){var a=this;if(!(a instanceof i))return new i(s);if(a.constructor=i,s instanceof i){a.s=s.s,a.e=s.e,a.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(Ul+s);if(s>0)a.s=1;else if(s<0)s=-s,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(s===~~s&&s<1e7){a.e=0,a.d=[s];return}return DF(a,s.toString())}else if(typeof s!="string")throw Error(Ul+s);if(s.charCodeAt(0)===45?(s=s.slice(1),a.s=-1):a.s=1,d_e.test(s))DF(a,s);else throw Error(Ul+s)}if(i.prototype=Ie,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Q9,i.config=i.set=f_e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function f_e(e){if(!e||typeof e!="object")throw Error(Vi+"Object expected");var t,n,r,i=["precision",1,Id,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Ld(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Ul+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ul+n+": "+r);return this}var E2=Q9(u_e);fi=new E2(1);const Ut=E2;function h_e(e){return y_e(e)||g_e(e)||m_e(e)||p_e()}function p_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
732In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m_e(e,t){if(e){if(typeof e=="string")return cP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cP(e,t)}}function g_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function y_e(e){if(Array.isArray(e))return cP(e)}function cP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v_e=function(t){return t},J9={},Z9=function(t){return t===J9},LF=function(t){return function n(){return arguments.length===0||arguments.length===1&&Z9(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},x_e=function e(t,n){return t===1?n:LF(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var a=i.filter(function(l){return l!==J9}).length;return a>=t?n.apply(void 0,i):e(t-a,LF(function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var h=i.map(function(f){return Z9(f)?c.shift():f});return n.apply(void 0,h_e(h).concat(c))}))})},c0=function(t){return x_e(t.length,t)},uP=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},b_e=c0(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),w_e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return v_e;var i=n.reverse(),s=i[0],a=i.slice(1);return function(){return a.reduce(function(l,c){return c(l)},s.apply(void 0,arguments))}},dP=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},eH=function(t){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return n&&s.every(function(l,c){return l===n[c]})||(n=s,r=t.apply(void 0,s)),r}};function j_e(e){var t;return e===0?t=1:t=Math.floor(new Ut(e).abs().log(10).toNumber())+1,t}function S_e(e,t,n){for(var r=new Ut(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var __e=c0(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),N_e=c0(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),C_e=c0(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const u0={rangeStep:S_e,getDigitCount:j_e,interpolateNumber:__e,uninterpolateNumber:N_e,uninterpolateTruncation:C_e};function fP(e){return k_e(e)||A_e(e)||tH(e)||P_e()}function P_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
733In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function k_e(e){if(Array.isArray(e))return hP(e)}function Uh(e,t){return O_e(e)||T_e(e,t)||tH(e,t)||E_e()}function E_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
734In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tH(e,t){if(e){if(typeof e=="string")return hP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hP(e,t)}}function hP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,s=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}return n}}function O_e(e){if(Array.isArray(e))return e}function nH(e){var t=Uh(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function rH(e,t,n){if(e.lte(0))return new Ut(0);var r=u0.getDigitCount(e.toNumber()),i=new Ut(10).pow(r),s=e.div(i),a=r!==1?.05:.1,l=new Ut(Math.ceil(s.div(a).toNumber())).add(n).mul(a),c=l.mul(i);return t?c:new Ut(Math.ceil(c))}function M_e(e,t,n){var r=1,i=new Ut(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new Ut(10).pow(u0.getDigitCount(e)-1),i=new Ut(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new Ut(Math.floor(e)))}else e===0?i=new Ut(Math.floor((t-1)/2)):n||(i=new Ut(Math.floor(e)));var a=Math.floor((t-1)/2),l=w_e(b_e(function(c){return i.add(new Ut(c-a).mul(r)).toNumber()}),uP);return l(0,t)}function iH(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ut(0),tickMin:new Ut(0),tickMax:new Ut(0)};var s=rH(new Ut(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Ut(0):(a=new Ut(e).add(t).div(2),a=a.sub(new Ut(a).mod(s)));var l=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new Ut(t).sub(a).div(s).toNumber()),d=l+c+1;return d>n?iH(e,t,n,r,i+1):(d<n&&(c=t>0?c+(n-d):c,l=t>0?l:l+(n-d)),{step:s,tickMin:a.sub(new Ut(l).mul(s)),tickMax:a.add(new Ut(c).mul(s))})}function R_e(e){var t=Uh(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),l=nH([n,r]),c=Uh(l,2),d=c[0],h=c[1];if(d===-1/0||h===1/0){var f=h===1/0?[d].concat(fP(uP(0,i-1).map(function(){return 1/0}))):[].concat(fP(uP(0,i-1).map(function(){return-1/0})),[h]);return n>r?dP(f):f}if(d===h)return M_e(d,i,s);var m=iH(d,h,a,s),g=m.step,x=m.tickMin,v=m.tickMax,b=u0.rangeStep(x,v.add(new Ut(.1).mul(g)),g);return n>r?dP(b):b}function D_e(e,t){var n=Uh(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=nH([r,i]),l=Uh(a,2),c=l[0],d=l[1];if(c===-1/0||d===1/0)return[r,i];if(c===d)return[c];var h=Math.max(t,2),f=rH(new Ut(d).sub(c).div(h-1),s,0),m=[].concat(fP(u0.rangeStep(new Ut(c),new Ut(d).sub(new Ut(.99).mul(f)),f)),[d]);return r>i?dP(m):m}var I_e=eH(R_e),L_e=eH(D_e),$_e="Invariant failed";function sc(e,t){throw new Error($_e)}var F_e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Vu(e){"@babel/helpers - typeof";return Vu=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},Vu(e)}function xv(){return xv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xv.apply(this,arguments)}function B_e(e,t){return V_e(e)||U_e(e,t)||z_e(e,t)||q_e()}function q_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
735In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z_e(e,t){if(e){if(typeof e=="string")return $F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $F(e,t)}}function $F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function V_e(e){if(Array.isArray(e))return e}function W_e(e,t){if(e==null)return{};var n=H_e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oH(r.key),r)}}function Y_e(e,t,n){return t&&G_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X_e(e,t,n){return t=bv(t),Q_e(e,sH()?Reflect.construct(t,n||[],bv(e).constructor):t.apply(e,n))}function Q_e(e,t){if(t&&(Vu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J_e(e)}function J_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sH=function(){return!!e})()}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function Z_e(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(r,i){return r.__proto__=i,r},pP(e,t)}function aH(e,t,n){return t=oH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oH(e){var t=eNe(e,"string");return Vu(t)=="symbol"?t:t+""}function eNe(e,t){if(Vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nm=(function(e){function t(){return K_e(this,t),X_e(this,t,arguments)}return Z_e(t,e),Y_e(t,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,a=r.width,l=r.dataKey,c=r.data,d=r.dataPointFormatter,h=r.xAxis,f=r.yAxis,m=W_e(r,F_e),g=We(m,!1);this.props.direction==="x"&&h.type!=="number"&&sc();var x=c.map(function(v){var b=d(v,l),j=b.x,w=b.y,N=b.value,k=b.errorVal;if(!k)return null;var C=[],A,E;if(Array.isArray(k)){var P=B_e(k,2);A=P[0],E=P[1]}else A=E=k;if(s==="vertical"){var D=h.scale,B=w+i,O=B+a,M=B-a,$=D(N-A),F=D(N+E);C.push({x1:F,y1:O,x2:F,y2:M}),C.push({x1:$,y1:B,x2:F,y2:B}),C.push({x1:$,y1:O,x2:$,y2:M})}else if(s==="horizontal"){var W=f.scale,q=j+i,K=q-a,L=q+a,H=W(N-A),I=W(N+E);C.push({x1:K,y1:I,x2:L,y2:I}),C.push({x1:q,y1:H,x2:q,y2:I}),C.push({x1:K,y1:H,x2:L,y2:H})}return X.createElement(_t,xv({className:"recharts-errorBar",key:"bar-".concat(C.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},g),C.map(function(V){return X.createElement("line",xv({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return X.createElement(_t,{className:"recharts-errorBars"},x)}}])})(X.Component);aH(nm,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});aH(nm,"displayName","ErrorBar");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 FF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FF(Object(n),!0).forEach(function(r){tNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tNe(e,t,n){return t=nNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nNe(e){var t=rNe(e,"string");return Vh(t)=="symbol"?t:t+""}function rNe(e,t){if(Vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lH=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,a=ci(n,ql);if(!a)return null;var l=ql.defaultProps,c=l!==void 0?fl(fl({},l),a.props):{},d;return a.props&&a.props.payload?d=a.props&&a.props.payload:s==="children"?d=(r||[]).reduce(function(h,f){var m=f.item,g=f.props,x=g.sectors||g.data||[];return h.concat(x.map(function(v){return{type:a.props.iconType||m.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):d=(r||[]).map(function(h){var f=h.item,m=f.type.defaultProps,g=m!==void 0?fl(fl({},m),f.props):{},x=g.dataKey,v=g.name,b=g.legendType,j=g.hide;return{inactive:j,dataKey:x,type:c.iconType||b||"square",color:T2(f),value:v||x,payload:g}}),fl(fl(fl({},c),ql.getWithHeight(a,i)),{},{payload:d,item:a})};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)}function BF(e){return oNe(e)||aNe(e)||sNe(e)||iNe()}function iNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
736In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sNe(e,t){if(e){if(typeof e=="string")return mP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mP(e,t)}}function aNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oNe(e){if(Array.isArray(e))return mP(e)}function mP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qF(Object(n),!0).forEach(function(r){bu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bu(e,t,n){return t=lNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lNe(e){var t=cNe(e,"string");return Wh(t)=="symbol"?t:t+""}function cNe(e,t){if(Wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(e,t,n){return at(e)||at(t)?n:zn(t)?mi(e,t,n):rt(t)?t(e):n}function ch(e,t,n,r){var i=o_e(e,function(l){return Sn(l,t)});if(n==="number"){var s=i.filter(function(l){return ke(l)||parseFloat(l)});return s.length?[l0(s),Co(s)]:[1/0,-1/0]}var a=r?i.filter(function(l){return!at(l)}):i;return a.map(function(l){return zn(l)||l instanceof Date?l:""})}var uNe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,a=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var c=s.range,d=0;d<l;d++){var h=d>0?i[d-1].coordinate:i[l-1].coordinate,f=i[d].coordinate,m=d>=l-1?i[0].coordinate:i[d+1].coordinate,g=void 0;if(Tr(f-h)!==Tr(m-f)){var x=[];if(Tr(m-f)===Tr(c[1]-c[0])){g=m;var v=f+c[1]-c[0];x[0]=Math.min(v,(v+h)/2),x[1]=Math.max(v,(v+h)/2)}else{g=h;var b=m+c[1]-c[0];x[0]=Math.min(f,(b+f)/2),x[1]=Math.max(f,(b+f)/2)}var j=[Math.min(f,(g+f)/2),Math.max(f,(g+f)/2)];if(t>j[0]&&t<=j[1]||t>=x[0]&&t<=x[1]){a=i[d].index;break}}else{var w=Math.min(h,m),N=Math.max(h,m);if(t>(w+f)/2&&t<=(N+f)/2){a=i[d].index;break}}}else for(var k=0;k<l;k++)if(k===0&&t<=(r[k].coordinate+r[k+1].coordinate)/2||k>0&&k<l-1&&t>(r[k].coordinate+r[k-1].coordinate)/2&&t<=(r[k].coordinate+r[k+1].coordinate)/2||k===l-1&&t>(r[k].coordinate+r[k-1].coordinate)/2){a=r[k].index;break}return a},T2=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?yn(yn({},t.type.defaultProps),t.props):t.props,a=s.stroke,l=s.fill,c;switch(i){case"Line":c=a;break;case"Area":case"Radar":c=a&&a!=="none"?a:l;break;default:c=l;break}return c},dNe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var a={},l=Object.keys(s),c=0,d=l.length;c<d;c++)for(var h=s[l[c]].stackGroups,f=Object.keys(h),m=0,g=f.length;m<g;m++){var x=h[f[m]],v=x.items,b=x.cateAxisId,j=v.filter(function(E){return xa(E.type).indexOf("Bar")>=0});if(j&&j.length){var w=j[0].type.defaultProps,N=w!==void 0?yn(yn({},w),j[0].props):j[0].props,k=N.barSize,C=N[b];a[C]||(a[C]=[]);var A=at(k)?n:k;a[C].push({item:j[0],stackList:j.slice(1),barSize:at(A)?void 0:Or(A,r,0)})}}return a},fNe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,a=s===void 0?[]:s,l=t.maxBarSize,c=a.length;if(c<1)return null;var d=Or(n,i,0,!0),h,f=[];if(a[0].barSize===+a[0].barSize){var m=!1,g=i/c,x=a.reduce(function(k,C){return k+C.barSize||0},0);x+=(c-1)*d,x>=i&&(x-=(c-1)*d,d=0),x>=i&&g>0&&(m=!0,g*=.9,x=c*g);var v=(i-x)/2>>0,b={offset:v-d,size:0};h=a.reduce(function(k,C){var A={item:C.item,position:{offset:b.offset+b.size+d,size:m?g:C.barSize}},E=[].concat(BF(k),[A]);return b=E[E.length-1].position,C.stackList&&C.stackList.length&&C.stackList.forEach(function(P){E.push({item:P,position:b})}),E},f)}else{var j=Or(r,i,0,!0);i-2*j-(c-1)*d<=0&&(d=0);var w=(i-2*j-(c-1)*d)/c;w>1&&(w>>=0);var N=l===+l?Math.min(w,l):w;h=a.reduce(function(k,C,A){var E=[].concat(BF(k),[{item:C.item,position:{offset:j+(w+d)*A+(w-N)/2,size:N}}]);return C.stackList&&C.stackList.length&&C.stackList.forEach(function(P){E.push({item:P,position:E[E.length-1].position})}),E},f)}return h},hNe=function(t,n,r,i){var s=r.children,a=r.width,l=r.margin,c=a-(l.left||0)-(l.right||0),d=lH({children:s,legendWidth:c});if(d){var h=i||{},f=h.width,m=h.height,g=d.align,x=d.verticalAlign,v=d.layout;if((v==="vertical"||v==="horizontal"&&x==="middle")&&g!=="center"&&ke(t[g]))return yn(yn({},t),{},bu({},g,t[g]+(f||0)));if((v==="horizontal"||v==="vertical"&&g==="center")&&x!=="middle"&&ke(t[x]))return yn(yn({},t),{},bu({},x,t[x]+(m||0)))}return t},pNe=function(t,n,r){return at(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},cH=function(t,n,r,i,s){var a=n.props.children,l=gi(a,nm).filter(function(d){return pNe(i,s,d.props.direction)});if(l&&l.length){var c=l.map(function(d){return d.props.dataKey});return t.reduce(function(d,h){var f=Sn(h,r);if(at(f))return d;var m=Array.isArray(f)?[l0(f),Co(f)]:[f,f],g=c.reduce(function(x,v){var b=Sn(h,v,0),j=m[0]-Math.abs(Array.isArray(b)?b[0]:b),w=m[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(j,x[0]),Math.max(w,x[1])]},[1/0,-1/0]);return[Math.min(g[0],d[0]),Math.max(g[1],d[1])]},[1/0,-1/0])}return null},mNe=function(t,n,r,i,s){var a=n.map(function(l){return cH(t,l,r,s,i)}).filter(function(l){return!at(l)});return a&&a.length?a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},uH=function(t,n,r,i,s){var a=n.map(function(c){var d=c.props.dataKey;return r==="number"&&d&&cH(t,c,d,i)||ch(t,d,r,s)});if(r==="number")return a.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);var l={};return a.reduce(function(c,d){for(var h=0,f=d.length;h<f;h++)l[d[h]]||(l[d[h]]=!0,c.push(d[h]));return c},[])},dH=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Al=function(t,n,r){if(!t)return null;var i=t.scale,s=t.duplicateDomain,a=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,d=(n||r)&&a==="category"&&i.bandwidth?i.bandwidth()/c:0;if(d=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Tr(l[0]-l[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(f){var m=s?s.indexOf(f):f;return{coordinate:i(m)+d,value:f,offset:d}});return h.filter(function(f){return!Md(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,m){return{coordinate:i(f)+d,value:f,index:m,offset:d}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+d,value:f,offset:d}}):i.domain().map(function(f,m){return{coordinate:i(f)+d,value:s?s[f]:f,index:m,offset:d}})},L_=new WeakMap,Yg=function(t,n){if(typeof n!="function")return t;L_.has(t)||L_.set(t,new WeakMap);var r=L_.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},fH=function(t,n,r){var i=t.scale,s=t.type,a=t.layout,l=t.axisType;if(i==="auto")return a==="radial"&&l==="radiusAxis"?{scale:Lh(),realScaleType:"band"}:a==="radial"&&l==="angleAxis"?{scale:pv(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:lh(),realScaleType:"point"}:s==="category"?{scale:Lh(),realScaleType:"band"}:{scale:pv(),realScaleType:"linear"};if(ec(i)){var c="scale".concat(Kx(i));return{scale:(CF[c]||lh)(),realScaleType:CF[c]?c:"point"}}return rt(i)?{scale:i}:{scale:lh(),realScaleType:"point"}},zF=1e-4,hH=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),s=Math.min(i[0],i[1])-zF,a=Math.max(i[0],i[1])+zF,l=t(n[0]),c=t(n[r-1]);(l<s||l>a||c<s||c>a)&&t.domain([n[0],n[r-1]])}},gNe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},yNe=function(t,n){if(!n||n.length!==2||!ke(n[0])||!ke(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),s=[t[0],t[1]];return(!ke(t[0])||t[0]<r)&&(s[0]=r),(!ke(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},vNe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,a=0,l=0;l<n;++l){var c=Md(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=s,t[l][r][1]=s+c,s=t[l][r][1]):(t[l][r][0]=a,t[l][r][1]=a+c,a=t[l][r][1])}},xNe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,a=0;a<n;++a){var l=Md(t[a][r][1])?t[a][r][0]:t[a][r][1];l>=0?(t[a][r][0]=s,t[a][r][1]=s+l,s=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},bNe={sign:vNe,expand:o0e,none:Iu,silhouette:l0e,wiggle:c0e,positive:xNe},wNe=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),s=bNe[r],a=a0e().keys(i).value(function(l,c){return+Sn(l,c,0)}).order(WC).offset(s);return a(t)},jNe=function(t,n,r,i,s,a){if(!t)return null;var l=a?n.reverse():n,c={},d=l.reduce(function(f,m){var g,x=(g=m.type)!==null&&g!==void 0&&g.defaultProps?yn(yn({},m.type.defaultProps),m.props):m.props,v=x.stackId,b=x.hide;if(b)return f;var j=x[r],w=f[j]||{hasStack:!1,stackGroups:{}};if(zn(v)){var N=w.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};N.items.push(m),w.hasStack=!0,w.stackGroups[v]=N}else w.stackGroups[fc("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return yn(yn({},f),{},bu({},j,w))},c),h={};return Object.keys(d).reduce(function(f,m){var g=d[m];if(g.hasStack){var x={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(v,b){var j=g.stackGroups[b];return yn(yn({},v),{},bu({},b,{numericAxisId:r,cateAxisId:i,items:j.items,stackedData:wNe(t,j.items,s)}))},x)}return yn(yn({},f),{},bu({},m,g))},h)},pH=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,a=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(s&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var d=t.domain();if(!d.length)return null;var h=I_e(d,s,l);return t.domain([l0(h),Co(h)]),{niceTicks:h}}if(s&&i==="number"){var f=t.domain(),m=L_e(f,s,l);return{niceTicks:m}}return null};function wv(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!at(i[t.dataKey])){var l=Yy(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var c=Sn(i,at(a)?t.dataKey:a);return at(c)?null:t.scale(c)}var UF=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,a=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var c=Sn(a,n.dataKey,n.domain[l]);return at(c)?null:n.scale(c)-s/2+i},SNe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},_Ne=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?yn(yn({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(zn(s)){var a=n[s];if(a){var l=a.items.indexOf(t);return l>=0?a.stackedData[l]:null}}return null},NNe=function(t){return t.reduce(function(n,r){return[l0(r.concat([n[0]]).filter(ke)),Co(r.concat([n[1]]).filter(ke))]},[1/0,-1/0])},mH=function(t,n,r){return Object.keys(t).reduce(function(i,s){var a=t[s],l=a.stackedData,c=l.reduce(function(d,h){var f=NNe(h.slice(n,r+1));return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},VF=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WF=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gP=function(t,n,r){if(rt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ke(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(VF.test(t[0])){var s=+VF.exec(t[0])[1];i[0]=n[0]-s}else rt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ke(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(WF.test(t[1])){var a=+WF.exec(t[1])[1];i[1]=n[1]+a}else rt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},jv=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var s=s2(n,function(f){return f.coordinate}),a=1/0,l=1,c=s.length;l<c;l++){var d=s[l],h=s[l-1];a=Math.min((d.coordinate||0)-(h.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0},HF=function(t,n,r){return!t||!t.length||rc(t,mi(r,"type.defaultProps.domain"))?n:t},gH=function(t,n){var r=t.type.defaultProps?yn(yn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,s=r.name,a=r.unit,l=r.formatter,c=r.tooltipType,d=r.chartType,h=r.hide;return yn(yn({},We(t,!1)),{},{dataKey:i,unit:a,formatter:l,name:s||i,color:T2(t),value:Sn(n,i),type:c,payload:n,chartType:d,hide:h})};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 KF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KF(Object(n),!0).forEach(function(r){yH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yH(e,t,n){return t=CNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CNe(e){var t=PNe(e,"string");return Hh(t)=="symbol"?t:t+""}function PNe(e,t){if(Hh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ANe(e,t){return ONe(e)||TNe(e,t)||ENe(e,t)||kNe()}function kNe(){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 ENe(e,t){if(e){if(typeof e=="string")return GF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GF(e,t)}}function GF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function ONe(e){if(Array.isArray(e))return e}var Sv=Math.PI/180,MNe=function(t){return t*180/Math.PI},Zt=function(t,n,r,i){return{x:t+Math.cos(-Sv*i)*r,y:n+Math.sin(-Sv*i)*r}},vH=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},RNe=function(t,n,r,i,s){var a=t.width,l=t.height,c=t.startAngle,d=t.endAngle,h=Or(t.cx,a,a/2),f=Or(t.cy,l,l/2),m=vH(a,l,r),g=Or(t.innerRadius,m,0),x=Or(t.outerRadius,m,m*.8),v=Object.keys(n);return v.reduce(function(b,j){var w=n[j],N=w.domain,k=w.reversed,C;if(at(w.range))i==="angleAxis"?C=[c,d]:i==="radiusAxis"&&(C=[g,x]),k&&(C=[C[1],C[0]]);else{C=w.range;var A=C,E=ANe(A,2);c=E[0],d=E[1]}var P=fH(w,s),D=P.realScaleType,B=P.scale;B.domain(N).range(C),hH(B);var O=pH(B,oa(oa({},w),{},{realScaleType:D})),M=oa(oa(oa({},w),O),{},{range:C,radius:x,realScaleType:D,scale:B,cx:h,cy:f,innerRadius:g,outerRadius:x,startAngle:c,endAngle:d});return oa(oa({},b),{},yH({},j,M))},{})},DNe=function(t,n){var r=t.x,i=t.y,s=n.x,a=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-a,2))},INe=function(t,n){var r=t.x,i=t.y,s=n.cx,a=n.cy,l=DNe({x:r,y:i},{x:s,y:a});if(l<=0)return{radius:l};var c=(r-s)/l,d=Math.acos(c);return i>a&&(d=2*Math.PI-d),{radius:l,angle:MNe(d),angleInRadian:d}},LNe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),a=Math.min(i,s);return{startAngle:n-a*360,endAngle:r-a*360}},$Ne=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),a=Math.floor(i/360),l=Math.min(s,a);return t+l*360},YF=function(t,n){var r=t.x,i=t.y,s=INe({x:r,y:i},n),a=s.radius,l=s.angle,c=n.innerRadius,d=n.outerRadius;if(a<c||a>d)return!1;if(a===0)return!0;var h=LNe(n),f=h.startAngle,m=h.endAngle,g=l,x;if(f<=m){for(;g>m;)g-=360;for(;g<f;)g+=360;x=g>=f&&g<=m}else{for(;g>f;)g-=360;for(;g<m;)g+=360;x=g>=m&&g<=f}return x?oa(oa({},n),{},{radius:a,angle:$Ne(g,n)}):null},xH=function(t){return!_.isValidElement(t)&&!rt(t)&&typeof t!="boolean"?t.className:""};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)}var FNe=["offset"];function BNe(e){return VNe(e)||UNe(e)||zNe(e)||qNe()}function qNe(){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 zNe(e,t){if(e){if(typeof e=="string")return yP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yP(e,t)}}function UNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VNe(e){if(Array.isArray(e))return yP(e)}function yP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WNe(e,t){if(e==null)return{};var n=HNe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function XF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XF(Object(n),!0).forEach(function(r){KNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KNe(e,t,n){return t=GNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GNe(e){var t=YNe(e,"string");return Kh(t)=="symbol"?t:t+""}function YNe(e,t){if(Kh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gh(){return Gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gh.apply(this,arguments)}var XNe=function(t){var n=t.value,r=t.formatter,i=at(t.children)?n:t.children;return rt(r)?r(i):i},QNe=function(t,n){var r=Tr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},JNe=function(t,n,r){var i=t.position,s=t.viewBox,a=t.offset,l=t.className,c=s,d=c.cx,h=c.cy,f=c.innerRadius,m=c.outerRadius,g=c.startAngle,x=c.endAngle,v=c.clockWise,b=(f+m)/2,j=QNe(g,x),w=j>=0?1:-1,N,k;i==="insideStart"?(N=g+w*a,k=v):i==="insideEnd"?(N=x-w*a,k=!v):i==="end"&&(N=x+w*a,k=v),k=j<=0?k:!k;var C=Zt(d,h,b,N),A=Zt(d,h,b,N+(k?1:-1)*359),E="M".concat(C.x,",").concat(C.y,`
739    A`).concat(b,",").concat(b,",0,1,").concat(k?0:1,`,
740    `).concat(A.x,",").concat(A.y),P=at(t.id)?fc("recharts-radial-line-"):t.id;return X.createElement("text",Gh({},r,{dominantBaseline:"central",className:ot("recharts-radial-bar-label",l)}),X.createElement("defs",null,X.createElement("path",{id:P,d:E})),X.createElement("textPath",{xlinkHref:"#".concat(P)},n))},ZNe=function(t){var n=t.viewBox,r=t.offset,i=t.position,s=n,a=s.cx,l=s.cy,c=s.innerRadius,d=s.outerRadius,h=s.startAngle,f=s.endAngle,m=(h+f)/2;if(i==="outside"){var g=Zt(a,l,d+r,m),x=g.x,v=g.y;return{x,y:v,textAnchor:x>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(c+d)/2,j=Zt(a,l,b,m),w=j.x,N=j.y;return{x:w,y:N,textAnchor:"middle",verticalAnchor:"middle"}},eCe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,s=t.position,a=n,l=a.x,c=a.y,d=a.width,h=a.height,f=h>=0?1:-1,m=f*i,g=f>0?"end":"start",x=f>0?"start":"end",v=d>=0?1:-1,b=v*i,j=v>0?"end":"start",w=v>0?"start":"end";if(s==="top"){var N={x:l+d/2,y:c-f*i,textAnchor:"middle",verticalAnchor:g};return Fn(Fn({},N),r?{height:Math.max(c-r.y,0),width:d}:{})}if(s==="bottom"){var k={x:l+d/2,y:c+h+m,textAnchor:"middle",verticalAnchor:x};return Fn(Fn({},k),r?{height:Math.max(r.y+r.height-(c+h),0),width:d}:{})}if(s==="left"){var C={x:l-b,y:c+h/2,textAnchor:j,verticalAnchor:"middle"};return Fn(Fn({},C),r?{width:Math.max(C.x-r.x,0),height:h}:{})}if(s==="right"){var A={x:l+d+b,y:c+h/2,textAnchor:w,verticalAnchor:"middle"};return Fn(Fn({},A),r?{width:Math.max(r.x+r.width-A.x,0),height:h}:{})}var E=r?{width:d,height:h}:{};return s==="insideLeft"?Fn({x:l+b,y:c+h/2,textAnchor:w,verticalAnchor:"middle"},E):s==="insideRight"?Fn({x:l+d-b,y:c+h/2,textAnchor:j,verticalAnchor:"middle"},E):s==="insideTop"?Fn({x:l+d/2,y:c+m,textAnchor:"middle",verticalAnchor:x},E):s==="insideBottom"?Fn({x:l+d/2,y:c+h-m,textAnchor:"middle",verticalAnchor:g},E):s==="insideTopLeft"?Fn({x:l+b,y:c+m,textAnchor:w,verticalAnchor:x},E):s==="insideTopRight"?Fn({x:l+d-b,y:c+m,textAnchor:j,verticalAnchor:x},E):s==="insideBottomLeft"?Fn({x:l+b,y:c+h-m,textAnchor:w,verticalAnchor:g},E):s==="insideBottomRight"?Fn({x:l+d-b,y:c+h-m,textAnchor:j,verticalAnchor:g},E):Od(s)&&(ke(s.x)||Nl(s.x))&&(ke(s.y)||Nl(s.y))?Fn({x:l+Or(s.x,d),y:c+Or(s.y,h),textAnchor:"end",verticalAnchor:"end"},E):Fn({x:l+d/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},E)},tCe=function(t){return"cx"in t&&ke(t.cx)};function Zn(e){var t=e.offset,n=t===void 0?5:t,r=WNe(e,FNe),i=Fn({offset:n},r),s=i.viewBox,a=i.position,l=i.value,c=i.children,d=i.content,h=i.className,f=h===void 0?"":h,m=i.textBreakAll;if(!s||at(l)&&at(c)&&!_.isValidElement(d)&&!rt(d))return null;if(_.isValidElement(d))return _.cloneElement(d,i);var g;if(rt(d)){if(g=_.createElement(d,i),_.isValidElement(g))return g}else g=XNe(i);var x=tCe(s),v=We(i,!0);if(x&&(a==="insideStart"||a==="insideEnd"||a==="end"))return JNe(i,g,v);var b=x?ZNe(i):eCe(i);return X.createElement(nc,Gh({className:ot("recharts-label",f)},v,b,{breakAll:m}),g)}Zn.displayName="Label";var bH=function(t){var n=t.cx,r=t.cy,i=t.angle,s=t.startAngle,a=t.endAngle,l=t.r,c=t.radius,d=t.innerRadius,h=t.outerRadius,f=t.x,m=t.y,g=t.top,x=t.left,v=t.width,b=t.height,j=t.clockWise,w=t.labelViewBox;if(w)return w;if(ke(v)&&ke(b)){if(ke(f)&&ke(m))return{x:f,y:m,width:v,height:b};if(ke(g)&&ke(x))return{x:g,y:x,width:v,height:b}}return ke(f)&&ke(m)?{x:f,y:m,width:0,height:0}:ke(n)&&ke(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:a||i||0,innerRadius:d||0,outerRadius:h||c||l||0,clockWise:j}:t.viewBox?t.viewBox:{}},nCe=function(t,n){return t?t===!0?X.createElement(Zn,{key:"label-implicit",viewBox:n}):zn(t)?X.createElement(Zn,{key:"label-implicit",viewBox:n,value:t}):_.isValidElement(t)?t.type===Zn?_.cloneElement(t,{key:"label-implicit",viewBox:n}):X.createElement(Zn,{key:"label-implicit",content:t,viewBox:n}):rt(t)?X.createElement(Zn,{key:"label-implicit",content:t,viewBox:n}):Od(t)?X.createElement(Zn,Gh({viewBox:n},t,{key:"label-implicit"})):null:null},rCe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,s=bH(t),a=gi(i,Zn).map(function(c,d){return _.cloneElement(c,{viewBox:n||s,key:"label-".concat(d)})});if(!r)return a;var l=nCe(t.label,n||s);return[l].concat(BNe(a))};Zn.parseViewBox=bH;Zn.renderCallByParent=rCe;var $_,QF;function iCe(){if(QF)return $_;QF=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return $_=e,$_}var sCe=iCe();const aCe=Ot(sCe);function Yh(e){"@babel/helpers - typeof";return Yh=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},Yh(e)}var oCe=["valueAccessor"],lCe=["data","dataKey","clockWise","id","textBreakAll"];function cCe(e){return hCe(e)||fCe(e)||dCe(e)||uCe()}function uCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
741In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dCe(e,t){if(e){if(typeof e=="string")return vP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vP(e,t)}}function fCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hCe(e){if(Array.isArray(e))return vP(e)}function vP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _v(){return _v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_v.apply(this,arguments)}function JF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JF(Object(n),!0).forEach(function(r){pCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pCe(e,t,n){return t=mCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mCe(e){var t=gCe(e,"string");return Yh(t)=="symbol"?t:t+""}function gCe(e,t){if(Yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e3(e,t){if(e==null)return{};var n=yCe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vCe=function(t){return Array.isArray(t.value)?aCe(t.value):t.value};function Is(e){var t=e.valueAccessor,n=t===void 0?vCe:t,r=e3(e,oCe),i=r.data,s=r.dataKey,a=r.clockWise,l=r.id,c=r.textBreakAll,d=e3(r,lCe);return!i||!i.length?null:X.createElement(_t,{className:"recharts-label-list"},i.map(function(h,f){var m=at(s)?n(h,f):Sn(h&&h.payload,s),g=at(l)?{}:{id:"".concat(l,"-").concat(f)};return X.createElement(Zn,_v({},We(h,!0),d,g,{parentViewBox:h.parentViewBox,value:m,textBreakAll:c,viewBox:Zn.parseViewBox(at(a)?h:ZF(ZF({},h),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}Is.displayName="LabelList";function xCe(e,t){return e?e===!0?X.createElement(Is,{key:"labelList-implicit",data:t}):X.isValidElement(e)||rt(e)?X.createElement(Is,{key:"labelList-implicit",data:t,content:e}):Od(e)?X.createElement(Is,_v({data:t},e,{key:"labelList-implicit"})):null:null}function bCe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=gi(r,Is).map(function(a,l){return _.cloneElement(a,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var s=xCe(e.label,t);return[s].concat(cCe(i))}Is.renderCallByParent=bCe;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 xP(){return xP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xP.apply(this,arguments)}function t3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function n3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){wCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wCe(e,t,n){return t=jCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jCe(e){var t=SCe(e,"string");return Xh(t)=="symbol"?t:t+""}function SCe(e,t){if(Xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _Ce=function(t,n){var r=Tr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Xg=function(t){var n=t.cx,r=t.cy,i=t.radius,s=t.angle,a=t.sign,l=t.isExternal,c=t.cornerRadius,d=t.cornerIsExternal,h=c*(l?1:-1)+i,f=Math.asin(c/h)/Sv,m=d?s:s+a*f,g=Zt(n,r,h,m),x=Zt(n,r,i,m),v=d?s-a*f:s,b=Zt(n,r,h*Math.cos(f*Sv),v);return{center:g,circleTangency:x,lineTangency:b,theta:f}},wH=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.startAngle,l=t.endAngle,c=_Ce(a,l),d=a+c,h=Zt(n,r,s,a),f=Zt(n,r,s,d),m="M ".concat(h.x,",").concat(h.y,`
742    A `).concat(s,",").concat(s,`,0,
743    `).concat(+(Math.abs(c)>180),",").concat(+(a>d),`,
744    `).concat(f.x,",").concat(f.y,`
745  `);if(i>0){var g=Zt(n,r,i,a),x=Zt(n,r,i,d);m+="L ".concat(x.x,",").concat(x.y,`
746            A `).concat(i,",").concat(i,`,0,
747            `).concat(+(Math.abs(c)>180),",").concat(+(a<=d),`,
748            `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},NCe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,d=t.startAngle,h=t.endAngle,f=Tr(h-d),m=Xg({cx:n,cy:r,radius:s,angle:d,sign:f,cornerRadius:a,cornerIsExternal:c}),g=m.circleTangency,x=m.lineTangency,v=m.theta,b=Xg({cx:n,cy:r,radius:s,angle:h,sign:-f,cornerRadius:a,cornerIsExternal:c}),j=b.circleTangency,w=b.lineTangency,N=b.theta,k=c?Math.abs(d-h):Math.abs(d-h)-v-N;if(k<0)return l?"M ".concat(x.x,",").concat(x.y,`
749        a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
750        a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
751      `):wH({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:d,endAngle:h});var C="M ".concat(x.x,",").concat(x.y,`
752    A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(g.x,",").concat(g.y,`
753    A`).concat(s,",").concat(s,",0,").concat(+(k>180),",").concat(+(f<0),",").concat(j.x,",").concat(j.y,`
754    A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
755  `);if(i>0){var A=Xg({cx:n,cy:r,radius:i,angle:d,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:c}),E=A.circleTangency,P=A.lineTangency,D=A.theta,B=Xg({cx:n,cy:r,radius:i,angle:h,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:c}),O=B.circleTangency,M=B.lineTangency,$=B.theta,F=c?Math.abs(d-h):Math.abs(d-h)-D-$;if(F<0&&a===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(M.x,",").concat(M.y,`
756      A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
757      A`).concat(i,",").concat(i,",0,").concat(+(F>180),",").concat(+(f>0),",").concat(E.x,",").concat(E.y,`
758      A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},CCe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jH=function(t){var n=n3(n3({},CCe),t),r=n.cx,i=n.cy,s=n.innerRadius,a=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,d=n.cornerIsExternal,h=n.startAngle,f=n.endAngle,m=n.className;if(a<s||h===f)return null;var g=ot("recharts-sector",m),x=a-s,v=Or(l,x,0,!0),b;return v>0&&Math.abs(h-f)<360?b=NCe({cx:r,cy:i,innerRadius:s,outerRadius:a,cornerRadius:Math.min(v,x/2),forceCornerRadius:c,cornerIsExternal:d,startAngle:h,endAngle:f}):b=wH({cx:r,cy:i,innerRadius:s,outerRadius:a,startAngle:h,endAngle:f}),X.createElement("path",xP({},We(n,!0),{className:g,d:b,role:"img"}))};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)}function bP(){return bP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bP.apply(this,arguments)}function r3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r3(Object(n),!0).forEach(function(r){PCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PCe(e,t,n){return t=ACe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ACe(e){var t=kCe(e,"string");return Qh(t)=="symbol"?t:t+""}function kCe(e,t){if(Qh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s3={curveBasisClosed:Yxe,curveBasisOpen:Xxe,curveBasis:Gxe,curveBumpX:Rxe,curveBumpY:Dxe,curveLinearClosed:Qxe,curveLinear:Yx,curveMonotoneX:Jxe,curveMonotoneY:Zxe,curveNatural:e0e,curveStep:t0e,curveStepAfter:r0e,curveStepBefore:n0e},Qg=function(t){return t.x===+t.x&&t.y===+t.y},Bf=function(t){return t.x},qf=function(t){return t.y},ECe=function(t,n){if(rt(t))return t;var r="curve".concat(Kx(t));return(r==="curveMonotone"||r==="curveBump")&&n?s3["".concat(r).concat(n==="vertical"?"Y":"X")]:s3[r]||Yx},TCe=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,s=i===void 0?[]:i,a=t.baseLine,l=t.layout,c=t.connectNulls,d=c===void 0?!1:c,h=ECe(r,l),f=d?s.filter(function(v){return Qg(v)}):s,m;if(Array.isArray(a)){var g=d?a.filter(function(v){return Qg(v)}):a,x=f.map(function(v,b){return i3(i3({},v),{},{base:g[b]})});return l==="vertical"?m=zg().y(qf).x1(Bf).x0(function(v){return v.base.x}):m=zg().x(Bf).y1(qf).y0(function(v){return v.base.y}),m.defined(Qg).curve(h),m(x)}return l==="vertical"&&ke(a)?m=zg().y(qf).x1(Bf).x0(a):ke(a)?m=zg().x(Bf).y1(qf).y0(a):m=wW().x(Bf).y(qf),m.defined(Qg).curve(h),m(f)},Vl=function(t){var n=t.className,r=t.points,i=t.path,s=t.pathRef;if((!r||!r.length)&&!i)return null;var a=r&&r.length?TCe(t):i;return _.createElement("path",bP({},We(t,!1),Xy(t),{className:ot("recharts-curve",n),d:a,ref:s}))},F_={exports:{}},B_,a3;function OCe(){if(a3)return B_;a3=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return B_=e,B_}var q_,o3;function MCe(){if(o3)return q_;o3=1;var e=OCe();function t(){}function n(){}return n.resetWarningCache=t,q_=function(){function r(a,l,c,d,h,f){if(f!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},q_}var l3;function RCe(){return l3||(l3=1,F_.exports=MCe()()),F_.exports}var DCe=RCe();const Lt=Ot(DCe);var ICe=Object.getOwnPropertyNames,LCe=Object.getOwnPropertySymbols,$Ce=Object.prototype.hasOwnProperty;function c3(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function Jg(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var s=i.cache,a=s.get(n),l=s.get(r);if(a&&l)return a===r&&l===n;s.set(n,r),s.set(r,n);var c=e(n,r,i);return s.delete(n),s.delete(r),c}}function u3(e){return ICe(e).concat(LCe(e))}var FCe=Object.hasOwn||(function(e,t){return $Ce.call(e,t)});function mc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var BCe="__v",qCe="__o",zCe="_owner",d3=Object.getOwnPropertyDescriptor,f3=Object.keys;function UCe(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function VCe(e,t){return mc(e.getTime(),t.getTime())}function WCe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function HCe(e,t){return e===t}function h3(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.entries(),a,l,c=0;(a=s.next())&&!a.done;){for(var d=t.entries(),h=!1,f=0;(l=d.next())&&!l.done;){if(i[f]){f++;continue}var m=a.value,g=l.value;if(n.equals(m[0],g[0],c,f,e,t,n)&&n.equals(m[1],g[1],m[0],g[0],e,t,n)){h=i[f]=!0;break}f++}if(!h)return!1;c++}return!0}var KCe=mc;function GCe(e,t,n){var r=f3(e),i=r.length;if(f3(t).length!==i)return!1;for(;i-- >0;)if(!SH(e,t,n,r[i]))return!1;return!0}function zf(e,t,n){var r=u3(e),i=r.length;if(u3(t).length!==i)return!1;for(var s,a,l;i-- >0;)if(s=r[i],!SH(e,t,n,s)||(a=d3(e,s),l=d3(t,s),(a||l)&&(!a||!l||a.configurable!==l.configurable||a.enumerable!==l.enumerable||a.writable!==l.writable)))return!1;return!0}function YCe(e,t){return mc(e.valueOf(),t.valueOf())}function XCe(e,t){return e.source===t.source&&e.flags===t.flags}function p3(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.values(),a,l;(a=s.next())&&!a.done;){for(var c=t.values(),d=!1,h=0;(l=c.next())&&!l.done;){if(!i[h]&&n.equals(a.value,l.value,a.value,l.value,e,t,n)){d=i[h]=!0;break}h++}if(!d)return!1}return!0}function QCe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function JCe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function SH(e,t,n,r){return(r===zCe||r===qCe||r===BCe)&&(e.$$typeof||t.$$typeof)?!0:FCe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var ZCe="[object Arguments]",ePe="[object Boolean]",tPe="[object Date]",nPe="[object Error]",rPe="[object Map]",iPe="[object Number]",
758sPe="[object Object]",aPe="[object RegExp]",oPe="[object Set]",lPe="[object String]",cPe="[object URL]",uPe=Array.isArray,m3=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,g3=Object.assign,dPe=Object.prototype.toString.call.bind(Object.prototype.toString);function fPe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,s=e.areMapsEqual,a=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,d=e.areRegExpsEqual,h=e.areSetsEqual,f=e.areTypedArraysEqual,m=e.areUrlsEqual;return function(x,v,b){if(x===v)return!0;if(x==null||v==null)return!1;var j=typeof x;if(j!==typeof v)return!1;if(j!=="object")return j==="number"?a(x,v,b):j==="function"?i(x,v,b):!1;var w=x.constructor;if(w!==v.constructor)return!1;if(w===Object)return l(x,v,b);if(uPe(x))return t(x,v,b);if(m3!=null&&m3(x))return f(x,v,b);if(w===Date)return n(x,v,b);if(w===RegExp)return d(x,v,b);if(w===Map)return s(x,v,b);if(w===Set)return h(x,v,b);var N=dPe(x);return N===tPe?n(x,v,b):N===aPe?d(x,v,b):N===rPe?s(x,v,b):N===oPe?h(x,v,b):N===sPe?typeof x.then!="function"&&typeof v.then!="function"&&l(x,v,b):N===cPe?m(x,v,b):N===nPe?r(x,v,b):N===ZCe?l(x,v,b):N===ePe||N===iPe||N===lPe?c(x,v,b):!1}}function hPe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?zf:UCe,areDatesEqual:VCe,areErrorsEqual:WCe,areFunctionsEqual:HCe,areMapsEqual:r?c3(h3,zf):h3,areNumbersEqual:KCe,areObjectsEqual:r?zf:GCe,arePrimitiveWrappersEqual:YCe,areRegExpsEqual:XCe,areSetsEqual:r?c3(p3,zf):p3,areTypedArraysEqual:r?zf:QCe,areUrlsEqual:JCe};if(n&&(i=g3({},i,n(i))),t){var s=Jg(i.areArraysEqual),a=Jg(i.areMapsEqual),l=Jg(i.areObjectsEqual),c=Jg(i.areSetsEqual);i=g3({},i,{areArraysEqual:s,areMapsEqual:a,areObjectsEqual:l,areSetsEqual:c})}return i}function pPe(e){return function(t,n,r,i,s,a,l){return e(t,n,l)}}function mPe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,s=e.strict;if(r)return function(c,d){var h=r(),f=h.cache,m=f===void 0?t?new WeakMap:void 0:f,g=h.meta;return n(c,d,{cache:m,equals:i,meta:g,strict:s})};if(t)return function(c,d){return n(c,d,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var a={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,d){return n(c,d,a)}}var gPe=Yo();Yo({strict:!0});Yo({circular:!0});Yo({circular:!0,strict:!0});Yo({createInternalComparator:function(){return mc}});Yo({strict:!0,createInternalComparator:function(){return mc}});Yo({circular:!0,createInternalComparator:function(){return mc}});Yo({circular:!0,createInternalComparator:function(){return mc},strict:!0});function Yo(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,s=e.strict,a=s===void 0?!1:s,l=hPe(e),c=fPe(l),d=r?r(c):pPe(c);return mPe({circular:n,comparator:c,createState:i,equals:d,strict:a})}function yPe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function y3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(s){n<0&&(n=s),s-n>t?(e(s),n=-1):yPe(i)};requestAnimationFrame(r)}function wP(e){"@babel/helpers - typeof";return wP=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},wP(e)}function vPe(e){return jPe(e)||wPe(e)||bPe(e)||xPe()}function xPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
759In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bPe(e,t){if(e){if(typeof e=="string")return v3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v3(e,t)}}function v3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jPe(e){if(Array.isArray(e))return e}function SPe(){var e={},t=function(){return null}
vendor: 59,740 bytes, lines 759-777
759,n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var a=s,l=vPe(a),c=l[0],d=l.slice(1);if(typeof c=="number"){y3(i.bind(null,d),c);return}i(c),y3(i.bind(null,d));return}wP(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){n=!0},start:function(s){n=!1,r(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}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 x3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function b3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x3(Object(n),!0).forEach(function(r){_H(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _H(e,t,n){return t=_Pe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Pe(e){var t=NPe(e,"string");return Jh(t)==="symbol"?t:String(t)}function NPe(e,t){if(Jh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CPe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},PPe=function(t){return t},APe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},uh=function(t,n){return Object.keys(n).reduce(function(r,i){return b3(b3({},r),{},_H({},i,t(i,n[i])))},{})},w3=function(t,n,r){return t.map(function(i){return"".concat(APe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function kPe(e,t){return OPe(e)||TPe(e,t)||NH(e,t)||EPe()}function EPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
760In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function OPe(e){if(Array.isArray(e))return e}function MPe(e){return IPe(e)||DPe(e)||NH(e)||RPe()}function RPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
761In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NH(e,t){if(e){if(typeof e=="string")return jP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jP(e,t)}}function DPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IPe(e){if(Array.isArray(e))return jP(e)}function jP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Nv=1e-4,CH=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},PH=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},j3=function(t,n){return function(r){var i=CH(t,n);return PH(i,r)}},LPe=function(t,n){return function(r){var i=CH(t,n),s=[].concat(MPe(i.map(function(a,l){return a*l}).slice(1)),[0]);return PH(s,r)}},S3=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],s=n[1],a=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,a=1,l=1;break;case"ease":i=.25,s=.1,a=.25,l=1;break;case"ease-in":i=.42,s=0,a=1,l=1;break;case"ease-out":i=.42,s=0,a=.58,l=1;break;case"ease-in-out":i=0,s=0,a=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var d=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),h=kPe(d,4);i=h[0],s=h[1],a=h[2],l=h[3]}}}var f=j3(i,a),m=j3(s,l),g=LPe(i,a),x=function(j){return j>1?1:j<0?0:j},v=function(j){for(var w=j>1?1:j,N=w,k=0;k<8;++k){var C=f(N)-w,A=g(N);if(Math.abs(C-w)<Nv||A<Nv)return m(N);N=x(N-C/A)}return m(N)};return v.isStepper=!1,v},$Pe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,s=i===void 0?8:i,a=t.dt,l=a===void 0?17:a,c=function(h,f,m){var g=-(h-f)*r,x=m*s,v=m+(g-x)*l/1e3,b=m*l/1e3+h;return Math.abs(b-f)<Nv&&Math.abs(v)<Nv?[f,0]:[b,v]};return c.isStepper=!0,c.dt=l,c},FPe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return S3(i);case"spring":return $Pe();default:if(i.split("(")[0]==="cubic-bezier")return S3(i)}return typeof i=="function"?i:null};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 _3(e){return zPe(e)||qPe(e)||AH(e)||BPe()}function BPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
762In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zPe(e){if(Array.isArray(e))return _P(e)}function N3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N3(Object(n),!0).forEach(function(r){SP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SP(e,t,n){return t=UPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UPe(e){var t=VPe(e,"string");return Zh(t)==="symbol"?t:String(t)}function VPe(e,t){if(Zh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WPe(e,t){return GPe(e)||KPe(e,t)||AH(e,t)||HPe()}function HPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
763In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AH(e,t){if(e){if(typeof e=="string")return _P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _P(e,t)}}function _P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function GPe(e){if(Array.isArray(e))return e}var Cv=function(t,n,r){return t+(n-t)*r},NP=function(t){var n=t.from,r=t.to;return n!==r},YPe=function e(t,n,r){var i=uh(function(s,a){if(NP(a)){var l=t(a.from,a.to,a.velocity),c=WPe(l,2),d=c[0],h=c[1];return or(or({},a),{},{from:d,velocity:h})}return a},n);return r<1?uh(function(s,a){return NP(a)?or(or({},a),{},{velocity:Cv(a.velocity,i[s].velocity,r),from:Cv(a.from,i[s].from,r)}):a},n):e(t,i,r-1)};const XPe=(function(e,t,n,r,i){var s=CPe(e,t),a=s.reduce(function(b,j){return or(or({},b),{},SP({},j,[e[j],t[j]]))},{}),l=s.reduce(function(b,j){return or(or({},b),{},SP({},j,{from:e[j],velocity:0,to:t[j]}))},{}),c=-1,d,h,f=function(){return null},m=function(){return uh(function(j,w){return w.from},l)},g=function(){return!Object.values(l).filter(NP).length},x=function(j){d||(d=j);var w=j-d,N=w/n.dt;l=YPe(n,l,N),i(or(or(or({},e),t),m())),d=j,g()||(c=requestAnimationFrame(f))},v=function(j){h||(h=j);var w=(j-h)/r,N=uh(function(C,A){return Cv.apply(void 0,_3(A).concat([n(w)]))},a);if(i(or(or(or({},e),t),N)),w<1)c=requestAnimationFrame(f);else{var k=uh(function(C,A){return Cv.apply(void 0,_3(A).concat([n(1)]))},a);i(or(or(or({},e),t),k))}};return f=n.isStepper?x:v,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function Wu(e){"@babel/helpers - typeof";return Wu=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},Wu(e)}var QPe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function JPe(e,t){if(e==null)return{};var n=ZPe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function z_(e){return rAe(e)||nAe(e)||tAe(e)||eAe()}function eAe(){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 tAe(e,t){if(e){if(typeof e=="string")return CP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CP(e,t)}}function nAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rAe(e){if(Array.isArray(e))return CP(e)}function CP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C3(Object(n),!0).forEach(function(r){Jf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jf(e,t,n){return t=kH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sAe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kH(r.key),r)}}function aAe(e,t,n){return t&&sAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kH(e){var t=oAe(e,"string");return Wu(t)==="symbol"?t:String(t)}function oAe(e,t){if(Wu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lAe(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(r,i){return r.__proto__=i,r},PP(e,t)}function cAe(e){var t=uAe();return function(){var r=Pv(e),i;if(t){var s=Pv(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return AP(this,i)}}function AP(e,t){if(t&&(Wu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kP(e)}function kP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uAe(){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 Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}var hs=(function(e){lAe(n,e);var t=cAe(n);function n(r,i){var s;iAe(this,n),s=t.call(this,r,i);var a=s.props,l=a.isActive,c=a.attributeName,d=a.from,h=a.to,f=a.steps,m=a.children,g=a.duration;if(s.handleStyleChange=s.handleStyleChange.bind(kP(s)),s.changeStyle=s.changeStyle.bind(kP(s)),!l||g<=0)return s.state={style:{}},typeof m=="function"&&(s.state={style:h}),AP(s);if(f&&f.length)s.state={style:f[0].style};else if(d){if(typeof m=="function")return s.state={style:d},AP(s);s.state={style:c?Jf({},c,d):d}}else s.state={style:{}};return s}return aAe(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,a=i.canBegin;this.mounted=!0,!(!s||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,a=s.isActive,l=s.canBegin,c=s.attributeName,d=s.shouldReAnimate,h=s.to,f=s.from,m=this.state.style;if(l){if(!a){var g={style:c?Jf({},c,h):h};this.state&&m&&(c&&m[c]!==h||!c&&m!==h)&&this.setState(g);return}if(!(gPe(i.to,h)&&i.canBegin&&i.isActive)){var x=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=x||d?f:i.to;if(this.state&&m){var b={style:c?Jf({},c,v):v};(c&&m[c]!==v||!c&&m!==v)&&this.setState(b)}this.runAnimation(es(es({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,a=i.from,l=i.to,c=i.duration,d=i.easing,h=i.begin,f=i.onAnimationEnd,m=i.onAnimationStart,g=XPe(a,l,FPe(d),c,this.changeStyle),x=function(){s.stopJSAnimation=g()};this.manager.start([m,h,x,c,f])}},{key:"runStepAnimation",value:function(i){var s=this,a=i.steps,l=i.begin,c=i.onAnimationStart,d=a[0],h=d.style,f=d.duration,m=f===void 0?0:f,g=function(v,b,j){if(j===0)return v;var w=b.duration,N=b.easing,k=N===void 0?"ease":N,C=b.style,A=b.properties,E=b.onAnimationEnd,P=j>0?a[j-1]:b,D=A||Object.keys(C);if(typeof k=="function"||k==="spring")return[].concat(z_(v),[s.runJSAnimation.bind(s,{from:P.style,to:C,duration:w,easing:k}),w]);var B=w3(D,w,k),O=es(es(es({},P.style),C),{},{transition:B});return[].concat(z_(v),[O,w,E]).filter(PPe)};return this.manager.start([c].concat(z_(a.reduce(g,[h,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=SPe());var s=i.begin,a=i.duration,l=i.attributeName,c=i.to,d=i.easing,h=i.onAnimationStart,f=i.onAnimationEnd,m=i.steps,g=i.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof d=="function"||typeof g=="function"||d==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var v=l?Jf({},l,c):c,b=w3(Object.keys(v),a,d);x.start([h,s,es(es({},v),{},{transition:b}),a,f])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=JPe(i,QPe),d=_.Children.count(s),h=this.state.style;if(typeof s=="function")return s(h);if(!l||d===0||a<=0)return s;var f=function(g){var x=g.props,v=x.style,b=v===void 0?{}:v,j=x.className,w=_.cloneElement(g,es(es({},c),{},{style:es(es({},b),h),className:j}));return w};return d===1?f(_.Children.only(s)):X.createElement("div",null,_.Children.map(s,function(m){return f(m)}))}}]),n})(_.PureComponent);hs.displayName="Animate";hs.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};hs.propTypes={from:Lt.oneOfType([Lt.object,Lt.string]),to:Lt.oneOfType([Lt.object,Lt.string]),attributeName:Lt.string,duration:Lt.number,begin:Lt.number,easing:Lt.oneOfType([Lt.string,Lt.func]),steps:Lt.arrayOf(Lt.shape({duration:Lt.number.isRequired,style:Lt.object.isRequired,easing:Lt.oneOfType([Lt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Lt.func]),properties:Lt.arrayOf("string"),onAnimationEnd:Lt.func})),children:Lt.oneOfType([Lt.node,Lt.func]),isActive:Lt.bool,canBegin:Lt.bool,onAnimationEnd:Lt.func,shouldReAnimate:Lt.bool,onAnimationStart:Lt.func,onAnimationReStart:Lt.func};function ep(e){"@babel/helpers - typeof";return ep=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},ep(e)}function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Av.apply(this,arguments)}function dAe(e,t){return mAe(e)||pAe(e,t)||hAe(e,t)||fAe()}function fAe(){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 hAe(e,t){if(e){if(typeof e=="string")return P3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P3(e,t)}}function P3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function mAe(e){if(Array.isArray(e))return e}function A3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function k3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A3(Object(n),!0).forEach(function(r){gAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gAe(e,t,n){return t=yAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yAe(e){var t=vAe(e,"string");return ep(t)=="symbol"?t:t+""}function vAe(e,t){if(ep(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E3=function(t,n,r,i,s){var a=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,c=r>=0?1:-1,d=i>=0&&r>=0||i<0&&r<0?1:0,h;if(a>0&&s instanceof Array){for(var f=[0,0,0,0],m=0,g=4;m<g;m++)f[m]=s[m]>a?a:s[m];h="M".concat(t,",").concat(n+l*f[0]),f[0]>0&&(h+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(d,",").concat(t+c*f[0],",").concat(n)),h+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(h+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(d,`,
766        `).concat(t+r,",").concat(n+l*f[1])),h+="L ".concat(t+r,",").concat(n+i-l*f[2]),f[2]>0&&(h+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(d,`,
767        `).concat(t+r-c*f[2],",").concat(n+i)),h+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(h+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(d,`,
768        `).concat(t,",").concat(n+i-l*f[3])),h+="Z"}else if(a>0&&s===+s&&s>0){var x=Math.min(a,s);h="M ".concat(t,",").concat(n+l*x,`
769            A `).concat(x,",").concat(x,",0,0,").concat(d,",").concat(t+c*x,",").concat(n,`
770            L `).concat(t+r-c*x,",").concat(n,`
771            A `).concat(x,",").concat(x,",0,0,").concat(d,",").concat(t+r,",").concat(n+l*x,`
772            L `).concat(t+r,",").concat(n+i-l*x,`
773            A `).concat(x,",").concat(x,",0,0,").concat(d,",").concat(t+r-c*x,",").concat(n+i,`
774            L `).concat(t+c*x,",").concat(n+i,`
775            A `).concat(x,",").concat(x,",0,0,").concat(d,",").concat(t,",").concat(n+i-l*x," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},xAe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,s=n.x,a=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var d=Math.min(s,s+l),h=Math.max(s,s+l),f=Math.min(a,a+c),m=Math.max(a,a+c);return r>=d&&r<=h&&i>=f&&i<=m}return!1},bAe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},O2=function(t){var n=k3(k3({},bAe),t),r=_.useRef(),i=_.useState(-1),s=dAe(i,2),a=s[0],l=s[1];_.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&l(k)}catch{}},[]);var c=n.x,d=n.y,h=n.width,f=n.height,m=n.radius,g=n.className,x=n.animationEasing,v=n.animationDuration,b=n.animationBegin,j=n.isAnimationActive,w=n.isUpdateAnimationActive;if(c!==+c||d!==+d||h!==+h||f!==+f||h===0||f===0)return null;var N=ot("recharts-rectangle",g);return w?X.createElement(hs,{canBegin:a>0,from:{width:h,height:f,x:c,y:d},to:{width:h,height:f,x:c,y:d},duration:v,animationEasing:x,isActive:w},function(k){var C=k.width,A=k.height,E=k.x,P=k.y;return X.createElement(hs,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:j,easing:x},X.createElement("path",Av({},We(n,!0),{className:N,d:E3(E,P,C,A,m),ref:r})))}):X.createElement("path",Av({},We(n,!0),{className:N,d:E3(c,d,h,f,m)}))},wAe=["points","className","baseLinePoints","connectNulls"];function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tu.apply(this,arguments)}function jAe(e,t){if(e==null)return{};var n=SAe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T3(e){return PAe(e)||CAe(e)||NAe(e)||_Ae()}function _Ae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
776In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NAe(e,t){if(e){if(typeof e=="string")return EP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EP(e,t)}}function CAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PAe(e){if(Array.isArray(e))return EP(e)}function EP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O3=function(t){return t&&t.x===+t.x&&t.y===+t.y},AAe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){O3(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),O3(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},dh=function(t,n){var r=AAe(t);n&&(r=[r.reduce(function(s,a){return[].concat(T3(s),T3(a))},[])]);var i=r.map(function(s){return s.reduce(function(a,l,c){return"".concat(a).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},kAe=function(t,n,r){var i=dh(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(dh(n.reverse(),r).slice(1))},EAe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,s=t.connectNulls,a=jAe(t,wAe);if(!n||!n.length)return null;var l=ot("recharts-polygon",r);if(i&&i.length){var c=a.stroke&&a.stroke!=="none",d=kAe(n,i,s);return X.createElement("g",{className:l},X.createElement("path",tu({},We(a,!0),{fill:d.slice(-1)==="Z"?a.fill:"none",stroke:"none",d})),c?X.createElement("path",tu({},We(a,!0),{fill:"none",d:dh(n,s)})):null,c?X.createElement("path",tu({},We(a,!0),{fill:"none",d:dh(i,s)})):null)}var h=dh(n,s);return X.createElement("path",tu({},We(a,!0),{fill:h.slice(-1)==="Z"?a.fill:"none",className:l,d:h}))};function TP(){return TP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TP.apply(this,arguments)}var rm=function(t){var n=t.cx,r=t.cy,i=t.r,s=t.className,a=ot("recharts-dot",s);return n===+n&&r===+r&&i===+i?_.createElement("circle",TP({},We(t,!1),Xy(t),{className:a,cx:n,cy:r,r:i})):null};function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}var TAe=["x","y","top","left","width","height","className"];function OP(){return OP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OP.apply(this,arguments)}function M3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function OAe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M3(Object(n),!0).forEach(function(r){MAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MAe(e,t,n){return t=RAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RAe(e){var t=DAe(e,"string");return tp(t)=="symbol"?t:t+""}function DAe(e,t){if(tp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IAe(e,t){if(e==null)return{};var n=LAe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $Ae=function(t,n,r,i,s,a){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},FAe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,a=t.top,l=a===void 0?0:a,c=t.left,d=c===void 0?0:c,h=t.width,f=h===void 0?0:h,m=t.height,g=m===void 0?0:m,x=t.className,v=IAe(t,TAe),b=OAe({x:r,y:s,top:l,left:d,width:f,height:g},v);return!ke(r)||!ke(s)||!ke(f)||!ke(g)||!ke(l)||!ke(d)?null:X.createElement("path",OP({},We(b,!0),{className:ot("recharts-cross",x),d:$Ae(r,s,f,g,l,d)}))},U_,R3;function BAe(){if(R3)return U_;R3=1;var e=o0(),t=W9(),n=Hs();function r(i,s){return i&&i.length?e(i,n(s,2),t):void 0}return U_=r,U_}var qAe=BAe();const zAe=Ot(qAe);var V_,D3;function UAe(){if(D3)return V_;D3=1;var e=o0(),t=Hs(),n=H9();function r(i,s){return i&&i.length?e(i,t(s,2),n):void 0}return V_=r,V_}var VAe=UAe();const WAe=Ot(VAe);var HAe=["cx","cy","angle","ticks","axisLine"],KAe=["ticks","tick","angle","tickFormatter","stroke"];function Hu(e){"@babel/helpers - typeof";return Hu=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},Hu(e)}function fh(){return fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fh.apply(this,arguments)}function I3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I3(Object(n),!0).forEach(function(r){d0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L3(e,t){if(e==null)return{};var n=GAe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function YAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TH(r.key),r)}}function XAe(e,t,n){return t&&$3(e.prototype,t),n&&$3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QAe(e,t,n){return t=kv(t),JAe(e,EH()?Reflect.construct(t,n||[],kv(e).constructor):t.apply(e,n))}function JAe(e,t){if(t&&(Hu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZAe(e)}function ZAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EH=function(){return!!e})()}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function eke(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&&MP(e,t)}function MP(e,t){return MP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},MP(e,t)}function d0(e,t,n){return t=TH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TH(e){var t=tke(e,"string");return Hu(t)=="symbol"?t:t+""}function tke(e,t){if(Hu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var f0=(function(e){function t(){return YAe(this,t),QAe(this,t,arguments)}return eke(t,e),XAe(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,s=this.props,a=s.angle,l=s.cx,c=s.cy;return Zt(l,c,i,a)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,s=r.cy,a=r.angle,l=r.ticks,c=zAe(l,function(h){return h.coordinate||0}),d=WAe(l,function(h){return h.coordinate||0});return{cx:i,cy:s,startAngle:a,endAngle:a,innerRadius:d.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,a=r.angle,l=r.ticks,c=r.axisLine,d=L3(r,HAe),h=l.reduce(function(x,v){return[Math.min(x[0],v.coordinate),Math.max(x[1],v.coordinate)]},[1/0,-1/0]),f=Zt(i,s,h[0],a),m=Zt(i,s,h[1],a),g=hl(hl(hl({},We(d,!1)),{},{fill:"none"},We(c,!1)),{},{x1:f.x,y1:f.y,x2:m.x,y2:m.y});return X.createElement("line",fh({className:"recharts-polar-radius-axis-line"},g))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,a=i.tick,l=i.angle,c=i.tickFormatter,d=i.stroke,h=L3(i,KAe),f=this.getTickTextAnchor(),m=We(h,!1),g=We(a,!1),x=s.map(function(v,b){var j=r.getTickValueCoord(v),w=hl(hl(hl(hl({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(j.x,", ").concat(j.y,")")},m),{},{stroke:"none",fill:d},g),{},{index:b},j),{},{payload:v});return X.createElement(_t,fh({className:ot("recharts-polar-radius-axis-tick",xH(a)),key:"tick-".concat(v.coordinate)},tc(r.props,v,b)),t.renderTickItem(a,w,c?c(v.value,b):v.value))});return X.createElement(_t,{className:"recharts-polar-radius-axis-ticks"},x)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.axisLine,a=r.tick;return!i||!i.length?null:X.createElement(_t,{className:ot("recharts-polar-radius-axis",this.props.className)},s&&this.renderAxisLine(),a&&this.renderTicks(),Zn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,s){var a;return X.isValidElement(r)?a=X.cloneElement(r,i):rt(r)?a=r(i):a=X.createElement(nc,fh({},i,{className:"recharts-polar-radius-axis-tick-value"}),s),a}}])})(_.PureComponent);d0(f0,"displayName","PolarRadiusAxis");d0(f0,"axisType","radiusAxis");d0(f0,"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 Ku(e){"@babel/helpers - typeof";return Ku=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},Ku(e)}function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}function F3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F3(Object(n),!0).forEach(function(r){h0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MH(r.key),r)}}function rke(e,t,n){return t&&B3(e.prototype,t),n&&B3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ike(e,t,n){return t=Ev(t),ske(e,OH()?Reflect.construct(t,n||[],Ev(e).constructor):t.apply(e,n))}function ske(e,t){if(t&&(Ku(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ake(e)}function ake(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OH=function(){return!!e})()}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function oke(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(r,i){return r.__proto__=i,r},RP(e,t)}function h0(e,t,n){return t=MH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MH(e){var t=lke(e,"string");return Ku(t)=="symbol"?t:t+""}function lke(e,t){if(Ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cke=Math.PI/180,q3=1e-5,p0=(function(e){function t(){return nke(this,t),ike(this,t,arguments)}return oke(t,e),rke(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.cx,a=i.cy,l=i.radius,c=i.orientation,d=i.tickSize,h=d||8,f=Zt(s,a,l,r.coordinate),m=Zt(s,a,l+(c==="inner"?-1:1)*h,r.coordinate);return{x1:f.x,y1:f.y,x2:m.x,y2:m.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,s=Math.cos(-r.coordinate*cke),a;return s>q3?a=i==="outer"?"start":"end":s<-q3?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,a=r.radius,l=r.axisLine,c=r.axisLineType,d=pl(pl({},We(this.props,!1)),{},{fill:"none"},We(l,!1));if(c==="circle")return X.createElement(rm,jl({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:s,r:a}));var h=this.props.ticks,f=h.map(function(m){return Zt(i,s,a,m.coordinate)});return X.createElement(EAe,jl({className:"recharts-polar-angle-axis-line"},d,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,a=i.tick,l=i.tickLine,c=i.tickFormatter,d=i.stroke,h=We(this.props,!1),f=We(a,!1),m=pl(pl({},h),{},{fill:"none"},We(l,!1)),g=s.map(function(x,v){var b=r.getTickLineCoord(x),j=r.getTickTextAnchor(x),w=pl(pl(pl({textAnchor:j},h),{},{stroke:"none",fill:d},f),{},{index:v,payload:x,x:b.x2,y:b.y2});return X.createElement(_t,jl({className:ot("recharts-polar-angle-axis-tick",xH(a)),key:"tick-".concat(x.coordinate)},tc(r.props,x,v)),l&&X.createElement("line",jl({className:"recharts-polar-angle-axis-tick-line"},m,b)),a&&t.renderTickItem(a,w,c?c(x.value,v):x.value))});return X.createElement(_t,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.radius,a=r.axisLine;return s<=0||!i||!i.length?null:X.createElement(_t,{className:ot("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,s){var a;return X.isValidElement(r)?a=X.cloneElement(r,i):rt(r)?a=r(i):a=X.createElement(nc,jl({},i,{className:"recharts-polar-angle-axis-tick-value"}),s),a}}])})(_.PureComponent);h0(p0,"displayName","PolarAngleAxis");h0(p0,"axisType","angleAxis");h0(p0,"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 W_,z3;function uke(){if(z3)return W_;z3=1;var e=VW(),t=e(Object.getPrototypeOf,Object);return W_=t,W_}var H_,U3;function dke(){if(U3)return H_;U3=1;var e=La(),t=uke(),n=$a(),r="[object Object]",i=Function.prototype,s=Object.prototype,a=i.toString,l=s.hasOwnProperty,c=a.call(Object);function d(h){if(!n(h)||e(h)!=r)return!1;var f=t(h);if(f===null)return!0;var m=l.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&a.call(m)==c}return H_=d,H_}var fke=dke();const hke=Ot(fke);var K_,V3;function pke(){if(V3)return K_;V3=1;var e=La(),t=$a(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return K_=r,K_}var mke=pke();const gke=Ot(mke);function np(e){"@babel/helpers - typeof";return np=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},np(e)}function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(this,arguments)}function yke(e,t){return wke(e)||bke(e,t)||xke(e,t)||vke()}function vke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
777In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xke(e,t){if(e){if(typeof e=="string")return W3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W3(e,t)}}function W3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function wke(e){if(Array.isArray(e))return e}function H3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H3(Object(n),!0).forEach(function(r){jke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jke(e,t,n){return t=Ske(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ske(e){var t=_ke(e,"string");return np(t)=="symbol"?t:t+""}function _ke(e,t){if(np(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(np(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G3=function(t,n,r,i,s){var a=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-a/2,",").concat(n+s),l+="L ".concat(t+r-a/2-i,",").concat(n+s),l+="L ".concat(t,",").concat(n," Z"),l},Nke={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Cke=function(t){var n=K3(K3({},Nke),t),r=_.useRef(),i=_.useState(-1),s=yke(i,2),a=s[0],l=s[1];_.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&l(N)}catch{}},[]);var c=n.x,d=n.y,h=n.upperWidth,f=n.lowerWidth,m=n.height,g=n.className,x=n.animationEasing,v=n.animationDuration,b=n.animationBegin,j=n.isUpdateAnimationActive;if(c!==+c||d!==+d||h!==+h||f!==+f||m!==+m||h===0&&f===0||m===0)return null;var w=ot("recharts-trapezoid",g);return j?X.createElement(hs,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:d},to:{upperWidth:h,lowerWidth:f,height:m,x:c,y:d},duration:v,animationEasing:x,isActive:j},function(N){var k=N.upperWidth,C=N.lowerWidth,A=N.height,E=N.x,P=N.y;return X.createElement(hs,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:x},X.createElement("path",Tv({},We(n,!0),{className:w,d:G3(E,P,k,C,A),ref:r})))}):X.createElement("g",null,X.createElement("path",Tv({},We(n,!0),{className:w,d:G3(c,d,h,f,m)})))},Pke=["option","shapeType","propTransformer","activeClassName","isActive"];function rp(e){"@babel/helpers - typeof";return rp=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},rp(e)}function Ake(e,t){if(e==null)return{};var n=kke(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ov(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y3(Object(n),!0).forEach(function(r){Eke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eke(e,t,n){return t=Tke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tke(e){var t=Oke(e,"string");return rp(t)=="symbol"?t:t+""}function Oke(e,t){if(rp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mke(e,t){return Ov(Ov({},t),e)}function Rke(e,t){return e==="symbols"}function X3(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return X.createElement(O2,n);case"trapezoid":return X.createElement(Cke,n);case"sector":return X.createElement(jH,n);case"symbols":if(Rke(t))return X.createElement(Qk,n);break;default:return null}}function Dke(e){return _.isValidElement(e)?e.props:e}function RH(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Mke:r,s=e.activeClassName,a=s===void 0?"recharts-active-shape":s,l=e.isActive,c=Ake(e,Pke),d;if(_.isValidElement(t))d=_.cloneElement(t,Ov(Ov({},c),Dke(t)));else if(rt(t))d=t(c);else if(hke(t)&&!gke(t)){var h=i(t,c);d=X.createElement(X3,{shapeType:n,elementProps:h})}else{var f=c;d=X.createElement(X3,{shapeType:n,elementProps:f})}return l?X.createElement(_t,{className:a},d):d}function m0(e,t){return t!=null&&"trapezoids"in e.props}function g0(e,t){return t!=null&&"sectors"in e.props}function ip(e,t){return t!=null&&"points"in e.props}function Ike(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,s=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&s}function Lke(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function $ke(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Fke(e,t){var n;return m0(e,t)?n=Ike:g0(e,t)?n=Lke:ip(e,t)&&(n=$ke),n}function Bke(e,t){var n;return m0(e,t)?n="trapezoids":g0(e,t)?n="sectors":ip(e,t)&&(n="points"),n}function qke(e,t){if(m0(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}if(g0(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}return ip(e,t)?t.payload:{}}function zke(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Bke(n,t),s=qke(n,t),a=r.filter(function(c,d){var h=rc(s,c),f=n.props[i].filter(function(x){var v=Fke(n,t);return v(x,t)}),m=n.props[i].indexOf(f[f.length-1]),g=d===m;return h&&g}),l=r.indexOf(a[a.length-1]);return l}var Ny;function Gu(e){"@babel/helpers - typeof";return Gu=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},Gu(e)}function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nu.apply(this,arguments)}function Q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(n),!0).forEach(function(r){Li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IH(r.key),r)}}function Vke(e,t,n){return t&&J3(e.prototype,t),n&&J3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wke(e,t,n){return t=Mv(t),Hke(e,DH()?Reflect.construct(t,n||[],Mv(e).constructor):t.apply(e,n))}function Hke(e,t){if(t&&(Gu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kke(e)}function Kke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DH=function(){return!!e})()}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function Gke(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(r,i){return r.__proto__=i,r},DP(e,t)}function Li(e,t,n){return t=IH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IH(e){var t=Yke(e,"string");return Gu(t)=="symbol"?t:t+""}function Yke(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ba=(function(e){function t(n){var r;return Uke(this,t),r=Wke(this,t,[n]),Li(r,"pieRef",null),Li(r,"sectorRefs",[]),Li(r,"id",fc("recharts-pie-")),Li(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),rt(i)&&i()}),Li(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),rt(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Gke(t,e),Vke(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.label,l=s.labelLine,c=s.dataKey,d=s.valueKey,h=We(this.props,!1),f=We(a,!1),m=We(l,!1),g=a&&a.offsetRadius||20,x=r.map(function(v,b){var j=(v.startAngle+v.endAngle)/2,w=Zt(v.cx,v.cy,v.outerRadius+g,j),N=Xt(Xt(Xt(Xt({},h),v),{},{stroke:"none"},f),{},{index:b,textAnchor:t.getTextAnchor(w.x,v.cx)},w),k=Xt(Xt(Xt(Xt({},h),v),{},{fill:"none",stroke:v.fill},m),{},{index:b,points:[Zt(v.cx,v.cy,v.outerRadius,j),w]}),C=c;return at(c)&&at(d)?C="value":at(c)&&(C=d),X.createElement(_t,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(b)},l&&t.renderLabelLineItem(l,k,"line"),t.renderLabelItem(a,N,Sn(v,C)))});return X.createElement(_t,{className:"recharts-pie-labels"},x)}},{key:"renderSectorsStatically",value:function(r){var i=this,s=this.props,a=s.activeShape,l=s.blendStroke,c=s.inactiveShape;return r.map(function(d,h){if((d==null?void 0:d.startAngle)===0&&(d==null?void 0:d.endAngle)===0&&r.length!==1)return null;var f=i.isActiveIndex(h),m=c&&i.hasActiveIndex()?c:null,g=f?a:m,x=Xt(Xt({},d),{},{stroke:l?d.fill:d.stroke,tabIndex:-1});return X.createElement(_t,nu({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},tc(i.props,d,h),{key:"sector-".concat(d==null?void 0:d.startAngle,"-").concat(d==null?void 0:d.endAngle,"-").concat(d.midAngle,"-").concat(h)}),X.createElement(RH,nu({option:g,isActive:f,shapeType:"sector"},x)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,s=i.sectors,a=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,d=i.animationEasing,h=i.animationId,f=this.state,m=f.prevSectors,g=f.prevIsAnimationActive;return X.createElement(hs,{begin:l,duration:c,isActive:a,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(h,"-").concat(g),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(x){var v=x.t,b=[],j=s&&s[0],w=j.startAngle;return s.forEach(function(N,k){var C=m&&m[k],A=k>0?mi(N,"paddingAngle",0):0;if(C){var E=qn(C.endAngle-C.startAngle,N.endAngle-N.startAngle),P=Xt(Xt({},N),{},{startAngle:w+A,endAngle:w+E(v)+A});b.push(P),w=P.endAngle}else{var D=N.endAngle,B=N.startAngle,O=qn(0,D-B),M=O(v),$=Xt(Xt({},N),{},{startAngle:w+A,endAngle:w+M+A});b.push($),w=$.endAngle}}),X.createElement(_t,null,r.renderSectorsStatically(b))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(s){if(!s.altKey)switch(s.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,s=r.isAnimationActive,a=this.state.prevSectors;return s&&i&&i.length&&(!a||!rc(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,s=i.hide,a=i.sectors,l=i.className,c=i.label,d=i.cx,h=i.cy,f=i.innerRadius,m=i.outerRadius,g=i.isAnimationActive,x=this.state.isAnimationFinished;if(s||!a||!a.length||!ke(d)||!ke(h)||!ke(f)||!ke(m))return null;var v=ot("recharts-pie",l);return X.createElement(_t,{tabIndex:this.props.rootTabIndex,className:v,ref:function(j){r.pieRef=j}},this.renderSectors(),c&&this.renderLabels(a),Zn.renderCallByParent(this.props,null,!1),(!g||x)&&Is.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,s){if(X.isValidElement(r))return X.cloneElement(r,i);if(rt(r))return r(i);var a=ot("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return X.createElement(Vl,nu({},i,{key:s,type:"linear",className:a}))}},{key:"renderLabelItem",value:function(r,i,s){if(X.isValidElement(r))return X.cloneElement(r,i);var a=s;if(rt(r)&&(a=r(i),X.isValidElement(a)))return a;var l=ot("recharts-pie-label-text",typeof r!="boolean"&&!rt(r)?r.className:"");return X.createElement(nc,nu({},i,{alignmentBaseline:"middle",className:l}),a)}}])})(_.PureComponent);Ny=Ba;Li(Ba,"displayName","Pie");Li(Ba,"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:!Ho.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Li(Ba,"parseDeltaAngle",function(e,t){var n=Tr(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Li(Ba,"getRealPieData",function(e){var t=e.data,n=e.children,r=We(e,!1),i=gi(n,e0);return t&&t.length?t.map(function(s,a){return Xt(Xt(Xt({payload:s},r),s),i&&i[a]&&i[a].props)}):i&&i.length?i.map(function(s){return Xt(Xt({},r),s.props)}):[]});Li(Ba,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,s=t.height,a=vH(i,s),l=r+Or(e.cx,i,i/2),c=n+Or(e.cy,s,s/2),d=Or(e.innerRadius,a,0),h=Or(e.outerRadius,a,a*.8),f=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:l,cy:c,innerRadius:d,outerRadius:h,maxRadius:f}});Li(Ba,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Xt(Xt({},t.type.defaultProps),t.props):t.props,i=Ny.getRealPieData(r);if(!i||!i.length)return null;var s=r.cornerRadius,a=r.startAngle,l=r.endAngle,c=r.paddingAngle,d=r.dataKey,h=r.nameKey,f=r.valueKey,m=r.tooltipType,g=Math.abs(r.minAngle),x=Ny.parseCoordinateOfPie(r,n),v=Ny.parseDeltaAngle(a,l),b=Math.abs(v),j=d;at(d)&&at(f)?(ba(!1,`Use "dataKey" to specify the value of pie,
778      the props "valueKey" will be deprecated in 1.1.0`),j="value"):at(d)&&(ba(!1,`Use "dataKey" to specify the value of pie,
779      the props "valueKey" will be deprecated in 1.1.0`),j=f);var w=i.filter(function(P){return Sn(P,j,0)!==0}).length,N=(b>=360?w:w-1)*c,k=b-w*g-N,C=i.reduce(function(P,D){var B=Sn(D,j,0);return P+(ke(B)?B:0)},0),A;if(C>0){var E;A=i.map(function(P,D){var B=Sn(P,j,0),O=Sn(P,h,D),M=(ke(B)?B:0)/C,$;D?$=E.endAngle+Tr(v)*c*(B!==0?1:0):$=a;var F=$+Tr(v)*((B!==0?g:0)+M*k),W=($+F)/2,q=(x.innerRadius+x.outerRadius)/2,K=[{name:O,value:B,payload:P,dataKey:j,type:m}],L=Zt(x.cx,x.cy,q,W);return E=Xt(Xt(Xt({percent:M,cornerRadius:s,name:O,tooltipPayload:K,midAngle:W,middleRadius:q,tooltipPosition:L},P),x),{},{value:Sn(P,j),startAngle:$,endAngle:F,payload:P,paddingAngle:Tr(v)*c}),E})}return Xt(Xt({},x),{},{sectors:A,data:i})});var G_,Z3;function Xke(){if(Z3)return G_;Z3=1;var e=Math.ceil,t=Math.max;function n(r,i,s,a){for(var l=-1,c=t(e((i-r)/(s||1)),0),d=Array(c);c--;)d[a?c:++l]=r,r+=s;return d}return G_=n,G_}var Y_,e5;function LH(){if(e5)return Y_;e5=1;var e=a9(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var s=i<0?-1:1;return s*n}return i===i?i:0}return Y_=r,Y_}var X_,t5;function Qke(){if(t5)return X_;t5=1;var e=Xke(),t=Zx(),n=LH();function r(i){return function(s,a,l){return l&&typeof l!="number"&&t(s,a,l)&&(a=l=void 0),s=n(s),a===void 0?(a=s,s=0):a=n(a),l=l===void 0?s<a?1:-1:n(l),e(s,a,l,i)}}return X_=r,X_}var Q_,n5;function Jke(){if(n5)return Q_;n5=1;var e=Qke(),t=e();return Q_=t,Q_}var Zke=Jke();const Rv=Ot(Zke);function sp(e){"@babel/helpers - typeof";return sp=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},sp(e)}function r5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(n),!0).forEach(function(r){$H(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $H(e,t,n){return t=e2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e2e(e){var t=t2e(e,"string");return sp(t)=="symbol"?t:t+""}function t2e(e,t){if(sp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var n2e=["Webkit","Moz","O","ms"],r2e=function(t,n){var r=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=n2e.reduce(function(s,a){return i5(i5({},s),{},$H({},a+r,n))},{});return i[t]=n,i};function Yu(e){"@babel/helpers - typeof";return Yu=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},Yu(e)}function Dv(){return Dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dv.apply(this,arguments)}function s5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s5(Object(n),!0).forEach(function(r){li(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BH(r.key),r)}}function s2e(e,t,n){return t&&a5(e.prototype,t),n&&a5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a2e(e,t,n){return t=Iv(t),o2e(e,FH()?Reflect.construct(t,n||[],Iv(e).constructor):t.apply(e,n))}function o2e(e,t){if(t&&(Yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l2e(e)}function l2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FH=function(){return!!e})()}
vendor: 128,198 bytes, lines 779-784
779function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function c2e(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(r,i){return r.__proto__=i,r},IP(e,t)}function li(e,t,n){return t=BH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BH(e){var t=u2e(e,"string");return Yu(t)=="symbol"?t:t+""}function u2e(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var d2e=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,s=t.x,a=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,d=lh().domain(Rv(0,c)).range([s,s+a-l]),h=d.domain().map(function(f){return d(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(i),scale:d,scaleValues:h}},o5=function(t){return t.changedTouches&&!!t.changedTouches.length},Xu=(function(e){function t(n){var r;return i2e(this,t),r=a2e(this,t,[n]),li(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),li(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),li(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,a=i.onDragEnd,l=i.startIndex;a==null||a({endIndex:s,startIndex:l})}),r.detachDragEndListener()}),li(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),li(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),li(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),li(r,"handleSlideDragStart",function(i){var s=o5(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return c2e(t,e),s2e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,s=r.endX,a=this.state.scaleValues,l=this.props,c=l.gap,d=l.data,h=d.length-1,f=Math.min(i,s),m=Math.max(i,s),g=t.getIndexInRange(a,f),x=t.getIndexInRange(a,m);return{startIndex:g-g%c,endIndex:x===h?h:x-x%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,a=i.tickFormatter,l=i.dataKey,c=Sn(s[r],l,r);return rt(a)?a(c,r):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(r){var i=this.state,s=i.slideMoveStartX,a=i.startX,l=i.endX,c=this.props,d=c.x,h=c.width,f=c.travellerWidth,m=c.startIndex,g=c.endIndex,x=c.onChange,v=r.pageX-s;v>0?v=Math.min(v,d+h-f-l,d+h-f-a):v<0&&(v=Math.max(v,d-a,d-l));var b=this.getIndex({startX:a+v,endX:l+v});(b.startIndex!==m||b.endIndex!==g)&&x&&x(b),this.setState({startX:a+v,endX:l+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=o5(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,s=i.brushMoveStartX,a=i.movingTravellerId,l=i.endX,c=i.startX,d=this.state[a],h=this.props,f=h.x,m=h.width,g=h.travellerWidth,x=h.onChange,v=h.gap,b=h.data,j={startX:this.state.startX,endX:this.state.endX},w=r.pageX-s;w>0?w=Math.min(w,f+m-g-d):w<0&&(w=Math.max(w,f-d)),j[a]=d+w;var N=this.getIndex(j),k=N.startIndex,C=N.endIndex,A=function(){var P=b.length-1;return a==="startX"&&(l>c?k%v===0:C%v===0)||l<c&&C===P||a==="endX"&&(l>c?C%v===0:k%v===0)||l>c&&C===P};this.setState(li(li({},a,d+w),"brushMoveStartX",r.pageX),function(){x&&A()&&x(N)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,a=this.state,l=a.scaleValues,c=a.startX,d=a.endX,h=this.state[i],f=l.indexOf(h);if(f!==-1){var m=f+r;if(!(m===-1||m>=l.length)){var g=l[m];i==="startX"&&g>=d||i==="endX"&&g<=c||this.setState(li({},i,g),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,l=r.height,c=r.fill,d=r.stroke;return X.createElement("rect",{stroke:d,fill:c,x:i,y:s,width:a,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,l=r.height,c=r.data,d=r.children,h=r.padding,f=_.Children.only(d);return f?X.cloneElement(f,{x:i,y:s,width:a,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,a,l=this,c=this.props,d=c.y,h=c.travellerWidth,f=c.height,m=c.traveller,g=c.ariaLabel,x=c.data,v=c.startIndex,b=c.endIndex,j=Math.max(r,this.props.x),w=J_(J_({},We(this.props,!1)),{},{x:j,y:d,width:h,height:f}),N=g||"Min value: ".concat((s=x[v])===null||s===void 0?void 0:s.name,", Max value: ").concat((a=x[b])===null||a===void 0?void 0:a.name);return X.createElement(_t,{tabIndex:0,role:"slider","aria-label":N,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),l.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,w))}},{key:"renderSlide",value:function(r,i){var s=this.props,a=s.y,l=s.height,c=s.stroke,d=s.travellerWidth,h=Math.min(r,i)+d,f=Math.max(Math.abs(i-r)-d,0);return X.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:h,y:a,width:f,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,a=r.y,l=r.height,c=r.travellerWidth,d=r.stroke,h=this.state,f=h.startX,m=h.endX,g=5,x={pointerEvents:"none",fill:d};return X.createElement(_t,{className:"recharts-brush-texts"},X.createElement(nc,Dv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,m)-g,y:a+l/2},x),this.getTextOfTick(i)),X.createElement(nc,Dv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,m)+c+g,y:a+l/2},x),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,a=r.children,l=r.x,c=r.y,d=r.width,h=r.height,f=r.alwaysShowText,m=this.state,g=m.startX,x=m.endX,v=m.isTextActive,b=m.isSlideMoving,j=m.isTravellerMoving,w=m.isTravellerFocused;if(!i||!i.length||!ke(l)||!ke(c)||!ke(d)||!ke(h)||d<=0||h<=0)return null;var N=ot("recharts-brush",s),k=X.Children.count(a)===1,C=r2e("userSelect","none");return X.createElement(_t,{className:N,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),k&&this.renderPanorama(),this.renderSlide(g,x),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(x,"endX"),(v||b||j||w||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,a=r.width,l=r.height,c=r.stroke,d=Math.floor(s+l/2)-1;return X.createElement(X.Fragment,null,X.createElement("rect",{x:i,y:s,width:a,height:l,fill:c,stroke:"none"}),X.createElement("line",{x1:i+1,y1:d,x2:i+a-1,y2:d,fill:"none",stroke:"#fff"}),X.createElement("line",{x1:i+1,y1:d+2,x2:i+a-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return X.isValidElement(r)?s=X.cloneElement(r,i):rt(r)?s=r(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,a=r.width,l=r.x,c=r.travellerWidth,d=r.updateId,h=r.startIndex,f=r.endIndex;if(s!==i.prevData||d!==i.prevUpdateId)return J_({prevData:s,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:a},s&&s.length?d2e({data:s,width:a,x:l,travellerWidth:c,startIndex:h,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+a-c]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:s,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,a=0,l=s-1;l-a>1;){var c=Math.floor((a+l)/2);r[c]>i?l=c:a=c}return i>=r[l]?l:a}}])})(_.PureComponent);li(Xu,"displayName","Brush");li(Xu,"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 Z_,l5;function f2e(){if(l5)return Z_;l5=1;var e=i2();function t(n,r){var i;return e(n,function(s,a,l){return i=r(s,a,l),!i}),!!i}return Z_=t,Z_}var eN,c5;function h2e(){if(c5)return eN;c5=1;var e=LW(),t=Hs(),n=f2e(),r=ti(),i=Zx();function s(a,l,c){var d=r(a)?e:n;return c&&i(a,l,c)&&(l=void 0),d(a,t(l,3))}return eN=s,eN}var p2e=h2e();const m2e=Ot(p2e);var Ls=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},tN,u5;function g2e(){if(u5)return tN;u5=1;var e=t9();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return tN=t,tN}var nN,d5;function y2e(){if(d5)return nN;d5=1;var e=g2e(),t=ZW(),n=Hs();function r(i,s){var a={};return s=n(s,3),t(i,function(l,c,d){e(a,c,s(l,c,d))}),a}return nN=r,nN}var v2e=y2e();const x2e=Ot(v2e);var rN,f5;function b2e(){if(f5)return rN;f5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return rN=e,rN}var iN,h5;function w2e(){if(h5)return iN;h5=1;var e=i2();function t(n,r){var i=!0;return e(n,function(s,a,l){return i=!!r(s,a,l),i}),i}return iN=t,iN}var sN,p5;function j2e(){if(p5)return sN;p5=1;var e=b2e(),t=w2e(),n=Hs(),r=ti(),i=Zx();function s(a,l,c){var d=r(a)?e:t;return c&&i(a,l,c)&&(l=void 0),d(a,n(l,3))}return sN=s,sN}var S2e=j2e();const _2e=Ot(S2e);var N2e=["x","y"];function ap(e){"@babel/helpers - typeof";return ap=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},ap(e)}function LP(){return LP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LP.apply(this,arguments)}function m5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m5(Object(n),!0).forEach(function(r){C2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C2e(e,t,n){return t=P2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P2e(e){var t=A2e(e,"string");return ap(t)=="symbol"?t:t+""}function A2e(e,t){if(ap(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ap(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k2e(e,t){if(e==null)return{};var n=E2e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T2e(e,t){var n=e.x,r=e.y,i=k2e(e,N2e),s="".concat(n),a=parseInt(s,10),l="".concat(r),c=parseInt(l,10),d="".concat(t.height||i.height),h=parseInt(d,10),f="".concat(t.width||i.width),m=parseInt(f,10);return Uf(Uf(Uf(Uf(Uf({},t),i),a?{x:a}:{}),c?{y:c}:{}),{},{height:h,width:m,name:t.name,radius:t.radius})}function g5(e){return X.createElement(RH,LP({shapeType:"rectangle",propTransformer:T2e,activeClassName:"recharts-active-bar"},e))}var O2e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var s=ke(r)||nxe(r);return s?t(r,i):(s||sc(),n)}},M2e=["value","background"],qH;function Qu(e){"@babel/helpers - typeof";return Qu=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},Qu(e)}function R2e(e,t){if(e==null)return{};var n=D2e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(this,arguments)}function y5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(n),!0).forEach(function(r){Po(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,UH(r.key),r)}}function L2e(e,t,n){return t&&v5(e.prototype,t),n&&v5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $2e(e,t,n){return t=$v(t),F2e(e,zH()?Reflect.construct(t,n||[],$v(e).constructor):t.apply(e,n))}function F2e(e,t){if(t&&(Qu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B2e(e)}function B2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zH=function(){return!!e})()}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function q2e(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&&$P(e,t)}function $P(e,t){return $P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$P(e,t)}function Po(e,t,n){return t=UH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UH(e){var t=z2e(e,"string");return Qu(t)=="symbol"?t:t+""}function z2e(e,t){if(Qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gc=(function(e){function t(){var n;I2e(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=$2e(this,t,[].concat(i)),Po(n,"state",{isAnimationFinished:!1}),Po(n,"id",fc("recharts-bar-")),Po(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),a&&a()}),Po(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),a&&a()}),n}return q2e(t,e),L2e(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,a=s.shape,l=s.dataKey,c=s.activeIndex,d=s.activeBar,h=We(this.props,!1);return r&&r.map(function(f,m){var g=m===c,x=g?d:a,v=Pn(Pn(Pn({},h),f),{},{isActive:g,option:x,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return X.createElement(_t,Lv({className:"recharts-bar-rectangle"},tc(i.props,f,m),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(m)}),X.createElement(g5,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,a=i.layout,l=i.isAnimationActive,c=i.animationBegin,d=i.animationDuration,h=i.animationEasing,f=i.animationId,m=this.state.prevData;return X.createElement(hs,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var x=g.t,v=s.map(function(b,j){var w=m&&m[j];if(w){var N=qn(w.x,b.x),k=qn(w.y,b.y),C=qn(w.width,b.width),A=qn(w.height,b.height);return Pn(Pn({},b),{},{x:N(x),y:k(x),width:C(x),height:A(x)})}if(a==="horizontal"){var E=qn(0,b.height),P=E(x);return Pn(Pn({},b),{},{y:b.y+b.height-P,height:P})}var D=qn(0,b.width),B=D(x);return Pn(Pn({},b),{},{width:B})});return X.createElement(_t,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,a=this.state.prevData;return s&&i&&i.length&&(!a||!rc(a,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,a=i.dataKey,l=i.activeIndex,c=We(this.props.background,!1);return s.map(function(d,h){d.value;var f=d.background,m=R2e(d,M2e);if(!f)return null;var g=Pn(Pn(Pn(Pn(Pn({},m),{},{fill:"#eee"},f),c),tc(r.props,d,h)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:a,index:h,className:"recharts-bar-background-rectangle"});return X.createElement(g5,Lv({key:"background-bar-".concat(h),option:r.props.background,isActive:h===l},g))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.data,l=s.xAxis,c=s.yAxis,d=s.layout,h=s.children,f=gi(h,nm);if(!f)return null;var m=d==="vertical"?a[0].height/2:a[0].width/2,g=function(b,j){var w=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:w,errorVal:Sn(b,j)}},x={clipPath:r?"url(#clipPath-".concat(i,")"):null};return X.createElement(_t,x,f.map(function(v){return X.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:a,xAxis:l,yAxis:c,layout:d,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,a=r.className,l=r.xAxis,c=r.yAxis,d=r.left,h=r.top,f=r.width,m=r.height,g=r.isAnimationActive,x=r.background,v=r.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,j=ot("recharts-bar",a),w=l&&l.allowDataOverflow,N=c&&c.allowDataOverflow,k=w||N,C=at(v)?this.id:v;return X.createElement(_t,{className:j},w||N?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(C)},X.createElement("rect",{x:w?d:d-f/2,y:N?h:h-m/2,width:w?f:f*2,height:N?m:m*2}))):null,X.createElement(_t,{className:"recharts-bar-rectangles",clipPath:k?"url(#clipPath-".concat(C,")"):null},x?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(k,C),(!g||b)&&Is.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(_.PureComponent);qH=gc;Po(gc,"displayName","Bar");Po(gc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ho.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Po(gc,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,s=e.xAxis,a=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,d=e.stackedData,h=e.dataStartIndex,f=e.displayedData,m=e.offset,g=gNe(r,n);if(!g)return null;var x=t.layout,v=n.type.defaultProps,b=v!==void 0?Pn(Pn({},v),n.props):n.props,j=b.dataKey,w=b.children,N=b.minPointSize,k=x==="horizontal"?a:s,C=d?k.scale.domain():null,A=SNe({numericAxis:k}),E=gi(w,e0),P=f.map(function(D,B){var O,M,$,F,W,q;d?O=yNe(d[h+B],C):(O=Sn(D,j),Array.isArray(O)||(O=[A,O]));var K=O2e(N,qH.defaultProps.minPointSize)(O[1],B);if(x==="horizontal"){var L,H=[a.scale(O[0]),a.scale(O[1])],I=H[0],V=H[1];M=UF({axis:s,ticks:l,bandSize:i,offset:g.offset,entry:D,index:B}),$=(L=V??I)!==null&&L!==void 0?L:void 0,F=g.size;var G=I-V;if(W=Number.isNaN(G)?0:G,q={x:M,y:a.y,width:F,height:a.height},Math.abs(K)>0&&Math.abs(W)<Math.abs(K)){var z=Tr(W||K)*(Math.abs(K)-Math.abs(W));$-=z,W+=z}}else{var oe=[s.scale(O[0]),s.scale(O[1])],pe=oe[0],ue=oe[1];if(M=pe,$=UF({axis:a,ticks:c,bandSize:i,offset:g.offset,entry:D,index:B}),F=ue-pe,W=g.size,q={x:s.x,y:$,width:s.width,height:W},Math.abs(K)>0&&Math.abs(F)<Math.abs(K)){var me=Tr(F||K)*(Math.abs(K)-Math.abs(F));F+=me}}return Pn(Pn(Pn({},D),{},{x:M,y:$,width:F,height:W,value:d?O:O[1],payload:D,background:q},E&&E[B]&&E[B].props),{},{tooltipPayload:[gH(n,D)],tooltipPosition:{x:M+F/2,y:$+W/2}})});return Pn({data:P,layout:x},m)});function op(e){"@babel/helpers - typeof";return op=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},op(e)}function U2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VH(r.key),r)}}function V2e(e,t,n){return t&&x5(e.prototype,t),n&&x5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function as(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b5(Object(n),!0).forEach(function(r){y0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y0(e,t,n){return t=VH(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VH(e){var t=W2e(e,"string");return op(t)=="symbol"?t:t+""}function W2e(e,t){if(op(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var M2=function(t,n,r,i,s){var a=t.width,l=t.height,c=t.layout,d=t.children,h=Object.keys(n),f={left:r.left,leftMirror:r.left,right:a-r.right,rightMirror:a-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},m=!!ci(d,gc);return h.reduce(function(g,x){var v=n[x],b=v.orientation,j=v.domain,w=v.padding,N=w===void 0?{}:w,k=v.mirror,C=v.reversed,A="".concat(b).concat(k?"Mirror":""),E,P,D,B,O;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var M=j[1]-j[0],$=1/0,F=v.categoricalDomain.sort(sxe);if(F.forEach(function(oe,pe){pe>0&&($=Math.min((oe||0)-(F[pe-1]||0),$))}),Number.isFinite($)){var W=$/M,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(E=W*q/2),v.padding==="no-gap"){var K=Or(t.barCategoryGap,W*q),L=W*q/2;E=L-K-(L-K)/q*K}}}i==="xAxis"?P=[r.left+(N.left||0)+(E||0),r.left+r.width-(N.right||0)-(E||0)]:i==="yAxis"?P=c==="horizontal"?[r.top+r.height-(N.bottom||0),r.top+(N.top||0)]:[r.top+(N.top||0)+(E||0),r.top+r.height-(N.bottom||0)-(E||0)]:P=v.range,C&&(P=[P[1],P[0]]);var H=fH(v,s,m),I=H.scale,V=H.realScaleType;I.domain(j).range(P),hH(I);var G=pH(I,as(as({},v),{},{realScaleType:V}));i==="xAxis"?(O=b==="top"&&!k||b==="bottom"&&k,D=r.left,B=f[A]-O*v.height):i==="yAxis"&&(O=b==="left"&&!k||b==="right"&&k,D=f[A]-O*v.width,B=r.top);var z=as(as(as({},v),G),{},{realScaleType:V,x:D,y:B,scale:I,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return z.bandSize=jv(z,G),!v.hide&&i==="xAxis"?f[A]+=(O?-1:1)*z.height:v.hide||(f[A]+=(O?-1:1)*z.width),as(as({},g),{},y0({},x,z))},{})},WH=function(t,n){var r=t.x,i=t.y,s=n.x,a=n.y;return{x:Math.min(r,s),y:Math.min(i,a),width:Math.abs(s-r),height:Math.abs(a-i)}},H2e=function(t){var n=t.x1,r=t.y1,i=t.x2,s=t.y2;return WH({x:n,y:r},{x:i,y:s})},HH=(function(){function e(t){U2e(this,e),this.scale=t}return V2e(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(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,s=r.position;if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],s=r[r.length-1];return i<=s?n>=i&&n<=s:n>=s&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();y0(HH,"EPS",1e-4);var R2=function(t){var n=Object.keys(t).reduce(function(r,i){return as(as({},r),{},y0({},i,HH.create(t[i])))},{});return as(as({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=s.bandAware,l=s.position;return x2e(i,function(c,d){return n[d].apply(c,{bandAware:a,position:l})})},isInRange:function(i){return _2e(i,function(s,a){return n[a].isInRange(s)})}})};function K2e(e){return(e%180+180)%180}var G2e=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=K2e(i),a=s*Math.PI/180,l=Math.atan(r/n),c=a>l&&a<Math.PI-l?r/Math.sin(a):n/Math.cos(a);return Math.abs(c)},aN,w5;function Y2e(){if(w5)return aN;w5=1;var e=Hs(),t=Qp(),n=Qx();function r(i){return function(s,a,l){var c=Object(s);if(!t(s)){var d=e(a,3);s=n(s),a=function(f){return d(c[f],f,c)}}var h=i(s,a,l);return h>-1?c[d?s[h]:h]:void 0}}return aN=r,aN}var oN,j5;function X2e(){if(j5)return oN;j5=1;var e=LH();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return oN=t,oN}var lN,S5;function Q2e(){if(S5)return lN;S5=1;var e=GW(),t=Hs(),n=X2e(),r=Math.max;function i(s,a,l){var c=s==null?0:s.length;if(!c)return-1;var d=l==null?0:n(l);return d<0&&(d=r(c+d,0)),e(s,t(a,3),d)}return lN=i,lN}var cN,_5;function J2e(){if(_5)return cN;_5=1;var e=Y2e(),t=Q2e(),n=e(t);return cN=n,cN}J2e();var Z2e=cW();const eEe=Ot(Z2e);var tEe=eEe(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("")}),KH=_.createContext(void 0),GH=_.createContext(void 0),YH=_.createContext(void 0),nEe=_.createContext({}),XH=_.createContext(void 0),QH=_.createContext(0),JH=_.createContext(0),N5=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,a=t.clipPathId,l=t.children,c=t.width,d=t.height,h=tEe(s);return X.createElement(KH.Provider,{value:r},X.createElement(GH.Provider,{value:i},X.createElement(nEe.Provider,{value:s},X.createElement(YH.Provider,{value:h},X.createElement(XH.Provider,{value:a},X.createElement(QH.Provider,{value:d},X.createElement(JH.Provider,{value:c},l)))))))},rEe=function(){return _.useContext(XH)},ZH=function(t){var n=_.useContext(KH);n==null&&sc();var r=n[t];return r==null&&sc(),r},eK=function(t){var n=_.useContext(GH);n==null&&sc();var r=n[t];return r==null&&sc(),r},iEe=function(){var t=_.useContext(YH);return t},tK=function(){return _.useContext(JH)},nK=function(){return _.useContext(QH)};function Ju(e){"@babel/helpers - typeof";return Ju=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},Ju(e)}function sEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aEe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iK(r.key),r)}}function oEe(e,t,n){return t&&aEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lEe(e,t,n){return t=Fv(t),cEe(e,rK()?Reflect.construct(t,n||[],Fv(e).constructor):t.apply(e,n))}function cEe(e,t){if(t&&(Ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uEe(e)}function uEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rK=function(){return!!e})()}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function dEe(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(r,i){return r.__proto__=i,r},FP(e,t)}function C5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function P5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(n),!0).forEach(function(r){D2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D2(e,t,n){return t=iK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iK(e){var t=fEe(e,"string");return Ju(t)=="symbol"?t:t+""}function fEe(e,t){if(Ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hEe(e,t){return yEe(e)||gEe(e,t)||mEe(e,t)||pEe()}function pEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
780In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mEe(e,t){if(e){if(typeof e=="string")return A5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A5(e,t)}}function A5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function yEe(e){if(Array.isArray(e))return e}function BP(){return BP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BP.apply(this,arguments)}var vEe=function(t,n){var r;return X.isValidElement(t)?r=X.cloneElement(t,n):rt(t)?r=t(n):r=X.createElement("line",BP({},n,{className:"recharts-reference-line-line"})),r},xEe=function(t,n,r,i,s,a,l,c,d){var h=s.x,f=s.y,m=s.width,g=s.height;if(r){var x=d.y,v=t.y.apply(x,{position:a});if(Ls(d,"discard")&&!t.y.isInRange(v))return null;var b=[{x:h+m,y:v},{x:h,y:v}];return c==="left"?b.reverse():b}if(n){var j=d.x,w=t.x.apply(j,{position:a});if(Ls(d,"discard")&&!t.x.isInRange(w))return null;var N=[{x:w,y:f+g},{x:w,y:f}];return l==="top"?N.reverse():N}if(i){var k=d.segment,C=k.map(function(A){return t.apply(A,{position:a})});return Ls(d,"discard")&&m2e(C,function(A){return!t.isInRange(A)})?null:C}return null};function bEe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,s=e.yAxisId,a=e.shape,l=e.className,c=e.alwaysShow,d=rEe(),h=ZH(i),f=eK(s),m=iEe();if(!d||!m)return null;ba(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=R2({x:h.scale,y:f.scale}),x=zn(t),v=zn(n),b=r&&r.length===2,j=xEe(g,x,v,b,m,e.position,h.orientation,f.orientation,e);if(!j)return null;var w=hEe(j,2),N=w[0],k=N.x,C=N.y,A=w[1],E=A.x,P=A.y,D=Ls(e,"hidden")?"url(#".concat(d,")"):void 0,B=P5(P5({clipPath:D},We(e,!0)),{},{x1:k,y1:C,x2:E,y2:P});return X.createElement(_t,{className:ot("recharts-reference-line",l)},vEe(a,B),Zn.renderCallByParent(e,H2e({x1:k,y1:C,x2:E,y2:P})))}var I2=(function(e){function t(){return sEe(this,t),lEe(this,t,arguments)}return dEe(t,e),oEe(t,[{key:"render",value:function(){return X.createElement(bEe,this.props)}}])})(X.Component);D2(I2,"displayName","ReferenceLine");D2(I2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function qP(){return qP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qP.apply(this,arguments)}function Zu(e){"@babel/helpers - typeof";return Zu=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},Zu(e)}function k5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k5(Object(n),!0).forEach(function(r){v0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jEe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aK(r.key),r)}}function SEe(e,t,n){return t&&jEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Ee(e,t,n){return t=Bv(t),NEe(e,sK()?Reflect.construct(t,n||[],Bv(e).constructor):t.apply(e,n))}function NEe(e,t){if(t&&(Zu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CEe(e)}function CEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sK=function(){return!!e})()}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function PEe(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&&zP(e,t)}function zP(e,t){return zP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zP(e,t)}function v0(e,t,n){return t=aK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aK(e){var t=AEe(e,"string");return Zu(t)=="symbol"?t:t+""}function AEe(e,t){if(Zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kEe=function(t){var n=t.x,r=t.y,i=t.xAxis,s=t.yAxis,a=R2({x:i.scale,y:s.scale}),l=a.apply({x:n,y:r},{bandAware:!0});return Ls(t,"discard")&&!a.isInRange(l)?null:l},x0=(function(e){function t(){return wEe(this,t),_Ee(this,t,arguments)}return PEe(t,e),SEe(t,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,a=r.r,l=r.alwaysShow,c=r.clipPathId,d=zn(i),h=zn(s);if(ba(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!h)return null;var f=kEe(this.props);if(!f)return null;var m=f.x,g=f.y,x=this.props,v=x.shape,b=x.className,j=Ls(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=E5(E5({clipPath:j},We(this.props,!0)),{},{cx:m,cy:g});return X.createElement(_t,{className:ot("recharts-reference-dot",b)},t.renderDot(v,w),Zn.renderCallByParent(this.props,{x:m-a,y:g-a,width:2*a,height:2*a}))}}])})(X.Component);v0(x0,"displayName","ReferenceDot");v0(x0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});v0(x0,"renderDot",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):rt(e)?n=e(t):n=X.createElement(rm,qP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function UP(){return UP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UP.apply(this,arguments)}function ed(e){"@babel/helpers - typeof";return ed=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},ed(e)}function T5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(n),!0).forEach(function(r){b0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TEe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lK(r.key),r)}}function OEe(e,t,n){return t&&TEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MEe(e,t,n){return t=qv(t),REe(e,oK()?Reflect.construct(t,n||[],qv(e).constructor):t.apply(e,n))}function REe(e,t){if(t&&(ed(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DEe(e)}function DEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oK=function(){return!!e})()}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function IEe(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(r,i){return r.__proto__=i,r},VP(e,t)}function b0(e,t,n){return t=lK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lK(e){var t=LEe(e,"string");return ed(t)=="symbol"?t:t+""}function LEe(e,t){if(ed(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ed(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $Ee=function(t,n,r,i,s){var a=s.x1,l=s.x2,c=s.y1,d=s.y2,h=s.xAxis,f=s.yAxis;if(!h||!f)return null;var m=R2({x:h.scale,y:f.scale}),g={x:t?m.x.apply(a,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(c,{position:"start"}):m.y.rangeMin},x={x:n?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(d,{position:"end"}):m.y.rangeMax};return Ls(s,"discard")&&(!m.isInRange(g)||!m.isInRange(x))?null:WH(g,x)},w0=(function(e){function t(){return EEe(this,t),MEe(this,t,arguments)}return IEe(t,e),OEe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,a=r.y1,l=r.y2,c=r.className,d=r.alwaysShow,h=r.clipPathId;ba(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=zn(i),m=zn(s),g=zn(a),x=zn(l),v=this.props.shape;if(!f&&!m&&!g&&!x&&!v)return null;var b=$Ee(f,m,g,x,this.props);if(!b&&!v)return null;var j=Ls(this.props,"hidden")?"url(#".concat(h,")"):void 0;return X.createElement(_t,{className:ot("recharts-reference-area",c)},t.renderRect(v,O5(O5({clipPath:j},We(this.props,!0)),b)),Zn.renderCallByParent(this.props,b))}}])})(X.Component);b0(w0,"displayName","ReferenceArea");b0(w0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});b0(w0,"renderRect",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):rt(e)?n=e(t):n=X.createElement(O2,UP({},t,{className:"recharts-reference-area-rect"})),n});function cK(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function FEe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return G2e(r,n)}function BEe(e,t,n){var r=n==="width",i=e.x,s=e.y,a=e.width,l=e.height;return t===1?{start:r?i:s,end:r?i+a:s+l}:{start:r?i+a:s+l,end:r?i:s}}function zv(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var s=n();return e*(t-e*s/2-r)>=0&&e*(t+e*s/2-i)<=0}function qEe(e,t){return cK(e,t+1)}function zEe(e,t,n,r,i){for(var s=(r||[]).slice(),a=t.start,l=t.end,c=0,d=1,h=a,f=function(){var x=r==null?void 0:r[c];if(x===void 0)return{v:cK(r,d)};var v=c,b,j=function(){return b===void 0&&(b=n(x,v)),b},w=x.coordinate,N=c===0||zv(e,w,j,h,l);N||(c=0,h=a,d+=1),N&&(h=w+e*(j()/2+i),c+=d)},m;d<=s.length;)if(m=f(),m)return m.v;return[]}function lp(e){"@babel/helpers - typeof";return lp=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},lp(e)}function M5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(n),!0).forEach(function(r){UEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UEe(e,t,n){return t=VEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VEe(e){var t=WEe(e,"string");return lp(t)=="symbol"?t:t+""}function WEe(e,t){if(lp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HEe(e,t,n,r,i){for(var s=(r||[]).slice(),a=s.length,l=t.start,c=t.end,d=function(m){var g=s[m],x,v=function(){return x===void 0&&(x=n(g,m)),x};if(m===a-1){var b=e*(g.coordinate+e*v()/2-c);s[m]=g=mr(mr({},g),{},{tickCoord:b>0?g.coordinate-b*e:g.coordinate})}else s[m]=g=mr(mr({},g),{},{tickCoord:g.coordinate});var j=zv(e,g.tickCoord,v,l,c);j&&(c=g.tickCoord-e*(v()/2+i),s[m]=mr(mr({},g),{},{isShow:!0}))},h=a-1;h>=0;h--)d(h);return s}function KEe(e,t,n,r,i,s){var a=(r||[]).slice(),l=a.length,c=t.start,d=t.end;if(s){var h=r[l-1],f=n(h,l-1),m=e*(h.coordinate+e*f/2-d);a[l-1]=h=mr(mr({},h),{},{tickCoord:m>0?h.coordinate-m*e:h.coordinate});var g=zv(e,h.tickCoord,function(){return f},c,d);g&&(d=h.tickCoord-e*(f/2+i),a[l-1]=mr(mr({},h),{},{isShow:!0}))}for(var x=s?l-1:l,v=function(w){var N=a[w],k,C=function(){return k===void 0&&(k=n(N,w)),k};if(w===0){var A=e*(N.coordinate-e*C()/2-c);a[w]=N=mr(mr({},N),{},{tickCoord:A<0?N.coordinate-A*e:N.coordinate})}else a[w]=N=mr(mr({},N),{},{tickCoord:N.coordinate});var E=zv(e,N.tickCoord,C,c,d);E&&(c=N.tickCoord+e*(C()/2+i),a[w]=mr(mr({},N),{},{isShow:!0}))},b=0;b<x;b++)v(b);return a}function GEe(e,t,n){var r=e.tick,i=e.ticks,s=e.viewBox,a=e.minTickGap,l=e.orientation,c=e.interval,d=e.tickFormatter,h=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(ke(c)||Ho.isSsr)return qEe(i,typeof c=="number"&&ke(c)?c:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",x=h&&g==="width"?oh(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(N,k){var C=rt(d)?d(N.value,k):N.value;return g==="width"?FEe(oh(C,{fontSize:t,letterSpacing:n}),x,f):oh(C,{fontSize:t,letterSpacing:n})[g]},b=i.length>=2?Tr(i[1].coordinate-i[0].coordinate):1,j=BEe(s,b,g);return c==="equidistantPreserveStart"?zEe(b,j,v,i,a):(c==="preserveStart"||c==="preserveStartEnd"?m=KEe(b,j,v,i,a,c==="preserveStartEnd"):m=HEe(b,j,v,i,a),m.filter(function(w){return w.isShow}))}var YEe=["viewBox"],XEe=["viewBox"],QEe=["ticks"];function td(e){"@babel/helpers - typeof";return td=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},td(e)}function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ru.apply(this,arguments)}function R5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R5(Object(n),!0).forEach(function(r){L2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uN(e,t){if(e==null)return{};var n=JEe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JEe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ZEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dK(r.key),r)}}function eTe(e,t,n){return t&&D5(e.prototype,t),n&&D5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tTe(e,t,n){return t=Uv(t),nTe(e,uK()?Reflect.construct(t,n||[],Uv(e).constructor):t.apply(e,n))}function nTe(e,t){if(t&&(td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rTe(e)}function rTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uK=function(){return!!e})()}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function iTe(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(r,i){return r.__proto__=i,r},WP(e,t)}function L2(e,t,n){return t=dK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dK(e){var t=sTe(e,"string");return td(t)=="symbol"?t:t+""}function sTe(e,t){if(td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var j0=(function(e){function t(n){var r;return ZEe(this,t),r=tTe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return iTe(t,e),eTe(t,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,a=uN(r,YEe),l=this.props,c=l.viewBox,d=uN(l,XEe);return!vu(s,c)||!vu(a,d)||!vu(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.x,a=i.y,l=i.width,c=i.height,d=i.orientation,h=i.tickSize,f=i.mirror,m=i.tickMargin,g,x,v,b,j,w,N=f?-1:1,k=r.tickSize||h,C=ke(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":g=x=r.coordinate,b=a+ +!f*c,v=b-N*k,w=v-N*m,j=C;break;case"left":v=b=r.coordinate,x=s+ +!f*l,g=x-N*k,j=g-N*m,w=C;break;case"right":v=b=r.coordinate,x=s+ +f*l,g=x+N*k,j=g+N*m,w=C;break;default:g=x=r.coordinate,b=a+ +f*c,v=b+N*k,w=v+N*m,j=C;break}return{line:{x1:g,y1:v,x2:x,y2:b},tick:{x:j,y:w}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,a;switch(i){case"left":a=s?"start":"end";break;case"right":a=s?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,a="end";switch(i){case"left":case"right":a="middle";break;case"top":a=s?"start":"end";break;default:a=s?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,l=r.height,c=r.orientation,d=r.mirror,h=r.axisLine,f=$n($n($n({},We(this.props,!1)),We(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!d||c==="bottom"&&d);f=$n($n({},f),{},{x1:i,y1:s+m*l,x2:i+a,y2:s+m*l})}else{var g=+(c==="left"&&!d||c==="right"&&d);f=$n($n({},f),{},{x1:i+g*a,y1:s,x2:i+g*a,y2:s+l})}return X.createElement("line",ru({},f,{className:ot("recharts-cartesian-axis-line",mi(h,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var a=this,l=this.props,c=l.tickLine,d=l.stroke,h=l.tick,f=l.tickFormatter,m=l.unit,g=GEe($n($n({},this.props),{},{ticks:r}),i,s),x=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),b=We(this.props,!1),j=We(h,!1),w=$n($n({},b),{},{fill:"none"},We(c,!1)),N=g.map(function(k,C){var A=a.getTickLineCoord(k),E=A.line,P=A.tick,D=$n($n($n($n({textAnchor:x,verticalAnchor:v},b),{},{stroke:"none",fill:d},j),P),{},{index:C,payload:k,visibleTicksCount:g.length,tickFormatter:f});return X.createElement(_t,ru({className:"recharts-cartesian-axis-tick",key:"tick-".concat(k.value,"-").concat(k.coordinate,"-").concat(k.tickCoord)},tc(a.props,k,C)),c&&X.createElement("line",ru({},w,E,{className:ot("recharts-cartesian-axis-tick-line",mi(c,"className"))})),h&&t.renderTickItem(h,D,"".concat(rt(f)?f(k.value,C):k.value).concat(m||"")))});return X.createElement("g",{className:"recharts-cartesian-axis-ticks"},N)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,a=i.width,l=i.height,c=i.ticksGenerator,d=i.className,h=i.hide;if(h)return null;var f=this.props,m=f.ticks,g=uN(f,QEe),x=m;return rt(c)&&(x=m&&m.length>0?c(this.props):c(g)),a<=0||l<=0||!x||!x.length?null:X.createElement(_t,{className:ot("recharts-cartesian-axis",d),ref:function(b){r.layerReference=b}},s&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),Zn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var a,l=ot(i.className,"recharts-cartesian-axis-tick-value");return X.isValidElement(r)?a=X.cloneElement(r,$n($n({},i),{},{className:l})):rt(r)?a=r($n($n({},i),{},{className:l})):a=X.createElement(nc,ru({},i,{className:"recharts-cartesian-axis-tick-value"}),s),a}}])})(_.Component);L2(j0,"displayName","CartesianAxis");L2(j0,"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 aTe=["type","layout","connectNulls","ref"],oTe=["key"];function nd(e){"@babel/helpers - typeof";return nd=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},nd(e)}function I5(e,t){if(e==null)return{};var n=lTe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hh(){return hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hh.apply(this,arguments)}function L5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L5(Object(n),!0).forEach(function(r){os(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qc(e){return fTe(e)||dTe(e)||uTe(e)||cTe()}function cTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
781In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uTe(e,t){if(e){if(typeof e=="string")return HP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HP(e,t)}}function dTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fTe(e){if(Array.isArray(e))return HP(e)}function HP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hK(r.key),r)}}function pTe(e,t,n){return t&&$5(e.prototype,t),n&&$5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mTe(e,t,n){return t=Vv(t),gTe(e,fK()?Reflect.construct(t,n||[],Vv(e).constructor):t.apply(e,n))}function gTe(e,t){if(t&&(nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yTe(e)}function yTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fK=function(){return!!e})()}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function vTe(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&&KP(e,t)}function KP(e,t){return KP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},KP(e,t)}function os(e,t,n){return t=hK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hK(e){var t=xTe(e,"string");return nd(t)=="symbol"?t:t+""}function xTe(e,t){if(nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rd=(function(e){function t(){var n;hTe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=mTe(this,t,[].concat(i)),os(n,"state",{isAnimationFinished:!0,totalLength:0}),os(n,"generateSimpleStrokeDasharray",function(a,l){return"".concat(l,"px ").concat(a-l,"px")}),os(n,"getStrokeDasharray",function(a,l,c){var d=c.reduce(function(j,w){return j+w});if(!d)return n.generateSimpleStrokeDasharray(l,a);for(var h=Math.floor(a/d),f=a%d,m=l-a,g=[],x=0,v=0;x<c.length;v+=c[x],++x)if(v+c[x]>f){g=[].concat(Qc(c.slice(0,x)),[f-v]);break}var b=g.length%2===0?[0,m]:[m];return[].concat(Qc(t.repeat(c,h)),Qc(g),b).map(function(j){return"".concat(j,"px")}).join(", ")}),os(n,"id",fc("recharts-line-")),os(n,"pathRef",function(a){n.mainCurve=a}),os(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),os(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return vTe(t,e),pTe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.points,l=s.xAxis,c=s.yAxis,d=s.layout,h=s.children,f=gi(h,nm);if(!f)return null;var m=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Sn(v.payload,b)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return X.createElement(_t,g,f.map(function(x){return X.cloneElement(x,{key:"bar-".concat(x.props.dataKey),data:a,xAxis:l,yAxis:c,layout:d,dataPointFormatter:m})}))}},{key:"renderDots",value:function(r,i,s){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,d=l.points,h=l.dataKey,f=We(this.props,!1),m=We(c,!0),g=d.map(function(v,b){var j=oi(oi(oi({key:"dot-".concat(b),r:3},f),m),{},{index:b,cx:v.x,cy:v.y,value:v.value,dataKey:h,payload:v.payload,points:d});return t.renderDotItem(c,j)}),x={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return X.createElement(_t,hh({className:"recharts-line-dots",key:"dots"},x),g)}},{key:"renderCurveStatically",value:function(r,i,s,a){var l=this.props,c=l.type,d=l.layout,h=l.connectNulls;l.ref;var f=I5(l,aTe),m=oi(oi(oi({},We(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:r},a),{},{type:c,layout:d,connectNulls:h});return X.createElement(Vl,hh({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var s=this,a=this.props,l=a.points,c=a.strokeDasharray,d=a.isAnimationActive,h=a.animationBegin,f=a.animationDuration,m=a.animationEasing,g=a.animationId,x=a.animateNewValues,v=a.width,b=a.height,j=this.state,w=j.prevPoints,N=j.totalLength;return X.createElement(hs,{begin:h,duration:f,isActive:d,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(k){var C=k.t;if(w){var A=w.length/l.length,E=l.map(function(M,$){var F=Math.floor($*A);if(w[F]){var W=w[F],q=qn(W.x,M.x),K=qn(W.y,M.y);return oi(oi({},M),{},{x:q(C),y:K(C)})}if(x){var L=qn(v*2,M.x),H=qn(b/2,M.y);return oi(oi({},M),{},{x:L(C),y:H(C)})}return oi(oi({},M),{},{x:M.x,y:M.y})});return s.renderCurveStatically(E,r,i)}var P=qn(0,N),D=P(C),B;if(c){var O="".concat(c).split(/[,\s]+/gim).map(function(M){return parseFloat(M)});B=s.getStrokeDasharray(D,N,O)}else B=s.generateSimpleStrokeDasharray(N,D);return s.renderCurveStatically(l,r,i,{strokeDasharray:B})})}},{key:"renderCurve",value:function(r,i){var s=this.props,a=s.points,l=s.isAnimationActive,c=this.state,d=c.prevPoints,h=c.totalLength;return l&&a&&a.length&&(!d&&h>0||!rc(d,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,a=i.dot,l=i.points,c=i.className,d=i.xAxis,h=i.yAxis,f=i.top,m=i.left,g=i.width,x=i.height,v=i.isAnimationActive,b=i.id;if(s||!l||!l.length)return null;var j=this.state.isAnimationFinished,w=l.length===1,N=ot("recharts-line",c),k=d&&d.allowDataOverflow,C=h&&h.allowDataOverflow,A=k||C,E=at(b)?this.id:b,P=(r=We(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=P.r,B=D===void 0?3:D,O=P.strokeWidth,M=O===void 0?2:O,$=pW(a)?a:{},F=$.clipDot,W=F===void 0?!0:F,q=B*2+M;return X.createElement(_t,{className:N},k||C?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(E)},X.createElement("rect",{x:k?m:m-g/2,y:C?f:f-x/2,width:k?g:g*2,height:C?x:x*2})),!W&&X.createElement("clipPath",{id:"clipPath-dots-".concat(E)},X.createElement("rect",{x:m-q/2,y:f-q/2,width:g+q,height:x+q}))):null,!w&&this.renderCurve(A,E),this.renderErrorBar(A,E),(w||a)&&this.renderDots(A,W,E),(!v||j)&&Is.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var s=r.length%2!==0?[].concat(Qc(r),[0]):r,a=[],l=0;l<i;++l)a=[].concat(Qc(a),Qc(s));return a}},{key:"renderDotItem",value:function(r,i){var s;if(X.isValidElement(r))s=X.cloneElement(r,i);else if(rt(r))s=r(i);else{var a=i.key,l=I5(i,oTe),c=ot("recharts-line-dot",typeof r!="boolean"?r.className:"");s=X.createElement(rm,hh({key:a},l,{className:c}))}return s}}])})(_.PureComponent);os(rd,"displayName","Line");os(rd,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Ho.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});os(rd,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,a=e.dataKey,l=e.bandSize,c=e.displayedData,d=e.offset,h=t.layout,f=c.map(function(m,g){var x=Sn(m,a);return h==="horizontal"?{x:wv({axis:n,ticks:i,bandSize:l,entry:m,index:g}),y:at(x)?null:r.scale(x),value:x,payload:m}:{x:at(x)?null:n.scale(x),y:wv({axis:r,ticks:s,bandSize:l,entry:m,index:g}),value:x,payload:m}});return oi({points:f,layout:h},d)});var bTe=["layout","type","stroke","connectNulls","isRange","ref"],wTe=["key"],pK;function id(e){"@babel/helpers - typeof";return id=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},id(e)}function mK(e,t){if(e==null)return{};var n=jTe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kl.apply(this,arguments)}function F5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){Os(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function STe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yK(r.key),r)}}function _Te(e,t,n){return t&&B5(e.prototype,t),n&&B5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function NTe(e,t,n){return t=Wv(t),CTe(e,gK()?Reflect.construct(t,n||[],Wv(e).constructor):t.apply(e,n))}function CTe(e,t){if(t&&(id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PTe(e)}function PTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gK=function(){return!!e})()}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function ATe(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(r,i){return r.__proto__=i,r},GP(e,t)}function Os(e,t,n){return t=yK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yK(e){var t=kTe(e,"string");return id(t)=="symbol"?t:t+""}function kTe(e,t){if(id(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ma=(function(e){function t(){var n;STe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=NTe(this,t,[].concat(i)),Os(n,"state",{isAnimationFinished:!0}),Os(n,"id",fc("recharts-area-")),Os(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),rt(a)&&a()}),Os(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),rt(a)&&a()}),n}return ATe(t,e),_Te(t,[{key:"renderDots",value:function(r,i,s){var a=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(a&&!l)return null;var c=this.props,d=c.dot,h=c.points,f=c.dataKey,m=We(this.props,!1),g=We(d,!0),x=h.map(function(b,j){var w=fo(fo(fo({key:"dot-".concat(j),r:3},m),g),{},{index:j,cx:b.x,cy:b.y,dataKey:f,value:b.value,payload:b.payload,points:h});return t.renderDotItem(d,w)}),v={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return X.createElement(_t,kl({className:"recharts-area-dots"},v),x)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,s=i.baseLine,a=i.points,l=i.strokeWidth,c=a[0].x,d=a[a.length-1].x,h=r*Math.abs(c-d),f=Co(a.map(function(m){return m.y||0}));return ke(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Co(s.map(function(m){return m.y||0})),f)),ke(f)?X.createElement("rect",{x:c<d?c:c-h,y:0,width:h,height:Math.floor(f+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,s=i.baseLine,a=i.points,l=i.strokeWidth,c=a[0].y,d=a[a.length-1].y,h=r*Math.abs(c-d),f=Co(a.map(function(m){return m.x||0}));return ke(s)&&typeof s=="number"?f=Math.max(s,f):s&&Array.isArray(s)&&s.length&&(f=Math.max(Co(s.map(function(m){return m.x||0})),f)),ke(f)?X.createElement("rect",{x:0,y:c<d?c:c-h,width:f+(l?parseInt("".concat(l),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,s,a){var l=this.props,c=l.layout,d=l.type,h=l.stroke,f=l.connectNulls,m=l.isRange;l.ref;var g=mK(l,bTe);return X.createElement(_t,{clipPath:s?"url(#clipPath-".concat(a,")"):null},X.createElement(Vl,kl({},We(g,!0),{points:r,connectNulls:f,type:d,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&X.createElement(Vl,kl({},We(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:f,fill:"none",points:r})),h!=="none"&&m&&X.createElement(Vl,kl({},We(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var s=this,a=this.props,l=a.points,c=a.baseLine,d=a.isAnimationActive,h=a.animationBegin,f=a.animationDuration,m=a.animationEasing,g=a.animationId,x=this.state,v=x.prevPoints,b=x.prevBaseLine;return X.createElement(hs,{begin:h,duration:f,isActive:d,easing:m,from:{t:0},to:{t:1},key:"area-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var w=j.t;if(v){var N=v.length/l.length,k=l.map(function(P,D){var B=Math.floor(D*N);if(v[B]){var O=v[B],M=qn(O.x,P.x),$=qn(O.y,P.y);return fo(fo({},P),{},{x:M(w),y:$(w)})}return P}),C;if(ke(c)&&typeof c=="number"){var A=qn(b,c);C=A(w)}else if(at(c)||Md(c)){var E=qn(b,0);C=E(w)}else C=c.map(function(P,D){var B=Math.floor(D*N);if(b[B]){var O=b[B],M=qn(O.x,P.x),$=qn(O.y,P.y);return fo(fo({},P),{},{x:M(w),y:$(w)})}return P});return s.renderAreaStatically(k,C,r,i)}return X.createElement(_t,null,X.createElement("defs",null,X.createElement("clipPath",{id:"animationClipPath-".concat(i)},s.renderClipRect(w))),X.createElement(_t,{clipPath:"url(#animationClipPath-".concat(i,")")},s.renderAreaStatically(l,c,r,i)))})}},{key:"renderArea",value:function(r,i){var s=this.props,a=s.points,l=s.baseLine,c=s.isAnimationActive,d=this.state,h=d.prevPoints,f=d.prevBaseLine,m=d.totalLength;return c&&a&&a.length&&(!h&&m>0||!rc(h,a)||!rc(f,l))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,l,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,a=i.dot,l=i.points,c=i.className,d=i.top,h=i.left,f=i.xAxis,m=i.yAxis,g=i.width,x=i.height,v=i.isAnimationActive,b=i.id;if(s||!l||!l.length)return null;var j=this.state.isAnimationFinished,w=l.length===1,N=ot("recharts-area",c),k=f&&f.allowDataOverflow,C=m&&m.allowDataOverflow,A=k||C,E=at(b)?this.id:b,P=(r=We(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=P.r,B=D===void 0?3:D,O=P.strokeWidth,M=O===void 0?2:O,$=pW(a)?a:{},F=$.clipDot,W=F===void 0?!0:F,q=B*2+M;return X.createElement(_t,{className:N},k||C?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(E)},X.createElement("rect",{x:k?h:h-g/2,y:C?d:d-x/2,width:k?g:g*2,height:C?x:x*2})),!W&&X.createElement("clipPath",{id:"clipPath-dots-".concat(E)},X.createElement("rect",{x:h-q/2,y:d-q/2,width:g+q,height:x+q}))):null,w?null:this.renderArea(A,E),(a||w)&&this.renderDots(A,W,E),(!v||j)&&Is.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(_.PureComponent);pK=Ma;Os(Ma,"displayName","Area");Os(Ma,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ho.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Os(Ma,"getBaseValue",function(e,t,n,r){var i=e.layout,s=e.baseValue,a=t.props.baseValue,l=a??s;if(ke(l)&&typeof l=="number")return l;var c=i==="horizontal"?r:n,d=c.scale.domain();if(c.type==="number"){var h=Math.max(d[0],d[1]),f=Math.min(d[0],d[1]);return l==="dataMin"?f:l==="dataMax"||h<0?h:Math.max(Math.min(d[0],d[1]),0)}return l==="dataMin"?d[0]:l==="dataMax"?d[1]:d[0]});Os(Ma,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,s=e.xAxisTicks,a=e.yAxisTicks,l=e.bandSize,c=e.dataKey,d=e.stackedData,h=e.dataStartIndex,f=e.displayedData,m=e.offset,g=t.layout,x=d&&d.length,v=pK.getBaseValue(t,n,r,i),b=g==="horizontal",j=!1,w=f.map(function(k,C){var A;x?A=d[h+C]:(A=Sn(k,c),Array.isArray(A)?j=!0:A=[v,A]);var E=A[1]==null||x&&Sn(k,c)==null;return b?{x:wv({axis:r,ticks:s,bandSize:l,entry:k,index:C}),y:E?null:i.scale(A[1]),value:A,payload:k}:{x:E?null:r.scale(A[1]),y:wv({axis:i,ticks:a,bandSize:l,entry:k,index:C}),value:A,payload:k}}),N;return x||j?N=w.map(function(k){var C=Array.isArray(k.value)?k.value[0]:null;return b?{x:k.x,y:C!=null&&k.y!=null?i.scale(C):null}:{x:C!=null?r.scale(C):null,y:k.y}}):N=b?i.scale(v):r.scale(v),fo({points:w,baseLine:N,layout:g,isRange:j},m)});Os(Ma,"renderDotItem",function(e,t){var n;if(X.isValidElement(e))n=X.cloneElement(e,t);else if(rt(e))n=e(t);else{var r=ot("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,s=mK(t,wTe);n=X.createElement(rm,kl({},s,{key:i,className:r}))}return n});function sd(e){"@babel/helpers - typeof";return sd=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},sd(e)}function ETe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bK(r.key),r)}}function OTe(e,t,n){return t&&TTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MTe(e,t,n){return t=Hv(t),RTe(e,vK()?Reflect.construct(t,n||[],Hv(e).constructor):t.apply(e,n))}function RTe(e,t){if(t&&(sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DTe(e)}function DTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vK=function(){return!!e})()}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function ITe(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&&YP(e,t)}function YP(e,t){return YP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YP(e,t)}function xK(e,t,n){return t=bK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bK(e){var t=LTe(e,"string");return sd(t)=="symbol"?t:t+""}function LTe(e,t){if(sd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function XP(){return XP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XP.apply(this,arguments)}function $Te(e){var t=e.xAxisId,n=tK(),r=nK(),i=ZH(t);return i==null?null:_.createElement(j0,XP({},i,{className:ot("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(a){return Al(a,!0)}}))}var Lo=(function(e){function t(){return ETe(this,t),MTe(this,t,arguments)}return ITe(t,e),OTe(t,[{key:"render",value:function(){return _.createElement($Te,this.props)}}])})(_.Component);xK(Lo,"displayName","XAxis");xK(Lo,"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 ad(e){"@babel/helpers - typeof";return ad=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},ad(e)}function FTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SK(r.key),r)}}function qTe(e,t,n){return t&&BTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zTe(e,t,n){return t=Kv(t),UTe(e,wK()?Reflect.construct(t,n||[],Kv(e).constructor):t.apply(e,n))}function UTe(e,t){if(t&&(ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VTe(e)}function VTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wK=function(){return!!e})()}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function WTe(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&&QP(e,t)}function QP(e,t){return QP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QP(e,t)}function jK(e,t,n){return t=SK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SK(e){var t=HTe(e,"string");return ad(t)=="symbol"?t:t+""}function HTe(e,t){if(ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function JP(){return JP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JP.apply(this,arguments)}var KTe=function(t){var n=t.yAxisId,r=tK(),i=nK(),s=eK(n);return s==null?null:_.createElement(j0,JP({},s,{className:ot("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return Al(l,!0)}}))},$o=(function(e){function t(){return FTe(this,t),zTe(this,t,arguments)}return WTe(t,e),qTe(t,[{key:"render",value:function(){return _.createElement(KTe,this.props)}}])})(_.Component);jK($o,"displayName","YAxis");jK($o,"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 q5(e){return QTe(e)||XTe(e)||YTe(e)||GTe()}function GTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
782In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YTe(e,t){if(e){if(typeof e=="string")return ZP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZP(e,t)}}function XTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QTe(e){if(Array.isArray(e))return ZP(e)}function ZP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eA=function(t,n,r,i,s){var a=gi(t,I2),l=gi(t,x0),c=[].concat(q5(a),q5(l)),d=gi(t,w0),h="".concat(i,"Id"),f=i[0],m=n;if(c.length&&(m=c.reduce(function(v,b){if(b.props[h]===r&&Ls(b.props,"extendDomain")&&ke(b.props[f])){var j=b.props[f];return[Math.min(v[0],j),Math.max(v[1],j)]}return v},m)),d.length){var g="".concat(f,"1"),x="".concat(f,"2");m=d.reduce(function(v,b){if(b.props[h]===r&&Ls(b.props,"extendDomain")&&ke(b.props[g])&&ke(b.props[x])){var j=b.props[g],w=b.props[x];return[Math.min(v[0],j,w),Math.max(v[1],j,w)]}return v},m)}return s&&s.length&&(m=s.reduce(function(v,b){return ke(b)?[Math.min(v[0],b),Math.max(v[1],b)]:v},m)),m},dN={exports:{}},z5;function JTe(){return z5||(z5=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function s(c,d,h,f,m){if(typeof h!="function")throw new TypeError("The listener must be a function");var g=new i(h,f||c,m),x=n?n+d:d;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],g]:c._events[x].push(g):(c._events[x]=g,c._eventsCount++),c}function a(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,f;if(this._eventsCount===0)return d;for(f in h=this._events)t.call(h,f)&&d.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.prototype.listeners=function(d){var h=n?n+d:d,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,g=f.length,x=new Array(g);m<g;m++)x[m]=f[m].fn;return x},l.prototype.listenerCount=function(d){var h=n?n+d:d,f=this._events[h];return f?f.fn?1:f.length:0},l.prototype.emit=function(d,h,f,m,g,x){var v=n?n+d:d;if(!this._events[v])return!1;var b=this._events[v],j=arguments.length,w,N;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),j){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,h),!0;case 3:return b.fn.call(b.context,h,f),!0;case 4:return b.fn.call(b.context,h,f,m),!0;case 5:return b.fn.call(b.context,h,f,m,g),!0;case 6:return b.fn.call(b.context,h,f,m,g,x),!0}for(N=1,w=new Array(j-1);N<j;N++)w[N-1]=arguments[N];b.fn.apply(b.context,w)}else{var k=b.length,C;for(N=0;N<k;N++)switch(b[N].once&&this.removeListener(d,b[N].fn,void 0,!0),j){case 1:b[N].fn.call(b[N].context);break;case 2:b[N].fn.call(b[N].context,h);break;case 3:b[N].fn.call(b[N].context,h,f);break;case 4:b[N].fn.call(b[N].context,h,f,m);break;default:if(!w)for(C=1,w=new Array(j-1);C<j;C++)w[C-1]=arguments[C];b[N].fn.apply(b[N].context,w)}}return!0},l.prototype.on=function(d,h,f){return s(this,d,h,f,!1)},l.prototype.once=function(d,h,f){return s(this,d,h,f,!0)},l.prototype.removeListener=function(d,h,f,m){var g=n?n+d:d;if(!this._events[g])return this;if(!h)return a(this,g),this;var x=this._events[g];if(x.fn)x.fn===h&&(!m||x.once)&&(!f||x.context===f)&&a(this,g);else{for(var v=0,b=[],j=x.length;v<j;v++)(x[v].fn!==h||m&&!x[v].once||f&&x[v].context!==f)&&b.push(x[v]);b.length?this._events[g]=b.length===1?b[0]:b:a(this,g)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&a(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(dN)),dN.exports}var ZTe=JTe();const eOe=Ot(ZTe);var fN=new eOe,hN="recharts.syncMouseEvents";function cp(e){"@babel/helpers - typeof";return cp=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},cp(e)}function tOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nOe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_K(r.key),r)}}function rOe(e,t,n){return t&&nOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pN(e,t,n){return t=_K(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _K(e){var t=iOe(e,"string");return cp(t)=="symbol"?t:t+""}function iOe(e,t){if(cp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sOe=(function(){function e(){tOe(this,e),pN(this,"activeIndex",0),pN(this,"coordinateList",[]),pN(this,"layout","horizontal")}return rOe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,a=n.container,l=a===void 0?null:a,c=n.layout,d=c===void 0?null:c,h=n.offset,f=h===void 0?null:h,m=n.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=d??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=g??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(n){if(this.coordinateList.length!==0)switch(n.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(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,a=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=s+c+d,m=a+this.offset.top+l/2+h;this.mouseHandlerCallback({pageX:f,pageY:m})}}}])})();function aOe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&ke(r)&&ke(i))return!0}return!1}function oOe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function NK(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,s=e.endAngle,a=Zt(t,n,r,i),l=Zt(t,n,r,s);return{points:[a,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function lOe(e,t,n){var r,i,s,a;if(e==="horizontal")r=t.x,s=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,s=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,d=t.innerRadius,h=t.outerRadius,f=t.angle,m=Zt(l,c,d,f),g=Zt(l,c,h,f);r=m.x,i=m.y,s=g.x,a=g.y}else return NK(t);return[{x:r,y:i},{x:s,y:a}]}function up(e){"@babel/helpers - typeof";return up=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},up(e)}function U5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U5(Object(n),!0).forEach(function(r){cOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cOe(e,t,n){return t=uOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uOe(e){var t=dOe(e,"string");return up(t)=="symbol"?t:t+""}function dOe(e,t){if(up(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(up(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fOe(e){var t,n,r=e.element,i=e.tooltipEventType,s=e.isActive,a=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,h=e.tooltipAxisBandSize,f=e.layout,m=e.chartName,g=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!g||!s||!a||m!=="ScatterChart"&&i!=="axis")return null;var x,v=Vl;if(m==="ScatterChart")x=a,v=FAe;else if(m==="BarChart")x=oOe(f,a,c,h),v=O2;else if(f==="radial"){var b=NK(a),j=b.cx,w=b.cy,N=b.radius,k=b.startAngle,C=b.endAngle;x={cx:j,cy:w,startAngle:k,endAngle:C,innerRadius:N,outerRadius:N},v=jH}else x={points:lOe(f,a,c)},v=Vl;var A=Zg(Zg(Zg(Zg({stroke:"#ccc",pointerEvents:"none"},c),x),We(g,!1)),{},{payload:l,payloadIndex:d,className:ot("recharts-tooltip-cursor",g.className)});return _.isValidElement(g)?_.cloneElement(g,A):_.createElement(v,A)}var hOe=["item"],pOe=["children","className","width","height","style","compact","title","desc"];function od(e){"@babel/helpers - typeof";return od=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},od(e)}function iu(){return iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iu.apply(this,arguments)}function V5(e,t){return yOe(e)||gOe(e,t)||PK(e,t)||mOe()}function mOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
783In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gOe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,l=[],c=!0,d=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return l}}function yOe(e){if(Array.isArray(e))return e}function W5(e,t){if(e==null)return{};var n=vOe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bOe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AK(r.key),r)}}function wOe(e,t,n){return t&&bOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jOe(e,t,n){return t=Gv(t),SOe(e,CK()?Reflect.construct(t,n||[],Gv(e).constructor):t.apply(e,n))}function SOe(e,t){if(t&&(od(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Oe(e)}function _Oe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CK=function(){return!!e})()}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function NOe(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&&tA(e,t)}function tA(e,t){return tA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tA(e,t)}function ld(e){return AOe(e)||POe(e)||PK(e)||COe()}function COe(){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 PK(e,t){if(e){if(typeof e=="string")return nA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nA(e,t)}}function POe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AOe(e){if(Array.isArray(e))return nA(e)}function nA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(n),!0).forEach(function(r){Ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ze(e,t,n){return t=AK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AK(e){var t=kOe(e,"string");return od(t)=="symbol"?t:t+""}function kOe(e,t){if(od(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(od(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EOe={xAxis:["bottom","top"],yAxis:["left","right"]},TOe={width:"100%",height:"100%"},kK={x:0,y:0};function ey(e){return e}var OOe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},MOe=function(t,n,r,i){var s=n.find(function(h){return h&&h.index===r});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var a=s.coordinate,l=i.radius;return he(he(he({},i),Zt(i.cx,i.cy,l,a)),{},{angle:a,radius:l})}var c=s.coordinate,d=i.angle;return he(he(he({},i),Zt(i.cx,i.cy,c,d)),{},{angle:d,radius:c})}return kK},S0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,a=(r??[]).reduce(function(l,c){var d=c.props.data;return d&&d.length?[].concat(ld(l),ld(d)):l},[]);return a.length>0?a:t&&t.length&&ke(i)&&ke(s)?t.slice(i,s+1):[]};function EK(e){return e==="number"?[0,"auto"]:void 0}var rA=function(t,n,r,i){var s=t.graphicalItems,a=t.tooltipAxis,l=S0(n,t);return r<0||!s||!s.length||r>=l.length?null:s.reduce(function(c,d){var h,f=(h=d.props.data)!==null&&h!==void 0?h:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(a.dataKey&&!a.allowDuplicatedCategory){var g=f===void 0?l:f;m=Yy(g,a.dataKey,i)}else m=f&&f[r]||l[r];return m?[].concat(ld(c),[gH(d,m)]):c},[])},K5=function(t,n,r,i){var s=i||{x:t.chartX,y:t.chartY},a=OOe(s,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,d=t.tooltipTicks,h=uNe(a,l,d,c);if(h>=0&&d){var f=d[h]&&d[h].value,m=rA(t,n,h,f),g=MOe(r,l,h,s);return{activeTooltipIndex:h,activeLabel:f,activePayload:m,activeCoordinate:g}}return null},ROe=function(t,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,a=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,d=n.dataEndIndex,h=t.layout,f=t.children,m=t.stackOffset,g=dH(h,s);return r.reduce(function(x,v){var b,j=v.type.defaultProps!==void 0?he(he({},v.type.defaultProps),v.props):v.props,w=j.type,N=j.dataKey,k=j.allowDataOverflow,C=j.allowDuplicatedCategory,A=j.scale,E=j.ticks,P=j.includeHidden,D=j[a];if(x[D])return x;var B=S0(t.data,{graphicalItems:i.filter(function(G){var z,oe=a in G.props?G.props[a]:(z=G.type.defaultProps)===null||z===void 0?void 0:z[a];return oe===D}),dataStartIndex:c,dataEndIndex:d}),O=B.length,M,$,F;aOe(j.domain,k,w)&&(M=gP(j.domain,null,k),g&&(w==="number"||A!=="auto")&&(F=ch(B,N,"category")));var W=EK(w);if(!M||M.length===0){var q,K=(q=j.domain)!==null&&q!==void 0?q:W;if(N){if(M=ch(B,N,w),w==="category"&&g){var L=ixe(M);C&&L?($=M,M=Rv(0,O)):C||(M=HF(K,M,v).reduce(function(G,z){return G.indexOf(z)>=0?G:[].concat(ld(G),[z])},[]))}else if(w==="category")C?M=M.filter(function(G){return G!==""&&!at(G)}):M=HF(K,M,v).reduce(function(G,z){return G.indexOf(z)>=0||z===""||at(z)?G:[].concat(ld(G),[z])},[]);else if(w==="number"){var H=mNe(B,i.filter(function(G){var z,oe,pe=a in G.props?G.props[a]:(z=G.type.defaultProps)===null||z===void 0?void 0:z[a],ue="hide"in G.props?G.props.hide:(oe=G.type.defaultProps)===null||oe===void 0?void 0:oe.hide;return pe===D&&(P||!ue)}),N,s,h);H&&(M=H)}g&&(w==="number"||A!=="auto")&&(F=ch(B,N,"category"))}else g?M=Rv(0,O):l&&l[D]&&l[D].hasStack&&w==="number"?M=m==="expand"?[0,1]:mH(l[D].stackGroups,c,d):M=uH(B,i.filter(function(G){var z=a in G.props?G.props[a]:G.type.defaultProps[a],oe="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return z===D&&(P||!oe)}),w,h,!0);if(w==="number")M=eA(f,M,D,s,E),K&&(M=gP(K,M,k));else if(w==="category"&&K){var I=K,V=M.every(function(G){return I.indexOf(G)>=0});V&&(M=I)}}return he(he({},x),{},Ze({},D,he(he({},j),{},{axisType:s,domain:M,categoricalDomain:F,duplicateDomain:$,originalDomain:(b=j.domain)!==null&&b!==void 0?b:W,isCategorical:g,layout:h})))},{})},DOe=function(t,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,a=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,d=n.dataEndIndex,h=t.layout,f=t.children,m=S0(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:d}),g=m.length,x=dH(h,s),v=-1;return r.reduce(function(b,j){var w=j.type.defaultProps!==void 0?he(he({},j.type.defaultProps),j.props):j.props,N=w[a],k=EK("number");if(!b[N]){v++;var C;return x?C=Rv(0,g):l&&l[N]&&l[N].hasStack?(C=mH(l[N].stackGroups,c,d),C=eA(f,C,N,s)):(C=gP(k,uH(m,r.filter(function(A){var E,P,D=a in A.props?A.props[a]:(E=A.type.defaultProps)===null||E===void 0?void 0:E[a],B="hide"in A.props?A.props.hide:(P=A.type.defaultProps)===null||P===void 0?void 0:P.hide;return D===N&&!B}),"number",h),i.defaultProps.allowDataOverflow),C=eA(f,C,N,s)),he(he({},b),{},Ze({},N,he(he({axisType:s},i.defaultProps),{},{hide:!0,orientation:mi(EOe,"".concat(s,".").concat(v%2),null),domain:C,originalDomain:k,isCategorical:x,layout:h})))}return b},{})},IOe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,a=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,d=n.dataEndIndex,h=t.children,f="".concat(i,"Id"),m=gi(h,s),g={};return m&&m.length?g=ROe(t,{axes:m,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:d}):a&&a.length&&(g=DOe(t,{Axis:s,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:d})),g},LOe=function(t){var n=Zc(t),r=Al(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:s2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:jv(n,r)}},G5=function(t){var n=t.children,r=t.defaultShowTooltip,i=ci(n,Xu),s=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},$Oe=function(t){return!t||!t.length?!1:t.some(function(n){var r=xa(n&&n.type);return r&&r.indexOf("Bar")>=0})},Y5=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"}},FOe=function(t,n){var r=t.props,i=t.graphicalItems,s=t.xAxisMap,a=s===void 0?{}:s,l=t.yAxisMap,c=l===void 0?{}:l,d=r.width,h=r.height,f=r.children,m=r.margin||{},g=ci(f,Xu),x=ci(f,ql),v=Object.keys(c).reduce(function(C,A){var E=c[A],P=E.orientation;return!E.mirror&&!E.hide?he(he({},C),{},Ze({},P,C[P]+E.width)):C},{left:m.left||0,right:m.right||0}),b=Object.keys(a).reduce(function(C,A){var E=a[A],P=E.orientation;return!E.mirror&&!E.hide?he(he({},C),{},Ze({},P,mi(C,"".concat(P))+E.height)):C},{top:m.top||0,bottom:m.bottom||0}),j=he(he({},b),v),w=j.bottom;g&&(j.bottom+=g.props.height||Xu.defaultProps.height),x&&n&&(j=hNe(j,i,r,n));var N=d-j.left-j.right,k=h-j.top-j.bottom;return he(he({brushBottom:w},j),{},{width:Math.max(N,0),height:Math.max(k,0)})},BOe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},_0=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,a=t.validateTooltipEventTypes,l=a===void 0?["axis"]:a,c=t.axisComponents,d=t.legendContent,h=t.formatAxisMap,f=t.defaultProps,m=function(j,w){var N=w.graphicalItems,k=w.stackGroups,C=w.offset,A=w.updateId,E=w.dataStartIndex,P=w.dataEndIndex,D=j.barSize,B=j.layout,O=j.barGap,M=j.barCategoryGap,$=j.maxBarSize,F=Y5(B),W=F.numericAxisName,q=F.cateAxisName,K=$Oe(N),L=[];return N.forEach(function(H,I){var V=S0(j.data,{graphicalItems:[H],dataStartIndex:E,dataEndIndex:P}),G=H.type.defaultProps!==void 0?he(he({},H.type.defaultProps),H.props):H.props,z=G.dataKey,oe=G.maxBarSize,pe=G["".concat(W,"Id")],ue=G["".concat(q,"Id")],me={},Ne=c.reduce(function(Hn,Nr){var ge=w["".concat(Nr.axisType,"Map")],Je=G["".concat(Nr.axisType,"Id")];ge&&ge[Je]||Nr.axisType==="zAxis"||sc();var At=ge[Je];return he(he({},Hn),{},Ze(Ze({},Nr.axisType,At),"".concat(Nr.axisType,"Ticks"),Al(At)))},me),ee=Ne[q],de=Ne["".concat(q,"Ticks")],be=k&&k[pe]&&k[pe].hasStack&&_Ne(H,k[pe].stackGroups),ae=xa(H.type).indexOf("Bar")>=0,Ke=jv(ee,de),Ue=[],jt=K&&dNe({barSize:D,stackGroups:k,totalSize:BOe(Ne,q)});if(ae){var qe,Rt,nr=at(oe)?$:oe,vn=(qe=(Rt=jv(ee,de,!0))!==null&&Rt!==void 0?Rt:nr)!==null&&qe!==void 0?qe:0;Ue=fNe({barGap:O,barCategoryGap:M,bandSize:vn!==Ke?vn:Ke,sizeList:jt[ue],maxBarSize:nr}),vn!==Ke&&(Ue=Ue.map(function(Hn){return he(he({},Hn),{},{position:he(he({},Hn.position),{},{offset:Hn.position.offset-vn/2})})}))}var _r=H&&H.type&&H.type.getComposedData;_r&&L.push({props:he(he({},_r(he(he({},Ne),{},{displayedData:V,props:j,dataKey:z,item:H,bandSize:Ke,barPosition:Ue,offset:C,stackedData:be,layout:B,dataStartIndex:E,dataEndIndex:P}))),{},Ze(Ze(Ze({key:H.key||"item-".concat(I)},W,Ne[W]),q,Ne[q]),"animationId",A)),childIndex:gxe(H,j.children),item:H})}),L},g=function(j,w){var N=j.props,k=j.dataStartIndex,C=j.dataEndIndex,A=j.updateId;if(!oL({props:N}))return null;var E=N.children,P=N.layout,D=N.stackOffset,B=N.data,O=N.reverseStackOrder,M=Y5(P),$=M.numericAxisName,F=M.cateAxisName,W=gi(E,r),q=jNe(B,W,"".concat($,"Id"),"".concat(F,"Id"),D,O),K=c.reduce(function(G,z){var oe="".concat(z.axisType,"Map");return he(he({},G),{},Ze({},oe,IOe(N,he(he({},z),{},{graphicalItems:W,stackGroups:z.axisType===$&&q,dataStartIndex:k,dataEndIndex:C}))))},{}),L=FOe(he(he({},K),{},{props:N,graphicalItems:W}),w==null?void 0:w.legendBBox);Object.keys(K).forEach(function(G){K[G]=h(N,K[G],L,G.replace("Map",""),n)});var H=K["".concat(F,"Map")],I=LOe(H),V=m(N,he(he({},K),{},{dataStartIndex:k,dataEndIndex:C,updateId:A,graphicalItems:W,stackGroups:q,offset:L}));return he(he({formattedGraphicalItems:V,graphicalItems:W,offset:L,stackGroups:q},I),K)},x=(function(b){function j(w){var N,k,C;return xOe(this,j),C=jOe(this,j,[w]),Ze(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ze(C,"accessibilityManager",new sOe),Ze(C,"handleLegendBBoxUpdate",function(A){if(A){var E=C.state,P=E.dataStartIndex,D=E.dataEndIndex,B=E.updateId;C.setState(he({legendBBox:A},g({props:C.props,dataStartIndex:P,dataEndIndex:D,updateId:B},he(he({},C.state),{},{legendBBox:A}))))}}),Ze(C,"handleReceiveSyncEvent",function(A,E,P){if(C.props.syncId===A){if(P===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(E)}}),Ze(C,"handleBrushChange",function(A){var E=A.startIndex,P=A.endIndex;if(E!==C.state.dataStartIndex||P!==C.state.dataEndIndex){var D=C.state.updateId;C.setState(function(){return he({dataStartIndex:E,dataEndIndex:P},g({props:C.props,dataStartIndex:E,dataEndIndex:P,updateId:D},C.state))}),C.triggerSyncEvent({dataStartIndex:E,dataEndIndex:P})}}),Ze(C,"handleMouseEnter",function(A){var E=C.getMouseInfo(A);if(E){var P=he(he({},E),{},{isTooltipActive:!0});C.setState(P),C.triggerSyncEvent(P);var D=C.props.onMouseEnter;rt(D)&&D(P,A)}}),Ze(C,"triggeredAfterMouseMove",function(A){var E=C.getMouseInfo(A),P=E?he(he({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(P),C.triggerSyncEvent(P);var D=C.props.onMouseMove;rt(D)&&D(P,A)}),Ze(C,"handleItemMouseEnter",function(A){C.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Ze(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),Ze(C,"handleMouseMove",function(A){A.persist(),C.throttleTriggeredAfterMouseMove(A)}),Ze(C,"handleMouseLeave",function(A){C.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};C.setState(E),C.triggerSyncEvent(E);var P=C.props.onMouseLeave;rt(P)&&P(E,A)}),Ze(C,"handleOuterEvent",function(A){var E=mxe(A),P=mi(C.props,"".concat(E));if(E&&rt(P)){var D,B;/.*touch.*/i.test(E)?B=C.getMouseInfo(A.changedTouches[0]):B=C.getMouseInfo(A),P((D=B)!==null&&D!==void 0?D:{},A)}}),Ze(C,"handleClick",function(A){var E=C.getMouseInfo(A);if(E){var P=he(he({},E),{},{isTooltipActive:!0});C.setState(P),C.triggerSyncEvent(P);var D=C.props.onClick;rt(D)&&D(P,A)}}),Ze(C,"handleMouseDown",function(A){var E=C.props.onMouseDown;if(rt(E)){var P=C.getMouseInfo(A);E(P,A)}}),Ze(C,"handleMouseUp",function(A){var E=C.props.onMouseUp;if(rt(E)){var P=C.getMouseInfo(A);E(P,A)}}),Ze(C,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Ze(C,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&C.handleMouseDown(A.changedTouches[0])}),Ze(C,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&C.handleMouseUp(A.changedTouches[0])}),Ze(C,"handleDoubleClick",function(A){var E=C.props.onDoubleClick;if(rt(E)){var P=C.getMouseInfo(A);E(P,A)}}),Ze(C,"handleContextMenu",function(A){var E=C.props.onContextMenu;if(rt(E)){var P=C.getMouseInfo(A);E(P,A)}}),Ze(C,"triggerSyncEvent",function(A){C.props.syncId!==void 0&&fN.emit(hN,C.props.syncId,A,C.eventEmitterSymbol)}),Ze(C,"applySyncEvent",function(A){var E=C.props,P=E.layout,D=E.syncMethod,B=C.state.updateId,O=A.dataStartIndex,M=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)C.setState(he({dataStartIndex:O,dataEndIndex:M},g({props:C.props,dataStartIndex:O,dataEndIndex:M,updateId:B},C.state)));else if(A.activeTooltipIndex!==void 0){var $=A.chartX,F=A.chartY,W=A.activeTooltipIndex,q=C.state,K=q.offset,L=q.tooltipTicks;if(!K)return;if(typeof D=="function")W=D(L,A);else if(D==="value"){W=-1;for(var H=0;H<L.length;H++)if(L[H].value===A.activeLabel){W=H;break}}var I=he(he({},K),{},{x:K.left,y:K.top}),V=Math.min($,I.x+I.width),G=Math.min(F,I.y+I.height),z=L[W]&&L[W].value,oe=rA(C.state,C.props.data,W),pe=L[W]?{x:P==="horizontal"?L[W].coordinate:V,y:P==="horizontal"?G:L[W].coordinate}:kK;C.setState(he(he({},A),{},{activeLabel:z,activeCoordinate:pe,activePayload:oe,activeTooltipIndex:W}))}else C.setState(A)}),Ze(C,"renderCursor",function(A){var E,P=C.state,D=P.isTooltipActive,B=P.activeCoordinate,O=P.activePayload,M=P.offset,$=P.activeTooltipIndex,F=P.tooltipAxisBandSize,W=C.getTooltipEventType(),q=(E=A.props.active)!==null&&E!==void 0?E:D,K=C.props.layout,L=A.key||"_recharts-cursor";return X.createElement(fOe,{key:L,activeCoordinate:B,activePayload:O,activeTooltipIndex:$,chartName:n,element:A,isActive:q,layout:K,offset:M,tooltipAxisBandSize:F,tooltipEventType:W})}),Ze(C,"renderPolarAxis",function(A,E,P){var D=mi(A,"type.axisType"),B=mi(C.state,"".concat(D,"Map")),O=A.type.defaultProps,M=O!==void 0?he(he({},O),A.props):A.props,$=B&&B[M["".concat(D,"Id")]];return _.cloneElement(A,he(he({},$),{},{className:ot(D,$.className),key:A.key||"".concat(E,"-").concat(P),ticks:Al($,!0)}))}),Ze(C,"renderPolarGrid",function(A){var E=A.props,P=E.radialLines,D=E.polarAngles,B=E.polarRadius,O=C.state,M=O.radiusAxisMap,$=O.angleAxisMap,F=Zc(M),W=Zc($),q=W.cx,K=W.cy,L=W.innerRadius,H=W.outerRadius;return _.cloneElement(A,{polarAngles:Array.isArray(D)?D:Al(W,!0).map(function(I){return I.coordinate}),polarRadius:Array.isArray(B)?B:Al(F,!0).map(function(I){return I.coordinate}),cx:q,cy:K,innerRadius:L,outerRadius:H,key:A.key||"polar-grid",radialLines:P})}),Ze(C,"renderLegend",function(){var A=C.state.formattedGraphicalItems,E=C.props,P=E.children,D=E.width,B=E.height,O=C.props.margin||{},M=D-(O.left||0)-(O.right||0),$=lH({children:P,formattedGraphicalItems:A,legendWidth:M,legendContent:d});if(!$)return null;var F=$.item,W=W5($,hOe);return _.cloneElement(F,he(he({},W),{},{chartWidth:D,chartHeight:B,margin:O,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),Ze(C,"renderTooltip",function(){var A,E=C.props,P=E.children,D=E.accessibilityLayer,B=ci(P,ui);if(!B)return null;var O=C.state,M=O.isTooltipActive,$=O.activeCoordinate,F=O.activePayload,W=O.activeLabel,q=O.offset,K=(A=B.props.active)!==null&&A!==void 0?A:M;return _.cloneElement(B,{viewBox:he(he({},q),{},{x:q.left,y:q.top}),active:K,label:W,payload:K?F:[],coordinate:$,accessibilityLayer:D})}),Ze(C,"renderBrush",function(A){var E=C.props,P=E.margin,D=E.data,B=C.state,O=B.offset,M=B.dataStartIndex,$=B.dataEndIndex,F=B.updateId;return _.cloneElement(A,{key:A.key||"_recharts-brush",onChange:Yg(C.handleBrushChange,A.props.onChange),data:D,x:ke(A.props.x)?A.props.x:O.left,y:ke(A.props.y)?A.props.y:O.top+O.height+O.brushBottom-(P.bottom||0),width:ke(A.props.width)?A.props.width:O.width,startIndex:M,endIndex:$,updateId:"brush-".concat(F)})}),Ze(C,"renderReferenceElement",function(A,E,P){if(!A)return null;var D=C,B=D.clipPathId,O=C.state,M=O.xAxisMap,$=O.yAxisMap,F=O.offset,W=A.type.defaultProps||{},q=A.props,K=q.xAxisId,L=K===void 0?W.xAxisId:K,H=q.yAxisId,I=H===void 0?W.yAxisId:H;return _.cloneElement(A,{key:A.key||"".concat(E,"-").concat(P),xAxis:M[L],yAxis:$[I],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:B})}),Ze(C,"renderActivePoints",function(A){var E=A.item,P=A.activePoint,D=A.basePoint,B=A.childIndex,O=A.isRange,M=[],$=E.props.key,F=E.item.type.defaultProps!==void 0?he(he({},E.item.type.defaultProps),E.item.props):E.item.props,W=F.activeDot,q=F.dataKey,K=he(he({index:B,dataKey:q,cx:P.x,cy:P.y,r:4,fill:T2(E.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},We(W,!1)),Xy(W));return M.push(j.renderActiveDot(W,K,"".concat($,"-activePoint-").concat(B))),D?M.push(j.renderActiveDot(W,he(he({},K),{},{cx:D.x,cy:D.y}),"".concat($,"-basePoint-").concat(B))):O&&M.push(null),M}),Ze(C,"renderGraphicChild",function(A,E,P){var D=C.filterFormatItem(A,E,P);if(!D)return null;var B=C.getTooltipEventType(),O=C.state,M=O.isTooltipActive,$=O.tooltipAxis,F=O.activeTooltipIndex,W=O.activeLabel,q=C.props.children,K=ci(q,ui),L=D.props,H=L.points,I=L.isRange,V=L.baseLine,G=D.item.type.defaultProps!==void 0?he(he({},D.item.type.defaultProps),D.item.props):D.item.props,z=G.activeDot,oe=G.hide,pe=G.activeBar,ue=G.activeShape,me=!!(!oe&&M&&K&&(z||pe||ue)),Ne={};B!=="axis"&&K&&K.props.trigger==="click"?Ne={onClick:Yg(C.handleItemMouseEnter,A.props.onClick)}:B!=="axis"&&(Ne={onMouseLeave:Yg(C.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:Yg(C.handleItemMouseEnter,A.props.onMouseEnter)});var ee=_.cloneElement(A,he(he({},D.props),Ne));function de(Nr){return typeof $.dataKey=="function"?$.dataKey(Nr.payload):null}if(me)if(F>=0){var be,ae;if($.dataKey&&!$.allowDuplicatedCategory){var Ke=typeof $.dataKey=="function"?de:"payload.".concat($.dataKey.toString());be=Yy(H,Ke,W),ae=I&&V&&Yy(V,Ke,W)}else be=H==null?void 0:H[F],ae=I&&V&&V[F];if(ue||pe){var Ue=A.props.activeIndex!==void 0?A.props.activeIndex:F;return[_.cloneElement(A,he(he(he({},D.props),Ne),{},{activeIndex:Ue})),null,null]}if(!at(be))return[ee].concat(ld(C.renderActivePoints({item:D,activePoint:be,basePoint:ae,childIndex:F,isRange:I})))}else{var jt,qe=(jt=C.getItemByXY(C.state.activeCoordinate))!==null&&jt!==void 0?jt:{graphicalItem:ee},Rt=qe.graphicalItem,nr=Rt.item,vn=nr===void 0?A:nr,_r=Rt.childIndex,Hn=he(he(he({},D.props),Ne),{},{activeIndex:_r});return[_.cloneElement(vn,Hn),null,null]}return I?[ee,null,null]:[ee,null]}),Ze(C,"renderCustomized",function(A,E,P){return _.cloneElement(A,he(he({key:"recharts-customized-".concat(P)},C.props),C.state))}),Ze(C,"renderMap",{CartesianGrid:{handler:ey,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:ey},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:ey},YAxis:{handler:ey},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((N=w.id)!==null&&N!==void 0?N:fc("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=o9(C.triggeredAfterMouseMove,(k=w.throttleDelay)!==null&&k!==void 0?k:1e3/60),C.state={},C}return NOe(j,b),wOe(j,[{key:"componentDidMount",value:function(){var N,k;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var N=this.props,k=N.children,C=N.data,A=N.height,E=N.layout,P=ci(k,ui);if(P){var D=P.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var B=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,O=rA(this.state,C,D,B),M=this.state.tooltipTicks[D].coordinate,$=(this.state.offset.top+A)/2,F=E==="horizontal",W=F?{x:M,y:$}:{y:M,x:$},q=this.state.formattedGraphicalItems.find(function(L){var H=L.item;return H.type.name==="Scatter"});q&&(W=he(he({},W),q.props.points[D].tooltipPosition),O=q.props.points[D].tooltipPayload);var K={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:B,activePayload:O,activeCoordinate:W};this.setState(K),this.renderCursor(P),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(N,k){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==k.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==N.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==N.margin){var C,A;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(N){$C([ci(N.children,ui)],[ci(this.props.children,ui)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var N=ci(this.props.children,ui);if(N&&typeof N.props.shared=="boolean"){var k=N.props.shared?"axis":"item";return l.indexOf(k)>=0?k:s}return s}},{key:"getMouseInfo",value:function(N){if(!this.container)return null;var k=this.container,C=k.getBoundingClientRect(),A=n1e(C),E={chartX:Math.round(N.pageX-A.left),chartY:Math.round(N.pageY-A.top)},P=C.width/k.offsetWidth||1,D=this.inRange(E.chartX,E.chartY,P);if(!D)return null;var B=this.state,O=B.xAxisMap,M=B.yAxisMap,$=this.getTooltipEventType(),F=K5(this.state,this.props.data,this.props.layout,D);if($!=="axis"&&O&&M){var W=Zc(O).scale,q=Zc(M).scale,K=W&&W.invert?W.invert(E.chartX):null,L=q&&q.invert?q.invert(E.chartY):null;return he(he({},E),{},{xValue:K,yValue:L},F)}return F?he(he({},E),F):null}},{key:"inRange",value:function(N,k){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,E=N/C,P=k/C;if(A==="horizontal"||A==="vertical"){var D=this.state.offset,B=E>=D.left&&E<=D.left+D.width&&P>=D.top&&P<=D.top+D.height;return B?{x:E,y:P}:null}var O=this.state,M=O.angleAxisMap,$=O.radiusAxisMap;if(M&&$){var F=Zc(M);return YF({x:E,y:P},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var N=this.props.children,k=this.getTooltipEventType(),C=ci(N,ui),A={};C&&k==="axis"&&(C.props.trigger==="click"?A={onClick:this.handleClick}:A={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var E=Xy(this.props,this.handleOuterEvent);return he(he({},E),A)}},{key:"addListener",value:function(){fN.on(hN,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){fN.removeListener(hN,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(N,k,C){for(var A=this.state.formattedGraphicalItems,E=0,P=A.length;E<P;E++){var D=A[E];if(D.item===N||D.props.key===N.key||k===xa(D.item.type)&&C===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var N=this.clipPathId,k=this.state.offset,C=k.left,A=k.top,E=k.height,P=k.width;return X.createElement("defs",null,X.createElement("clipPath",{id:N},X.createElement("rect",{x:C,y:A,height:E,width:P})))}},{key:"getXScales",value:function(){var N=this.state.xAxisMap;return N?Object.entries(N).reduce(function(k,C){var A=V5(C,2),E=A[0],P=A[1];return he(he({},k),{},Ze({},E,P.scale))},{}):null}},{key:"getYScales",value:function(){var N=this.state.yAxisMap;return N?Object.entries(N).reduce(function(k,C){var A=V5(C,2),E=A[0],P=A[1];return he(he({},k),{},Ze({},E,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(N){var k;return(k=this.state.xAxisMap)===null||k===void 0||(k=k[N])===null||k===void 0?void 0:k.scale}},{key:"getYScaleByAxisId",value:function(N){var k;return(k=this.state.yAxisMap)===null||k===void 0||(k=k[N])===null||k===void 0?void 0:k.scale}},{key:"getItemByXY",value:function(N){var k=this.state,C=k.formattedGraphicalItems,A=k.activeItem;if(C&&C.length)for(var E=0,P=C.length;E<P;E++){var D=C[E],B=D.props,O=D.item,M=O.type.defaultProps!==void 0?he(he({},O.type.defaultProps),O.props):O.props,$=xa(O.type);if($==="Bar"){var F=(B.data||[]).find(function(L){return xAe(N,L)});if(F)return{graphicalItem:D,payload:F}}else if($==="RadialBar"){var W=(B.data||[]).find(function(L){return YF(N,L)});if(W)return{graphicalItem:D,payload:W}}else if(m0(D,A)||g0(D,A)||ip(D,A)){var q=zke({graphicalItem:D,activeTooltipItem:A,itemData:M.data}),K=M.activeIndex===void 0?q:M.activeIndex;return{graphicalItem:he(he({},D),{},{childIndex:K}),payload:ip(D,A)?M.data[q]:D.props.data[q]}}}return null}},{key:"render",value:function(){var N=this;if(!oL(this))return null;var k=this.props,C=k.children,A=k.className,E=k.width,P=k.height,D=k.style,B=k.compact,O=k.title,M=k.desc,$=W5(k,pOe),F=We($,!1);if(B)return X.createElement(N5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement(BC,iu({},F,{width:E,height:P,title:O,desc:M}),this.renderClipPath(),cL(C,this.renderMap)));if(this.props.accessibilityLayer){var W,q;F.tabIndex=(W=this.props.tabIndex)!==null&&W!==void 0?W:0,F.role=(q=this.props.role)!==null&&q!==void 0?q:"application",F.onKeyDown=function(L){N.accessibilityManager.keyboardEvent(L)},F.onFocus=function(){N.accessibilityManager.focus()}}var K=this.parseEventsOfWrapper();return X.createElement(N5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement("div",iu({className:ot("recharts-wrapper",A),style:he({position:"relative",cursor:"default",width:E,height:P},D)},K,{ref:function(H){N.container=H}}),X.createElement(BC,iu({},F,{width:E,height:P,title:O,desc:M,style:TOe}),this.renderClipPath(),cL(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(_.Component);Ze(x,"displayName",n),Ze(x,"defaultProps",he({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Ze(x,"getDerivedStateFromProps",function(b,j){var w=b.dataKey,N=b.data,k=b.children,C=b.width,A=b.height,E=b.layout,P=b.stackOffset,D=b.margin,B=j.dataStartIndex,O=j.dataEndIndex;if(j.updateId===void 0){var M=G5(b);return he(he(he({},M),{},{updateId:0},g(he(he({props:b},M),{},{updateId:0}),j)),{},{prevDataKey:w,prevData:N,prevWidth:C,prevHeight:A,prevLayout:E,prevStackOffset:P,prevMargin:D,prevChildren:k})}if(w!==j.prevDataKey||N!==j.prevData||C!==j.prevWidth||A!==j.prevHeight||E!==j.prevLayout||P!==j.prevStackOffset||!vu(D,j.prevMargin)){var $=G5(b),F={chartX:j.chartX,chartY:j.chartY,isTooltipActive:j.isTooltipActive},W=he(he({},K5(j,N,E)),{},{updateId:j.updateId+1}),q=he(he(he({},$),F),W);return he(he(he({},q),g(he({props:b},q),j)),{},{prevDataKey:w,prevData:N,prevWidth:C,prevHeight:A,prevLayout:E,prevStackOffset:P,prevMargin:D,prevChildren:k})}if(!$C(k,j.prevChildren)){var K,L,H,I,V=ci(k,Xu),G=V&&(K=(L=V.props)===null||L===void 0?void 0:L.startIndex)!==null&&K!==void 0?K:B,z=V&&(H=(I=V.props)===null||I===void 0?void 0:I.endIndex)!==null&&H!==void 0?H:O,oe=G!==B||z!==O,pe=!at(N),ue=pe&&!oe?j.updateId:j.updateId+1;return he(he({updateId:ue},g(he(he({props:b},j),{},{updateId:ue,dataStartIndex:G,dataEndIndex:z}),j)),{},{prevChildren:k,dataStartIndex:G,dataEndIndex:z})}return null}),Ze(x,"renderActiveDot",function(b,j,w){var N;return _.isValidElement(b)?N=_.cloneElement(b,j):rt(b)?N=b(j):N=X.createElement(rm,j),X.createElement(_t,{className:"recharts-active-dot",key:w},N)});var v=_.forwardRef(function(j,w){return X.createElement(x,iu({},j,{ref:w}))});return v.displayName=x.displayName,v},qOe=_0({chartName:"LineChart",GraphicalChild:rd,axisComponents:[{axisType:"xAxis",AxisComp:Lo},{axisType:"yAxis",AxisComp:$o}],formatAxisMap:M2}),zOe=_0({chartName:"BarChart",GraphicalChild:gc,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Lo},{axisType:"yAxis",AxisComp:$o}],formatAxisMap:M2}),UOe=_0({chartName:"PieChart",GraphicalChild:Ba,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:p0},{axisType:"radiusAxis",AxisComp:f0}],formatAxisMap:RNe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),VOe=_0({chartName:"AreaChart",GraphicalChild:Ma,axisComponents:[{axisType:"xAxis",AxisComp:Lo},{axisType:"yAxis",AxisComp:$o}],formatAxisMap:M2});const X5={"Dive Course":"#0891b2","Fun Dive":"#0ea5e9","Day Trip":"#38bdf8","Conservation Program":"#22d3ee"};function WOe({sales:e,products:t}){const r=(()=>{const s={};return e.forEach(a=>{const l=t.find(c=>c.id===a.product_id);if(l){const c=l.category;
784s[c]||(s[c]={revenue:0,count:0}),s[c].revenue+=a.total_amount||0,s[c].count+=1}}),Object.entries(s).map(([a,l])=>({name:a,value:l.revenue,count:l.count}))})(),i=r.reduce((s,a)=>s+a.value,0);return o.jsxs(lt,{className:"border-0 shadow-sm bg-white",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Revenue by Category"})}),o.jsx(dt,{children:o.jsxs("div",{className:"flex items-center gap-8",children:[o.jsx("div",{className:"w-48 h-48",children:o.jsx(av,{width:"100%",height:"100%",children:o.jsxs(UOe,{children:[o.jsx(Ba,{data:r,cx:"50%",cy:"50%",innerRadius:50,outerRadius:80,paddingAngle:2,dataKey:"value",children:r.map((s,a)=>o.jsx(e0,{fill:X5[s.name]},`cell-${a}`))}),o.jsx(ui,{formatter:s=>`$${s.toLocaleString()}`,contentStyle:{borderRadius:"12px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"}})]})})}),o.jsx("div",{className:"flex-1 space-y-3",children:r.map(s=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:X5[s.name]}}),o.jsx("span",{className:"text-sm text-slate-600",children:s.name})]}),o.jsxs("div",{className:"text-right",children:[o.jsxs("p",{className:"text-sm font-medium text-slate-800",children:["$",s.value.toLocaleString()]}),o.jsxs("p",{className:"text-xs text-slate-400",children:[i>0?(s.value/i*100).toFixed(0):0,"%"]})]})]},s.name))})]})})]})}function HOe({sales:e}){const n=(()=>{const r=[],i=Nh(new Date);for(let s=29;s>=0;s--){const a=Vme(i,s),l=_e(a,"yyyy-MM-dd"),c=e.filter(f=>f.sale_date===l),d=c.reduce((f,m)=>f+(m.total_amount||0),0),h=c.reduce((f,m)=>f+(m.profit||0),0);r.push({date:_e(a,"MMM d"),revenue:d,profit:h})}return r})();return o.jsxs(lt,{className:"border-0 shadow-sm bg-white",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Revenue & Profit (Last 30 Days)"})}),o.jsxs(dt,{children:[o.jsx("div",{className:"h-64",children:o.jsx(av,{width:"100%",height:"100%",children:o.jsxs(VOe,{data:n,margin:{top:10,right:10,left:0,bottom:0},children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"colorRevenue",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:"#0891b2",stopOpacity:.2}),o.jsx("stop",{offset:"95%",stopColor:"#0891b2",stopOpacity:0})]}),o.jsxs("linearGradient",{id:"colorProfit",x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:"#22d3ee",stopOpacity:.2}),o.jsx("stop",{offset:"95%",stopColor:"#22d3ee",stopOpacity:0})]})]}),o.jsx(Lo,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#94a3b8"},interval:"preserveStartEnd"}),o.jsx($o,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#94a3b8"},tickFormatter:r=>`$${r}`}),o.jsx(ui,{contentStyle:{borderRadius:"12px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",padding:"12px 16px"},formatter:r=>[`$${r.toLocaleString()}`,""]}),o.jsx(Ma,{type:"monotone",dataKey:"revenue",stroke:"#0891b2",strokeWidth:2,fillOpacity:1,fill:"url(#colorRevenue)",name:"Revenue"}),o.jsx(Ma,{type:"monotone",dataKey:"profit",stroke:"#22d3ee",strokeWidth:2,fillOpacity:1,fill:"url(#colorProfit)",name:"Profit"})]})})}),o.jsxs("div",{className:"flex gap-6 mt-4 justify-center",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 rounded-full bg-cyan-600"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Revenue"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-3 h-3 rounded-full bg-cyan-400"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Profit"})]})]})]})]})}function KOe({staffMembers:e,sales:t,products:n,onReassign:r}){const[i,s]=_.useState(null),[a,l]=_.useState(null),c=new Date,d=g=>{var x;return((x=n.find(v=>v.id===g))==null?void 0:x.name)||"Unknown"},h=_.useMemo(()=>e.map(g=>{const x=t.filter(w=>w.staff_id===g.id),v=new Map;x.forEach(w=>{const N=w.customer_id||w.customer_name||w.customer_email;N&&(v.has(N)||v.set(N,{name:w.customer_name||w.customer_email||"Unknown",sales:[]}),v.get(N).sales.push(w))});const b=[],j=[];return v.forEach(w=>{const N=w.sales.some(A=>{const E=A.payment_status==="Pending",P=A.end_date||A.start_date,D=P&&Ch(Vt(P),c);return E||D}),k=w.sales.sort((A,E)=>new Date(E.start_date||E.sale_date)-new Date(A.start_date||A.sale_date))[0],C={name:w.name,saleId:k.id,product:d(k.product_id),dates:k.end_date?`${_e(Vt(k.start_date||k.sale_date),"MMM d")} - ${_e(Vt(k.end_date),"MMM d")}`:_e(Vt(k.start_date||k.sale_date),"MMM d, yyyy"),status:k.payment_status};N?b.push(C):j.push(C)}),{staff:g,activeCustomers:b,inactiveCustomers:j}}),[e,t,n,c]),f=(g,x)=>{r(g,x),l(null)},m=g=>{var x;return g.full_name?g.full_name.split(" ").map(v=>v[0]).join("").toUpperCase().slice(0,2):(x=g.email)==null?void 0:x.slice(0,2).toUpperCase()};return o.jsxs("div",{className:"space-y-4 h-full overflow-y-auto pr-2",children:[h.map(({staff:g,activeCustomers:x,inactiveCustomers:v})=>o.jsxs("div",{className:"bg-white rounded-lg border p-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ya,{className:"h-10 w-10 bg-gradient-to-br from-cyan-500 to-blue-600",children:o.jsx(va,{className:"text-white text-sm",children:m(g)})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:g.full_name||g.email}),o.jsx("p",{className:"text-sm text-slate-500",children:g.position||g.role})]})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(TN,{className:"w-4 h-4 text-emerald-500"}),o.jsx("span",{className:"font-medium",children:x.length})]}),o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(ON,{className:"w-4 h-4 text-slate-400"}),o.jsx("span",{className:"font-medium",children:v.length})]})]}),(x.length>0||v.length>0)&&o.jsx(re,{variant:"ghost",size:"sm",onClick:()=>s(i===g.id?null:g.id),children:i===g.id?o.jsx(ox,{className:"w-4 h-4"}):o.jsx(wp,{className:"w-4 h-4"})})]})]}),i===g.id&&o.jsxs("div",{className:"mt-4 space-y-3",children:[x.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-emerald-600 mb-2",children:["Active (",x.length,")"]}),o.jsx("div",{className:"space-y-2",children:x.map((b,j)=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-emerald-50 rounded-lg",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-sm text-slate-800",children:b.name}),o.jsxs("p",{className:"text-xs text-slate-500",children:[b.product," • ",b.dates]})]}),o.jsx("div",{className:"flex items-center gap-2",children:a===b.saleId?o.jsxs(ht,{onValueChange:w=>f(b.saleId,w),children:[o.jsx(ct,{className:"h-8 w-32 text-xs",children:o.jsx(pt,{placeholder:"Reassign to..."})}),o.jsx(ut,{children:e.filter(w=>w.id!==g.id).map(w=>o.jsx(Pe,{value:w.id,children:w.full_name||w.email},w.id))})]}):o.jsxs(re,{variant:"ghost",size:"sm",onClick:()=>l(b.saleId),className:"text-xs h-7",children:[o.jsx(zZ,{className:"w-3 h-3 mr-1"}),"Reassign"]})})]},j))})]}),v.length>0&&o.jsxs("div",{children:[o.jsxs("p",{className:"text-xs font-medium text-slate-500 mb-2",children:["Completed (",v.length,")"]}),o.jsx("div",{className:"space-y-2",children:v.map((b,j)=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-slate-50 rounded-lg",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-sm text-slate-600",children:b.name}),o.jsxs("p",{className:"text-xs text-slate-400",children:[b.product," • ",b.dates]})]}),o.jsx(st,{variant:"outline",className:"text-xs",children:b.status})]},j))})]})]})]},g.id)),h.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No staff members found"})]})}const im=_.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:n,className:Te("w-full caption-bottom text-sm",e),...t})}));im.displayName="Table";const sm=_.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:Te("[&_tr]:border-b",e),...t}));sm.displayName="TableHeader";const am=_.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:Te("[&_tr:last-child]:border-0",e),...t}));am.displayName="TableBody";const GOe=_.forwardRef(({className:e,...t},n)=>o.jsx("tfoot",{ref:n,className:Te("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));GOe.displayName="TableFooter";const xr=_.forwardRef(({className:e,...t},n)=>o.jsx("tr",{ref:n,className:Te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));xr.displayName="TableRow";const qt=_.forwardRef(({className:e,...t},n)=>o.jsx("th",{ref:n,className:Te("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));
784qt.displayName="TableHead";const Nt=_.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:Te("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Nt.displayName="TableCell";const YOe=_.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:Te("mt-4 text-sm text-muted-foreground",e),...t}));YOe.displayName="TableCaption";function XOe({sales:e,products:t,staffMembers:n}){const[r,i]=_.useState(!1),s=new Date,a=()=>{const m=`${window.location.origin}${kn("CustomerRegistration")}`;navigator.clipboard.writeText(m),i(!0),setTimeout(()=>i(!1),2e3)},l=f=>{var m;return((m=t.find(g=>g.id===f))==null?void 0:m.name)||"Unknown"},c=f=>{const m=n.find(g=>g.id===f);return m?m.full_name||m.email:"-"},d=_.useMemo(()=>{const f=new Map;return e.forEach(m=>{const g=m.customer_id||m.customer_name||m.customer_email;g&&(f.has(g)||f.set(g,{name:m.customer_name||m.customer_email||"Unknown",email:m.customer_email,sales:[]}),f.get(g).sales.push(m))}),Array.from(f.values()).map(m=>{const g=m.sales.some(b=>{const j=b.payment_status==="Pending",w=b.end_date||b.start_date,N=w&&Ch(Vt(w),s);return j||N}),x=m.sales.sort((b,j)=>new Date(j.start_date||j.sale_date)-new Date(b.start_date||b.sale_date))[0],v=[...new Set(m.sales.map(b=>b.group_name).filter(Boolean))];return{name:m.name,email:m.email,status:g?"Active":"Completed",staffId:x.staff_id,staffName:c(x.staff_id),groups:v,latestProduct:l(x.product_id),latestDate:x.start_date||x.sale_date,salesCount:m.sales.length}}).sort((m,g)=>m.status==="Active"&&g.status!=="Active"?-1:m.status!=="Active"&&g.status==="Active"?1:new Date(g.latestDate)-new Date(m.latestDate))},[e,t,n,s]),h=f=>f.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2);return o.jsxs("div",{className:"bg-white rounded-lg border overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[o.jsx("h3",{className:"font-medium text-slate-700",children:"Customer List"}),o.jsxs(re,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[r?o.jsx(Qr,{className:"w-4 h-4 text-emerald-600"}):o.jsx(WB,{className:"w-4 h-4"}),r?"Copied!":"Copy Registration Link"]})]}),o.jsxs(im,{children:[o.jsx(sm,{children:o.jsxs(xr,{className:"bg-slate-50",children:[o.jsx(qt,{className:"font-medium",children:"Customer"}),o.jsx(qt,{className:"font-medium",children:"Status"}),o.jsx(qt,{className:"font-medium",children:"Assigned Staff"}),o.jsx(qt,{className:"font-medium",children:"Group"}),o.jsx(qt,{className:"font-medium",children:"Latest Activity"})]})}),o.jsx(am,{children:d.length===0?o.jsx(xr,{children:o.jsx(Nt,{colSpan:5,className:"text-center text-slate-400 py-8",children:"No customers found"})}):d.map((f,m)=>o.jsxs(xr,{className:"hover:bg-slate-50/50",children:[o.jsx(Nt,{children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(ya,{className:"h-8 w-8 bg-slate-200",children:o.jsx(va,{className:"text-slate-600 text-xs",children:h(f.name)})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:f.name}),f.email&&o.jsx("p",{className:"text-xs text-slate-500",children:f.email})]})]})}),o.jsx(Nt,{children:o.jsx(st,{variant:"outline",className:f.status==="Active"?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-slate-50 text-slate-600 border-slate-200",children:f.status})}),o.jsx(Nt,{className:"text-slate-600",children:f.staffName}),o.jsx(Nt,{children:f.groups.length>0?o.jsx("div",{className:"flex flex-wrap gap-1",children:f.groups.map((g,x)=>o.jsx(st,{variant:"secondary",className:"text-xs",children:g},x))}):o.jsx("span",{className:"text-slate-400",children:"-"})}),o.jsx(Nt,{children:o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-slate-800",children:f.latestProduct}),o.jsxs("p",{className:"text-xs text-slate-500",children:[_e(Vt(f.latestDate),"MMM d, yyyy")," • ",f.salesCount," sale(s)"]})]})})]},m))})]})]})}async function QOe(){return await ne.integrations.Core.InvokeLLM({prompt:"Get the current exchange rates for Indonesian Rupiah (IDR) to US Dollar (USD) and Chinese Yuan (CNY). Return the rates as how much 1 IDR equals in USD and CNY.",add_context_from_internet:!0,response_json_schema:{type:"object",properties:{idr_to_usd:{type:"number"},idr_to_cny:{type:"number"},last_updated:{type:"string"}}}})}function Ks(){return Ee({queryKey:["exchangeRates"],queryFn:QOe,staleTime:1e3*60*60,refetchInterval:1e3*60*60,initialData:{idr_to_usd:63e-6,idr_to_cny:46e-5,last_updated:"fallback"}})}function Cy(e,t,n){if(!e||e===0)return"-";
784switch(t){case"IDR":return`Rp ${e.toLocaleString("id-ID")}`;case"USD":return`$${(e*((n==null?void 0:n.idr_to_usd)||63e-6)).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`;case"CNY":return`¥${(e*((n==null?void 0:n.idr_to_cny)||46e-5)).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`;default:return`Rp ${e.toLocaleString("id-ID")}`}}function JOe({amountIDR:e,showAll:t=!1,primaryCurrency:n="IDR",className:r=""}){const{data:i,isLoading:s}=Ks(),l=["IDR","USD","CNY"].filter(c=>c!==n);return t?o.jsxs("div",{className:`space-y-0.5 ${r}`,children:[o.jsx("div",{className:"font-medium",children:Cy(e,n,i)}),o.jsx("div",{className:"text-xs text-slate-500",children:l.map(c=>Cy(e,c,i)).join(" • ")})]}):o.jsx("span",{className:r,children:Cy(e,n,i)})}function ZOe(){const{permissions:e,user:t}=Vo(),n=hn(),r=()=>{ne.auth.logout("CustomerRegistration")},[i,s]=_.useState("overview"),{data:a=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-sale_date",1e3)}),{data:l=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:c=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),{data:d=[]}=Ee({queryKey:["staff"],queryFn:async()=>(await ne.functions.invoke("getStaffList")).data}),{data:h}=Ks(),f=Ye({mutationFn:({saleId:E,staffId:P})=>ne.entities.Sale.update(E,{staff_id:P}),onSuccess:()=>n.invalidateQueries({queryKey:["sales"]})}),m=(E,P)=>{f.mutate({saleId:E,staffId:P})},g={start:_e(No(new Date),"yyyy-MM-dd"),end:_e(ha(new Date),"yyyy-MM-dd")},x={start:_e(No(gu(new Date,1)),"yyyy-MM-dd"),end:_e(ha(gu(new Date,1)),"yyyy-MM-dd")},v=a.filter(E=>E.sale_date>=g.start&&E.sale_date<=g.end),b=a.filter(E=>E.sale_date>=x.start&&E.sale_date<=x.end),j=(E,P)=>E?P==="IDR"?E:P==="USD"?E*((h==null?void 0:h.usd_to_idr)||15900):P==="CNY"?E*((h==null?void 0:h.cny_to_idr)||2200):E:0,w=v.reduce((E,P)=>{var M,$;const D=j(P.total_amount,P.sale_currency||"IDR"),B=j(P.profit,P.sale_currency||"IDR"),O=P.sale_currency||"IDR";return{revenue:E.revenue+D,profit:E.profit+B,byCurrency:{...E.byCurrency,[O]:{revenue:(((M=E.byCurrency[O])==null?void 0:M.revenue)||0)+(P.total_amount||0),profit:((($=E.byCurrency[O])==null?void 0:$.profit)||0)+(P.profit||0)}}}},{revenue:0,profit:0,byCurrency:{}}),N=b.reduce((E,P)=>{const D=j(P.total_amount,P.sale_currency||"IDR"),B=j(P.profit,P.sale_currency||"IDR");return{revenue:E.revenue+D,profit:E.profit+B}},{revenue:0,profit:0}),k=a.filter(E=>E.payment_status==="Pending").reduce((E,P)=>{var O;const D=j(P.vendor_cost,P.sale_currency||"IDR"),B=P.sale_currency||"IDR";return{cost:E.cost+D,byCurrency:{...E.byCurrency,[B]:{cost:(((O=E.byCurrency[B])==null?void 0:O.cost)||0)+(P.vendor_cost||0)}}}},{cost:0,byCurrency:{}}),C=N.revenue>0?((w.revenue-N.revenue)/N.revenue*100).toFixed(1):0,A=N.profit>0?((w.profit-N.profit)/N.profit*100).toFixed(1):0;return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Dashboard"}),o.jsxs("p",{className:"text-slate-500 mt-1",children:["Welcome, ",(t==null?void 0:t.full_name)||"Staff"," • Overview of your dive shop performance"]})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx(du,{to:kn("CustomerRegistration"),children:o.jsxs(re,{variant:"outline",children:[o.jsx(Jr,{className:"w-4 h-4 mr-2"}),"Add Customer"]})}),o.jsx(du,{to:kn("Sales"),children:o.jsxs(re,{className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 shadow-lg shadow-cyan-500/20",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"New Sale"]})}),o.jsxs(re,{variant:"outline",onClick:r,children:[o.jsx(xZ,{className:"w-4 h-4 mr-2"}),"Logout"]})]})]}),o.jsxs(Dp,{value:i,onValueChange:s,className:"space-y-6",children:[o.jsxs(Nd,{className:"bg-white shadow-sm",children:[o.jsx(Wr,{value:"overview",children:"Overview"}),o.jsx(Wr,{value:"staff",children:"Staff"}),o.jsx(Wr,{value:"customers",children:"Customers"})]}),o.jsxs(Fi,{value:"overview",className:"space-y-6",children:[o.jsxs("div",{className:`grid grid-cols-1 gap-4 ${e.canViewRevenue?"md:grid-cols-2 lg:grid-cols-4":"md:grid-cols-2"}`,children:[e.canViewRevenue&&o.jsx(qg,{title:"Revenue (This Month in Rupiah)",value:`Rp ${w.revenue.toLocaleStr
784ing("id-ID")}`,subtitle:o.jsxs("div",{className:"text-xs space-y-0.5 mt-1",children:[w.byCurrency.IDR&&o.jsxs("div",{className:"text-slate-500",children:["IDR: Rp ",w.byCurrency.IDR.revenue.toLocaleString("id-ID")]}),w.byCurrency.USD&&o.jsxs("div",{className:"text-slate-500",children:["USD: $",w.byCurrency.USD.revenue.toLocaleString("en-US",{minimumFractionDigits:2})]}),w.byCurrency.CNY&&o.jsxs("div",{className:"text-slate-500",children:["CNY: ¥",w.byCurrency.CNY.revenue.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]}),icon:Mo,trend:C>0?`+${C}%`:`${C}%`,trendUp:C>=0}),e.canViewProfit&&o.jsx(qg,{title:"Profit (This Month in Rupiah)",value:`Rp ${w.profit.toLocaleString("id-ID")}`,subtitle:o.jsxs("div",{className:"text-xs space-y-0.5 mt-1",children:[w.byCurrency.IDR&&o.jsxs("div",{className:"text-emerald-600",children:["IDR: Rp ",w.byCurrency.IDR.profit.toLocaleString("id-ID")]}),w.byCurrency.USD&&o.jsxs("div",{className:"text-emerald-600",children:["USD: $",w.byCurrency.USD.profit.toLocaleString("en-US",{minimumFractionDigits:2})]}),w.byCurrency.CNY&&o.jsxs("div",{className:"text-emerald-600",children:["CNY: ¥",w.byCurrency.CNY.profit.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]}),icon:vh,trend:A>0?`+${A}%`:`${A}%`,trendUp:A>=0}),o.jsx(qg,{title:"Total Sales",value:v.length,subtitle:"This month",icon:YB}),e.canViewRevenue&&o.jsx(qg,{title:"Pending Payments (in Rupiah)",value:`Rp ${k.cost.toLocaleString("id-ID")}`,subtitle:o.jsxs("div",{className:"text-xs space-y-0.5 mt-1",children:[k.byCurrency.IDR&&o.jsxs("div",{className:"text-slate-500",children:["IDR: Rp ",k.byCurrency.IDR.cost.toLocaleString("id-ID")]}),k.byCurrency.USD&&o.jsxs("div",{className:"text-slate-500",children:["USD: $",k.byCurrency.USD.cost.toLocaleString("en-US",{minimumFractionDigits:2})]}),k.byCurrency.CNY&&o.jsxs("div",{className:"text-slate-500",children:["CNY: ¥",k.byCurrency.CNY.cost.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]}),icon:Jr})]}),e.canViewRevenue&&o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsx(HOe,{sales:a}),o.jsx(WOe,{sales:a,products:l})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-sm p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsx("h2",{className:"text-lg font-medium text-slate-800",children:"Recent Sales"}),o.jsx(du,{to:kn("Sales"),children:o.jsxs(re,{variant:"ghost",size:"sm",className:"text-cyan-600 hover:text-cyan-700",children:["View All ",o.jsx(tJ,{className:"w-4 h-4 ml-1"})]})})]}),o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-slate-100",children:[o.jsx("th",{className:"text-left text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Date"}),o.jsx("th",{className:"text-left text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Product"}),o.jsx("th",{className:"text-left text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Customer"}),o.jsx("th",{className:"text-left text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Staff"}),e.canViewRevenue&&o.jsx("th",{className:"text-right text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Amount"}),e.canViewProfit&&o.jsx("th",{className:"text-right text-xs font-medium text-slate-500 uppercase tracking-wide py-3",children:"Profit"})]})}),o.jsxs("tbody",{children:[a.slice(0,5).map(E=>{const P=l.find(B=>B.id===E.product_id),D=d.find(B=>B.id===E.staff_id);return o.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50/50 transition-colors",children:[o.jsx("td",{className:"py-4 text-sm text-slate-600",children:E.sale_date}),o.jsx("td",{className:"py-4 text-sm font-medium text-slate-800",children:(P==null?void 0:P.name)||"Unknown"}),o.jsx("td",{className:"py-4 text-sm text-slate-600",children:E.customer_name||"-"}),o.jsx("td",{className:"py-4 text-sm text-slate-600",children:(D==null?void 0:D.full_name)||"-"}),e.canViewRevenue&&o.jsxs("td",{className:"py-4 text-sm text-slate-800 text-right",children:[E.sale_currency==="IDR"&&`Rp ${(E.total_amount||0).toLocaleStr
784ing("id-ID")}`,E.sale_currency==="USD"&&`$${(E.total_amount||0).toLocaleString("en-US",{minimumFractionDigits:2})}`,E.sale_currency==="CNY"&&`Â¥${(E.total_amount||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,!E.sale_currency&&`$${(E.total_amount||0).toFixed(2)}`]}),e.canViewProfit&&o.jsxs("td",{className:"py-4 text-sm font-medium text-emerald-600 text-right",children:[E.sale_currency==="IDR"&&`Rp ${(E.profit||0).toLocaleString("id-ID")}`,E.sale_currency==="USD"&&`$${(E.profit||0).toLocaleString("en-US",{minimumFractionDigits:2})}`,E.sale_currency==="CNY"&&`Â¥${(E.profit||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,!E.sale_currency&&`$${(E.profit||0).toFixed(2)}`]})]},E.id)}),a.length===0&&o.jsx("tr",{children:o.jsx("td",{colSpan:e.canViewRevenue&&e.canViewProfit?6:4,className:"py-8 text-center text-slate-400",children:"No sales yet"})})]})]})})]})]}),o.jsx(Fi,{value:"staff",className:"max-h-[calc(100vh-250px)] overflow-hidden",children:o.jsx(KOe,{staffMembers:d,sales:a,products:l,onReassign:m})}),o.jsx(Fi,{value:"customers",className:"max-h-[calc(100vh-250px)] overflow-hidden",children:o.jsx(XOe,{sales:a,products:l,staffMembers:d})})]})]})})}function eMe(){return o.jsx(ms,{children:o.jsx(ZOe,{})})}function tMe({sales:e,products:t,invoices:n=[],initialData:r,onSubmit:i,onCancel:s}){const[a,l]=_.useState((r==null?void 0:r.customer_name)||""),[c,d]=_.useState((r==null?void 0:r.customer_email)||""),[h,f]=_.useState((r==null?void 0:r.group_name)||""),[m,g]=_.useState((r==null?void 0:r.sale_ids)||[]),[x,v]=_.useState((r==null?void 0:r.discount_type)||"percentage"),[b,j]=_.useState((r==null?void 0:r.discount_value)||0),[w,N]=_.useState((r==null?void 0:r.invoice_date)||_e(new Date,"yyyy-MM-dd")),[k,C]=_.useState((r==null?void 0:r.due_date)||""),[A,E]=_.useState((r==null?void 0:r.status)||"Draft"),[P,D]=_.useState((r==null?void 0:r.notes)||""),[B,O]=_.useState((r==null?void 0:r.invoice_type)||"full"),[M,$]=_.useState((r==null?void 0:r.deposit_percentage)||30),[F,W]=_.useState((r==null?void 0:r.additional_fees)||[]),[q,K]=_.useState(""),[L,H]=_.useState(!0),[I,V]=_.useState(!1),[G,z]=_.useState(""),[oe,pe]=_.useState((r==null?void 0:r.customer_name)||""),[ue,me]=_.useState(!1),Ne=_.useRef(null),{data:ee=[]}=Ee({queryKey:["customers"],queryFn:()=>ne.entities.Customer.list()}),{data:de}=Ks(),be=_.useMemo(()=>!oe||oe.length<2?[]:ee.filter(ge=>{var Je,At;return((Je=ge.name)==null?void 0:Je.toLowerCase().includes(oe.toLowerCase()))||((At=ge.email)==null?void 0:At.toLowerCase().includes(oe.toLowerCase()))}).slice(0,5),[ee,oe]),ae=ge=>{l(ge.name),d(ge.email||""),pe(ge.name),me(!1)};_.useEffect(()=>{const ge=Je=>{Ne.current&&!Ne.current.contains(Je.target)&&me(!1)};return document.addEventListener("mousedown",ge),()=>document.removeEventListener("mousedown",ge)},[]);const Ke=_.useMemo(()=>{const ge=e.map(Je=>Je.group_name).filter(Je=>Je&&Je.trim()!=="");return[...new Set(ge)]},[e]),Ue=_.useMemo(()=>e.filter(ge=>{var we,Ve,tt,bt,on,rr;const Je=!q||((we=ge.customer_name)==null?void 0:we.toLowerCase().includes(q.toLowerCase()))||((Ve=ge.group_name)==null?void 0:Ve.toLowerCase().includes(q.toLowerCase()))||((bt=(tt=t.find(Kn=>Kn.id===ge.product_id))==null?void 0:tt.name)==null?void 0:bt.toLowerCase().includes(q.toLowerCase())),At=!L||!a||((on=ge.customer_name)==null?void 0:on.toLowerCase())===a.toLowerCase(),fe=!I||!G||((rr=ge.group_name)==null?void 0:rr.toLowerCase())===G.toLowerCase();return Je&&At&&fe}),[e,t,q,L,a,I,G]),jt=_.useMemo(()=>{if(!n||n.length===0)return{total:0,details:[]};const ge=[];let Je=0;return m.forEach(At=>{n.filter(we=>{var Ve;return we.invoice_type==="deposit"&&we.status==="Paid"&&((Ve=we.sale_ids)==null?void 0:Ve.includes(At))&&we.id!==(r==null?void 0:r.id)}).forEach(we=>{const Ve=we.sale_ids.length,tt=we.total_amount/Ve;Je+=tt,ge.push({saleId:At,invoiceNumber:we.invoice_number,amount:tt})})}),{total:Je,details:ge}},[m,n,r==null?void 0:r.id]),qe=_.useMemo(()=>{const ge=m.map(Dt=>e.find(zt=>zt.id===Dt)).filter(Boolean),Je=[...new Set(ge.map(Dt=>Dt.sale_currency||"IDR"))],At=Je.length>1,fe=Je.length===1?Je[0]:"mixed",we={};ge.forEach(Dt=>
784{const zt=Dt.sale_currency||"IDR";we[zt]||(we[zt]=0),we[zt]+=Dt.total_amount||0});const Ve=(Dt,zt)=>!de||zt==="IDR"?Dt:zt==="USD"?Dt/(de.idr_to_usd||63e-6):zt==="CNY"?Dt/(de.idr_to_cny||46e-5):Dt,tt=ge.reduce((Dt,zt)=>Dt+Ve(zt.total_amount||0,zt.sale_currency||"IDR"),0),bt=F.filter(Dt=>Dt.description&&Dt.amount>0).reduce((Dt,zt)=>Dt+(zt.amount||0),0),on=tt+bt;let rr=0;x==="percentage"?rr=on*(b/100):rr=b||0;const Kn=Math.max(0,on-rr);let Dr;B==="deposit"?Dr=Kn*(M/100):Dr=Kn-jt.total;const Ys=Dr*((de==null?void 0:de.idr_to_usd)||63e-6),Rn=Dr*((de==null?void 0:de.idr_to_cny)||46e-5);return{sales_subtotal:tt,fees_total:bt,subtotal:on,discount_amount:rr,after_discount:Kn,deposits_paid:jt.total,total_amount:Math.max(0,Dr),total_usd:Ys,total_cny:Rn,currency:fe,hasMixedCurrencies:At,currencyBreakdown:we}},[m,x,b,e,B,M,jt.total,F,de]),Rt=ge=>{g(Je=>Je.includes(ge)?Je.filter(At=>At!==ge):[...Je,ge])},nr=()=>{W([...F,{description:"",amount:0}])},vn=(ge,Je,At)=>{const fe=[...F];fe[ge][Je]=Je==="amount"?parseFloat(At)||0:At,W(fe)},_r=ge=>{W(F.filter((Je,At)=>At!==ge))},Hn=ge=>{ge.preventDefault();const Je=(r==null?void 0:r.invoice_number)||`INV-${_e(new Date,"yyyyMMdd")}-${Math.random().toString(36).substr(2,6).toUpperCase()}`;i({invoice_number:Je,customer_name:a,customer_id:(r==null?void 0:r.customer_id)||"",customer_email:c,group_name:h,sale_ids:m,additional_fees:F.filter(At=>At.description&&At.amount>0),invoice_type:B,deposit_percentage:B==="deposit"?M:null,subtotal:qe.subtotal,discount_type:x,discount_value:b,discount_amount:qe.discount_amount,total_amount:qe.total_amount,invoice_date:w,due_date:k,status:A,notes:P})},Nr=ge=>{var Je;return((Je=t.find(At=>At.id===ge))==null?void 0:Je.name)||"Unknown Product"};return o.jsxs("form",{onSubmit:Hn,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2 relative",ref:Ne,children:[o.jsx(te,{children:"Customer Name *"}),o.jsxs("div",{className:"relative",children:[o.jsx(Ca,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{value:oe,onChange:ge=>{pe(ge.target.value),l(ge.target.value),me(!0)},onFocus:()=>me(!0),placeholder:"Search or enter customer name",className:"pl-10",required:!0})]}),ue&&be.length>0&&o.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border rounded-lg shadow-lg max-h-48 overflow-y-auto",children:be.map(ge=>o.jsxs("div",{className:"px-3 py-2 hover:bg-slate-50 cursor-pointer",onClick:()=>ae(ge),children:[o.jsx("p",{className:"font-medium text-slate-800",children:ge.name}),ge.email&&o.jsx("p",{className:"text-sm text-slate-500",children:ge.email})]},ge.id))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Group Name (Optional)"}),o.jsx(ye,{value:h,onChange:ge=>f(ge.target.value),placeholder:"e.g., Company name, Tour group"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Customer Email"}),o.jsx(ye,{type:"email",value:c,onChange:ge=>d(ge.target.value),placeholder:"[email protected]"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Invoice Date *"}),o.jsx(ye,{type:"date",value:w,onChange:ge=>N(ge.target.value),required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Due Date"}),o.jsx(ye,{type:"date",value:k,onChange:ge=>C(ge.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Status"}),o.jsxs(ht,{value:A,onValueChange:E,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Draft",children:"Draft"}),o.jsx(Pe,{value:"Sent",children:"Sent"}),o.jsx(Pe,{value:"Paid",children:"Paid"}),o.jsx(Pe,{value:"Cancelled",children:"Cancelled"})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx(te,{className:"text-base font-medium",children:"Select Sales to Include"}),o.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qi,{id:"filterCustomer",checked:L,onCheckedChange:ge=>H(ge===!0)}),o.jsx("label",{htmlFor:"filterCustomer",className:"text-sm text-slate-600",children:"Filter by customer name"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(qi,{id:"filterGroup",checked:I,onCheckedChange:ge=>V(ge===!0)}),o.jsx("label",{htmlFor:"filterGroup",className:"text-sm text-slate-600",children:"Filter by group"})]}),I&&Ke.length>0&&o.jsxs(ht,{value:G,onValueChange:z,children:[o.jsx(ct,{className:"w-48",children:o.jsx(pt,{placeholder:"Select group"})}),o.jsx(ut,{children:Ke.map(ge=>o.jsx(Pe,{value:ge,children:ge},ge))})]})]})]}),o.jsxs("div",{className:"relative",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{value:q,onChange:ge=>K(ge.target.value),placeholder:"Search by customer, group, or product...",className:"pl-10"})]}),o.jsx("div",{className:"border rounded-lg max-h-60 overflow-y-auto",children:Ue.length===0?o.jsx("p",{className:"text-center text-slate-400 py-4",children:"No sales found"}):Ue.map(ge=>o.jsxs("div",{className:`flex items-center gap-3 p-3 border-b last:border-b-0 hover:bg-slate-50 cursor-pointer ${m.includes(ge.id)?"bg-cyan-50":""}`,onClick:()=>Rt(ge.id),children:[o.jsx(qi,{checked:m.includes(ge.id),onClick:Je=>Je.stopPropagation(),onCheckedChange:()=>Rt(ge.id)}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"font-medium text-slate-800",children:Nr(ge.product_id)}),o.jsxs("p",{className:"text-sm text-slate-500",children:[ge.customer_name,ge.group_name&&o.jsxs("span",{className:"text-cyan-600",children:[" • ",ge.group_name]})," • ",_e(new Date(ge.start_date||ge.sale_date),"MMM d, yyyy")]})]}),o.jsxs("p",{className:"font-medium",children:[ge.sale_currency==="IDR"&&`Rp ${(ge.total_amount||0).toLocaleStr
784ing("id-ID")}`,ge.sale_currency==="USD"&&`$${(ge.total_amount||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,ge.sale_currency==="CNY"&&`¥${(ge.total_amount||0).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`,!ge.sale_currency&&`Rp ${(ge.total_amount||0).toLocaleString("id-ID")}`]})]},ge.id))}),o.jsxs("p",{className:"text-sm text-slate-500",children:[m.length," sale(s) selected"]})]}),o.jsxs("div",{className:"space-y-4 p-4 bg-amber-50 rounded-lg border border-amber-200",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-base font-medium",children:"Additional Fees (Food, Transport, etc.)"}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:nr,children:[o.jsx(en,{className:"w-4 h-4 mr-1"})," Add Fee"]})]}),F.length>0&&o.jsx("div",{className:"space-y-2",children:F.map((ge,Je)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(ye,{placeholder:"Description (e.g., Food, Transport)",value:ge.description,onChange:At=>vn(Je,"description",At.target.value),className:"flex-1"}),o.jsx(ye,{type:"number",placeholder:"Amount",value:ge.amount||"",onChange:At=>vn(Je,"amount",At.target.value),className:"w-32"}),o.jsx(re,{type:"button",variant:"ghost",size:"icon",onClick:()=>_r(Je),children:o.jsx(On,{className:"w-4 h-4 text-rose-500"})})]},Je))}),F.length===0&&o.jsx("p",{className:"text-sm text-amber-700",children:"No additional fees added"})]}),o.jsxs("div",{className:"space-y-4 p-4 bg-cyan-50 rounded-lg border border-cyan-200",children:[o.jsxs(te,{className:"text-base font-medium flex items-center gap-2",children:[o.jsx(GB,{className:"w-4 h-4"})," Invoice Type"]}),o.jsxs("div",{className:"flex gap-4",children:[o.jsx("div",{className:"flex-1",children:o.jsxs(ht,{value:B,onValueChange:O,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"full",children:"Full Amount"}),o.jsx(Pe,{value:"deposit",children:"Deposit (30% non-refundable)"})]})]})}),B==="deposit"&&o.jsx("div",{className:"flex-1",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ye,{type:"number",min:"1",max:"100",value:M,onChange:ge=>$(parseFloat(ge.target.value)||30),className:"w-24"}),o.jsx("span",{className:"text-slate-600",children:"%"})]})})]}),B==="deposit"&&o.jsx("p",{className:"text-sm text-amber-700 bg-amber-50 p-2 rounded",children:"⚠️ Deposit is non-refundable and will be forfeited if customer cancels."})]}),o.jsxs("div",{className:"space-y-4 p-4 bg-slate-50 rounded-lg",children:[o.jsx(te,{className:"text-base font-medium",children:"Discount"}),o.jsxs("div",{className:"flex gap-4",children:[o.jsx("div",{className:"flex-1",children:o.jsxs(ht,{value:x,onValueChange:v,children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"percentage",children:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(HB,{className:"w-4 h-4"})," Percentage"]})}),o.jsx(Pe,{value:"fixed",children:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(Mo,{className:"w-4 h-4"})," Fixed Amount"]})})]})]})}),o.jsx("div",{className:"flex-1",children:o.jsx(ye,{type:"number",min:"0",step:x==="percentage"?"1":"1000",value:b,onChange:ge=>j(parseFloat(ge.target.value)||0),placeholder:x==="percentage"?"0%":"0"})})]})]}),o.jsxs("div",{className:"p-4 bg-slate-100 rounded-lg space-y-2",children:[qe.hasMixedCurrencies?o.jsxs("div",{className:"space-y-2 pb-2 border-b border-slate-300",children:[o.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Sales by Currency:"}),Object.entries(qe.currencyBreakdown).map(([ge,Je])=>o.jsxs("div",{className:"flex justify-between text-slate-600 text-sm pl-4",children:[o.jsxs("span",{children:[ge,":"]}),o.jsxs("span",{children:[ge==="IDR"&&`Rp ${Je.toLocaleString("id-ID")}`,ge==="USD"&&`$${Je.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,ge==="CNY"&&`¥${Je.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`]})]},ge))]}):o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"Sales Subtotal:"}),o.jsx("span",{children:qe.currency==="USD"?`$${qe.sales_subtotal.toLocaleStr
784ing("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:qe.currency==="CNY"?`¥${qe.sales_subtotal.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`:`Rp ${qe.sales_subtotal.toLocaleString("id-ID")}`})]}),qe.fees_total>0&&o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"Additional Fees:"}),o.jsxs("span",{children:["Rp ",qe.fees_total.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-slate-700 font-medium",children:[o.jsx("span",{children:"Subtotal (IDR):"}),o.jsxs("span",{children:["Rp ",qe.subtotal.toLocaleString("id-ID")]})]}),qe.discount_amount>0&&o.jsxs("div",{className:"flex justify-between text-rose-600",children:[o.jsxs("span",{children:["Discount (",x==="percentage"?`${b}%`:"Fixed","):"]}),o.jsxs("span",{children:["-Rp ",qe.discount_amount.toLocaleString("id-ID")]})]}),B==="deposit"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"After Discount:"}),o.jsxs("span",{children:["Rp ",qe.after_discount.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-cyan-700",children:[o.jsxs("span",{children:["Deposit (",M,"%):"]}),o.jsxs("span",{children:["Rp ",qe.total_amount.toLocaleString("id-ID")]})]})]}),B==="full"&&qe.deposits_paid>0&&o.jsxs("div",{className:"flex justify-between text-emerald-600",children:[o.jsx("span",{children:"Deposit Already Paid:"}),o.jsxs("span",{children:["-Rp ",qe.deposits_paid.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-lg font-semibold text-slate-800 border-t pt-2",children:[o.jsx("span",{children:B==="deposit"?"Deposit Amount Due:":qe.deposits_paid>0?"Remaining Balance:":"Total (IDR):"}),o.jsxs("span",{children:["Rp ",qe.total_amount.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-sm text-slate-600 mt-1",children:[o.jsx("span",{children:"Approx USD:"}),o.jsxs("span",{children:["$",qe.total_usd.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),o.jsxs("div",{className:"flex justify-between text-sm text-slate-600",children:[o.jsx("span",{children:"Approx CNY:"}),o.jsxs("span",{children:["¥",qe.total_cny.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),qe.hasMixedCurrencies&&o.jsx("p",{className:"text-xs text-amber-600 bg-amber-50 p-2 rounded mt-2",children:"ℹ️ Sales in multiple currencies have been converted to IDR for accurate totals. Original amounts shown above."})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Notes"}),o.jsx(ur,{value:P,onChange:ge=>D(ge.target.value),placeholder:"Additional notes for this invoice...",rows:3})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx(re,{type:"button",variant:"outline",onClick:s,className:"flex-1",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600",disabled:m.length===0,children:r?"Update Invoice":"Create Invoice"})]})]})}function nMe({invoice:e,sales:t,products:n,allInvoices:r=[]}){var k;const{data:i}=Ks(),{data:s=[]}=Ee({queryKey:["diveShopProfile"],queryFn:()=>ne.entities.DiveShopProfile.list()}),a=s[0],l=C=>{var A;return((A=n.find(E=>E.id===C))==null?void 0:A.name)||"Product"},c=C=>{var A;return((A=n.find(E=>E.id===C))==null?void 0:A.category)||""},d=(C,A)=>!i||A==="IDR"?C:A==="USD"?C/(i.idr_to_usd||63e-6):A==="CNY"?C/(i.idr_to_cny||46e-5):C,h=t.reduce((C,A)=>C+d(A.total_amount||0,A.sale_currency||"IDR"),0),f=(e.additional_fees||[]).reduce((C,A)=>C+(A.amount||0),0),m=h+f;let g=0;e.discount_type==="percentage"?g=m*((e.discount_value||0)/100):g=e.discount_value||0;const x=Math.max(0,m-g);let v;e.invoice_type==="deposit"?v=x*((e.deposit_percentage||30)/100):v=x;const b={feesTotal:f,subtotalIDR:m,discountAmount:g,afterDiscount:x,totalAmount:v};let j=0;e.invoice_type==="full"&&r&&r.length>0&&(e.sale_ids||[]).forEach(C=>{r.filter(E=>{var P;return E.invoice_type==="deposit"&&E.status==="Paid"&&((P=E.sale_ids)==null?void 0:P.includes(C))&&E.id!==e.id}
784).forEach(E=>{const P=E.sale_ids.length,D=E.total_amount/P;j+=D})});const w={total:j},N=e.invoice_type==="full"?Math.max(0,b.totalAmount-w.total):b.totalAmount;return o.jsxs("div",{id:"combined-invoice-content",className:"bg-white p-8 max-w-2xl mx-auto",children:[o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-bold text-slate-800",children:"INVOICE"}),o.jsx("p",{className:"text-slate-500 mt-1",children:e.invoice_number})]}),o.jsx("div",{className:"text-right flex flex-col items-end",children:a!=null&&a.logo_url?o.jsxs(o.Fragment,{children:[o.jsx("img",{src:a.logo_url,alt:a.shop_name||"Dive Shop",className:"w-32 h-auto mb-2 object-contain"}),a.shop_name&&o.jsx("p",{className:"font-semibold text-slate-800",children:a.shop_name})]}):o.jsx("p",{className:"text-sm text-slate-400",children:"Powered by Dive Monies"})})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-8 mb-8 pb-6 border-b",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs uppercase text-slate-400 mb-2",children:"Bill To"}),o.jsx("p",{className:"font-medium text-slate-800",children:e.customer_name}),e.group_name&&o.jsx("p",{className:"text-slate-600",children:e.group_name}),e.customer_email&&o.jsx("p",{className:"text-sm text-slate-500",children:e.customer_email})]}),o.jsx("div",{className:"text-right",children:o.jsxs("div",{className:"space-y-1",children:[o.jsxs("p",{className:"text-sm",children:[o.jsx("span",{className:"text-slate-400",children:"Invoice Date:"})," ",o.jsx("span",{className:"font-medium",children:_e(new Date(e.invoice_date),"MMMM d, yyyy")})]}),e.due_date&&o.jsxs("p",{className:"text-sm",children:[o.jsx("span",{className:"text-slate-400",children:"Due Date:"})," ",o.jsx("span",{className:"font-medium",children:_e(new Date(e.due_date),"MMMM d, yyyy")})]}),o.jsxs("p",{className:"text-sm",children:[o.jsx("span",{className:"text-slate-400",children:"Status:"})," ",o.jsx("span",{className:`font-medium ${e.status==="Paid"?"text-emerald-600":"text-amber-600"}`,children:e.status||"Draft"})]})]})})]}),o.jsxs("table",{className:"w-full mb-6",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b",children:[o.jsx("th",{className:"text-left py-3 text-xs uppercase text-slate-400",children:"Description"}),o.jsx("th",{className:"text-center py-3 text-xs uppercase text-slate-400",children:"Qty"}),o.jsx("th",{className:"text-right py-3 text-xs uppercase text-slate-400",children:"Unit Price"}),o.jsx("th",{className:"text-right py-3 text-xs uppercase text-slate-400",children:"Amount"})]})}),o.jsxs("tbody",{children:[t.map(C=>{const A=C.sale_currency||"IDR",E=A==="IDR"?"Rp":A==="USD"?"$":"Â¥",P=D=>A==="IDR"?D.toLocaleString("id-ID"):A==="USD"?D.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):D.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2});return o.jsxs("tr",{className:"border-b border-slate-100",children:[o.jsxs("td",{className:"py-3",children:[o.jsx("p",{className:"font-medium text-slate-800",children:l(C.product_id)}),o.jsx("p",{className:"text-xs text-slate-500",children:c(C.product_id)}),C.sale_date&&o.jsx("p",{className:"text-xs text-slate-400",children:_e(new Date(C.sale_date),"MMM d, yyyy")})]}),o.jsx("td",{className:"text-center py-3",children:C.quantity||1}),o.jsxs("td",{className:"text-right py-3",children:[E," ",P(C.unit_price||C.total_amount||0)]}),o.jsxs("td",{className:"text-right py-3 font-medium",children:[E," ",P(C.total_amount||0)]})]},C.id)}),(k=e.additional_fees)==null?void 0:k.map((C,A)=>o.jsxs("tr",{className:"border-b border-slate-100 bg-amber-50/50",children:[o.jsxs("td",{className:"py-3",children:[o.jsx("p",{className:"font-medium text-slate-800",children:C.description}),o.jsx("p",{className:"text-xs text-slate-500",children:"Additional Fee"})]}),o.jsx("td",{className:"text-center py-3",children:"1"}),o.jsxs("td",{className:"text-right py-3",children:["Rp ",(C.amount||0).toLocaleString("id-ID")]}),o.jsxs("td",{className:"text-right py-3 font-medium",children:["Rp ",(C.amount||0).toLocaleStr
784ing("id-ID")]})]},`fee-${A}`))]})]}),o.jsx("div",{className:"flex justify-end",children:o.jsxs("div",{className:"w-64 space-y-2",children:[(()=>{if([...new Set(t.map(E=>E.sale_currency||"IDR"))].length>1){const E={};return t.forEach(P=>{const D=P.sale_currency||"IDR";E[D]||(E[D]=0),E[D]+=P.total_amount||0}),o.jsxs("div",{className:"space-y-1 pb-2 border-b border-slate-200",children:[o.jsx("p",{className:"text-xs font-medium text-slate-500 mb-1",children:"Sales by Currency:"}),Object.entries(E).map(([P,D])=>o.jsxs("div",{className:"flex justify-between text-sm text-slate-600 pl-2",children:[o.jsxs("span",{children:[P,":"]}),o.jsxs("span",{children:[P==="IDR"&&`Rp ${D.toLocaleString("id-ID")}`,P==="USD"&&`$${D.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,P==="CNY"&&`Â¥${D.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`]})]},P))]})}return null})(),b.feesTotal>0&&o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"Additional Fees:"}),o.jsxs("span",{children:["Rp ",b.feesTotal.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"Subtotal (IDR):"}),o.jsxs("span",{children:["Rp ",b.subtotalIDR.toLocaleString("id-ID")]})]}),b.discountAmount>0&&o.jsxs("div",{className:"flex justify-between text-rose-600",children:[o.jsxs("span",{children:["Discount",e.discount_type==="percentage"&&` (${e.discount_value}%)`,":"]}),o.jsxs("span",{children:["-Rp ",b.discountAmount.toLocaleString("id-ID")]})]}),e.invoice_type==="deposit"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"After Discount:"}),o.jsxs("span",{children:["Rp ",b.afterDiscount.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-lg font-bold text-cyan-700 border-t pt-2",children:[o.jsxs("span",{children:["Deposit (",e.deposit_percentage||30,"%):"]}),o.jsxs("span",{children:["Rp ",N.toLocaleString("id-ID")]})]})]}):o.jsxs(o.Fragment,{children:[w.total>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex justify-between text-slate-600",children:[o.jsx("span",{children:"After Discount:"}),o.jsxs("span",{children:["Rp ",b.afterDiscount.toLocaleString("id-ID")]})]}),o.jsxs("div",{className:"flex justify-between text-emerald-600",children:[o.jsx("span",{children:"Deposit Already Paid:"}),o.jsxs("span",{children:["-Rp ",w.total.toLocaleString("id-ID")]})]})]}),o.jsxs("div",{className:"flex justify-between text-lg font-bold text-slate-800 border-t pt-2",children:[o.jsx("span",{children:w.total>0?"Remaining Balance:":"Total (IDR):"}),o.jsxs("span",{children:["Rp ",N.toLocaleString("id-ID")]})]})]}),o.jsxs("div",{className:"flex justify-between text-xs text-slate-500 pt-1",children:[o.jsx("span",{children:"Approx USD:"}),o.jsxs("span",{children:["$",(N*((i==null?void 0:i.idr_to_usd)||63e-6)).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),o.jsxs("div",{className:"flex justify-between text-xs text-slate-500",children:[o.jsx("span",{children:"Approx CNY:"}),o.jsxs("span",{children:["Â¥",(N*((i==null?void 0:i.idr_to_cny)||46e-5)).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})]})]})]})}),e.notes&&o.jsxs("div",{className:"mt-8 pt-6 border-t",children:[o.jsx("h3",{className:"text-xs uppercase text-slate-400 mb-2",children:"Notes"}),o.jsx("p",{className:"text-sm text-slate-600",children:e.notes})]}),a&&o.jsxs("div",{className:"mt-8 pt-6 border-t",children:[o.jsx("h3",{className:"text-xs uppercase text-slate-400 mb-3",children:"Payment Information"}),o.jsxs("div",{className:"text-sm text-slate-600",children:[a.contact_email&&o.jsxs("p",{className:"mb-1",children:["Email: ",a.contact_email]}),a.contact_phone&&o.jsxs("p",{className:"mb-1",children:["Phone: ",a.contact_phone]}),a.address&&o.jsxs("p",{className:"mb-1",children:[a.address,a.city&&`, ${a.city}`,a.country&&`, ${a.country}`]})]}),o.jsxs("p",{className:"text-xs text-slate-500 mt-3",children:["Please include invoice number ",o.jsx("span",{className:"font-medium",children:e.invoice_number})," in the transfer description."]})]}),o.jsx("div",{className:"mt-6 pt-4 border-t bg-slate-50 p-3 rounded",children:o.jsxs("p",{className:"text-xs text-slate-600",children:[o.jsx("strong",{children:"Important:"})," For multi-currency invoices, the displayed amounts are accurate at the moment of invoice generation. Exchange rates may vary at the time of payment. Bank charges for credit card payments and international transfers are not included and may apply."]})}),o.jsxs("div",{className:"mt-8 pt-6 border-t text-center",children:[o.jsx("p",{className:"text-sm text-slate-500",children:"Thank y
784ou for diving with us!"}),a!=null&&a.website?o.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:[a.shop_name||""," • ",a.website]}):o.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Powered by Dive Monies"})]})]})}function $2({contentId:e,filename:t,variant:n="outline",size:r="sm",showDownload:i=!0}){const s=()=>{const a=document.getElementById(e);if(!a)return;const l=window.open("","_blank");l.document.write(`
785      <!DOCTYPE html>
786      <html>
787        <head>
788          <title>${t}</title>
789          <script src="https://cdn.tailwindcss.com"><\/script>
790          <style>
791            @media print {
792              body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
793            }
794            body { font-family: system-ui, -apple-system, sans-serif; }
795          </style>
796        </head>
797        <body class="p-4">
798          ${a.outerHTML}
799          <script>
800            setTimeout(() => { window.print(); window.close(); }, 500);
801          <\/script>
802        </body>
803      </html>
804    `),l.document.close()};return o.jsxs(re,{variant:n,size:r,onClick:s,children:[o.jsx(FZ,{className:"w-4 h-4 mr-2"}),"Print"]})}function rMe({invoice:e,sales:t,products:n}){const r=l=>{var c;return((c=n.find(d=>d.id===l))==null?void 0:c.name)||"Product"},i=()=>{if(!e.customer_email){gt.error("No customer email available");return}const l=`Invoice ${e.invoice_number} - Dive Monies`,c=`Dear ${e.customer_name||"Customer"},
805
806Thank you for choosing Dive Monies for your diving adventure.
807
808INVOICE DETAILS
809Invoice Number: ${e.invoice_number}
810Date: ${_e(new Date(e.invoice_date),"MMMM d, yyyy")}
811${e.due_date?`Due Date: ${_e(new Date(e.due_date),"MMMM d, yyyy")}`:""}
812Total Amount: Rp ${(e.total_amount||0).toLocaleString("id-ID")}
813
814PAYMENT INFORMATION
815Bank Transfer (Indonesia):
816Bank: BNI (Bank Negara Indonesia)
817Account Name: PT BIG FINS INT
818Account Number: 1897038388
819
820International Payment (Wise):
821https://wise.com/pay/me/gopaalgj
822
823Please include invoice number ${e.invoice_number} in the transfer description.
824
825Thank you for diving with us!
826
827Warm regards,
828The Dive Monies Team`,d=`mailto:${e.customer_email}?subject=${encodeURIComponent(l)}&body=${encodeURIComponent(c)}`;window.location.href=d},s=()=>{const l=t.map(c=>`• ${r(c.product_id)} (Qty: ${c.quantity||1}): Rp ${(c.total_amount||0).toLocaleString("id-ID")}`).join(`
829`);return`
830*INVOICE: ${e.invoice_number}*
831Date: ${_e(new Date(e.invoice_date),"MMMM d, yyyy")}
832${e.due_date?`Due Date: ${_e(new Date(e.due_date),"MMMM d, yyyy")}`:""}
833
834${e.group_name?`Group: ${e.group_name}
835`:""}*ITEMS:*
836${l}
837
838*Subtotal:* Rp ${(e.subtotal||0).toLocaleString("id-ID")}
839${e.discount_amount>0?`*Discount:* -Rp ${e.discount_amount.toLocaleString("id-ID")}
840`:""}*TOTAL: Rp ${(e.total_amount||0).toLocaleString("id-ID")}*
841
842💳 *PAYMENT INFORMATION*
843*Bank Transfer (Indonesia):*
844Bank: BNI
845Account Name: PT BIG FINS INT
846Account Number: 1897038388
847
848*International Payment (Wise):*
849https://wise.com/pay/me/gopaalgj
850
851Please include invoice number *${e.invoice_number}* in the transfer description.
852
853Thank you for diving with us! 🤿
854- DiveShop Team
855    `.trim()},a=()=>{const l=encodeURIComponent(s());window.open(`https://wa.me/?text=${l}`,"_blank")};return o.jsx(o.Fragment,{children:o.jsxs("div",{className:"flex gap-2",children:[o.jsxs(re,{variant:"outline",size:"sm",onClick:i,disabled:!e.customer_email,title:e.customer_email?"":"No customer email",children:[o.jsx(pd,{className:"w-4 h-4 mr-2"}),"Email"]}),o.jsxs(re,{variant:"outline",size:"sm",onClick:a,className:"text-green-600 hover:text-green-700 hover:bg-green-50",children:[o.jsx(SA,{className:"w-4 h-4 mr-2"}),"WhatsApp"]})]})})}function iMe({open:e,onOpenChange:t,invoice:n,onSubmit:r,isAdmin:i}){var v,b,j,w,N;const[s,a]=_.useState(!1),[l,c]=_.useState({payment_method:((v=n==null?void 0:n.payment_evidence)==null?void 0:v.payment_method)||"",proof_image_url:((b=n==null?void 0:n.payment_evidence)==null?void 0:b.proof_image_url)||"",notes:((j=n==null?void 0:n.payment_evidence)==null?void 0:j.notes)||""}),d=async k=>{var A;const C=(A=k.target.files)==null?void 0:A[0];if(C){if(!C.type.startsWith("image/")){gt.error("Please upload an image file");return}if(C.size>5*1024*1024){gt.error("File size must be less than 5MB");return}a(!0);try{const{file_url:E}=await ne.integrations.Core.UploadFile({file:C});c(P=>({...P,proof_image_url:E})),gt.success("Image uploaded")}catch{gt.error("Failed to upload image")}finally{a(!1)}}},h=async()=>
855{if(!l.payment_method){gt.error("Please select a payment method");return}const k=await ne.auth.me(),C={payment_method:l.payment_method,proof_image_url:l.proof_image_url,notes:l.notes,submitted_by:k.email,submitted_date:new Date().toISOString(),verified_by_admin:!1};r(C)},f=async()=>{const k=await ne.auth.me(),C={...n.payment_evidence,verified_by_admin:!0,verified_by:k.email,verified_date:new Date().toISOString()};r(C)},m=(w=n==null?void 0:n.payment_evidence)==null?void 0:w.submitted_by,g=(N=n==null?void 0:n.payment_evidence)==null?void 0:N.verified_by_admin,x=!m||i;return o.jsx(tn,{open:e,onOpenChange:t,children:o.jsxs(Kt,{className:"max-w-md",children:[o.jsx(Un,{children:o.jsx(Vn,{children:m?"Payment Evidence":"Submit Payment Evidence"})}),m&&!i?o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:`p-4 rounded-lg border ${g?"bg-emerald-50 border-emerald-200":"bg-amber-50 border-amber-200"}`,children:o.jsx("div",{className:"flex items-center gap-2",children:g?o.jsxs(o.Fragment,{children:[o.jsx(Qr,{className:"w-5 h-5 text-emerald-600"}),o.jsx("p",{className:"font-medium text-emerald-800",children:"Payment Verified"})]}):o.jsxs(o.Fragment,{children:[o.jsx(EN,{className:"w-5 h-5 text-amber-600"}),o.jsx("p",{className:"font-medium text-amber-800",children:"Pending Admin Verification"})]})})}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Payment Method"}),o.jsx("p",{className:"font-medium",children:n.payment_evidence.payment_method})]}),n.payment_evidence.proof_image_url&&o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Payment Proof"}),o.jsx("img",{src:n.payment_evidence.proof_image_url,alt:"Payment proof",className:"mt-1 rounded border max-h-48 w-full object-contain bg-slate-50"})]}),n.payment_evidence.notes&&o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Notes"}),o.jsx("p",{className:"text-sm",children:n.payment_evidence.notes})]})]})]}):o.jsxs("div",{className:"space-y-4",children:[m&&!g&&i&&o.jsx("div",{className:"p-4 rounded-lg bg-amber-50 border border-amber-200",children:o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(EN,{className:"w-5 h-5 text-amber-600 mt-0.5"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-amber-800",children:"Pending Verification"}),o.jsx("p",{className:"text-sm text-amber-700 mt-1",children:"Review the payment evidence below and verify if correct."})]})]})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Payment Method *"}),o.jsxs(ht,{value:l.payment_method,onValueChange:k=>c(C=>({...C,payment_method:k})),disabled:!x,children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select method"})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Bank Transfer",children:"Bank Transfer"}),o.jsx(Pe,{value:"Cash",children:"Cash"}),o.jsx(Pe,{value:"Credit Card",children:"Credit Card"}),o.jsx(Pe,{value:"PayPal",children:"PayPal"}),o.jsx(Pe,{value:"Other",children:"Other"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Payment Proof (Optional)"}),l.proof_image_url?o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:l.proof_image_url,alt:"Payment proof",className:"rounded border max-h-48 w-full object-contain bg-slate-50"}),x&&o.jsx(re,{type:"button",variant:"outline",size:"sm",className:"absolute top-2 right-2",onClick:()=>c(k=>({...k,proof_image_url:""})),children:"Remove"})]}):x?o.jsxs("div",{className:"border-2 border-dashed rounded-lg p-6 text-center hover:border-cyan-300 transition-colors",children:[o.jsx("input",{type:"file",id:"payment-proof",accept:"image/*",onChange:d,className:"hidden",disabled:s}),o.jsx("label",{htmlFor:"payment-proof",className:"cursor-pointer",children:s?o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"animate-spin w-8 h-8 border-2 border-cyan-600 border-t-transparent rounded-full mx-auto"}),o.jsx("p",{className:"text-sm text-slate-600",children:"Uploading..."})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsx(Hl,{className:"w-8 h-8 text-slate-400 mx-auto"}),o.jsx("p",{className:"text-sm text-slate-600",children:"Click to upload screenshot"}),o.jsx("p",{className:"text-xs text-slate-400",children:"PNG, JPG up to 5MB"})]})})]}):null]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Notes (Optional)"}),o.jsx(ur,{value:l.notes,onChange:k=>c(C=>({...C,notes:k.target.value})),placeholder:"Add any additional notes...",rows:3,disabled:!x})]}),o.jsxs("div",{className:"flex gap-3 pt-2",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>t(!1),className:"flex-1",children:"Cancel"}),m&&i&&!g?o.jsxs(re,{type:"button",onClick:f,className:"flex-1 bg-emerald-600 hover:bg-emerald-700",children:[o.jsx(Qr,{className:"w-4 h-4 mr-2"}),"Verify Payment"]}):x?o.jsxs(re,{type:"button",onClick:h,className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600",disabled:!l.payment_method,children:[o.jsx(_p,{className:"w-4 h-4 mr-2"}),"Submit Evidence"]}):null]})]})]})})}function sMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState(null),[a,l]=_.useState(null),[c,d]=_.useState(""),h=hn(),{permissions:f}=Vo(),{data:m=[],isLoading:g}=Ee({queryKey:["invoices"],queryFn:()=>ne.entities.Invoice.list("-created_date")}),{data:x=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list()}),{data:v=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),b=Ye({mutationFn:O=>ne.entities.Invoice.create(O),onSuccess:()=>{h.invalidateQueries({queryKey:["invoices"]}),N()}}),j=Ye({mutationFn:({id:O,data:M})=>ne.entities.Invoice.update(O,M),onSuccess:()=>{h.invalidateQueries({queryKey:["invoices"]}),N()}}),w=Ye({mutationFn:O=>ne.entities.Invoice.delete(O),onSuccess:()=>{h.invalidateQueries({queryKey:["invoices"]})}}),N=()=>{t(!1),r(null)},k=O=>{n?j.mutate({id:n.id,data:O}):b.mutate(O)},C=async O=>{const M={payment_evidence:O,status:O.verified_by_admin?"Paid":a.status};j.mutate({id:a.id,data:M},{onSuccess:async()=>{await h.invalidateQueries({queryKey:["invoices"]}),await h.refetchQueries({queryKey:["invoices"]}),l(null),O.verified_by_admin?gt.success("Payment verified and invoice marked as Paid"):gt.success("Payment evidence submitted for admin verification")}})},A=m.filter(O=>{var M,$,F;return((M=O.customer_name)==null?void 0:M.toLowerCase().includes(c.toLowerCase()))||(($=O.group_name)==null?void 0:$.toLowerCase().includes(c.toLowerCase()))||((F=O.invoice_number)==null?void 0:F.toLowerCase().includes(c.toLowerCase()))}),E={Draft:"bg-slate-100 text-slate-700",Sent:"bg-blue-100 text-blue-700",Paid:"bg-emerald-100 text-emerald-700",Cancelled:"bg-rose-100 text-rose-700"},{data:P}=Ks(),D=O=>x.filter(M=>{var $;return($=O.sale_ids)==null?void 0:$.includes(M.id)}),B=_.useMemo(()=>{const O={};return M=>{if(O[M.id])return O[M.id];const $=D(M),F=(G,z)=>!P||z==="IDR"?G:z==="USD"?G/(P.idr_to_usd||63e-6):z==="CNY"?G/(P.idr_to_cny||46e-5):G,W=$.reduce((G,z)=>G+F(z.total_amount||0,z.sale_currency||"IDR"),0),q=(M.additional_fees||[]).reduce((G,z)=>G+(z.amount||0),0),K=W+q;let L=0;M.discount_type==="percentage"?L=K*((M.discount_value||0)/100):L=M.discount_value||0;const H=Math.max(0,K-L);let I;if(M.invoice_type==="deposit")I=H*((M.deposit_percentage||30)/100);else{let G=0;
855(M.sale_ids||[]).forEach(z=>{m.filter(pe=>{var ue;return pe.invoice_type==="deposit"&&pe.status==="Paid"&&((ue=pe.sale_ids)==null?void 0:ue.includes(z))&&pe.id!==M.id}).forEach(pe=>{const ue=pe.sale_ids.length,me=pe.total_amount/ue;G+=me})}),I=H-G}const V=Math.max(0,I);return O[M.id]=V,V}},[x,m,P]);return o.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-8",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-light text-slate-800",children:"Invoices"}),o.jsx("p",{className:"text-slate-500",children:"Manage combined invoices for customers"})]}),o.jsxs(re,{onClick:()=>{r(null),t(!0)},className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Create Invoice"]})]}),o.jsxs("div",{className:"relative mb-6",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{value:c,onChange:O=>d(O.target.value),placeholder:"Search by customer, group, or invoice number...",className:"pl-10 h-11"})]}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsx(dt,{className:"p-0",children:o.jsxs(im,{children:[o.jsx(sm,{children:o.jsxs(xr,{className:"bg-slate-50",children:[o.jsx(qt,{children:"Invoice #"}),o.jsx(qt,{children:"Customer / Group"}),o.jsx(qt,{children:"Type"}),o.jsx(qt,{children:"Date"}),o.jsx(qt,{children:"Items"}),o.jsx(qt,{className:"text-right",children:"Total"}),o.jsx(qt,{children:"Status"}),o.jsx(qt,{})]})}),o.jsx(am,{children:g?o.jsx(xr,{children:o.jsx(Nt,{colSpan:8,className:"text-center py-8 text-slate-400",children:"Loading..."})}):A.length===0?o.jsx(xr,{children:o.jsx(Nt,{colSpan:8,className:"text-center py-8 text-slate-400",children:"No invoices found"})}):A.map(O=>{var M,$,F,W,q,K,L;return o.jsxs(xr,{className:"hover:bg-slate-50",children:[o.jsx(Nt,{className:"font-medium",children:O.invoice_number||`INV-${O.id.slice(-6).toUpperCase()}`}),o.jsx(Nt,{children:o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:O.customer_name}),O.group_name&&o.jsx("p",{className:"text-xs text-slate-500",children:O.group_name})]})}),o.jsx(Nt,{children:o.jsx(st,{variant:"outline",className:O.invoice_type==="deposit"?"bg-amber-50 text-amber-700 border-amber-200":"bg-slate-50 text-slate-600 border-slate-200",children:O.invoice_type==="deposit"?`Deposit ${O.deposit_percentage||30}%`:"Full"})}),o.jsx(Nt,{children:_e(new Date(O.invoice_date),"MMM d, yyyy")}),o.jsxs(Nt,{children:[((M=O.sale_ids)==null?void 0:M.length)||0," items"]}),o.jsxs(Nt,{className:"text-right font-semibold",children:["Rp ",B(O).toLocaleString("id-ID")]}),o.jsx(Nt,{children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(st,{className:E[O.status]||E.Draft,children:O.status||"Draft"}),(($=O.payment_evidence)==null?void 0:$.submitted_by)&&!((F=O.payment_evidence)!=null&&F.verified_by_admin)&&o.jsx(EN,{className:"w-4 h-4 text-amber-500",title:"Pending verification"}),((W=O.payment_evidence)==null?void 0:W.verified_by_admin)&&o.jsx(Qr,{className:"w-4 h-4 text-emerald-500",title:"Payment verified"})]})}),o.jsx(Nt,{children:o.jsxs("div",{className:"flex gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>s(O),children:o.jsx(YJ,{className:"w-4 h-4"})}),O.status!=="Paid"&&O.status!=="Cancelled"&&o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>l(O),className:(q=O.payment_evidence)!=null&&q.submitted_by&&!((K=O.payment_evidence)!=null&&K.verified_by_admin)?"text-amber-600":"",title:(L=O.payment_evidence)!=null&&L.submitted_by?"View/Verify Payment":"Mark as Paid",children:o.jsx(_p,{className:"w-4 h-4"})}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>{r(O),t(!0)},children:o.jsx(jA,{className:"w-4 h-4"})}),f.isAdmin&&o.jsx(re,{variant:"ghost",size:"icon",className:"text-rose-600 hover:text-rose-700 hover:bg-rose-50",onClick:()=>{window.confirm("Are you sure you want to delete this invoice? This action cannot be undone.")&&w.mutate(O.id)},children:o.jsx(On,{className:"w-4 h-4"})})]})})]},O.id)})})]})})}),o.jsx(tn,{open:e,onOpenChange:O=>{O||N()},children:o.jsxs(Kt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:n?"Edit Invoice":"Create Invoice"})}),e&&o.jsx(tMe,{sales:x,products:v,invoices:m,initialData:n,onSubmit:k,onCancel:N},(n==null?void 0:n.id)||"new")]})}),i&&o.jsx(tn,{open:!0,onOpenChange:()=>s(null),children:o.jsxs(Kt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:"Invoice Preview"})}),o.jsxs("div",{className:"flex justify-end gap-2 mb-4",children:[o.jsx($2,{contentId:"combined-invoice-content",filename:`Invoice-${i.invoice_number||i.id}`}),i.customer_email&&o.jsx(rMe,{invoice:i,sales:D(i),products:v})]}),o.jsx(nMe,{invoice:i,sales:D(i),products:v,allInvoices:m})]})}),a&&o.jsx(iMe,{open:!0,onOpenChange:()=>l(null),invoice:a,onSubmit:C,isAdmin:f.isAdmin})]})}function aMe(){return o.jsx(ms,{children:o.jsx(sMe,{})})}const oMe=["Cash","Bank Transfer","Check","Other"];function lMe({vendors:e,pendingSales:t,onSubmit:n,onCancel:r}){const[i,s]=_.useState({vendor_id:"",amount:"",payment_date:_e(new Date,"yyyy-MM-dd"),sale_ids:[],payment_method:"Bank Transfer",reference:"",n
855otes:""}),a=i.vendor_id?t.filter(f=>f.vendor_id===i.vendor_id&&f.payment_status==="Pending"):[],l=a.reduce((f,m)=>f+(m.vendor_cost||0),0),c=(f,m)=>{s(g=>{const x=m?[...g.sale_ids,f]:g.sale_ids.filter(j=>j!==f),b=a.filter(j=>x.includes(j.id)).reduce((j,w)=>j+(w.vendor_cost||0),0);return{...g,sale_ids:x,amount:b.toString()}})},d=()=>{const f=a.map(m=>m.id);s(m=>({...m,sale_ids:f,amount:l.toString()}))},h=f=>{f.preventDefault(),n({...i,amount:parseFloat(i.amount)||0})};return o.jsxs(lt,{className:"border-0 shadow-lg",children:[o.jsxs(cr,{className:"flex flex-row items-center justify-between border-b bg-gradient-to-r from-cyan-50 to-blue-50",children:[o.jsx(vr,{className:"text-xl font-medium text-slate-800",children:"Record Vendor Payment"}),o.jsx(re,{variant:"ghost",size:"icon",onClick:r,children:o.jsx(xi,{className:"w-5 h-5"})})]}),o.jsx(dt,{className:"p-6",children:o.jsxs("form",{onSubmit:h,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Vendor *"}),o.jsxs(ht,{value:i.vendor_id,onValueChange:f=>s(m=>({...m,vendor_id:f,sale_ids:[],amount:""})),required:!0,children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{placeholder:"Select vendor"})}),o.jsx(ut,{children:e.map(f=>o.jsx(Pe,{value:f.id,children:f.name},f.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Payment Date *"}),o.jsx(ye,{type:"date",value:i.payment_date,onChange:f=>s(m=>({...m,payment_date:f.target.value})),className:"h-11",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Payment Method"}),o.jsxs(ht,{value:i.payment_method,onValueChange:f=>s(m=>({...m,payment_method:f})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsx(ut,{children:oMe.map(f=>o.jsx(Pe,{value:f,children:f},f))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Reference #"}),o.jsx(ye,{value:i.reference,onChange:f=>s(m=>({...m,reference:f.target.value})),placeholder:"Transaction reference",className:"h-11"})]})]}),i.vendor_id&&a.length>0&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Select Sales to Pay"}),o.jsxs(re,{type:"button",variant:"link",size:"sm",onClick:d,className:"text-cyan-600",children:["Select All ($",l.toFixed(2),")"]})]}),o.jsx("div",{className:"max-h-48 overflow-y-auto space-y-2 p-3 bg-slate-50 rounded-lg",children:a.map(f=>o.jsxs("div",{className:"flex items-center justify-between p-3 bg-white rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(qi,{checked:i.sale_ids.includes(f.id),onCheckedChange:m=>c(f.id,m)}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-slate-700",children:f.customer_name||"Sale"}),o.jsx("p",{className:"text-xs text-slate-500",children:f.sale_date})]})]}),o.jsxs("p",{className:"text-sm font-semibold text-slate-700",children:["$",(f.vendor_cost||0).toFixed(2)]})]},f.id))})]}),i.vendor_id&&a.length===0&&o.jsx("div",{className:"p-4 bg-slate-50 rounded-lg text-center text-slate-500",children:"No pending payments for this vendor"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Payment Amount *"}),o.jsxs("div",{className:"relative",children:[o.jsx(Mo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{type:"number",step:"0.01",min:"0",value:i.amount,onChange:f=>s(m=>({...m,amount:f.target.value})),placeholder:"0.00",className:"h-11 pl-9",required:!0})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Notes"}),o.jsx(ur,{value:i.notes,onChange:f=>s(m=>({...m,notes:f.target.value})),placeholder:"Payment notes...",rows:2})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:r,className:"flex-1 h-11",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 h-11 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:"Record Payment"})]})]})})]})}function cMe({payment:e,vendor:t,sales:n=[],products:r=[]}){const i=`RCP-${_e(new Date(e.payment_date),"yyyyMMdd")}-${e.id.slice(-6).toUpperCase()}`,{data:s=[]}=Ee({queryKey:["diveShopProfile"],queryFn:()=>ne.entities.DiveShopProfile.list()}),a=s[0],l=d=>
855`Rp ${(d||0).toLocaleString("id-ID")}`,c=n.filter(d=>{var h;return(h=e.sale_ids)==null?void 0:h.includes(d.id)});return o.jsxs("div",{className:"bg-white p-8 max-w-2xl mx-auto",id:"receipt-content",children:[o.jsxs("div",{className:"flex justify-between items-start mb-8 pb-6 border-b-2 border-emerald-500",children:[a!=null&&a.logo_url||a!=null&&a.shop_name?o.jsxs("div",{className:"flex items-center gap-3",children:[a.logo_url&&o.jsx("img",{src:a.logo_url,alt:a.shop_name||"Dive Shop",className:"w-16 h-16 object-contain"}),o.jsx("div",{children:a.shop_name&&o.jsx("h1",{className:"text-2xl font-bold text-slate-800",children:a.shop_name})})]}):o.jsx("div",{children:o.jsx("p",{className:"text-sm text-slate-400",children:"Powered by Dive Monies"})}),o.jsxs("div",{className:"text-right",children:[o.jsx("h2",{className:"text-2xl font-bold text-emerald-600",children:"PAYMENT RECEIPT"}),o.jsx("p",{className:"text-sm text-slate-600 mt-1",children:i})]})]}),o.jsx("div",{className:"flex justify-center mb-6",children:o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-emerald-50 rounded-full",children:[o.jsx(lx,{className:"w-5 h-5 text-emerald-600"}),o.jsx("span",{className:"font-medium text-emerald-700",children:"Payment Confirmed"})]})}),o.jsxs("div",{className:"grid grid-cols-2 gap-8 mb-8",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-2",children:"Paid To"}),o.jsx("p",{className:"font-medium text-slate-800 text-lg",children:(t==null?void 0:t.name)||"Vendor"}),(t==null?void 0:t.contact_email)&&o.jsx("p",{className:"text-sm text-slate-600",children:t.contact_email}),(t==null?void 0:t.contact_phone)&&o.jsx("p",{className:"text-sm text-slate-600",children:t.contact_phone})]}),o.jsxs("div",{className:"text-right",children:[o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-1",children:"Payment Date"}),o.jsx("p",{className:"text-slate-800",children:_e(new Date(e.payment_date),"MMMM d, yyyy")})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-1",children:"Payment Method"}),o.jsx("p",{className:"text-slate-800",children:e.payment_method||"Not specified"})]})]})]}),e.reference&&o.jsxs("div",{className:"mb-6 p-3 bg-slate-50 rounded-lg",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-1",children:"Reference / Transaction ID"}),o.jsx("p",{className:"font-mono text-slate-700",children:e.reference})]}),c.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-3",children:"Sales Covered by This Payment"}),o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b-2 border-slate-200",children:[o.jsx("th",{className:"text-left py-2 text-xs font-semibold text-slate-400 uppercase",children:"Date"}),o.jsx("th",{className:"text-left py-2 text-xs font-semibold text-slate-400 uppercase",children:"Product"}),o.jsx("th",{className:"text-left py-2 text-xs font-semibold text-slate-400 uppercase",children:"Customer"}),o.jsx("th",{className:"text-right py-2 text-xs font-semibold text-slate-400 uppercase",children:"Vendor Cost"})]})}),o.jsx("tbody",{children:c.map(d=>{var m,g;const h=r.find(x=>x.id===d.product_id),f=((g=(m=d.vendor_costs)==null?void 0:m.find(x=>x.vendor_id===(t==null?void 0:t.id)))==null?void 0:g.cost)||d.vendor_cost||0;return o.jsxs("tr",{className:"border-b border-slate-100",children:[o.jsx("td",{className:"py-3 text-sm text-slate-600",children:_e(new Date(d.sale_date||d.created_date),"MMM d, yyyy")}),o.jsx("td",{className:"py-3 text-sm text-slate-800",children:(h==null?void 0:h.name)||"Product"}),o.jsx("td",{className:"py-3 text-sm text-slate-600",children:d.customer_name||"Customer"}),o.jsx("td",{className:"py-3 text-sm text-right text-slate-800",children:l(f)})]},d.id)})})]})]}),o.jsx("div",{className:"flex justify-end mb-8",children:o.jsx("div",{className:"w-64 bg-emerald-50 rounded-lg p-4",children:o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsx("span",{className:"text-emerald-800 font-medium",children:"Total Paid"}),o.jsx("span",{className:"text-2xl font-bold text-emerald-600",children:l(e.amount)})]})})}),e.notes&&o.jsxs("div",{className:"mb-8 p-4 bg-slate-50 rounded-lg",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-2",children:"Notes"}),o.jsx("p",{className:"text-sm text-slate-600",children:e.notes})]}),o.jsxs("div",{className:"text-center pt-6 border-t border-slate-200",children:[o.jsx("p",{className:"text-sm text-slate-500",children:"This receipt confirms payment has been made."}),a!=null&&a.website?o.jsxs("p",{className:"text-xs text-slate-400 mt-2",children:[a.shop_name||""," • ",a.website]}):o.jsx("p",{className:"text-xs text-slate-400 mt-2",children:"Powered by Dive Monies"})]})]})}const uMe={Cash:sJ,"Bank Transfer":Ey,Check:jA,Other:Mo};function dMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(""),[i,s]=_.useState(null),a=hn(),{data:l=[],isLoading:c}=Ee({queryKey:["payments"],queryFn:()=>ne.entities.VendorPayment.list("-payment_date",500)}),{data:d=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),{data:h=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list()}),{data:f=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),m=Ye({mutationFn:async w=>{await ne.entities.VendorPayment.create(w);for(const N of w.sale_ids)await ne.entities.Sale.update(N,{payment_status:"Paid"})},onSuccess:()=>{a.invalidateQueries({queryKey:["payments"]}),a.invalidateQueries({queryKey:["sales"]}),t(!1)}}),g=h.filter(w=>w.payment_status==="Pending"),x=g.reduce((w,N)=>w+(N.vendor_cost||0),0),v=l.reduce((w,N)=>w+(N.amount||0),0),b=l.filter(w=>{const N=d.find(k=>k.id===w.vendor_id);return((N==null?void 0:N.name)||"").toLowerCase().includes(n.toLowerCase())||(w.reference||"").toLowerCase().includes(n.toLowerCase())}),j=d.map(w=>{const N=g.filter(C=>C.vendor_id===w.id),k=N.reduce((C,A)=>C+(A.vendor_cost||0),0);return{vendor:w,salesCount:N.length,total:k}}).filter(w=>w.total>0);return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto 
855space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Vendor Payments"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Track and record payments to vendors"})]}),o.jsxs(re,{onClick:()=>t(!0),className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 shadow-lg shadow-cyan-500/20",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Record Payment"]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(lt,{className:"border-0 shadow-sm bg-white",children:o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"p-4 rounded-xl bg-amber-50",children:o.jsx(Mo,{className:"w-8 h-8 text-amber-600"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-slate-500",children:"Pending Payments"}),o.jsxs("p",{className:"text-3xl font-light text-slate-800",children:["$",x.toLocaleString()]}),o.jsxs("p",{className:"text-sm text-slate-400",children:[g.length," sales unpaid"]})]})]})})}),o.jsx(lt,{className:"border-0 shadow-sm bg-white",children:o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"p-4 rounded-xl bg-emerald-50",children:o.jsx(Ey,{className:"w-8 h-8 text-emerald-600"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-slate-500",children:"Total Paid"}),o.jsxs("p",{className:"text-3xl font-light text-slate-800",children:["$",v.toLocaleString()]}),o.jsxs("p",{className:"text-sm text-slate-400",children:[l.length," payments made"]})]})]})})})]}),j.length>0&&o.jsxs(lt,{className:"border-0 shadow-sm",children:[o.jsx(cr,{className:"pb-3",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Outstanding by Vendor"})}),o.jsx(dt,{children:o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:j.map(({vendor:w,salesCount:N,total:k})=>o.jsxs("div",{className:"flex items-center justify-between p-4 bg-amber-50/50 rounded-xl border border-amber-100",children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:w.name}),o.jsxs("p",{className:"text-sm text-slate-500",children:[N," pending sales"]})]}),o.jsxs("p",{className:"text-lg font-semibold text-amber-700",children:["$",k.toFixed(2)]})]},w.id))})})]}),o.jsxs("div",{className:"relative max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search payments...",value:n,onChange:w=>r(w.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),o.jsx(lt,{className:"border-0 shadow-sm overflow-hidden",children:o.jsxs(im,{children:[o.jsx(sm,{children:o.jsxs(xr,{className:"bg-slate-50",children:[o.jsx(qt,{className:"font-medium",children:"Date"}),o.jsx(qt,{className:"font-medium",children:"Vendor"}),o.jsx(qt,{className:"font-medium",children:"Method"}),o.jsx(qt,{className:"font-medium",children:"Reference"}),o.jsx(qt,{className:"font-medium text-right",children:"Amount"}),o.jsx(qt,{className:"font-medium w-20"})]})}),o.jsx(am,{children:c?Array(5).fill(0).map((w,N)=>o.jsx(xr,{children:Array(5).fill(0).map((k,C)=>o.jsx(Nt,{children:o.jsx("div",{className:"h-4 bg-slate-100 rounded animate-pulse"})},C))},N)):b.length===0?o.jsx(xr,{children:o.jsx(Nt,{colSpan:5,className:"h-32 text-center text-slate-400",children:"No payments recorded yet"})}):b.map(w=>{const N=d.find(C=>C.id===w.vendor_id),k=uMe[w.payment_method]||Mo;return o.jsxs(xr,{className:"hover:bg-slate-50/50",children:[o.jsx(Nt,{className:"text-slate-600",children:w.payment_date}),o.jsx(Nt,{className:"font-medium text-slate-800",children:(N==null?void 0:N.name)||"Unknown"}),o.jsx(Nt,{children:o.jsxs(st,{variant:"outline",className:"bg-slate-50",children:[o.jsx(k,{className:"w-3 h-3 mr-1"}),w.payment_method]})}),o.jsx(Nt,{className:"text-slate-600",children:w.reference||"-"}),o.jsxs(Nt,{className:"text-right font-semibold text-slate-800",children:["$",(w.amount||0).toFixed(2)]}),o.jsx(Nt,{children:o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>s(w),title:"View Receipt",children:o.jsx(GB,{className:"w-4 h-4 text-emerald-600"})})})]},w.id)})})]})}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsx(Kt,{className:"max-w-2xl p-0 gap-0",children:o.jsx(lMe,{vendors:d,pendingSales:g,onSubmit:w=>m.mutate(w),onCancel:()=>t(!1)})})}),o.jsx(tn,{open:!!i,onOpenChange:()=>s(null),children:o.jsxs(Kt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsx("div",{className:"flex justify-end mb-4",children:o.jsx($2,{contentId:"receipt-content",filename:`Receipt-${i==null?void 0:i.id}`})}),i&&o.jsx(cMe,{payment:i,vendor:d.find(w=>w.id===i.vendor_id),sales:h,products:f})]})})]})})}function fMe(){return o.jsx(ms,{children:o.jsx(dMe,{})})}const Q5={"Dive Course":rh,"Fun Dive":Kr,"Day Trip":Oy,"Conservation Program":Ty,"Tec Dive Course":rh,"Tec Diving":Kr,GraduationCap:rh,Waves:Kr,Sun:Oy,Leaf:Ty,Anchor:Ui,Ship:_A,Fish:UB,Compass:BB};function hMe({price:e,currency:t,rates:n}){const r=(n==null?void 0:n.idr_to_usd)||63e-6,i=1/r,s=(n==null?void 0:n.cny_to_usd)||.14,a=1/s;let l,c,d;t==="USD"?(l=e,c=e*i,d=e*a):t==="CNY"?(d=e,l=e*s,c=l*i):(c=e,l=e*r,d=l*a);
855const h=t==="USD"?`$${l.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:t==="CNY"?`Â¥${d.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`:`Rp ${c.toLocaleString("id-ID")}`,f=[];return t!=="IDR"&&f.push(`Rp ${Math.round(c).toLocaleString("id-ID")}`),t!=="USD"&&f.push(`$${l.toFixed(2)}`),t!=="CNY"&&f.push(`Â¥${d.toFixed(2)}`),o.jsxs("div",{children:[o.jsx("div",{className:"font-medium text-slate-600 text-sm",children:h}),o.jsx("div",{className:"text-xs text-slate-400",children:f.join(" / ")})]})}const J5={"Dive Course":"bg-cyan-100 text-cyan-700 border-cyan-200","Fun Dive":"bg-blue-100 text-blue-700 border-blue-200","Day Trip":"bg-amber-100 text-amber-700 border-amber-200","Conservation Program":"bg-emerald-100 text-emerald-700 border-emerald-200","Tec Dive Course":"bg-purple-100 text-purple-700 border-purple-200","Tec Diving":"bg-violet-100 text-violet-700 border-violet-200",cyan:"bg-cyan-100 text-cyan-700 border-cyan-200",blue:"bg-blue-100 text-blue-700 border-blue-200",amber:"bg-amber-100 text-amber-700 border-amber-200",emerald:"bg-emerald-100 text-emerald-700 border-emerald-200",purple:"bg-purple-100 text-purple-700 border-purple-200",violet:"bg-violet-100 text-violet-700 border-violet-200",rose:"bg-rose-100 text-rose-700 border-rose-200",orange:"bg-orange-100 text-orange-700 border-orange-200",teal:"bg-teal-100 text-teal-700 border-teal-200",indigo:"bg-indigo-100 text-indigo-700 border-indigo-200"};function pMe({product:e,vendor:t,vendors:n=[],onEdit:r,onDelete:i,canViewCosts:s=!0,customCategories:a=[]}){var j,w;const l=a.find(N=>N.name===e.category),c=l?Q5[l.icon]||Kr:Q5[e.category]||Kr,d=l?J5[l.color]:J5[e.category],{data:h}=Ks(),f=((j=e.vendor_costs)==null?void 0:j.reduce((N,k)=>N+(k.total_cost||k.cost||0),0))||e.cost||0,m=(h==null?void 0:h.idr_to_usd)||63e-6,g=e.display_currency==="USD"?(e.price||0)/m:e.price||0,x=g-f,v=g?(x/g*100).toFixed(0):0,b=((w=e.vendor_costs)==null?void 0:w.map(N=>{const k=n.find(C=>C.id===N.vendor_id);return k==null?void 0:k.name}).filter(Boolean))||(t?[t.name]:[]);return o.jsx(lt,{className:"border-0 shadow-sm hover:shadow-md transition-all duration-300 overflow-hidden group",children:o.jsxs(dt,{className:"p-0",children:[o.jsxs("div",{className:"p-5",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-cyan-50 to-blue-50",children:o.jsx(c,{className:"w-6 h-6 text-cyan-600"})}),o.jsx(st,{variant:"outline",className:`${d||"bg-slate-100 text-slate-700 border-slate-200"} border`,children:e.category})]}),o.jsx("h3",{className:"text-lg font-medium text-slate-800 mb-1",children:e.name}),e.description&&o.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 mb-4",children:e.description}),o.jsxs("div",{className:`grid gap-3 py-4 border-t border-b border-slate-100 ${s?"grid-cols-3":"grid-cols-1"}`,children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wide",children:"Price"}),e.display_currency==="USD"?o.jsx("div",{className:"space-y-0.5",children:o.jsxs("div",{className:"font-medium text-slate-800",children:["$",(e.price||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})]})}):o.jsx(JOe,{amountIDR:e.price||0,showAll:!0,primaryCurrency:e.display_currency||"IDR",className:"text-slate-800"}),e.price_2&&o.jsxs("div",{className:"mt-1 pt-1 border-t border-dashed border-slate-200",children:[o.jsxs("p",{className:"text-xs text-slate-400",children:[e.price_2_label||"Alt",":"]}),o.jsx(hMe,{price:e.price_2,currency:e.price_2_currency||e.display_currency,rates:h})]})]}),s&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wide",children:"Cost"}),o.jsx("p",{className:"text-lg font-semibold text-slate-600",children:Cy(f,"IDR",h)})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wide",children:"Margin"}),o.jsxs("p",{className:"text-lg font-semibold text-emerald-600",children:[v,"%"]})]})]})]}),b.length>0&&o.jsxs("p",{className:"text-sm text-slate-500 mt-3",children:[b.length===1?"Vendor":"Vendors",": ",o.jsx("span",{className:"font-medium text-slate-700",children:b.join(", ")})]}),(r||i)&&o.jsxs("div",{className:"flex gap-2 mt-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[r&&o.jsxs(re,{variant:"outline",size:"sm",onClick:()=>r(e),className:"flex-1",children:[o.jsx(jp,{className:"w-4 h-4 mr-2"}),"Edit"]}),i&&o.jsx(re,{variant:"outline",size:"sm",onClick:()=>i(e),className:"text-rose-600 hover:text-rose-700 hover:bg-rose-50",children:o.jsx(On,{className:"w-4 h-4"})})]})]}),e.is_active===!1&&o.jsx("div",{className:"px-5 py-2 bg-slate-100 text-center",children:o.jsx("span",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Inactive"})})]})})}function mMe({vendors:e,products:t=[],onSubmit:n,onCancel:r,initialData:i}){const{data:s=[]}=Ee({queryKey:["productCategories"],queryFn:()=>ne.entities.ProductCategory.filter({is_active:!0})}),[a,l]=_.useState({name:"",category:"",price:"",price_2:"",price_2_label:"",price_2_currency:"IDR",display_currency:"IDR",weekly_base_fee:"",default_weeks:"1",included_course_ids:[],vendor_costs:[],description:"",is_active:!0}),[c,d]=_.useState({}),h=t.filter(P=>P.category==="Dive Course"&&P.id!==(i==null?void 0:i.id)),{data:f}=Ks(),m=(P,D)=>{if(!P)return 0;if(D==="USD")return P;const B=(f==null?void 0:f.idr_to_usd)||63e-6;return P*B},g=()=>{const P=parseFloat(a.weekly_base_fee)||0,D=parseInt(a.default_weeks)||1,B=(a.included_course_ids||[]).reduce((O,M)=>{const $=h.find(F=>F.id===M);return $?O+m($.price,$.display_currency||"IDR"):O},0);return P*D+B},x=P=>P?m(P.price,P.display_currency||"IDR"):0;_.useEffect(()=>{if(a.category==="Conservation Program"){const P=g();P>0&&P!==parseFloat(a.price)&&l(D=>({...D,price:P.toString()}))}},[a.weekly_base_fee,a.default_weeks,a.included_course_ids,a.category]),_.useEffect(()=>{var P,D,B,O,M,$,F;if(i){const W=((P=i.vendor_costs)==null?void 0:P.map(q=>{var K,L,H,I;return{vendor_id:q.vendor_id,cost_components:q.cost_components||[{name:"Base Cost",cost:((K=q.cost)==null?void 0:K.toString())||((L=q.total_cost)==null?void 0:L.toString())||""}],total_cost:((H=q.total_cost)==null?void 0:H.toString())||((I=q.cost)==null?void 0:I.toString())||""}}))||(i.vendor_id?[{vendor_id:i.vendor_id,cost_components:[{name:"Base Cost",cost:((D=i.cost)==null?void 0:D.toString())||""}],total_cost:((B=i.cost)==null?void 0:B.toString())||""}]:[]);l({name:i.name||"",category:i.category||"",price:((O=i.price)==null?void 0:O.toString())||"",price_2:((M=i.price_2)==null?void 0:M.toString())||"",price_2_label:i.price_2_label||"",price_2_currency:i.price_2_currency||i.display_currency||"IDR",display_currency:i.display_currency||"IDR",weekly_base_fee:(($=i.weekly_base_fee)==null?void 0:$.toString())||"",default_weeks:((F=i.default_weeks)==null?void 0:F.toString())||"1",included_course_ids:i.included_course_ids||(i.included_course_id?[i.included_course_id]:[]),vendor_costs:W,description:i.description||"",is_active:i.is_active!==!1})}},[i]);const v=P=>{var M,$;P.preventDefault();const D=a.vendor_costs.filter(F=>F.vendor_id).map(F=>{const W=F.cost_components.filter(K=>K.name).map(K=>({name:K.name,cost:parseFloat(K.cost)||0})),q=W.reduce((K,L)=>K+L.cost,0);return{vendor_id:F.vendor_id,cost_components:W,total_cost:q}}),B=D.reduce((F,W)=>F+W.total_cost,0),O=a.category==="Conservation Program";n({...a,price:parseFloat(a.price)||0,price_2:a.price_2?parseFloat(a.price_2):null,price_2_label:a.price_2_label||null,price_2_currency:a.price_2?a.price_2_currency:null,display_currency:a.display_currency,weekly_base_fee:O&&a.weekly_base_fee?parseFloat(a.weekly_base_fee):null,default_weeks:O?parseInt(a.default_weeks)||1:null,included_course_ids:O&&((M=a.included_course_ids)==null?void 0:M.length)>0?a.included_course_ids:null,vendor_costs:D,cost:B,vendor_id:(($=D[
8550])==null?void 0:$.vendor_id)||null})},b=()=>{const P=a.vendor_costs.length;l(D=>({...D,vendor_costs:[...D.vendor_costs,{vendor_id:"",cost_components:[{name:"",cost:""}],total_cost:""}]})),d(D=>({...D,[P]:!0}))},j=(P,D,B)=>{l(O=>({...O,vendor_costs:O.vendor_costs.map((M,$)=>$===P?{...M,[D]:B}:M)}))},w=P=>{l(D=>({...D,vendor_costs:D.vendor_costs.filter((B,O)=>O!==P)}))},N=P=>{l(D=>({...D,vendor_costs:D.vendor_costs.map((B,O)=>O===P?{...B,cost_components:[...B.cost_components,{name:"",cost:""}]}:B)}))},k=(P,D,B,O)=>{l(M=>{const $=M.vendor_costs.map((F,W)=>{if(W!==P)return F;const q=F.cost_components.map((L,H)=>H===D?{...L,[B]:O}:L),K=q.reduce((L,H)=>L+(parseFloat(H.cost)||0),0);return{...F,cost_components:q,total_cost:K.toString()}});return{...M,vendor_costs:$}})},C=(P,D)=>{l(B=>{const O=B.vendor_costs.map((M,$)=>{if($!==P)return M;const F=M.cost_components.filter((q,K)=>K!==D),W=F.reduce((q,K)=>q+(parseFloat(K.cost)||0),0);return{...M,cost_components:F,total_cost:W.toString()}});return{...B,vendor_costs:O}})},A=P=>{d(D=>({...D,[P]:!D[P]}))},E=P=>P.cost_components.reduce((D,B)=>D+(parseFloat(B.cost)||0),0);return o.jsxs(lt,{className:"border-0 shadow-lg max-h-[90vh] overflow-y-auto",children:[o.jsxs(cr,{className:"flex flex-row items-center justify-between border-b bg-gradient-to-r from-cyan-50 to-blue-50 sticky top-0 z-10",children:[o.jsx(vr,{className:"text-xl font-medium text-slate-800",children:i?"Edit Product":"New Product"}),o.jsx(re,{variant:"ghost",size:"icon",onClick:r,children:o.jsx(xi,{className:"w-5 h-5"})})]}),o.jsx(dt,{className:"p-6",children:o.jsxs("form",{onSubmit:v,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Product Name *"}),o.jsx(ye,{value:a.name,onChange:P=>l(D=>({...D,name:P.target.value})),placeholder:"Enter product name",className:"h-11",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Category *"}),o.jsxs(ht,{value:a.category,onValueChange:P=>l(D=>({...D,category:P})),required:!0,children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{placeholder:"Select category"})}),o.jsx(ut,{children:s.map(P=>o.jsx(Pe,{value:P.name,children:P.name},P.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Display Currency"}),o.jsxs(ht,{value:a.display_currency,onValueChange:P=>l(D=>({...D,display_currency:P})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"IDR",children:"IDR (Rp) - Indonesian Rupiah"}),o.jsx(Pe,{value:"USD",children:"USD ($) - US Dollar"}),o.jsx(Pe,{value:"CNY",children:"CNY (Â¥) - Chinese Yuan"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"text-sm text-slate-600",children:["Primary Price (",a.display_currency==="IDR"?"IDR":a.display_currency==="USD"?"USD":"CNY",") *"]}),o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",children:a.display_currency==="IDR"?"Rp":a.display_currency==="USD"?"$":"Â¥"}),o.jsx(ye,{type:"number",step:a.display_currency==="IDR"?"1":"0.01",min:"0",value:a.price,onChange:P=>l(D=>({...D,price:P.target.value})),placeholder:"0",className:"h-11 pl-10",required:!0})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Secondary Price Currency"}),o.jsxs(ht,{value:a.price_2_currency,onValueChange:P=>l(D=>({...D,price_2_currency:P})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"IDR",children:"IDR (Rp)"}),o.jsx(Pe,{value:"USD",children:"USD ($)"}),o.jsx(Pe,{value:"CNY",children:"CNY (Â¥)"})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"text-sm text-slate-600",children:["Secondary Price (",a.price_2_currency==="IDR"?"IDR":a.price_2_currency==="USD"?"USD":"CNY",", Optional)"]}),o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",children:a.price_2_currency==="IDR"?"Rp":a.price_2_currency==="USD"?"$":"Â¥"}),o.jsx(ye,{type:"number",step:a.price_2_currency==="IDR"?"1":"0.01",min:"0",value:a.price_2,onCh
855ange:P=>l(D=>({...D,price_2:P.target.value})),placeholder:"0",className:"h-11 pl-10"})]})]}),a.price_2&&o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Secondary Price Label"}),o.jsx(ye,{value:a.price_2_label,onChange:P=>l(D=>({...D,price_2_label:P.target.value})),placeholder:"e.g., Group Rate, Member Price, Local Price",className:"h-11"})]})]}),a.category==="Conservation Program"&&o.jsxs("div",{className:"space-y-4 p-4 bg-emerald-50 rounded-lg border border-emerald-200",children:[o.jsx("h3",{className:"font-medium text-emerald-800",children:"Conservation Program Settings"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Weekly Base Fee (USD)"}),o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",children:"$"}),o.jsx(ye,{type:"number",step:"0.01",min:"0",value:a.weekly_base_fee,onChange:P=>l(D=>({...D,weekly_base_fee:P.target.value})),placeholder:"0.00",className:"h-11 bg-white pl-7"})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Default Weeks"}),o.jsx(ye,{type:"number",step:"1",min:"1",value:a.default_weeks,onChange:P=>l(D=>({...D,default_weeks:P.target.value})),placeholder:"1",className:"h-11 bg-white"})]}),o.jsxs("div",{className:"space-y-2 md:col-span-3",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Included Dive Courses"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(P=>{var B;const D=(B=a.included_course_ids)==null?void 0:B.includes(P.id);return o.jsxs(re,{type:"button",variant:D?"default":"outline",size:"sm",className:D?"bg-emerald-600 hover:bg-emerald-700":"bg-white",onClick:()=>{l(O=>({...O,included_course_ids:D?O.included_course_ids.filter(M=>M!==P.id):[...O.included_course_ids||[],P.id]}))},children:[P.name," ($",x(P).toFixed(2),")"]},P.id)})}),h.length===0&&o.jsx("p",{className:"text-xs text-slate-400",children:"No dive courses available. Create dive courses first."})]})]}),o.jsxs("div",{className:"mt-4 p-3 bg-white rounded-lg border border-emerald-200",children:[o.jsx("p",{className:"text-sm font-medium text-emerald-800 mb-2",children:"Price Calculation:"}),o.jsxs("div",{className:"text-xs text-slate-600 space-y-1",children:[o.jsxs("div",{className:"flex justify-between",children:[o.jsxs("span",{children:["Weekly Base Fee × ",a.default_weeks||1," weeks:"]}),o.jsxs("span",{children:["$",((parseFloat(a.weekly_base_fee)||0)*(parseInt(a.default_weeks)||1)).toFixed(2)]})]}),(a.included_course_ids||[]).map(P=>{const D=h.find(B=>B.id===P);return D?o.jsxs("div",{className:"flex justify-between",children:[o.jsxs("span",{children:["+ ",D.name,":"]}),o.jsxs("span",{children:["$",x(D).toFixed(2)]})]},P):null}),o.jsxs("div",{className:"flex justify-between font-semibold text-emerald-700 border-t pt-1 mt-1",children:[o.jsx("span",{children:"Total Price:"}),o.jsxs("span",{children:["$",g().toFixed(2)]})]})]})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-sm font-medium text-slate-700",children:"Vendor Costs"}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:b,children:[o.jsx(en,{className:"w-4 h-4 mr-1"}),"Add Vendor"]})]}),a.vendor_costs.length===0?o.jsx("p",{className:"text-sm text-slate-400 text-center py-4 bg-slate-50 rounded-lg",children:'No vend
855ors assigned. Click "Add Vendor" to add vendor costs.'}):o.jsx("div",{className:"space-y-3",children:a.vendor_costs.map((P,D)=>{var $;const B=(($=e.find(F=>F.id===P.vendor_id))==null?void 0:$.name)||"Select Vendor",O=c[D],M=E(P);return o.jsxs("div",{className:"border border-slate-200 rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 cursor-pointer",onClick:()=>A(D),children:[o.jsxs("div",{className:"flex items-center gap-3",children:[O?o.jsx(ox,{className:"w-4 h-4 text-slate-400"}):o.jsx(wp,{className:"w-4 h-4 text-slate-400"}),o.jsx("span",{className:"font-medium text-slate-700",children:B}),o.jsxs("span",{className:"text-sm text-slate-500",children:["(",P.cost_components.length," components)"]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"font-semibold text-slate-800",children:["Rp ",M.toLocaleString("id-ID")]}),o.jsx(re,{type:"button",variant:"ghost",size:"icon",className:"text-rose-500 hover:text-rose-600 hover:bg-rose-50",onClick:F=>{F.stopPropagation(),w(D)},children:o.jsx(On,{className:"w-4 h-4"})})]})]}),O&&o.jsxs("div",{className:"p-4 space-y-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Vendor"}),o.jsxs(ht,{value:P.vendor_id,onValueChange:F=>j(D,"vendor_id",F),children:[o.jsx(ct,{className:"h-10",children:o.jsx(pt,{placeholder:"Select vendor"})}),o.jsx(ut,{children:e.filter(F=>F.id===P.vendor_id||!a.vendor_costs.some(W=>W.vendor_id===F.id&&W!==P)).map(F=>o.jsx(Pe,{value:F.id,children:F.name},F.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Cost Components"}),o.jsxs(re,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>N(D),children:[o.jsx(en,{className:"w-3 h-3 mr-1"}),"Add Component"]})]}),P.cost_components.map((F,W)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(ye,{value:F.name,onChange:q=>k(D,W,"name",q.target.value),placeholder:"e.g., Instructor Fee, Boat, Equipment",className:"h-9 flex-1"}),o.jsx(ye,{type:"number",step:"0.01",min:"0",value:F.cost,onChange:q=>k(D,W,"cost",q.target.value),placeholder:"0.00",className:"h-9 w-24"}),o.jsx(re,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-slate-400 hover:text-rose-500",onClick:()=>C(D,W),disabled:P.cost_components.length<=1,children:o.jsx(On,{className:"w-4 h-4"})})]},W))]})]})]},D)})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Description"}),o.jsx(ur,{value:a.description,onChange:P=>l(D=>({...D,description:P.target.value})),placeholder:"Product description...",rows:3})]}),o.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-lg",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium text-slate-700",children:"Active Product"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Inactive products won't appear in sales"})]}),o.jsx(jn,{checked:a.is_active,onCheckedChange:P=>l(D=>({...D,is_active:P}))})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:r,className:"flex-1 h-11",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 h-11 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:i?"Update Product":"Create Product"})]})]})})]})}const ty={"Dive Course":rh,"Fun Dive":Kr,"Day Trip":Oy,"Conservation Program":Ty,"Tec Dive Course":Ui,"Tec Diving":_A},gMe={"Dive Course":"bg-cyan-100 text-cyan-700","Fun Dive":"bg-blue-100 text-blue-700","Day Trip":"bg-amber-100 text-amber-700","Conservation Program":"bg-emerald-100 text-emerald-700","Tec Dive Course":"bg-purple-100 text-purple-700","Tec Diving":"bg-violet-100 text-violet-700"};function yMe({products:e,vendors:t,customCategories:n,onEdit:r,onDelete:i,canViewCosts:s}){const{data:a}=Ks(),l=f=>{if(ty[f])return ty[f];const m=n==null?void 0:n.find(g=>g.name===f);return m!=null&&m.icon&&ty[m.icon]?ty[m.icon]:Kr},c=(f,m)=>
855m==="USD"?`$${f.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:m==="CNY"?`Â¥${f.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`:`Rp ${f.toLocaleString("id-ID")}`,d=f=>{var m,g;return((m=f.vendor_costs)==null?void 0:m.length)>0?f.vendor_costs.map(x=>{var v;return(v=t.find(b=>b.id===x.vendor_id))==null?void 0:v.name}).filter(Boolean).join(", "):f.vendor_id&&((g=t.find(x=>x.id===f.vendor_id))==null?void 0:g.name)||""},h=f=>{var m;return((m=f.vendor_costs)==null?void 0:m.length)>0?f.vendor_costs.reduce((g,x)=>g+(x.total_cost||0),0):f.cost||0};return o.jsx("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden",children:o.jsxs("table",{className:"w-full",children:[o.jsx("thead",{className:"bg-slate-50 border-b",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-slate-500 uppercase",children:"Product"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-slate-500 uppercase",children:"Category"}),o.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-slate-500 uppercase",children:"Price"}),s&&o.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-slate-500 uppercase",children:"Cost"}),o.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-slate-500 uppercase",children:"Vendor"}),o.jsx("th",{className:"px-4 py-3 text-center text-xs font-medium text-slate-500 uppercase",children:"Status"}),(r||i)&&o.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium text-slate-500 uppercase",children:"Actions"})]})}),o.jsx("tbody",{className:"divide-y divide-slate-100",children:e.map(f=>{const m=l(f.category),g=gMe[f.category]||"bg-slate-100 text-slate-700",x=d(f),v=h(f);return o.jsxs("tr",{className:`hover:bg-slate-50 ${f.is_active?"":"opacity-50"}`,children:[o.jsx("td",{className:"px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${g.split(" ")[0]}`,children:o.jsx(m,{className:`w-4 h-4 ${g.split(" ")[1]}`})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:f.name}),f.description&&o.jsx("p",{className:"text-xs text-slate-400 truncate max-w-xs",children:f.description})]})]})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx(st,{className:g,children:f.category})}),o.jsxs("td",{className:"px-4 py-3 text-right",children:[o.jsx("div",{className:"font-medium text-slate-800",children:c(f.price,f.display_currency||"IDR")}),f.price_2&&o.jsxs("div",{className:"text-xs text-slate-400",children:[f.price_2_label||"Alt",": ",c(f.price_2,f.price_2_currency||f.display_currency||"IDR")]})]}),s&&o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("span",{className:"text-slate-600",children:["Rp ",v.toLocaleString("id-ID")]})}),o.jsx("td",{className:"px-4 py-3",children:o.jsx("span",{className:"text-sm text-slate-600",children:x||"-"})}),o.jsx("td",{className:"px-4 py-3 text-center",children:o.jsx(st,{variant:f.is_active?"default":"secondary",className:f.is_active?"bg-green-100 text-green-700":"",children:f.is_active?"Active":"Inactive"})}),(r||i)&&o.jsx("td",{className:"px-4 py-3 text-right",children:o.jsxs("div",{className:"flex items-center justify-end gap-1",children:[r&&o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>r(f),children:o.jsx(Sp,{className:"w-4 h-4 text-slate-400"})}),i&&o.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>i(f),children:o.jsx(On,{className:"w-4 h-4 text-rose-400"})})]})})]},f.id)})})]})})}const Z5=[{value:"GraduationCap",label:"Graduation Cap",icon:rh},{value:"Waves",label:"Waves",icon:Kr},{value:"Sun",label:"Sun",icon:Oy},{value:"Leaf",label:"Leaf",icon:Ty},{value:"Anchor",label:"Anchor",icon:Ui},{value:"Ship",label:"Ship",icon:_A},{value:"Fish",label:"Fish",icon:UB},{value:"Compass",label:"Compass",icon:BB}],mN=[{value:"cyan",label:"Cyan",class:"bg-cyan-100 text-cyan-700 border-cyan-200"},{value:"blue",label:"Blue",class:"bg-blue-100 text-blue-700 border-blue-200"},{value:"amber",label:"Amber",class:"bg-amber-100 text-amber-700 border-amber-200"},{value:"emerald",label:"Emerald",class:"bg-emerald-100 text-emerald-700 border-emerald-200"},{value:"purple",label:"Purple",class:"bg-purple-100 text-purple-700 border-purple-200"},{value:"violet",label:"Violet",class:"bg-violet-100 text-violet-700 border-violet-200"},{value:"rose",label:"Rose",class:"bg-rose-100 text-rose-700 border-rose-200"},{value:"orange",label:"Orange",class:"bg-orange-100 text-orange-700 border-orange-200"},{value:"teal",label:"Teal",class:"bg-teal-100 text-teal-700 border-teal-200"},{value:"indigo",label:"Indigo",class:"bg-indigo-100 text-indigo-700 border-indigo-200"}
855];function vMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState({name:"",icon:"Waves",color:"cyan"}),a=hn(),{data:l=[],isLoading:c}=Ee({queryKey:["productCategories"],queryFn:()=>ne.entities.ProductCategory.list()}),d=Ye({mutationFn:N=>ne.entities.ProductCategory.create(N),onSuccess:()=>{a.invalidateQueries({queryKey:["productCategories"]}),m()}}),h=Ye({mutationFn:({id:N,data:k})=>ne.entities.ProductCategory.update(N,k),onSuccess:()=>{a.invalidateQueries({queryKey:["productCategories"]}),m()}}),f=Ye({mutationFn:N=>ne.entities.ProductCategory.delete(N),onSuccess:()=>a.invalidateQueries({queryKey:["productCategories"]})}),m=()=>{t(!1),r(null),s({name:"",icon:"Waves",color:"cyan"})},g=N=>{r(N),s({name:N.name,icon:N.icon||"Waves",color:N.color||"cyan"}),t(!0)},x=N=>{if(N.preventDefault(),n)h.mutate({id:n.id,data:i});else{const k=Math.max(...l.map(C=>C.priority||0),0);d.mutate({...i,priority:k+1})}},v=async(N,k)=>{if(k===0)return;const C=[...l].sort((A,E)=>(E.priority||0)-(A.priority||0));[C[k-1],C[k]]=[C[k],C[k-1]];for(let A=0;A<C.length;A++)await h.mutateAsync({id:C[A].id,data:{priority:C.length-A}})},b=async(N,k)=>{const C=[...l].sort((A,E)=>(E.priority||0)-(A.priority||0));if(k!==C.length-1){[C[k],C[k+1]]=[C[k+1],C[k]];for(let A=0;A<C.length;A++)await h.mutateAsync({id:C[A].id,data:{priority:C.length-A}})}},j=N=>{const k=Z5.find(C=>C.value===N);return k?k.icon:Kr},w=N=>{const k=mN.find(C=>C.value===N);return k?k.class:mN[0].class};return o.jsxs("div",{className:"bg-white rounded-xl shadow-sm p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-medium text-slate-800",children:"Product Categories"}),o.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Manage custom product categories"})]}),o.jsxs(re,{onClick:()=>t(!0),size:"sm",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Category"]})]}),c?o.jsx("p",{className:"text-slate-500 text-center py-8",children:"Loading..."}):l.length===0?o.jsx("p",{className:"text-slate-500 text-center py-8",children:"No custom categories yet. Add your first one!"}):o.jsx("div",{className:"space-y-2",children:[...l].sort((N,k)=>(k.priority||0)-(N.priority||0)).map((N,k,C)=>{const A=j(N.icon);return o.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg group",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"h-5 w-5 p-0",onClick:()=>v(N,k),disabled:k===0,children:o.jsx(rJ,{className:"w-3 h-3"})}),o.jsx(re,{variant:"ghost",size:"icon",className:"h-5 w-5 p-0",onClick:()=>b(N,k),disabled:k===C.length-1,children:o.jsx(ZQ,{className:"w-3 h-3"})})]}),o.jsx("div",{className:"p-2 rounded-lg bg-white",children:o.jsx(A,{className:"w-5 h-5 text-slate-600"})}),o.jsx("span",{className:"font-medium text-slate-700",children:N.name}),o.jsx(st,{variant:"outline",className:w(N.color),children:N.color})]}),o.jsxs("div",{className:"flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>g(N),children:o.jsx(jp,{className:"w-4 h-4"})}),o.jsx(re,{variant:"ghost",size:"icon",className:"text-rose-500 hover:text-rose-600",onClick:()=>{window.confirm(`Delete category "${N.name}"?`)&&f.mutate(N.id)},children:o.jsx(On,{className:"w-4 h-4"})})]})]},N.id)})}),o.jsx(tn,{open:e,onOpenChange:m,children:o.jsxs(Kt,{children:[o.jsx(Un,{children:o.jsx(Vn,{children:n?"Edit Category":"New Category"})}),o.jsxs("form",{onSubmit:x,className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm text-slate-600",children:"Category Name"}),o.jsx(ye,{value:i.name,onChange:N=>s(k=>({...k,name:N.target.value})),placeholder:"e.g., Night Dive",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm text-slate-600",children:"Icon"}),o.jsxs(ht,{value:i.icon,onValueChange:N=>s(k=>({...k,icon:N})),children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsx(ut,{children:Z5.map(N=>o.jsx(Pe,{value:N.value,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(N.icon,{className:"w-4 h-4"}),N.label]})},N.value))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm text-slate-600",children:"Color"}),o.jsxs(ht,{value:i.color,onValueChange:N=>s(k=>({...k,color:N})),children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsx(ut,{children:mN.map(N=>o.jsx(Pe,{value:N.value,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:`w-4 h-4 rounded ${N.class}`}),N.label]})},N.value))})]})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:m,className:"flex-1",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1",children:n?"Update":"Create"})]})]})]})})]})}const xMe=["Dive Course","Fun Dive","Day Trip","Conservation Program","Tec Dive Course","Tec Diving"];function bMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState(null),[a,l]=_.useState(""),[c,d]=_.useState("All"),[h,f]=_.useState("cards"),{permissions:m}=Vo(),g=hn(),{data:x=[],isLoading:v}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:b=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),{data:j=[]}=Ee({queryKey:["productCategories"],queryFn:()=>ne.entities.ProductCategory.list()}),w=j.map(M=>M.name),N=["All",...new Set([...xMe,...w])],k=Ye({mutationFn:M=>ne.entities.Product.create(M),onSuccess:()=>{g.invalidateQueries({queryKey:["products"]}),t(!1)}}),C=Ye({mutationFn:({id:M,data:$})=>ne.entities.Product.update(M,$),onSuccess:()=>{g.invalidateQueries({queryKey:["products"]}),t(!1),r(null)}}),A=Ye({mutationFn:M=>ne.entities.Product.delete(M),onSuccess:()=>{g.invalidateQueries({queryKey:["products"]}),s(null)}}),E=M=>{n?C.mutate({id:n.id,data:M}):k.mutate(M)},P=M=>{r(M),t(!0)},D=M=>{s(M)},B=["Dive Course","Fun Dive","Conservation Program","Tec Dive Course","Tec Diving","Day Trip"],O=x.filter(M=>{const $=M.name.toLowerCase().includes(a.toLowerCase()),F=c==="All"||M.category===c;return $&&F}).sort((M,$)=>{const F=j.find(G=>G.name===M.category),W=j.find(G=>G.name===$.category),q=(F==null?void 0:F.priority)||0,K=(W==null?void 0:W.priority)||0;if(K!==q)return K-q;const L=B.indexOf(M.category),H=B.indexOf($.category),I=L===-1?999:L,V=H===-1?999:H;return I!==V?I-V:M.name.localeCompare($.name)});return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto 
855space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Products"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage your dive courses, trips, and programs"})]}),m.canAddProducts&&o.jsxs(re,{onClick:()=>{r(null),t(!0)},className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 shadow-lg shadow-cyan-500/20",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Product"]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[o.jsxs("div",{className:"relative flex-1 max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search products...",value:a,onChange:M=>l(M.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),o.jsxs(ht,{value:c,onValueChange:d,children:[o.jsxs(ct,{className:"w-full sm:w-48 h-11 bg-white",children:[o.jsx(zB,{className:"w-4 h-4 mr-2 text-slate-400"}),o.jsx(pt,{})]}),o.jsx(ut,{children:N.map(M=>o.jsx(Pe,{value:M,children:M},M))})]}),o.jsxs("div",{className:"flex bg-white rounded-lg border p-1",children:[o.jsx(re,{variant:h==="cards"?"default":"ghost",size:"sm",className:h==="cards"?"bg-cyan-600":"",onClick:()=>f("cards"),children:o.jsx(cZ,{className:"w-4 h-4"})}),o.jsx(re,{variant:h==="list"?"default":"ghost",size:"sm",className:h==="list"?"bg-cyan-600":"",onClick:()=>f("list"),children:o.jsx(pZ,{className:"w-4 h-4"})})]})]}),m.isAdmin&&o.jsx(vMe,{}),v?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3,4,5,6].map(M=>o.jsx("div",{className:"bg-white rounded-xl h-72 animate-pulse"},M))}):O.length===0?o.jsxs("div",{className:"bg-white rounded-xl p-12 text-center",children:[o.jsx("div",{className:"w-16 h-16 mx-auto bg-slate-100 rounded-full flex items-center justify-center mb-4",children:o.jsx(wMe,{className:"w-8 h-8 text-slate-400"})}),o.jsx("h3",{className:"text-lg font-medium text-slate-700 mb-2",children:"No products found"}),o.jsx("p",{className:"text-slate-500 mb-4",children:a||c!=="All"?"Try adjusting your filters":"Get started by adding your first product"}),!a&&c==="All"&&o.jsxs(re,{onClick:()=>t(!0),children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Product"]})]}):h==="cards"?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:O.map(M=>o.jsx(pMe,{product:M,vendor:b.find($=>$.id===M.vendor_id),vendors:b,customCategories:j,onEdit:m.canEditProducts?P:null,onDelete:m.isAdmin?D:null,canViewCosts:m.canViewCosts},M.id))}):o.jsx(yMe,{products:O,vendors:b,customCategories:j,onEdit:m.canEditProducts?P:null,onDelete:m.isAdmin?D:null,canViewCosts:m.canViewCosts}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsx(Kt,{className:"max-w-2xl p-0 gap-0",children:o.jsx(mMe,{vendors:b,products:x,initialData:n,onSubmit:E,onCancel:()=>{t(!1),r(null)}})})}),o.jsx($x,{open:!!i,onOpenChange:()=>s(null),children:o.jsxs(qp,{children:[o.jsxs(zp,{children:[o.jsx(Vp,{children:"Delete Product"}),o.jsxs(Wp,{children:['Are you sure you want to delete "',i==null?void 0:i.name,'"? This action cannot be undone.']})]}),o.jsxs(Up,{children:[o.jsx(Kp,{children:"Cancel"}),o.jsx(Hp,{onClick:()=>A.mutate(i.id),className:"bg-rose-600 hover:bg-rose-700",children:"Delete"})]})]})})]})})}function wMe(e){return o.jsxs("svg",{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",...e,children:[o.jsx("path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"}),o.jsx("path",{d:"M3 6h18"}),o.jsx("path",{d:"M16 10a4 4 0 0 1-8 0"})]})}function jMe(){return o.jsx(ms,{children:o.jsx(bMe,{})})}function SMe(){const[e,t]=_.useState({start:_e(No(new Date),"yyyy-MM-dd"),end:_e(ha(new Date),"yyyy-MM-dd")}),{data:n=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-sale_date",2e3)}),{data:r=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:i=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),s=n.filter(j=>j.sale_date>=e.start&&j.sale_date<=e.end),a=s.reduce((j,w)=>j+(w.total_amount||0),0),l=s.reduce((j,w)=>j+(w.vendor_cost||0),0),c=s.reduce((j,w)=>j+(w.profit||0),0),d=a>0?(c/a*100).toFixed(1):0,h=s.length>0?a/s.length:0,f=r.reduce((j,w)=>{const N=s.filter(A=>A.product_id===w.id),k=N.reduce((A,E)=>A+(E.total_amount||0),0),C=N.reduce((A,E)=>A+(E.profit||0),0);return j[w.category]||(j[w.category]={revenue:0,profit:0,sales:0}
855),j[w.category].revenue+=k,j[w.category].profit+=C,j[w.category].sales+=N.length,j},{}),m=Object.entries(f).map(([j,w])=>({name:j.replace(/([A-Z])/g," $1").trim(),revenue:w.revenue,profit:w.profit,sales:w.sales})),g=[];for(let j=5;j>=0;j--){const w=No(gu(new Date,j)),N=ha(gu(new Date,j)),k=n.filter(C=>C.sale_date>=_e(w,"yyyy-MM-dd")&&C.sale_date<=_e(N,"yyyy-MM-dd"));g.push({month:_e(w,"MMM yyyy"),revenue:k.reduce((C,A)=>C+(A.total_amount||0),0),profit:k.reduce((C,A)=>C+(A.profit||0),0),sales:k.length})}const x=r.map(j=>{const w=s.filter(N=>N.product_id===j.id);return{name:j.name,category:j.category,revenue:w.reduce((N,k)=>N+(k.total_amount||0),0),profit:w.reduce((N,k)=>N+(k.profit||0),0),salesCount:w.length}}).sort((j,w)=>w.revenue-j.revenue).slice(0,5),v=i.map(j=>{const w=s.filter(C=>C.vendor_id===j.id),N=w.filter(C=>C.payment_status==="Paid").reduce((C,A)=>C+(A.vendor_cost||0),0),k=w.filter(C=>C.payment_status==="Pending").reduce((C,A)=>C+(A.vendor_cost||0),0);return{name:j.name,paid:N,pending:k,total:N+k}}).filter(j=>j.total>0),b=j=>{const w=new Date;switch(j){case"thisMonth":t({start:_e(No(w),"yyyy-MM-dd"),end:_e(ha(w),"yyyy-MM-dd")});break;case"lastMonth":const N=gu(w,1);t({start:_e(No(N),"yyyy-MM-dd"),end:_e(ha(N),"yyyy-MM-dd")});break;case"thisYear":t({start:_e(PV(w),"yyyy-MM-dd"),end:_e(zpe(w),"yyyy-MM-dd")});break}};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"P&L Reports"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Financial analysis and performance metrics"})]}),o.jsx(du,{to:kn("AIReports"),children:o.jsxs(re,{className:"bg-gradient-to-r from-violet-600 to-purple-600 hover:from-violet-700 hover:to-purple-700",children:[o.jsx(NA,{className:"w-4 h-4 mr-2"}),"AI Reporting"]})})]}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsx(dt,{className:"p-4",children:o.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(te,{className:"text-xs text-slate-500",children:"From"}),o.jsx(ye,{type:"date",value:e.start,onChange:j=>t(w=>({...w,start:j.target.value})),className:"h-9 w-40"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx(te,{className:"text-xs text-slate-500",children:"To"}),o.jsx(ye,{type:"date",value:e.end,onChange:j=>t(w=>({...w,end:j.target.value})),className:"h-9 w-40"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(re,{variant:"outline",size:"sm",onClick:()=>b("thisMonth"),children:"This Month"}),o.jsx(re,{variant:"outline",size:"sm",onClick:()=>b("lastMonth"),children:"Last Month"}),o.jsx(re,{variant:"outline",size:"sm",onClick:()=>b("thisYear"),children:"This Year"})]})]})})}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4",children:[o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsxs(dt,{className:"p-5",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(Mo,{className:"w-5 h-5 text-cyan-600"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Revenue"})]}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:["$",a.toLocaleString()]})]})}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsxs(dt,{className:"p-5",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(oee,{className:"w-5 h-5 text-orange-500"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Costs"})]}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:["$",l.toLocaleString()]})]})}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsxs(dt,{className:"p-5",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(vh,{className:"w-5 h-5 text-emerald-600"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Profit"})]}),o.jsxs("p",{className:"text-2xl font-light text-emerald-600",children:["$",c.toLocaleStr
855ing()]})]})}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsxs(dt,{className:"p-5",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(HB,{className:"w-5 h-5 text-blue-600"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Margin"})]}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:[d,"%"]})]})}),o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsxs(dt,{className:"p-5",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(YB,{className:"w-5 h-5 text-purple-600"}),o.jsx("span",{className:"text-sm text-slate-500",children:"Avg Sale"})]}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:["$",h.toFixed(0)]})]})})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsxs(lt,{className:"border-0 shadow-sm",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Monthly Trend"})}),o.jsx(dt,{children:o.jsx("div",{className:"h-64",children:o.jsx(av,{width:"100%",height:"100%",children:o.jsxs(qOe,{data:g,children:[o.jsx(Lo,{dataKey:"month",tick:{fontSize:12,fill:"#94a3b8"}}),o.jsx($o,{tick:{fontSize:12,fill:"#94a3b8"}}),o.jsx(ui,{contentStyle:{borderRadius:"12px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},formatter:j=>`$${j.toLocaleString()}`}),o.jsx(ql,{}),o.jsx(rd,{type:"monotone",dataKey:"revenue",stroke:"#0891b2",strokeWidth:2,name:"Revenue"}),o.jsx(rd,{type:"monotone",dataKey:"profit",stroke:"#22c55e",strokeWidth:2,name:"Profit"})]})})})})]}),o.jsxs(lt,{className:"border-0 shadow-sm",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Revenue by Category"})}),o.jsx(dt,{children:o.jsx("div",{className:"h-64",children:o.jsx(av,{width:"100%",height:"100%",children:o.jsxs(zOe,{data:m,layout:"vertical",children:[o.jsx(Lo,{type:"number",tick:{fontSize:12,fill:"#94a3b8"}}),o.jsx($o,{dataKey:"name",type:"category",tick:{fontSize:12,fill:"#94a3b8"},width:120}),o.jsx(ui,{contentStyle:{borderRadius:"12px",border:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},formatter:j=>`$${j.toLocaleString()}`}),o.jsx(gc,{dataKey:"revenue",fill:"#0891b2",radius:[0,4,4,0],name:"Revenue"})]})})})})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[o.jsxs(lt,{className:"border-0 shadow-sm",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Top Products"})}),o.jsx(dt,{children:o.jsxs("div",{className:"space-y-3",children:[x.map((j,w)=>o.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"w-6 h-6 rounded-full bg-cyan-100 text-cyan-700 text-sm font-medium flex items-center justify-center",children:w+1}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:j.name}),o.jsxs("p",{className:"text-xs text-slate-500",children:[j.salesCount," sales"]})]})]}),o.jsxs("div",{className:"text-right",children:[o.jsxs("p",{className:"font-medium text-slate-800",children:["$",j.revenue.toLocaleString()]}),o.jsxs("p",{className:"text-xs text-emerald-600",children:["$",j.profit.toLocaleString()," profit"]})]})]},j.name)),x.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No sales in this period"})]})})]}),o.jsxs(lt,{className:"border-0 shadow-sm",children:[o.jsx(cr,{className:"pb-2",children:o.jsx(vr,{className:"text-lg font-medium text-slate-800",children:"Vendor Payouts"})}),o.jsx(dt,{children:o.jsxs("div",{className:"space-y-3",children:[v.map(j=>o.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"font-medium text-slate-800",children:j.name}),o.jsxs("p",{className:"font-medium text-slate-800",children:["$",j.total.toLocaleString()]})]}),o.jsxs("div",{className:"flex gap-4 text-sm",children:[o.jsxs("span",{className:"text-emerald-600",children:["Paid: $",j.paid.toLocaleStr
855ing()]}),o.jsxs("span",{className:"text-amber-600",children:["Pending: $",j.pending.toLocaleString()]})]})]},j.name)),v.length===0&&o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No vendor costs in this period"})]})})]})]})]})})}function _Me(){return o.jsx(ms,{children:o.jsx(SMe,{})})}const gN=[{id:"transport",label:"Airport Transport",icon:Na},{id:"accommodation",label:"Accommodation",icon:rZ},{id:"bike_rental",label:"Bike Rental",icon:lJ},{id:"other",label:"Other",icon:KJ}];function NMe({products:e,vendors:t,onSubmit:n,onCancel:r,initialData:i}){i==null||i.id;const{data:s}=Ks(),[a,l]=_.useState(()=>i?{...i,misc_fees:i.misc_fees||[],vendor_costs:i.vendor_costs||[]}:{product_id:"",customer_name:"",customer_id:"",customer_email:"",group_name:"",staff_id:"",quantity:1,unit_price:0,price_type:"primary",sale_currency:"IDR",total_amount:0,vendor_costs:[],vendor_cost:0,profit:0,start_date:_e(new Date,"yyyy-MM-dd"),end_date:"",sale_date:_e(new Date,"yyyy-MM-dd"),vendor_id:"",payment_status:"Pending",misc_fees:[],notes:""}),[c,d]=_.useState((i==null?void 0:i.customer_name)||""),[h,f]=_.useState(!1),m=_.useRef(null),{data:g=[],refetch:x}=Ee({queryKey:["customers"],queryFn:()=>ne.entities.Customer.list("-created_date",1e3),staleTime:0});_.useEffect(()=>{x()},[x]);const{data:v=[]}=Ee({queryKey:["staff"],queryFn:()=>ne.entities.User.list()}),b=_.useMemo(()=>c?g.filter(q=>{var K,L;return((K=q.name)==null?void 0:K.toLowerCase().includes(c.toLowerCase()))||((L=q.email)==null?void 0:L.toLowerCase().includes(c.toLowerCase()))}):g,[g,c]);_.useEffect(()=>{const q=K=>{m.current&&!m.current.contains(K.target)&&f(!1)};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]);const j=q=>{l(K=>({...K,customer_name:q.name,customer_email:q.email||"",customer_id:q.id})),d(q.name),f(!1)},w=q=>{const K=(q.misc_fees||[]).reduce((oe,pe)=>oe+(parseFloat(pe.amount)||0),0),L=(q.misc_fees||[]).reduce((oe,pe)=>oe+(parseFloat(pe.cost)||0),0),H=(q.unit_price||0)*(q.quantity||1),I=(q.vendor_costs||[]).reduce((oe,pe)=>oe+(pe.cost||0)*(q.quantity||1),0),V=H+K,G=I+L,z=V-G;return{...q,total_amount:V,vendor_cost:G,profit:z}},N=q=>{var L;const K=e.find(H=>H.id===q);if(K){a.quantity;const H="primary",I=K.display_currency||"IDR",V=((L=K.vendor_costs)==null?void 0:L.map(z=>({vendor_id:z.vendor_id,cost:z.cost||0,paid:!1})))||(K.vendor_id?[{vendor_id:K.vendor_id,cost:K.cost||0,paid:!1}]:[]),G={...a,product_id:q,unit_price:K.price,price_type:H,sale_currency:I,vendor_id:K.vendor_id||"",vendor_costs:V};l(w(G))}},k=q=>{const K=e.find(L=>L.id===a.product_id);if(K)if(q==="secondary"){const L=K.price_2||0,H={...a,price_type:q,unit_price:L,sale_currency:"CNY"};l(w(H))}else{const L=K.display_currency||"IDR",H=K.price,I={...a,price_type:q,unit_price:H,sale_currency:L};l(w(I))}else l(L=>({...L,price_type:q}))},C=q=>{const K=e.find(G=>G.id===a.product_id);if(!K)return;const L=K.display_currency||"IDR",H=K.price;let I=H;L==="IDR"&&q==="USD"?I=H*((s==null?void 0:s.idr_to_usd)||63e-6):L==="IDR"&&q==="CNY"?I=H*((s==null?void 0:s.idr_to_cny)||46e-5):L==="USD"&&q==="IDR"?I=H/((s==null?void 0:s.idr_to_usd)||63e-6):L==="USD"&&q==="CNY"?I=H/((s==null?void 0:s.idr_to_usd)||63e-6)*((s==null?void 0:s.idr_to_cny)||46e-5):L==="CNY"&&q==="IDR"?I=H/((s==null?void 0:s.idr_to_cny)||46e-5):L==="CNY"&&q==="USD"&&(I=H/((s==null?void 0:s.idr_to_cny)||46e-5)*((s==null?void 0:s.idr_to_usd)||63e-6));const V={...a,sale_currency:q,unit_price:I};l(w(V))},A=q=>{const K=parseInt(q)||1,L={...a,quantity:K};l(w(L))},E=()=>{l(q=>({...q,misc_fees:[...q.misc_fees,{type:"transport",description:"",amount:"",cost:"",vendor_id:""}]}))},P=(q,K,L)=>{const H={...a,misc_fees:a.misc_fees.map((I,V)=>V===q?{...I,[K]:L}:I)};l(w(H))},D=q=>{const K={...a,misc_fees:a.misc_fees.filter((L,H)=>H!==q)};l(w(K))},B=()=>{l(q=>({...q,vendor_costs:[...q.vendor_costs,{vendor_id:"",cost:"",paid:!1}]}))},O=(q,K,L)=>{const H={...a,vendor_costs:a.vendor_costs.map((I,V)=>V===q?{...I,[K]:L}:I)};l(w(H))},M=q=>{const K={...a,vendor_costs:a.vendor_costs.filter((L,H)=>H!==q)};l(w(K))},$=q=>{q.preventDefault();const K={...a,misc_fees:a.misc_fees.map(L=>({...L,amount:parseFloat(L.amount)||0,cost:parseFloat(L.cost)||0})),vendor_costs:a.vendor_costs.map(L=>({...L,cost:parseFloat(L.cost)||0}))};n(K)},F=e.find(q=>q.id===a.product_id),W=F==null?void 0:F.price_2;return o.jsxs(lt,{className:"border-0 shadow-lg max-h-[90vh] overflow-y-auto",children:[o.jsxs(cr,{className:"flex flex-row items-center justify-between border-b bg-gradient-to-r from-cyan-50 to-blue-50 sticky top-0 z-10",children:[o.jsx(vr,{className:"text-xl font-medium text-slate-800",children:i?"Edit Sale":"New Sale"}),o.jsx(re,{variant:"ghost",size:"icon",onClick:r,children:o.jsx(xi,{className:"w-5 h-5"})})]}),o.jsx(dt,{className:"p-6",children:o.jsxs("form",{onSubmit:$,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Product *"}),o.jsxs(ht,{value:a.product_id,onValueChange:N,children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{placeholder:"Select product"})}),o.jsx(ut,{children:e.filter(q=>q.is_active!==!1).map(q=>
855{const K=q.display_currency||"IDR",L=K==="IDR"?"Rp":K==="USD"?"$":"Â¥",H=K==="IDR"?q.price.toLocaleString("id-ID"):q.price.toLocaleString("en-US",{minimumFractionDigits:2});return o.jsx(Pe,{value:q.id,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{children:q.name}),o.jsxs("span",{className:"text-slate-400",children:["- ",L," ",H]})]})},q.id)})})]})]}),o.jsxs("div",{className:"space-y-2 relative",ref:m,children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Customer Name"}),o.jsxs("div",{className:"relative",children:[o.jsx(Ca,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{value:c,onChange:q=>{d(q.target.value),l(K=>({...K,customer_name:q.target.value})),f(!0)},onFocus:()=>f(!0),placeholder:"Search or enter customer name",className:"h-11 pl-10"})]}),h&&b.length>0&&o.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border rounded-lg shadow-lg max-h-48 overflow-y-auto",children:b.map(q=>o.jsxs("div",{className:"px-3 py-2 hover:bg-slate-50 cursor-pointer",onClick:()=>j(q),children:[o.jsx("p",{className:"font-medium text-slate-800",children:q.name}),q.email&&o.jsx("p",{className:"text-sm text-slate-500",children:q.email})]},q.id))})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Customer Email"}),o.jsx(ye,{type:"email",value:a.customer_email,onChange:q=>l(K=>({...K,customer_email:q.target.value})),placeholder:"[email protected]",className:"h-11"})]}),W&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Price Type *"}),o.jsxs(ht,{value:a.price_type,onValueChange:k,children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"primary",children:"Primary"}),o.jsx(Pe,{value:"secondary",children:"Chinese"})]})]})]}),a.price_type==="primary"&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Currency *"}),o.jsxs(ht,{value:a.sale_currency,onValueChange:C,children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"IDR",children:"Rupiah (Rp)"}),o.jsx(Pe,{value:"USD",children:"US Dollar ($)"})]})]})]}),a.price_type==="secondary"&&o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Currency"}),o.jsx(ye,{value:"Chinese Yuan (Â¥)",disabled:!0,className:"h-11 bg-slate-50"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Unit Price"}),o.jsx(ye,{value:a.sale_currency==="IDR"?`Rp ${(a.unit_price||0).toLocaleString("id-ID")}`:a.sale_currency==="USD"?`$${(a.unit_price||0).toLocaleString("en-US",{minimumFractionDigits:2})}`:`Â¥${(a.unit_price||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,disabled:!0,className:"h-11 bg-slate-50"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Quantity"}),o.jsx(ye,{type:"number",min:"1",value:a.quantity,onChange:q=>A(q.target.value),className:"h-11"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Start Date *"}),o.jsx(ye,{type:"date",value:a.start_date,onChange:q=>l(K=>({...K,start_date:q.target.value,sale_date:q.target.value})),className:"h-11"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"End Date"}),o.jsx(ye,{type:"date",value:a.end_date,onChange:q=>l(K=>({...K,end_date:q.target.value})),className:"h-11"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Assigned Staff"}),o.jsxs(ht,{value:a.staff_id,onValueChange:q=>l(K=>({...K,staff_id:q})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{placeholder:"Select staff member"})}),o.jsx(ut,{children:v.map(q=>o.jsx(Pe,{value:q.id,children:q.full_name||q.email},q.id))})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Group Name (Optional)"}),o.jsx(ye,{value:a.group_name,onChange:q=>l(K=>({...K,group_name:q.target.value})),placeholder:"e.g., Company name, Tour group",className:"h-11"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Payment Status"}),o.jsxs(ht,{value:a.payment_status,onValueChange:q=>l(K=>({...K,payment_status:q})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"Pending",children:"Pending"}),o.jsx(Pe,{value:"Paid",children:"Paid"})]})]})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-sm font-medium text-slate-700",children:"Vendor Costs"}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:B,children:[o.jsx(en,{className:"w-4 h-4 mr-1"}),"Add Vendor"]})]}),a.vendor_costs.length===0?o.jsx("p",{className:"text-sm text-slate-400 text-center py-3 bg-slate-50 rounded-lg",children:"No vend
855ors. Product vendors will be added automatically when selected."}):o.jsx("div",{className:"space-y-2",children:a.vendor_costs.map((q,K)=>o.jsxs("div",{className:"flex gap-2 items-center p-3 bg-slate-50 rounded-lg",children:[o.jsx("div",{className:"flex-1",children:o.jsxs(ht,{value:q.vendor_id,onValueChange:L=>O(K,"vendor_id",L),children:[o.jsx(ct,{className:"h-9",children:o.jsx(pt,{placeholder:"Select vendor"})}),o.jsx(ut,{children:t.map(L=>o.jsx(Pe,{value:L.id,children:L.name},L.id))})]})}),o.jsx("div",{className:"w-24",children:o.jsx(ye,{type:"number",step:"0.01",min:"0",value:q.cost,onChange:L=>O(K,"cost",L.target.value),placeholder:"Cost",className:"h-9"})}),o.jsx(re,{type:"button",variant:"ghost",size:"icon",onClick:()=>M(K),className:"text-rose-500",children:o.jsx(On,{className:"w-4 h-4"})})]},K))})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(te,{className:"text-sm font-medium text-slate-700",children:"Miscellaneous Fees"}),o.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:E,children:[o.jsx(en,{className:"w-4 h-4 mr-1"}),"Add Fee"]})]}),a.misc_fees.length===0?o.jsx("p",{className:"text-sm text-slate-400 text-center py-3 bg-slate-50 rounded-lg",children:"No additional fees. Add transport, accommodation, bike rental, etc."}):o.jsx("div",{className:"space-y-3",children:a.misc_fees.map((q,K)=>{const H=(gN.find(I=>I.id===q.type)||gN[3]).icon;return o.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg space-y-2",children:[o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(H,{className:"w-4 h-4 text-slate-500"}),o.jsxs(ht,{value:q.type,onValueChange:I=>P(K,"type",I),children:[o.jsx(ct,{className:"h-9 flex-1",children:o.jsx(pt,{})}),o.jsx(ut,{children:gN.map(I=>o.jsx(Pe,{value:I.id,children:I.label},I.id))})]}),o.jsx(re,{type:"button",variant:"ghost",size:"icon",onClick:()=>D(K),className:"text-rose-500",children:o.jsx(On,{className:"w-4 h-4"})})]}),q.type==="other"&&o.jsx(ye,{value:q.description,onChange:I=>P(K,"description",I.target.value),placeholder:"Description",className:"h-9"}),o.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Amount"}),o.jsx(ye,{type:"number",step:"0.01",min:"0",value:q.amount,onChange:I=>P(K,"amount",I.target.value),placeholder:"0.00",className:"h-9"})]}),o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Cost"}),o.jsx(ye,{type:"number",step:"0.01",min:"0",value:q.cost,onChange:I=>P(K,"cost",I.target.value),placeholder:"0.00",className:"h-9"})]}),o.jsxs("div",{children:[o.jsx(te,{className:"text-xs text-slate-500",children:"Vendor"}),o.jsxs(ht,{value:q.vendor_id||"",onValueChange:I=>P(K,"vendor_id",I==="_none"?"":I),children:[o.jsx(ct,{className:"h-9",children:o.jsx(pt,{placeholder:"Optional"})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"_none",children:"None"}),t.map(I=>o.jsx(Pe,{value:I.id,children:I.name},I.id))]})]})]})]})]},K)})})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4 bg-gradient-to-r from-slate-50 to-cyan-50/30 rounded-xl",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 rounded-lg bg-cyan-100",children:o.jsx(mJ,{className:"w-4 h-4 text-cyan-700"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Total Amount"}),o.jsxs("p",{className:"text-lg font-semibold text-slate-800",children:[a.sale_currency==="IDR"&&`Rp ${(a.total_amount||0).toLocaleString("id-ID")}`,a.sale_currency==="USD"&&`$${(a.total_amount||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,a.sale_currency==="CNY"&&`Â¥${(a.total_amount||0).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 rounded-lg bg-orange-100",children:o.jsx(vee,{className:"w-4 h-4 text-orange-700"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Total Cost"}),o.jsxs("p",{className:"text-lg font-semibold text-slate-800",children:[a.sale_currency==="IDR"&&`Rp ${(a.vendor_cost||0).toLocaleStr
855ing("id-ID")}`,a.sale_currency==="USD"&&`$${(a.vendor_cost||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,a.sale_currency==="CNY"&&`Â¥${(a.vendor_cost||0).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 rounded-lg bg-emerald-100",children:o.jsx(vh,{className:"w-4 h-4 text-emerald-700"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-500",children:"Profit"}),o.jsxs("p",{className:"text-lg font-semibold text-emerald-600",children:[a.sale_currency==="IDR"&&`Rp ${(a.profit||0).toLocaleString("id-ID")}`,a.sale_currency==="USD"&&`$${(a.profit||0).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,a.sale_currency==="CNY"&&`Â¥${(a.profit||0).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`]})]})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Notes"}),o.jsx(ur,{value:a.notes,onChange:q=>l(K=>({...K,notes:q.target.value})),placeholder:"Additional notes...",rows:3})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:r,className:"flex-1 h-11",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 h-11 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:i?"Update Sale":"Create Sale"})]})]})})]})}function CMe({sale:e,product:t,customer:n,rates:r}){var d,h;const i=`INV-${_e(new Date(e.created_date),"yyyyMMdd")}-${e.id.slice(-6).toUpperCase()}`,{data:s=[]}=Ee({queryKey:["diveShopProfile"],queryFn:()=>ne.entities.DiveShopProfile.list()}),a=s[0],l=e.sale_currency||(t==null?void 0:t.display_currency)||"IDR",c=f=>l==="USD"?`$${f.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:l==="CNY"?`Â¥${f.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`:`Rp ${f.toLocaleString("id-ID")}`;return o.jsxs("div",{className:"bg-white p-8 max-w-2xl mx-auto",id:"invoice-content",children:[o.jsxs("div",{className:"flex justify-between items-start mb-8 pb-6 border-b-2 border-cyan-500",children:[a!=null&&a.logo_url||a!=null&&a.shop_name?o.jsxs("div",{className:"flex items-center gap-3",children:[a.logo_url&&o.jsx("img",{src:a.logo_url,alt:a.shop_name||"Dive Shop",className:"w-16 h-16 object-contain"}),o.jsx("div",{children:a.shop_name&&o.jsx("h1",{className:"text-2xl font-bold text-slate-800",children:a.shop_name})})]}):o.jsx("div",{children:o.jsx("p",{className:"text-sm text-slate-400",children:"Powered by Dive Monies"})}),o.jsxs("div",{className:"text-right",children:[o.jsx("h2",{className:"text-2xl font-bold text-cyan-600",children:"INVOICE"}),o.jsx("p",{className:"text-sm text-slate-600 mt-1",children:i})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-8 mb-8",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-2",children:"Bill To"}),o.jsx("p",{className:"font-medium text-slate-800",children:e.customer_name||(n==null?void 0:n.name)||"Walk-in Customer"}),(n==null?void 0:n.email)&&o.jsx("p",{className:"text-sm text-slate-600",children:n.email}),(n==null?void 0:n.phone)&&o.jsx("p",{className:"text-sm text-slate-600",children:n.phone})]}),o.jsxs("div",{className:"text-right",children:[o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-1",children:"Invoice Date"}),o.jsx("p",{className:"text-slate-800",children:_e(new Date(e.sale_date||e.created_date),"MMMM d, yyyy")})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-1",children:"Status"}),o.jsx("span",{className:`inline-block px-2 py-1 rounded text-xs font-medium ${e.payment_status==="Paid"?"bg-emerald-100 text-emerald-700":"bg-amber-100 text-amber-700"}`,children:e.payment_status||"Pending"})]})]})]}),o.jsxs("table",{className:"w-full mb-8",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b-2 border-slate-200",children:[o.jsx("th",{className:"text-left py-3 text-xs font-semibold text-slate-400 uppercase tracking-wide",children:"Description"}),o.jsx("th",{className:"text-center py-3 text-xs font-semibold text-slate-400 uppercase tracking-wide",children:"Qty"}),o.jsx("th",{className:"text-right py-3 text-xs font-semibold text-slate-400 uppercase tracking-wide",children:"Unit Price"}),o.jsx("th",{className:"text-right py-3 text-xs font-semibold text-slate-400 uppercase tracking-wide",children:"Amount"})]})}),o.jsxs("tbody",{children:[o.jsxs("tr",{className:"border-b border-slate-100",children:[o.jsxs("td",{className:"py-4",children:[o.jsx("p",{className:"font-medium text-slate-800",children:(t==null?void 0:t.name)||"Product"}),o.jsx("p",{className:"text-sm text-slate-500",children:t==null?void 0:t.category})]}),o.jsx("td",{className:"py-4 text-center text-slate-600",children:e.quantity||1}),o.jsx("td",{className:"py-4 text-right text-slate-600",children:c(e.unit_price||(t==null?void 0:t.price)||0)}),o.jsx("td",{className:"py-4 text-right font-medium text-slate-800",children:c((e.unit_price||(t==null?void 0:t.price)||0)*(e.quantity||1))})]}),(d=e.misc_fees)==null?void 0:d.map((f,m)=>o.jsxs("tr",{className:"border-b border-slate-100",children:[o.jsx("td",{className:"py-3",children:o.jsx("p",{className:"text-slate-700",children:f.description||f.type})}),o.jsx("td",{className:"py-3 text-center text-slate-600",children:"1"}),o.jsx("td",{className:"py-3 text-right text-slate-600",children:c(f.amount)}),o.jsx("td",{className:"py-3 text-right text-slate-700",children:c(f.amount)})]},m))]})]}),o.jsx("div",{className:"flex justify-end mb-8",children:o.jsxs("div",{className:"w-64",children:[o.jsxs("div",{className:"flex justify-between py-2 border-b border-slate-100",children:[o.jsx("span",{className:"text-slate-600",children:"Subtotal"}),o.jsx("span",{className:"text-slate-800",children:c((e.unit_price||(t==null?void 0:t.price)||0)*(e.quantity||1))})]}),((h=e.misc_fees)==null?void 0:h.length)>0&&o.jsxs("div",{className:"flex justify-between py-2 border-b border-slate-100",children:[o.jsx("span",{className:"text-slate-600",children:"Additional Fees"}),o.jsx("span",{className:"text-slate-800",children:c(e.misc_fees.reduce((f,m)=>
855f+m.amount,0))})]}),o.jsxs("div",{className:"flex justify-between py-3 text-lg font-bold",children:[o.jsx("span",{className:"text-slate-800",children:"Total"}),o.jsx("span",{className:"text-cyan-600",children:c(e.total_amount)})]})]})}),e.notes&&o.jsxs("div",{className:"mb-8 p-4 bg-slate-50 rounded-lg",children:[o.jsx("h3",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wide mb-2",children:"Notes"}),o.jsx("p",{className:"text-sm text-slate-600",children:e.notes})]}),o.jsx("div",{className:"mb-6 p-3 bg-slate-50 rounded-lg border border-slate-200",children:o.jsxs("p",{className:"text-xs text-slate-600",children:[o.jsx("strong",{children:"Important:"})," The displayed amount is accurate at the moment of invoice generation. Exchange rates may vary at the time of payment. Bank charges for credit card payments and international transfers are not included and may apply."]})}),o.jsxs("div",{className:"text-center pt-6 border-t border-slate-200",children:[o.jsx("p",{className:"text-sm text-slate-500",children:"Thank you for diving with us!"}),a!=null&&a.website?o.jsxs("p",{className:"text-xs text-slate-400 mt-2",children:[a.shop_name||""," • ",a.website]}):o.jsx("p",{className:"text-xs text-slate-400 mt-2",children:"Powered by Dive Monies"})]})]})}function PMe({sale:e,product:t,rates:n}){const[r,i]=_.useState(!1),[s,a]=_.useState(!1),l=(d,h="IDR")=>h==="USD"?`$${d.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:h==="CNY"?`¥${d.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}`:`Rp ${d.toLocaleString("id-ID")}`,c=async()=>{var d;if(!e.customer_email){gt.error("No customer email available");return}i(!0);try{const h=`INV-${_e(new Date(e.created_date),"yyyyMMdd")}-${e.id.slice(-6).toUpperCase()}`,f=(t==null?void 0:t.display_currency)||"IDR",m=`
856Dear ${e.customer_name||"Customer"},
857
858Thank you for choosing DiveShop! Here are your invoice details:
859
860━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
861INVOICE: ${h}
862Date: ${_e(new Date(e.sale_date||e.created_date),"MMMM d, yyyy")}
863━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
864
865Product: ${(t==null?void 0:t.name)||"Product"}
866Category: ${(t==null?void 0:t.category)||""}
867Quantity: ${e.quantity||1}
868Unit Price: ${l(e.unit_price||(t==null?void 0:t.price)||0,f)}
869
870${((d=e.misc_fees)==null?void 0:d.length)>0?`Additional Fees:
871${e.misc_fees.map(x=>`- ${x.description||x.type}: ${l(x.amount,f)}`).join(`
872`)}
873`:""}
874━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
875TOTAL: ${l(e.total_amount,f)}
876Status: ${e.payment_status||"Pending"}
877━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
878
879${e.notes?`Notes: ${e.notes}
880`:""}
881Thank you for diving with us!
882
883Best regards,
884DiveShop Team
885      `.trim(),g=await ne.integrations.Core.SendEmail({to:e.customer_email,subject:`Invoice ${h} - DiveShop`,body:m});if(g.status==="error")throw new Error(g.details||"Failed to send email");a(!0),gt.success(`Invoice sent to ${e.customer_email}`),setTimeout(()=>a(!1),3e3)}catch(h){console.error("Failed to send invoice:",h),gt.error("Failed to send invoice")}finally{i(!1)}};return o.jsxs(re,{variant:"outline",size:"sm",onClick:c,disabled:r||s,children:[r?o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}):s?o.jsx(Qr,{className:"w-4 h-4 mr-2 text-emerald-600"}):o.jsx(pd,{className:"w-4 h-4 mr-2"}),s?"Sent!":"Email Invoice"]})}function AMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState(null),[a,l]=_.useState(""),[c,d]=_.useState("All"),[h,f]=_.useState(null),{permissions:m}=Vo(),{data:g}=Ks(),x=hn(),{data:v=[],isLoading:b}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-sale_date",500)}),{data:j=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:w=[]}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),N=Ye({mutationFn:O=>ne.entities.Sale.create(O),onSuccess:()=>{x.invalidateQueries({queryKey:["sales"]}),t(!1)}}),k=Ye({mutationFn:({id:O,data:M})=>ne.entities.Sale.update(O,M),onSuccess:()=>{x.invalidateQueries({queryKey:["sales"]}),t(!1),r(null)}}),C=Ye({mutationFn:O=>ne.entities.Sale.delete(O),onSuccess:()=>{x.invalidateQueries({queryKey:["sales"]}),s(null)}}),A=O=>{n?k.mutate({id:n.id,data:O}):N.mutate(O)},E=O=>{r(O),t(!0)},P=v.filter(O=>{const M=j.find(W=>W.id===O.product_id),$=(O.customer_name||"").toLowerCase().includes(a.toLowerCase())||(O.group_name||"").toLowerCase().includes(a.toLowerCase())||((M==null?void 0:M.name)||"").toLowerCase().includes(a.toLowerCase()),F=c==="All"||O.payment_status===c;return $&&F}),D=(O,M)=>O?M==="IDR"?O:M==="USD"?O*((g==null?void 0:g.usd_to_idr)||15900):M==="CNY"?O*((g==null?void 0:g.cny_to_idr)||2200):O:0,B=P.reduce((O,M)=>{var K,L,H;const $=D(M.total_amount,M.sale_currency||"IDR"),F=D(M.vendor_cost,M.sale_currency||"IDR"),W=D(M.profit,M.sale_currency||"IDR"),q=M.sale_currency||"IDR";return{revenue:O.revenue+$,cost:O.cost+F,profit:O.profit+W,byCurrency:{...O.byCurrency,[q]:{revenue:(((K=O.byCurrency[q])==null?void 0:K.revenue)||0)+(M.total_amount||0),cost:(((L=O.byCurrency[q])==null?void 0:L.cost)||0)+(M.vendor_cost||0),profit:(((H=O.byCurrency[q])==null?void 0:H.profit)||0)+(M.profit||0)}}}},{revenue:0,cost:0,profit:0,byCurrency:{}});return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto 
885space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Sales"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Track all your sales transactions"})]}),o.jsxs(re,{onClick:()=>{r(null),t(!0)},className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 shadow-lg shadow-cyan-500/20",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"New Sale"]})]}),m.canViewRevenue&&o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"bg-white rounded-xl p-5 shadow-sm",children:[o.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Total Revenue (in Rupiah)"}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:["Rp ",B.revenue.toLocaleString("id-ID")]}),o.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-100 space-y-1",children:[B.byCurrency.IDR&&o.jsxs("p",{className:"text-xs text-slate-500",children:["IDR: Rp ",B.byCurrency.IDR.revenue.toLocaleString("id-ID")]}),B.byCurrency.USD&&o.jsxs("p",{className:"text-xs text-slate-500",children:["USD: $",B.byCurrency.USD.revenue.toLocaleString("en-US",{minimumFractionDigits:2})]}),B.byCurrency.CNY&&o.jsxs("p",{className:"text-xs text-slate-500",children:["CNY: ¥",B.byCurrency.CNY.revenue.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]})]}),o.jsxs("div",{className:"bg-white rounded-xl p-5 shadow-sm",children:[o.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Vendor Costs (in Rupiah)"}),o.jsxs("p",{className:"text-2xl font-light text-slate-800",children:["Rp ",B.cost.toLocaleString("id-ID")]}),o.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-100 space-y-1",children:[B.byCurrency.IDR&&o.jsxs("p",{className:"text-xs text-slate-500",children:["IDR: Rp ",B.byCurrency.IDR.cost.toLocaleString("id-ID")]}),B.byCurrency.USD&&o.jsxs("p",{className:"text-xs text-slate-500",children:["USD: $",B.byCurrency.USD.cost.toLocaleString("en-US",{minimumFractionDigits:2})]}),B.byCurrency.CNY&&o.jsxs("p",{className:"text-xs text-slate-500",children:["CNY: ¥",B.byCurrency.CNY.cost.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]})]}),o.jsxs("div",{className:"bg-white rounded-xl p-5 shadow-sm",children:[o.jsx("p",{className:"text-sm text-slate-500 mb-1",children:"Total Profit (in Rupiah)"}),o.jsxs("p",{className:"text-2xl font-light text-emerald-600",children:["Rp ",B.profit.toLocaleString("id-ID")]}),o.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-100 space-y-1",children:[B.byCurrency.IDR&&o.jsxs("p",{className:"text-xs text-emerald-600",children:["IDR: Rp ",B.byCurrency.IDR.profit.toLocaleString("id-ID")]}),B.byCurrency.USD&&o.jsxs("p",{className:"text-xs text-emerald-600",children:["USD: $",B.byCurrency.USD.profit.toLocaleString("en-US",{minimumFractionDigits:2})]}),B.byCurrency.CNY&&o.jsxs("p",{className:"text-xs text-emerald-600",children:["CNY: ¥",B.byCurrency.CNY.profit.toLocaleString("zh-CN",{minimumFractionDigits:2})]})]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[o.jsxs("div",{className:"relative flex-1 max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search by customer, group, or product...",value:a,onChange:O=>l(O.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),o.jsxs(ht,{value:c,onValueChange:d,children:[o.jsxs(ct,{className:"w-full sm:w-48 h-11 bg-white",children:[o.jsx(zB,{className:"w-4 h-4 mr-2 text-slate-400"}),o.jsx(pt,{})]}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"All",children:"All Status"}),o.jsx(Pe,{value:"Pending",children:"Pending"}),o.jsx(Pe,{value:"Paid",children:"Paid"})]})]})]}),o.jsx("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden",children:o.jsxs(im,{children:[o.jsx(sm,{children:o.jsxs(xr,{className:"bg-slate-50",children:[o.jsx(qt,{className:"font-medium",children:"Dates"}),o.jsx(qt,{className:"font-medium",children:"Product"}),o.jsx(qt,{className:"font-medium",children:"Customer"}),o.jsx(qt,{className:"font-medium",children:"Group"}),m.canViewRevenue&&o.jsx(qt,{className:"font-medium text-right",children:"Amount"}),m.canViewCosts&&o.jsx(qt,{className:"font-medium text-right",children:"Cost"}),m.canViewProfit&&o.jsx(qt,{className:"font-medium text-right",children:"Profit"}),o.jsx(qt,{className:"font-medium",children:"Status"}),o.jsx(qt,{className:"font-medium w-24"})]})}),o.jsx(am,{children:b?Array(5).fill(0).map((O,M)=>o.jsx(xr,{children:Array(8).fill(0).map(($,F)=>o.jsx(Nt,{children:o.jsx("div",{className:"h-4 bg-slate-100 rounded animate-pulse"})},F))},M)):P.length===0?o.jsx(xr,{children:o.jsx(Nt,{colSpan:5+(m.canViewRevenue?1:0)+(m.canViewCosts?1:0)+(m.canViewProfit?1:0),className:"h-32 text-center text-slate-400",children:"No sales found"})}):P.map(O=>{const M=j.find($=>
885$.id===O.product_id);return o.jsxs(xr,{className:"hover:bg-slate-50/50",children:[o.jsx(Nt,{className:"text-slate-600",children:o.jsxs("div",{children:[o.jsx("span",{children:O.start_date||O.sale_date}),O.end_date&&o.jsxs("span",{className:"text-slate-400",children:[" → ",O.end_date]})]})}),o.jsx(Nt,{className:"font-medium text-slate-800",children:(M==null?void 0:M.name)||"Unknown"}),o.jsx(Nt,{className:"text-slate-600",children:O.customer_name||"-"}),o.jsx(Nt,{className:"text-slate-500 text-sm",children:O.group_name||"-"}),m.canViewRevenue&&o.jsxs(Nt,{className:"text-right text-slate-800",children:[O.sale_currency==="IDR"&&`Rp ${(O.total_amount||0).toLocaleString("id-ID")}`,O.sale_currency==="USD"&&`$${(O.total_amount||0).toLocaleString("en-US",{minimumFractionDigits:2})}`,O.sale_currency==="CNY"&&`¥${(O.total_amount||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,!O.sale_currency&&`$${(O.total_amount||0).toFixed(2)}`]}),m.canViewCosts&&o.jsxs(Nt,{className:"text-right text-slate-600",children:[O.sale_currency==="IDR"&&`Rp ${(O.vendor_cost||0).toLocaleString("id-ID")}`,O.sale_currency==="USD"&&`$${(O.vendor_cost||0).toLocaleString("en-US",{minimumFractionDigits:2})}`,O.sale_currency==="CNY"&&`¥${(O.vendor_cost||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,!O.sale_currency&&`$${(O.vendor_cost||0).toFixed(2)}`]}),m.canViewProfit&&o.jsxs(Nt,{className:"text-right font-medium text-emerald-600",children:[O.sale_currency==="IDR"&&`Rp ${(O.profit||0).toLocaleString("id-ID")}`,O.sale_currency==="USD"&&`$${(O.profit||0).toLocaleString("en-US",{minimumFractionDigits:2})}`,O.sale_currency==="CNY"&&`¥${(O.profit||0).toLocaleString("zh-CN",{minimumFractionDigits:2})}`,!O.sale_currency&&`$${(O.profit||0).toFixed(2)}`]}),o.jsx(Nt,{children:o.jsxs(st,{variant:"outline",className:O.payment_status==="Paid"?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-amber-50 text-amber-700 border-amber-200",children:[O.payment_status==="Paid"?o.jsx(Qr,{className:"w-3 h-3 mr-1"}):o.jsx(ga,{className:"w-3 h-3 mr-1"}),O.payment_status]})}),o.jsx(Nt,{children:o.jsxs("div",{className:"flex gap-1",children:[o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>f(O),title:"View Invoice",children:o.jsx(jA,{className:"w-4 h-4 text-cyan-600"})}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>E(O),children:o.jsx(jp,{className:"w-4 h-4"})}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>s(O),className:"text-rose-500 hover:text-rose-600",children:o.jsx(On,{className:"w-4 h-4"})})]})})]},O.id)})})]})}),o.jsx(tn,{open:e,onOpenChange:O=>{O||(t(!1),r(null))},children:o.jsx(Kt,{className:"max-w-2xl p-0 gap-0",children:e&&o.jsx(NMe,{products:j,vendors:w,initialData:n,onSubmit:A,onCancel:()=>{t(!1),r(null)}})})}),o.jsx($x,{open:!!i,onOpenChange:()=>s(null),children:o.jsxs(qp,{children:[o.jsxs(zp,{children:[o.jsx(Vp,{children:"Delete Sale"}),o.jsx(Wp,{children:"Are you sure you want to delete this sale? This action cannot be undone."})]}),o.jsxs(Up,{children:[o.jsx(Kp,{children:"Cancel"}),o.jsx(Hp,{onClick:()=>C.mutate(i.id),className:"bg-rose-600 hover:bg-rose-700",children:"Delete"})]})]})}),o.jsx(tn,{open:!!h,onOpenChange:()=>f(null),children:o.jsxs(Kt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex justify-end gap-2 mb-4",children:[o.jsx($2,{contentId:"invoice-content",filename:`Invoice-${h==null?void 0:h.id}`}),(h==null?void 0:h.customer_email)&&o.jsx(PMe,{sale:h,product:j.find(O=>O.id===h.product_id),rates:g})]}),h&&o.jsx(CMe,{sale:h,product:j.find(O=>O.id===h.product_id),rates:g})]})})]})})}function kMe(){return o.jsx(ms,{children:o.jsx(AMe,{})})}function TK({children:e}){const[t,n]=_.useState(!0),[r,i]=_.useState(!1);return _.useEffect(()=>{(async()=>{try{const a=await ne.auth.me();if(!a||a.role!=="admin"){window.location.href=kn("Dashboard");return}i(!0),n(!1)}catch{window.location.href=kn("CustomerRegistration")}})()},[]),t||!r?o.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:o.jsx(wr,{className:"w-8 h-8 animate-spin text-cyan-600"})}):e}function EMe(){const[e,t]=_.useState(!1),n=_.useRef(null),r=hn(),{data:i=[],isLoading:s}=Ee({queryKey:["diveShopProfiles"],queryFn:()=>ne.entities.DiveShopProfile.list()}),a=i[0],[l,c]=_.useState({shop_name:"",address:"",city:"",country:"",contact_email:"",contact_phone:"",website:"",logo_url:"",tax_id:"",currency:"IDR"});_.useEffect(()=>{a&&c({shop_name:a.shop_name||"",address:a.address||"",city:a.city||"",country:a.country||"",contact_email:a.contact_email||"",contact_phone:a.contact_phone||"",website:a.website||"",logo_url:a.logo_url||"",tax_id:a.tax_id||"",currency:a.currency||"IDR"})},[a]);const d=async g=>{var v;const x=(v=g.target.files)==null?void 0:v[0];if(x){t(!0);try{const{file_url:b}=await ne.integrations.Core.UploadFile({file:x});c(j=>
885({...j,logo_url:b})),gt.success("Logo uploaded successfully")}catch{gt.error("Failed to upload logo")}finally{t(!1)}}},h=Ye({mutationFn:g=>ne.entities.DiveShopProfile.create(g),onSuccess:()=>{r.invalidateQueries({queryKey:["diveShopProfiles"]}),gt.success("Dive shop profile created")}}),f=Ye({mutationFn:g=>ne.entities.DiveShopProfile.update(a.id,g),onSuccess:()=>{r.invalidateQueries({queryKey:["diveShopProfiles"]}),gt.success("Dive shop profile updated")}}),m=g=>{g.preventDefault(),a?f.mutate(l):h.mutate(l)};return s?o.jsx(lt,{children:o.jsx(dt,{className:"p-12 text-center",children:o.jsx(wr,{className:"w-8 h-8 animate-spin mx-auto text-slate-400"})})}):o.jsxs(lt,{children:[o.jsxs(cr,{children:[o.jsxs(vr,{className:"flex items-center gap-2",children:[o.jsx(bM,{className:"w-5 h-5"}),"Dive Shop Profile"]}),o.jsx(Az,{children:"Update your dive shop information for invoices, receipts, and branding"})]}),o.jsx(dt,{children:o.jsxs("form",{onSubmit:m,className:"space-y-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Shop Logo"}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"w-24 h-24 bg-slate-100 rounded-lg overflow-hidden border-2 border-dashed border-slate-300 flex items-center justify-center",children:l.logo_url?o.jsx("img",{src:l.logo_url,alt:"Shop Logo",className:"w-full h-full object-contain"}):o.jsx(bM,{className:"w-8 h-8 text-slate-400"})}),o.jsxs("div",{children:[o.jsx("input",{type:"file",ref:n,accept:"image/*",onChange:d,className:"hidden"}),o.jsx(re,{type:"button",variant:"outline",size:"sm",onClick:()=>{var g;return(g=n.current)==null?void 0:g.click()},disabled:e,children:e?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_p,{className:"w-4 h-4 mr-2"}),"Upload Logo"]})})]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{children:"Dive Shop Name *"}),o.jsx(ye,{value:l.shop_name,onChange:g=>c(x=>({...x,shop_name:g.target.value})),placeholder:"Your Dive Shop Name",required:!0})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{children:"Address"}),o.jsx(ur,{value:l.address,onChange:g=>c(x=>({...x,address:g.target.value})),placeholder:"Street address",rows:2})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"City"}),o.jsx(ye,{value:l.city,onChange:g=>c(x=>({...x,city:g.target.value})),placeholder:"City"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Country"}),o.jsx(ye,{value:l.country,onChange:g=>c(x=>({...x,country:g.target.value})),placeholder:"Country"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Contact Email *"}),o.jsx(ye,{type:"email",value:l.contact_email,onChange:g=>c(x=>({...x,contact_email:g.target.value})),placeholder:"[email protected]",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Contact Phone *"}),o.jsx(ye,{type:"tel",value:l.contact_phone,onChange:g=>c(x=>({...x,contact_phone:g.target.value})),placeholder:"+1 234 567 8900",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Website"}),o.jsx(ye,{type:"url",value:l.website,onChange:g=>c(x=>({...x,website:g.target.value})),placeholder:"https://yourshop.com"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Tax ID / Business Registration"}),o.jsx(ye,{value:l.tax_id,onChange:g=>c(x=>({...x,tax_id:g.target.value})),placeholder:"Tax ID or registration number"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Primary Currency"}),o.jsxs(ht,{value:l.currency,onValueChange:g=>c(x=>({...x,currency:g})),children:[o.jsx(ct,{children:o.jsx(pt,{})}),o.jsxs(ut,{children:[o.jsx(Pe,{value:"IDR",children:"IDR (Indonesian Rupiah)"}),o.jsx(Pe,{value:"USD",children:"USD (US Dollar)"}),o.jsx(Pe,{value:"EUR",children:"EUR (Euro)"}),o.jsx(Pe,{value:"GBP",children:"GBP (British Pound)"}),o.jsx(Pe,{value:"AUD",children:"AUD (Australian Dollar)"}),o.jsx(Pe,{value:"CNY",children:"CNY (Chinese Yuan)"})]})]})]})]}),o.jsx("div",{className:"flex justify-end pt-4",children:o.jsx(re,{type:"submit",className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",disabled:h.isPending||f.isPending,children:h.isPending||f.isPending?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}),"Saving..."]}):o.jsxs(o.Fragment,{children:[o.jsx(lx,{className:"w-4 h-4 mr-2"}),a?"Update Profile":"Create Profile"]})})})]})})]})}function TMe(){return o.jsxs("div",{className:"p-6 lg:p-8 max-w-4xl mx-auto 
885space-y-6",children:[o.jsx("div",{className:"flex items-center justify-between mb-8",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-light text-slate-800",children:"Settings"}),o.jsx("p",{className:"text-slate-500",children:"Manage your dive shop information and settings"})]})}),o.jsx(EMe,{})]})}function OMe(){return o.jsx(TK,{children:o.jsx(TMe,{})})}function MMe(){const[e,t]=_.useState(new Date),{data:n=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list()}),{data:r=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),{data:i=[]}=Ee({queryKey:["users"],queryFn:()=>ne.entities.User.list()}),s=No(e),a=ha(e),l=Ak({start:s,end:a}),c=f=>n.filter(m=>{if(m.booking_status==="cancelled")return!1;const g=Vt(m.start_date),x=m.end_date?Vt(m.end_date):g;return f>=g&&f<=x}),d=()=>{t(new Date(e.getFullYear(),e.getMonth()-1))},h=()=>{t(new Date(e.getFullYear(),e.getMonth()+1))};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-blue-50 to-slate-50 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/de44ed118_BigFinsLogo23.png",alt:"Big Fins Logo",className:"w-24 h-24 mx-auto mb-4 rounded-xl object-contain"}),o.jsxs("h1",{className:"text-3xl font-light text-slate-800 flex items-center justify-center gap-2",children:[o.jsx(ax,{className:"w-8 h-8 text-cyan-600"}),"Big Fins Calendar"]}),o.jsx("p",{className:"text-slate-500 mt-2",children:"View our booking schedule"})]}),o.jsxs(lt,{className:"shadow-lg",children:[o.jsx(cr,{children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("button",{onClick:d,className:"px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100 rounded-lg",children:"← Previous"}),o.jsx(vr,{className:"text-xl text-slate-800",children:_e(e,"MMMM yyyy")}),o.jsx("button",{onClick:h,className:"px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-100 rounded-lg",children:"Next →"})]})}),o.jsxs(dt,{children:[o.jsxs("div",{className:"grid grid-cols-7 gap-2",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>o.jsx("div",{className:"text-center text-xs font-semibold text-slate-500 py-2",children:f},f)),l.map(f=>{const m=c(f),g=m.length>0;return o.jsxs("div",{className:Te("min-h-24 p-2 border rounded-lg transition-colors",TV(f,e)?"bg-white":"bg-slate-50",MC(f,new Date)&&"ring-2 ring-cyan-500"),children:[o.jsx("div",{className:Te("text-sm font-medium mb-1",MC(f,new Date)?"text-cyan-600":"text-slate-700"),children:_e(f,"d")}),g&&o.jsxs("div",{className:"space-y-1",children:[m.slice(0,3).map(x=>{const v=r.find(j=>j.id===x.product_id),b=i.find(j=>j.id===x.staff_id);return o.jsxs("div",{className:"text-xs p-1 rounded bg-cyan-100 text-cyan-800 truncate",style:{backgroundColor:b!=null&&b.color_code?`${b.color_code}20`:void 0,borderLeft:b!=null&&b.color_code?`3px solid ${b.color_code}`:void 0},children:[o.jsx("div",{className:"font-medium truncate",children:x.customer_name||"Customer"}),o.jsx("div",{className:"text-[10px] truncate",children:(v==null?void 0:v.name)||"Service"})]},x.id)}),m.length>3&&o.jsxs("div",{className:"text-[10px] text-slate-500 text-center",children:["+",m.length-3," more"]})]})]},f.toISOString())})]}),o.jsxs("div",{className:"mt-6 pt-6 border-t",children:[o.jsx("h3",{className:"text-sm font-medium text-slate-700 mb-3",children:"Staff Colors"}),o.jsx("div",{className:"flex flex-wrap gap-3",children:i.filter(f=>f.color_code).map(f=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded",style:{backgroundColor:f.color_code}}),o.jsx("span",{className:"text-sm text-slate-600",children:f.full_name})]},f.id))})]})]})]})]})})}function RMe(){const t=new URLSearchParams(window.location.search).get("token"),n=hn(),[r,i]=_.useState(null),[s,a]=_.useState(!1),[l,c]=_.useState(""),d=_.useRef(null),{data:h,isLoading:f}=Ee({queryKey:["shareLink",t],queryFn:async()=>(await ne.entities.MediaShareLink.filter({token:t}))[0],enabled:!!t}),{data:m=[],isLoading:g}=Ee({queryKey:["sharedMedia",h==null?void 0:h.customer_name,h==null?void 0:h.group_name],queryFn:()=>(h==null?void 0:h.type)==="customer"?ne.entities.CustomerMedia.filter({customer_name:h.customer_name},"-created_date"):ne.entities.CustomerMedia.filter({group_name:h.group_name},"-created_date"),enabled:!!h}),x=Ye({mutationFn:w=>ne.entities.CustomerMedia.create(w),onSuccess:()=>n.invalidateQueries({queryKey:["sharedMedia"]})}),v=async w=>{var k;const N=(k=w.target.files)==null?void 0:k[0];if(N){a(!0);try{const{file_url:C}=await ne.integrations.Core.UploadFile({file:N}),A=N.type.startsWith("video")?"video":"image";await x.mutateAsync({customer_name:(h==null?void 0:h.type)==="customer"?h.customer_name:null,group_name:(h==null?void 0:h.type)==="group"?h.group_name:null,share_token:t,file_url:C,file_type:A,caption:l,uploaded_by:"Guest"}),c("")}catch(C){console.error("Upload failed:",C)}finally{a(!1),d.current&&(d.current.value="")}}},b=w=>{const N=document.createElement("a");N.href=w.file_url,N.download=`${w.caption||"media"}.${w.file_type==="video"?"mp4":"jpg"}`,N.target="_blank",document.body.appendChild(N),N.click(),document.body.removeChild(N)};if(!t)return o.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Kr,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),o.jsx("h1",{className:"text-xl font-medium text-slate-800",children:"Invalid Link"}),o.jsx("p",{className:"text-slate-500",children:"This share link is not val
885id."})]})});if(f||g)return o.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center",children:o.jsx(wr,{className:"w-8 h-8 animate-spin text-cyan-600"})});if(!h||!h.is_active)return o.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Kr,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),o.jsx("h1",{className:"text-xl font-medium text-slate-800",children:"Link Expired"}),o.jsx("p",{className:"text-slate-500",children:"This share link is no longer active."})]})});const j=h.type==="customer"?h.customer_name:h.group_name;return o.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30",children:[o.jsx("div",{className:"bg-white border-b",children:o.jsx("div",{className:"max-w-4xl mx-auto px-4 py-6",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"p-2 rounded-xl bg-gradient-to-br from-cyan-500 to-blue-600",children:o.jsx(Kr,{className:"w-6 h-6 text-white"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-xl font-semibold text-slate-800",children:"Big Fins Family Photos"}),o.jsx("p",{className:"text-sm text-slate-500",children:j})]})]})})}),o.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-6 space-y-6",children:[o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsx("h2",{className:"font-medium text-slate-800 mb-3",children:"Upload Media"}),o.jsxs("div",{className:"flex items-end gap-3",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Caption (optional)"}),o.jsx(ye,{value:l,onChange:w=>c(w.target.value),placeholder:"Add a caption...",disabled:s})]}),o.jsx("input",{ref:d,type:"file",accept:"image/*,video/*",onChange:v,className:"hidden",disabled:s}),o.jsx(re,{onClick:()=>{var w;return(w=d.current)==null?void 0:w.click()},disabled:s,className:"bg-gradient-to-r from-cyan-600 to-blue-600",children:s?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-4 h-4 mr-2 animate-spin"}),"Uploading..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_p,{className:"w-4 h-4 mr-2"}),"Upload"]})})]}),o.jsxs("p",{className:"text-xs text-slate-400 mt-2 flex items-center gap-2",children:[o.jsx(Hl,{className:"w-3 h-3"}),o.jsx(JB,{className:"w-3 h-3"}),"Supports images and videos"]})]}),o.jsxs("div",{className:"bg-white rounded-xl p-4 shadow-sm",children:[o.jsxs("h2",{className:"font-medium text-slate-800 mb-3",children:["Gallery (",m.length,")"]}),m.length===0?o.jsx("p",{className:"text-center text-slate-400 py-8",children:"No media uploaded yet"}):o.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:m.map(w=>o.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-slate-100 cursor-pointer group",onClick:()=>i(w),children:[w.file_type==="video"?o.jsxs("div",{className:"relative w-full h-full",children:[o.jsx("video",{src:w.file_url,className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:o.jsx(KB,{className:"w-10 h-10 text-white"})})]}):o.jsx("img",{src:w.file_url,alt:w.caption||"Media",className:"w-full h-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-trans
885parent to-transparent opacity-0 group-hover:opacity-100 transition-opacity",children:o.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-2 text-white",children:[w.caption&&o.jsx("p",{className:"text-sm truncate",children:w.caption}),o.jsx("p",{className:"text-xs opacity-75",children:_e(Vt(w.created_date),"MMM d")})]})}),o.jsx(re,{variant:"secondary",size:"icon",className:"absolute top-2 right-2 h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:N=>{N.stopPropagation(),b(w)},children:o.jsx(SM,{className:"w-3 h-3"})})]},w.id))})]})]}),o.jsx(tn,{open:!!r,onOpenChange:()=>i(null),children:o.jsxs(Kt,{className:"max-w-4xl p-0 bg-black border-none",children:[o.jsx(re,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 z-10 text-white hover:bg-white/20",onClick:()=>i(null),children:o.jsx(xi,{className:"w-5 h-5"})}),o.jsx(re,{variant:"secondary",size:"icon",className:"absolute top-2 right-12 z-10",onClick:()=>b(r),children:o.jsx(SM,{className:"w-4 h-4"})}),(r==null?void 0:r.file_type)==="video"?o.jsx("video",{src:r==null?void 0:r.file_url,controls:!0,autoPlay:!0,className:"w-full max-h-[80vh]"}):o.jsx("img",{src:r==null?void 0:r.file_url,alt:(r==null?void 0:r.caption)||"Media",className:"w-full max-h-[80vh] object-contain"}),(r==null?void 0:r.caption)&&o.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent",children:o.jsx("p",{className:"text-white",children:r.caption})})]})})]})}function DMe({staff:e,activeCustomers:t,inactiveCustomers:n,onEdit:r}){var l,c;const[i,s]=_.useState(!1),a=e.full_name?e.full_name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):(l=e.email)==null?void 0:l.slice(0,2).toUpperCase();return o.jsxs(lt,{className:"bg-white shadow-sm hover:shadow-md transition-shadow",children:[o.jsxs(cr,{className:"pb-3",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ya,{className:"h-14 w-14 bg-gradient-to-br from-cyan-500 to-blue-600",children:o.jsx(va,{className:"text-white font-medium",children:a})}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-lg text-slate-800",children:e.full_name||e.email}),e.position&&o.jsx("p",{className:"text-sm text-cyan-600 font-medium",children:e.position}),o.jsxs("div",{className:"flex items-center gap-3 mt-1 text-sm text-slate-500",children:[e.email&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(pd,{className:"w-3 h-3"}),e.email]}),e.phone&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(cx,{className:"w-3 h-3"}),e.phone]})]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(st,{variant:"outline",className:e.role==="admin"?"bg-purple-50 text-purple-700 border-purple-200":"bg-slate-50",children:e.role}),r&&o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>r(e),children:o.jsx(jp,{className:"w-4 h-4"})})]})]}),e.bio&&o.jsx("p",{className:"text-sm text-slate-600 mt-3",children:e.bio}),((c=e.certifications)==null?void 0:c.length)>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:e.certifications.map((d,h)=>o.jsx(st,{variant:"secondary",className:"text-xs",children:d},h))})]}),o.jsxs(dt,{className:"pt-0",children:[o.jsxs("div",{className:"flex items-center gap-4 p-3 bg-slate-50 rounded-lg",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Jr,{className:"w-4 h-4 text-slate-400"}),o.jsx("span",{className:"text-sm text-slate-600",children:"Customers:"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"flex items-center gap-1 text-sm",children:[o.jsx(TN,{className:"w-4 h-4 text-emerald-500"}),o.jsx("span",{className:"font-medium text-emerald-700",children:t.length}),o.jsx("span",{className:"text-slate-500",children:"active"})]}),o.jsxs("span",{className:"flex items-center gap-1 text-sm",children:[o.jsx(ON,{className:"w-4 h-4 text-slate-400"}),o.jsx("span",{className:"font-medium text-slate-600",children:n.length}),o.jsx("span",{className:"text-slate-500",children:"completed"})]})]}),(t.length>0||n.length>0)&&o.jsx(re,{variant:"ghost",size:"sm",onClick:()=>s(!i),className:"ml-auto",children:i?o.jsx(ox,{className:"w-4 h-4"}):o.jsx(wp,{className:"w-4 h-4"})})]}),i&&o.jsxs("div",{className:"mt-4 space-y-4",children:[t.length>0&&o.jsxs("div",{children:[o.jsxs("h4",{className:"text-sm font-medium text-emerald-700 mb-2 flex items-center gap-2",children:[o.jsx(TN,{className:"w-4 h-4"}),"Active Customers (",t.length,")"]}),o.jsx("div",{className:"space-y-2",children:t.map((d,h)=>o.jsx(e6,{customer:d,isActive:!0},h))})]}),n.length>0&&o.jsxs("div",{children:[o.jsxs("h4",{className:"text-sm font-medium text-slate-500 mb-2 flex items-center gap-2",children:[o.jsx(ON,{className:"w-4 h-4"}),"Completed (",n.length,")"]}),o.jsx("div",{className:"space-y-2",children:n.map((d,h)=>o.jsx(e6,{customer:d,isActive:!1},h))})]})]})]})]})}function e6({customer:e,isActive:t}){return o.jsxs("div",{className:`flex items-center justify-between p-2 rounded-lg ${t?"bg-emerald-50":"bg-slate-50"}`,children:[o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800 text-sm",children:e.name}),o.jsxs("p",{className:"text-xs text-slate-500",children:[e.product," • ",e.dates]})]}),o.jsx(st,{variant:"outline",className:t?"bg-emerald-100 text-emerald-700 border-emerald-200":"bg-slate-100 text-slate-600 border-slate-200",children:e.status})]})}var IMe="Separator",t6="horizontal",LMe=["horizontal","vertical"],OK=_.forwardRef((e,t)=>
885{const{decorative:n,orientation:r=t6,...i}=e,s=$Me(r)?r:t6,l=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(Ge.div,{"data-orientation":s,...l,...i,ref:t})});OK.displayName=IMe;function $Me(e){return LMe.includes(e)}var MK=OK;const RK=_.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>o.jsx(MK,{ref:i,decorative:n,orientation:t,className:Te("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));RK.displayName=MK.displayName;function FMe({staff:e,open:t,onOpenChange:n,onSave:r}){const[i,s]=_.useState({position:"",phone:"",bio:"",certifications:[],staff_permissions:{}}),[a,l]=_.useState("");_.useEffect(()=>{e&&s({position:e.position||"",phone:e.phone||"",bio:e.bio||"",certifications:e.certifications||[],staff_permissions:e.staff_permissions||{}})},[e]);const c=()=>{a.trim()&&(s(m=>({...m,certifications:[...m.certifications,a.trim()]})),l(""))},d=m=>{s(g=>({...g,certifications:g.certifications.filter((x,v)=>v!==m)}))},h=m=>{m.preventDefault(),r(e.id,i)},f=(m,g)=>{s(x=>({...x,staff_permissions:{...x.staff_permissions,[m]:g}}))};return o.jsx(tn,{open:t,onOpenChange:n,children:o.jsxs(Kt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:"Edit Staff Profile"})}),o.jsxs("form",{onSubmit:h,className:"space-y-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Position / Title"}),o.jsx(ye,{value:i.position,onChange:m=>s(g=>({...g,position:m.target.value})),placeholder:"e.g., Dive Instructor, Tour Guide"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Phone"}),o.jsx(ye,{value:i.phone,onChange:m=>s(g=>({...g,phone:m.target.value})),placeholder:"Contact number"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Bio"}),o.jsx(ur,{value:i.bio,onChange:m=>s(g=>({...g,bio:m.target.value})),placeholder:"Short description...",rows:3})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{children:"Certifications"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx(ye,{value:a,onChange:m=>l(m.target.value),placeholder:"Add certification",onKeyPress:m=>m.key==="Enter"&&(m.preventDefault(),c())}),o.jsx(re,{type:"button",variant:"outline",size:"icon",onClick:c,children:o.jsx(en,{className:"w-4 h-4"})})]}),i.certifications.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:i.certifications.map((m,g)=>o.jsxs(st,{variant:"secondary",className:"gap-1",children:[m,o.jsx("button",{type:"button",onClick:()=>d(g),children:o.jsx(xi,{className:"w-3 h-3"})})]},g))})]}),(e==null?void 0:e.role)!=="admin"&&o.jsxs(o.Fragment,{children:[o.jsx(RK,{}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(uy,{className:"w-4 h-4 text-cyan-600"}),o.jsx("h4",{className:"font-medium text-slate-800",children:"Staff Permissions"})]}),o.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Products"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Add, edit, delete products & categories"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_products||!1,onCheckedChange:m=>f("can_manage_products",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Sales"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Create, edit, delete sales & bookings"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_sales||!1,onCheckedChange:m=>f("can_manage_sales",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Customers"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Add, edit, delete customers"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_customers||!1,onCheckedChange:m=>f("can_manage_customers",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Invoices"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Create, edit, delete, send invoices"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_invoices||!1,onCheckedChange:m=>f("can_manage_invoices",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"View Vendors"}),o.jsx("p",{className:"text-xs text-slate-500",children:"View vendor information"})]}
885),o.jsx(jn,{checked:i.staff_permissions.can_view_vendors||!1,onCheckedChange:m=>f("can_view_vendors",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Vendors"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Add, edit, delete vendors"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_vendors||!1,onCheckedChange:m=>f("can_manage_vendors",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Record Payments"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Record vendor payments"})]}),o.jsx(jn,{checked:i.staff_permissions.can_record_payments||!1,onCheckedChange:m=>f("can_record_payments",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"View Financials"}),o.jsx("p",{className:"text-xs text-slate-500",children:"View financial data, profits, costs"})]}),o.jsx(jn,{checked:i.staff_permissions.can_view_financials||!1,onCheckedChange:m=>f("can_view_financials",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"View Reports"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Access reports and analytics"})]}),o.jsx(jn,{checked:i.staff_permissions.can_view_reports||!1,onCheckedChange:m=>f("can_view_reports",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Assign Tasks"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Create and assign tasks to staff"})]}),o.jsx(jn,{checked:i.staff_permissions.can_assign_tasks||!1,onCheckedChange:m=>f("can_assign_tasks",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Assets"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Manage sites, vehicles, equipment, times"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_assets||!1,onCheckedChange:m=>f("can_manage_assets",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Assign Resources"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Assign sites, vehicles, equipment to bookings"})]}),o.jsx(jn,{checked:i.staff_permissions.can_assign_resources||!1,onCheckedChange:m=>f("can_assign_resources",m)})]}),o.jsxs("div",{className:"flex items-center justify-between py-2",children:[o.jsxs("div",{children:[o.jsx(te,{className:"text-sm font-medium",children:"Manage Leave"}),o.jsx("p",{className:"text-xs text-slate-500",children:"Approve/reject leave requests"})]}),o.jsx(jn,{checked:i.staff_permissions.can_manage_leave||!1,onCheckedChange:m=>f("can_manage_leave",m)})]})]})]})]}),o.jsxs("div",{className:"flex gap-3 pt-2",children:[o.jsx(re,{type:"button",variant:"outline",onClick:()=>n(!1),className:"flex-1",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600",children:"Save Changes"})]})]})]})})}function BMe(){const[e,t]=_.useState(""),[n,r]=_.useState(null),{permissions:i}=Vo(),s=hn(),{data:a=[],isLoading:l}=Ee({queryKey:["staff"],queryFn:()=>ne.entities.User.list()}),{data:c=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list("-start_date",1e3)}),{data:d=[]}=Ee({queryKey:["products"],queryFn:()=>ne.entities.Product.list()}),h=Ye({mutationFn:({id:v,data:b})=>ne.entities.User.update(v,b),onSuccess:()=>{s.invalidateQueries({queryKey:["staff"]}),r(null)}}),f=new Date,m=_.useMemo(()=>{const v=b=>{var j;return((j=d.find(w=>w.id===b))==null?void 0:j.name)||"Unknown"};return a.map(b=>{const j=c.filter(C=>C.staff_id===b.id),w=new Map;j.forEach(C=>{const A=C.customer_id||C.customer_name||C.customer_email;A&&(w.has(A)||w.set(A,{name:C.customer_name||C.customer_email||"Unknown",sales:[]}),w.get(A).sales.push(C))});const N=[],k=[];
885return w.forEach(C=>{const A=C.sales.some(D=>{const B=D.payment_status==="Pending",O=D.end_date||D.start_date,M=O&&Ch(Vt(O),f);return B||M}),E=C.sales.sort((D,B)=>new Date(B.start_date||B.sale_date)-new Date(D.start_date||D.sale_date))[0],P={name:C.name,product:v(E.product_id),dates:E.end_date?`${_e(Vt(E.start_date||E.sale_date),"MMM d")} - ${_e(Vt(E.end_date),"MMM d, yyyy")}`:_e(Vt(E.start_date||E.sale_date),"MMM d, yyyy"),status:E.payment_status};A?N.push(P):k.push(P)}),{staff:b,activeCustomers:N,inactiveCustomers:k}})},[a,c,d,f]),g=_.useMemo(()=>{if(!e)return m;const v=e.toLowerCase();return m.filter(({staff:b})=>{var j,w,N;return((j=b.full_name)==null?void 0:j.toLowerCase().includes(v))||((w=b.email)==null?void 0:w.toLowerCase().includes(v))||((N=b.position)==null?void 0:N.toLowerCase().includes(v))})},[m,e]),x=(v,b)=>{h.mutate({id:v,data:b})};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Staff"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage team members and their assigned customers"})]}),o.jsxs("div",{className:"flex items-center gap-3 text-sm text-slate-600 bg-white px-4 py-2 rounded-lg shadow-sm",children:[o.jsx(Jr,{className:"w-4 h-4 text-cyan-600"}),o.jsxs("span",{children:[a.length," staff members"]})]})]}),o.jsxs("div",{className:"relative max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search by name, email, or position...",value:e,onChange:v=>t(v.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),o.jsx("div",{className:"space-y-4",children:l?Array(3).fill(0).map((v,b)=>o.jsx("div",{className:"bg-white rounded-xl p-6 animate-pulse",children:o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"w-14 h-14 rounded-full bg-slate-200"}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"h-5 w-40 bg-slate-200 rounded"}),o.jsx("div",{className:"h-4 w-24 bg-slate-100 rounded"})]})]})},b)):g.length===0?o.jsx("div",{className:"text-center py-12 text-slate-400",children:"No staff members found"}):g.map(({staff:v,activeCustomers:b,inactiveCustomers:j})=>o.jsx(DMe,{staff:v,activeCustomers:b,inactiveCustomers:j,onEdit:i.isAdmin?r:null},v.id))}),o.jsx(FMe,{staff:n,open:!!n,onOpenChange:v=>!v&&r(null),onSave:x})]})})}function qMe(){const[e,t]=_.useState(!0),[n,r]=_.useState("");_.useEffect(()=>{(async()=>{if(await ne.auth.isAuthenticated())try{const l=await ne.auth.me();if(!l||!l.id){await ne.auth.logout(),r("Access denied. Your account has been removed."),t(!1);return}!l.is_approved&&l.role!=="admin"?(await ne.auth.logout(),r("Your account is pending approval. Please contact an administrator."),t(!1)):window.location.href=kn("Dashboard")}catch(l){console.error("Access check error:",l),await ne.auth.logout(),r("Access denied. Only invited staff members can access this system."),t(!1)}else t(!1)})()},[]);const i=()=>{ne.auth.redirectToLogin(kn("StaffLogin"))};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-cyan-50 via-blue-50 to-slate-50 flex items-center justify-center p-4",children:o.jsx("div",{className:"w-full max-w-md",children:o.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8 space-y-6",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/c70cf4774_DiveMoniesLogo29Dec.jpg",alt:"Dive Monies Logo",className:"w-32 h-auto mx-auto mb-4 rounded-xl"}),o.jsx("h1",{className:"text-2xl font-bold text-slate-800",children:"Staff Login"}),o.jsx("p",{className:"text-slate-500 text-sm mt-1",children:"Access the Dive Monies accounting system"})]}),o.jsxs("div",{className:"space-y-4",children:[n&&o.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-lg text-sm",children:n}),o.jsx(re,{onClick:i,className:"w-full bg-white hover:bg-slate-50 text-slate-700 border border-slate-300 h-12",disabled:e,children:e?o.jsxs(o.Fragment,{children:[o.jsx(wr,{className:"w-5 h-5 mr-3 animate-spin"}),"Signing in..."]}):o.jsxs(o.Fragment,{children:[o.jsxs("svg",{className:"w-5 h-5 mr-3",viewBox:"0 0 24 24",children:[o.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),o.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),o.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),o.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Sign in with Google"]})})]}),o.jsx("div",{className:"pt-4 border-t text-center",children:o.jsx("p",{className:"text-xs text-slate-500",children:"For access issues, please contact your administrator"})})]})})})}const ny=[{value:"red",label:"Red",bg:"bg-red-500"},{value:"orange",label:"Orange",bg:"bg-orange-500"},{value:"amber",label:"Amber",bg:"bg-amber-500"},{value:"yellow",label:"Yellow",bg:"bg-yellow-500"},{value:"lime",label:"Lime",bg:"bg-lime-500"},{value:"green",label:"Green",bg:"bg-green-500"},{value:"emerald",label:"Emerald",bg:"bg-emerald-500"},{value:"teal",label:"Teal",bg:"bg-teal-500"},{value:"cyan",label:"Cyan",bg:"bg-cyan-500"},{value:"sky",label:"Sky",bg:"bg-sky-500"},{value:"blue",label:"Blue",bg:"bg-blue-500"},{value:"indigo",label:"Indigo",bg:"bg-indigo-500"},{value:"violet",label:"Violet",bg:"bg-violet-500"},{value:"purple",label:"Purple",bg:"bg-purple-500"},{value:"fuchsia",label:"Fuchsia",bg:"bg-fuchsia-500"},{value:"pink",label:"Pink",bg:"bg-pink-500"},{value:"rose",label:"Rose",bg:"bg-rose-500"}],n6=[{id:"can_manage_products",label:"Manage Products",description:"Add, edit, delete products & categories"},{id:"can_manage_sales",label:"Manage Sales",description:"Create, edit, delete sales & bookings"},{id:"can_manage_customers",label:"Manage Customers",description:"Add, edit, delete customers"},{id:"can_manage_invoices",label:"Manage Invoices",description:"Create, edit, delete, send invoices"}
885,{id:"can_view_vendors",label:"View Vendors",description:"View vendor information"},{id:"can_manage_vendors",label:"Manage Vendors",description:"Add, edit, delete vendors"},{id:"can_record_payments",label:"Record Payments",description:"Record vendor payments"},{id:"can_view_financials",label:"View Financials",description:"View financial data, profits, costs"},{id:"can_view_reports",label:"View Reports",description:"Access reports and analytics"},{id:"can_assign_tasks",label:"Assign Tasks",description:"Create and assign tasks to staff"},{id:"can_manage_assets",label:"Manage Assets",description:"Manage sites, vehicles, equipment, times"},{id:"can_assign_resources",label:"Assign Resources",description:"Assign sites, vehicles, equipment to bookings"},{id:"can_manage_leave",label:"Manage Leave",description:"Approve/reject leave requests"}];function zMe(){var A,E,P,D,B,O;const[e,t]=_.useState(""),[n,r]=_.useState(null),[i,s]=_.useState({}),[a,l]=_.useState(""),{permissions:c}=Vo(),d=hn(),{data:h=[],isLoading:f}=Ee({queryKey:["users"],queryFn:()=>ne.entities.User.list()}),m=Ye({mutationFn:({id:M,data:$})=>ne.entities.User.update(M,$),onSuccess:()=>{d.invalidateQueries({queryKey:["users"]}),r(null)}}),g=Ye({mutationFn:({id:M})=>ne.entities.User.update(M,{is_approved:!0}),onSuccess:()=>{d.invalidateQueries({queryKey:["users"]})}}),x=Ye({mutationFn:({id:M})=>ne.entities.User.delete(M),onSuccess:()=>{d.invalidateQueries({queryKey:["users"]})}}),v=M=>{r(M),s(M.staff_permissions||{}),l(M.color_code||"")},b=()=>{m.mutate({id:n.id,data:{staff_permissions:i,color_code:a||null}})},j=M=>{s($=>({...$,[M]:!$[M]}))},w=h.filter(M=>!M.is_approved&&M.role!=="admin"),N=h.filter(M=>M.is_approved||M.role==="admin"),k=w.filter(M=>{var $,F;return(($=M.full_name)==null?void 0:$.toLowerCase().includes(e.toLowerCase()))||((F=M.email)==null?void 0:F.toLowerCase().includes(e.toLowerCase()))}),C=N.filter(M=>{var $,F;return(($=M.full_name)==null?void 0:$.toLowerCase().includes(e.toLowerCase()))||((F=M.email)==null?void 0:F.toLowerCase().includes(e.toLowerCase()))});return c.isAdmin?o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Staff Management"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage user permissions and access levels"})]}),o.jsx(lt,{className:"border-0 shadow-sm bg-gradient-to-r from-cyan-50 to-blue-50",children:o.jsx(dt,{className:"p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(uy,{className:"w-5 h-5 text-cyan-600 mt-0.5"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:"Permission System"}),o.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Admins have full access to all features including revenue and profit data. Staff members only see what their permissions allow - they cannot view total revenue or profit figures."})]})]})})}),o.jsxs("div",{className:"relative max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search users...",value:e,onChange:M=>t(M.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),k.length>0&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-xl font-medium text-slate-800",children:"Pending Approval"}),o.jsx(st,{variant:"destructive",children:k.length})]}),k.map(M=>{var $,F,W,q;return o.jsx(lt,{className:"border-2 border-amber-200 bg-amber-50/50 shadow-sm",children:o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-amber-100 to-orange-100 flex items-center justify-center",children:o.jsx("span",{className:"text-lg font-medium text-amber-700",children:((F=($=M.full_name)==null?void 0:$[0])==null?void 0:F.toUpperCase())||((q=(W=M.email)==null?void 0:W[0])==null?void 0:q.toUpperCase())})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:M.full_name||"Unnamed User"}),o.jsx("p",{className:"text-sm text-slate-500",children:M.email}),o.jsx(st,{variant:"outline",className:"mt-1 text-xs bg-amber-100 border-amber-300 text-amber-700",children:"Awaiting Approval"})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs(re,{variant:"outline",size:"sm",onClick:()=>x.mutate({id:M.id}),disabled:x.isPending,className:"border-red-200 text-red-600 hover:bg-red-50",children:[o.jsx(xi,{className:"w-4 h-4 mr-1"}),"Reject"]}),o.jsxs(re,{size:"sm",onClick:()=>g.mutate({id:M.id}),disabled:g.isPending,className:"bg-green-600 hover:bg-green-700",children:[o.jsx(Qr,{className:"w-4 h-4 mr-1"}),"Approve"]})]})]})})},M.id)})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("h2",{className:"text-xl font-medium text-slate-800",children:"Approved Staff"}),f?Array(3).fill(0).map((M,$)=>o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsx(dt,{className:"p-6",children:o.jsx("div",{className:"h-16 bg-slate-100 rounded animate-pulse"})})},$)):C.length===0?o.jsx(lt,{className:"border-0 shadow-sm",children:o.jsx(dt,{className:"p-12 text-center text-slate-400",children:"No approved users found"})}):C.map(M=>{var $,F,W,q,K;return o.jsx(lt,{className:"border-0 shadow-sm hover:shadow-md transition-all",children:o.jsx(dt,{className:"p-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-cyan-100 to-blue-100 flex items-center justify-center",children:o.jsx("span",{className:"text-lg font-medium text-cyan-700",children:((F=($=M.full_name)==null?void 0:$[0])==null?void 0:F.toUpperCase())||((q=(W=M.email)==null?void 0:W[0])==null?void 0:q.toUpperCase())})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:M.full_name||"Unnamed User"}),o.jsx("p",{className:"text-sm text-slate-500",children:M.email})]})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[M.color_code&&o.jsx("div",{className:`w-4 h-4 rounded-full ${(K=ny.find(L=>
885L.value===M.color_code))==null?void 0:K.bg}`,title:`Calendar color: ${M.color_code}`}),M.role==="admin"?o.jsxs(st,{className:"bg-purple-100 text-purple-700 border-purple-200",children:[o.jsx(uy,{className:"w-3 h-3 mr-1"}),"Admin"]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-wrap gap-1 max-w-md",children:[Object.entries(M.staff_permissions||{}).filter(([L,H])=>H===!0).slice(0,3).map(([L])=>{var H;return o.jsx(st,{variant:"outline",className:"text-xs",children:((H=n6.find(I=>I.id===L))==null?void 0:H.label)||L},L)}),Object.values(M.staff_permissions||{}).filter(L=>L===!0).length>3&&o.jsxs(st,{variant:"outline",className:"text-xs",children:["+",Object.values(M.staff_permissions||{}).filter(L=>L===!0).length-3," more"]}),Object.values(M.staff_permissions||{}).filter(L=>L===!0).length===0&&o.jsx("span",{className:"text-sm text-slate-400",children:"No permissions"})]}),o.jsx(re,{variant:"outline",size:"sm",onClick:()=>v(M),children:"Edit Permissions"})]})]})]})})},M.id)})]}),o.jsx(tn,{open:!!n,onOpenChange:()=>r(null),children:o.jsxs(Kt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[o.jsx(Un,{children:o.jsx(Vn,{children:"Edit Permissions"})}),n&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-3 p-4 bg-slate-50 rounded-lg",children:[o.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-cyan-100 to-blue-100 flex items-center justify-center",children:o.jsx("span",{className:"font-medium text-cyan-700",children:((E=(A=n.full_name)==null?void 0:A[0])==null?void 0:E.toUpperCase())||((D=(P=n.email)==null?void 0:P[0])==null?void 0:D.toUpperCase())})}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium text-slate-800",children:n.full_name||"Unnamed User"}),o.jsx("p",{className:"text-sm text-slate-500",children:n.email})]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsxs(te,{className:"flex items-center gap-2",children:[o.jsx(EZ,{className:"w-4 h-4"}),"Calendar Color"]}),o.jsxs(ht,{value:a,onValueChange:l,children:[o.jsx(ct,{children:o.jsx(pt,{placeholder:"Select a color",children:a&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:`w-4 h-4 rounded ${(B=ny.find(M=>M.value===a))==null?void 0:B.bg}`}),(O=ny.find(M=>M.value===a))==null?void 0:O.label]})})}),o.jsx(ut,{children:ny.map(M=>o.jsx(Pe,{value:M.value,children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:`w-4 h-4 rounded ${M.bg}`}),M.label]})},M.value))})]}),o.jsx("p",{className:"text-xs text-slate-500",children:"This color will be used to identify this staff member on the calendar"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(te,{children:"Permissions"}),n6.map(M=>o.jsxs("div",{className:`flex items-start gap-3 p-4 rounded-lg border transition-all cursor-pointer ${i[M.id]?"bg-cyan-50 border-cyan-200":"bg-white border-slate-200 hover:border-slate-300"}`,onClick:()=>j(M.id),children:[o.jsx(qi,{checked:i[M.id]||!1,onCheckedChange:()=>j(M.id),className:"mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx(te,{className:"font-medium text-slate-800 cursor-pointer",children:M.label}),o.jsx("p",{className:"text-sm text-slate-500 mt-0.5",children:M.description})]})]},M.id))]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{variant:"outline",onClick:()=>r(null),className:"flex-1",children:"Cancel"}),o.jsx(re,{onClick:b,disabled:m.isPending,className:"flex-1 bg-gradient-to-r from-cyan-600 to-blue-600",children:m.isPending?"Saving...":"Save Permissions"})]})]})]})})]})}):o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-8 flex items-center justify-center",children:o.jsx(lt,{className:"max-w-md",children:o.jsxs(dt,{className:"p-8 text-center",children:[o.jsx(uy,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),o.jsx("h2",{className:"text-xl font-medium text-slate-800 mb-2",children:"Access Denied"}),o.jsx("p",{className:"text-slate-500",children:"Only administrators can manage staff permissions."})]})})})}function UMe(){return o.jsx(TK,{children:o.jsx(zMe,{})})}const VMe=["Immediate","Weekly","Bi-weekly","Monthly"];function WMe({onSubmit:e,onCancel:t,initialData:n}){const[r,i]=_.useState({name:"",contact_email:"",contact_phone:"",payment_terms:"Monthly",notes:""});_.useEffect(()=>{n&&i({name:n.name||"",contact_email:n.contact_email||"",contact_phone:n.contact_phone||"",payment_terms:n.payment_terms||"Monthly",notes:n.notes||""})},[n]);const s=a=>{a.preventDefault(),e(r)};return o.jsxs(lt,{className:"border-0 shadow-lg",children:[o.jsxs(cr,{className:"flex flex-row items-center justify-between border-b bg-gradient-to-r from-cyan-50 to-blue-50",children:[o.jsx(vr,{className:"text-xl font-medium text-slate-800",children:n?"Edit Vendor":"New Vendor"}),o.jsx(re,{variant:"ghost",size:"icon",onClick:t,children:o.jsx(xi,{className:"w-5 h-5"})})]}),o.jsx(dt,{className:"p-6",children:o.jsxs("form",{onSubmit:s,className:"space-y-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Vendor Name *"}),o.jsx(ye,{value:r.name,onChange:a=>i(l=>({...l,name:a.target.value})),placeholder:"Enter vendor name",className:"h-11",required:!0})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Email"}),o.jsx(ye,{type:"email",value:r.contact_email,onChange:a=>i(l=>({...l,contact_email:a.target.value})),placeholder:"[email protected]",className:"h-11"})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Phone"}),o.jsx(ye,{value:r.contact_phone,onChange:a=>i(l=>({...l,contact_phone:a.target.value})),placeholder:"+1 234 567 8900",className:"h-11"})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Payment Terms"}),o.jsxs(ht,{value:r.payment_terms,onValueChange:a=>i(l=>({...l,payment_terms:a})),children:[o.jsx(ct,{className:"h-11",children:o.jsx(pt,{})}),o.jsx(ut,{children:VMe.map(a=>o.jsx(Pe,{value:a,children:a},a))})]})]}),o.jsxs("div",{className:"space-y-2 md:col-span-2",children:[o.jsx(te,{className:"text-sm text-slate-600",children:"Notes"}),o.jsx(ur,{value:r.notes,onChange:a=>i(l=>({...l,notes:a.target.value})),placeholder:"Additional notes...",rows:3})]})]}),o.jsxs("div",{className:"flex gap-3 pt-4",children:[o.jsx(re,{type:"button",variant:"outline",onClick:t,className:"flex-1 h-11",children:"Cancel"}),o.jsx(re,{type:"submit",className:"flex-1 h-11 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700",children:n?"Update Vendor":"Create Vendor"})]})]})})]})}function HMe(){const[e,t]=_.useState(!1),[n,r]=_.useState(null),[i,s]=_.useState(null),[a,l]=_.useState(""),c=hn(),{data:d=[],isLoading:h}=Ee({queryKey:["vendors"],queryFn:()=>ne.entities.Vendor.list()}),{data:f=[]}=Ee({queryKey:["sales"],queryFn:()=>ne.entities.Sale.list()}),m=Ye({mutationFn:w=>ne.entities.Vendor.create(w),onSuccess:()=>{c.invalidateQueries({queryKey:["vendors"]}),t(!1)}}),g=Ye({mutationFn:({id:w,data:N})=>ne.entities.Vendor.update(w,N),onSuccess:()=>{c.invalidateQueries({queryKey:["vendors"]}),t(!1),r(null)}}),x=Ye({mutationFn:w=>ne.entities.Vendor.delete(w),onSuccess:()=>{c.invalidateQueries({queryKey:["vendors"]}),s(null)}}),v=w=>{n?g.mutate({id:n.id,data:w}):m.mutate(w)},b=w=>{const N=f.filter(A=>A.vendor_id===w),k=N.filter(A=>A.payment_status==="Paid").reduce((A,E)=>A+(E.vendor_cost||0),0),C=N.filter(A=>A.payment_status==="Pending").reduce((A,E)=>A+(E.vendor_cost||0),0);return{totalPaid:k,totalPending:C,salesCount:N.length}},j=d.filter(w=>w.name.toLowerCase().includes(a.toLowerCase()));return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-cyan-50/30 to-blue-50/30 p-4 md:p-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto 
885space-y-6",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-light text-slate-800 tracking-tight",children:"Vendors"}),o.jsx("p",{className:"text-slate-500 mt-1",children:"Manage your vendor partnerships"})]}),o.jsxs(re,{onClick:()=>{r(null),t(!0)},className:"bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-700 hover:to-blue-700 shadow-lg shadow-cyan-500/20",children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Vendor"]})]}),o.jsxs("div",{className:"relative max-w-md",children:[o.jsx(Da,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),o.jsx(ye,{placeholder:"Search vendors...",value:a,onChange:w=>l(w.target.value),className:"pl-10 h-11 bg-white border-slate-200"})]}),h?o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(w=>o.jsx("div",{className:"bg-white rounded-xl h-48 animate-pulse"},w))}):j.length===0?o.jsxs("div",{className:"bg-white rounded-xl p-12 text-center",children:[o.jsx("div",{className:"w-16 h-16 mx-auto bg-slate-100 rounded-full flex items-center justify-center mb-4",children:o.jsx(r6,{className:"w-8 h-8 text-slate-400"})}),o.jsx("h3",{className:"text-lg font-medium text-slate-700 mb-2",children:"No vendors found"}),o.jsx("p",{className:"text-slate-500 mb-4",children:a?"Try a different search":"Add your first vendor to get started"}),!a&&o.jsxs(re,{onClick:()=>t(!0),children:[o.jsx(en,{className:"w-4 h-4 mr-2"}),"Add Vendor"]})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:j.map(w=>{const N=b(w.id);return o.jsx(lt,{className:"border-0 shadow-sm hover:shadow-md transition-all group",children:o.jsxs(dt,{className:"p-6",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("div",{className:"p-3 rounded-xl bg-gradient-to-br from-cyan-50 to-blue-50",children:o.jsx(r6,{className:"w-6 h-6 text-cyan-600"})}),o.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>{r(w),t(!0)},children:o.jsx(jp,{className:"w-4 h-4"})}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>s(w),className:"text-rose-500",children:o.jsx(On,{className:"w-4 h-4"})})]})]}),o.jsx("h3",{className:"text-lg font-medium text-slate-800 mb-2",children:w.name}),o.jsxs("div",{className:"space-y-2 mb-4",children:[w.contact_email&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[o.jsx(pd,{className:"w-4 h-4"}),w.contact_email]}),w.contact_phone&&o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[o.jsx(cx,{className:"w-4 h-4"}),w.contact_phone]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[o.jsx(ga,{className:"w-4 h-4"}),w.payment_terms," payments"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-4 border-t",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-400 uppercase",children:"Paid"}),o.jsxs("p",{className:"text-lg font-semibold text-slate-700",children:["$",N.totalPaid.toLocaleString()]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-slate-400 uppercase",children:"Pending"}),o.jsxs("p",{className:"text-lg font-semibold text-amber-600",children:["$",N.totalPending.toLocaleString()]})]})]})]})},w.id)})}),o.jsx(tn,{open:e,onOpenChange:t,children:o.jsx(Kt,{className:"max-w-2xl p-0 gap-0",children:o.jsx(WMe,{initialData:n,onSubmit:v,onCancel:()=>{t(!1),r(null)}})})}),o.jsx($x,{open:!!i,onOpenChange:()=>s(null),children:o.jsxs(qp,{children:[o.jsxs(zp,{children:[o.jsx(Vp,{children:"Delete Vendor"}),o.jsxs(Wp,{children:['Are you sure you want to delete "',i==null?void 0:i.name,'"? This action cannot be undone.']})]}),o.jsxs(Up,{children:[o.jsx(Kp,{children:"Cancel"}),o.jsx(Hp,{onClick:()=>x.mutate(i.id),className:"bg-rose-600 hover:bg-rose-700",children:"Delete"})]})]})})]})})}function r6(e){return o.jsxs("svg",{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",...e,children:[o.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),o.jsx("circle",{cx:"9",cy:"7",r:"4"}),o.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),o.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}function KMe(){return o.jsx(ms,{children:o.jsx(HMe,{})})}const N0=_.createContext(null);function F2(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const B2=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class GMe extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function YMe({children:e,isPresent:t}){const n=_.useId(),r=_.useRef(null),i=_.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=_.useContext(B2);return _.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:d}=i.current;if(t||!r.current||!a||!l)return;r.current.dataset.motionPopId=n;const h=document.createElement("style");return s&&(h.nonce=s),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
886          [data-motion-pop-id="${n}"] {
887            position: absolute !important;
888            width: ${a}px !important;
889            height: ${l}px !important;
890            top: ${c}px !important;
891            left: ${d}px !important;
892          }
893        `),()=>{document.head.removeChild(h)}},[t]),o.jsx(GMe,{isPresent:t,childRef:r,sizeRef:i,children:_.cloneElement(e,{ref:r})})}const XMe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a})=>{const l=F2(QMe),c=_.useId(),d=_.useCallback(f=>{l.set(f,!0);for(const m of l.values())if(!m)return;r&&r()},[l,r]),h=_.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),d]:[n,d]);return _.useMemo(()=>{l.forEach((f,m)=>l.set(m,!1))},[n]),_.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=o.jsx(YMe,{isPresent:n,children:e})),o.jsx(N0.Provider,{value:h,children:e})};function QMe(){return new Map}const q2=_.createContext({}),yi=e=>e;let DK=yi;function z2(e){let t;return()=>(t===void 0&&(t=e()),t)}const cd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ja=e=>e*1e3,Sa=e=>e/1e3,ry=e=>e.key||"";function i6(e){const t=[];
vendor: 40,567 bytes, line 893
893return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const U2=typeof window<"u",IK=U2?_.useLayoutEffect:_.useEffect,JMe=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:a="sync"})=>{const l=_.useMemo(()=>i6(e),[e]),c=l.map(ry),d=_.useRef(!0),h=_.useRef(l),f=F2(()=>new Map),[m,g]=_.useState(l),[x,v]=_.useState(l);IK(()=>{d.current=!1,h.current=l;for(let w=0;w<x.length;w++){const N=ry(x[w]);c.includes(N)?f.delete(N):f.get(N)!==!0&&f.set(N,!1)}},[x,c.length,c.join("-")]);const b=[];if(l!==m){let w=[...l];for(let N=0;N<x.length;N++){const k=x[N],C=ry(k);c.includes(C)||(w.splice(N,0,k),b.push(k))}a==="wait"&&b.length&&(w=b),v(i6(w)),g(l);return}const{forceRender:j}=_.useContext(q2);return o.jsx(o.Fragment,{children:x.map(w=>{const N=ry(w),k=l===x||c.includes(N),C=()=>{if(f.has(N))f.set(N,!0);else return;let A=!0;f.forEach(E=>{E||(A=!1)}),A&&(j==null||j(),v(h.current),i&&i())};return o.jsx(XMe,{isPresent:k,initial:!d.current||r?void 0:!1,custom:k?void 0:n,presenceAffectsLayout:s,mode:a,onExitComplete:k?void 0:C,children:w},N)})})},ZMe={useManualTiming:!1};function eRe(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),e()),d(a)}const c={schedule:(d,h=!1,f=!1)=>{const g=f&&r?t:n;return h&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(a=d,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,i&&(i=!1,c.process(d))}};return c}const iy=["read","resolveKeyframes","update","preRender","render","postRender"],tRe=40;function LK(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=iy.reduce((j,w)=>(j[w]=eRe(s),j),{}),{read:l,resolveKeyframes:c,update:d,preRender:h,render:f,postRender:m}=a,g=()=>{const j=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(j-i.timestamp,tRe),1),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),h.process(i),f.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:iy.reduce((j,w)=>{const N=a[w];return j[w]=(k,C=!1,A=!1)=>(n||x(),N.schedule(k,C,A)),j},{}),cancel:j=>{for(let w=0;w<iy.length;w++)a[iy[w]].cancel(j)},state:i,steps:a}}const{schedule:an,cancel:Fo,state:lr,steps:yN}=LK(typeof requestAnimationFrame<"u"?requestAnimationFrame:yi,!0),$K=_.createContext({strict:!1}),s6={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ud={};for(const e in s6)ud[e]={isEnabled:t=>s6[e].some(n=>!!t[n])};function nRe(e){for(const t in e)ud[t]={...ud[t],...e[t]}}const rRe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Yv(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rRe.has(e)}let FK=e=>!Yv(e);function iRe(e){e&&(FK=t=>t.startsWith("on")?!Yv(t):e(t))}try{iRe(require("@emotion/is-prop-valid").default)}catch{}function sRe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(FK(i)||n===!0&&Yv(i)||!t&&!Yv(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function aRe(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const C0=_.createContext({});function dp(e){return typeof e=="string"||Array.isArray(e)}function P0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const V2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],W2=["initial",...V2];function A0(e){return P0(e.animate)||W2.some(t=>dp(e[t]))}function BK(e){return!!(A0(e)||e.variants)}function oRe(e,t){if(A0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dp(n)?n:void 0,animate:dp(r)?r:void 0}}return e.inherit!==!1?t:{}}function lRe(e){const{initial:t,animate:n}=oRe(e,_.useContext(C0));return _.useMemo(()=>({initial:t,animate:n}),[a6(t),a6(n)])}function a6(e){return Array.isArray(e)?e.join(" "):e}const cRe=Symbol.for("motionComponentSymbol");function su(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uRe(e,t,n){return _.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):su(n)&&(n.current=r))},[t])}const H2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dRe="framerAppearId",qK="data-"+H2(dRe),{schedule:K2}=LK(queueMicrotask,!1),zK=_.createContext({});function fRe(e,t,n,r,i){var s,a;const{visualElement:l}=_.useContext(C0),c=_.useContext($K),d=_.useContext(N0),h=_.useContext(B2).reducedMotion,f=_.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const m=f.current,g=_.useContext(zK);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&hRe(f.current,n,i,g);const x=_.useRef(!1);_.useInsertionEffect(()=>{m&&x.current&&m.update(n,d)});const v=n[qK],b=_.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,v)));return IK(()=>{m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),K2.render(m.render),b.current&&m.animationState&&m.animationState.animateChanges())}),_.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)===null||j===void 0||j.call(window,v)}),b.current=!1))}),m}function hRe(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:UK(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||l&&su(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:d})}function UK(e){if(e)return e.options.allowProjection!==!1?e.projection:UK(e.parent)}function pRe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,a;e&&nRe(e);function l(d,h){let f;const m={..._.useContext(B2),...d,layoutId:mRe(d)},{isStatic:g}=m,x=lRe(d),v=r(d,g);if(!g&&U2){gRe();const b=yRe(m);f=b.MeasureLayout,x.visualElement=fRe(i,v,m,t,b.ProjectionNode)}return o.jsxs(C0.Provider,{value:x,children:[f&&x.visualElement?o.jsx(f,{visualElement:x.visualElement,...m}):null,n(i,d,uRe(v,x.visualElement,h),v,g,x.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(a=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&a!==void 0?a:""})`}`;const c=_.forwardRef(l);return c[cRe]=i,c}function mRe({layoutId:e}){const t=_.useContext(q2).id;return t&&e!==void 0?t+"-"+e:e}function gRe(e,t){_.useContext($K).strict}function yRe(e){const{drag:t,layout:n}=ud;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const vRe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function G2(e){return typeof e!="string"||e.includes("-")?!1:!!(vRe.indexOf(e)>-1||/[A-Z]/u.test(e))}function VK(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const WK=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function HK(e,t,n,r){VK(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(WK.has(i)?i:H2(i),t.attrs[i])}const br=e=>!!(e&&e.getVelocity),Xv={};function xRe(e){Object.assign(Xv,e)}const om=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yc=new Set(om);function KK(e,{layout:t,layoutId:n}){return yc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xv[e]||e==="opacity")}function Y2(e,t,n){var r;const{style:i}=e,s={};for(const a in i)(br(i[a])||t.style&&br(t.style[a])||KK(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[a]=i[a]);return s}function GK(e,t,n){const r=Y2(e,t,n);for(const i in e)if(br(e[i])||br(t[i])){const s=om.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function o6(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function X2(e,t,n,r){if(typeof t=="function"){const[i,s]=o6(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=o6(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const iA=e=>Array.isArray(e),bRe=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),wRe=e=>iA(e)?e[e.length-1]||0:e;function Py(e){const t=br(e)?e.get():e;return bRe(t)?t.toValue():t}function jRe({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const a={latestValues:SRe(r,i,s,e),renderState:t()};return n&&(a.mount=l=>n(r,l,a)),a}const YK=e=>(t,n)=>{const r=_.useContext(C0),i=_.useContext(N0),s=()=>jRe(e,t,r,i);return n?s():F2(s)};function SRe(e,t,n,r){const i={},s=r(e,{});for(const m in s)i[m]=Py(s[m]);let{initial:a,animate:l}=e;const c=A0(e),d=BK(e);t&&d&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const f=h?l:a;if(f&&typeof f!="boolean"&&!P0(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const x=X2(e,m[g]);if(x){const{transitionEnd:v,transition:b,...j}=x;for(const w in j){let N=j[w];if(Array.isArray(N)){const k=h?N.length-1:0;N=N[k]}N!==null&&(i[w]=N)}for(const w in v)i[w]=v[w]}}}return i}const Q2=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),XK=()=>({...Q2(),attrs:{}}),QK=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ra=(e,t,n)=>n>t?t:n<e?e:n,$d={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fp={...$d,transform:e=>Ra(0,1,e)},sy={...$d,default:1},lm=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ho=lm("deg"),$s=lm("%"),et=lm("px"),_Re=lm("vh"),NRe=lm("vw"),l6={...$s,parse:e=>$s.parse(e)/100,transform:e=>$s.transform(e*100)},CRe={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,backgroundPositionX:et,backgroundPositionY:et},PRe={rotate:ho,rotateX:ho,rotateY:ho,rotateZ:ho,scale:sy,scaleX:sy,scaleY:sy,scaleZ:sy,skew:ho,skewX:ho,skewY:ho,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:fp,originX:l6,originY:l6,originZ:et},c6={...$d,transform:Math.round},J2={...CRe,...PRe,zIndex:c6,size:et,fillOpacity:fp,strokeOpacity:fp,numOctaves:c6},ARe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kRe=om.length;function ERe(e,t,n){let r="",i=!0;for(let s=0;s<kRe;s++){const a=om[s],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const d=QK(l,J2[a]);if(!c){i=!1;const h=ARe[a]||a;r+=`${h}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}const JK=e=>t=>typeof t=="string"&&t.startsWith(e),ZK=JK("--"),TRe=JK("var(--"),Z2=e=>TRe(e)?ORe.test(e.split("/*")[0].trim()):!1,ORe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eE(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let a=!1,l=!1;for(const c in t){const d=t[c];if(yc.has(c)){a=!0;continue}else if(ZK(c)){i[c]=d;continue}else{const h=QK(d,J2[c]);c.startsWith("origin")?(l=!0,s[c]=h):r[c]=h}}if(t.transform||(a||n?r.transform=ERe(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:h=0}=s;r.transformOrigin=`${c} ${d} ${h}`}}function u6(e,t,n){return typeof e=="string"?e:et.transform(t+n*e)}function MRe(e,t,n){const r=u6(t,e.x,e.width),i=u6(n,e.y,e.height);return`${r} ${i}`}const RRe={offset:"stroke-dashoffset",array:"stroke-dasharray"},DRe={offset:"strokeDashoffset",array:"strokeDasharray"};function IRe(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?RRe:DRe;e[s.offset]=et.transform(-r);const a=et.transform(t),l=et.transform(n);e[s.array]=`${a} ${l}`}function tE(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...d},h,f){if(eE(e,d,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:g,dimensions:x}=e;m.transform&&(x&&(g.transform=m.transform),delete m.transform),x&&(i!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=MRe(x,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),a!==void 0&&IRe(m,a,l,c,!1)}const nE=e=>typeof e=="string"&&e.toLowerCase()==="svg",LRe={useVisualState:YK({scrapeMotionValuesFromProps:GK,createRenderState:XK,onMount:(e,t,{renderState:n,latestValues:r})=>{an.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),an.render(()=>{tE(n,r,nE(t.tagName),e.transformTemplate),HK(t,n)})}})},$Re={useVisualState:YK({scrapeMotionValuesFromProps:Y2,createRenderState:Q2})};function eG(e,t,n){for(const r in t)!br(t[r])&&!KK(r,n)&&(e[r]=t[r])}function FRe({transformTemplate:e},t){return _.useMemo(()=>{const n=Q2();return eE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BRe(e,t){const n=e.style||{},r={};return eG(r,n,e),Object.assign(r,FRe(e,t)),r}function qRe(e,t){const n={},r=BRe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function zRe(e,t,n,r){const i=_.useMemo(()=>{const s=XK();return tE(s,t,nE(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};eG(s,e.style,e),i.style={...s,...i.style}}return i}function URe(e=!1){return(n,r,i,{latestValues:s},a)=>{const c=(G2(n)?zRe:qRe)(r,s,a,n),d=sRe(r,typeof n=="string",e),h=n!==_.Fragment?{...d,...c,ref:i}:{},{children:f}=r,m=_.useMemo(()=>br(f)?f.get():f,[f]);return _.createElement(n,{...h,children:m})}}function VRe(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...G2(r)?LRe:$Re,preloadedFeatures:e,useRender:URe(i),createVisualElement:t,Component:r};return pRe(a)}}function tG(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function k0(e,t,n){const r=e.getProps();return X2(r,t,n!==void 0?n:r.custom,e)}const WRe=z2(()=>window.ScrollTimeline!==void 0);class HRe{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(WRe()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class KRe extends HRe{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function rE(e,t){return e?e[t]||e.default||e:void 0}const sA=2e4;function nG(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<sA;)t+=n,r=e.next(t);return t>=sA?1/0:t}function iE(e){return typeof e=="function"}function d6(e,t){e.timeline=t,e.onfinish=null}const sE=e=>Array.isArray(e)&&typeof e[0]=="number",GRe={linearEasing:void 0};function YRe(e,t){const n=z2(e);return()=>{var r;return(r=GRe[t])!==null&&r!==void 0?r:n()}}const Qv=YRe(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),rG=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(cd(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function iG(e){return!!(typeof e=="function"&&Qv()||!e||typeof e=="string"&&(e in aA||Qv())||sE(e)||Array.isArray(e)&&e.every(iG))}const Zf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,aA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zf([0,.65,.55,1]),circOut:Zf([.55,0,1,.45]),backIn:Zf([.31,.01,.66,-.59]),backOut:Zf([.33,1.53,.69,.99])};function sG(e,t){if(e)return typeof e=="function"&&Qv()?rG(e,t):sE(e)?Zf(e):Array.isArray(e)?e.map(n=>sG(n,t)||aA.easeOut):aA[e]}const ns={x:!1,y:!1};function aG(){return ns.x||ns.y}function XRe(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function oG(e,t){const n=XRe(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function f6(e){return t=>{t.pointerType==="touch"||aG()||e(t)}}function QRe(e,t,n={}){const[r,i,s]=oG(e,n),a=f6(l=>{const{target:c}=l,d=t(l);if(typeof d!="function"||!c)return;const h=f6(f=>{d(f),c.removeEventListener("pointerleave",h)});c.addEventListener("pointerleave",h,i)});return r.forEach(l=>{l.addEventListener("pointerenter",a,i)}),s}const lG=(e,t)=>t?e===t?!0:lG(e,t.parentElement):!1,aE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,JRe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZRe(e){return JRe.has(e.tagName)||e.tabIndex!==-1}const eh=new WeakSet;function h6(e){return t=>{t.key==="Enter"&&e(t)}}function vN(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const eDe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=h6(()=>{if(eh.has(n))return;vN(n,"down");const i=h6(()=>{vN(n,"up")}),s=()=>vN(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function p6(e){return aE(e)&&!aG()}function tDe(e,t,n={}){const[r,i,s]=oG(e,n),a=l=>{const c=l.currentTarget;if(!p6(l)||eh.has(c))return;eh.add(c);const d=t(l),h=(g,x)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),!(!p6(g)||!eh.has(c))&&(eh.delete(c),typeof d=="function"&&d(g,{success:x}))},f=g=>{h(g,n.useGlobalTarget||lG(c,g.target))},m=g=>{h(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(l=>{!ZRe(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,i),l.addEventListener("focus",d=>eDe(d,i),i)}),s}function nDe(e){return e==="x"||e==="y"?ns[e]?null:(ns[e]=!0,()=>{ns[e]=!1}):ns.x||ns.y?null:(ns.x=ns.y=!0,()=>{ns.x=ns.y=!1})}let Ay;function rDe(){Ay=void 0}const Fs={now:()=>(Ay===void 0&&Fs.set(lr.isProcessing||ZMe.useManualTiming?lr.timestamp:performance.now()),Ay),set:e=>{Ay=e,queueMicrotask(rDe)}};function oE(e,t){e.indexOf(t)===-1&&e.push(t)}function lE(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class cE{constructor(){this.subscriptions=[]}add(t){return oE(this.subscriptions,t),()=>lE(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function cG(e,t){return t?e*(1e3/t):0}const m6=30,iDe=e=>!isNaN(parseFloat(e));class sDe{constructor(t,n={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Fs.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Fs.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=iDe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new cE);const r=this.events[t].add(n);return t==="change"?()=>{r(),an.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Fs.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>m6)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,m6);return cG(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hp(e,t){return new sDe(e,t)}function aDe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hp(n))}function oDe(e,t){const n=k0(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const l=wRe(s[a]);aDe(e,a,l)}}function lDe(e){return!!(br(e)&&e.add)}function oA(e,t){const n=e.getValue("willChange");if(lDe(n))return n.add(t)}function uG(e){return e.props[qK]}const dG=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cDe=1e-7,uDe=12;function dDe(e,t,n,r,i){let s,a,l=0;do a=t+(n-t)/2,s=dG(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>cDe&&++l<uDe);return a}function cm(e,t,n,r){if(e===t&&n===r)return yi;const i=s=>dDe(s,0,1,e,n);return s=>s===0||s===1?s:dG(i(s),t,r)}const fG=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hG=e=>t=>1-e(1-t),pG=cm(.33,1.53,.69,.99),uE=hG(pG),mG=fG(uE),gG=e=>(e*=2)<1?.5*uE(e):.5*(2-Math.pow(2,-10*(e-1))),dE=e=>1-Math.sin(Math.acos(e)),yG=hG(dE),vG=fG(dE),xG=e=>/^0[^.\s]+$/u.test(e);function fDe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xG(e):!0}const bG=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),hDe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pDe(e){const t=hDe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function wG(e,t,n=1){const[r,i]=pDe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return bG(a)?parseFloat(a):a}return Z2(i)?wG(i,t,n+1):i}const mDe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),g6=e=>e===$d||e===et,y6=(e,t)=>parseFloat(e.split(", ")[t]),v6=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return y6(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?y6(s[1],e):0}},gDe=new Set(["x","y","z"]),yDe=om.filter(e=>!gDe.has(e));function vDe(e){const t=[];return yDe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const dd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:v6(4,13),y:v6(5,14)};dd.translateX=dd.x;dd.translateY=dd.y;const jG=e=>t=>t.test(e),xDe={test:e=>e==="auto",parse:e=>e},SG=[$d,et,$s,ho,NRe,_Re,xDe],x6=e=>SG.find(jG(e)),Wl=new Set;let lA=!1,cA=!1;function _G(){if(cA){const e=Array.from(Wl).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vDe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}cA=!1,lA=!1,Wl.forEach(e=>e.complete()),Wl.clear()}function NG(){Wl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cA=!0)})}function bDe(){NG(),_G()}class fE{constructor(t,n,r,i,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Wl.add(this),lA||(lA=!0,an.read(NG),an.resolveKeyframes(_G))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=i==null?void 0:i.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&a===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Wl.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Wl.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ph=e=>Math.round(e*1e5)/1e5,hE=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wDe(e){return e==null}const jDe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pE=(e,t)=>n=>!!(typeof n=="string"&&jDe.test(n)&&n.startsWith(e)||t&&!wDe(n)&&Object.prototype.hasOwnProperty.call(n,t)),CG=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,l]=r.match(hE);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},SDe=e=>Ra(0,255,e),xN={...$d,transform:e=>Math.round(SDe(e))},El={test:pE("rgb","red"),parse:CG("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+xN.transform(e)+", "+xN.transform(t)+", "+xN.transform(n)+", "+ph(fp.transform(r))+")"};function _De(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const uA={test:pE("#"),parse:_De,transform:El.transform},au={test:pE("hsl","hue"),parse:CG("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$s.transform(ph(t))+", "+$s.transform(ph(n))+", "+ph(fp.transform(r))+")"},gr={test:e=>El.test(e)||uA.test(e)||au.test(e),parse:e=>El.test(e)?El.parse(e):au.test(e)?au.parse(e):uA.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?El.transform(e):au.transform(e)},NDe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CDe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hE))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(NDe))===null||n===void 0?void 0:n.length)||0)>0}const PG="number",AG="color",PDe="var",ADe="var(",b6="${}",kDe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(kDe,c=>(gr.test(c)?(r.color.push(s),i.push(AG),n.push(gr.parse(c))):c.startsWith(ADe)?(r.var.push(s),i.push(PDe),n.push(c)):(r.number.push(s),i.push(PG),n.push(parseFloat(c))),++s,b6)).split(b6);return{values:n,split:l,indexes:r,types:i}}function kG(e){return pp(e).values}function EG(e){const{split:t,types:n}=pp(e),r=t.length;return i=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],i[a]!==void 0){const l=n[a];l===PG?s+=ph(i[a]):l===AG?s+=gr.transform(i[a]):s+=i[a]}return s}}const EDe=e=>typeof e=="number"?0:e;function TDe(e){const t=kG(e);return EG(e)(t.map(EDe))}const Bo={test:CDe,parse:kG,createTransformer:EG,getAnimatableNone:TDe},ODe=new Set(["brightness","contrast","saturate","opacity"]);function MDe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hE)||[];if(!r)return e;const i=n.replace(r,"");let s=ODe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const RDe=/\b([a-z-]*)\(.*?\)/gu,dA={...Bo,getAnimatableNone:e=>{const t=e.match(RDe);return t?t.map(MDe).join(" "):e}},DDe={...J2,color:gr,backgroundColor:gr,outlineColor:gr,fill:gr,stroke:gr,borderColor:gr,borderTopColor:gr,borderRightColor:gr,borderBottomColor:gr,borderLeftColor:gr,filter:dA,WebkitFilter:dA},mE=e=>DDe[e];function TG(e,t){let n=mE(e);return n!==dA&&(n=Bo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const IDe=new Set(["auto","none","0"]);function LDe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!IDe.has(s)&&pp(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=TG(n,i)}class OG extends fE{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),Z2(d))){const h=wG(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!mDe.has(r)||t.length!==2)return;const[i,s]=t,a=x6(i),l=x6(s);if(a!==l)if(g6(a)&&g6(l))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)fDe(t[i])&&r.push(i);r.length&&LDe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dd[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const a=i.length-1,l=i[a];i[a]=dd[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,d])=>{n.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const w6=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Bo.test(e)||e==="0")&&!e.startsWith("url("));function $De(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function FDe(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=w6(i,t),l=w6(s,t);return!a||!l?!1:$De(e)||(n==="spring"||iE(n))&&r}const BDe=e=>e!==null;function E0(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(BDe),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const qDe=40;class MG{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Fs.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>qDe?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bDe(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Fs.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:d}=this.options;if(!d&&!FDe(t,r,i,s))if(a)this.options.duration=0;else{c==null||c(E0(t,this.options,n)),l==null||l(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const fn=(e,t,n)=>e+(t-e)*n;function bN(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zDe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=bN(c,l,e+1/3),s=bN(c,l,e),a=bN(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Jv(e,t){return n=>n>0?t:e}const wN=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},UDe=[uA,El,au],VDe=e=>UDe.find(t=>t.test(e));function j6(e){const t=VDe(e);if(!t)return!1;let n=t.parse(e);return t===au&&(n=zDe(n)),n}const S6=(e,t)=>{const n=j6(e),r=j6(t);if(!n||!r)return Jv(e,t);const i={...n};return s=>(i.red=wN(n.red,r.red,s),i.green=wN(n.green,r.green,s),i.blue=wN(n.blue,r.blue,s),i.alpha=fn(n.alpha,r.alpha,s),El.transform(i))},WDe=(e,t)=>n=>t(e(n)),um=(...e)=>e.reduce(WDe),fA=new Set(["none","hidden"]);function HDe(e,t){return fA.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function KDe(e,t){return n=>fn(e,t,n)}function gE(e){return typeof e=="number"?KDe:typeof e=="string"?Z2(e)?Jv:gr.test(e)?S6:XDe:Array.isArray(e)?RG:typeof e=="object"?gr.test(e)?S6:GDe:Jv}function RG(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>gE(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}}function GDe(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=gE(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function YDe(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],l=e.indexes[a][i[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[s]=c,i[a]++}return r}const XDe=(e,t)=>{const n=Bo.createTransformer(t),r=pp(e),i=pp(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?fA.has(e)&&!i.values.length||fA.has(t)&&!r.values.length?HDe(e,t):um(RG(YDe(r,i),i.values),n):Jv(e,t)};function DG(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fn(e,t,n):gE(e)(e,t)}const QDe=5;function IG(e,t,n){const r=Math.max(t-QDe,0);return cG(n-e(r),t-r)}const gn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jN=.001;function JDe({duration:e=gn.duration,bounce:t=gn.bounce,velocity:n=gn.velocity,mass:r=gn.mass}){let i,s,a=1-t;a=Ra(gn.minDamping,gn.maxDamping,a),e=Ra(gn.minDuration,gn.maxDuration,Sa(e)),a<1?(i=d=>{const h=d*a,f=h*e,m=h-n,g=hA(d,a),x=Math.exp(-f);return jN-m/g*x},s=d=>{const f=d*a*e,m=f*n+n,g=Math.pow(a,2)*Math.pow(d,2)*e,x=Math.exp(-f),v=hA(Math.pow(d,2),a);return(-i(d)+jN>0?-1:1)*((m-g)*x)/v}):(i=d=>{const h=Math.exp(-d*e),f=(d-n)*e+1;return-jN+h*f},s=d=>{const h=Math.exp(-d*e),f=(n-d)*(e*e);return h*f});const l=5/e,c=eIe(i,s,l);if(e=ja(e),isNaN(c))return{stiffness:gn.stiffness,damping:gn.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const ZDe=12;function eIe(e,t,n){let r=n;for(let i=1;i<ZDe;i++)r=r-e(r)/t(r);return r}function hA(e,t){return e*Math.sqrt(1-t*t)}const tIe=["duration","bounce"],nIe=["stiffness","damping","mass"];function _6(e,t){return t.some(n=>e[n]!==void 0)}function rIe(e){let t={velocity:gn.velocity,stiffness:gn.stiffness,damping:gn.damping,mass:gn.mass,isResolvedFromDuration:!1,...e};if(!_6(e,nIe)&&_6(e,tIe))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Ra(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:gn.mass,stiffness:i,damping:s}}else{const n=JDe(e);t={...t,...n,mass:gn.mass},t.isResolvedFromDuration=!0}return t}function LG(e=gn.visualDuration,t=gn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:d,mass:h,duration:f,velocity:m,isResolvedFromDuration:g}=rIe({...n,velocity:-Sa(n.velocity||0)}),x=m||0,v=d/(2*Math.sqrt(c*h)),b=a-s,j=Sa(Math.sqrt(c/h)),w=Math.abs(b)<5;r||(r=w?gn.restSpeed.granular:gn.restSpeed.default),i||(i=w?gn.restDelta.granular:gn.restDelta.default);let N;if(v<1){const C=hA(j,v);N=A=>{const E=Math.exp(-v*j*A);return a-E*((x+v*j*b)/C*Math.sin(C*A)+b*Math.cos(C*A))}}else if(v===1)N=C=>a-Math.exp(-j*C)*(b+(x+j*b)*C);else{const C=j*Math.sqrt(v*v-1);N=A=>{const E=Math.exp(-v*j*A),P=Math.min(C*A,300);return a-E*((x+v*j*b)*Math.sinh(P)+C*b*Math.cosh(P))/C}}const k={calculatedDuration:g&&f||null,next:C=>{const A=N(C);if(g)l.done=C>=f;else{let E=0;v<1&&(E=C===0?ja(x):IG(N,C,A));const P=Math.abs(E)<=r,D=Math.abs(a-A)<=i;l.done=P&&D}return l.value=l.done?a:A,l},toString:()=>{const C=Math.min(nG(k),sA),A=rG(E=>k.next(C*E).value,C,30);return C+"ms "+A}};return k}function N6({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:d=.5,restSpeed:h}){const f=e[0],m={done:!1,value:f},g=P=>l!==void 0&&P<l||c!==void 0&&P>c,x=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let v=n*t;const b=f+v,j=a===void 0?b:a(b);j!==b&&(v=j-f);const w=P=>-v*Math.exp(-P/r),N=P=>j+w(P),k=P=>{const D=w(P),B=N(P);m.done=Math.abs(D)<=d,m.value=m.done?j:B};let C,A;const E=P=>{g(m.value)&&(C=P,A=LG({keyframes:[m.value,x(m.value)],velocity:IG(N,P,m.value),damping:i,stiffness:s,restDelta:d,restSpeed:h}
vendor: 4,545 bytes, line 893
893))};return E(0),{calculatedDuration:null,next:P=>{let D=!1;return!A&&C===void 0&&(D=!0,k(P),E(P)),C!==void 0&&P>=C?A.next(P-C):(!D&&k(P),m)}}}const iIe=cm(.42,0,1,1),sIe=cm(0,0,.58,1),$G=cm(.42,0,.58,1),aIe=e=>Array.isArray(e)&&typeof e[0]!="number",oIe={linear:yi,easeIn:iIe,easeInOut:$G,easeOut:sIe,circIn:dE,circInOut:vG,circOut:yG,backIn:uE,backInOut:mG,backOut:pG,anticipate:gG},C6=e=>{if(sE(e)){DK(e.length===4);const[t,n,r,i]=e;return cm(t,n,r,i)}else if(typeof e=="string")return oIe[e];return e};function lIe(e,t,n){const r=[],i=n||DG,s=e.length-1;for(let a=0;a<s;a++){let l=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||yi:t;l=um(c,l)}r.push(l)}return r}function cIe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(DK(s===t.length),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=lIe(t,r,i),l=a.length,c=d=>{let h=0;if(l>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=cd(e[h],e[h+1],d);return a[h](f)};return n?d=>c(Ra(e[0],e[s-1],d)):c}function uIe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=cd(0,t,r);e.push(fn(n,1,i))}}function dIe(e){const t=[0];return uIe(t,e.length-1),t}function fIe(e,t){return e.map(n=>n*t)}function hIe(e,t){return e.map(()=>t||$G).splice(0,e.length-1)}function Zv({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=aIe(r)?r.map(C6):C6(r),s={done:!1,value:t[0]},a=fIe(n&&n.length===t.length?n:dIe(t),e),l=cIe(a,t,{ease:Array.isArray(i)?i:hIe(t,i)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const pIe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>an.update(t,!0),stop:()=>Fo(t),now:()=>lr.isProcessing?lr.timestamp:Fs.now()}},mIe={decay:N6,inertia:N6,tween:Zv,keyframes:Zv,spring:LG},gIe=e=>e/100;class yE extends MG{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,a=(i==null?void 0:i.KeyframeResolver)||fE,l=(c,d)=>this.onKeyframesResolved(c,d);this.resolver=new a(s,l,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=this.options,l=iE(n)?n:mIe[n]||Zv;let c,d;l!==Zv&&typeof t[0]!="number"&&(c=um(gIe,DG(t[0],t[1])),t=[0,100]);const h=l({...this.options,keyframes:t});s==="mirror"&&(d=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=nG(h));const{calculatedDuration:f}=h,m=f+i,g=m*(r+1)-i;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:m,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:d,totalDuration:h,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:m,repeat:g,repeatType:x,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const j=this.currentTime-m*(this.speed>=0?1:-1),w=this.speed>=0?j<0:j>h;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let N=this.currentTime,k=s;if(g){const P=Math.min(this.currentTime,h)/f;let D=Math.floor(P),B=P%1;!B&&P>=1&&(B=1),B===1&&D--,D=Math.min(D,g+1),!!(D%2)&&(x==="reverse"?(B=1-B,v&&(B-=v/f)):x==="mirror"&&(k=a)),N=Ra(0,1,B)*f}const C=w?{done:!1,value:c[0]}:k.next(N);l&&(C.value=l(C.value));let{done:A}=C;!w&&d!==null&&(A=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return E&&i!==void 0&&(C.value=E0(c,this.options,i)),b&&b(C.value),E&&this.finish(),C}get duration(){const{resolved:t}=this;return t?Sa(t.calculatedDuration):0}
vendor: 66,352 bytes, line 893
893get time(){return Sa(this.currentTime)}set time(t){t=ja(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Sa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=pIe,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const yIe=new Set(["opacity","clipPath","filter","transform"]);function vIe(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const d={[t]:n};c&&(d.offset=c);const h=sG(l,i);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const xIe=z2(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ex=10,bIe=2e4;function wIe(e){return iE(e.type)||e.type==="spring"||!iG(e.ease)}function jIe(e,t){const n=new yE({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<bIe;)r=n.sample(s),i.push(r.value),s+=ex;return{times:void 0,keyframes:i,duration:s-ex,ease:"linear"}}const FG={anticipate:gG,backInOut:mG,circInOut:vG};function SIe(e){return e in FG}class P6 extends MG{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new OG(s,(a,l)=>this.onKeyframesResolved(a,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:a,type:l,motionValue:c,name:d,startTime:h}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&Qv()&&SIe(a)&&(a=FG[a]),wIe(this.options)){const{onComplete:m,onUpdate:g,motionValue:x,element:v,...b}=this.options,j=jIe(t,b);t=j.keyframes,t.length===1&&(t[1]=t[0]),i=j.duration,s=j.times,a=j.ease,l="keyframes"}const f=vIe(c.owner.current,d,t,{...this.options,duration:i,times:s,ease:a});return f.startTime=h??this.calcStartTime(),this.pendingTimeline?(d6(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:m}=this.options;c.set(E0(t,this.options,n)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:s,type:l,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Sa(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Sa(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ja(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return yi;const{animation:r}=n;d6(r,t)}return yi}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:f,element:m,...g}=this.options,x=new yE({...g,keyframes:r,duration:i,type:s,ease:a,times:l,isGenerator:!0}),v=ja(this.time);d.setWithVelocity(x.sample(v-ex).value,x.sample(v).value,ex)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:a,type:l}=t;return xIe()&&r&&yIe.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&a!==0&&l!=="inertia"}}const _Ie={type:"spring",stiffness:500,damping:25,restSpeed:10},NIe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),CIe={type:"keyframes",duration:.8},PIe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AIe=(e,{keyframes:t})=>t.length>2?CIe:yc.has(e)?e.startsWith("scale")?NIe(t[1]):_Ie:PIe;function kIe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:d,...h}){return!!Object.keys(h).length}const vE=(e,t,n,r={},i,s)=>a=>{const l=rE(r,e)||{},c=l.delay||r.delay||0;let{elapsed:d=0}=r;d=d-ja(c);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};kIe(l)||(h={...h,...AIe(e,h)}),h.duration&&(h.duration=ja(h.duration)),h.repeatDelay&&(h.repeatDelay=ja(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let f=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const m=E0(h.keyframes,l);if(m!==void 0)return an.update(()=>{h.onUpdate(m),h.onComplete()}),new KRe([])}return!s&&P6.supports(h)?new P6(h):new yE(h)};function EIe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function BG(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(a=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const m=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),g=c[f];if(g===void 0||h&&EIe(h,f))continue;const x={delay:n,...rE(a||{},f)};let v=!1;if(window.MotionHandoffAnimation){const j=uG(e);if(j){const w=window.MotionHandoffAnimation(j,f,an);w!==null&&(x.startTime=w,v=!0)}}oA(e,f),m.start(vE(f,m,g,e.shouldReduceMotion&&yc.has(f)?{type:!1}:x,e,v));const b=m.animation;b&&d.push(b)}return l&&Promise.all(d).then(()=>{an.update(()=>{l&&oDe(e,l)})}),d}function pA(e,t,n={}){var r;const i=k0(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const a=i?()=>Promise.all(BG(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:m}=s;return TIe(e,t,h+d,f,m,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,h]=c==="beforeChildren"?[a,l]:[l,a];return d().then(()=>h())}else return Promise.all([a(),l(n.delay)])}function TIe(e,t,n=0,r=0,i=1,s){const a=[],l=(e.variantChildren.size-1)*r,c=i===1?(d=0)=>d*r:(d=0)=>l-d*r;return Array.from(e.variantChildren).sort(OIe).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(pA(d,t,{...s,delay:n+c(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function OIe(e,t){return e.sortNodePosition(t)}function MIe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>pA(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=pA(e,t,n);else{const i=typeof t=="function"?k0(e,t,n.custom):t;r=Promise.all(BG(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const RIe=W2.length;function qG(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?qG(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<RIe;n++){const r=W2[n],i=e.props[r];(dp(i)||i===!1)&&(t[r]=i)}return t}const DIe=[...V2].reverse(),IIe=V2.length;function LIe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MIe(e,n,r)))}function $Ie(e){let t=LIe(e),n=A6(),r=!0;const i=c=>(d,h)=>{var f;const m=k0(e,h,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(m){const{transition:g,transitionEnd:x,...v}=m;d={...d,...v,...x}}return d};function s(c){t=c(e)}function a(c){const{props:d}=e,h=qG(e.parent)||{},f=[],m=new Set;let g={},x=1/0;for(let b=0;b<IIe;b++){const j=DIe[b],w=n[j],N=d[j]!==void 0?d[j]:h[j],k=dp(N),C=j===c?w.isActive:null;C===!1&&(x=b);let A=N===h[j]&&N!==d[j]&&k;if(A&&r&&e.manuallyAnimateOnMount&&(A=!1),w.protectedKeys={...g},!w.isActive&&C===null||!N&&!w.prevProp||P0(N)||typeof N=="boolean")continue;const E=FIe(w.prevProp,N);let P=E||j===c&&w.isActive&&!A&&k||b>x&&k,D=!1;const B=Array.isArray(N)?N:[N];let O=B.reduce(i(j),{});C===!1&&(O={});const{prevResolvedValues:M={}}=w,$={...M,...O},F=K=>{P=!0,m.has(K)&&(D=!0,m.delete(K)),w.needsAnimating[K]=!0;const L=e.getValue(K);L&&(L.liveStyle=!1)};for(const K in $){const L=O[K],H=M[K];if(g.hasOwnProperty(K))continue;let I=!1;iA(L)&&iA(H)?I=!tG(L,H):I=L!==H,I?L!=null?F(K):m.add(K):L!==void 0&&m.has(K)?F(K):w.protectedKeys[K]=!0}w.prevProp=N,w.prevResolvedValues=O,w.isActive&&(g={...g,...O}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(A&&E)||D)&&f.push(...B.map(K=>({animation:K,options:{type:j}})))}if(m.size){const b={};m.forEach(j=>{const w=e.getBaseTarget(j),N=e.getValue(j);N&&(N.liveStyle=!0),b[j]=w??null}),f.push({animation:b})}let v=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(m=>{var g;return(g=m.animationState)===null||g===void 0?void 0:g.setActive(c,d)}),n[c].isActive=d;const f=a(c);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=A6(),r=!0}}}function FIe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tG(t,e):!1}function ml(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function A6(){return{animate:ml(!0),whileInView:ml(),whileHover:ml(),whileTap:ml(),whileDrag:ml(),whileFocus:ml(),exit:ml()}}class Xo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class BIe extends Xo{constructor(t){super(t),t.animationState||(t.animationState=$Ie(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();P0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let qIe=0;class zIe extends Xo{constructor(){super(...arguments),this.id=qIe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const UIe={animation:{Feature:BIe},exit:{Feature:zIe}};function mp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function dm(e){return{point:{x:e.pageX,y:e.pageY}}}const VIe=e=>t=>aE(t)&&e(t,dm(t));function mh(e,t,n,r){return mp(e,t,VIe(n),r)}const k6=(e,t)=>Math.abs(e-t);function WIe(e,t){const n=k6(e.x,t.x),r=k6(e.y,t.y);return Math.sqrt(n**2+r**2)}class zG{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=_N(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=WIe(f.offset,{x:0,y:0})>=3;if(!m&&!g)return;const{point:x}=f,{timestamp:v}=lr;this.history.push({...x,timestamp:v});const{onStart:b,onMove:j}=this.handlers;m||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=SN(m,this.transformPagePoint),an.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:g,onSessionEnd:x,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=_N(f.type==="pointercancel"?this.lastMoveEventInfo:SN(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,b),x&&x(f,b)},!aE(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=dm(t),l=SN(a,this.transformPagePoint),{point:c}=l,{timestamp:d}=lr;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,_N(l,this.history)),this.removeListeners=um(mh(this.contextWindow,"pointermove",this.handlePointerMove),mh(this.contextWindow,"pointerup",this.handlePointerUp),mh(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fo(this.updatePoint)}}function SN(e,t){return t?{point:t(e.point)}:e}function E6(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _N({point:e},t){return{point:e,delta:E6(e,UG(t)),offset:E6(e,HIe(t)),velocity:KIe(t,.1)}}function HIe(e){return e[0]}function UG(e){return e[e.length-1]}function KIe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=UG(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ja(t)));)n--;if(!r)return{x:0,y:0};const s=Sa(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const VG=1e-4,GIe=1-VG,YIe=1+VG,WG=.01,XIe=0-WG,QIe=0+WG;function bi(e){return e.max-e.min}function JIe(e,t,n){return Math.abs(e-t)<=n}function T6(e,t,n,r=.5){e.origin=r,e.originPoint=fn(t.min,t.max,e.origin),e.scale=bi(n)/bi(t),e.translate=fn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=GIe&&e.scale<=YIe||isNaN(e.scale))&&(e.scale=1),(e.translate>=XIe&&e.translate<=QIe||isNaN(e.translate))&&(e.translate=0)}function gh(e,t,n,r){T6(e.x,t.x,n.x,r?r.originX:void 0),T6(e.y,t.y,n.y,r?r.originY:void 0)}function O6(e,t,n){e.min=n.min+t.min,e.max=e.min+bi(t)}function ZIe(e,t,n){O6(e.x,t.x,n.x),O6(e.y,t.y,n.y)}function M6(e,t,n){e.min=t.min-n.min,e.max=e.min+bi(t)}function yh(e,t,n){M6(e.x,t.x,n.x),M6(e.y,t.y,n.y)}function eLe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?fn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?fn(n,e,r.max):Math.min(e,n)),e}function R6(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tLe(e,{top:t,left:n,bottom:r,right:i}){return{x:R6(e.x,n,i),y:R6(e.y,t,r)}}function D6(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nLe(e,t){return{x:D6(e.x,t.x),y:D6(e.y,t.y)}}function rLe(e,t){let n=.5;const r=bi(e),i=bi(t);return i>r?n=cd(t.min,t.max-r,e.min):r>i&&(n=cd(e.min,e.max-i,t.min)),Ra(0,1,n)}function iLe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const mA=.35;function sLe(e=mA){return e===!1?e=0:e===!0&&(e=mA),{x:I6(e,"left","right"),y:I6(e,"top","bottom")}}function I6(e,t,n){return{min:L6(e,t),max:L6(e,n)}}function L6(e,t){return typeof e=="number"?e:e[t]||0}const $6=()=>({translate:0,scale:1,origin:0,originPoint:0}),ou=()=>({x:$6(),y:$6()}),F6=()=>({min:0,max:0}),wn=()=>({x:F6(),y:F6()});function Ti(e){return[e("x"),e("y")]}function HG({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aLe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oLe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function NN(e){return e===void 0||e===1}function gA({scale:e,scaleX:t,scaleY:n}){return!NN(e)||!NN(t)||!NN(n)}function bl(e){return gA(e)||KG(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KG(e){return B6(e.x)||B6(e.y)}function B6(e){return e&&e!=="0%"}function tx(e,t,n){const r=e-n,i=t*r;return n+i}function q6(e,t,n,r,i){return i!==void 0&&(e=tx(e,i,r)),tx(e,n,r)+t}function yA(e,t=0,n=1,r,i){e.min=q6(e.min,t,n,r,i),e.max=q6(e.max,t,n,r,i)}function GG(e,{x:t,y:n}){yA(e.x,t.translate,t.scale,t.originPoint),yA(e.y,n.translate,n.scale,n.originPoint)}const z6=.999999999999,U6=1.0000000000001;function lLe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let l=0;l<i;l++){s=n[l],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&cu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,GG(e,a)),r&&bl(s.latestValues)&&cu(e,s.latestValues))}t.x<U6&&t.x>z6&&(t.x=1),t.y<U6&&t.y>z6&&(t.y=1)}function lu(e,t){e.min=e.min+t,e.max=e.max+t}function V6(e,t,n,r,i=.5){const s=fn(e.min,e.max,i);yA(e,t,n,s,r)}function cu(e,t){V6(e.x,t.x,t.scaleX,t.scale,t.originX),V6(e.y,t.y,t.scaleY,t.scale,t.originY)}function YG(e,t){return HG(oLe(e.getBoundingClientRect(),t))}function cLe(e,t,n){const r=YG(e,n),{scroll:i}=t;return i&&(lu(r.x,i.offset.x),lu(r.y,i.offset.y)),r}const XG=({current:e})=>e?e.ownerDocument.defaultView:null,uLe=new WeakMap;class dLe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(dm(h).point)},s=(h,f)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nDe(m),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ti(b=>{let j=this.getAxisMotionValue(b).get()||0;if($s.test(j)){const{projection:w}=this.visualElement;if(w&&w.layout){const N=w.layout.layoutBox[b];N&&(j=bi(N)*(parseFloat(j)/100))}}this.originPoint[b]=j}),x&&an.postRender(()=>x(h,f)),oA(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,f)=>{const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=f;if(g&&this.currentDirection===null){this.currentDirection=fLe(b),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),v&&v(h,f)},l=(h,f)=>this.stop(h,f),c=()=>Ti(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new zG(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:XG(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&an.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ay(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=eLe(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&su(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=tLe(i.layoutBox,n):this.constraints=!1,this.elastic=sLe(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ti(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=iLe(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!su(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=cLe(r,i.root,this.visualElement.getTransformPagePoint());let a=nLe(i.layout.layoutBox,s);if(n){const l=n(aLe(a));this.hasMutatedConstraints=!!l,l&&(a=HG(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=Ti(h=>{if(!ay(h,n,this.currentDirection))return;let f=c&&c[h]||{};a&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,x={type:"inertia",velocity:r?t[h]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(h,x)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return oA(this.visualElement,t),r.start(vE(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ti(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ti(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ti(n=>{const{drag:r}=this.getProps();if(!ay(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:l}=i.layout.layoutBox[n];s.set(t[n]-fn(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!su(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ti(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();i[a]=rLe({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ti(a=>{if(!ay(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];l.set(fn(c,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;uLe.set(this.visualElement,this);const t=this.visualElement.current,n=mh(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();su(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),an.read(r);const a=mp(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ti(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=mA,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function ay(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function fLe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hLe extends Xo{constructor(t){super(t),this.removeGroupControls=yi,this.removeListeners=yi,this.controls=new dLe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yi}unmount(){this.removeGroupControls(),this.removeListeners()}}const W6=e=>(t,n)=>{e&&an.postRender(()=>e(t,n))};class pLe extends Xo{constructor(){super(...arguments),this.removePointerDownListener=yi}onPointerDown(t){this.session=new zG(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:XG(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:W6(t),onStart:W6(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&an.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=mh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function mLe(){const e=_.useContext(N0);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=_.useId();_.useEffect(()=>r(i),[]);const s=_.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const ky={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function H6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(et.test(e))e=parseFloat(e);else return e;const n=H6(e,t.target.x),r=H6(e,t.target.y);return`${n}% ${r}%`}},gLe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Bo.parse(e);if(i.length>5)return r;const s=Bo.createTransformer(e),a=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=l,i[1+a]/=c;const d=fn(l,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),s(i)}};class yLe extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;xRe(vLe),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ky.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,a=r.projection;return a&&(a.isPresent=s,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||an.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),K2.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function QG(e){const[t,n]=mLe(),r=_.useContext(q2);return o.jsx(yLe,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(zK),isPresent:t,safeToRemove:n})}const vLe={borderRadius:{...Vf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vf,borderTopRightRadius:Vf,borderBottomLeftRadius:Vf,borderBottomRightRadius:Vf,boxShadow:gLe};function xLe(e,t,n){const r=br(e)?e:hp(e);return r.start(vE("",r,t,n)),r.animation}function bLe(e){return e instanceof SVGElement&&e.tagName!=="svg"}const wLe=(e,t)=>e.depth-t.depth;class jLe{constructor(){this.children=[],this.isDirty=!1}add(t){oE(this.children,t),this.isDirty=!0}remove(t){lE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(wLe),this.isDirty=!1,this.children.forEach(t)}}function SLe(e,t){const n=Fs.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Fo(r),e(s-t))};return an.read(r,!0),()=>Fo(r)}const JG=["TopLeft","TopRight","BottomLeft","BottomRight"],_Le=JG.length,K6=e=>typeof e=="string"?parseFloat(e):e,G6=e=>typeof e=="number"||et.test(e);function NLe(e,t,n,r,i,s){i?(e.opacity=fn(0,n.opacity!==void 0?n.opacity:1,CLe(r)),e.opacityExit=fn(t.opacity!==void 0?t.opacity:1,0,PLe(r))):s&&(e.opacity=fn(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<_Le;a++){const l=`border${JG[a]}Radius`;let c=Y6(t,l),d=Y6(n,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||G6(c)===G6(d)?(e[l]=Math.max(fn(K6(c),K6(d),r),0),($s.test(d)||$s.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=fn(t.rotate||0,n.rotate||0,r))}function Y6(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const CLe=ZG(0,.5,yG),PLe=ZG(.5,.95,yi);function ZG(e,t,n){return r=>r<e?0:r>t?1:n(cd(e,t,r))}function X6(e,t){e.min=t.min,e.max=t.max}function Ei(e,t){X6(e.x,t.x),X6(e.y,t.y)}function Q6(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function J6(e,t,n,r,i){return e-=t,e=tx(e,1/n,r),i!==void 0&&(e=tx(e,1/i,r)),e}function ALe(e,t=0,n=1,r=.5,i,s=e,a=e){if($s.test(t)&&(t=parseFloat(t),t=fn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=fn(s.min,s.max,r);e===s&&(l-=t),e.min=J6(e.min,t,n,l,i),e.max=J6(e.max,t,n,l,i)}function Z6(e,t,[n,r,i],s,a){ALe(e,t[n],t[r],t[i],t.scale,s,a)}const kLe=["x","scaleX","originX"],ELe=["y","scaleY","originY"];function eB(e,t,n,r){Z6(e.x,t,kLe,n?n.x:void 0,r?r.x:void 0),Z6(e.y,t,ELe,n?n.y:void 0,r?r.y:void 0)}function tB(e){return e.translate===0&&e.scale===1}function eY(e){return tB(e.x)&&tB(e.y)}function nB(e,t){return e.min===t.min&&e.max===t.max}function TLe(e,t){return nB(e.x,t.x)&&nB(e.y,t.y)}function rB(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tY(e,t){return rB(e.x,t.x)&&rB(e.y,t.y)}function iB(e){return bi(e.x)/bi(e.y)}function sB(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class OLe{constructor(){this.members=[]}add(t){oE(this.members,t),t.scheduleRender()}remove(t){if(lE(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function MLe(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:f,rotateY:m,skewX:g,skewY:x}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),x&&(r+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const wl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},th=typeof window<"u"&&window.MotionDebug!==void 0,CN=["","X","Y","Z"],RLe={visibility:"hidden"},aB=1e3;let DLe=0;function PN(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function nY(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uG(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",an,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&nY(r)}function rY({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},l=t==null?void 0:t()){this.id=DLe++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,th&&(wl.totalNodes=wl.resolvedTargetDeltas=wl.recalculatedProjection=0),this.nodes.forEach($Le),this.nodes.forEach(ULe),this.nodes.forEach(VLe),this.nodes.forEach(FLe),th&&window.MotionDebug.record(wl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jLe)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new cE),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bLe(a),this.instance=a;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(d||c)&&(this.isLayoutDirty=!0),e){let f;const m=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=SLe(m,250),ky.hasAnimatedSinceResize&&(ky.hasAnimatedSinceResize=!1,this.nodes.forEach(lB))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:m,hasRelativeTargetChanged:g,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||YLe,{onLayoutAnimationStart:b,onLayoutAnimationComplete:j}=h.getProps(),w=!this.targetLayout||!tY(this.targetLayout,x)||g,N=!m&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||N||m&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,N);const k={...rE(v,"layout"),onPlay:b,onComplete:j};(h.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else m||lB(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(WLe),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nY(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oB);return}this.isUpdating||this.nodes.forEach(qLe),this.isUpdating=!1,this.nodes.forEach(zLe),this.nodes.forEach(ILe),this.nodes.forEach(LLe),this.clearAllSnapshots();const l=Fs.now();lr.delta=Ra(0,1e3/60,l-lr.timestamp),lr.timestamp=l,lr.isProcessing=!0,yN.update.process(lr),yN.preRender.process(lr),yN.render.process(lr),lr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,K2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BLe),this.sharedNodes.forEach(HLe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,an.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){an.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=wn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!eY(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(l||bl(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),XLe(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return wn();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(QLe))){const{scroll:h}=this.root;h&&(lu(c.x,h.offset.x),lu(c.y,h.offset.y))}return c}removeElementScroll(a){var l;const c=wn();if(Ei(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:f,options:m}=h;h!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Ei(c,a),lu(c.x,f.offset.x),lu(c.y,f.offset.y))}return c}applyTransform(a,l=!1){const c=wn();Ei(c,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&cu(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),bl(h.latestValues)&&cu(c,h.latestValues)}return bl(this.latestValues)&&cu(c,this.latestValues),c}removeTransform(a){const l=wn();Ei(l,a);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!bl(d.latestValues))continue;gA(d.latestValues)&&d.updateSnapshot();const h=wn(),f=d.measurePageBox();Ei(h,f),eB(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return bl(this.latestValues)&&eB(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:m}=this.options;if(!(!this.layout||!(f||m))){if(this.resolvedRelativeTargetAt=lr.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wn(),this.relativeTargetOrigin=wn(),yh(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ei(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wn(),this.targetWithTransforms=wn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ZIe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ei(this.target,this.layout.layoutBox),GG(this.target,this.targetDelta)):Ei(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wn(),this.relativeTargetOrigin=wn(),yh(this.relativeTargetOrigin,this.target,g.target),Ei(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}th&&wl.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||gA(this.parent.latestValues)||KG(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===lr.timestamp&&(d=!1),d)return;const{layout:h,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||f))return;Ei(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;lLe(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=wn());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q6(this.prevProjectionDelta.x,this.projectionDelta.x),Q6(this.prevProjectionDelta.y,this.projectionDelta.y)),gh(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==g||!sB(this.projectionDelta.x,this.prevProjectionDelta.x)||!sB(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),th&&wl.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ou(),this.projectionDelta=ou(),this.projectionDeltaWithTransform=ou()}setAnimationOrigin(a,l=!1){const c=this.snapshot,d=c?c.latestValues:{},h={...this.latestValues},f=ou();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=wn(),g=c?c.source:void 0,x=this.layout?this.layout.source:void 0,v=g!==x,b=this.getStack(),j=!b||b.members.length<=1,w=!!(v&&!j&&this.options.crossfade===!0&&!this.path.some(GLe));this.animationProgress=0;let N;this.mixTargetDelta=k=>{const C=k/1e3;cB(f.x,a.x,C),cB(f.y,a.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yh(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),KLe(this.relativeTarget,this.relativeTargetOrigin,m,C),N&&TLe(this.relativeTarget,N)&&(this.isProjectionDirty=!1),N||(N=wn()),Ei(N,this.relativeTarget)),v&&(this.animationValues=h,NLe(h,d,this.latestValues,C,w,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=an.update(()=>{ky.hasAnimatedSinceResize=!0,this.currentAnimation=xLe(0,aB,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(aB),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:h}=a;if(!(!l||!c||!d)){if(this!==a&&this.layout&&d&&iY(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||wn();const f=bi(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const m=bi(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Ei(l,c),cu(l,h),gh(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new OLe),this.sharedNodes.get(a).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&PN("z",a,d,this.animationValues);for(let h=0;h<CN.length;h++)PN(`rotate${CN[h]}`,a,d,this.animationValues),PN(`skew${CN[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return RLe;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Py(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=Py(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!bl(this.latestValues)&&(v.transform=h?h({},""):"none",this.hasProjected=!1),v}const m=f.animationValues||f.latestValues;this.applyTransformsToTarget(),d.transform=MLe(this.projectionDeltaWithTransform,this.treeScale,m),h&&(d.transform=h(m,d.transform));const{x:g,y:x}=this.projectionDelta;d.transformOrigin=`${g.origin*100}% ${x.origin*100}% 0`,f.animationValues?d.opacity=f===this?(c=(l=m.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const v in Xv){if(m[v]===void 0)continue;const{correct:b,applyTo:j}=Xv[v],w=d.transform==="none"?m[v]:b(m[v],f);if(j){const N=j.length;for(let k=0;k<N;k++)d[j[k]]=w}else d[v]=w}return this.options.layoutId&&(d.pointerEvents=f===this?Py(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(oB),this.root.sharedNodes.clear()}}}function ILe(e){e.updateLayout()}function LLe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?Ti(f=>{const m=a?n.measuredBox[f]:n.layoutBox[f],g=bi(m);m.min=r[f].min,m.max=m.min+g}):iY(s,n.layoutBox,r)&&Ti(f=>{const m=a?n.measuredBox[f]:n.layoutBox[f],g=bi(r[f]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=ou();gh(l,r,n.layoutBox);const c=ou();a?gh(c,e.applyTransform(i,!0),n.measuredBox):gh(c,r,n.layoutBox);const d=!eY(l);let h=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const x=wn();yh(x,n.layoutBox,m.layoutBox);const v=wn();yh(v,r,g.layoutBox),tY(x,v)||(h=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function $Le(e){th&&wl.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function FLe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BLe(e){e.clearSnapshot()}function oB(e){e.clearMeasurements()}function qLe(e){e.isLayoutDirty=!1}function zLe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function lB(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ULe(e){e.resolveTargetDelta()}function VLe(e){e.calcProjection()}function WLe(e){e.resetSkewAndRotation()}function HLe(e){e.removeLeadSnapshot()}function cB(e,t,n){e.translate=fn(t.translate,0,n),e.scale=fn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function uB(e,t,n,r){e.min=fn(t.min,n.min,r),e.max=fn(t.max,n.max,r)}function KLe(e,t,n,r){uB(e.x,t.x,n.x,r),uB(e.y,t.y,n.y,r)}function GLe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YLe={duration:.45,ease:[.4,0,.1,1]},dB=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),fB=dB("applewebkit/")&&!dB("chrome/")?Math.round:yi;function hB(e){e.min=fB(e.min),e.max=fB(e.max)}function XLe(e){hB(e.x),hB(e.y)}function iY(e,t,n){return e==="position"||e==="preserve-aspect"&&!JIe(iB(t),iB(n),.2)}function QLe(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const JLe=rY({attachResizeListener:(e,t)=>mp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),AN={current:void 0},sY=rY({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!AN.current){const e=new JLe({});e.mount(window),e.setOptions({layoutScroll:!0}),AN.current=e}return AN.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ZLe={pan:{Feature:pLe},drag:{Feature:hLe,ProjectionNode:sY,MeasureLayout:QG}};function pB(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&an.postRender(()=>s(t,dm(t)))}class e4e extends Xo{mount(){const{current:t}=this.node;t&&(this.unmount=QRe(t,n=>(pB(this.node,n,"Start"),r=>pB(this.node,r,"End"))))}unmount(){}}class t4e extends Xo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=um(mp(this.node.current,"focus",()=>this.onFocus()),mp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mB(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&an.postRender(()=>s(t,dm(t)))}class n4e extends Xo{mount(){const{current:t}=this.node;t&&(this.unmount=tDe(t,n=>(mB(this.node,n,"Start"),(r,{success:i})=>mB(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const vA=new WeakMap,kN=new WeakMap,r4e=e=>{const t=vA.get(e.target);t&&t(e)},i4e=e=>{e.forEach(r4e)};function s4e({root:e,...t}){const n=e||document;kN.has(n)||kN.set(n,{});const r=kN.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(i4e,{root:e,...t})),r[i]}function a4e(e,t,n){const r=s4e(t);return vA.set(e,n),r.observe(e),()=>{vA.delete(e),r.unobserve(e)}}const o4e={some:0,all:1};class l4e extends Xo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:o4e[i]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),m=d?h:f;m&&m(c)};return a4e(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(c4e(t,n))&&this.startObserver()}unmount(){}}function c4e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const u4e={inView:{Feature:l4e},tap:{Feature:n4e},focus:{Feature:t4e},hover:{Feature:e4e}},d4e={layout:{ProjectionNode:sY,MeasureLayout:QG}},xA={current:null},aY={current:!1};function f4e(){if(aY.current=!0,!!U2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xA.current=e.matches;e.addListener(t),t()}else xA.current=!1}function h4e(e,t,n){for(const r in t){const i=t[r],s=n[r];if(br(i))e.addValue(r,i);else if(br(s))e.addValue(r,hp(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,hp(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const gB=new WeakMap,p4e=[...SG,gr,Bo],m4e=e=>p4e.find(jG(e)),yB=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class g4e{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Fs.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,an.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=A0(n),this.isVariantNode=BK(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&br(g)&&g.set(c[m],!1)}}mount(t){this.current=t,gB.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),aY.current||f4e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xA.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){gB.delete(this.current),this.projection&&this.projection.unmount(),Fo(this.notifyUpdate),Fo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=yc.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&an.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ud){const n=ud[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<yB.length;r++){const i=yB[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,a=t[s];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=h4e(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=hp(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(bG(i)||xG(i))?i=parseFloat(i):!m4e(i)&&Bo.test(n)&&(i=TG(t,n)),this.setBaseTarget(t,br(i)?i.get():i)),br(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=X2(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!br(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cE),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class oY extends g4e{constructor(){super(...arguments),this.KeyframeResolver=OG}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;br(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function y4e(e){return window.getComputedStyle(e)}
893class v4e extends oY{constructor(){super(...arguments),this.type="html",this.renderInstance=VK}readValueFromInstance(t,n){if(yc.has(n)){const r=mE(n);return r&&r.default||0}else{const r=y4e(t),i=(ZK(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return YG(t,n)}build(t,n,r){eE(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Y2(t,n,r)}}class x4e extends oY{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yc.has(n)){const r=mE(n);return r&&r.default||0}return n=WK.has(n)?n:H2(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return GK(t,n,r)}build(t,n,r){tE(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){HK(t,n,r,i)}mount(t){this.isSVGTag=nE(t.tagName),super.mount(t)}}const b4e=(e,t)=>G2(e)?new x4e(t):new v4e(t,{allowProjection:e!==_.Fragment}),w4e=VRe({...UIe,...u4e,...ZLe,...d4e},b4e),j4e=aRe(w4e);function S4e(){const[e,t]=_.useState(!0);return _.useEffect(()=>{const n=setTimeout(()=>{t(!1)},4e3);return()=>clearTimeout(n)},[]),o.jsx(JMe,{children:e&&o.jsx(j4e.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"fixed inset-0 z-[9999] bg-gradient-to-br from-cyan-50 via-blue-50 to-slate-50 flex items-center justify-center",children:o.jsxs("div",{className:"text-center space-y-4",children:[o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/c70cf4774_DiveMoniesLogo29Dec.jpg",alt:"Dive Monies Logo",className:"w-40 h-40 mx-auto rounded-xl object-contain animate-pulse"}),o.jsx("h1",{className:"text-3xl font-light text-slate-800",children:"Welcome to Dive Monies"})]})})})}var T0="Popover",[lY]=ei(T0,[Ad]),fm=Ad(),[_4e,Qo]=lY(T0),cY=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,l=fm(t),c=_.useRef(null),[d,h]=_.useState(!1),[f,m]=Pa({prop:r,defaultProp:i??!1,onChange:s,caller:T0});return o.jsx(_k,{...l,children:o.jsx(_4e,{scope:t,contentId:cs(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:_.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>h(!0),[]),onCustomAnchorRemove:_.useCallback(()=>h(!1),[]),modal:a,children:n})})};cY.displayName=T0;var uY="PopoverAnchor",N4e=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Qo(uY,n),s=fm(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return _.useEffect(()=>(a(),()=>l()),[a,l]),o.jsx(Mx,{...s,...r,ref:t})});N4e.displayName=uY;var dY="PopoverTrigger",fY=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Qo(dY,n),s=fm(n),a=yt(t,i.triggerRef),l=o.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":yY(i.open),...r,ref:a,onClick:Oe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:o.jsx(Mx,{asChild:!0,...s,children:l})});fY.displayName=dY;var xE="PopoverPortal",[C4e,P4e]=lY(xE,{forceMount:void 0}),hY=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,s=Qo(xE,t);return o.jsx(C4e,{scope:t,forceMount:n,children:o.jsx(Sr,{present:n||s.open,children:o.jsx($p,{asChild:!0,container:i,children:r})})})};hY.displayName=xE;var fd="PopoverContent",pY=_.forwardRef((e,t)=>{const n=P4e(fd,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,s=Qo(fd,e.__scopePopover);return o.jsx(Sr,{present:r||s.open,children:s.modal?o.jsx(k4e,{...i,ref:t}):o.jsx(E4e,{...i,ref:t})})});pY.displayName=fd;var A4e=Ro("PopoverContent.RemoveScroll"),k4e=_.forwardRef((e,t)=>{const n=Qo(fd,e.__scopePopover),r=_.useRef(null),i=yt(t,r),s=_.useRef(!1);return _.useEffect(()=>{const a=r.current;if(a)return Cx(a)},[]),o.jsx(Fp,{as:A4e,allowPinchZoom:!0,children:o.jsx(mY,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),E4e=_.forwardRef((e,t)=>
vendor: 8,880 bytes, line 893
893{const n=Qo(fd,e.__scopePopover),r=_.useRef(!1),i=_.useRef(!1);return o.jsx(mY,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),mY=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,...f}=e,m=Qo(fd,n),g=fm(n);return _x(),o.jsx(Lp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:o.jsx(Ip,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:o.jsx(Nk,{"data-state":yY(m.open),role:"dialog",id:m.contentId,...g,...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)"}})})})}),gY="PopoverClose",T4e=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Qo(gY,n);return o.jsx(Ge.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});T4e.displayName=gY;var O4e="PopoverArrow",M4e=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=fm(n);return o.jsx(Ck,{...i,...r,ref:t})});M4e.displayName=O4e;function yY(e){return e?"open":"closed"}var R4e=cY,D4e=fY,I4e=hY,vY=pY;const L4e=R4e,$4e=D4e,xY=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>o.jsx(I4e,{children:o.jsx(vY,{ref:i,align:t,sideOffset:n,className:Te("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));xY.displayName=vY.displayName;function F4e(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var bE="ScrollArea",[bY]=ei(bE),[B4e,Hi]=bY(bE),wY=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...a}=e,[l,c]=_.useState(null),[d,h]=_.useState(null),[f,m]=_.useState(null),[g,x]=_.useState(null),[v,b]=_.useState(null),[j,w]=_.useState(0),[N,k]=_.useState(0),[C,A]=_.useState(!1),[E,P]=_.useState(!1),D=yt(t,O=>c(O)),B=Mp(i);return o.jsx(B4e,{scope:n,type:r,dir:B,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:h,content:f,onContentChange:m,scrollbarX:g,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:A,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:P,onCornerWidthChange:w,onCornerHeightChange:k,children:o.jsx(Ge.div,{dir:B,...a,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":N+"px",...e.style}})})});wY.displayName=bE;var jY="ScrollAreaViewport",SY=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=e,a=Hi(jY,n),l=_.useRef(null),c=yt(t,l,a.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),o.jsx(Ge.div,{"data-radix-scroll-area-viewport":"",...s,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:o.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});SY.displayName=jY;var Gs="ScrollAreaScrollbar",wE=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Hi(Gs,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,l=e.orientation==="horizontal";return _.useEffect(()=>(l?s(!0):a(!0),()=>{l?s(!1):a(!1)}),[l,s,a]),i.type==="hover"?o.jsx(q4e,{...r,ref:t,forceMount:n}):i.type==="scroll"?o.jsx(z4e,{...r,ref:t,forceMount:n}):i.type==="auto"?o.jsx(_Y,{...r,ref:t,forceMount:n}):i.type==="always"?o.jsx(jE,{...r,ref:t}):null});wE.displayName=Gs;var q4e=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Hi(Gs,e.__scopeScrollArea),[s,a]=_.useState(!1);return _.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),a(!0)},h=()=>{c=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",h),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",h)}}},[i.scrollArea,i.scrollHideDelay]),o.jsx(Sr,{present:n||s,children:o.jsx(_Y,{"data-state":s?"visible":"hidden",...r,ref:t})})}),z4e=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Hi(Gs,e.__scopeScrollArea),s=e.orientation==="horizontal",a=M0(()=>c("SCROLL_END"),100),[l,c]=F4e("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 _.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,i.scrollHideDelay,c]),_.useEffect(()=>{const d=i.viewport,h=s?"scrollLeft":"scrollTop";if(d){let f=d[h];const m=()=>{const g=d[h];f!==g&&(c("SCROLL"),a()),f=g};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[i.viewport,s,c,a]),o.jsx(Sr,{present:n||l!=="hidden",children:o.jsx(jE,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Oe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Oe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),_Y=_.forwardRef((e,t)=>{const n=Hi(Gs,e.__scopeScrollArea),{forceMount:r,...i}=e,[s,a]=_.useState(!1),l=e.orientation==="horizontal",c=M0(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;a(l?d:h)}},10);return hd(n.viewport,c),hd(n.content,c),o.jsx(Sr,{present:r||s,children:o.jsx(jE,{"data-state":s?"visible":"hidden",...i,ref:t})})}),jE=_.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=Hi(Gs,e.__scopeScrollArea),s=_.useRef(null),a=_.useRef(0),[l,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=kY(l.viewport,l.content),h={...r,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:m=>a.current=m};function f(m,g){return G4e(m,a.current,l,g)}return n==="horizontal"?o.jsx(U4e,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollLeft,g=vB(m,l,i.dir);s.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,i.dir))}}):n==="vertical"?o.jsx(V4e,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const m=i.viewport.scrollTop,g=vB(m,l);s.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null}),U4e=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=Hi(Gs,e.__scopeScrollArea),[a,l]=_.useState(),c=_.useRef(null),d=yt(t,c,s.onScrollbarXChange);return _.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),o.jsx(CY,{"data-orientation":"horizontal",...i,ref:d,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":O0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,f)=>{if(s.viewport){const m=s.viewport.scrollLeft+h.deltaX;e.onWheelScroll(m),TY(m,f)&&h.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:rx(a.paddingLeft),paddingEnd:rx(a.paddingRight)}})}})}),V4e=_.forwardRef((e,t)=>
vendor: 5,831 bytes, line 893
893{const{sizes:n,onSizesChange:r,...i}=e,s=Hi(Gs,e.__scopeScrollArea),[a,l]=_.useState(),c=_.useRef(null),d=yt(t,c,s.onScrollbarYChange);return _.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),o.jsx(CY,{"data-orientation":"vertical",...i,ref:d,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":O0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,f)=>{if(s.viewport){const m=s.viewport.scrollTop+h.deltaY;e.onWheelScroll(m),TY(m,f)&&h.preventDefault()}},onResize:()=>{c.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:rx(a.paddingTop),paddingEnd:rx(a.paddingBottom)}})}})}),[W4e,NY]=bY(Gs),CY=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:h,onResize:f,...m}=e,g=Hi(Gs,n),[x,v]=_.useState(null),b=yt(t,D=>v(D)),j=_.useRef(null),w=_.useRef(""),N=g.viewport,k=r.content-r.viewport,C=er(h),A=er(c),E=M0(f,10);function P(D){if(j.current){const B=D.clientX-j.current.left,O=D.clientY-j.current.top;d({x:B,y:O})}}return _.useEffect(()=>{const D=B=>{const O=B.target;(x==null?void 0:x.contains(O))&&C(B,k)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[N,x,k,C]),_.useEffect(A,[r,A]),hd(x,E),hd(g.content,E),o.jsx(W4e,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:er(s),onThumbPointerUp:er(a),onThumbPositionChange:A,onThumbPointerDown:er(l),children:o.jsx(Ge.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:Oe(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),j.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),P(D))}),onPointerMove:Oe(e.onPointerMove,P),onPointerUp:Oe(e.onPointerUp,D=>{const B=D.target;B.hasPointerCapture(D.pointerId)&&B.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=w.current,g.viewport&&(g.viewport.style.scrollBehavior=""),j.current=null})})})}),nx="ScrollAreaThumb",PY=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=NY(nx,e.__scopeScrollArea);return o.jsx(Sr,{present:n||i.hasThumb,children:o.jsx(H4e,{ref:t,...r})})}),H4e=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,s=Hi(nx,n),a=NY(nx,n),{onThumbPositionChange:l}=a,c=yt(t,f=>a.onThumbChange(f)),d=_.useRef(void 0),h=M0(()=>{d.current&&(d.current(),d.current=void 0)},100);return _.useEffect(()=>{const f=s.viewport;if(f){const m=()=>{if(h(),!d.current){const g=Y4e(f,l);d.current=g,l()}};return l(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[s.viewport,h,l]),o.jsx(Ge.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Oe(e.onPointerDownCapture,f=>{const g=f.target.getBoundingClientRect(),x=f.clientX-g.left,v=f.clientY-g.top;a.onThumbPointerDown({x,y:v})}),onPointerUp:Oe(e.onPointerUp,a.onThumbPointerUp)})});PY.displayName=nx;var SE="ScrollAreaCorner",AY=_.forwardRef((e,t)=>{const n=Hi(SE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?o.jsx(K4e,{...e,ref:t}):null});AY.displayName=SE;var K4e=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=Hi(SE,n),[s,a]=_.useState(0),[l,c]=_.useState(0),d=!!(s&&l);return hd(i.scrollbarX,()=>{var f;const h=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(h),c(h)}),hd(i.scrollbarY,()=>{var f;const h=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(h),a(h)}),d?o.jsx(Ge.div,{...r,ref:t,style:{width:s,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function rx(e){return e?parseInt(e,10):0}function kY(e,t){const n=e/t;return isNaN(n)?0:n}function O0(e){const t=kY(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function G4e(e,t,n,r="ltr"){const i=O0(n),s=i/2,a=t||s,l=i-a,c=n.scrollbar.paddingStart+a,d=n.scrollbar.size-n.scrollbar.paddingEnd-l,h=n.content-n.viewport,f=r==="ltr"?[0,h]:[h*-1,0];return EY([c,d],f)(e)}function vB(e,t,n="ltr"){const r=O0(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,a=t.content-t.viewport,l=s-r,c=n==="ltr"?[0,a]:[a*-1,0],d=_C(e,c);return EY([0,a],[0,l])(d)}function EY(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function TY(e,t){return e>0&&e<t}var Y4e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&t(),n=s,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function M0(e,t){const n=er(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function hd(e,t){const n=er(t);Mn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var OY=wY,X4e=SY,Q4e=AY;const MY=_.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(OY,{ref:r,className:Te("relative overflow-hidden",e),...n,children:[o.jsx(X4e,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(RY,{}),o.jsx(Q4e,{})]}));
893MY.displayName=OY.displayName;const RY=_.forwardRef(({className:e,orientation:t="vertical",...n},r)=>o.jsx(wE,{ref:r,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:o.jsx(PY,{className:"relative flex-1 rounded-full bg-border"})}));RY.displayName=wE.displayName;const J4e={task_reminder:IJ,booking_assigned:XB,leave_request_update:vi,course_reminder:Jr,booking_confirmation:SJ,payment_reminder:Mo,weekly_summary:vi};function Z4e({notifications:e,onMarkAsRead:t,onMarkAllAsRead:n,onClose:r}){const i=Iq(),s=l=>{l.is_read||t(l.id),l.link&&(i(kn(l.link.replace("/",""))),r())},a=e.filter(l=>!l.is_read).length;return o.jsxs("div",{className:"flex flex-col max-h-[500px]",children:[o.jsxs("div",{className:"p-4 border-b flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(cy,{className:"w-4 h-4 text-slate-500"}),o.jsx("h3",{className:"font-semibold text-slate-800",children:"Notifications"}),a>0&&o.jsxs("span",{className:"text-xs text-slate-500",children:["(",a," unread)"]})]}),a>0&&o.jsx(re,{variant:"ghost",size:"sm",onClick:n,className:"text-xs",children:"Mark all read"})]}),o.jsx(MY,{className:"flex-1",children:e.length===0?o.jsxs("div",{className:"p-8 text-center text-slate-400",children:[o.jsx(cy,{className:"w-12 h-12 mx-auto mb-2 opacity-20"}),o.jsx("p",{className:"text-sm",children:"No notifications yet"})]}):o.jsx("div",{className:"divide-y",children:e.map(l=>{const c=J4e[l.type]||cy;return o.jsx("div",{onClick:()=>s(l),className:`p-4 hover:bg-slate-50 transition-colors cursor-pointer ${l.is_read?"":"bg-cyan-50/50"}`,children:o.jsxs("div",{className:"flex gap-3",children:[o.jsx("div",{className:`mt-1 ${l.is_read?"text-slate-400":"text-cyan-600"}`,children:o.jsx(c,{className:"w-5 h-5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[o.jsx("p",{className:`text-sm font-medium ${l.is_read?"text-slate-600":"text-slate-900"}`,children:l.title}),!l.is_read&&o.jsx("div",{className:"w-2 h-2 rounded-full bg-cyan-500 flex-shrink-0 mt-1"})]}),o.jsx("p",{className:"text-xs text-slate-500 whitespace-pre-wrap",children:l.message}),o.jsx("p",{className:"text-xs text-slate-400 mt-1",children:zme(new Date(l.created_date),{addSuffix:!0})})]})]})},l.id)})})})]})}function xB(){const[e,t]=_.useState(!1),n=hn(),{data:r}=Ee({queryKey:["currentUser"],queryFn:()=>ne.auth.me()}),{data:i=[]}=Ee({queryKey:["notifications",r==null?void 0:r.id],queryFn:()=>ne.entities.Notification.filter({user_id:r.id},"-created_date",50),enabled:!!(r!=null&&r.id),refetchInterval:3e4}),s=i.filter(c=>!c.is_read).length,a=Ye({mutationFn:c=>ne.entities.Notification.update(c,{is_read:!0}),onSuccess:()=>{n.invalidateQueries({queryKey:["notifications"]})}}),l=Ye({mutationFn:async()=>{const c=i.filter(d=>!d.is_read);await Promise.all(c.map(d=>ne.entities.Notification.update(d.id,{is_read:!0})))},onSuccess:()=>{n.invalidateQueries({queryKey:["notifications"]})}});return o.jsxs(L4e,{open:e,onOpenChange:t,children:[o.jsx($4e,{asChild:!0,children:o.jsxs(re,{variant:"ghost",size:"icon",className:"relative",children:[o.jsx(cy,{className:"w-5 h-5"}),s>0&&o.jsx(st,{className:"absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center p-0 bg-red-500",children:s>9?"9+":s})]})}),o.jsx(xY,{className:"w-96 p-0",align:"end",children:o.jsx(Z4e,{notifications:i,onMarkAsRead:c=>a.mutate(c),onMarkAllAsRead:()=>l.mutate(),onClose:()=>t(!1)})})]})}const e$e=[{name:"Dashboard",icon:oZ,path:"Dashboard",permission:null},{name:"Calendar",icon:ax,path:"Calendar",permission:null},{name:"Assets & Logistics",icon:$i,path:"AssetsLogistics",permission:null},{name:"Products",icon:$i,path:"Products",permission:null},{name:"Sales",icon:XB,path:"Sales",permission:"canManageSales"},{name:"Invoices",icon:Ey,path:"Invoices",permission:"canManageInvoices"},{name:"Customers",icon:Jr,path:"Customers",permission:null},{name:"Vendors",icon:Jr,path:"Vendors",permission:"canViewVendors"},{name:"Payments",icon:Ey,path:"Payments",permission:"canRecordPayments"},{name:"Reports",icon:wJ,path:"Reports",permission:"canViewReports"},{name:"AI Reports",icon:NA,path:"AIReports",permission:"canViewReports"},{name:"Staff Mgmt",icon:uu,path:"StaffManagement",permission:"isAdmin"},{name:"Settings",icon:uu,path:"Settings",permission:"isAdmin"}];function t$e({children:e,currentPageName:t}){const[n,r]=_.useState(!1),{permissions:i,isLoading:s}=Vo();return t==="CustomerRegistration"||t==="SharedMedia"||t==="StaffLogin"?o.jsx(o.Fragment,{children:e}):t!=="CustomerRegistration"&&t!=="SharedMedia"?o.jsxs(o.Fragment,{children:[o.jsx(S4e,{}),o.jsx(n$e,{permissions:i,isLoading:s,currentPageName:t,mobileMenuOpen:n,setMobileMenuOpen:r,children:e})]}):o.jsx(o.Fragment,{children:e})}function n$e({children:e,currentPageName:t,permissions:n,isLoading:r,mobileMenuOpen:i,setMobileMenuOpen:s}){if(r)return o.jsx("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center",children:o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-cyan-600"})});const a=e$e.filter(l=>l.permission?n[l.permission]:!0);return o.jsxs("div",{className:"min-h-screen bg-slate-50",children:[o.jsx("aside",{className:"hidden lg:fixed lg:inset-y-0 lg:left-0 lg:flex lg:w-64 lg:flex-col",children:o.jsxs("div",{className:"flex flex-col flex-grow bg-white border-r border-slate-200",children:[o.jsxs("div",{className:"flex flex-col items-center px-6 py-4 border-b border-slate-100",children:[o.jsx("div",{className:"w-full flex justify-center",children:o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/c70cf4774_DiveMoniesLogo29Dec.jpg",alt:"Dive Monies Logo",className:"max-w-[180px] w-auto h-auto rounded-xl"})}),o.jsxs("div",{className:"text-center mt-2",children:[o.jsx("h1",{className:"text-lg font-semibold text-slate-800",children:"Dive Monies"}),o.jsx("p",{className:"text-xs text-slate-400",children:"Operations & Accounting"})]})]}),o.jsx("nav",{className:"flex-1 px-4 py-6 space-y-1",children:a.map(l
893=>{const c=t===l.path;return o.jsxs(du,{to:kn(l.path),className:Te("flex items-center gap-3 px-4 py-3 rounded-xl transition-all duration-200",c?"bg-gradient-to-r from-cyan-50 to-blue-50 text-cyan-700":"text-slate-600 hover:bg-slate-50"),children:[o.jsx(l.icon,{className:Te("w-5 h-5",c?"text-cyan-600":"text-slate-400")}),o.jsx("span",{className:Te("font-medium",c?"text-cyan-700":"text-slate-600"),children:l.name}),c&&o.jsx("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-cyan-500"})]},l.name)})}),o.jsx("div",{className:"px-6 py-2 border-t border-slate-100",children:o.jsx("div",{className:"flex justify-center",children:o.jsx(xB,{})})}),o.jsx("div",{className:"px-6 py-4 border-t border-slate-100",children:o.jsx("p",{className:"text-xs text-slate-400 text-center",children:"© 2025 Dive Monies"})})]})}),o.jsxs("div",{className:"lg:hidden fixed top-0 left-0 right-0 z-50 bg-white border-b border-slate-200",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/69267dfe0b5f409d5189775b/c70cf4774_DiveMoniesLogo29Dec.jpg",alt:"Dive Monies Logo",className:"w-12 h-12 rounded-lg object-contain"}),o.jsx("span",{className:"font-semibold text-slate-800",children:"Dive Monies"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(xB,{}),o.jsx(re,{variant:"ghost",size:"icon",onClick:()=>s(!i),children:i?o.jsx(xi,{className:"w-5 h-5"}):o.jsx(_Z,{className:"w-5 h-5"})})]})]}),i&&o.jsx("div",{className:"absolute top-full left-0 right-0 bg-white border-b border-slate-200 shadow-lg",children:o.jsx("nav",{className:"p-4 space-y-1",children:a.map(l=>{const c=t===l.path;return o.jsxs(du,{to:kn(l.path),onClick:()=>s(!1),className:Te("flex items-center gap-3 px-4 py-3 rounded-xl",c?"bg-gradient-to-r from-cyan-50 to-blue-50 text-cyan-700":"text-slate-600"),children:[o.jsx(l.icon,{className:Te("w-5 h-5",c?"text-cyan-600":"text-slate-400")}),o.jsx("span",{className:"font-medium",children:l.name})]},l.name)})})})]}),o.jsx("main",{className:"lg:pl-64 pt-16 lg:pt-0",children:e})]})}const r$e={AIReports:Cue,AssetsLogistics:Cpe,Calendar:Yge,CustomerRegistration:Jge,Customers:mve,Dashboard:eMe,Invoices:aMe,Payments:fMe,Products:jMe,Reports:_Me,Sales:kMe,Settings:OMe,SharedCalendar:MMe,SharedMedia:RMe,Staff:BMe,StaffLogin:qMe,StaffManagement:UMe,Vendors:KMe},DY={mainPage:"Dashboard",Pages:r$e,Layout:t$e};function i$e(){const e=xd(),{isAuthenticated:t}=Cz(),{Pages:n,mainPage:r}=DY,i=r;return _.useEffect(()=>{var s;(s=window.parent)==null||s.postMessage({type:"app_changed_url",url:window.location.href},"*")},[e]),_.useEffect(()=>{const s=e.pathname;let a;if(s==="/"||s==="")a=i;else{const l=s.replace(/^\//,"").split("/")[0];a=Object.keys(n).find(h=>h.toLowerCase()===l.toLowerCase())||null}t&&a&&ne.appLogs.logUserInApp(a).catch(()=>{})},[e,t,n,i]),null}function s$e({}){var i;const t=xd().pathname.substring(1),{data:n,isFetched:r}=Ee({queryKey:["user"],queryFn:async()=>{try{return{user:await ne.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return o.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:o.jsx("div",{className:"max-w-md w-full",children:o.jsxs("div",{className:"text-center space-y-6",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),o.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),o.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",o.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&o.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:o.jsxs("div",{className:"flex items-start space-x-3",children:[o.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:o.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),o.jsxs("div",{className:"text-left space-y-1",children:[o.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),o.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),o.jsx("div",{className:"pt-6",children:o.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[o.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const a$e=()=>o.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:o.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:o.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),o.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),o.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),o.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[o.jsx("p",{children:"If you believe this is an error, you can:"}),o.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[o.jsx("li",{children:"Verify you are logged in with the correct account"}),o.jsx("li",{children:"Contact the app administrator for access"}),o.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),{Pages:IY,Layout:bB,mainPage:o$e}=DY,LY=o$e,l$e=IY[LY],wB=({children:e,currentPageName:t})=>bB?o.jsx(bB,{currentPageName:t,children:e}):o.jsx(o.Fragment,{children:e}),c$e=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,isAuthenticated:r,navigateToLogin:i}=Cz();if(t||e)return o.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:o.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return o.jsx(a$e,{});if(n.type==="auth_required")return i(),null}return o.jsxs(Tne,{children:[o.jsx(fy,{path:"/",element:o.jsx(wB,{currentPageName:LY,children:o.jsx(l$e,{})})}),Object.entries(IY).map(([s,a])=>o.jsx(fy,{path:`/${s}`,element:o.jsx(wB,{currentPageName:s,children:o.jsx(a,{})})},s)),o.jsx(fy,{path:"*",element:o.jsx(s$e,{})})]})};function u$e(){return o.jsx(Yse,{children:o.jsxs(Cte,{client:$te,children:[o.jsxs($ne,{children:[o.jsx(i$e,{}),o.jsx(c$e,{})]}),o.jsx(nte,{}),o.jsx(Fte,{})]})})}qQ.createRoot(document.getElementById("root")).render(o.jsx(u$e,{}));

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.