var sC=Object.freeze,lC=Object.defineProperty,QK=Object.defineProperties;var ZK=Object.getOwnPropertyDescriptors;var jp=Object.getOwnPropertySymbols,eH=Object.getPrototypeOf,cC=Object.prototype.hasOwnProperty,uC=Object.prototype.propertyIsEnumerable,tH=Reflect.get;var dC=e=>{throw TypeError(e)},qa=Math.pow,ab=(e,t,r)=>t in e?lC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))cC.call(t,r)&&ab(e,r,t[r]);if(jp)for(var r of jp(t))uC.call(t,r)&&ab(e,r,t[r]);return e},I=(e,t)=>QK(e,ZK(t));var Z=(e,t)=>{var r={};for(var n in e)cC.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jp)for(var n of jp(e))t.indexOf(n)<0&&uC.call(e,n)&&(r[n]=e[n]);return r};var rH=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var oa=(e,t,r)=>ab(e,typeof t!="symbol"?t+"":t,r),ob=(e,t,r)=>t.has(e)||dC("Cannot "+r);var V=(e,t,r)=>(ob(e,t,"read from private field"),r?r.call(e):t.get(e)),Te=(e,t,r)=>t.has(e)?dC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ve=(e,t,r,n)=>(ob(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),He=(e,t,r)=>(ob(e,t,"access private method"),r);var Sp=(e,t,r,n)=>({set _(i){ve(e,t,i,r)},get _(){return V(e,t,n)}}),Kr=(e,t,r)=>tH(eH(e),r,t);var Rr=(e,t)=>sC(lC(e,"raw",{value:sC(t||e.slice())})),T=(e,t,r)=>new Promise((n,i)=>{var a=c=>{try{s(r.next(c))}catch(u){i(u)}},o=c=>{try{s(r.throw(c))}catch(u){i(u)}},s=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);s((r=r.apply(e,t)).next())});var TIe=rH(Da=>{function nH(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[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"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Ul=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RD={exports:{}},mv={},$D={exports:{}},Fe={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qh=Symbol.for("react.element"),iH=Symbol.for("react.portal"),aH=Symbol.for("react.fragment"),oH=Symbol.for("react.strict_mode"),sH=Symbol.for("react.profiler"),lH=Symbol.for("react.provider"),cH=Symbol.for("react.context"),uH=Symbol.for("react.forward_ref"),dH=Symbol.for("react.suspense"),fH=Symbol.for("react.memo"),hH=Symbol.for("react.lazy"),fC=Symbol.iterator;function pH(e){return e===null||typeof e!="object"?null:(e=fC&&e[fC]||e["@@iterator"],typeof e=="function"?e:null)}var MD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DD=Object.assign,ID={};function Eu(e,t,r){this.props=e,this.context=t,this.refs=ID,this.updater=r||MD}Eu.prototype.isReactComponent={};Eu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Eu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function LD(){}LD.prototype=Eu.prototype;function pj(e,t,r){this.props=e,this.context=t,this.refs=ID,this.updater=r||MD}var mj=pj.prototype=new LD;mj.constructor=pj;DD(mj,Eu.prototype);mj.isPureReactComponent=!0;var hC=Array.isArray,zD=Object.prototype.hasOwnProperty,gj={current:null},BD={key:!0,ref:!0,__self:!0,__source:!0};function UD(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)zD.call(t,n)&&!BD.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:qh,type:e,key:a,ref:o,props:i,_owner:gj.current}}function mH(e,t){return{$$typeof:qh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yj(e){return typeof e=="object"&&e!==null&&e.$$typeof===qh}function gH(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var pC=/\/+/g;function sb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gH(""+e.key):t.toString(36)}function Mm(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case qh:case iH:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+sb(o,0):n,hC(i)?(r="",e!=null&&(r=e.replace(pC,"$&/")+"/"),Mm(i,t,r,"",function(u){return u})):i!=null&&(yj(i)&&(i=mH(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(pC,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",hC(e))for(var s=0;s<e.length;s++){a=e[s];var c=n+sb(a,s);o+=Mm(a,t,r,c,i)}else if(c=pH(e),typeof c=="function")for(e=c.call(e),s=0;!(a=e.next()).done;)a=a.value,c=n+sb(a,s++),o+=Mm(a,t,r,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ep(e,t,r){if(e==null)return e;var n=[],i=0;return Mm(e,n,"","",function(a){return t.call(r,a,i++)}),n}function yH(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ur={current:null},Dm={transition:null},vH={ReactCurrentDispatcher:Ur,ReactCurrentBatchConfig:Dm,ReactCurrentOwner:gj};function FD(){throw Error("act(...) is not supported in production builds of React.")}Fe.Children={map:Ep,forEach:function(e,t,r){Ep(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ep(e,function(){t++}),t},toArray:function(e){return Ep(e,function(t){return t})||[]},only:function(e){if(!yj(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Fe.Component=Eu;Fe.Fragment=aH;Fe.Profiler=sH;Fe.PureComponent=pj;Fe.StrictMode=oH;Fe.Suspense=dH;Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vH;Fe.act=FD;Fe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=DD({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=gj.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)zD.call(t,c)&&!BD.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:qh,type:e.type,key:i,ref:a,props:n,_owner:o}};Fe.createContext=function(e){return e={$$typeof:cH,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:lH,_context:e},e.Consumer=e};Fe.createElement=UD;Fe.createFactory=function(e){var t=UD.bind(null,e);return t.type=e,t};Fe.createRef=function(){return{current:null}};Fe.forwardRef=function(e){return{$$typeof:uH,render:e}};Fe.isValidElement=yj;Fe.lazy=function(e){return{$$typeof:hH,_payload:{_status:-1,_result:e},_init:yH}};Fe.memo=function(e,t){return{$$typeof:fH,type:e,compare:t===void 0?null:t}};Fe.startTransition=function(e){var t=Dm.transition;Dm.transition={};try{e()}finally{Dm.transition=t}};Fe.unstable_act=FD;Fe.useCallback=function(e,t){return Ur.current.useCallback(e,t)};Fe.useContext=function(e){return Ur.current.useContext(e)};Fe.useDebugValue=function(){};Fe.useDeferredValue=function(e){return Ur.current.useDeferredValue(e)};Fe.useEffect=function(e,t){return Ur.current.useEffect(e,t)};Fe.useId=function(){return Ur.current.useId()};Fe.useImperativeHandle=function(e,t,r){return Ur.current.useImperativeHandle(e,t,r)};Fe.useInsertionEffect=function(e,t){return Ur.current.useInsertionEffect(e,t)};Fe.useLayoutEffect=function(e,t){return Ur.current.useLayoutEffect(e,t)};Fe.useMemo=function(e,t){return Ur.current.useMemo(e,t)};Fe.useReducer=function(e,t,r){return Ur.current.useReducer(e,t,r)};Fe.useRef=function(e){return Ur.current.useRef(e)};Fe.useState=function(e){return Ur.current.useState(e)};Fe.useSyncExternalStore=function(e,t,r){return Ur.current.useSyncExternalStore(e,t,r)};Fe.useTransition=function(){return Ur.current.useTransition()};Fe.version="18.3.1";$D.exports=Fe;var w=$D.exports;const $=Qe(w),vj=nH({__proto__:null,default:$},[w]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xH=w,bH=Symbol.for("react.element"),wH=Symbol.for("react.fragment"),kH=Object.prototype.hasOwnProperty,_H=xH.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jH={key:!0,ref:!0,__self:!0,__source:!0};function KD(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)kH.call(t,n)&&!jH.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:bH,type:e,key:a,ref:o,props:i,_owner:_H.current}}mv.Fragment=wH;mv.jsx=KD;mv.jsxs=KD;RD.exports=mv;var l=RD.exports,HD={exports:{}},xn={},VD={exports:{}},WD={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(A,D){var B=A.length;A.push(D);e:for(;0<B;){var z=B-1>>>1,K=A[z];if(0<i(K,D))A[z]=D,A[B]=K,B=z;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var D=A[0],B=A.pop();if(B!==D){A[0]=B;e:for(var z=0,K=A.length,Y=K>>>1;z<Y;){var G=2*(z+1)-1,re=A[G],le=G+1,me=A[le];if(0>i(re,B))le<K&&0>i(me,re)?(A[z]=me,A[le]=B,z=le):(A[z]=re,A[G]=B,z=G);else if(le<K&&0>i(me,B))A[z]=me,A[le]=B,z=le;else break e}}return D}function i(A,D){var B=A.sortIndex-D.sortIndex;return B!==0?B:A.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],u=[],f=1,d=null,h=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var D=r(u);D!==null;){if(D.callback===null)n(u);else if(D.startTime<=A)n(u),D.sortIndex=D.expirationTime,t(c,D);else break;D=r(u)}}function j(A){if(g=!1,y(A),!m)if(r(c)!==null)m=!0,O(k);else{var D=r(u);D!==null&&P(j,D.startTime-A)}}function k(A,D){m=!1,g&&(g=!1,x(E),E=-1),p=!0;var B=h;try{for(y(D),d=r(c);d!==null&&(!(d.expirationTime>D)||A&&!M());){var z=d.callback;if(typeof z=="function"){d.callback=null,h=d.priorityLevel;var K=z(d.expirationTime<=D);D=e.unstable_now(),typeof K=="function"?d.callback=K:d===r(c)&&n(c),y(D)}else n(c);d=r(c)}if(d!==null)var Y=!0;else{var G=r(u);G!==null&&P(j,G.startTime-D),Y=!1}return Y}finally{d=null,h=B,p=!1}}var _=!1,S=null,E=-1,C=5,R=-1;function M(){return!(e.unstable_now()-R<C)}function L(){if(S!==null){var A=e.unstable_now();R=A;var D=!0;try{D=S(!0,A)}finally{D?H():(_=!1,S=null)}}else _=!1}var H;if(typeof b=="function")H=function(){b(L)};else if(typeof MessageChannel!="undefined"){var U=new MessageChannel,F=U.port2;U.port1.onmessage=L,H=function(){F.postMessage(null)}}else H=function(){v(L,0)};function O(A){S=A,_||(_=!0,H())}function P(A,D){E=v(function(){A(e.unstable_now())},D)}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(A){A.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,O(k))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var D=3;break;default:D=h}var B=h;h=D;try{return A()}finally{h=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,D){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var B=h;h=A;try{return D()}finally{h=B}},e.unstable_scheduleCallback=function(A,D,B){var z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?z+B:z):B=z,A){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=B+K,A={id:f++,callback:D,priorityLevel:A,startTime:B,expirationTime:K,sortIndex:-1},B>z?(A.sortIndex=B,t(u,A),r(c)===null&&A===r(u)&&(g?(x(E),E=-1):g=!0,P(j,B-z))):(A.sortIndex=K,t(c,A),m||p||(m=!0,O(k))),A},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(A){var D=h;return function(){var B=h;h=D;try{return A.apply(this,arguments)}finally{h=B}}}})(WD);VD.exports=WD;var SH=VD.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var EH=w,gn=SH;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var qD=new Set,gf={};function sl(e,t){Fc(e,t),Fc(e+"Capture",t)}function Fc(e,t){for(gf[e]=t,e=0;e<t.length;e++)qD.add(t[e])}var Sa=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),tw=Object.prototype.hasOwnProperty,NH=/^[: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]*$/,mC={},gC={};function CH(e){return tw.call(gC,e)?!0:tw.call(mC,e)?!1:NH.test(e)?gC[e]=!0:(mC[e]=!0,!1)}function TH(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function AH(e,t,r,n){if(t===null||typeof t=="undefined"||TH(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Fr(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kr[e]=new Fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kr[t]=new Fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kr[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kr[e]=new Fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kr[e]=new Fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kr[e]=new Fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kr[e]=new Fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kr[e]=new Fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kr[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var xj=/[\-:]([a-z])/g;function bj(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xj,bj);kr[t]=new Fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xj,bj);kr[t]=new Fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xj,bj);kr[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)});kr.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function wj(e,t,r,n){var i=kr.hasOwnProperty(t)?kr[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(AH(t,r,i,n)&&(r=null),n||i===null?CH(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ia=EH.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Np=Symbol.for("react.element"),Fl=Symbol.for("react.portal"),Kl=Symbol.for("react.fragment"),kj=Symbol.for("react.strict_mode"),rw=Symbol.for("react.profiler"),GD=Symbol.for("react.provider"),YD=Symbol.for("react.context"),_j=Symbol.for("react.forward_ref"),nw=Symbol.for("react.suspense"),iw=Symbol.for("react.suspense_list"),jj=Symbol.for("react.memo"),no=Symbol.for("react.lazy"),XD=Symbol.for("react.offscreen"),yC=Symbol.iterator;function ad(e){return e===null||typeof e!="object"?null:(e=yC&&e[yC]||e["@@iterator"],typeof e=="function"?e:null)}var Rt=Object.assign,lb;function Ad(e){if(lb===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);lb=t&&t[1]||""}return"\n"+lb+e}var cb=!1;function ub(e,t){if(!e||cb)return"";cb=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split("\n"),a=n.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c="\n"+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=s);break}}}finally{cb=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ad(e):""}function PH(e){switch(e.tag){case 5:return Ad(e.type);case 16:return Ad("Lazy");case 13:return Ad("Suspense");case 19:return Ad("SuspenseList");case 0:case 2:case 15:return e=ub(e.type,!1),e;case 11:return e=ub(e.type.render,!1),e;case 1:return e=ub(e.type,!0),e;default:return""}}function aw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kl:return"Fragment";case Fl:return"Portal";case rw:return"Profiler";case kj:return"StrictMode";case nw:return"Suspense";case iw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case YD:return(e.displayName||"Context")+".Consumer";case GD:return(e._context.displayName||"Context")+".Provider";case _j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jj:return t=e.displayName||null,t!==null?t:aw(e.type)||"Memo";case no:t=e._payload,e=e._init;try{return aw(e(t))}catch(r){}}return null}function OH(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return aw(t);case 8:return t===kj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Uo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function JD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RH(e){var t=JD(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r!="undefined"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cp(e){e._valueTracker||(e._valueTracker=RH(e))}function QD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=JD(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function pg(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ow(e,t){var r=t.checked;return Rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:e._wrapperState.initialChecked})}function vC(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Uo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ZD(e,t){t=t.checked,t!=null&&wj(e,"checked",t,!1)}function sw(e,t){ZD(e,t);var r=Uo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?lw(e,t.type,r):t.hasOwnProperty("defaultValue")&&lw(e,t.type,Uo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xC(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function lw(e,t,r){(t!=="number"||pg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Pd=Array.isArray;function lc(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Uo(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function cw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ne(91));return Rt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bC(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ne(92));if(Pd(r)){if(1<r.length)throw Error(ne(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Uo(r)}}function eI(e,t){var r=Uo(t.value),n=Uo(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function wC(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function uw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tp,rI=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tp=Tp||document.createElement("div"),Tp.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ud={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},$H=["Webkit","ms","Moz","O"];Object.keys(Ud).forEach(function(e){$H.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ud[t]=Ud[e]})});function nI(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ud.hasOwnProperty(e)&&Ud[e]?(""+t).trim():t+"px"}function iI(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=nI(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var MH=Rt({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 dw(e,t){if(t){if(MH[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function fw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hw=null;function Sj(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pw=null,cc=null,uc=null;function kC(e){if(e=Xh(e)){if(typeof pw!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=bv(t),pw(e.stateNode,e.type,t))}}function aI(e){cc?uc?uc.push(e):uc=[e]:cc=e}function oI(){if(cc){var e=cc,t=uc;if(uc=cc=null,kC(e),t)for(e=0;e<t.length;e++)kC(t[e])}}function sI(e,t){return e(t)}function lI(){}var db=!1;function cI(e,t,r){if(db)return e(t,r);db=!0;try{return sI(e,t,r)}finally{db=!1,(cc!==null||uc!==null)&&(lI(),oI())}}function vf(e,t){var r=e.stateNode;if(r===null)return null;var n=bv(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ne(231,t,typeof r));return r}var mw=!1;if(Sa)try{var od={};Object.defineProperty(od,"passive",{get:function(){mw=!0}}),window.addEventListener("test",od,od),window.removeEventListener("test",od,od)}catch(e){mw=!1}function DH(e,t,r,n,i,a,o,s,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(f){this.onError(f)}}var Fd=!1,mg=null,gg=!1,gw=null,IH={onError:function(e){Fd=!0,mg=e}};function LH(e,t,r,n,i,a,o,s,c){Fd=!1,mg=null,DH.apply(IH,arguments)}function zH(e,t,r,n,i,a,o,s,c){if(LH.apply(this,arguments),Fd){if(Fd){var u=mg;Fd=!1,mg=null}else throw Error(ne(198));gg||(gg=!0,gw=u)}}function ll(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function uI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _C(e){if(ll(e)!==e)throw Error(ne(188))}function BH(e){var t=e.alternate;if(!t){if(t=ll(e),t===null)throw Error(ne(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return _C(i),e;if(a===n)return _C(i),t;a=a.sibling}throw Error(ne(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(ne(189))}}if(r.alternate!==n)throw Error(ne(190))}if(r.tag!==3)throw Error(ne(188));return r.stateNode.current===r?e:t}function dI(e){return e=BH(e),e!==null?fI(e):null}function fI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=fI(e);if(t!==null)return t;e=e.sibling}return null}var hI=gn.unstable_scheduleCallback,jC=gn.unstable_cancelCallback,UH=gn.unstable_shouldYield,FH=gn.unstable_requestPaint,Bt=gn.unstable_now,KH=gn.unstable_getCurrentPriorityLevel,Ej=gn.unstable_ImmediatePriority,pI=gn.unstable_UserBlockingPriority,yg=gn.unstable_NormalPriority,HH=gn.unstable_LowPriority,mI=gn.unstable_IdlePriority,gv=null,Ki=null;function VH(e){if(Ki&&typeof Ki.onCommitFiberRoot=="function")try{Ki.onCommitFiberRoot(gv,e,void 0,(e.current.flags&128)===128)}catch(t){}}var fi=Math.clz32?Math.clz32:GH,WH=Math.log,qH=Math.LN2;function GH(e){return e>>>=0,e===0?32:31-(WH(e)/qH|0)|0}var Ap=64,Pp=4194304;function Od(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vg(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Od(s):(a&=o,a!==0&&(n=Od(a)))}else o=r&~i,o!==0?n=Od(o):a!==0&&(n=Od(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-fi(t),i=1<<r,n|=e[r],t&=~i;return n}function YH(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function XH(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-fi(a),s=1<<o,c=i[o];c===-1?(!(s&r)||s&n)&&(i[o]=YH(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function yw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gI(){var e=Ap;return Ap<<=1,!(Ap&4194240)&&(Ap=64),e}function fb(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Gh(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fi(t),e[t]=r}function JH(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-fi(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function Nj(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-fi(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var rt=0;function yI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var vI,Cj,xI,bI,wI,vw=!1,Op=[],No=null,Co=null,To=null,xf=new Map,bf=new Map,lo=[],QH="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 SC(e,t){switch(e){case"focusin":case"focusout":No=null;break;case"dragenter":case"dragleave":Co=null;break;case"mouseover":case"mouseout":To=null;break;case"pointerover":case"pointerout":xf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bf.delete(t.pointerId)}}function sd(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Xh(t),t!==null&&Cj(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ZH(e,t,r,n,i){switch(t){case"focusin":return No=sd(No,e,t,r,n,i),!0;case"dragenter":return Co=sd(Co,e,t,r,n,i),!0;case"mouseover":return To=sd(To,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return xf.set(a,sd(xf.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,bf.set(a,sd(bf.get(a)||null,e,t,r,n,i)),!0}return!1}function kI(e){var t=vs(e.target);if(t!==null){var r=ll(t);if(r!==null){if(t=r.tag,t===13){if(t=uI(r),t!==null){e.blockedOn=t,wI(e.priority,function(){xI(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Im(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=xw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);hw=n,r.target.dispatchEvent(n),hw=null}else return t=Xh(r),t!==null&&Cj(t),e.blockedOn=r,!1;t.shift()}return!0}function EC(e,t,r){Im(e)&&r.delete(t)}function eV(){vw=!1,No!==null&&Im(No)&&(No=null),Co!==null&&Im(Co)&&(Co=null),To!==null&&Im(To)&&(To=null),xf.forEach(EC),bf.forEach(EC)}function ld(e,t){e.blockedOn===t&&(e.blockedOn=null,vw||(vw=!0,gn.unstable_scheduleCallback(gn.unstable_NormalPriority,eV)))}function wf(e){function t(i){return ld(i,e)}if(0<Op.length){ld(Op[0],e);for(var r=1;r<Op.length;r++){var n=Op[r];n.blockedOn===e&&(n.blockedOn=null)}}for(No!==null&&ld(No,e),Co!==null&&ld(Co,e),To!==null&&ld(To,e),xf.forEach(t),bf.forEach(t),r=0;r<lo.length;r++)n=lo[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<lo.length&&(r=lo[0],r.blockedOn===null);)kI(r),r.blockedOn===null&&lo.shift()}var dc=Ia.ReactCurrentBatchConfig,xg=!0;function tV(e,t,r,n){var i=rt,a=dc.transition;dc.transition=null;try{rt=1,Tj(e,t,r,n)}finally{rt=i,dc.transition=a}}function rV(e,t,r,n){var i=rt,a=dc.transition;dc.transition=null;try{rt=4,Tj(e,t,r,n)}finally{rt=i,dc.transition=a}}function Tj(e,t,r,n){if(xg){var i=xw(e,t,r,n);if(i===null)kb(e,t,n,bg,r),SC(e,n);else if(ZH(i,e,t,r,n))n.stopPropagation();else if(SC(e,n),t&4&&-1<QH.indexOf(e)){for(;i!==null;){var a=Xh(i);if(a!==null&&vI(a),a=xw(e,t,r,n),a===null&&kb(e,t,n,bg,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else kb(e,t,n,null,r)}}var bg=null;function xw(e,t,r,n){if(bg=null,e=Sj(n),e=vs(e),e!==null)if(t=ll(e),t===null)e=null;else if(r=t.tag,r===13){if(e=uI(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bg=e,null}function _I(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(KH()){case Ej:return 1;case pI:return 4;case yg:case HH:return 16;case mI:return 536870912;default:return 16}default:return 16}}var ko=null,Aj=null,Lm=null;function jI(){if(Lm)return Lm;var e,t=Aj,r=t.length,n,i="value"in ko?ko.value:ko.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return Lm=i.slice(e,1<n?1-n:void 0)}function zm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rp(){return!0}function NC(){return!1}function bn(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Rp:NC,this.isPropagationStopped=NC,this}return Rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Rp)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Rp)},persist:function(){},isPersistent:Rp}),t}var Nu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pj=bn(Nu),Yh=Rt({},Nu,{view:0,detail:0}),nV=bn(Yh),hb,pb,cd,yv=Rt({},Yh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oj,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cd&&(cd&&e.type==="mousemove"?(hb=e.screenX-cd.screenX,pb=e.screenY-cd.screenY):pb=hb=0,cd=e),hb)},movementY:function(e){return"movementY"in e?e.movementY:pb}}),CC=bn(yv),iV=Rt({},yv,{dataTransfer:0}),aV=bn(iV),oV=Rt({},Yh,{relatedTarget:0}),mb=bn(oV),sV=Rt({},Nu,{animationName:0,elapsedTime:0,pseudoElement:0}),lV=bn(sV),cV=Rt({},Nu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uV=bn(cV),dV=Rt({},Nu,{data:0}),TC=bn(dV),fV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hV={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"},pV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mV(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pV[e])?!!t[e]:!1}function Oj(){return mV}var gV=Rt({},Yh,{key:function(e){if(e.key){var t=fV[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hV[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oj,charCode:function(e){return e.type==="keypress"?zm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yV=bn(gV),vV=Rt({},yv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AC=bn(vV),xV=Rt({},Yh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oj}),bV=bn(xV),wV=Rt({},Nu,{propertyName:0,elapsedTime:0,pseudoElement:0}),kV=bn(wV),_V=Rt({},yv,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),jV=bn(_V),SV=[9,13,27,32],Rj=Sa&&"CompositionEvent"in window,Kd=null;Sa&&"documentMode"in document&&(Kd=document.documentMode);var EV=Sa&&"TextEvent"in window&&!Kd,SI=Sa&&(!Rj||Kd&&8<Kd&&11>=Kd),PC=" ",OC=!1;function EI(e,t){switch(e){case"keyup":return SV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hl=!1;function NV(e,t){switch(e){case"compositionend":return NI(t);case"keypress":return t.which!==32?null:(OC=!0,PC);case"textInput":return e=t.data,e===PC&&OC?null:e;default:return null}}function CV(e,t){if(Hl)return e==="compositionend"||!Rj&&EI(e,t)?(e=jI(),Lm=Aj=ko=null,Hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return SI&&t.locale!=="ko"?null:t.data;default:return null}}var TV={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 RC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!TV[e.type]:t==="textarea"}function CI(e,t,r,n){aI(n),t=wg(t,"onChange"),0<t.length&&(r=new Pj("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Hd=null,kf=null;function AV(e){zI(e,0)}function vv(e){var t=ql(e);if(QD(t))return e}function PV(e,t){if(e==="change")return t}var TI=!1;if(Sa){var gb;if(Sa){var yb="oninput"in document;if(!yb){var $C=document.createElement("div");$C.setAttribute("oninput","return;"),yb=typeof $C.oninput=="function"}gb=yb}else gb=!1;TI=gb&&(!document.documentMode||9<document.documentMode)}function MC(){Hd&&(Hd.detachEvent("onpropertychange",AI),kf=Hd=null)}function AI(e){if(e.propertyName==="value"&&vv(kf)){var t=[];CI(t,kf,e,Sj(e)),cI(AV,t)}}function OV(e,t,r){e==="focusin"?(MC(),Hd=t,kf=r,Hd.attachEvent("onpropertychange",AI)):e==="focusout"&&MC()}function RV(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vv(kf)}function $V(e,t){if(e==="click")return vv(t)}function MV(e,t){if(e==="input"||e==="change")return vv(t)}function DV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gi=typeof Object.is=="function"?Object.is:DV;function _f(e,t){if(gi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!tw.call(t,i)||!gi(e[i],t[i]))return!1}return!0}function DC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function IC(e,t){var r=DC(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=DC(r)}}function PI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function OI(){for(var e=window,t=pg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch(n){r=!1}if(r)e=t.contentWindow;else break;t=pg(e.document)}return t}function $j(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function IV(e){var t=OI(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&PI(r.ownerDocument.documentElement,r)){if(n!==null&&$j(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=IC(r,a);var o=IC(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var LV=Sa&&"documentMode"in document&&11>=document.documentMode,Vl=null,bw=null,Vd=null,ww=!1;function LC(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ww||Vl==null||Vl!==pg(n)||(n=Vl,"selectionStart"in n&&$j(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Vd&&_f(Vd,n)||(Vd=n,n=wg(bw,"onSelect"),0<n.length&&(t=new Pj("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vl)))}function $p(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Wl={animationend:$p("Animation","AnimationEnd"),animationiteration:$p("Animation","AnimationIteration"),animationstart:$p("Animation","AnimationStart"),transitionend:$p("Transition","TransitionEnd")},vb={},RI={};Sa&&(RI=document.createElement("div").style,"AnimationEvent"in window||(delete Wl.animationend.animation,delete Wl.animationiteration.animation,delete Wl.animationstart.animation),"TransitionEvent"in window||delete Wl.transitionend.transition);function xv(e){if(vb[e])return vb[e];if(!Wl[e])return e;var t=Wl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in RI)return vb[e]=t[r];return e}var $I=xv("animationend"),MI=xv("animationiteration"),DI=xv("animationstart"),II=xv("transitionend"),LI=new Map,zC="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 qo(e,t){LI.set(e,t),sl(t,[e])}for(var xb=0;xb<zC.length;xb++){var bb=zC[xb],zV=bb.toLowerCase(),BV=bb[0].toUpperCase()+bb.slice(1);qo(zV,"on"+BV)}qo($I,"onAnimationEnd");qo(MI,"onAnimationIteration");qo(DI,"onAnimationStart");qo("dblclick","onDoubleClick");qo("focusin","onFocus");qo("focusout","onBlur");qo(II,"onTransitionEnd");Fc("onMouseEnter",["mouseout","mouseover"]);Fc("onMouseLeave",["mouseout","mouseover"]);Fc("onPointerEnter",["pointerout","pointerover"]);Fc("onPointerLeave",["pointerout","pointerover"]);sl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));sl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));sl("onBeforeInput",["compositionend","keypress","textInput","paste"]);sl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));sl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));sl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rd="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(" "),UV=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rd));function BC(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,zH(n,t,void 0,e),e.currentTarget=null}function zI(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break e;BC(i,s,u),a=c}else for(o=0;o<n.length;o++){if(s=n[o],c=s.instance,u=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break e;BC(i,s,u),a=c}}}if(gg)throw e=gw,gg=!1,gw=null,e}function bt(e,t){var r=t[Ew];r===void 0&&(r=t[Ew]=new Set);var n=e+"__bubble";r.has(n)||(BI(t,e,2,!1),r.add(n))}function wb(e,t,r){var n=0;t&&(n|=4),BI(r,e,n,t)}var Mp="_reactListening"+Math.random().toString(36).slice(2);function jf(e){if(!e[Mp]){e[Mp]=!0,qD.forEach(function(r){r!=="selectionchange"&&(UV.has(r)||wb(r,!1,e),wb(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mp]||(t[Mp]=!0,wb("selectionchange",!1,t))}}function BI(e,t,r,n){switch(_I(t)){case 1:var i=tV;break;case 4:i=rV;break;default:i=Tj}r=i.bind(null,t,r,e),i=void 0,!mw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function kb(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=vs(s),o===null)return;if(c=o.tag,c===5||c===6){n=a=o;continue e}s=s.parentNode}}n=n.return}cI(function(){var u=a,f=Sj(r),d=[];e:{var h=LI.get(e);if(h!==void 0){var p=Pj,m=e;switch(e){case"keypress":if(zm(r)===0)break e;case"keydown":case"keyup":p=yV;break;case"focusin":m="focus",p=mb;break;case"focusout":m="blur",p=mb;break;case"beforeblur":case"afterblur":p=mb;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=CC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=aV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=bV;break;case $I:case MI:case DI:p=lV;break;case II:p=kV;break;case"scroll":p=nV;break;case"wheel":p=jV;break;case"copy":case"cut":case"paste":p=uV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=AC}var g=(t&4)!==0,v=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var b=u,y;b!==null;){y=b;var j=y.stateNode;if(y.tag===5&&j!==null&&(y=j,x!==null&&(j=vf(b,x),j!=null&&g.push(Sf(b,j,y)))),v)break;b=b.return}0<g.length&&(h=new p(h,m,null,r,f),d.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==hw&&(m=r.relatedTarget||r.fromElement)&&(vs(m)||m[Ea]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=u,m=m?vs(m):null,m!==null&&(v=ll(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=CC,j="onMouseLeave",x="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=AC,j="onPointerLeave",x="onPointerEnter",b="pointer"),v=p==null?h:ql(p),y=m==null?h:ql(m),h=new g(j,b+"leave",p,r,f),h.target=v,h.relatedTarget=y,j=null,vs(f)===u&&(g=new g(x,b+"enter",m,r,f),g.target=y,g.relatedTarget=v,j=g),v=j,p&&m)t:{for(g=p,x=m,b=0,y=g;y;y=yl(y))b++;for(y=0,j=x;j;j=yl(j))y++;for(;0<b-y;)g=yl(g),b--;for(;0<y-b;)x=yl(x),y--;for(;b--;){if(g===x||x!==null&&g===x.alternate)break t;g=yl(g),x=yl(x)}g=null}else g=null;p!==null&&UC(d,h,p,g,!1),m!==null&&v!==null&&UC(d,v,m,g,!0)}}e:{if(h=u?ql(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=PV;else if(RC(h))if(TI)k=MV;else{k=RV;var _=OV}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=$V);if(k&&(k=k(e,u))){CI(d,k,r,f);break e}_&&_(e,h,u),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&lw(h,"number",h.value)}switch(_=u?ql(u):window,e){case"focusin":(RC(_)||_.contentEditable==="true")&&(Vl=_,bw=u,Vd=null);break;case"focusout":Vd=bw=Vl=null;break;case"mousedown":ww=!0;break;case"contextmenu":case"mouseup":case"dragend":ww=!1,LC(d,r,f);break;case"selectionchange":if(LV)break;case"keydown":case"keyup":LC(d,r,f)}var S;if(Rj)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Hl?EI(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(SI&&r.locale!=="ko"&&(Hl||E!=="onCompositionStart"?E==="onCompositionEnd"&&Hl&&(S=jI()):(ko=f,Aj="value"in ko?ko.value:ko.textContent,Hl=!0)),_=wg(u,E),0<_.length&&(E=new TC(E,e,null,r,f),d.push({event:E,listeners:_}),S?E.data=S:(S=NI(r),S!==null&&(E.data=S)))),(S=EV?NV(e,r):CV(e,r))&&(u=wg(u,"onBeforeInput"),0<u.length&&(f=new TC("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=S))}zI(d,t)})}function Sf(e,t,r){return{instance:e,listener:t,currentTarget:r}}function wg(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=vf(e,r),a!=null&&n.unshift(Sf(e,a,i)),a=vf(e,t),a!=null&&n.push(Sf(e,a,i))),e=e.return}return n}function yl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function UC(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var s=r,c=s.alternate,u=s.stateNode;if(c!==null&&c===n)break;s.tag===5&&u!==null&&(s=u,i?(c=vf(r,a),c!=null&&o.unshift(Sf(r,c,s))):i||(c=vf(r,a),c!=null&&o.push(Sf(r,c,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var FV=/\r\n?/g,KV=/\u0000|\uFFFD/g;function FC(e){return(typeof e=="string"?e:""+e).replace(FV,"\n").replace(KV,"")}function Dp(e,t,r){if(t=FC(t),FC(e)!==t&&r)throw Error(ne(425))}function kg(){}var kw=null,_w=null;function jw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Sw=typeof setTimeout=="function"?setTimeout:void 0,HV=typeof clearTimeout=="function"?clearTimeout:void 0,KC=typeof Promise=="function"?Promise:void 0,VV=typeof queueMicrotask=="function"?queueMicrotask:typeof KC!="undefined"?function(e){return KC.resolve(null).then(e).catch(WV)}:Sw;function WV(e){setTimeout(function(){throw e})}function _b(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),wf(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);wf(t)}function Ao(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function HC(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Cu=Math.random().toString(36).slice(2),Ii="__reactFiber$"+Cu,Ef="__reactProps$"+Cu,Ea="__reactContainer$"+Cu,Ew="__reactEvents$"+Cu,qV="__reactListeners$"+Cu,GV="__reactHandles$"+Cu;function vs(e){var t=e[Ii];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ea]||r[Ii]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=HC(e);e!==null;){if(r=e[Ii])return r;e=HC(e)}return t}e=r,r=e.parentNode}return null}function Xh(e){return e=e[Ii]||e[Ea],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ql(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ne(33))}function bv(e){return e[Ef]||null}var Nw=[],Gl=-1;function Go(e){return{current:e}}function St(e){0>Gl||(e.current=Nw[Gl],Nw[Gl]=null,Gl--)}function pt(e,t){Gl++,Nw[Gl]=e.current,e.current=t}var Fo={},Ar=Go(Fo),Jr=Go(!1),Hs=Fo;function Kc(e,t){var r=e.type.contextTypes;if(!r)return Fo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Qr(e){return e=e.childContextTypes,e!=null}function _g(){St(Jr),St(Ar)}function VC(e,t,r){if(Ar.current!==Fo)throw Error(ne(168));pt(Ar,t),pt(Jr,r)}function UI(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(ne(108,OH(e)||"Unknown",i));return Rt({},r,n)}function jg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fo,Hs=Ar.current,pt(Ar,e),pt(Jr,Jr.current),!0}function WC(e,t,r){var n=e.stateNode;if(!n)throw Error(ne(169));r?(e=UI(e,t,Hs),n.__reactInternalMemoizedMergedChildContext=e,St(Jr),St(Ar),pt(Ar,e)):St(Jr),pt(Jr,r)}var ha=null,wv=!1,jb=!1;function FI(e){ha===null?ha=[e]:ha.push(e)}function YV(e){wv=!0,FI(e)}function Yo(){if(!jb&&ha!==null){jb=!0;var e=0,t=rt;try{var r=ha;for(rt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ha=null,wv=!1}catch(i){throw ha!==null&&(ha=ha.slice(e+1)),hI(Ej,Yo),i}finally{rt=t,jb=!1}}return null}var Yl=[],Xl=0,Sg=null,Eg=0,On=[],Rn=0,Vs=null,ma=1,ga="";function us(e,t){Yl[Xl++]=Eg,Yl[Xl++]=Sg,Sg=e,Eg=t}function KI(e,t,r){On[Rn++]=ma,On[Rn++]=ga,On[Rn++]=Vs,Vs=e;var n=ma;e=ga;var i=32-fi(n)-1;n&=~(1<<i),r+=1;var a=32-fi(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,ma=1<<32-fi(t)+i|r<<i|n,ga=a+e}else ma=1<<a|r<<i|n,ga=e}function Mj(e){e.return!==null&&(us(e,1),KI(e,1,0))}function Dj(e){for(;e===Sg;)Sg=Yl[--Xl],Yl[Xl]=null,Eg=Yl[--Xl],Yl[Xl]=null;for(;e===Vs;)Vs=On[--Rn],On[Rn]=null,ga=On[--Rn],On[Rn]=null,ma=On[--Rn],On[Rn]=null}var pn=null,hn=null,Ct=!1,si=null;function HI(e,t){var r=$n(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function qC(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pn=e,hn=Ao(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Vs!==null?{id:ma,overflow:ga}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=$n(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,pn=e,hn=null,!0):!1;default:return!1}}function Cw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Tw(e){if(Ct){var t=hn;if(t){var r=t;if(!qC(e,t)){if(Cw(e))throw Error(ne(418));t=Ao(r.nextSibling);var n=pn;t&&qC(e,t)?HI(n,r):(e.flags=e.flags&-4097|2,Ct=!1,pn=e)}}else{if(Cw(e))throw Error(ne(418));e.flags=e.flags&-4097|2,Ct=!1,pn=e}}}function GC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pn=e}function Ip(e){if(e!==pn)return!1;if(!Ct)return GC(e),Ct=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jw(e.type,e.memoizedProps)),t&&(t=hn)){if(Cw(e))throw VI(),Error(ne(418));for(;t;)HI(e,t),t=Ao(t.nextSibling)}if(GC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){hn=Ao(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}hn=null}}else hn=pn?Ao(e.stateNode.nextSibling):null;return!0}function VI(){for(var e=hn;e;)e=Ao(e.nextSibling)}function Hc(){hn=pn=null,Ct=!1}function Ij(e){si===null?si=[e]:si.push(e)}var XV=Ia.ReactCurrentBatchConfig;function ud(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ne(309));var n=r.stateNode}if(!n)throw Error(ne(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(ne(284));if(!r._owner)throw Error(ne(290,e))}return e}function Lp(e,t){throw e=Object.prototype.toString.call(t),Error(ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function YC(e){var t=e._init;return t(e._payload)}function WI(e){function t(x,b){if(e){var y=x.deletions;y===null?(x.deletions=[b],x.flags|=16):y.push(b)}}function r(x,b){if(!e)return null;for(;b!==null;)t(x,b),b=b.sibling;return null}function n(x,b){for(x=new Map;b!==null;)b.key!==null?x.set(b.key,b):x.set(b.index,b),b=b.sibling;return x}function i(x,b){return x=$o(x,b),x.index=0,x.sibling=null,x}function a(x,b,y){return x.index=y,e?(y=x.alternate,y!==null?(y=y.index,y<b?(x.flags|=2,b):y):(x.flags|=2,b)):(x.flags|=1048576,b)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,b,y,j){return b===null||b.tag!==6?(b=Pb(y,x.mode,j),b.return=x,b):(b=i(b,y),b.return=x,b)}function c(x,b,y,j){var k=y.type;return k===Kl?f(x,b,y.props.children,j,y.key):b!==null&&(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===no&&YC(k)===b.type)?(j=i(b,y.props),j.ref=ud(x,b,y),j.return=x,j):(j=Wm(y.type,y.key,y.props,null,x.mode,j),j.ref=ud(x,b,y),j.return=x,j)}function u(x,b,y,j){return b===null||b.tag!==4||b.stateNode.containerInfo!==y.containerInfo||b.stateNode.implementation!==y.implementation?(b=Ob(y,x.mode,j),b.return=x,b):(b=i(b,y.children||[]),b.return=x,b)}function f(x,b,y,j,k){return b===null||b.tag!==7?(b=zs(y,x.mode,j,k),b.return=x,b):(b=i(b,y),b.return=x,b)}function d(x,b,y){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Pb(""+b,x.mode,y),b.return=x,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Np:return y=Wm(b.type,b.key,b.props,null,x.mode,y),y.ref=ud(x,null,b),y.return=x,y;case Fl:return b=Ob(b,x.mode,y),b.return=x,b;case no:var j=b._init;return d(x,j(b._payload),y)}if(Pd(b)||ad(b))return b=zs(b,x.mode,y,null),b.return=x,b;Lp(x,b)}return null}function h(x,b,y,j){var k=b!==null?b.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:s(x,b,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Np:return y.key===k?c(x,b,y,j):null;case Fl:return y.key===k?u(x,b,y,j):null;case no:return k=y._init,h(x,b,k(y._payload),j)}if(Pd(y)||ad(y))return k!==null?null:f(x,b,y,j,null);Lp(x,y)}return null}function p(x,b,y,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(y)||null,s(b,x,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Np:return x=x.get(j.key===null?y:j.key)||null,c(b,x,j,k);case Fl:return x=x.get(j.key===null?y:j.key)||null,u(b,x,j,k);case no:var _=j._init;return p(x,b,y,_(j._payload),k)}if(Pd(j)||ad(j))return x=x.get(y)||null,f(b,x,j,k,null);Lp(b,j)}return null}function m(x,b,y,j){for(var k=null,_=null,S=b,E=b=0,C=null;S!==null&&E<y.length;E++){S.index>E?(C=S,S=null):C=S.sibling;var R=h(x,S,y[E],j);if(R===null){S===null&&(S=C);break}e&&S&&R.alternate===null&&t(x,S),b=a(R,b,E),_===null?k=R:_.sibling=R,_=R,S=C}if(E===y.length)return r(x,S),Ct&&us(x,E),k;if(S===null){for(;E<y.length;E++)S=d(x,y[E],j),S!==null&&(b=a(S,b,E),_===null?k=S:_.sibling=S,_=S);return Ct&&us(x,E),k}for(S=n(x,S);E<y.length;E++)C=p(S,x,E,y[E],j),C!==null&&(e&&C.alternate!==null&&S.delete(C.key===null?E:C.key),b=a(C,b,E),_===null?k=C:_.sibling=C,_=C);return e&&S.forEach(function(M){return t(x,M)}),Ct&&us(x,E),k}function g(x,b,y,j){var k=ad(y);if(typeof k!="function")throw Error(ne(150));if(y=k.call(y),y==null)throw Error(ne(151));for(var _=k=null,S=b,E=b=0,C=null,R=y.next();S!==null&&!R.done;E++,R=y.next()){S.index>E?(C=S,S=null):C=S.sibling;var M=h(x,S,R.value,j);if(M===null){S===null&&(S=C);break}e&&S&&M.alternate===null&&t(x,S),b=a(M,b,E),_===null?k=M:_.sibling=M,_=M,S=C}if(R.done)return r(x,S),Ct&&us(x,E),k;if(S===null){for(;!R.done;E++,R=y.next())R=d(x,R.value,j),R!==null&&(b=a(R,b,E),_===null?k=R:_.sibling=R,_=R);return Ct&&us(x,E),k}for(S=n(x,S);!R.done;E++,R=y.next())R=p(S,x,E,R.value,j),R!==null&&(e&&R.alternate!==null&&S.delete(R.key===null?E:R.key),b=a(R,b,E),_===null?k=R:_.sibling=R,_=R);return e&&S.forEach(function(L){return t(x,L)}),Ct&&us(x,E),k}function v(x,b,y,j){if(typeof y=="object"&&y!==null&&y.type===Kl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Np:e:{for(var k=y.key,_=b;_!==null;){if(_.key===k){if(k=y.type,k===Kl){if(_.tag===7){r(x,_.sibling),b=i(_,y.props.children),b.return=x,x=b;break e}}else if(_.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===no&&YC(k)===_.type){r(x,_.sibling),b=i(_,y.props),b.ref=ud(x,_,y),b.return=x,x=b;break e}r(x,_);break}else t(x,_);_=_.sibling}y.type===Kl?(b=zs(y.props.children,x.mode,j,y.key),b.return=x,x=b):(j=Wm(y.type,y.key,y.props,null,x.mode,j),j.ref=ud(x,b,y),j.return=x,x=j)}return o(x);case Fl:e:{for(_=y.key;b!==null;){if(b.key===_)if(b.tag===4&&b.stateNode.containerInfo===y.containerInfo&&b.stateNode.implementation===y.implementation){r(x,b.sibling),b=i(b,y.children||[]),b.return=x,x=b;break e}else{r(x,b);break}else t(x,b);b=b.sibling}b=Ob(y,x.mode,j),b.return=x,x=b}return o(x);case no:return _=y._init,v(x,b,_(y._payload),j)}if(Pd(y))return m(x,b,y,j);if(ad(y))return g(x,b,y,j);Lp(x,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,b!==null&&b.tag===6?(r(x,b.sibling),b=i(b,y),b.return=x,x=b):(r(x,b),b=Pb(y,x.mode,j),b.return=x,x=b),o(x)):r(x,b)}return v}var Vc=WI(!0),qI=WI(!1),Ng=Go(null),Cg=null,Jl=null,Lj=null;function zj(){Lj=Jl=Cg=null}function Bj(e){var t=Ng.current;St(Ng),e._currentValue=t}function Aw(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function fc(e,t){Cg=e,Lj=Jl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Yr=!0),e.firstContext=null)}function Un(e){var t=e._currentValue;if(Lj!==e)if(e={context:e,memoizedValue:t,next:null},Jl===null){if(Cg===null)throw Error(ne(308));Jl=e,Cg.dependencies={lanes:0,firstContext:e}}else Jl=Jl.next=e;return t}var xs=null;function Uj(e){xs===null?xs=[e]:xs.push(e)}function GI(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Uj(t)):(r.next=i.next,i.next=r),t.interleaved=r,Na(e,n)}function Na(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var io=!1;function Fj(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function YI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ba(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Xe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Na(e,r)}return i=n.interleaved,i===null?(t.next=t,Uj(n)):(t.next=i.next,i.next=t),n.interleaved=t,Na(e,r)}function Bm(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nj(e,r)}}function XC(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Tg(e,t,r,n){var i=e.updateQueue;io=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,f=u=c=null,s=a;do{var h=s.lane,p=s.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(h=t,p=r,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(p,d,h):m,h==null)break e;d=Rt({},d,h);break e;case 2:io=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=p,c=d):f=f.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);qs|=o,e.lanes=o,e.memoizedState=d}}function JC(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(ne(191,i));i.call(n)}}}var Jh={},Hi=Go(Jh),Nf=Go(Jh),Cf=Go(Jh);function bs(e){if(e===Jh)throw Error(ne(174));return e}function Kj(e,t){switch(pt(Cf,t),pt(Nf,e),pt(Hi,Jh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:uw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uw(t,e)}St(Hi),pt(Hi,t)}function Wc(){St(Hi),St(Nf),St(Cf)}function XI(e){bs(Cf.current);var t=bs(Hi.current),r=uw(t,e.type);t!==r&&(pt(Nf,e),pt(Hi,r))}function Hj(e){Nf.current===e&&(St(Hi),St(Nf))}var Pt=Go(0);function Ag(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Sb=[];function Vj(){for(var e=0;e<Sb.length;e++)Sb[e]._workInProgressVersionPrimary=null;Sb.length=0}var Um=Ia.ReactCurrentDispatcher,Eb=Ia.ReactCurrentBatchConfig,Ws=0,Ot=null,er=null,sr=null,Pg=!1,Wd=!1,Tf=0,JV=0;function _r(){throw Error(ne(321))}function Wj(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!gi(e[r],t[r]))return!1;return!0}function qj(e,t,r,n,i,a){if(Ws=a,Ot=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Um.current=e===null||e.memoizedState===null?tW:rW,e=r(n,i),Wd){a=0;do{if(Wd=!1,Tf=0,25<=a)throw Error(ne(301));a+=1,sr=er=null,t.updateQueue=null,Um.current=nW,e=r(n,i)}while(Wd)}if(Um.current=Og,t=er!==null&&er.next!==null,Ws=0,sr=er=Ot=null,Pg=!1,t)throw Error(ne(300));return e}function Gj(){var e=Tf!==0;return Tf=0,e}function Ei(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sr===null?Ot.memoizedState=sr=e:sr=sr.next=e,sr}function Fn(){if(er===null){var e=Ot.alternate;e=e!==null?e.memoizedState:null}else e=er.next;var t=sr===null?Ot.memoizedState:sr.next;if(t!==null)sr=t,er=e;else{if(e===null)throw Error(ne(310));er=e,e={memoizedState:er.memoizedState,baseState:er.baseState,baseQueue:er.baseQueue,queue:er.queue,next:null},sr===null?Ot.memoizedState=sr=e:sr=sr.next=e}return sr}function Af(e,t){return typeof t=="function"?t(e):t}function Nb(e){var t=Fn(),r=t.queue;if(r===null)throw Error(ne(311));r.lastRenderedReducer=e;var n=er,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,c=null,u=a;do{var f=u.lane;if((Ws&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(s=c=d,o=n):c=c.next=d,Ot.lanes|=f,qs|=f}u=u.next}while(u!==null&&u!==a);c===null?o=n:c.next=s,gi(n,t.memoizedState)||(Yr=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,Ot.lanes|=a,qs|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Cb(e){var t=Fn(),r=t.queue;if(r===null)throw Error(ne(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);gi(a,t.memoizedState)||(Yr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function JI(){}function QI(e,t){var r=Ot,n=Fn(),i=t(),a=!gi(n.memoizedState,i);if(a&&(n.memoizedState=i,Yr=!0),n=n.queue,Yj(tL.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||sr!==null&&sr.memoizedState.tag&1){if(r.flags|=2048,Pf(9,eL.bind(null,r,n,i,t),void 0,null),cr===null)throw Error(ne(349));Ws&30||ZI(r,t,i)}return i}function ZI(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function eL(e,t,r,n){t.value=r,t.getSnapshot=n,rL(t)&&nL(e)}function tL(e,t,r){return r(function(){rL(t)&&nL(e)})}function rL(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gi(e,r)}catch(n){return!0}}function nL(e){var t=Na(e,1);t!==null&&hi(t,e,1,-1)}function QC(e){var t=Ei();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Af,lastRenderedState:e},t.queue=e,e=e.dispatch=eW.bind(null,Ot,e),[t.memoizedState,e]}function Pf(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ot.updateQueue,t===null?(t={lastEffect:null,stores:null},Ot.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function iL(){return Fn().memoizedState}function Fm(e,t,r,n){var i=Ei();Ot.flags|=e,i.memoizedState=Pf(1|t,r,void 0,n===void 0?null:n)}function kv(e,t,r,n){var i=Fn();n=n===void 0?null:n;var a=void 0;if(er!==null){var o=er.memoizedState;if(a=o.destroy,n!==null&&Wj(n,o.deps)){i.memoizedState=Pf(t,r,a,n);return}}Ot.flags|=e,i.memoizedState=Pf(1|t,r,a,n)}function ZC(e,t){return Fm(8390656,8,e,t)}function Yj(e,t){return kv(2048,8,e,t)}function aL(e,t){return kv(4,2,e,t)}function oL(e,t){return kv(4,4,e,t)}function sL(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lL(e,t,r){return r=r!=null?r.concat([e]):null,kv(4,4,sL.bind(null,t,e),r)}function Xj(){}function cL(e,t){var r=Fn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Wj(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function uL(e,t){var r=Fn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Wj(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function dL(e,t,r){return Ws&21?(gi(r,t)||(r=gI(),Ot.lanes|=r,qs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Yr=!0),e.memoizedState=r)}function QV(e,t){var r=rt;rt=r!==0&&4>r?r:4,e(!0);var n=Eb.transition;Eb.transition={};try{e(!1),t()}finally{rt=r,Eb.transition=n}}function fL(){return Fn().memoizedState}function ZV(e,t,r){var n=Ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},hL(e))pL(t,r);else if(r=GI(e,t,r,n),r!==null){var i=Br();hi(r,e,n,i),mL(r,t,n)}}function eW(e,t,r){var n=Ro(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(hL(e))pL(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,gi(s,o)){var c=t.interleaved;c===null?(i.next=i,Uj(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch(u){}finally{}r=GI(e,t,i,n),r!==null&&(i=Br(),hi(r,e,n,i),mL(r,t,n))}}function hL(e){var t=e.alternate;return e===Ot||t!==null&&t===Ot}function pL(e,t){Wd=Pg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mL(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Nj(e,r)}}var Og={readContext:Un,useCallback:_r,useContext:_r,useEffect:_r,useImperativeHandle:_r,useInsertionEffect:_r,useLayoutEffect:_r,useMemo:_r,useReducer:_r,useRef:_r,useState:_r,useDebugValue:_r,useDeferredValue:_r,useTransition:_r,useMutableSource:_r,useSyncExternalStore:_r,useId:_r,unstable_isNewReconciler:!1},tW={readContext:Un,useCallback:function(e,t){return Ei().memoizedState=[e,t===void 0?null:t],e},useContext:Un,useEffect:ZC,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Fm(4194308,4,sL.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Fm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fm(4,2,e,t)},useMemo:function(e,t){var r=Ei();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ei();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ZV.bind(null,Ot,e),[n.memoizedState,e]},useRef:function(e){var t=Ei();return e={current:e},t.memoizedState=e},useState:QC,useDebugValue:Xj,useDeferredValue:function(e){return Ei().memoizedState=e},useTransition:function(){var e=QC(!1),t=e[0];return e=QV.bind(null,e[1]),Ei().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ot,i=Ei();if(Ct){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=t(),cr===null)throw Error(ne(349));Ws&30||ZI(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,ZC(tL.bind(null,n,a,e),[e]),n.flags|=2048,Pf(9,eL.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Ei(),t=cr.identifierPrefix;if(Ct){var r=ga,n=ma;r=(n&~(1<<32-fi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Tf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=JV++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rW={readContext:Un,useCallback:cL,useContext:Un,useEffect:Yj,useImperativeHandle:lL,useInsertionEffect:aL,useLayoutEffect:oL,useMemo:uL,useReducer:Nb,useRef:iL,useState:function(){return Nb(Af)},useDebugValue:Xj,useDeferredValue:function(e){var t=Fn();return dL(t,er.memoizedState,e)},useTransition:function(){var e=Nb(Af)[0],t=Fn().memoizedState;return[e,t]},useMutableSource:JI,useSyncExternalStore:QI,useId:fL,unstable_isNewReconciler:!1},nW={readContext:Un,useCallback:cL,useContext:Un,useEffect:Yj,useImperativeHandle:lL,useInsertionEffect:aL,useLayoutEffect:oL,useMemo:uL,useReducer:Cb,useRef:iL,useState:function(){return Cb(Af)},useDebugValue:Xj,useDeferredValue:function(e){var t=Fn();return er===null?t.memoizedState=e:dL(t,er.memoizedState,e)},useTransition:function(){var e=Cb(Af)[0],t=Fn().memoizedState;return[e,t]},useMutableSource:JI,useSyncExternalStore:QI,useId:fL,unstable_isNewReconciler:!1};function ei(e,t){if(e&&e.defaultProps){t=Rt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Pw(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Rt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var _v={isMounted:function(e){return(e=e._reactInternals)?ll(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Br(),i=Ro(e),a=ba(n,i);a.payload=t,r!=null&&(a.callback=r),t=Po(e,a,i),t!==null&&(hi(t,e,i,n),Bm(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Br(),i=Ro(e),a=ba(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Po(e,a,i),t!==null&&(hi(t,e,i,n),Bm(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Br(),n=Ro(e),i=ba(r,n);i.tag=2,t!=null&&(i.callback=t),t=Po(e,i,n),t!==null&&(hi(t,e,n,r),Bm(t,e,n))}};function eT(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!_f(r,n)||!_f(i,a):!0}function gL(e,t,r){var n=!1,i=Fo,a=t.contextType;return typeof a=="object"&&a!==null?a=Un(a):(i=Qr(t)?Hs:Ar.current,n=t.contextTypes,a=(n=n!=null)?Kc(e,i):Fo),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_v,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function tT(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&_v.enqueueReplaceState(t,t.state,null)}function Ow(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Fj(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Un(a):(a=Qr(t)?Hs:Ar.current,i.context=Kc(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Pw(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_v.enqueueReplaceState(i,i.state,null),Tg(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function qc(e,t){try{var r="",n=t;do r+=PH(n),n=n.return;while(n);var i=r}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function Tb(e,t,r){return{value:e,source:null,stack:r!=null?r:null,digest:t!=null?t:null}}function Rw(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var iW=typeof WeakMap=="function"?WeakMap:Map;function yL(e,t,r){r=ba(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){$g||($g=!0,Kw=n),Rw(e,t)},r}function vL(e,t,r){r=ba(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Rw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Rw(e,t),typeof n!="function"&&(Oo===null?Oo=new Set([this]):Oo.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function rT(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new iW;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=vW.bind(null,e,t,r),t.then(e,e))}function nT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function iT(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ba(-1,1),t.tag=2,Po(r,t,1))),r.lanes|=1),e)}var aW=Ia.ReactCurrentOwner,Yr=!1;function Dr(e,t,r,n){t.child=e===null?qI(t,null,r,n):Vc(t,e.child,r,n)}function aT(e,t,r,n,i){r=r.render;var a=t.ref;return fc(t,i),n=qj(e,t,r,n,a,i),r=Gj(),e!==null&&!Yr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ca(e,t,i)):(Ct&&r&&Mj(t),t.flags|=1,Dr(e,t,n,i),t.child)}function oT(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!iS(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,xL(e,t,a,n,i)):(e=Wm(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:_f,r(o,n)&&e.ref===t.ref)return Ca(e,t,i)}return t.flags|=1,e=$o(a,n),e.ref=t.ref,e.return=t,t.child=e}function xL(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(_f(a,n)&&e.ref===t.ref)if(Yr=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(Yr=!0);else return t.lanes=e.lanes,Ca(e,t,i)}return $w(e,t,r,n,i)}function bL(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(Zl,ln),ln|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pt(Zl,ln),ln|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,pt(Zl,ln),ln|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,pt(Zl,ln),ln|=n;return Dr(e,t,i,r),t.child}function wL(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function $w(e,t,r,n,i){var a=Qr(r)?Hs:Ar.current;return a=Kc(t,a),fc(t,i),r=qj(e,t,r,n,a,i),n=Gj(),e!==null&&!Yr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ca(e,t,i)):(Ct&&n&&Mj(t),t.flags|=1,Dr(e,t,r,i),t.child)}function sT(e,t,r,n,i){if(Qr(r)){var a=!0;jg(t)}else a=!1;if(fc(t,i),t.stateNode===null)Km(e,t),gL(t,r,n),Ow(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=Un(u):(u=Qr(r)?Hs:Ar.current,u=Kc(t,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||c!==u)&&tT(t,o,n,u),io=!1;var h=t.memoizedState;o.state=h,Tg(t,n,o,i),c=t.memoizedState,s!==n||h!==c||Jr.current||io?(typeof f=="function"&&(Pw(t,r,f,n),c=t.memoizedState),(s=io||eT(t,r,s,n,h,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,YI(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ei(t.type,s),o.props=u,d=t.pendingProps,h=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=Un(c):(c=Qr(r)?Hs:Ar.current,c=Kc(t,c));var p=r.getDerivedStateFromProps;(f=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==d||h!==c)&&tT(t,o,n,c),io=!1,h=t.memoizedState,o.state=h,Tg(t,n,o,i);var m=t.memoizedState;s!==d||h!==m||Jr.current||io?(typeof p=="function"&&(Pw(t,r,p,n),m=t.memoizedState),(u=io||eT(t,r,u,n,h,m,c)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,m,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,m,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),o.props=n,o.state=m,o.context=c,n=u):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Mw(e,t,r,n,a,i)}function Mw(e,t,r,n,i,a){wL(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&WC(t,r,!1),Ca(e,t,a);n=t.stateNode,aW.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Vc(t,e.child,null,a),t.child=Vc(t,null,s,a)):Dr(e,t,s,a),t.memoizedState=n.state,i&&WC(t,r,!0),t.child}function kL(e){var t=e.stateNode;t.pendingContext?VC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&VC(e,t.context,!1),Kj(e,t.containerInfo)}function lT(e,t,r,n,i){return Hc(),Ij(i),t.flags|=256,Dr(e,t,r,n),t.child}var Dw={dehydrated:null,treeContext:null,retryLane:0};function Iw(e){return{baseLanes:e,cachePool:null,transitions:null}}function _L(e,t,r){var n=t.pendingProps,i=Pt.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),pt(Pt,i&1),e===null)return Tw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ev(o,n,0,null),e=zs(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Iw(r),t.memoizedState=Dw,e):Jj(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return oW(e,t,o,n,s,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=$o(i,c),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=$o(s,a):(a=zs(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?Iw(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=Dw,n}return a=e.child,e=a.sibling,n=$o(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Jj(e,t){return t=Ev({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function zp(e,t,r,n){return n!==null&&Ij(n),Vc(t,e.child,null,r),e=Jj(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oW(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=Tb(Error(ne(422))),zp(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=Ev({mode:"visible",children:n.children},i,0,null),a=zs(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Vc(t,e.child,null,o),t.child.memoizedState=Iw(o),t.memoizedState=Dw,a);if(!(t.mode&1))return zp(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(ne(419)),n=Tb(a,n,void 0),zp(e,t,o,n)}if(s=(o&e.childLanes)!==0,Yr||s){if(n=cr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Na(e,i),hi(n,e,i,-1))}return nS(),n=Tb(Error(ne(421))),zp(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=xW.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,hn=Ao(i.nextSibling),pn=t,Ct=!0,si=null,e!==null&&(On[Rn++]=ma,On[Rn++]=ga,On[Rn++]=Vs,ma=e.id,ga=e.overflow,Vs=t),t=Jj(t,n.children),t.flags|=4096,t)}function cT(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Aw(e.return,t,r)}function Ab(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function jL(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Dr(e,t,n.children,r),n=Pt.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cT(e,r,t);else if(e.tag===19)cT(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(pt(Pt,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Ag(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Ab(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ag(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Ab(t,!0,r,null,a);break;case"together":Ab(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Km(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ca(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),qs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ne(153));if(t.child!==null){for(e=t.child,r=$o(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=$o(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function sW(e,t,r){switch(t.tag){case 3:kL(t),Hc();break;case 5:XI(t);break;case 1:Qr(t.type)&&jg(t);break;case 4:Kj(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;pt(Ng,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(pt(Pt,Pt.current&1),t.flags|=128,null):r&t.child.childLanes?_L(e,t,r):(pt(Pt,Pt.current&1),e=Ca(e,t,r),e!==null?e.sibling:null);pt(Pt,Pt.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return jL(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pt(Pt,Pt.current),n)break;return null;case 22:case 23:return t.lanes=0,bL(e,t,r)}return Ca(e,t,r)}var SL,Lw,EL,NL;SL=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Lw=function(){};EL=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,bs(Hi.current);var a=null;switch(r){case"input":i=ow(e,i),n=ow(e,n),a=[];break;case"select":i=Rt({},i,{value:void 0}),n=Rt({},n,{value:void 0}),a=[];break;case"textarea":i=cw(e,i),n=cw(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=kg)}dw(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(gf.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&c!==s&&(c!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(gf.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&bt("scroll",e),a||s===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};NL=function(e,t,r,n){r!==n&&(t.flags|=4)};function dd(e,t){if(!Ct)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function jr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function lW(e,t,r){var n=t.pendingProps;switch(Dj(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jr(t),null;case 1:return Qr(t.type)&&_g(),jr(t),null;case 3:return n=t.stateNode,Wc(),St(Jr),St(Ar),Vj(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ip(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,si!==null&&(Ww(si),si=null))),Lw(e,t),jr(t),null;case 5:Hj(t);var i=bs(Cf.current);if(r=t.type,e!==null&&t.stateNode!=null)EL(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ne(166));return jr(t),null}if(e=bs(Hi.current),Ip(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Ii]=t,n[Ef]=a,e=(t.mode&1)!==0,r){case"dialog":bt("cancel",n),bt("close",n);break;case"iframe":case"object":case"embed":bt("load",n);break;case"video":case"audio":for(i=0;i<Rd.length;i++)bt(Rd[i],n);break;case"source":bt("error",n);break;case"img":case"image":case"link":bt("error",n),bt("load",n);break;case"details":bt("toggle",n);break;case"input":vC(n,a),bt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},bt("invalid",n);break;case"textarea":bC(n,a),bt("invalid",n)}dw(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&Dp(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Dp(n.textContent,s,e),i=["children",""+s]):gf.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&bt("scroll",n)}switch(r){case"input":Cp(n),xC(n,a,!0);break;case"textarea":Cp(n),wC(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=kg)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tI(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Ii]=t,e[Ef]=n,SL(e,t,!1,!1),t.stateNode=e;e:{switch(o=fw(r,n),r){case"dialog":bt("cancel",e),bt("close",e),i=n;break;case"iframe":case"object":case"embed":bt("load",e),i=n;break;case"video":case"audio":for(i=0;i<Rd.length;i++)bt(Rd[i],e);i=n;break;case"source":bt("error",e),i=n;break;case"img":case"image":case"link":bt("error",e),bt("load",e),i=n;break;case"details":bt("toggle",e),i=n;break;case"input":vC(e,n),i=ow(e,n),bt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=Rt({},n,{value:void 0}),bt("invalid",e);break;case"textarea":bC(e,n),i=cw(e,n),bt("invalid",e);break;default:i=n}dw(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var c=s[a];a==="style"?iI(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&rI(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&yf(e,c):typeof c=="number"&&yf(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(gf.hasOwnProperty(a)?c!=null&&a==="onScroll"&&bt("scroll",e):c!=null&&wj(e,a,c,o))}switch(r){case"input":Cp(e),xC(e,n,!1);break;case"textarea":Cp(e),wC(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Uo(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?lc(e,!!n.multiple,a,!1):n.defaultValue!=null&&lc(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=kg)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return jr(t),null;case 6:if(e&&t.stateNode!=null)NL(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ne(166));if(r=bs(Cf.current),bs(Hi.current),Ip(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ii]=t,(a=n.nodeValue!==r)&&(e=pn,e!==null))switch(e.tag){case 3:Dp(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dp(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ii]=t,t.stateNode=n}return jr(t),null;case 13:if(St(Pt),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ct&&hn!==null&&t.mode&1&&!(t.flags&128))VI(),Hc(),t.flags|=98560,a=!1;else if(a=Ip(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(ne(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(ne(317));a[Ii]=t}else Hc(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jr(t),a=!1}else si!==null&&(Ww(si),si=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Pt.current&1?rr===0&&(rr=3):nS())),t.updateQueue!==null&&(t.flags|=4),jr(t),null);case 4:return Wc(),Lw(e,t),e===null&&jf(t.stateNode.containerInfo),jr(t),null;case 10:return Bj(t.type._context),jr(t),null;case 17:return Qr(t.type)&&_g(),jr(t),null;case 19:if(St(Pt),a=t.memoizedState,a===null)return jr(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)dd(a,!1);else{if(rr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ag(e),o!==null){for(t.flags|=128,dd(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return pt(Pt,Pt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Bt()>Gc&&(t.flags|=128,n=!0,dd(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ag(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),dd(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ct)return jr(t),null}else 2*Bt()-a.renderingStartTime>Gc&&r!==1073741824&&(t.flags|=128,n=!0,dd(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Bt(),t.sibling=null,r=Pt.current,pt(Pt,n?r&1|2:r&1),t):(jr(t),null);case 22:case 23:return rS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?ln&1073741824&&(jr(t),t.subtreeFlags&6&&(t.flags|=8192)):jr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function cW(e,t){switch(Dj(t),t.tag){case 1:return Qr(t.type)&&_g(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wc(),St(Jr),St(Ar),Vj(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Hj(t),null;case 13:if(St(Pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Hc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(Pt),null;case 4:return Wc(),null;case 10:return Bj(t.type._context),null;case 22:case 23:return rS(),null;case 24:return null;default:return null}}var Bp=!1,Nr=!1,uW=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ql(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){It(e,t,n)}else r.current=null}function zw(e,t,r){try{r()}catch(n){It(e,t,n)}}var uT=!1;function dW(e,t){if(kw=xg,e=OI(),$j(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(j){r=null;break e}var o=0,s=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==r||i!==0&&d.nodeType!==3||(s=o+i),d!==a||n!==0&&d.nodeType!==3||(c=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++f===n&&(c=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(_w={focusedElem:e,selectionRange:r},xg=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,x=t.stateNode,b=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:ei(t.type,g),v);x.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(j){It(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return m=uT,uT=!1,m}function qd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&zw(t,r,a)}i=i.next}while(i!==n)}}function jv(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Bw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function CL(e){var t=e.alternate;t!==null&&(e.alternate=null,CL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ii],delete t[Ef],delete t[Ew],delete t[qV],delete t[GV])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function TL(e){return e.tag===5||e.tag===3||e.tag===4}function dT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||TL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=kg));else if(n!==4&&(e=e.child,e!==null))for(Uw(e,t,r),e=e.sibling;e!==null;)Uw(e,t,r),e=e.sibling}function Fw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Fw(e,t,r),e=e.sibling;e!==null;)Fw(e,t,r),e=e.sibling}var pr=null,ii=!1;function Ga(e,t,r){for(r=r.child;r!==null;)AL(e,t,r),r=r.sibling}function AL(e,t,r){if(Ki&&typeof Ki.onCommitFiberUnmount=="function")try{Ki.onCommitFiberUnmount(gv,r)}catch(s){}switch(r.tag){case 5:Nr||Ql(r,t);case 6:var n=pr,i=ii;pr=null,Ga(e,t,r),pr=n,ii=i,pr!==null&&(ii?(e=pr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pr.removeChild(r.stateNode));break;case 18:pr!==null&&(ii?(e=pr,r=r.stateNode,e.nodeType===8?_b(e.parentNode,r):e.nodeType===1&&_b(e,r),wf(e)):_b(pr,r.stateNode));break;case 4:n=pr,i=ii,pr=r.stateNode.containerInfo,ii=!0,Ga(e,t,r),pr=n,ii=i;break;case 0:case 11:case 14:case 15:if(!Nr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&zw(r,t,o),i=i.next}while(i!==n)}Ga(e,t,r);break;case 1:if(!Nr&&(Ql(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){It(r,t,s)}Ga(e,t,r);break;case 21:Ga(e,t,r);break;case 22:r.mode&1?(Nr=(n=Nr)||r.memoizedState!==null,Ga(e,t,r),Nr=n):Ga(e,t,r);break;default:Ga(e,t,r)}}function fT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new uW),t.forEach(function(n){var i=bW.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function qn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:pr=s.stateNode,ii=!1;break e;case 3:pr=s.stateNode.containerInfo,ii=!0;break e;case 4:pr=s.stateNode.containerInfo,ii=!0;break e}s=s.return}if(pr===null)throw Error(ne(160));AL(a,o,i),pr=null,ii=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){It(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)PL(t,e),t=t.sibling}function PL(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qn(t,e),ji(e),n&4){try{qd(3,e,e.return),jv(3,e)}catch(g){It(e,e.return,g)}try{qd(5,e,e.return)}catch(g){It(e,e.return,g)}}break;case 1:qn(t,e),ji(e),n&512&&r!==null&&Ql(r,r.return);break;case 5:if(qn(t,e),ji(e),n&512&&r!==null&&Ql(r,r.return),e.flags&32){var i=e.stateNode;try{yf(i,"")}catch(g){It(e,e.return,g)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&ZD(i,a),fw(s,o);var u=fw(s,a);for(o=0;o<c.length;o+=2){var f=c[o],d=c[o+1];f==="style"?iI(i,d):f==="dangerouslySetInnerHTML"?rI(i,d):f==="children"?yf(i,d):wj(i,f,d,u)}switch(s){case"input":sw(i,a);break;case"textarea":eI(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?lc(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?lc(i,!!a.multiple,a.defaultValue,!0):lc(i,!!a.multiple,a.multiple?[]:"",!1))}i[Ef]=a}catch(g){It(e,e.return,g)}}break;case 6:if(qn(t,e),ji(e),n&4){if(e.stateNode===null)throw Error(ne(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){It(e,e.return,g)}}break;case 3:if(qn(t,e),ji(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{wf(t.containerInfo)}catch(g){It(e,e.return,g)}break;case 4:qn(t,e),ji(e);break;case 13:qn(t,e),ji(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(eS=Bt())),n&4&&fT(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(Nr=(u=Nr)||f,qn(t,e),Nr=u):qn(t,e),ji(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(ge=e,f=e.child;f!==null;){for(d=ge=f;ge!==null;){switch(h=ge,p=h.child,h.tag){case 0:case 11:case 14:case 15:qd(4,h,h.return);break;case 1:Ql(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){It(n,r,g)}}break;case 5:Ql(h,h.return);break;case 22:if(h.memoizedState!==null){pT(d);continue}}p!==null?(p.return=h,ge=p):pT(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=nI("display",o))}catch(g){It(e,e.return,g)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){It(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:qn(t,e),ji(e),n&4&&fT(e);break;case 21:break;default:qn(t,e),ji(e)}}function ji(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(TL(r)){var n=r;break e}r=r.return}throw Error(ne(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(yf(i,""),n.flags&=-33);var a=dT(e);Fw(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=dT(e);Uw(e,s,o);break;default:throw Error(ne(161))}}catch(c){It(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fW(e,t,r){ge=e,OL(e)}function OL(e,t,r){for(var n=(e.mode&1)!==0;ge!==null;){var i=ge,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||Bp;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Nr;s=Bp;var u=Nr;if(Bp=o,(Nr=c)&&!u)for(ge=i;ge!==null;)o=ge,c=o.child,o.tag===22&&o.memoizedState!==null?mT(i):c!==null?(c.return=o,ge=c):mT(i);for(;a!==null;)ge=a,OL(a),a=a.sibling;ge=i,Bp=s,Nr=u}hT(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ge=a):hT(e)}}function hT(e){for(;ge!==null;){var t=ge;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nr||jv(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Nr)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:ei(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&JC(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}JC(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&wf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ne(163))}Nr||t.flags&512&&Bw(t)}catch(h){It(t,t.return,h)}}if(t===e){ge=null;break}if(r=t.sibling,r!==null){r.return=t.return,ge=r;break}ge=t.return}}function pT(e){for(;ge!==null;){var t=ge;if(t===e){ge=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ge=r;break}ge=t.return}}function mT(e){for(;ge!==null;){var t=ge;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{jv(4,t)}catch(c){It(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(c){It(t,i,c)}}var a=t.return;try{Bw(t)}catch(c){It(t,a,c)}break;case 5:var o=t.return;try{Bw(t)}catch(c){It(t,o,c)}}}catch(c){It(t,t.return,c)}if(t===e){ge=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ge=s;break}ge=t.return}}var hW=Math.ceil,Rg=Ia.ReactCurrentDispatcher,Qj=Ia.ReactCurrentOwner,In=Ia.ReactCurrentBatchConfig,Xe=0,cr=null,qt=null,wr=0,ln=0,Zl=Go(0),rr=0,Of=null,qs=0,Sv=0,Zj=0,Gd=null,Gr=null,eS=0,Gc=1/0,ua=null,$g=!1,Kw=null,Oo=null,Up=!1,_o=null,Mg=0,Yd=0,Hw=null,Hm=-1,Vm=0;function Br(){return Xe&6?Bt():Hm!==-1?Hm:Hm=Bt()}function Ro(e){return e.mode&1?Xe&2&&wr!==0?wr&-wr:XV.transition!==null?(Vm===0&&(Vm=gI()),Vm):(e=rt,e!==0||(e=window.event,e=e===void 0?16:_I(e.type)),e):1}function hi(e,t,r,n){if(50<Yd)throw Yd=0,Hw=null,Error(ne(185));Gh(e,r,n),(!(Xe&2)||e!==cr)&&(e===cr&&(!(Xe&2)&&(Sv|=r),rr===4&&co(e,wr)),Zr(e,n),r===1&&Xe===0&&!(t.mode&1)&&(Gc=Bt()+500,wv&&Yo()))}function Zr(e,t){var r=e.callbackNode;XH(e,t);var n=vg(e,e===cr?wr:0);if(n===0)r!==null&&jC(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&jC(r),t===1)e.tag===0?YV(gT.bind(null,e)):FI(gT.bind(null,e)),VV(function(){!(Xe&6)&&Yo()}),r=null;else{switch(yI(n)){case 1:r=Ej;break;case 4:r=pI;break;case 16:r=yg;break;case 536870912:r=mI;break;default:r=yg}r=BL(r,RL.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function RL(e,t){if(Hm=-1,Vm=0,Xe&6)throw Error(ne(327));var r=e.callbackNode;if(hc()&&e.callbackNode!==r)return null;var n=vg(e,e===cr?wr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Dg(e,n);else{t=n;var i=Xe;Xe|=2;var a=ML();(cr!==e||wr!==t)&&(ua=null,Gc=Bt()+500,Ls(e,t));do try{gW();break}catch(s){$L(e,s)}while(!0);zj(),Rg.current=a,Xe=i,qt!==null?t=0:(cr=null,wr=0,t=rr)}if(t!==0){if(t===2&&(i=yw(e),i!==0&&(n=i,t=Vw(e,i))),t===1)throw r=Of,Ls(e,0),co(e,n),Zr(e,Bt()),r;if(t===6)co(e,n);else{if(i=e.current.alternate,!(n&30)&&!pW(i)&&(t=Dg(e,n),t===2&&(a=yw(e),a!==0&&(n=a,t=Vw(e,a))),t===1))throw r=Of,Ls(e,0),co(e,n),Zr(e,Bt()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(ne(345));case 2:ds(e,Gr,ua);break;case 3:if(co(e,n),(n&130023424)===n&&(t=eS+500-Bt(),10<t)){if(vg(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Br(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Sw(ds.bind(null,e,Gr,ua),t);break}ds(e,Gr,ua);break;case 4:if(co(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-fi(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=Bt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hW(n/1960))-n,10<n){e.timeoutHandle=Sw(ds.bind(null,e,Gr,ua),n);break}ds(e,Gr,ua);break;case 5:ds(e,Gr,ua);break;default:throw Error(ne(329))}}}return Zr(e,Bt()),e.callbackNode===r?RL.bind(null,e):null}function Vw(e,t){var r=Gd;return e.current.memoizedState.isDehydrated&&(Ls(e,t).flags|=256),e=Dg(e,t),e!==2&&(t=Gr,Gr=r,t!==null&&Ww(t)),e}function Ww(e){Gr===null?Gr=e:Gr.push.apply(Gr,e)}function pW(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!gi(a(),i))return!1}catch(o){return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function co(e,t){for(t&=~Zj,t&=~Sv,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-fi(t),n=1<<r;e[r]=-1,t&=~n}}function gT(e){if(Xe&6)throw Error(ne(327));hc();var t=vg(e,0);if(!(t&1))return Zr(e,Bt()),null;var r=Dg(e,t);if(e.tag!==0&&r===2){var n=yw(e);n!==0&&(t=n,r=Vw(e,n))}if(r===1)throw r=Of,Ls(e,0),co(e,t),Zr(e,Bt()),r;if(r===6)throw Error(ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ds(e,Gr,ua),Zr(e,Bt()),null}function tS(e,t){var r=Xe;Xe|=1;try{return e(t)}finally{Xe=r,Xe===0&&(Gc=Bt()+500,wv&&Yo())}}function Gs(e){_o!==null&&_o.tag===0&&!(Xe&6)&&hc();var t=Xe;Xe|=1;var r=In.transition,n=rt;try{if(In.transition=null,rt=1,e)return e()}finally{rt=n,In.transition=r,Xe=t,!(Xe&6)&&Yo()}}function rS(){ln=Zl.current,St(Zl)}function Ls(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,HV(r)),qt!==null)for(r=qt.return;r!==null;){var n=r;switch(Dj(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&_g();break;case 3:Wc(),St(Jr),St(Ar),Vj();break;case 5:Hj(n);break;case 4:Wc();break;case 13:St(Pt);break;case 19:St(Pt);break;case 10:Bj(n.type._context);break;case 22:case 23:rS()}r=r.return}if(cr=e,qt=e=$o(e.current,null),wr=ln=t,rr=0,Of=null,Zj=Sv=qs=0,Gr=Gd=null,xs!==null){for(t=0;t<xs.length;t++)if(r=xs[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}xs=null}return e}function $L(e,t){do{var r=qt;try{if(zj(),Um.current=Og,Pg){for(var n=Ot.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Pg=!1}if(Ws=0,sr=er=Ot=null,Wd=!1,Tf=0,Qj.current=null,r===null||r.return===null){rr=1,Of=t,qt=null;break}e:{var a=e,o=r.return,s=r,c=t;if(t=wr,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=s,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=nT(o);if(p!==null){p.flags&=-257,iT(p,o,s,a,t),p.mode&1&&rT(a,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}else{if(!(t&1)){rT(a,u,t),nS();break e}c=Error(ne(426))}}else if(Ct&&s.mode&1){var v=nT(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),iT(v,o,s,a,t),Ij(qc(c,s));break e}}a=c=qc(c,s),rr!==4&&(rr=2),Gd===null?Gd=[a]:Gd.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=yL(a,c,t);XC(a,x);break e;case 1:s=c;var b=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Oo===null||!Oo.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=vL(a,s,t);XC(a,j);break e}}a=a.return}while(a!==null)}IL(r)}catch(k){t=k,qt===r&&r!==null&&(qt=r=r.return);continue}break}while(!0)}function ML(){var e=Rg.current;return Rg.current=Og,e===null?Og:e}function nS(){(rr===0||rr===3||rr===2)&&(rr=4),cr===null||!(qs&268435455)&&!(Sv&268435455)||co(cr,wr)}function Dg(e,t){var r=Xe;Xe|=2;var n=ML();(cr!==e||wr!==t)&&(ua=null,Ls(e,t));do try{mW();break}catch(i){$L(e,i)}while(!0);if(zj(),Xe=r,Rg.current=n,qt!==null)throw Error(ne(261));return cr=null,wr=0,rr}function mW(){for(;qt!==null;)DL(qt)}function gW(){for(;qt!==null&&!UH();)DL(qt)}function DL(e){var t=zL(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?IL(e):qt=t,Qj.current=null}function IL(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=cW(r,t),r!==null){r.flags&=32767,qt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{rr=6,qt=null;return}}else if(r=lW(r,t,ln),r!==null){qt=r;return}if(t=t.sibling,t!==null){qt=t;return}qt=t=e}while(t!==null);rr===0&&(rr=5)}function ds(e,t,r){var n=rt,i=In.transition;try{In.transition=null,rt=1,yW(e,t,r,n)}finally{In.transition=i,rt=n}return null}function yW(e,t,r,n){do hc();while(_o!==null);if(Xe&6)throw Error(ne(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ne(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(JH(e,a),e===cr&&(qt=cr=null,wr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Up||(Up=!0,BL(yg,function(){return hc(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=In.transition,In.transition=null;var o=rt;rt=1;var s=Xe;Xe|=4,Qj.current=null,dW(e,r),PL(r,e),IV(_w),xg=!!kw,_w=kw=null,e.current=r,fW(r),FH(),Xe=s,rt=o,In.transition=a}else e.current=r;if(Up&&(Up=!1,_o=e,Mg=i),a=e.pendingLanes,a===0&&(Oo=null),VH(r.stateNode),Zr(e,Bt()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if($g)throw $g=!1,e=Kw,Kw=null,e;return Mg&1&&e.tag!==0&&hc(),a=e.pendingLanes,a&1?e===Hw?Yd++:(Yd=0,Hw=e):Yd=0,Yo(),null}function hc(){if(_o!==null){var e=yI(Mg),t=In.transition,r=rt;try{if(In.transition=null,rt=16>e?16:e,_o===null)var n=!1;else{if(e=_o,_o=null,Mg=0,Xe&6)throw Error(ne(331));var i=Xe;for(Xe|=4,ge=e.current;ge!==null;){var a=ge,o=a.child;if(ge.flags&16){var s=a.deletions;if(s!==null){for(var c=0;c<s.length;c++){var u=s[c];for(ge=u;ge!==null;){var f=ge;switch(f.tag){case 0:case 11:case 15:qd(8,f,a)}var d=f.child;if(d!==null)d.return=f,ge=d;else for(;ge!==null;){f=ge;var h=f.sibling,p=f.return;if(CL(f),f===u){ge=null;break}if(h!==null){h.return=p,ge=h;break}ge=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}ge=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ge=o;else e:for(;ge!==null;){if(a=ge,a.flags&2048)switch(a.tag){case 0:case 11:case 15:qd(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,ge=x;break e}ge=a.return}}var b=e.current;for(ge=b;ge!==null;){o=ge;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,ge=y;else e:for(o=b;ge!==null;){if(s=ge,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:jv(9,s)}}catch(k){It(s,s.return,k)}if(s===o){ge=null;break e}var j=s.sibling;if(j!==null){j.return=s.return,ge=j;break e}ge=s.return}}if(Xe=i,Yo(),Ki&&typeof Ki.onPostCommitFiberRoot=="function")try{Ki.onPostCommitFiberRoot(gv,e)}catch(k){}n=!0}return n}finally{rt=r,In.transition=t}}return!1}function yT(e,t,r){t=qc(r,t),t=yL(e,t,1),e=Po(e,t,1),t=Br(),e!==null&&(Gh(e,1,t),Zr(e,t))}function It(e,t,r){if(e.tag===3)yT(e,e,r);else for(;t!==null;){if(t.tag===3){yT(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Oo===null||!Oo.has(n))){e=qc(r,e),e=vL(t,e,1),t=Po(t,e,1),e=Br(),t!==null&&(Gh(t,1,e),Zr(t,e));break}}t=t.return}}function vW(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Br(),e.pingedLanes|=e.suspendedLanes&r,cr===e&&(wr&r)===r&&(rr===4||rr===3&&(wr&130023424)===wr&&500>Bt()-eS?Ls(e,0):Zj|=r),Zr(e,t)}function LL(e,t){t===0&&(e.mode&1?(t=Pp,Pp<<=1,!(Pp&130023424)&&(Pp=4194304)):t=1);var r=Br();e=Na(e,t),e!==null&&(Gh(e,t,r),Zr(e,r))}function xW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),LL(e,r)}function bW(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(t),LL(e,r)}var zL;zL=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Jr.current)Yr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Yr=!1,sW(e,t,r);Yr=!!(e.flags&131072)}else Yr=!1,Ct&&t.flags&1048576&&KI(t,Eg,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Km(e,t),e=t.pendingProps;var i=Kc(t,Ar.current);fc(t,r),i=qj(null,t,n,e,i,r);var a=Gj();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qr(n)?(a=!0,jg(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Fj(t),i.updater=_v,t.stateNode=i,i._reactInternals=t,Ow(t,n,e,r),t=Mw(null,t,n,!0,a,r)):(t.tag=0,Ct&&a&&Mj(t),Dr(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Km(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=kW(n),e=ei(n,e),i){case 0:t=$w(null,t,n,e,r);break e;case 1:t=sT(null,t,n,e,r);break e;case 11:t=aT(null,t,n,e,r);break e;case 14:t=oT(null,t,n,ei(n.type,e),r);break e}throw Error(ne(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),$w(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),sT(e,t,n,i,r);case 3:e:{if(kL(t),e===null)throw Error(ne(387));n=t.pendingProps,a=t.memoizedState,i=a.element,YI(e,t),Tg(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=qc(Error(ne(423)),t),t=lT(e,t,n,r,i);break e}else if(n!==i){i=qc(Error(ne(424)),t),t=lT(e,t,n,r,i);break e}else for(hn=Ao(t.stateNode.containerInfo.firstChild),pn=t,Ct=!0,si=null,r=qI(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hc(),n===i){t=Ca(e,t,r);break e}Dr(e,t,n,r)}t=t.child}return t;case 5:return XI(t),e===null&&Tw(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,jw(n,i)?o=null:a!==null&&jw(n,a)&&(t.flags|=32),wL(e,t),Dr(e,t,o,r),t.child;case 6:return e===null&&Tw(t),null;case 13:return _L(e,t,r);case 4:return Kj(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Vc(t,null,n,r):Dr(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),aT(e,t,n,i,r);case 7:return Dr(e,t,t.pendingProps,r),t.child;case 8:return Dr(e,t,t.pendingProps.children,r),t.child;case 12:return Dr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,pt(Ng,n._currentValue),n._currentValue=o,a!==null)if(gi(a.value,o)){if(a.children===i.children&&!Jr.current){t=Ca(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=ba(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),Aw(a.return,r,t),s.lanes|=r;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ne(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Aw(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Dr(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,fc(t,r),i=Un(i),n=n(i),t.flags|=1,Dr(e,t,n,r),t.child;case 14:return n=t.type,i=ei(n,t.pendingProps),i=ei(n.type,i),oT(e,t,n,i,r);case 15:return xL(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ei(n,i),Km(e,t),t.tag=1,Qr(n)?(e=!0,jg(t)):e=!1,fc(t,r),gL(t,n,i),Ow(t,n,i,r),Mw(null,t,n,!0,e,r);case 19:return jL(e,t,r);case 22:return bL(e,t,r)}throw Error(ne(156,t.tag))};function BL(e,t){return hI(e,t)}function wW(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,r,n){return new wW(e,t,r,n)}function iS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kW(e){if(typeof e=="function")return iS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_j)return 11;if(e===jj)return 14}return 2}function $o(e,t){var r=e.alternate;return r===null?(r=$n(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Wm(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")iS(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Kl:return zs(r.children,i,a,t);case kj:o=8,i|=8;break;case rw:return e=$n(12,r,t,i|2),e.elementType=rw,e.lanes=a,e;case nw:return e=$n(13,r,t,i),e.elementType=nw,e.lanes=a,e;case iw:return e=$n(19,r,t,i),e.elementType=iw,e.lanes=a,e;case XD:return Ev(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case GD:o=10;break e;case YD:o=9;break e;case _j:o=11;break e;case jj:o=14;break e;case no:o=16,n=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=$n(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function zs(e,t,r,n){return e=$n(7,e,n,t),e.lanes=r,e}function Ev(e,t,r,n){return e=$n(22,e,n,t),e.elementType=XD,e.lanes=r,e.stateNode={isHidden:!1},e}function Pb(e,t,r){return e=$n(6,e,null,t),e.lanes=r,e}function Ob(e,t,r){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _W(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fb(0),this.expirationTimes=fb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fb(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aS(e,t,r,n,i,a,o,s,c){return e=new _W(e,t,r,s,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=$n(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fj(a),e}function jW(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Fl,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function UL(e){if(!e)return Fo;e=e._reactInternals;e:{if(ll(e)!==e||e.tag!==1)throw Error(ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ne(171))}if(e.tag===1){var r=e.type;if(Qr(r))return UI(e,r,t)}return t}function FL(e,t,r,n,i,a,o,s,c){return e=aS(r,n,!0,e,i,a,o,s,c),e.context=UL(null),r=e.current,n=Br(),i=Ro(r),a=ba(n,i),a.callback=t!=null?t:null,Po(r,a,i),e.current.lanes=i,Gh(e,i,n),Zr(e,n),e}function Nv(e,t,r,n){var i=t.current,a=Br(),o=Ro(i);return r=UL(r),t.context===null?t.context=r:t.pendingContext=r,t=ba(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Po(i,t,o),e!==null&&(hi(e,i,o,a),Bm(e,i,o)),o}function Ig(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function oS(e,t){vT(e,t),(e=e.alternate)&&vT(e,t)}function SW(){return null}var KL=typeof reportError=="function"?reportError:function(e){console.error(e)};function sS(e){this._internalRoot=e}Cv.prototype.render=sS.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ne(409));Nv(e,t,null,null)};Cv.prototype.unmount=sS.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gs(function(){Nv(null,e,null,null)}),t[Ea]=null}};function Cv(e){this._internalRoot=e}Cv.prototype.unstable_scheduleHydration=function(e){if(e){var t=bI();e={blockedOn:null,target:e,priority:t};for(var r=0;r<lo.length&&t!==0&&t<lo[r].priority;r++);lo.splice(r,0,e),r===0&&kI(e)}};function lS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xT(){}function EW(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=Ig(o);a.call(u)}}var o=FL(t,n,e,0,null,!1,!1,"",xT);return e._reactRootContainer=o,e[Ea]=o.current,jf(e.nodeType===8?e.parentNode:e),Gs(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=Ig(c);s.call(u)}}var c=aS(e,0,!1,null,null,!1,!1,"",xT);return e._reactRootContainer=c,e[Ea]=c.current,jf(e.nodeType===8?e.parentNode:e),Gs(function(){Nv(t,c,r,n)}),c}function Av(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var c=Ig(o);s.call(c)}}Nv(t,o,e,i)}else o=EW(r,t,e,i,n);return Ig(o)}vI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Od(t.pendingLanes);r!==0&&(Nj(t,r|1),Zr(t,Bt()),!(Xe&6)&&(Gc=Bt()+500,Yo()))}break;case 13:Gs(function(){var n=Na(e,1);if(n!==null){var i=Br();hi(n,e,1,i)}}),oS(e,1)}};Cj=function(e){if(e.tag===13){var t=Na(e,134217728);if(t!==null){var r=Br();hi(t,e,134217728,r)}oS(e,134217728)}};xI=function(e){if(e.tag===13){var t=Ro(e),r=Na(e,t);if(r!==null){var n=Br();hi(r,e,t,n)}oS(e,t)}};bI=function(){return rt};wI=function(e,t){var r=rt;try{return rt=e,t()}finally{rt=r}};pw=function(e,t,r){switch(t){case"input":if(sw(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=bv(n);if(!i)throw Error(ne(90));QD(n),sw(n,i)}}}break;case"textarea":eI(e,r);break;case"select":t=r.value,t!=null&&lc(e,!!r.multiple,t,!1)}};sI=tS;lI=Gs;var NW={usingClientEntryPoint:!1,Events:[Xh,ql,bv,aI,oI,tS]},fd={findFiberByHostInstance:vs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},CW={bundleType:fd.bundleType,version:fd.version,rendererPackageName:fd.rendererPackageName,rendererConfig:fd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ia.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=dI(e),e===null?null:e.stateNode},findFiberByHostInstance:fd.findFiberByHostInstance||SW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var Fp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fp.isDisabled&&Fp.supportsFiber)try{gv=Fp.inject(CW),Ki=Fp}catch(e){}}xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NW;xn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lS(t))throw Error(ne(200));return jW(e,t,null,r)};xn.createRoot=function(e,t){if(!lS(e))throw Error(ne(299));var r=!1,n="",i=KL;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=aS(e,1,!1,null,null,r,!1,n,i),e[Ea]=t.current,jf(e.nodeType===8?e.parentNode:e),new sS(t)};xn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ne(188)):(e=Object.keys(e).join(","),Error(ne(268,e)));return e=dI(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return Gs(e)};xn.hydrate=function(e,t,r){if(!Tv(t))throw Error(ne(200));return Av(null,e,t,!0,r)};xn.hydrateRoot=function(e,t,r){if(!lS(e))throw Error(ne(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=KL;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=FL(t,null,e,1,r!=null?r:null,i,!1,a,o),e[Ea]=t.current,jf(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new Cv(t)};xn.render=function(e,t,r){if(!Tv(t))throw Error(ne(200));return Av(null,e,t,!1,r)};xn.unmountComponentAtNode=function(e){if(!Tv(e))throw Error(ne(40));return e._reactRootContainer?(Gs(function(){Av(null,null,e,!1,function(){e._reactRootContainer=null,e[Ea]=null})}),!0):!1};xn.unstable_batchedUpdates=tS;xn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Tv(r))throw Error(ne(200));if(e==null||e._reactInternals===void 0)throw Error(ne(38));return Av(e,t,r,!1,n)};xn.version="18.3.1-next-f1338f8080-20240426";function HL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HL)}catch(e){console.error(e)}}HL(),HD.exports=xn;var zi=HD.exports;const VL=Qe(zi);var WL,bT=zi;WL=bT.createRoot,bT.hydrateRoot;var TW=typeof Element!="undefined",AW=typeof Map=="function",PW=typeof Set=="function",OW=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function qm(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!qm(e[n],t[n]))return!1;return!0}var a;if(AW&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!qm(n.value[1],t.get(n.value[0])))return!1;return!0}if(PW&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(OW&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(TW&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!qm(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var RW=function(t,r){try{return qm(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const $W=Qe(RW);var MW=function(e,t,r,n,i,a,o,s){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,a,o,s],f=0;c=new Error(t.replace(/%s/g,function(){return u[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},DW=MW;const wT=Qe(DW);var IW=function(t,r,n,i){var a=n?n.call(i,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var o=Object.keys(t),s=Object.keys(r);if(o.length!==s.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<o.length;u++){var f=o[u];if(!c(f))return!1;var d=t[f],h=r[f];if(a=n?n.call(i,d,h,f):void 0,a===!1||a===void 0&&d!==h)return!1}return!0};const LW=Qe(IW);var qL=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(qL||{}),Rb={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},kT=Object.values(qL),Pv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},GL=Object.entries(Pv).reduce((e,[t,r])=>(e[r]=t,e),{}),ui="data-rh",pc={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},mc=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},zW=e=>{let t=mc(e,"title");const r=mc(e,pc.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=mc(e,pc.DEFAULT_TITLE);return t||n||void 0},BW=e=>mc(e,pc.ON_CHANGE_CLIENT_STATE)||(()=>{}),$b=(e,t)=>t.filter(r=>typeof r[e]!="undefined").map(r=>r[e]).reduce((r,n)=>N(N({},r),n),{}),UW=(e,t)=>t.filter(r=>typeof r.base!="undefined").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const i=Object.keys(n);for(let a=0;a<i.length;a+=1){const s=i[a].toLowerCase();if(e.indexOf(s)!==-1&&n[s])return r.concat(n)}}return r},[]),FW=e=>console&&typeof console.warn=="function"&&console.warn(e),hd=(e,t,r)=>{const n={};return r.filter(i=>Array.isArray(i[e])?!0:(typeof i[e]!="undefined"&&FW("Helmet: ".concat(e,' should be of type "Array". Instead found type "').concat(typeof i[e],'"')),!1)).map(i=>i[e]).reverse().reduce((i,a)=>{const o={};a.filter(c=>{let u;const f=Object.keys(c);for(let h=0;h<f.length;h+=1){const p=f[h],m=p.toLowerCase();t.indexOf(m)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(m==="rel"&&c[m].toLowerCase()==="stylesheet")&&(u=m),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(u=p)}if(!u||!c[u])return!1;const d=c[u].toLowerCase();return n[u]||(n[u]={}),o[u]||(o[u]={}),n[u][d]?!1:(o[u][d]=!0,!0)}).reverse().forEach(c=>i.push(c));const s=Object.keys(o);for(let c=0;c<s.length;c+=1){const u=s[c],f=N(N({},n[u]),o[u]);n[u]=f}return i},[]).reverse()},KW=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},HW=e=>({baseTag:UW(["href"],e),bodyAttributes:$b("bodyAttributes",e),defer:mc(e,pc.DEFER),encode:mc(e,pc.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:$b("htmlAttributes",e),linkTags:hd("link",["rel","href"],e),metaTags:hd("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:hd("noscript",["innerHTML"],e),onChangeClientState:BW(e),scriptTags:hd("script",["src","innerHTML"],e),styleTags:hd("style",["cssText"],e),title:zW(e),titleAttributes:$b("titleAttributes",e),prioritizeSeoTags:KW(e,pc.PRIORITIZE_SEO_TAGS)}),YL=e=>Array.isArray(e)?e.join(""):e,VW=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},Mb=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(VW(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},_T=(e,t)=>I(N({},e),{[t]:void 0}),WW=["noscript","script","style"],qw=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),XL=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]!="undefined"?"".concat(r,'="').concat(e[r],'"'):"".concat(r);return t?"".concat(t," ").concat(n):n},""),qW=(e,t,r,n)=>{const i=XL(r),a=YL(t);return i?"<".concat(e," ").concat(ui,'="true" ').concat(i,">").concat(qw(a,n),"</").concat(e,">"):"<".concat(e," ").concat(ui,'="true">').concat(qw(a,n),"</").concat(e,">")},GW=(e,t,r=!0)=>t.reduce((n,i)=>{const a=i,o=Object.keys(a).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,f)=>{const d=typeof a[f]=="undefined"?f:"".concat(f,'="').concat(qw(a[f],r),'"');return u?"".concat(u," ").concat(d):d},""),s=a.innerHTML||a.cssText||"",c=WW.indexOf(e)===-1;return"".concat(n,"<").concat(e," ").concat(ui,'="true" ').concat(o).concat(c?"/>":">".concat(s,"</").concat(e,">"))},""),JL=(e,t={})=>Object.keys(e).reduce((r,n)=>{const i=Pv[n];return r[i||n]=e[n],r},t),YW=(e,t,r)=>{const n={key:t,[ui]:!0},i=JL(r,n);return[$.createElement("title",i,t)]},Gm=(e,t)=>t.map((r,n)=>{const i={key:n,[ui]:!0};return Object.keys(r).forEach(a=>{const s=Pv[a]||a;if(s==="innerHTML"||s==="cssText"){const c=r.innerHTML||r.cssText;i.dangerouslySetInnerHTML={__html:c}}else i[s]=r[a]}),$.createElement(e,i)}),Cn=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>YW(e,t.title,t.titleAttributes),toString:()=>qW(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>JL(t),toString:()=>XL(t)};default:return{toComponent:()=>Gm(e,t),toString:()=>GW(e,t,r)}}},XW=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const i=Mb(e,Rb.meta),a=Mb(t,Rb.link),o=Mb(r,Rb.script);return{priorityMethods:{toComponent:()=>[...Gm("meta",i.priority),...Gm("link",a.priority),...Gm("script",o.priority)],toString:()=>"".concat(Cn("meta",i.priority,n)," ").concat(Cn("link",a.priority,n)," ").concat(Cn("script",o.priority,n))},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},JW=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:f,metaTags:d,scriptTags:h}=e,p={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:p,linkTags:f,metaTags:d,scriptTags:h}=XW(e)),{priority:p,base:Cn("base",t,n),bodyAttributes:Cn("bodyAttributes",r,n),htmlAttributes:Cn("htmlAttributes",i,n),link:Cn("link",f,n),meta:Cn("meta",d,n),noscript:Cn("noscript",a,n),script:Cn("script",h,n),style:Cn("style",o,n),title:Cn("title",{title:s,titleAttributes:c},n)}},Gw=JW,Kp=[],cS=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Yw=class{constructor(e,t){oa(this,"instances",[]);oa(this,"canUseDOM",cS);oa(this,"context");oa(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Kp:this.instances,add:e=>{(this.canUseDOM?Kp:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Kp:this.instances).indexOf(e);(this.canUseDOM?Kp:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Gw({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},QW=parseInt($.version.split(".")[0],10),Xw=QW>=19,ZW={},QL=$.createContext(ZW),Cs,ZL=(Cs=class extends w.Component{constructor(r){super(r);oa(this,"helmetData");Xw?this.helmetData=null:this.helmetData=new Yw(this.props.context||{},Cs.canUseDOM)}render(){return Xw?$.createElement($.Fragment,null,this.props.children):$.createElement(QL.Provider,{value:this.helmetData.value},this.props.children)}},oa(Cs,"canUseDOM",cS),Cs),vl=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll("".concat(e,"[").concat(ui,"]")),i=[].slice.call(n),a=[];let o;return t&&t.length&&t.forEach(s=>{const c=document.createElement(e);for(const u in s)if(Object.prototype.hasOwnProperty.call(s,u))if(u==="innerHTML")c.innerHTML=s.innerHTML;else if(u==="cssText"){const f=s.cssText;c.appendChild(document.createTextNode(f))}else{const f=u,d=typeof s[f]=="undefined"?"":s[f];c.setAttribute(u,d)}c.setAttribute(ui,"true"),i.some((u,f)=>(o=f,c.isEqualNode(u)))?i.splice(o,1):a.push(c)}),i.forEach(s=>{var c;return(c=s.parentNode)==null?void 0:c.removeChild(s)}),a.forEach(s=>r.appendChild(s)),{oldTags:i,newTags:a}},Jw=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(ui),i=n?n.split(","):[],a=[...i],o=Object.keys(t);for(const s of o){const c=t[s]||"";r.getAttribute(s)!==c&&r.setAttribute(s,c),i.indexOf(s)===-1&&i.push(s);const u=a.indexOf(s);u!==-1&&a.splice(u,1)}for(let s=a.length-1;s>=0;s-=1)r.removeAttribute(a[s]);i.length===a.length?r.removeAttribute(ui):r.getAttribute(ui)!==o.join(",")&&r.setAttribute(ui,o.join(","))},e9=(e,t)=>{typeof e!="undefined"&&document.title!==e&&(document.title=YL(e)),Jw("title",t)},jT=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:u,styleTags:f,title:d,titleAttributes:h}=e;Jw("body",n),Jw("html",i),e9(d,h);const p={baseTag:vl("base",r),linkTags:vl("link",a),metaTags:vl("meta",o),noscriptTags:vl("noscript",s),scriptTags:vl("script",u),styleTags:vl("style",f)},m={},g={};Object.keys(p).forEach(v=>{const{newTags:x,oldTags:b}=p[v];x.length&&(m[v]=x),b.length&&(g[v]=p[v].oldTags)}),t&&t(),c(e,m,g)},pd=null,t9=e=>{pd&&cancelAnimationFrame(pd),e.defer?pd=requestAnimationFrame(()=>{jT(e,()=>{pd=null})}):(jT(e),pd=null)},r9=t9,ST=class extends w.Component{constructor(){super(...arguments);oa(this,"rendered",!1)}shouldComponentUpdate(t){return!LW(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const i=HW(t.get().map(a=>{const c=a.props,{context:o}=c;return Z(c,["context"])}));ZL.canUseDOM?r9(i):Gw&&(n=Gw(i)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Ym=[],ET=e=>{const t={};for(const r of Object.keys(e))t[GL[r]||r]=e[r];return t},is=e=>{const t={};for(const r of Object.keys(e)){const n=Pv[r];t[n||r]=e[r]}return t},NT=(e,t)=>{if(!cS)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",i=r.getAttribute(n),a=i?i.split(","):[],o=Object.keys(t);for(const s of a)o.includes(s)||r.removeAttribute(s);for(const s of o){const c=t[s];c==null||c===!1?r.removeAttribute(s):c===!0?r.setAttribute(s,""):r.setAttribute(s,String(c))}o.length>0?r.setAttribute(n,o.join(",")):r.removeAttribute(n)},Db=()=>{const e={},t={};for(const r of Ym){const{htmlAttributes:n,bodyAttributes:i}=r.props;n&&Object.assign(e,ET(n)),i&&Object.assign(t,ET(i))}NT("html",e),NT("body",t)},n9=class extends w.Component{componentDidMount(){Ym.push(this),Db()}componentDidUpdate(){Db()}componentWillUnmount(){const e=Ym.indexOf(this);e!==-1&&Ym.splice(e,1),Db()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return $.createElement("title",is(t),e)}renderBase(){const{base:e}=this.props;return e?$.createElement("base",is(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>$.createElement("meta",N({key:r},is(t))))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>$.createElement("link",N({key:r},is(t))))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const o=t,{innerHTML:n}=o,i=Z(o,["innerHTML"]),a=is(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),$.createElement("script",N({key:r},a))})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const o=t,{cssText:n}=o,i=Z(o,["cssText"]),a=is(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),$.createElement("style",N({key:r},a))})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const o=t,{innerHTML:n}=o,i=Z(o,["innerHTML"]),a=is(i);return n&&(a.dangerouslySetInnerHTML={__html:n}),$.createElement("noscript",N({key:r},a))})}render(){return $.createElement($.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ew,ez=(ew=class extends w.Component{shouldComponentUpdate(e){return!$W(_T(this.props,"helmetData"),_T(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error("<".concat(e.type," /> elements are self-closing and can not contain children. Refer to our API for more information."))}}flattenArrayTypeChildren(e,t,r,n){return I(N({},t),{[e.type]:[...t[e.type]||[],N(N({},r),this.mapNestedChildrenToProps(e,n))]})}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return I(N({},t),{[e.type]:n,titleAttributes:N({},r)});case"body":return I(N({},t),{bodyAttributes:N({},r)});case"html":return I(N({},t),{htmlAttributes:N({},r)});default:return I(N({},t),{[e.type]:N({},r)})}}mapArrayTypeChildrenToProps(e,t){let r=N({},t);return Object.keys(e).forEach(n=>{r=I(N({},r),{[n]:e[n]})}),r}warnOnInvalidChildren(e,t){return wT(kT.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types ".concat(kT.join(", ")," are allowed. Helmet does not support rendering <").concat(e.type,"> elements. Refer to our API for more information.")),wT(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),"Helmet expects a string as a child of <".concat(e.type,">. Did you forget to wrap your children in braces? ( <").concat(e.type,">{``}</").concat(e.type,"> ) Refer to our API for more information.")),!0}mapChildrenToProps(e,t){let r={};return $.Children.forEach(e,n=>{if(!n||!n.props)return;const c=n.props,{children:i}=c,a=Z(c,["children"]),o=Object.keys(a).reduce((u,f)=>(u[GL[f]||f]=a[f],u),{});let{type:s}=n;switch(typeof s=="symbol"?s=s.toString():this.warnOnInvalidChildren(n,i),s){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,o,i);break;default:t=this.mapObjectTypeChildren(n,t,o,i);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const i=this.props,{children:e}=i,t=Z(i,["children"]);let r=N({},t),{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof Yw)){const a=n;n=new Yw(a.context,!0),delete r.helmetData}return Xw?$.createElement(n9,N({},r)):n?$.createElement(ST,I(N({},r),{context:n.value})):$.createElement(QL.Consumer,null,a=>$.createElement(ST,I(N({},r),{context:a})))}},oa(ew,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),ew);const i9=1,a9=1e6;let Ib=0;function o9(){return Ib=(Ib+1)%Number.MAX_SAFE_INTEGER,Ib.toString()}const Lb=new Map,CT=e=>{if(Lb.has(e))return;const t=setTimeout(()=>{Lb.delete(e),Xd({type:"REMOVE_TOAST",toastId:e})},a9);Lb.set(e,t)},s9=(e,t)=>{switch(t.type){case"ADD_TOAST":return I(N({},e),{toasts:[t.toast,...e.toasts].slice(0,i9)});case"UPDATE_TOAST":return I(N({},e),{toasts:e.toasts.map(r=>r.id===t.toast.id?N(N({},r),t.toast):r)});case"DISMISS_TOAST":{const{toastId:r}=t;return r?CT(r):e.toasts.forEach(n=>{CT(n.id)}),I(N({},e),{toasts:e.toasts.map(n=>n.id===r||r===void 0?I(N({},n),{open:!1}):n)})}case"REMOVE_TOAST":return t.toastId===void 0?I(N({},e),{toasts:[]}):I(N({},e),{toasts:e.toasts.filter(r=>r.id!==t.toastId)})}},Xm=[];let Jm={toasts:[]};function Xd(e){Jm=s9(Jm,e),Xm.forEach(t=>{t(Jm)})}function l9(t){var e=Z(t,[]);const r=o9(),n=a=>Xd({type:"UPDATE_TOAST",toast:I(N({},a),{id:r})}),i=()=>Xd({type:"DISMISS_TOAST",toastId:r});return Xd({type:"ADD_TOAST",toast:I(N({},e),{id:r,open:!0,onOpenChange:a=>{a||i()}})}),{id:r,dismiss:i,update:n}}function c9(){const[e,t]=w.useState(Jm);return w.useEffect(()=>(Xm.push(t),()=>{const r=Xm.indexOf(t);r>-1&&Xm.splice(r,1)}),[e]),I(N({},e),{toast:l9,dismiss:r=>Xd({type:"DISMISS_TOAST",toastId:r})})}function ot(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function TT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tz(...e){return t=>{let r=!1;const n=e.map(i=>{const a=TT(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():TT(e[i],null)}}}}function ir(...e){return w.useCallback(tz(...e),e)}function u9(e,t){const r=w.createContext(t),n=a=>{const u=a,{children:o}=u,s=Z(u,["children"]),c=w.useMemo(()=>s,Object.values(s));return l.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function i(a){const o=w.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error("`".concat(a,"` must be used within `").concat(e,"`"))}return[n,i]}function La(e,t=[]){let r=[];function n(a,o){const s=w.createContext(o),c=r.length;r=[...r,o];const u=d=>{var b;const x=d,{scope:h,children:p}=x,m=Z(x,["scope","children"]),g=((b=h==null?void 0:h[e])==null?void 0:b[c])||s,v=w.useMemo(()=>m,Object.values(m));return l.jsx(g.Provider,{value:v,children:p})};u.displayName=a+"Provider";function f(d,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||s,m=w.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error("`".concat(d,"` must be used within `").concat(a,"`"))}return[u,f]}const i=()=>{const a=r.map(o=>w.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return w.useMemo(()=>({["__scope".concat(e)]:I(N({},s),{[e]:c})}),[s,c])}};return i.scopeName=e,[n,d9(i,...t)]}function d9(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:c,scopeName:u})=>{const d=c(a)["__scope".concat(u)];return N(N({},s),d)},{});return w.useMemo(()=>({["__scope".concat(t.scopeName)]:o}),[o])}};return r.scopeName=t.scopeName,r}function Rf(e){const t=h9(e),r=w.forwardRef((n,i)=>{const u=n,{children:a}=u,o=Z(u,["children"]),s=w.Children.toArray(a),c=s.find(p9);if(c){const f=c.props.children,d=s.map(h=>h===c?w.Children.count(f)>1?w.Children.only(null):w.isValidElement(f)?f.props.children:null:h);return l.jsx(t,I(N({},o),{ref:i,children:w.isValidElement(f)?w.cloneElement(f,void 0,d):null}))}return l.jsx(t,I(N({},o),{ref:i,children:a}))});return r.displayName="".concat(e,".Slot"),r}var f9=Rf("Slot");function h9(e){const t=w.forwardRef((r,n)=>{const o=r,{children:i}=o,a=Z(o,["children"]);if(w.isValidElement(i)){const s=g9(i),c=m9(a,i.props);return i.type!==w.Fragment&&(c.ref=n?tz(n,s):s),w.cloneElement(i,c)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var rz=Symbol("radix.slottable");function nz(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName="".concat(e,".Slottable"),t.__radixId=rz,t}function p9(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rz}function m9(e,t){const r=N({},t);for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(r[n]=i):n==="style"?r[n]=N(N({},i),a):n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return N(N({},e),r)}function g9(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function iz(e){const t=e+"CollectionProvider",[r,n]=La(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:v,children:x}=g,b=$.useRef(null),y=$.useRef(new Map).current;return l.jsx(i,{scope:v,itemMap:y,collectionRef:b,children:x})};o.displayName=t;const s=e+"CollectionSlot",c=Rf(s),u=$.forwardRef((g,v)=>{const{scope:x,children:b}=g,y=a(s,x),j=ir(v,y.collectionRef);return l.jsx(c,{ref:j,children:b})});u.displayName=s;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=Rf(f),p=$.forwardRef((g,v)=>{const S=g,{scope:x,children:b}=S,y=Z(S,["scope","children"]),j=$.useRef(null),k=ir(v,j),_=a(f,x);return $.useEffect(()=>(_.itemMap.set(j,N({ref:j},y)),()=>void _.itemMap.delete(j))),l.jsx(h,{[d]:"",ref:k,children:b})});p.displayName=f;function m(g){const v=a(e+"CollectionConsumer",g);return $.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll("[".concat(d,"]")));return Array.from(v.itemMap.values()).sort((_,S)=>y.indexOf(_.ref.current)-y.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},m,n]}var y9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ut=y9.reduce((e,t)=>{const r=Rf("Primitive.".concat(t)),n=w.forwardRef((i,a)=>{const u=i,{asChild:o}=u,s=Z(u,["asChild"]),c=o?r:t;return typeof window!="undefined"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,I(N({},s),{ref:a}))});return n.displayName="Primitive.".concat(t),I(N({},e),{[t]:n})},{});function az(e,t){e&&zi.flushSync(()=>e.dispatchEvent(t))}function Xi(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function v9(e,t=globalThis==null?void 0:globalThis.document){const r=Xi(e);w.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var x9="DismissableLayer",Qw="dismissableLayer.update",b9="dismissableLayer.pointerDownOutside",w9="dismissableLayer.focusOutside",AT,oz=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ov=w.forwardRef((e,t)=>{var E;const S=e,{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s}=S,c=Z(S,["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"]),u=w.useContext(oz),[f,d]=w.useState(null),h=(E=f==null?void 0:f.ownerDocument)!=null?E:globalThis==null?void 0:globalThis.document,[,p]=w.useState({}),m=ir(t,C=>d(C)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(v),b=f?g.indexOf(f):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,j=b>=x,k=_9(C=>{const R=C.target,M=[...u.branches].some(L=>L.contains(R));!j||M||(i==null||i(C),o==null||o(C),C.defaultPrevented||s==null||s())},h),_=j9(C=>{const R=C.target;[...u.branches].some(L=>L.contains(R))||(a==null||a(C),o==null||o(C),C.defaultPrevented||s==null||s())},h);return v9(C=>{b===u.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},h),w.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(AT=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),PT(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=AT)}},[f,h,r,u]),w.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),PT())},[f,u]),w.useEffect(()=>{const C=()=>p({});return document.addEventListener(Qw,C),()=>document.removeEventListener(Qw,C)},[]),l.jsx(ut.div,I(N({},c),{ref:m,style:N({pointerEvents:y?j?"auto":"none":void 0},e.style),onFocusCapture:ot(e.onFocusCapture,_.onFocusCapture),onBlurCapture:ot(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ot(e.onPointerDownCapture,k.onPointerDownCapture)}))});Ov.displayName=x9;var k9="DismissableLayerBranch",sz=w.forwardRef((e,t)=>{const r=w.useContext(oz),n=w.useRef(null),i=ir(t,n);return w.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(ut.div,I(N({},e),{ref:i}))});sz.displayName=k9;function _9(e,t=globalThis==null?void 0:globalThis.document){const r=Xi(e),n=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let c=function(){lz(b9,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function j9(e,t=globalThis==null?void 0:globalThis.document){const r=Xi(e),n=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!n.current&&lz(w9,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function PT(){const e=new CustomEvent(Qw);document.dispatchEvent(e)}function lz(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?az(i,a):i.dispatchEvent(a)}var S9=Ov,E9=sz,Ji=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},N9="Portal",uS=w.forwardRef((e,t)=>{var c;const s=e,{container:r}=s,n=Z(s,["container"]),[i,a]=w.useState(!1);Ji(()=>a(!0),[]);const o=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return o?VL.createPortal(l.jsx(ut.div,I(N({},n),{ref:t})),o):null});uS.displayName=N9;function C9(e,t){return w.useReducer((r,n)=>{const i=t[r][n];return i!=null?i:r},e)}var cl=e=>{const{present:t,children:r}=e,n=T9(t),i=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=ir(n.ref,A9(i));return typeof r=="function"||n.isPresent?w.cloneElement(i,{ref:a}):null};cl.displayName="Presence";function T9(e){const[t,r]=w.useState(),n=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,c]=C9(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Hp(n.current);a.current=s==="mounted"?u:"none"},[s]),Ji(()=>{const u=n.current,f=i.current;if(f!==e){const h=a.current,p=Hp(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ji(()=>{var u;if(t){let f;const d=(u=t.ownerDocument.defaultView)!=null?u:window,h=m=>{const v=Hp(n.current).includes(m.animationName);if(m.target===t&&v&&(c("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=m=>{m.target===t&&(a.current=Hp(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Hp(e){return(e==null?void 0:e.animationName)||"none"}function A9(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var P9=vj[" useInsertionEffect ".trim().toString()]||Ji;function Qh({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=O9({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:i;{const f=w.useRef(e!==void 0);w.useEffect(()=>{const d=f.current;if(d!==s){const h=d?"controlled":"uncontrolled",p=s?"controlled":"uncontrolled";console.warn("".concat(n," is changing from ").concat(h," to ").concat(p,". 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."))}f.current=s},[s,n])}const u=w.useCallback(f=>{var d;if(s){const h=R9(f)?f(e):f;h!==e&&((d=o.current)==null||d.call(o,h))}else a(f)},[s,e,a,o]);return[c,u]}function O9({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),i=w.useRef(r),a=w.useRef(t);return P9(()=>{a.current=t},[t]),w.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function R9(e){return typeof e=="function"}var $9=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"}),M9="VisuallyHidden",Rv=w.forwardRef((e,t)=>l.jsx(ut.span,I(N({},e),{ref:t,style:N(N({},$9),e.style)})));Rv.displayName=M9;var D9=Rv,dS="ToastProvider",[fS,I9,L9]=iz("Toast"),[cz,PIe]=La("Toast",[L9]),[z9,$v]=cz(dS),uz=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[s,c]=w.useState(null),[u,f]=w.useState(0),d=w.useRef(!1),h=w.useRef(!1);return r.trim()||console.error("Invalid prop `label` supplied to `".concat(dS,"`. Expected non-empty `string`.")),l.jsx(fS.Provider,{scope:t,children:l.jsx(z9,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:w.useCallback(()=>f(p=>p+1),[]),onToastRemove:w.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:o})})};uz.displayName=dS;var dz="ToastViewport",B9=["F8"],Zw="toast.viewportPause",e1="toast.viewportResume",fz=w.forwardRef((e,t)=>{const v=e,{__scopeToast:r,hotkey:n=B9,label:i="Notifications ({hotkey})"}=v,a=Z(v,["__scopeToast","hotkey","label"]),o=$v(dz,r),s=I9(r),c=w.useRef(null),u=w.useRef(null),f=w.useRef(null),d=w.useRef(null),h=ir(t,d,o.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=o.toastCount>0;w.useEffect(()=>{const x=b=>{var j;n.length!==0&&n.every(k=>b[k]||b.code===k)&&((j=d.current)==null||j.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),w.useEffect(()=>{const x=c.current,b=d.current;if(m&&x&&b){const y=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(Zw);b.dispatchEvent(S),o.isClosePausedRef.current=!0}},j=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(e1);b.dispatchEvent(S),o.isClosePausedRef.current=!1}},k=S=>{!x.contains(S.relatedTarget)&&j()},_=()=>{x.contains(document.activeElement)||j()};return x.addEventListener("focusin",y),x.addEventListener("focusout",k),x.addEventListener("pointermove",y),x.addEventListener("pointerleave",_),window.addEventListener("blur",y),window.addEventListener("focus",j),()=>{x.removeEventListener("focusin",y),x.removeEventListener("focusout",k),x.removeEventListener("pointermove",y),x.removeEventListener("pointerleave",_),window.removeEventListener("blur",y),window.removeEventListener("focus",j)}}},[m,o.isClosePausedRef]);const g=w.useCallback(({tabbingDirection:x})=>{const y=s().map(j=>{const k=j.ref.current,_=[k,...Z9(k)];return x==="forwards"?_:_.reverse()});return(x==="forwards"?y.reverse():y).flat()},[s]);return w.useEffect(()=>{const x=d.current;if(x){const b=y=>{var _,S,E;const j=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!j){const C=document.activeElement,R=y.shiftKey;if(y.target===x&&R){(_=u.current)==null||_.focus();return}const H=g({tabbingDirection:R?"backwards":"forwards"}),U=H.findIndex(F=>F===C);zb(H.slice(U+1))?y.preventDefault():R?(S=u.current)==null||S.focus():(E=f.current)==null||E.focus()}};return x.addEventListener("keydown",b),()=>x.removeEventListener("keydown",b)}},[s,g]),l.jsxs(E9,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&l.jsx(t1,{ref:u,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"forwards"});zb(x)}}),l.jsx(fS.Slot,{scope:r,children:l.jsx(ut.ol,I(N({tabIndex:-1},a),{ref:h}))}),m&&l.jsx(t1,{ref:f,onFocusFromOutsideViewport:()=>{const x=g({tabbingDirection:"backwards"});zb(x)}})]})});fz.displayName=dz;var hz="ToastFocusProxy",t1=w.forwardRef((e,t)=>{const o=e,{__scopeToast:r,onFocusFromOutsideViewport:n}=o,i=Z(o,["__scopeToast","onFocusFromOutsideViewport"]),a=$v(hz,r);return l.jsx(Rv,I(N({"aria-hidden":!0,tabIndex:0},i),{ref:t,style:{position:"fixed"},onFocus:s=>{var f;const c=s.relatedTarget;!((f=a.viewport)!=null&&f.contains(c))&&n()}}))});t1.displayName=hz;var Zh="Toast",U9="toast.swipeStart",F9="toast.swipeMove",K9="toast.swipeCancel",H9="toast.swipeEnd",pz=w.forwardRef((e,t)=>{const u=e,{forceMount:r,open:n,defaultOpen:i,onOpenChange:a}=u,o=Z(u,["forceMount","open","defaultOpen","onOpenChange"]),[s,c]=Qh({prop:n,defaultProp:i!=null?i:!0,onChange:a,caller:Zh});return l.jsx(cl,{present:r||s,children:l.jsx(q9,I(N({open:s},o),{ref:t,onClose:()=>c(!1),onPause:Xi(e.onPause),onResume:Xi(e.onResume),onSwipeStart:ot(e.onSwipeStart,f=>{f.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ot(e.onSwipeMove,f=>{const{x:d,y:h}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","move"),f.currentTarget.style.setProperty("--radix-toast-swipe-move-x","".concat(d,"px")),f.currentTarget.style.setProperty("--radix-toast-swipe-move-y","".concat(h,"px"))}),onSwipeCancel:ot(e.onSwipeCancel,f=>{f.currentTarget.setAttribute("data-swipe","cancel"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ot(e.onSwipeEnd,f=>{const{x:d,y:h}=f.detail.delta;f.currentTarget.setAttribute("data-swipe","end"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),f.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),f.currentTarget.style.setProperty("--radix-toast-swipe-end-x","".concat(d,"px")),f.currentTarget.style.setProperty("--radix-toast-swipe-end-y","".concat(h,"px")),c(!1)})}))})});pz.displayName=Zh;var[V9,W9]=cz(Zh,{onClose(){}}),q9=w.forwardRef((e,t)=>{const U=e,{__scopeToast:r,type:n="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p}=U,m=Z(U,["__scopeToast","type","duration","open","onClose","onEscapeKeyDown","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd"]),g=$v(Zh,r),[v,x]=w.useState(null),b=ir(t,F=>x(F)),y=w.useRef(null),j=w.useRef(null),k=i||g.duration,_=w.useRef(0),S=w.useRef(k),E=w.useRef(0),{onToastAdd:C,onToastRemove:R}=g,M=Xi(()=>{var O;(v==null?void 0:v.contains(document.activeElement))&&((O=g.viewport)==null||O.focus()),o()}),L=w.useCallback(F=>{!F||F===1/0||(window.clearTimeout(E.current),_.current=new Date().getTime(),E.current=window.setTimeout(M,F))},[M]);w.useEffect(()=>{const F=g.viewport;if(F){const O=()=>{L(S.current),u==null||u()},P=()=>{const A=new Date().getTime()-_.current;S.current=S.current-A,window.clearTimeout(E.current),c==null||c()};return F.addEventListener(Zw,P),F.addEventListener(e1,O),()=>{F.removeEventListener(Zw,P),F.removeEventListener(e1,O)}}},[g.viewport,k,c,u,L]),w.useEffect(()=>{a&&!g.isClosePausedRef.current&&L(k)},[a,k,g.isClosePausedRef,L]),w.useEffect(()=>(C(),()=>R()),[C,R]);const H=w.useMemo(()=>v?wz(v):null,[v]);return g.viewport?l.jsxs(l.Fragment,{children:[H&&l.jsx(G9,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),l.jsx(V9,{scope:r,onClose:M,children:zi.createPortal(l.jsx(fS.ItemSlot,{scope:r,children:l.jsx(S9,{asChild:!0,onEscapeKeyDown:ot(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(ut.li,I(N({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection},m),{ref:b,style:N({userSelect:"none",touchAction:"none"},e.style),onKeyDown:ot(e.onKeyDown,F=>{F.key==="Escape"&&(s==null||s(F.nativeEvent),F.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:ot(e.onPointerDown,F=>{F.button===0&&(y.current={x:F.clientX,y:F.clientY})}),onPointerMove:ot(e.onPointerMove,F=>{if(!y.current)return;const O=F.clientX-y.current.x,P=F.clientY-y.current.y,A=!!j.current,D=["left","right"].includes(g.swipeDirection),B=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,z=D?B(0,O):0,K=D?0:B(0,P),Y=F.pointerType==="touch"?10:2,G={x:z,y:K},re={originalEvent:F,delta:G};A?(j.current=G,Vp(F9,d,re,{discrete:!1})):OT(G,g.swipeDirection,Y)?(j.current=G,Vp(U9,f,re,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(O)>Y||Math.abs(P)>Y)&&(y.current=null)}),onPointerUp:ot(e.onPointerUp,F=>{const O=j.current,P=F.target;if(P.hasPointerCapture(F.pointerId)&&P.releasePointerCapture(F.pointerId),j.current=null,y.current=null,O){const A=F.currentTarget,D={originalEvent:F,delta:O};OT(O,g.swipeDirection,g.swipeThreshold)?Vp(H9,p,D,{discrete:!0}):Vp(K9,h,D,{discrete:!0}),A.addEventListener("click",B=>B.preventDefault(),{once:!0})}})}))})}),g.viewport)})]}):null}),G9=e=>{const u=e,{__scopeToast:t,children:r}=u,n=Z(u,["__scopeToast","children"]),i=$v(Zh,t),[a,o]=w.useState(!1),[s,c]=w.useState(!1);return J9(()=>o(!0)),w.useEffect(()=>{const f=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(f)},[]),s?null:l.jsx(uS,{asChild:!0,children:l.jsx(Rv,I(N({},n),{children:a&&l.jsxs(l.Fragment,{children:[i.label," ",r]})}))})},Y9="ToastTitle",mz=w.forwardRef((e,t)=>{const i=e,{__scopeToast:r}=i,n=Z(i,["__scopeToast"]);return l.jsx(ut.div,I(N({},n),{ref:t}))});mz.displayName=Y9;var X9="ToastDescription",gz=w.forwardRef((e,t)=>{const i=e,{__scopeToast:r}=i,n=Z(i,["__scopeToast"]);return l.jsx(ut.div,I(N({},n),{ref:t}))});gz.displayName=X9;var yz="ToastAction",vz=w.forwardRef((e,t)=>{const i=e,{altText:r}=i,n=Z(i,["altText"]);return r.trim()?l.jsx(bz,{altText:r,asChild:!0,children:l.jsx(hS,I(N({},n),{ref:t}))}):(console.error("Invalid prop `altText` supplied to `".concat(yz,"`. Expected non-empty `string`.")),null)});vz.displayName=yz;var xz="ToastClose",hS=w.forwardRef((e,t)=>{const a=e,{__scopeToast:r}=a,n=Z(a,["__scopeToast"]),i=W9(xz,r);return l.jsx(bz,{asChild:!0,children:l.jsx(ut.button,I(N({type:"button"},n),{ref:t,onClick:ot(e.onClick,i.onClose)}))})});hS.displayName=xz;var bz=w.forwardRef((e,t)=>{const a=e,{__scopeToast:r,altText:n}=a,i=Z(a,["__scopeToast","altText"]);return l.jsx(ut.div,I(N({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i),{ref:t}))});function wz(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Q9(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...wz(n))}}),t}function Vp(e,t,r,{discrete:n}){const i=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?az(i,a):i.dispatchEvent(a)}var OT=(e,t,r=0)=>{const n=Math.abs(e.x),i=Math.abs(e.y),a=n>i;return t==="left"||t==="right"?a&&n>r:!a&&i>r};function J9(e=()=>{}){const t=Xi(e);Ji(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Q9(e){return e.nodeType===e.ELEMENT_NODE}function Z9(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zb(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var e7=uz,kz=fz,_z=pz,jz=mz,Sz=gz,Ez=vz,Nz=hS;function Cz(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Cz(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ge(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Cz(e))&&(n&&(n+=" "),n+=t);return n}const RT=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,$T=Ge,Tz=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return $T(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=a==null?void 0:a[u];if(f===null)return null;const h=RT(f)||RT(d);return i[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let m=f,{class:d,className:h}=m,p=Z(m,["class","className"]);return Object.entries(p).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes(N(N({},a),s)[v]):N(N({},a),s)[v]===x})?[...u,d,h]:u},[]);return $T(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Az=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var r7={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"};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n7=w.forwardRef((u,c)=>{var f=u,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o}=f,s=Z(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return w.createElement("svg",N(I(N({ref:c},r7),{width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Az("lucide",i)}),s),[...o.map(([d,h])=>w.createElement(d,h)),...Array.isArray(a)?a:[a]])});/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ce=(e,t)=>{const r=w.forwardRef((o,a)=>{var s=o,{className:n}=s,i=Z(s,["className"]);return w.createElement(n7,N({ref:a,iconNode:t,className:Az("lucide-".concat(t7(e)),n)},i))});return r.displayName="".concat(e),r};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ys=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gc=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pS=ce("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i7=ce("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pz=ce("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bi=ce("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const a7=ce("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const r1=ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mo=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o7=ce("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Oz=ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jd=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s7=ce("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kn=ce("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mv=ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ta=ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mS=ce("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const l7=ce("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c7=ce("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dv=ce("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u7=ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rz=ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gS=ce("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tu=ce("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $z=ce("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d7=ce("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mz=ce("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yS=ce("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $f=ce("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f7=ce("House",[["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"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const h7=ce("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p7=ce("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dz=ce("Instagram",[["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"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const m7=ce("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g7=ce("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n1=ce("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vS=ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MT=ce("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y7=ce("MailOpen",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yc=ce("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $i=ce("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const v7=ce("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const x7=ce("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xS=ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const b7=ce("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w7=ce("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k7=ce("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _7=ce("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i1=ce("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j7=ce("Pause",[["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"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S7=ce("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const a1=ce("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xo=ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yc=ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E7=ce("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N7=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C7=ce("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Iz=ce("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DT=ce("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T7=ce("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A7=ce("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Iv=ce("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bS=ce("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P7=ce("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qd=ce("Tent",[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lz=ce("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pi=ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O7=ce("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R7=ce("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $7=ce("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M7=ce("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o1=ce("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Do=ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xs=ce("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s1=ce("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D7=ce("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yn=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wS="-",I7=e=>{const t=z7(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(wS);return s[0]===""&&s.length!==1&&s.shift(),zz(s,t)||L7(o)},getConflictingClassGroupIds:(o,s)=>{const c=r[o]||[];return s&&n[o]?[...c,...n[o]]:c}}},zz=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?zz(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(wS);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},IT=/^\[(.+)\]$/,L7=e=>{if(IT.test(e)){const t=IT.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},z7=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return U7(Object.entries(e.classGroups),r).forEach(([a,o])=>{l1(o,n,a,t)}),n},l1=(e,t,r,n)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:LT(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(B7(i)){l1(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{l1(o,LT(t,a),r,n)})})},LT=(e,t)=>{let r=e;return t.split(wS).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},B7=e=>e.isThemeGetter,U7=(e,t)=>t?e.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[r,i]}):e,F7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},Bz="!",K7=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let u=0,f=0,d;for(let v=0;v<s.length;v++){let x=s[v];if(u===0){if(x===i&&(n||s.slice(v,v+a)===t)){c.push(s.slice(f,v)),f=v+a;continue}if(x==="/"){d=v;continue}}x==="["?u++:x==="]"&&u--}const h=c.length===0?s:s.substring(f),p=h.startsWith(Bz),m=p?h.substring(1):h,g=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?s=>r({className:s,parseClassName:o}):o},H7=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},V7=e=>N({cache:F7(e.cacheSize),parseClassName:K7(e)},I7(e)),W7=/\s+/,q7=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(W7);let s="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let m=!!p,g=n(m?h.substring(0,p):h);if(!g){if(!m){s=u+(s.length>0?" "+s:s);continue}if(g=n(h),!g){s=u+(s.length>0?" "+s:s);continue}m=!1}const v=H7(f).join(":"),x=d?v+Bz:v,b=x+g;if(a.includes(b))continue;a.push(b);const y=i(g,m);for(let j=0;j<y.length;++j){const k=y[j];a.push(x+k)}s=u+(s.length>0?" "+s:s)}return s};function G7(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Uz(t))&&(n&&(n+=" "),n+=r);return n}const Uz=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Uz(e[n]))&&(r&&(r+=" "),r+=t);return r};function Y7(e,...t){let r,n,i,a=o;function o(c){const u=t.reduce((f,d)=>d(f),e());return r=V7(u),n=r.cache.get,i=r.cache.set,a=s,s(c)}function s(c){const u=n(c);if(u)return u;const f=q7(c,r);return i(c,f),f}return function(){return a(G7.apply(null,arguments))}}const xt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Fz=/^\[(?:([a-z-]+):)?(.+)\]$/i,X7=/^\d+\/\d+$/,J7=new Set(["px","full","screen"]),Q7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Z7=/\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$/,eq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sa=e=>vc(e)||J7.has(e)||X7.test(e),Ya=e=>Au(e,"length",uq),vc=e=>!!e&&!Number.isNaN(Number(e)),Bb=e=>Au(e,"number",vc),md=e=>!!e&&Number.isInteger(Number(e)),nq=e=>e.endsWith("%")&&vc(e.slice(0,-1)),$e=e=>Fz.test(e),Xa=e=>Q7.test(e),iq=new Set(["length","size","percentage"]),aq=e=>Au(e,iq,Kz),oq=e=>Au(e,"position",Kz),sq=new Set(["image","url"]),lq=e=>Au(e,sq,fq),cq=e=>Au(e,"",dq),gd=()=>!0,Au=(e,t,r)=>{const n=Fz.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},uq=e=>Z7.test(e)&&!eq.test(e),Kz=()=>!1,dq=e=>tq.test(e),fq=e=>rq.test(e),hq=()=>{const e=xt("colors"),t=xt("spacing"),r=xt("blur"),n=xt("brightness"),i=xt("borderColor"),a=xt("borderRadius"),o=xt("borderSpacing"),s=xt("borderWidth"),c=xt("contrast"),u=xt("grayscale"),f=xt("hueRotate"),d=xt("invert"),h=xt("gap"),p=xt("gradientColorStops"),m=xt("gradientColorStopPositions"),g=xt("inset"),v=xt("margin"),x=xt("opacity"),b=xt("padding"),y=xt("saturate"),j=xt("scale"),k=xt("sepia"),_=xt("skew"),S=xt("space"),E=xt("translate"),C=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",$e,t],L=()=>[$e,t],H=()=>["",sa,Ya],U=()=>["auto",vc,$e],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],P=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",$e],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[vc,$e];return{cacheSize:500,separator:":",theme:{colors:[gd],spacing:[sa,Ya],blur:["none","",Xa,$e],brightness:z(),borderColor:[e],borderRadius:["none","","full",Xa,$e],borderSpacing:L(),borderWidth:H(),contrast:z(),grayscale:D(),hueRotate:z(),invert:D(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[nq,Ya],inset:M(),margin:M(),opacity:z(),padding:L(),saturate:z(),scale:z(),sepia:D(),skew:z(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Xa]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),$e]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",md,$e]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",md,$e]}],"grid-cols":[{"grid-cols":[gd]}],"col-start-end":[{col:["auto",{span:["full",md,$e]},$e]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[gd]}],"row-start-end":[{row:["auto",{span:[md,$e]},$e]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$e,t]}],"min-w":[{"min-w":[$e,t,"min","max","fit"]}],"max-w":[{"max-w":[$e,t,"none","full","min","max","fit","prose",{screen:[Xa]},Xa]}],h:[{h:[$e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xa,Ya]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bb]}],"font-family":[{font:[gd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",vc,Bb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sa,$e]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sa,Ya]}],"underline-offset":[{"underline-offset":["auto",sa,$e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),oq]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aq]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lq]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[sa,$e]}],"outline-w":[{outline:[sa,Ya]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[sa,Ya]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xa,cq]}],"shadow-color":[{shadow:[gd]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...P(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":P()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Xa,$e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[md,$e]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sa,Ya,Bb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pq=Y7(hq);function Et(...e){return pq(Ge(e))}const mq=e7,Hz=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(kz,N({ref:r,className:Et("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e)},t))});Hz.displayName=kz.displayName;const gq=Tz("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"}}),Vz=w.forwardRef((i,n)=>{var a=i,{className:e,variant:t}=a,r=Z(a,["className","variant"]);return l.jsx(_z,N({ref:n,className:Et(gq({variant:t}),e)},r))});Vz.displayName=_z.displayName;const yq=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(Ez,N({ref:r,className:Et("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e)},t))});yq.displayName=Ez.displayName;const Wz=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(Nz,I(N({ref:r,className:Et("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":""},t),{children:l.jsx(yn,{className:"h-4 w-4"})}))});Wz.displayName=Nz.displayName;const qz=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(jz,N({ref:r,className:Et("text-sm font-semibold",e)},t))});qz.displayName=jz.displayName;const Gz=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(Sz,N({ref:r,className:Et("text-sm opacity-90",e)},t))});Gz.displayName=Sz.displayName;function vq(){const{toasts:e}=c9();return l.jsxs(mq,{children:[e.map(function(o){var s=o,{id:t,title:r,description:n,action:i}=s,a=Z(s,["id","title","description","action"]);return l.jsxs(Vz,I(N({},a),{children:[l.jsxs("div",{className:"grid gap-1",children:[r&&l.jsx(qz,{children:r}),n&&l.jsx(Gz,{children:n})]}),i,l.jsx(Wz,{})]}),t)}),l.jsx(Hz,{})]})}var zT=["light","dark"],xq="(prefers-color-scheme: dark)",bq=w.createContext(void 0),wq={setTheme:e=>{},themes:[]},kq=()=>{var e;return(e=w.useContext(bq))!=null?e:wq};w.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:i,defaultTheme:a,value:o,attrs:s,nonce:c})=>{let u=a==="system",f=r==="class"?"var d=document.documentElement,c=d.classList;".concat("c.remove(".concat(s.map(m=>"'".concat(m,"'")).join(","),")"),";"):"var d=document.documentElement,n='".concat(r,"',s='setAttribute';"),d=i?zT.includes(a)&&a?"if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'".concat(a,"'"):"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(m,g=!1,v=!0)=>{let x=o?o[m]:m,b=g?m+"|| ''":"'".concat(x,"'"),y="";return i&&v&&!g&&zT.includes(m)&&(y+="d.style.colorScheme = '".concat(m,"';")),r==="class"?g||x?y+="c.add(".concat(b,")"):y+="null":x&&(y+="d[s](n,".concat(b,")")),y},p=e?"!function(){".concat(f).concat(h(e),"}()"):n?"!function(){try{".concat(f,"var e=localStorage.getItem('").concat(t,"');if('system'===e||(!e&&").concat(u,")){var t='").concat(xq,"',m=window.matchMedia(t);if(m.media!==t||m.matches){").concat(h("dark"),"}else{").concat(h("light"),"}}else if(e){").concat(o?"var x=".concat(JSON.stringify(o),";"):"").concat(h(o?"x[e]":"e",!0),"}").concat(u?"":"else{"+h(a,!1,!1)+"}").concat(d,"}catch(e){}}()"):"!function(){try{".concat(f,"var e=localStorage.getItem('").concat(t,"');if(e){").concat(o?"var x=".concat(JSON.stringify(o),";"):"").concat(h(o?"x[e]":"e",!0),"}else{").concat(h(a,!1,!1),";}").concat(d,"}catch(t){}}();");return w.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var _q=e=>{switch(e){case"success":return Eq;case"info":return Cq;case"warning":return Nq;case"error":return Tq;default:return null}},jq=Array(12).fill(0),Sq=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},jq.map((r,n)=>$.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(n)})))),Eq=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Nq=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Cq=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Tq=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Aq=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Pq=()=>{let[e,t]=$.useState(document.hidden);return $.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},c1=1,Oq=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let s=e,{message:r}=s,n=Z(s,["message"]),i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:c1++,a=this.toasts.find(c=>c.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(c=>c.id===i?(this.publish(I(N(N({},c),e),{id:i,title:r})),I(N(N({},c),e),{id:i,dismissible:o,title:r})):c):this.addToast(I(N({title:r},n),{dismissible:o,id:i})),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create(I(N({},t),{message:e})),this.error=(e,t)=>this.create(I(N({},t),{message:e,type:"error"})),this.success=(e,t)=>this.create(I(N({},t),{type:"success",message:e})),this.info=(e,t)=>this.create(I(N({},t),{type:"info",message:e})),this.warning=(e,t)=>this.create(I(N({},t),{type:"warning",message:e})),this.loading=(e,t)=>this.create(I(N({},t),{type:"loading",message:e})),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create(I(N({},t),{promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0})));let n=e instanceof Promise?e:e(),i=r!==void 0,a,o=n.then(c=>T(this,null,function*(){if(a=["resolve",c],$.isValidElement(c))i=!1,this.create({id:r,type:"default",message:c});else if($q(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?yield t.error("HTTP error! status: ".concat(c.status)):t.error,f=typeof t.description=="function"?yield t.description("HTTP error! status: ".concat(c.status)):t.description;this.create({id:r,type:"error",message:u,description:f})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?yield t.success(c):t.success,f=typeof t.description=="function"?yield t.description(c):t.description;this.create({id:r,type:"success",message:u,description:f})}})).catch(c=>T(this,null,function*(){if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?yield t.error(c):t.error,f=typeof t.description=="function"?yield t.description(c):t.description;this.create({id:r,type:"error",message:u,description:f})}})).finally(()=>{var c;i&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),s=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:s}:Object.assign(r,{unwrap:s})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||c1++;return this.create(N({jsx:e(r),id:r},t)),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Wr=new Oq,Rq=(e,t)=>{let r=(t==null?void 0:t.id)||c1++;return Wr.addToast(I(N({title:e},t),{id:r})),r},$q=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Mq=Rq,Dq=()=>Wr.toasts,Iq=()=>Wr.getActiveToasts(),ee=Object.assign(Mq,{success:Wr.success,info:Wr.info,warning:Wr.warning,error:Wr.error,custom:Wr.custom,message:Wr.message,promise:Wr.promise,dismiss:Wr.dismiss,loading:Wr.loading},{getHistory:Dq,getToasts:Iq});function Lq(e,{insertAt:t}={}){if(typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Lq(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;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);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');function Wp(e){return e.label!==void 0}var zq=3,Bq="32px",Uq="16px",BT=4e3,Fq=356,Kq=14,Hq=20,Vq=200;function Gn(...e){return e.filter(Boolean).join(" ")}function Wq(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var qq=e=>{var t,r,n,i,a,o,s,c,u,f,d;let{invert:h,toast:p,unstyled:m,interacting:g,setHeights:v,visibleToasts:x,heights:b,index:y,toasts:j,expanded:k,removeToast:_,defaultRichColors:S,closeButton:E,style:C,cancelButtonStyle:R,actionButtonStyle:M,className:L="",descriptionClassName:H="",duration:U,position:F,gap:O,loadingIcon:P,expandByDefault:A,classNames:D,icons:B,closeButtonAriaLabel:z="Close toast",pauseWhenPageIsHidden:K}=e,[Y,G]=$.useState(null),[re,le]=$.useState(null),[me,Ke]=$.useState(!1),[te,ie]=$.useState(!1),[we,J]=$.useState(!1),[Pe,je]=$.useState(!1),[De,Re]=$.useState(!1),[q,oe]=$.useState(0),[ke,Ie]=$.useState(0),ae=$.useRef(p.duration||U||BT),he=$.useRef(null),ue=$.useRef(null),Ae=y===0,Ce=y+1<=x,Ye=p.type,Yt=p.dismissible!==!1,W=p.className||"",fe=p.descriptionClassName||"",Oe=$.useMemo(()=>b.findIndex(_e=>_e.toastId===p.id)||0,[b,p.id]),Me=$.useMemo(()=>{var _e;return(_e=p.closeButton)!=null?_e:E},[p.closeButton,E]),nn=$.useMemo(()=>p.duration||U||BT,[p.duration,U]),mt=$.useRef(0),at=$.useRef(0),zt=$.useRef(0),dt=$.useRef(null),[tt,wp]=F.split("-"),kp=$.useMemo(()=>b.reduce((_e,ze,Be)=>Be>=Oe?_e:_e+ze.height,0),[b,Oe]),_p=Pq(),nb=p.invert||h,gl=Ye==="loading";at.current=$.useMemo(()=>Oe*O+kp,[Oe,kp]),$.useEffect(()=>{ae.current=nn},[nn]),$.useEffect(()=>{Ke(!0)},[]),$.useEffect(()=>{let _e=ue.current;if(_e){let ze=_e.getBoundingClientRect().height;return Ie(ze),v(Be=>[{toastId:p.id,height:ze,position:p.position},...Be]),()=>v(Be=>Be.filter(yt=>yt.toastId!==p.id))}},[v,p.id]),$.useLayoutEffect(()=>{if(!me)return;let _e=ue.current,ze=_e.style.height;_e.style.height="auto";let Be=_e.getBoundingClientRect().height;_e.style.height=ze,Ie(Be),v(yt=>yt.find($t=>$t.toastId===p.id)?yt.map($t=>$t.toastId===p.id?I(N({},$t),{height:Be}):$t):[{toastId:p.id,height:Be,position:p.position},...yt])},[me,p.title,p.description,v,p.id]);let gt=$.useCallback(()=>{ie(!0),oe(at.current),v(_e=>_e.filter(ze=>ze.toastId!==p.id)),setTimeout(()=>{_(p)},Vq)},[p,_,v,at]);$.useEffect(()=>{if(p.promise&&Ye==="loading"||p.duration===1/0||p.type==="loading")return;let _e;return k||g||K&&_p?(()=>{if(zt.current<mt.current){let ze=new Date().getTime()-mt.current;ae.current=ae.current-ze}zt.current=new Date().getTime()})():ae.current!==1/0&&(mt.current=new Date().getTime(),_e=setTimeout(()=>{var ze;(ze=p.onAutoClose)==null||ze.call(p,p),gt()},ae.current)),()=>clearTimeout(_e)},[k,g,p,Ye,K,_p,gt]),$.useEffect(()=>{p.delete&>()},[gt,p.delete]);function Pr(){var _e,ze,Be;return B!=null&&B.loading?$.createElement("div",{className:Gn(D==null?void 0:D.loader,(_e=p==null?void 0:p.classNames)==null?void 0:_e.loader,"sonner-loader"),"data-visible":Ye==="loading"},B.loading):P?$.createElement("div",{className:Gn(D==null?void 0:D.loader,(ze=p==null?void 0:p.classNames)==null?void 0:ze.loader,"sonner-loader"),"data-visible":Ye==="loading"},P):$.createElement(Sq,{className:Gn(D==null?void 0:D.loader,(Be=p==null?void 0:p.classNames)==null?void 0:Be.loader),visible:Ye==="loading"})}return $.createElement("li",{tabIndex:0,ref:ue,className:Gn(L,W,D==null?void 0:D.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[Ye],(r=p==null?void 0:p.classNames)==null?void 0:r[Ye]),"data-sonner-toast":"","data-rich-colors":(n=p.richColors)!=null?n:S,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":me,"data-promise":!!p.promise,"data-swiped":De,"data-removed":te,"data-visible":Ce,"data-y-position":tt,"data-x-position":wp,"data-index":y,"data-front":Ae,"data-swiping":we,"data-dismissible":Yt,"data-type":Ye,"data-invert":nb,"data-swipe-out":Pe,"data-swipe-direction":re,"data-expanded":!!(k||A&&me),style:N(N({"--index":y,"--toasts-before":y,"--z-index":j.length-y,"--offset":"".concat(te?q:at.current,"px"),"--initial-height":A?"auto":"".concat(ke,"px")},C),p.style),onDragEnd:()=>{J(!1),G(null),dt.current=null},onPointerDown:_e=>{gl||!Yt||(he.current=new Date,oe(at.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(J(!0),dt.current={x:_e.clientX,y:_e.clientY}))},onPointerUp:()=>{var _e,ze,Be,yt;if(Pe||!Yt)return;dt.current=null;let $t=Number(((_e=ue.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Or=Number(((ze=ue.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vt=new Date().getTime()-((Be=he.current)==null?void 0:Be.getTime()),Kt=Y==="x"?$t:Or,Xt=Math.abs(Kt)/vt;if(Math.abs(Kt)>=Hq||Xt>.11){oe(at.current),(yt=p.onDismiss)==null||yt.call(p,p),le(Y==="x"?$t>0?"right":"left":Or>0?"down":"up"),gt(),je(!0),Re(!1);return}J(!1),G(null)},onPointerMove:_e=>{var ze,Be,yt,$t;if(!dt.current||!Yt||((ze=window.getSelection())==null?void 0:ze.toString().length)>0)return;let Or=_e.clientY-dt.current.y,vt=_e.clientX-dt.current.x,Kt=(Be=e.swipeDirections)!=null?Be:Wq(F);!Y&&(Math.abs(vt)>1||Math.abs(Or)>1)&&G(Math.abs(vt)>Math.abs(Or)?"x":"y");let Xt={x:0,y:0};Y==="y"?(Kt.includes("top")||Kt.includes("bottom"))&&(Kt.includes("top")&&Or<0||Kt.includes("bottom")&&Or>0)&&(Xt.y=Or):Y==="x"&&(Kt.includes("left")||Kt.includes("right"))&&(Kt.includes("left")&&vt<0||Kt.includes("right")&&vt>0)&&(Xt.x=vt),(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&Re(!0),(yt=ue.current)==null||yt.style.setProperty("--swipe-amount-x","".concat(Xt.x,"px")),($t=ue.current)==null||$t.style.setProperty("--swipe-amount-y","".concat(Xt.y,"px"))}},Me&&!p.jsx?$.createElement("button",{"aria-label":z,"data-disabled":gl,"data-close-button":!0,onClick:gl||!Yt?()=>{}:()=>{var _e;gt(),(_e=p.onDismiss)==null||_e.call(p,p)},className:Gn(D==null?void 0:D.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(a=B==null?void 0:B.close)!=null?a:Aq):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:$.createElement($.Fragment,null,Ye||p.icon||p.promise?$.createElement("div",{"data-icon":"",className:Gn(D==null?void 0:D.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Pr():null,p.type!=="loading"?p.icon||(B==null?void 0:B[Ye])||_q(Ye):null):null,$.createElement("div",{"data-content":"",className:Gn(D==null?void 0:D.content,(s=p==null?void 0:p.classNames)==null?void 0:s.content)},$.createElement("div",{"data-title":"",className:Gn(D==null?void 0:D.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?$.createElement("div",{"data-description":"",className:Gn(H,fe,D==null?void 0:D.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&Wp(p.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:_e=>{var ze,Be;Wp(p.cancel)&&Yt&&((Be=(ze=p.cancel).onClick)==null||Be.call(ze,_e),gt())},className:Gn(D==null?void 0:D.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&Wp(p.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||M,onClick:_e=>{var ze,Be;Wp(p.action)&&((Be=(ze=p.action).onClick)==null||Be.call(ze,_e),!_e.defaultPrevented&>())},className:Gn(D==null?void 0:D.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function UT(){if(typeof window=="undefined"||typeof document=="undefined")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Gq(e,t){let r={};return[e,t].forEach((n,i)=>{let a=i===1,o=a?"--mobile-offset":"--offset",s=a?Uq:Bq;function c(u){["top","right","bottom","left"].forEach(f=>{r["".concat(o,"-").concat(f)]=typeof u=="number"?"".concat(u,"px"):u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r["".concat(o,"-").concat(u)]=s:r["".concat(o,"-").concat(u)]=typeof n[u]=="number"?"".concat(n[u],"px"):n[u]}):c(s)}),r}var Yq=w.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:s,offset:c,mobileOffset:u,theme:f="light",richColors:d,duration:h,style:p,visibleToasts:m=zq,toastOptions:g,dir:v=UT(),gap:x=Kq,loadingIcon:b,icons:y,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[_,S]=$.useState([]),E=$.useMemo(()=>Array.from(new Set([n].concat(_.filter(K=>K.position).map(K=>K.position)))),[_,n]),[C,R]=$.useState([]),[M,L]=$.useState(!1),[H,U]=$.useState(!1),[F,O]=$.useState(f!=="system"?f:typeof window!="undefined"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=$.useRef(null),A=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=$.useRef(null),B=$.useRef(!1),z=$.useCallback(K=>{S(Y=>{var G;return(G=Y.find(re=>re.id===K.id))!=null&&G.delete||Wr.dismiss(K.id),Y.filter(({id:re})=>re!==K.id)})},[]);return $.useEffect(()=>Wr.subscribe(K=>{if(K.dismiss){S(Y=>Y.map(G=>G.id===K.id?I(N({},G),{delete:!0}):G));return}setTimeout(()=>{VL.flushSync(()=>{S(Y=>{let G=Y.findIndex(re=>re.id===K.id);return G!==-1?[...Y.slice(0,G),N(N({},Y[G]),K),...Y.slice(G+1)]:[K,...Y]})})})}),[]),$.useEffect(()=>{if(f!=="system"){O(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window=="undefined")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:Y})=>{O(Y?"dark":"light")})}catch(Y){K.addListener(({matches:G})=>{try{O(G?"dark":"light")}catch(re){console.error(re)}})}},[f]),$.useEffect(()=>{_.length<=1&&L(!1)},[_]),$.useEffect(()=>{let K=Y=>{var G,re;i.every(le=>Y[le]||Y.code===le)&&(L(!0),(G=P.current)==null||G.focus()),Y.code==="Escape"&&(document.activeElement===P.current||(re=P.current)!=null&&re.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[i]),$.useEffect(()=>{if(P.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,B.current=!1)}},[P.current]),$.createElement("section",{ref:t,"aria-label":"".concat(j," ").concat(A),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((K,Y)=>{var G;let[re,le]=K.split("-");return _.length?$.createElement("ol",{key:K,dir:v==="auto"?UT():v,tabIndex:-1,ref:P,className:s,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":re,"data-lifted":M&&_.length>1&&!a,"data-x-position":le,style:N(N({"--front-toast-height":"".concat(((G=C[0])==null?void 0:G.height)||0,"px"),"--width":"".concat(Fq,"px"),"--gap":"".concat(x,"px")},p),Gq(c,u)),onBlur:me=>{B.current&&!me.currentTarget.contains(me.relatedTarget)&&(B.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||B.current||(B.current=!0,D.current=me.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{H||L(!1)},onDragEnd:()=>L(!1),onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},_.filter(me=>!me.position&&Y===0||me.position===K).map((me,Ke)=>{var te,ie;return $.createElement(qq,{key:me.id,icons:y,index:Ke,toast:me,defaultRichColors:d,duration:(te=g==null?void 0:g.duration)!=null?te:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:(ie=g==null?void 0:g.closeButton)!=null?ie:o,interacting:H,position:K,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:z,toasts:_.filter(we=>we.position==me.position),heights:C.filter(we=>we.position==me.position),setHeights:R,expandByDefault:a,gap:x,loadingIcon:b,expanded:M,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const Xq=t=>{var e=Z(t,[]);const{theme:r="system"}=kq();return l.jsx(Yq,N({theme:r,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},e))};var Jq=vj[" useId ".trim().toString()]||(()=>{}),Qq=0;function Zd(e){const[t,r]=w.useState(Jq());return Ji(()=>{r(n=>n!=null?n:String(Qq++))},[e]),t?"radix-".concat(t):""}const Zq=["top","right","bottom","left"],Ko=Math.min,un=Math.max,Lg=Math.round,qp=Math.floor,Vi=e=>({x:e,y:e}),eG={left:"right",right:"left",bottom:"top",top:"bottom"},tG={start:"end",end:"start"};function u1(e,t,r){return un(e,Ko(t,r))}function Aa(e,t){return typeof e=="function"?e(t):e}function Pa(e){return e.split("-")[0]}function Pu(e){return e.split("-")[1]}function kS(e){return e==="x"?"y":"x"}function _S(e){return e==="y"?"height":"width"}const rG=new Set(["top","bottom"]);function Ui(e){return rG.has(Pa(e))?"y":"x"}function jS(e){return kS(Ui(e))}function nG(e,t,r){r===void 0&&(r=!1);const n=Pu(e),i=jS(e),a=_S(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=zg(o)),[o,zg(o)]}function iG(e){const t=zg(e);return[d1(e),t,d1(t)]}function d1(e){return e.replace(/start|end/g,t=>tG[t])}const FT=["left","right"],KT=["right","left"],aG=["top","bottom"],oG=["bottom","top"];function sG(e,t,r){switch(e){case"top":case"bottom":return r?t?KT:FT:t?FT:KT;case"left":case"right":return t?aG:oG;default:return[]}}function lG(e,t,r,n){const i=Pu(e);let a=sG(Pa(e),r==="start",n);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(d1)))),a}function zg(e){return e.replace(/left|right|bottom|top/g,t=>eG[t])}function cG(e){return N({top:0,right:0,bottom:0,left:0},e)}function Yz(e){return typeof e!="number"?cG(e):{top:e,right:e,bottom:e,left:e}}function Bg(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function HT(e,t,r){let{reference:n,floating:i}=e;const a=Ui(t),o=jS(t),s=_S(o),c=Pa(t),u=a==="y",f=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,h=n[s]/2-i[s]/2;let p;switch(c){case"top":p={x:f,y:n.y-i.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-i.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Pu(t)){case"start":p[o]-=h*(r&&u?-1:1);break;case"end":p[o]+=h*(r&&u?-1:1);break}return p}const uG=(e,t,r)=>T(Da,null,function*(){const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=r,s=a.filter(Boolean),c=yield o.isRTL==null?void 0:o.isRTL(t);let u=yield o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=HT(u,n,c),h=n,p={},m=0;for(let g=0;g<s.length;g++){const{name:v,fn:x}=s[g],{x:b,y,data:j,reset:k}=yield x({x:f,y:d,initialPlacement:n,placement:h,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});f=b!=null?b:f,d=y!=null?y:d,p=I(N({},p),{[v]:N(N({},p[v]),j)}),k&&m<=50&&(m++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?yield o.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:d}=HT(u,h,c)),g=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}});function Mf(e,t){return T(this,null,function*(){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Aa(t,e),m=Yz(p),v=s[h?d==="floating"?"reference":"floating":d],x=Bg(yield a.getClippingRect({element:(r=yield a.isElement==null?void 0:a.isElement(v))==null||r?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:n,y:i,width:o.floating.width,height:o.floating.height}:o.reference,y=yield a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating),j=(yield a.isElement==null?void 0:a.isElement(y))?(yield a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},k=Bg(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:c}):b);return{top:(x.top-k.top+m.top)/j.y,bottom:(k.bottom-x.bottom+m.bottom)/j.y,left:(x.left-k.left+m.left)/j.x,right:(k.right-x.right+m.right)/j.x}})}const dG=e=>({name:"arrow",options:e,fn(r){return T(this,null,function*(){const{x:n,y:i,placement:a,rects:o,platform:s,elements:c,middlewareData:u}=r,{element:f,padding:d=0}=Aa(e,r)||{};if(f==null)return{};const h=Yz(d),p={x:n,y:i},m=jS(a),g=_S(m),v=yield s.getDimensions(f),x=m==="y",b=x?"top":"left",y=x?"bottom":"right",j=x?"clientHeight":"clientWidth",k=o.reference[g]+o.reference[m]-p[m]-o.floating[g],_=p[m]-o.reference[m],S=yield s.getOffsetParent==null?void 0:s.getOffsetParent(f);let E=S?S[j]:0;(!E||!(yield s.isElement==null?void 0:s.isElement(S)))&&(E=c.floating[j]||o.floating[g]);const C=k/2-_/2,R=E/2-v[g]/2-1,M=Ko(h[b],R),L=Ko(h[y],R),H=M,U=E-v[g]-L,F=E/2-v[g]/2+C,O=u1(H,F,U),P=!u.arrow&&Pu(a)!=null&&F!==O&&o.reference[g]/2-(F<H?M:L)-v[g]/2<0,A=P?F<H?F-H:F-U:0;return{[m]:p[m]+A,data:N({[m]:O,centerOffset:F-O-A},P&&{alignmentOffset:A}),reset:P}})}}),fG=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(r){return T(this,null,function*(){var n,i;const{placement:a,middlewareData:o,rects:s,initialPlacement:c,platform:u,elements:f}=r,F=Aa(e,r),{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=F,x=Z(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Pa(a),y=Ui(c),j=Pa(c)===c,k=yield u.isRTL==null?void 0:u.isRTL(f.floating),_=p||(j||!v?[zg(c)]:iG(c)),S=g!=="none";!p&&S&&_.push(...lG(c,v,g,k));const E=[c,..._],C=yield Mf(r,x),R=[];let M=((i=o.flip)==null?void 0:i.overflows)||[];if(d&&R.push(C[b]),h){const O=nG(a,s,k);R.push(C[O[0]],C[O[1]])}if(M=[...M,{placement:a,overflows:R}],!R.every(O=>O<=0)){var L,H;const O=(((L=o.flip)==null?void 0:L.index)||0)+1,P=E[O];if(P&&(!(h==="alignment"?y!==Ui(P):!1)||M.every(B=>B.overflows[0]>0&&Ui(B.placement)===y)))return{data:{index:O,overflows:M},reset:{placement:P}};let A=(H=M.filter(D=>D.overflows[0]<=0).sort((D,B)=>D.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!A)switch(m){case"bestFit":{var U;const D=(U=M.filter(B=>{if(S){const z=Ui(B.placement);return z===y||z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(z=>z>0).reduce((z,K)=>z+K,0)]).sort((B,z)=>B[1]-z[1])[0])==null?void 0:U[0];D&&(A=D);break}case"initialPlacement":A=c;break}if(a!==A)return{reset:{placement:A}}}return{}})}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WT(e){return Zq.some(t=>e[t]>=0)}const hG=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(r){return T(this,null,function*(){const{rects:n}=r,o=Aa(e,r),{strategy:i="referenceHidden"}=o,a=Z(o,["strategy"]);switch(i){case"referenceHidden":{const s=yield Mf(r,I(N({},a),{elementContext:"reference"})),c=VT(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:WT(c)}}}case"escaped":{const s=yield Mf(r,I(N({},a),{altBoundary:!0})),c=VT(s,n.floating);return{data:{escapedOffsets:c,escaped:WT(c)}}}default:return{}}})}}},Xz=new Set(["left","top"]);function pG(e,t){return T(this,null,function*(){const{placement:r,platform:n,elements:i}=e,a=yield n.isRTL==null?void 0:n.isRTL(i.floating),o=Pa(r),s=Pu(r),c=Ui(r)==="y",u=Xz.has(o)?-1:1,f=a&&c?-1:1,d=Aa(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}})}const mG=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(r){return T(this,null,function*(){var n,i;const{x:a,y:o,placement:s,middlewareData:c}=r,u=yield pG(r,e);return s===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:a+u.x,y:o+u.y,data:I(N({},u),{placement:s})}})}}},gG=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(r){return T(this,null,function*(){const{x:n,y:i,placement:a}=r,x=Aa(e,r),{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:b=>{let{x:y,y:j}=b;return{x:y,y:j}}}}=x,u=Z(x,["mainAxis","crossAxis","limiter"]),f={x:n,y:i},d=yield Mf(r,u),h=Ui(Pa(a)),p=kS(h);let m=f[p],g=f[h];if(o){const b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",j=m+d[b],k=m-d[y];m=u1(j,m,k)}if(s){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",j=g+d[b],k=g-d[y];g=u1(j,g,k)}const v=c.fn(I(N({},r),{[p]:m,[h]:g}));return I(N({},v),{data:{x:v.x-n,y:v.y-i,enabled:{[p]:o,[h]:s}}})})}}},yG=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Aa(e,t),f={x:r,y:n},d=Ui(i),h=kS(d);let p=f[h],m=f[d];const g=Aa(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:N({mainAxis:0,crossAxis:0},g);if(c){const y=h==="y"?"height":"width",j=a.reference[h]-a.floating[y]+v.mainAxis,k=a.reference[h]+a.reference[y]-v.mainAxis;p<j?p=j:p>k&&(p=k)}if(u){var x,b;const y=h==="y"?"width":"height",j=Xz.has(Pa(i)),k=a.reference[d]-a.floating[y]+(j&&((x=o.offset)==null?void 0:x[d])||0)+(j?0:v.crossAxis),_=a.reference[d]+a.reference[y]+(j?0:((b=o.offset)==null?void 0:b[d])||0)-(j?v.crossAxis:0);m<k?m=k:m>_&&(m=_)}return{[h]:p,[d]:m}}}},vG=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(r){return T(this,null,function*(){var n,i;const{placement:a,rects:o,platform:s,elements:c}=r,M=Aa(e,r),{apply:u=()=>{}}=M,f=Z(M,["apply"]),d=yield Mf(r,f),h=Pa(a),p=Pu(a),m=Ui(a)==="y",{width:g,height:v}=o.floating;let x,b;h==="top"||h==="bottom"?(x=h,b=p===((yield s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,x=p==="end"?"top":"bottom");const y=v-d.top-d.bottom,j=g-d.left-d.right,k=Ko(v-d[x],y),_=Ko(g-d[b],j),S=!r.middlewareData.shift;let E=k,C=_;if((n=r.middlewareData.shift)!=null&&n.enabled.x&&(C=j),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(E=y),S&&!p){const L=un(d.left,0),H=un(d.right,0),U=un(d.top,0),F=un(d.bottom,0);m?C=g-2*(L!==0||H!==0?L+H:un(d.left,d.right)):E=v-2*(U!==0||F!==0?U+F:un(d.top,d.bottom))}yield u(I(N({},r),{availableWidth:C,availableHeight:E}));const R=yield s.getDimensions(c.floating);return g!==R.width||v!==R.height?{reset:{rects:!0}}:{}})}}};function Lv(){return typeof window!="undefined"}function Ou(e){return Jz(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function na(e){var t;return(t=(Jz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Jz(e){return Lv()?e instanceof Node||e instanceof mn(e).Node:!1}function yi(e){return Lv()?e instanceof Element||e instanceof mn(e).Element:!1}function Qi(e){return Lv()?e instanceof HTMLElement||e instanceof mn(e).HTMLElement:!1}function qT(e){return!Lv()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}const xG=new Set(["inline","contents"]);function ep(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=vi(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!xG.has(i)}const bG=new Set(["table","td","th"]);function wG(e){return bG.has(Ou(e))}const kG=[":popover-open",":modal"];function zv(e){return kG.some(t=>{try{return e.matches(t)}catch(r){return!1}})}const _G=["transform","translate","scale","rotate","perspective"],jG=["transform","translate","scale","rotate","perspective","filter"],SG=["paint","layout","strict","content"];function SS(e){const t=ES(),r=yi(e)?vi(e):e;return _G.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||jG.some(n=>(r.willChange||"").includes(n))||SG.some(n=>(r.contain||"").includes(n))}function EG(e){let t=Ho(e);for(;Qi(t)&&!Xc(t);){if(SS(t))return t;if(zv(t))return null;t=Ho(t)}return null}function ES(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const NG=new Set(["html","body","#document"]);function Xc(e){return NG.has(Ou(e))}function vi(e){return mn(e).getComputedStyle(e)}function Bv(e){return yi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ho(e){if(Ou(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qT(e)&&e.host||na(e);return qT(t)?t.host:t}function Qz(e){const t=Ho(e);return Xc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qi(t)&&ep(t)?t:Qz(t)}function Df(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Qz(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=mn(i);if(a){const s=f1(o);return t.concat(o,o.visualViewport||[],ep(i)?i:[],s&&r?Df(s):[])}return t.concat(i,Df(i,[],r))}function f1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zz(e){const t=vi(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Qi(e),a=i?e.offsetWidth:r,o=i?e.offsetHeight:n,s=Lg(r)!==a||Lg(n)!==o;return s&&(r=a,n=o),{width:r,height:n,$:s}}function NS(e){return yi(e)?e:e.contextElement}function xc(e){const t=NS(e);if(!Qi(t))return Vi(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=Zz(t);let o=(a?Lg(r.width):r.width)/n,s=(a?Lg(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const CG=Vi(0);function e3(e){const t=mn(e);return!ES()||!t.visualViewport?CG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TG(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==mn(e)?!1:t}function Js(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=NS(e);let o=Vi(1);t&&(n?yi(n)&&(o=xc(n)):o=xc(e));const s=TG(a,r,n)?e3(a):Vi(0);let c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,f=i.width/o.x,d=i.height/o.y;if(a){const h=mn(a),p=n&&yi(n)?mn(n):n;let m=h,g=f1(m);for(;g&&n&&p!==m;){const v=xc(g),x=g.getBoundingClientRect(),b=vi(g),y=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,j=x.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,d*=v.y,c+=y,u+=j,m=mn(g),g=f1(m)}}return Bg({width:f,height:d,x:c,y:u})}function CS(e,t){const r=Bv(e).scrollLeft;return t?t.left+r:Js(na(e)).left+r}function t3(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:CS(e,n)),a=n.top+t.scrollTop;return{x:i,y:a}}function AG(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=na(n),s=t?zv(t.floating):!1;if(n===o||s&&a)return r;let c={scrollLeft:0,scrollTop:0},u=Vi(1);const f=Vi(0),d=Qi(n);if((d||!d&&!a)&&((Ou(n)!=="body"||ep(o))&&(c=Bv(n)),Qi(n))){const p=Js(n);u=xc(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const h=o&&!d&&!a?t3(o,c,!0):Vi(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:r.y*u.y-c.scrollTop*u.y+f.y+h.y}}function PG(e){return Array.from(e.getClientRects())}function OG(e){const t=na(e),r=Bv(e),n=e.ownerDocument.body,i=un(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=un(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+CS(e);const s=-r.scrollTop;return vi(n).direction==="rtl"&&(o+=un(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function RG(e,t){const r=mn(e),n=na(e),i=r.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=ES();(!u||u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}const $G=new Set(["absolute","fixed"]);function MG(e,t){const r=Js(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=Qi(e)?xc(e):Vi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,u=n*a.y;return{width:o,height:s,x:c,y:u}}function GT(e,t,r){let n;if(t==="viewport")n=RG(e,r);else if(t==="document")n=OG(na(e));else if(yi(t))n=MG(t,r);else{const i=e3(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Bg(n)}function r3(e,t){const r=Ho(e);return r===t||!yi(r)||Xc(r)?!1:vi(r).position==="fixed"||r3(r,t)}function DG(e,t){const r=t.get(e);if(r)return r;let n=Df(e,[],!1).filter(s=>yi(s)&&Ou(s)!=="body"),i=null;const a=vi(e).position==="fixed";let o=a?Ho(e):e;for(;yi(o)&&!Xc(o);){const s=vi(o),c=SS(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&$G.has(i.position)||ep(o)&&!c&&r3(e,o))?n=n.filter(f=>f!==o):i=s,o=Ho(o)}return t.set(e,n),n}function IG(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?zv(t)?[]:DG(t,this._c):[].concat(r),n],s=o[0],c=o.reduce((u,f)=>{const d=GT(t,f,i);return u.top=un(d.top,u.top),u.right=Ko(d.right,u.right),u.bottom=Ko(d.bottom,u.bottom),u.left=un(d.left,u.left),u},GT(t,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function LG(e){const{width:t,height:r}=Zz(e);return{width:t,height:r}}function zG(e,t,r){const n=Qi(t),i=na(t),a=r==="fixed",o=Js(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Vi(0);function u(){c.x=CS(i)}if(n||!n&&!a)if((Ou(t)!=="body"||ep(i))&&(s=Bv(t)),n){const p=Js(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&u();a&&!n&&i&&u();const f=i&&!n&&!a?t3(i,s):Vi(0),d=o.left+s.scrollLeft-c.x-f.x,h=o.top+s.scrollTop-c.y-f.y;return{x:d,y:h,width:o.width,height:o.height}}function Ub(e){return vi(e).position==="static"}function YT(e,t){if(!Qi(e)||vi(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return na(e)===r&&(r=r.ownerDocument.body),r}function n3(e,t){const r=mn(e);if(zv(e))return r;if(!Qi(e)){let i=Ho(e);for(;i&&!Xc(i);){if(yi(i)&&!Ub(i))return i;i=Ho(i)}return r}let n=YT(e,t);for(;n&&wG(n)&&Ub(n);)n=YT(n,t);return n&&Xc(n)&&Ub(n)&&!SS(n)?r:n||EG(e)||r}const BG=function(e){return T(this,null,function*(){const t=this.getOffsetParent||n3,r=this.getDimensions,n=yield r(e.floating);return{reference:zG(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}})};function UG(e){return vi(e).direction==="rtl"}const FG={convertOffsetParentRelativeRectToViewportRelativeRect:AG,getDocumentElement:na,getClippingRect:IG,getOffsetParent:n3,getElementRects:BG,getClientRects:PG,getDimensions:LG,getScale:xc,isElement:yi,isRTL:UG};function i3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KG(e,t){let r=null,n;const i=na(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=u;if(s||t(),!h||!p)return;const m=qp(d),g=qp(i.clientWidth-(f+h)),v=qp(i.clientHeight-(d+p)),x=qp(f),y={rootMargin:-m+"px "+-g+"px "+-v+"px "+-x+"px",threshold:un(0,Ko(1,c))||1};let j=!0;function k(_){const S=_[0].intersectionRatio;if(S!==c){if(!j)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!i3(u,e.getBoundingClientRect())&&o(),j=!1}try{r=new IntersectionObserver(k,I(N({},y),{root:i.ownerDocument}))}catch(_){r=new IntersectionObserver(k,y)}r.observe(e)}return o(!0),a}function HG(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=NS(e),f=i||a?[...u?Df(u):[],...Df(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",r,{passive:!0}),a&&x.addEventListener("resize",r)});const d=u&&s?KG(u,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),u&&!c&&p.observe(u),p.observe(t));let m,g=c?Js(e):null;c&&v();function v(){const x=Js(e);g&&!i3(g,x)&&r(),g=x,m=requestAnimationFrame(v)}return r(),()=>{var x;f.forEach(b=>{i&&b.removeEventListener("scroll",r),a&&b.removeEventListener("resize",r)}),d==null||d(),(x=p)==null||x.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const VG=mG,WG=gG,qG=fG,GG=vG,YG=hG,XT=dG,XG=yG,JG=(e,t,r)=>{const n=new Map,i=N({platform:FG},r),a=I(N({},i.platform),{_c:n});return uG(e,t,I(N({},i),{platform:a}))};var QG=typeof document!="undefined",ZG=function(){},Qm=QG?w.useLayoutEffect:ZG;function Ug(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 r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ug(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Ug(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function a3(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JT(e,t){const r=a3(e);return Math.round(t*r)/r}function Fb(e){const t=w.useRef(e);return Qm(()=>{t.current=e}),t}function eY(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,d]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=w.useState(n);Ug(h,n)||p(n);const[m,g]=w.useState(null),[v,x]=w.useState(null),b=w.useCallback(A=>{A!==_.current&&(_.current=A,g(A))},[]),y=w.useCallback(A=>{A!==S.current&&(S.current=A,x(A))},[]),j=a||m,k=o||v,_=w.useRef(null),S=w.useRef(null),E=w.useRef(f),C=c!=null,R=Fb(c),M=Fb(i),L=Fb(u),H=w.useCallback(()=>{if(!_.current||!S.current)return;const A={placement:t,strategy:r,middleware:h};M.current&&(A.platform=M.current),JG(_.current,S.current,A).then(D=>{const B=I(N({},D),{isPositioned:L.current!==!1});U.current&&!Ug(E.current,B)&&(E.current=B,zi.flushSync(()=>{d(B)}))})},[h,t,r,M,L]);Qm(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(A=>I(N({},A),{isPositioned:!1})))},[u]);const U=w.useRef(!1);Qm(()=>(U.current=!0,()=>{U.current=!1}),[]),Qm(()=>{if(j&&(_.current=j),k&&(S.current=k),j&&k){if(R.current)return R.current(j,k,H);H()}},[j,k,H,R,C]);const F=w.useMemo(()=>({reference:_,floating:S,setReference:b,setFloating:y}),[b,y]),O=w.useMemo(()=>({reference:j,floating:k}),[j,k]),P=w.useMemo(()=>{const A={position:r,left:0,top:0};if(!O.floating)return A;const D=JT(O.floating,f.x),B=JT(O.floating,f.y);return s?N(I(N({},A),{transform:"translate("+D+"px, "+B+"px)"}),a3(O.floating)>=1.5&&{willChange:"transform"}):{position:r,left:D,top:B}},[r,s,O.floating,f.x,f.y]);return w.useMemo(()=>I(N({},f),{update:H,refs:F,elements:O,floatingStyles:P}),[f,H,F,O,P])}const tY=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?XT({element:n.current,padding:i}).fn(r):{}:n?XT({element:n,padding:i}).fn(r):{}}}},rY=(e,t)=>I(N({},VG(e)),{options:[e,t]}),nY=(e,t)=>I(N({},WG(e)),{options:[e,t]}),iY=(e,t)=>I(N({},XG(e)),{options:[e,t]}),aY=(e,t)=>I(N({},qG(e)),{options:[e,t]}),oY=(e,t)=>I(N({},GG(e)),{options:[e,t]}),sY=(e,t)=>I(N({},YG(e)),{options:[e,t]}),lY=(e,t)=>I(N({},tY(e)),{options:[e,t]});var cY="Arrow",o3=w.forwardRef((e,t)=>{const o=e,{children:r,width:n=10,height:i=5}=o,a=Z(o,["children","width","height"]);return l.jsx(ut.svg,I(N({},a),{ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})}))});o3.displayName=cY;var uY=o3;function dY(e){const[t,r]=w.useState(void 0);return Ji(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;r({width:o,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var s3="Popper",[l3,c3]=La(s3),[OIe,u3]=l3(s3),d3="PopperAnchor",f3=w.forwardRef((e,t)=>{const c=e,{__scopePopper:r,virtualRef:n}=c,i=Z(c,["__scopePopper","virtualRef"]),a=u3(d3,r),o=w.useRef(null),s=ir(t,o);return w.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:l.jsx(ut.div,I(N({},i),{ref:s}))});f3.displayName=d3;var TS="PopperContent",[fY,hY]=l3(TS),h3=w.forwardRef((e,t)=>{var Ke,te,ie,we,J,Pe,je,De;const me=e,{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m}=me,g=Z(me,["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"]),v=u3(TS,r),[x,b]=w.useState(null),y=ir(t,Re=>b(Re)),[j,k]=w.useState(null),_=dY(j),S=(Ke=_==null?void 0:_.width)!=null?Ke:0,E=(te=_==null?void 0:_.height)!=null?te:0,C=n+(a!=="center"?"-"+a:""),R=typeof f=="number"?f:N({top:0,right:0,bottom:0,left:0},f),M=Array.isArray(u)?u:[u],L=M.length>0,H={padding:R,boundary:M.filter(mY),altBoundary:L},{refs:U,floatingStyles:F,placement:O,isPositioned:P,middlewareData:A}=eY({strategy:"fixed",placement:C,whileElementsMounted:(...Re)=>HG(...Re,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[rY({mainAxis:i+E,alignmentAxis:o}),c&&nY(N({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?iY():void 0},H)),c&&aY(N({},H)),oY(I(N({},H),{apply:({elements:Re,rects:q,availableWidth:oe,availableHeight:ke})=>{const{width:Ie,height:ae}=q.reference,he=Re.floating.style;he.setProperty("--radix-popper-available-width","".concat(oe,"px")),he.setProperty("--radix-popper-available-height","".concat(ke,"px")),he.setProperty("--radix-popper-anchor-width","".concat(Ie,"px")),he.setProperty("--radix-popper-anchor-height","".concat(ae,"px"))}})),j&&lY({element:j,padding:s}),gY({arrowWidth:S,arrowHeight:E}),h&&sY(N({strategy:"referenceHidden"},H))]}),[D,B]=g3(O),z=Xi(m);Ji(()=>{P&&(z==null||z())},[P,z]);const K=(ie=A.arrow)==null?void 0:ie.x,Y=(we=A.arrow)==null?void 0:we.y,G=((J=A.arrow)==null?void 0:J.centerOffset)!==0,[re,le]=w.useState();return Ji(()=>{x&&le(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:N(I(N({},F),{transform:P?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(Pe=A.transformOrigin)==null?void 0:Pe.x,(je=A.transformOrigin)==null?void 0:je.y].join(" ")}),((De=A.hide)==null?void 0:De.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}),dir:e.dir,children:l.jsx(fY,{scope:r,placedSide:D,onArrowChange:k,arrowX:K,arrowY:Y,shouldHideArrow:G,children:l.jsx(ut.div,I(N({"data-side":D,"data-align":B},g),{ref:y,style:I(N({},g.style),{animation:P?void 0:"none"})}))})})});h3.displayName=TS;var p3="PopperArrow",pY={top:"bottom",right:"left",bottom:"top",left:"right"},m3=w.forwardRef(function(t,r){const s=t,{__scopePopper:n}=s,i=Z(s,["__scopePopper"]),a=hY(p3,n),o=pY[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(uY,I(N({},i),{ref:r,style:I(N({},i.style),{display:"block"})}))})});m3.displayName=p3;function mY(e){return e!==null}var gY=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b,y,j;const{placement:r,rects:n,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=g3(r),d={start:"0%",center:"50%",end:"100%"}[f],h=((b=(x=i.arrow)==null?void 0:x.x)!=null?b:0)+s/2,p=((j=(y=i.arrow)==null?void 0:y.y)!=null?j:0)+c/2;let m="",g="";return u==="bottom"?(m=o?d:"".concat(h,"px"),g="".concat(-c,"px")):u==="top"?(m=o?d:"".concat(h,"px"),g="".concat(n.floating.height+c,"px")):u==="right"?(m="".concat(-c,"px"),g=o?d:"".concat(p,"px")):u==="left"&&(m="".concat(n.floating.width+c,"px"),g=o?d:"".concat(p,"px")),{data:{x:m,y:g}}}});function g3(e){const[t,r="center"]=e.split("-");return[t,r]}var yY=f3,vY=h3,xY=m3,[Uv,RIe]=La("Tooltip",[c3]),AS=c3(),y3="TooltipProvider",bY=700,QT="tooltip.open",[wY,v3]=Uv(y3),x3=e=>{const{__scopeTooltip:t,delayDuration:r=bY,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,o=w.useRef(!0),s=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(wY,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(u=>{s.current=u},[]),disableHoverableContent:i,children:a})};x3.displayName=y3;var b3="Tooltip",[$Ie,Fv]=Uv(b3),h1="TooltipTrigger",kY=w.forwardRef((e,t)=>{const h=e,{__scopeTooltip:r}=h,n=Z(h,["__scopeTooltip"]),i=Fv(h1,r),a=v3(h1,r),o=AS(r),s=w.useRef(null),c=ir(t,s,i.onTriggerChange),u=w.useRef(!1),f=w.useRef(!1),d=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.jsx(yY,I(N({asChild:!0},o),{children:l.jsx(ut.button,I(N({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},n),{ref:c,onPointerMove:ot(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:ot(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:ot(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ot(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:ot(e.onBlur,i.onClose),onClick:ot(e.onClick,i.onClose)}))}))});kY.displayName=h1;var _Y="TooltipPortal",[MIe,jY]=Uv(_Y,{forceMount:void 0}),Jc="TooltipContent",w3=w.forwardRef((e,t)=>{const r=jY(Jc,e.__scopeTooltip),s=e,{forceMount:n=r.forceMount,side:i="top"}=s,a=Z(s,["forceMount","side"]),o=Fv(Jc,e.__scopeTooltip);return l.jsx(cl,{present:n||o.open,children:o.disableHoverableContent?l.jsx(k3,I(N({side:i},a),{ref:t})):l.jsx(SY,I(N({side:i},a),{ref:t}))})}),SY=w.forwardRef((e,t)=>{const r=Fv(Jc,e.__scopeTooltip),n=v3(Jc,e.__scopeTooltip),i=w.useRef(null),a=ir(t,i),[o,s]=w.useState(null),{trigger:c,onClose:u}=r,f=i.current,{onPointerInTransitChange:d}=n,h=w.useCallback(()=>{s(null),d(!1)},[d]),p=w.useCallback((m,g)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=AY(x,v.getBoundingClientRect()),y=PY(x,b),j=OY(g.getBoundingClientRect()),k=$Y([...y,...j]);s(k),d(!0)},[d]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(c&&f){const m=v=>p(v,f),g=v=>p(v,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),w.useEffect(()=>{if(o){const m=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),y=!RY(x,o);b?h():y&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,o,u,h]),l.jsx(k3,I(N({},e),{ref:a}))}),[EY,NY]=Uv(b3,{isInside:!1}),CY=nz("TooltipContent"),k3=w.forwardRef((e,t)=>{const d=e,{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o}=d,s=Z(d,["__scopeTooltip","children","aria-label","onEscapeKeyDown","onPointerDownOutside"]),c=Fv(Jc,r),u=AS(r),{onClose:f}=c;return w.useEffect(()=>(document.addEventListener(QT,f),()=>document.removeEventListener(QT,f)),[f]),w.useEffect(()=>{if(c.trigger){const h=p=>{const m=p.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),l.jsx(Ov,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:l.jsxs(vY,I(N(N({"data-state":c.stateAttribute},u),s),{ref:t,style:I(N({},s.style),{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}),children:[l.jsx(CY,{children:n}),l.jsx(EY,{scope:r,isInside:!0,children:l.jsx(D9,{id:c.contentId,role:"tooltip",children:i||n})})]}))})});w3.displayName=Jc;var _3="TooltipArrow",TY=w.forwardRef((e,t)=>{const o=e,{__scopeTooltip:r}=o,n=Z(o,["__scopeTooltip"]),i=AS(r);return NY(_3,r).isInside?null:l.jsx(xY,I(N(N({},i),n),{ref:t}))});TY.displayName=_3;function AY(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function PY(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function OY(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function RY(e,t){const{x:r,y:n}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],c=t[o],u=s.x,f=s.y,d=c.x,h=c.y;f>n!=h>n&&r<(d-u)*(n-f)/(h-f)+u&&(i=!i)}return i}function $Y(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),MY(t)}function MY(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const a=r[r.length-1],o=r[r.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var DY=x3,j3=w3;const IY=DY,LY=w.forwardRef((i,n)=>{var a=i,{className:e,sideOffset:t=4}=a,r=Z(a,["className","sideOffset"]);return l.jsx(j3,N({ref:n,sideOffset:t,className:Et("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e)},r))});LY.displayName=j3.displayName;var tp=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(){}},Qs=typeof window=="undefined"||"Deno"in globalThis;function qr(){}function zY(e,t){return typeof e=="function"?e(t):e}function p1(e){return typeof e=="number"&&e>=0&&e!==1/0}function S3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Io(e,t){return typeof e=="function"?e(t):e}function An(e,t){return typeof e=="function"?e(t):e}function ZT(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==PS(o,t.options))return!1}else if(!Lf(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function eA(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(If(t.options.mutationKey)!==If(a))return!1}else if(!Lf(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function PS(e,t){return((t==null?void 0:t.queryKeyHashFn)||If)(e)}function If(e){return JSON.stringify(e,(t,r)=>g1(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Lf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Lf(e[r],t[r])):!1}function E3(e,t){if(e===t)return e;const r=tA(e)&&tA(t);if(r||g1(e)&&g1(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},c=new Set(n);let u=0;for(let f=0;f<o;f++){const d=r?f:a[f];(!r&&c.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,u++):(s[d]=E3(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&u++)}return i===o&&u===i?e:s}return t}function m1(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function tA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function g1(e){if(!rA(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!rA(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rA(e){return Object.prototype.toString.call(e)==="[object Object]"}function BY(e){return new Promise(t=>{setTimeout(t,e)})}function y1(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?E3(e,t):t}function UY(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function FY(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var OS=Symbol();function N3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===OS?()=>Promise.reject(new Error("Missing queryFn: '".concat(e.queryHash,"'"))):e.queryFn}function KY(e,t){return typeof e=="function"?e(...t):!!e}var Ts,po,Ac,uD,HY=(uD=class extends tp{constructor(){super();Te(this,Ts);Te(this,po);Te(this,Ac);ve(this,Ac,t=>{if(!Qs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){V(this,po)||this.setEventListener(V(this,Ac))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,po))==null||t.call(this),ve(this,po,void 0))}setEventListener(t){var r;ve(this,Ac,t),(r=V(this,po))==null||r.call(this),ve(this,po,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){V(this,Ts)!==t&&(ve(this,Ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof V(this,Ts)=="boolean"?V(this,Ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ts=new WeakMap,po=new WeakMap,Ac=new WeakMap,uD),RS=new HY,Pc,mo,Oc,dD,VY=(dD=class extends tp{constructor(){super();Te(this,Pc,!0);Te(this,mo);Te(this,Oc);ve(this,Oc,t=>{if(!Qs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){V(this,mo)||this.setEventListener(V(this,Oc))}onUnsubscribe(){var t;this.hasListeners()||((t=V(this,mo))==null||t.call(this),ve(this,mo,void 0))}setEventListener(t){var r;ve(this,Oc,t),(r=V(this,mo))==null||r.call(this),ve(this,mo,t(this.setOnline.bind(this)))}setOnline(t){V(this,Pc)!==t&&(ve(this,Pc,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return V(this,Pc)}},Pc=new WeakMap,mo=new WeakMap,Oc=new WeakMap,dD),Fg=new VY;function v1(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function WY(e){return Math.min(1e3*qa(2,e),3e4)}function C3(e){return(e!=null?e:"online")==="online"?Fg.isOnline():!0}var T3=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Kb(e){return e instanceof T3}function A3(e){let t=!1,r=0,n=!1,i;const a=v1(),o=g=>{var v;n||(h(new T3(g)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},c=()=>{t=!1},u=()=>RS.isFocused()&&(e.networkMode==="always"||Fg.isOnline())&&e.canRun(),f=()=>C3(e.networkMode)&&e.canRun(),d=g=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,g),i==null||i(),a.resolve(g))},h=g=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,g),i==null||i(),a.reject(g))},p=()=>new Promise(g=>{var v;i=x=>{(n||u())&&g(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;i=void 0,n||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(n)return;let g;const v=r===0?e.initialPromise:void 0;try{g=v!=null?v:e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(d).catch(x=>{var _,S,E;if(n)return;const b=(_=e.retry)!=null?_:Qs?0:3,y=(S=e.retryDelay)!=null?S:WY,j=typeof y=="function"?y(r,x):y,k=b===!0||typeof b=="number"&&r<b||typeof b=="function"&&b(r,x);if(t||!k){h(x);return}r++,(E=e.onFail)==null||E.call(e,r,x),BY(j).then(()=>u()?void 0:p()).then(()=>{t?h(x):m()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:c,canStart:f,start:()=>(f()?m():p().then(m),a)}}var qY=e=>setTimeout(e,0);function GY(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=qY;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(c=>{r(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var vr=GY(),As,fD,P3=(fD=class{constructor(){Te(this,As)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),p1(this.gcTime)&&ve(this,As,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:Qs?1/0:5*60*1e3)}clearGcTimeout(){V(this,As)&&(clearTimeout(V(this,As)),ve(this,As,void 0))}},As=new WeakMap,fD),Rc,Ps,Tn,Os,Sr,Kh,Rs,ri,ca,hD,YY=(hD=class extends P3{constructor(t){var r;super();Te(this,ri);Te(this,Rc);Te(this,Ps);Te(this,Tn);Te(this,Os);Te(this,Sr);Te(this,Kh);Te(this,Rs);ve(this,Rs,!1),ve(this,Kh,t.defaultOptions),this.setOptions(t.options),this.observers=[],ve(this,Os,t.client),ve(this,Tn,V(this,Os).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ve(this,Rc,XY(this.options)),this.state=(r=t.state)!=null?r:V(this,Rc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=V(this,Sr))==null?void 0:t.promise}setOptions(t){this.options=N(N({},V(this,Kh)),t),this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V(this,Tn).remove(this)}setData(t,r){const n=y1(this.state.data,t,this.options);return He(this,ri,ca).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){He(this,ri,ca).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=V(this,Sr))==null?void 0:n.promise;return(i=V(this,Sr))==null||i.cancel(t),r?r.then(qr).catch(qr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V(this,Rc))}isActive(){return this.observers.some(t=>An(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===OS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Io(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:!S3(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=V(this,Sr))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=V(this,Sr))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),V(this,Tn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(V(this,Sr)&&(V(this,Rs)?V(this,Sr).cancel({revert:!0}):V(this,Sr).cancelRetry()),this.scheduleGc()),V(this,Tn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,ri,ca).call(this,{type:"invalidate"})}fetch(t,r){var u,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(V(this,Sr))return V(this,Sr).continueRetry(),V(this,Sr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ve(this,Rs,!0),n.signal)})},a=()=>{const h=N3(this.options,r),m=(()=>{const g={client:V(this,Os),queryKey:this.queryKey,meta:this.meta};return i(g),g})();return ve(this,Rs,!1),this.options.persister?this.options.persister(h,m,this):h(m)},s=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:V(this,Os),state:this.state,fetchFn:a};return i(h),h})();(u=this.options.behavior)==null||u.onFetch(s,this),ve(this,Ps,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&He(this,ri,ca).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta});const c=h=>{var p,m,g,v;Kb(h)&&h.silent||He(this,ri,ca).call(this,{type:"error",error:h}),Kb(h)||((m=(p=V(this,Tn).config).onError)==null||m.call(p,h,this),(v=(g=V(this,Tn).config).onSettled)==null||v.call(g,this.state.data,h,this)),this.scheduleGc()};return ve(this,Sr,A3({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var p,m,g,v;if(h===void 0){c(new Error("".concat(this.queryHash," data is undefined")));return}try{this.setData(h)}catch(x){c(x);return}(m=(p=V(this,Tn).config).onSuccess)==null||m.call(p,h,this),(v=(g=V(this,Tn).config).onSettled)==null||v.call(g,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,p)=>{He(this,ri,ca).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{He(this,ri,ca).call(this,{type:"pause"})},onContinue:()=>{He(this,ri,ca).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),V(this,Sr).start()}},Rc=new WeakMap,Ps=new WeakMap,Tn=new WeakMap,Os=new WeakMap,Sr=new WeakMap,Kh=new WeakMap,Rs=new WeakMap,ri=new WeakSet,ca=function(t){const r=n=>{var i,a;switch(t.type){case"failed":return I(N({},n),{fetchFailureCount:t.failureCount,fetchFailureReason:t.error});case"pause":return I(N({},n),{fetchStatus:"paused"});case"continue":return I(N({},n),{fetchStatus:"fetching"});case"fetch":return I(N(N({},n),O3(n.data,this.options)),{fetchMeta:(i=t.meta)!=null?i:null});case"success":return ve(this,Ps,void 0),N(I(N({},n),{data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(a=t.dataUpdatedAt)!=null?a:Date.now(),error:null,isInvalidated:!1,status:"success"}),!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const o=t.error;return Kb(o)&&o.revert&&V(this,Ps)?I(N({},V(this,Ps)),{fetchStatus:"idle"}):I(N({},n),{error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"});case"invalidate":return I(N({},n),{isInvalidated:!0});case"setState":return N(N({},n),t.state)}};this.state=r(this.state),vr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),V(this,Tn).notify({query:this,type:"updated",action:t})})},hD);function O3(e,t){return N({fetchFailureCount:0,fetchFailureReason:null,fetchStatus:C3(t.networkMode)?"fetching":"paused"},e===void 0&&{error:null,status:"pending"})}function XY(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n!=null?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Pi,pD,JY=(pD=class extends tp{constructor(t={}){super();Te(this,Pi);this.config=t,ve(this,Pi,new Map)}build(t,r,n){var s;const i=r.queryKey,a=(s=r.queryHash)!=null?s:PS(i,r);let o=this.get(a);return o||(o=new YY({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){V(this,Pi).has(t.queryHash)||(V(this,Pi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=V(this,Pi).get(t.queryHash);r&&(t.destroy(),r===t&&V(this,Pi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return V(this,Pi).get(t)}getAll(){return[...V(this,Pi).values()]}find(t){const r=N({exact:!0},t);return this.getAll().find(n=>ZT(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ZT(t,n)):r}notify(t){vr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){vr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pi=new WeakMap,pD),Oi,$r,$s,Ri,Qa,mD,QY=(mD=class extends P3{constructor(t){super();Te(this,Ri);Te(this,Oi);Te(this,$r);Te(this,$s);this.mutationId=t.mutationId,ve(this,$r,t.mutationCache),ve(this,Oi,[]),this.state=t.state||ZY(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){V(this,Oi).includes(t)||(V(this,Oi).push(t),this.clearGcTimeout(),V(this,$r).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ve(this,Oi,V(this,Oi).filter(r=>r!==t)),this.scheduleGc(),V(this,$r).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){V(this,Oi).length||(this.state.status==="pending"?this.scheduleGc():V(this,$r).remove(this))}continue(){var t,r;return(r=(t=V(this,$s))==null?void 0:t.continue())!=null?r:this.execute(this.state.variables)}execute(t){return T(this,null,function*(){var a,o,s,c,u,f,d,h,p,m,g,v,x,b,y,j,k,_,S,E,C;const r=()=>{He(this,Ri,Qa).call(this,{type:"continue"})};ve(this,$s,A3({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{He(this,Ri,Qa).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{He(this,Ri,Qa).call(this,{type:"pause"})},onContinue:r,retry:(a=this.options.retry)!=null?a:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V(this,$r).canRun(this)}));const n=this.state.status==="pending",i=!V(this,$s).canStart();try{if(n)r();else{He(this,Ri,Qa).call(this,{type:"pending",variables:t,isPaused:i}),yield(s=(o=V(this,$r).config).onMutate)==null?void 0:s.call(o,t,this);const M=yield(u=(c=this.options).onMutate)==null?void 0:u.call(c,t);M!==this.state.context&&He(this,Ri,Qa).call(this,{type:"pending",context:M,variables:t,isPaused:i})}const R=yield V(this,$s).start();return yield(d=(f=V(this,$r).config).onSuccess)==null?void 0:d.call(f,R,t,this.state.context,this),yield(p=(h=this.options).onSuccess)==null?void 0:p.call(h,R,t,this.state.context),yield(g=(m=V(this,$r).config).onSettled)==null?void 0:g.call(m,R,null,this.state.variables,this.state.context,this),yield(x=(v=this.options).onSettled)==null?void 0:x.call(v,R,null,t,this.state.context),He(this,Ri,Qa).call(this,{type:"success",data:R}),R}catch(R){try{throw yield(y=(b=V(this,$r).config).onError)==null?void 0:y.call(b,R,t,this.state.context,this),yield(k=(j=this.options).onError)==null?void 0:k.call(j,R,t,this.state.context),yield(S=(_=V(this,$r).config).onSettled)==null?void 0:S.call(_,void 0,R,this.state.variables,this.state.context,this),yield(C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,R,t,this.state.context),R}finally{He(this,Ri,Qa).call(this,{type:"error",error:R})}}finally{V(this,$r).runNext(this)}})}},Oi=new WeakMap,$r=new WeakMap,$s=new WeakMap,Ri=new WeakSet,Qa=function(t){const r=n=>{switch(t.type){case"failed":return I(N({},n),{failureCount:t.failureCount,failureReason:t.error});case"pause":return I(N({},n),{isPaused:!0});case"continue":return I(N({},n),{isPaused:!1});case"pending":return I(N({},n),{context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()});case"success":return I(N({},n),{data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return I(N({},n),{data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"})}};this.state=r(this.state),vr.batch(()=>{V(this,Oi).forEach(n=>{n.onMutationUpdate(t)}),V(this,$r).notify({mutation:this,type:"updated",action:t})})},mD);function ZY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pa,ni,Hh,gD,eX=(gD=class extends tp{constructor(t={}){super();Te(this,pa);Te(this,ni);Te(this,Hh);this.config=t,ve(this,pa,new Set),ve(this,ni,new Map),ve(this,Hh,0)}build(t,r,n){const i=new QY({mutationCache:this,mutationId:++Sp(this,Hh)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){V(this,pa).add(t);const r=Gp(t);if(typeof r=="string"){const n=V(this,ni).get(r);n?n.push(t):V(this,ni).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(V(this,pa).delete(t)){const r=Gp(t);if(typeof r=="string"){const n=V(this,ni).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&V(this,ni).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Gp(t);if(typeof r=="string"){const n=V(this,ni).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n,i;const r=Gp(t);if(typeof r=="string"){const a=(n=V(this,ni).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i=a==null?void 0:a.continue())!=null?i:Promise.resolve()}else return Promise.resolve()}clear(){vr.batch(()=>{V(this,pa).forEach(t=>{this.notify({type:"removed",mutation:t})}),V(this,pa).clear(),V(this,ni).clear()})}getAll(){return Array.from(V(this,pa))}find(t){const r=N({exact:!0},t);return this.getAll().find(n=>eA(r,n))}findAll(t={}){return this.getAll().filter(r=>eA(t,r))}notify(t){vr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return vr.batch(()=>Promise.all(t.map(r=>r.continue().catch(qr))))}},pa=new WeakMap,ni=new WeakMap,Hh=new WeakMap,gD);function Gp(e){var t;return(t=e.options.scope)==null?void 0:t.id}function nA(e){return{onFetch:(t,r)=>{var f,d,h,p,m;const n=t.options,i=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const u=()=>T(this,null,function*(){var y;let g=!1;const v=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=N3(t.options,t.fetchOptions),b=(j,k,_)=>T(this,null,function*(){if(g)return Promise.reject();if(k==null&&j.pages.length)return Promise.resolve(j);const E=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:k,direction:_?"backward":"forward",meta:t.options.meta};return v(L),L})(),C=yield x(E),{maxPages:R}=t.options,M=_?FY:UY;return{pages:M(j.pages,C,R),pageParams:M(j.pageParams,k,R)}});if(i&&a.length){const j=i==="backward",k=j?tX:iA,_={pages:a,pageParams:o},S=k(n,_);s=yield b(_,S,j)}else{const j=e!=null?e:a.length;do{const k=c===0?(y=o[0])!=null?y:n.initialPageParam:iA(n,s);if(c>0&&k==null)break;s=yield b(s,k),c++}while(c<j)}return s});t.options.persister?t.fetchFn=()=>{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function iA(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function tX(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Mt,go,yo,$c,Mc,vo,Dc,Ic,yD,rX=(yD=class{constructor(e={}){Te(this,Mt);Te(this,go);Te(this,yo);Te(this,$c);Te(this,Mc);Te(this,vo);Te(this,Dc);Te(this,Ic);ve(this,Mt,e.queryCache||new JY),ve(this,go,e.mutationCache||new eX),ve(this,yo,e.defaultOptions||{}),ve(this,$c,new Map),ve(this,Mc,new Map),ve(this,vo,0)}mount(){Sp(this,vo)._++,V(this,vo)===1&&(ve(this,Dc,RS.subscribe(e=>T(this,null,function*(){e&&(yield this.resumePausedMutations(),V(this,Mt).onFocus())}))),ve(this,Ic,Fg.subscribe(e=>T(this,null,function*(){e&&(yield this.resumePausedMutations(),V(this,Mt).onOnline())}))))}unmount(){var e,t;Sp(this,vo)._--,V(this,vo)===0&&((e=V(this,Dc))==null||e.call(this),ve(this,Dc,void 0),(t=V(this,Ic))==null||t.call(this),ve(this,Ic,void 0))}isFetching(e){return V(this,Mt).findAll(I(N({},e),{fetchStatus:"fetching"})).length}isMutating(e){return V(this,go).findAll(I(N({},e),{status:"pending"})).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=V(this,Mt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=V(this,Mt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Io(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return V(this,Mt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=V(this,Mt).get(n.queryHash),a=i==null?void 0:i.state.data,o=zY(t,a);if(o!==void 0)return V(this,Mt).build(this,n).setData(o,I(N({},r),{manual:!0}))}setQueriesData(e,t,r){return vr.batch(()=>V(this,Mt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=V(this,Mt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=V(this,Mt);vr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=V(this,Mt);return vr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries(N({type:"active"},e),t)))}cancelQueries(e,t={}){const r=N({revert:!0},t),n=vr.batch(()=>V(this,Mt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(qr).catch(qr)}invalidateQueries(e,t={}){return vr.batch(()=>{var r,n;return V(this,Mt).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries(I(N({},e),{type:(n=(r=e==null?void 0:e.refetchType)!=null?r:e==null?void 0:e.type)!=null?n:"active"}),t)})}refetchQueries(e,t={}){var i;const r=I(N({},t),{cancelRefetch:(i=t.cancelRefetch)!=null?i:!0}),n=vr.batch(()=>V(this,Mt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,r);return r.throwOnError||(o=o.catch(qr)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(qr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=V(this,Mt).build(this,t);return r.isStaleByTime(Io(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qr).catch(qr)}fetchInfiniteQuery(e){return e.behavior=nA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qr).catch(qr)}ensureInfiniteQueryData(e){return e.behavior=nA(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Fg.isOnline()?V(this,go).resumePausedMutations():Promise.resolve()}getQueryCache(){return V(this,Mt)}getMutationCache(){return V(this,go)}getDefaultOptions(){return V(this,yo)}setDefaultOptions(e){ve(this,yo,e)}setQueryDefaults(e,t){V(this,$c).set(If(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...V(this,$c).values()],r={};return t.forEach(n=>{Lf(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){V(this,Mc).set(If(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...V(this,Mc).values()],r={};return t.forEach(n=>{Lf(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t=I(N(N(N({},V(this,yo).queries),this.getQueryDefaults(e.queryKey)),e),{_defaulted:!0});return t.queryHash||(t.queryHash=PS(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===OS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:I(N(N(N({},V(this,yo).mutations),(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey)),e),{_defaulted:!0})}clear(){V(this,Mt).clear(),V(this,go).clear()}},Mt=new WeakMap,go=new WeakMap,yo=new WeakMap,$c=new WeakMap,Mc=new WeakMap,vo=new WeakMap,Dc=new WeakMap,Ic=new WeakMap,yD),Vr,Ve,Vh,Mr,Ms,Lc,xo,bo,Wh,zc,Bc,Ds,Is,wo,Uc,et,$d,x1,b1,w1,k1,_1,j1,S1,R3,vD,nX=(vD=class extends tp{constructor(t,r){super();Te(this,et);Te(this,Vr);Te(this,Ve);Te(this,Vh);Te(this,Mr);Te(this,Ms);Te(this,Lc);Te(this,xo);Te(this,bo);Te(this,Wh);Te(this,zc);Te(this,Bc);Te(this,Ds);Te(this,Is);Te(this,wo);Te(this,Uc,new Set);this.options=r,ve(this,Vr,t),ve(this,bo,null),ve(this,xo,v1()),this.options.experimental_prefetchInRender||V(this,xo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V(this,Ve).addObserver(this),aA(V(this,Ve),this.options)?He(this,et,$d).call(this):this.updateResult(),He(this,et,k1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return E1(V(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return E1(V(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,et,_1).call(this),He(this,et,j1).call(this),V(this,Ve).removeObserver(this)}setOptions(t){const r=this.options,n=V(this,Ve);if(this.options=V(this,Vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof An(this.options.enabled,V(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,et,S1).call(this),V(this,Ve).setOptions(this.options),r._defaulted&&!m1(this.options,r)&&V(this,Vr).getQueryCache().notify({type:"observerOptionsUpdated",query:V(this,Ve),observer:this});const i=this.hasListeners();i&&oA(V(this,Ve),n,this.options,r)&&He(this,et,$d).call(this),this.updateResult(),i&&(V(this,Ve)!==n||An(this.options.enabled,V(this,Ve))!==An(r.enabled,V(this,Ve))||Io(this.options.staleTime,V(this,Ve))!==Io(r.staleTime,V(this,Ve)))&&He(this,et,x1).call(this);const a=He(this,et,b1).call(this);i&&(V(this,Ve)!==n||An(this.options.enabled,V(this,Ve))!==An(r.enabled,V(this,Ve))||a!==V(this,wo))&&He(this,et,w1).call(this,a)}getOptimisticResult(t){const r=V(this,Vr).getQueryCache().build(V(this,Vr),t),n=this.createResult(r,t);return aX(this,n)&&(ve(this,Mr,n),ve(this,Lc,this.options),ve(this,Ms,V(this,Ve).state)),n}getCurrentResult(){return V(this,Mr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){V(this,Uc).add(t)}getCurrentQuery(){return V(this,Ve)}refetch(r={}){var t=Z(r,[]);return this.fetch(N({},t))}fetchOptimistic(t){const r=V(this,Vr).defaultQueryOptions(t),n=V(this,Vr).getQueryCache().build(V(this,Vr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){var r;return He(this,et,$d).call(this,I(N({},t),{cancelRefetch:(r=t.cancelRefetch)!=null?r:!0})).then(()=>(this.updateResult(),V(this,Mr)))}createResult(t,r){var C;const n=V(this,Ve),i=this.options,a=V(this,Mr),o=V(this,Ms),s=V(this,Lc),u=t!==n?t.state:V(this,Vh),{state:f}=t;let d=N({},f),h=!1,p;if(r._optimisticResults){const R=this.hasListeners(),M=!R&&aA(t,r),L=R&&oA(t,n,r,i);(M||L)&&(d=N(N({},d),O3(f.data,t.options))),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=d;p=d.data;let x=!1;if(r.placeholderData!==void 0&&p===void 0&&v==="pending"){let R;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(R=a.data,x=!0):R=typeof r.placeholderData=="function"?r.placeholderData((C=V(this,Bc))==null?void 0:C.state.data,V(this,Bc)):r.placeholderData,R!==void 0&&(v="success",p=y1(a==null?void 0:a.data,R,r),h=!0)}if(r.select&&p!==void 0&&!x)if(a&&p===(o==null?void 0:o.data)&&r.select===V(this,Wh))p=V(this,zc);else try{ve(this,Wh,r.select),p=r.select(p),p=y1(a==null?void 0:a.data,p,r),ve(this,zc,p),ve(this,bo,null)}catch(R){ve(this,bo,R)}V(this,bo)&&(m=V(this,bo),p=V(this,zc),g=Date.now(),v="error");const b=d.fetchStatus==="fetching",y=v==="pending",j=v==="error",k=y&&b,_=p!==void 0,E={status:v,fetchStatus:d.fetchStatus,isPending:y,isSuccess:v==="success",isError:j,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:j&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:j&&_,isStale:$S(t,r),refetch:this.refetch,promise:V(this,xo),isEnabled:An(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=H=>{E.status==="error"?H.reject(E.error):E.data!==void 0&&H.resolve(E.data)},M=()=>{const H=ve(this,xo,E.promise=v1());R(H)},L=V(this,xo);switch(L.status){case"pending":t.queryHash===n.queryHash&&R(L);break;case"fulfilled":(E.status==="error"||E.data!==L.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==L.reason)&&M();break}}return E}updateResult(){const t=V(this,Mr),r=this.createResult(V(this,Ve),this.options);if(ve(this,Ms,V(this,Ve).state),ve(this,Lc,this.options),V(this,Ms).data!==void 0&&ve(this,Bc,V(this,Ve)),m1(r,t))return;ve(this,Mr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!V(this,Uc).size)return!0;const o=new Set(a!=null?a:V(this,Uc));return this.options.throwOnError&&o.add("error"),Object.keys(V(this,Mr)).some(s=>{const c=s;return V(this,Mr)[c]!==t[c]&&o.has(c)})};He(this,et,R3).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,et,k1).call(this)}},Vr=new WeakMap,Ve=new WeakMap,Vh=new WeakMap,Mr=new WeakMap,Ms=new WeakMap,Lc=new WeakMap,xo=new WeakMap,bo=new WeakMap,Wh=new WeakMap,zc=new WeakMap,Bc=new WeakMap,Ds=new WeakMap,Is=new WeakMap,wo=new WeakMap,Uc=new WeakMap,et=new WeakSet,$d=function(t){He(this,et,S1).call(this);let r=V(this,Ve).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(qr)),r},x1=function(){He(this,et,_1).call(this);const t=Io(this.options.staleTime,V(this,Ve));if(Qs||V(this,Mr).isStale||!p1(t))return;const n=S3(V(this,Mr).dataUpdatedAt,t)+1;ve(this,Ds,setTimeout(()=>{V(this,Mr).isStale||this.updateResult()},n))},b1=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V(this,Ve)):this.options.refetchInterval)!=null?t:!1},w1=function(t){He(this,et,j1).call(this),ve(this,wo,t),!(Qs||An(this.options.enabled,V(this,Ve))===!1||!p1(V(this,wo))||V(this,wo)===0)&&ve(this,Is,setInterval(()=>{(this.options.refetchIntervalInBackground||RS.isFocused())&&He(this,et,$d).call(this)},V(this,wo)))},k1=function(){He(this,et,x1).call(this),He(this,et,w1).call(this,He(this,et,b1).call(this))},_1=function(){V(this,Ds)&&(clearTimeout(V(this,Ds)),ve(this,Ds,void 0))},j1=function(){V(this,Is)&&(clearInterval(V(this,Is)),ve(this,Is,void 0))},S1=function(){const t=V(this,Vr).getQueryCache().build(V(this,Vr),this.options);if(t===V(this,Ve))return;const r=V(this,Ve);ve(this,Ve,t),ve(this,Vh,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},R3=function(t){vr.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(V(this,Mr))}),V(this,Vr).getQueryCache().notify({query:V(this,Ve),type:"observerResultsUpdated"})})},vD);function iX(e,t){return An(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function aA(e,t){return iX(e,t)||e.state.data!==void 0&&E1(e,t,t.refetchOnMount)}function E1(e,t,r){if(An(t.enabled,e)!==!1&&Io(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&$S(e,t)}return!1}function oA(e,t,r,n){return(e!==t||An(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&$S(e,r)}function $S(e,t){return An(t.enabled,e)!==!1&&e.isStaleByTime(Io(t.staleTime,e))}function aX(e,t){return!m1(e.getCurrentResult(),t)}var $3=w.createContext(void 0),MS=e=>{const t=w.useContext($3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},oX=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx($3.Provider,{value:e,children:t})),M3=w.createContext(!1),sX=()=>w.useContext(M3);M3.Provider;function lX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cX=w.createContext(lX()),uX=()=>w.useContext(cX),dX=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},fX=e=>{w.useEffect(()=>{e.clearReset()},[e])},hX=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||KY(r,[e.error,n])),pX=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n!=null?n:1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},mX=(e,t)=>e.isLoading&&e.isFetching&&!t,gX=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,sA=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function yX(e,t,r){var d,h,p,m,g;const n=sX(),i=uX(),a=MS(),o=a.defaultQueryOptions(e);(h=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=n?"isRestoring":"optimistic",pX(o),dX(o,i),fX(i);const s=!a.getQueryCache().get(o.queryHash),[c]=w.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),f=!n&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(v=>{const x=f?c.subscribe(vr.batchCalls(v)):qr;return c.updateResult(),x},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),w.useEffect(()=>{c.setOptions(o)},[o,c]),gX(o,u))throw sA(o,c,i);if(hX({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((m=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||m.call(p,o,u),o.experimental_prefetchInRender&&!Qs&&mX(u,n)){const v=s?sA(o,c,i):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;v==null||v.catch(qr).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function ul(e,t){return yX(e,nX)}/**
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zf.apply(this,arguments)}var jo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(jo||(jo={}));const lA="popstate";function vX(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return N1("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Kg(i)}return bX(t,r,null,e)}function Ft(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function D3(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(r){}}}function xX(){return Math.random().toString(36).substr(2,8)}function cA(e,t){return{usr:e.state,key:e.key,idx:t}}function N1(e,t,r,n){return r===void 0&&(r=null),zf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ru(t):t,{state:r,key:t&&t.key||n||xX()})}function Kg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ru(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function bX(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=jo.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(zf({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){s=jo.Pop;let v=f(),x=v==null?null:v-u;u=v,c&&c({action:s,location:g.location,delta:x})}function h(v,x){s=jo.Push;let b=N1(g.location,v,x);u=f()+1;let y=cA(b,u),j=g.createHref(b);try{o.pushState(y,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(j)}a&&c&&c({action:s,location:g.location,delta:1})}function p(v,x){s=jo.Replace;let b=N1(g.location,v,x);u=f();let y=cA(b,u),j=g.createHref(b);o.replaceState(y,"",j),a&&c&&c({action:s,location:g.location,delta:0})}function m(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof v=="string"?v:Kg(v);return b=b.replace(/ $/,"%20"),Ft(x,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,x)}let g={get action(){return s},get location(){return e(i,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(lA,d),c=v,()=>{i.removeEventListener(lA,d),c=null}},createHref(v){return t(i,v)},createURL:m,encodeLocation(v){let x=m(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(v){return o.go(v)}};return g}var uA;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(uA||(uA={}));function wX(e,t,r){return r===void 0&&(r="/"),kX(e,t,r,!1)}function kX(e,t,r,n){let i=typeof t=="string"?Ru(t):t,a=DS(i.pathname||"/",r);if(a==null)return null;let o=I3(e);_X(o);let s=null;for(let c=0;s==null&&c<o.length;++c){let u=$X(a);s=OX(o[c],u,n)}return s}function I3(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let c={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Ft(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=Lo([n,c.relativePath]),f=r.concat(c);a.children&&a.children.length>0&&(Ft(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),I3(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:AX(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let c of L3(a.path))i(a,o,c)}),t}function L3(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=L3(n.join("/")),s=[];return s.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&s.push(...o),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function _X(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:PX(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jX=/^:[\w-]+$/,SX=3,EX=2,NX=1,CX=10,TX=-2,dA=e=>e==="*";function AX(e,t){let r=e.split("/"),n=r.length;return r.some(dA)&&(n+=TX),t&&(n+=EX),r.filter(i=>!dA(i)).reduce((i,a)=>i+(jX.test(a)?SX:a===""?NX:CX),n)}function PX(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function OX(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let c=n[s],u=s===n.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=fA({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=fA({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Lo([a,d.pathname]),pathnameBase:LX(Lo([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=Lo([a,d.pathnameBase]))}return o}function fA(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=RX(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,f,d)=>{let{paramName:h,isOptional:p}=f;if(h==="*"){let g=s[d]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function RX(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),D3(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function $X(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D3(!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 DS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function MX(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?Ru(e):e;return{pathname:r?r.startsWith("/")?r:DX(r,t):t,search:zX(n),hash:BX(i)}}function DX(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Hb(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function IX(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function IS(e,t){let r=IX(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function LS(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=Ru(e):(i=zf({},e),Ft(!i.pathname||!i.pathname.includes("?"),Hb("?","pathname","search",i)),Ft(!i.pathname||!i.pathname.includes("#"),Hb("#","pathname","hash",i)),Ft(!i.search||!i.search.includes("#"),Hb("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}s=d>=0?t[d]:"/"}let c=MX(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Lo=e=>e.join("/").replace(/\/\/+/g,"/"),LX=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zX=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,BX=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function UX(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const z3=["post","put","patch","delete"];new Set(z3);const FX=["get",...z3];new Set(FX);/**
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Bf(){return Bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bf.apply(this,arguments)}const zS=w.createContext(null),KX=w.createContext(null),Jo=w.createContext(null),Kv=w.createContext(null),za=w.createContext({outlet:null,matches:[],isDataRoute:!1}),B3=w.createContext(null);function HX(e,t){let{relative:r}=t===void 0?{}:t;$u()||Ft(!1);let{basename:n,navigator:i}=w.useContext(Jo),{hash:a,pathname:o,search:s}=F3(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:Lo([n,o])),i.createHref({pathname:c,search:s,hash:a})}function $u(){return w.useContext(Kv)!=null}function bi(){return $u()||Ft(!1),w.useContext(Kv).location}function U3(e){w.useContext(Jo).static||w.useLayoutEffect(e)}function Mu(){let{isDataRoute:e}=w.useContext(za);return e?nJ():VX()}function VX(){$u()||Ft(!1);let e=w.useContext(zS),{basename:t,future:r,navigator:n}=w.useContext(Jo),{matches:i}=w.useContext(za),{pathname:a}=bi(),o=JSON.stringify(IS(i,r.v7_relativeSplatPath)),s=w.useRef(!1);return U3(()=>{s.current=!0}),w.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=LS(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Lo([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,o,a,e])}function BS(){let{matches:e}=w.useContext(za),t=e[e.length-1];return t?t.params:{}}function F3(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Jo),{matches:i}=w.useContext(za),{pathname:a}=bi(),o=JSON.stringify(IS(i,n.v7_relativeSplatPath));return w.useMemo(()=>LS(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function WX(e,t){return qX(e,t)}function qX(e,t,r,n){$u()||Ft(!1);let{navigator:i}=w.useContext(Jo),{matches:a}=w.useContext(za),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=bi(),f;if(t){var d;let v=typeof t=="string"?Ru(t):t;c==="/"||(d=v.pathname)!=null&&d.startsWith(c)||Ft(!1),f=v}else f=u;let h=f.pathname||"/",p=h;if(c!=="/"){let v=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=wX(e,{pathname:p}),g=QX(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Lo([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:Lo([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r,n);return t&&g?w.createElement(Kv.Provider,{value:{location:Bf({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:jo.Pop}},g):g}function GX(){let e=rJ(),t=UX(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:i},r):null,null)}const YX=w.createElement(GX,null);class XX extends w.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?w.createElement(za.Provider,{value:this.props.routeContext},w.createElement(B3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function JX(e){let{routeContext:t,match:r,children:n}=e,i=w.useContext(zS);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(za.Provider,{value:t},n)}function QX(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||Ft(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:p}=r,m=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||m){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,h)=>{let p,m=!1,g=null,v=null;r&&(p=s&&d.route.id?s[d.route.id]:void 0,g=d.route.errorElement||YX,c&&(u<0&&h===0?(m=!0,v=null):u===h&&(m=!0,v=d.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),b=()=>{let y;return p?y=g:m?y=v:d.route.Component?y=w.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=f,w.createElement(JX,{match:d,routeContext:{outlet:f,matches:x,isDataRoute:r!=null},children:y})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?w.createElement(XX,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:b(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):b()},null)}var K3=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(K3||{}),Hg=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}(Hg||{});function ZX(e){let t=w.useContext(zS);return t||Ft(!1),t}function eJ(e){let t=w.useContext(KX);return t||Ft(!1),t}function tJ(e){let t=w.useContext(za);return t||Ft(!1),t}function H3(e){let t=tJ(),r=t.matches[t.matches.length-1];return r.route.id||Ft(!1),r.route.id}function rJ(){var e;let t=w.useContext(B3),r=eJ(Hg.UseRouteError),n=H3(Hg.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function nJ(){let{router:e}=ZX(K3.UseNavigateStable),t=H3(Hg.UseNavigateStable),r=w.useRef(!1);return U3(()=>{r.current=!0}),w.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Bf({fromRouteId:t},a)))},[e,t])}function iJ(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function US(e){let{to:t,replace:r,state:n,relative:i}=e;$u()||Ft(!1);let{future:a,static:o}=w.useContext(Jo),{matches:s}=w.useContext(za),{pathname:c}=bi(),u=Mu(),f=LS(t,IS(s,a.v7_relativeSplatPath),c,i==="path"),d=JSON.stringify(f);return w.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:i}),[u,d,i,r,n]),null}function wt(e){Ft(!1)}function aJ(e){let{basename:t="/",children:r=null,location:n,navigationType:i=jo.Pop,navigator:a,static:o=!1,future:s}=e;$u()&&Ft(!1);let c=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:c,navigator:a,static:o,future:Bf({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof n=="string"&&(n=Ru(n));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:m="default"}=n,g=w.useMemo(()=>{let v=DS(f,c);return v==null?null:{location:{pathname:v,search:d,hash:h,state:p,key:m},navigationType:i}},[c,f,d,h,p,m,i]);return g==null?null:w.createElement(Jo.Provider,{value:u},w.createElement(Kv.Provider,{children:r,value:g}))}function oJ(e){let{children:t,location:r}=e;return WX(C1(t),r)}new Promise(()=>{});function C1(e,t){t===void 0&&(t=[]);let r=[];return w.Children.forEach(e,(n,i)=>{if(!w.isValidElement(n))return;let a=[...t,i];if(n.type===w.Fragment){r.push.apply(r,C1(n.props.children,a));return}n.type!==wt&&Ft(!1),!n.props.index||!n.props.children||Ft(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=C1(n.props.children,a)),r.push(o)}),r}/**
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function T1(){return T1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T1.apply(this,arguments)}function sJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function lJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cJ(e,t){return e.button===0&&(!t||t==="_self")&&!lJ(e)}function A1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function uJ(e,t){let r=A1(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const dJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],fJ="6";try{window.__reactRouterVersion=fJ}catch(e){}const hJ="startTransition",hA=vj[hJ];function pJ(e){let{basename:t,children:r,future:n,window:i}=e,a=w.useRef();a.current==null&&(a.current=vX({window:i,v5Compat:!0}));let o=a.current,[s,c]=w.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=w.useCallback(d=>{u&&hA?hA(()=>c(d)):c(d)},[c,u]);return w.useLayoutEffect(()=>o.listen(f),[o,f]),w.useEffect(()=>iJ(n),[n]),w.createElement(aJ,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const mJ=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",gJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,de=w.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:u,preventScrollReset:f,viewTransition:d}=t,h=sJ(t,dJ),{basename:p}=w.useContext(Jo),m,g=!1;if(typeof u=="string"&&gJ.test(u)&&(m=u,mJ))try{let y=new URL(window.location.href),j=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=DS(j.pathname,p);j.origin===y.origin&&k!=null?u=k+j.search+j.hash:g=!0}catch(y){}let v=HX(u,{relative:i}),x=yJ(u,{replace:o,state:s,target:c,preventScrollReset:f,relative:i,viewTransition:d});function b(y){n&&n(y),y.defaultPrevented||x(y)}return w.createElement("a",T1({},h,{href:m||v,onClick:g||a?n:b,ref:r,target:c}))});var pA;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(pA||(pA={}));var mA;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mA||(mA={}));function yJ(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Mu(),u=bi(),f=F3(e,{relative:o});return w.useCallback(d=>{if(cJ(d,r)){d.preventDefault();let h=n!==void 0?n:Kg(u)===Kg(f);c(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,c,f,n,i,r,e,a,o,s])}function Hv(e){let t=w.useRef(A1(e)),r=w.useRef(!1),n=bi(),i=w.useMemo(()=>uJ(n.search,r.current?null:t.current),[n.search]),a=Mu(),o=w.useCallback((s,c)=>{const u=A1(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,c)},[a,i]);return[i,o]}function vJ(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{u(n.next(f))}catch(d){o(d)}}function c(f){try{u(n.throw(f))}catch(d){o(d)}}function u(f){f.done?a(f.value):i(f.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}const xJ=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class FS extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class bJ extends FS{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class gA extends FS{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class yA extends FS{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var P1;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(P1||(P1={}));class wJ{constructor(t,{headers:r={},customFetch:n,region:i=P1.Any}={}){this.url=t,this.headers=r,this.region=i,this.fetch=xJ(n)}setAuth(t){this.headers.Authorization="Bearer ".concat(t)}invoke(t){return vJ(this,arguments,void 0,function*(r,n={}){var i;let a,o;try{const{headers:s,method:c,body:u,signal:f,timeout:d}=n;let h={},{region:p}=n;p||(p=this.region);const m=new URL("".concat(this.url,"/").concat(r));p&&p!=="any"&&(h["x-region"]=p,m.searchParams.set("forceFunctionRegion",p));let g;u&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)?typeof Blob!="undefined"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(h["Content-Type"]="text/plain",g=u):typeof FormData!="undefined"&&u instanceof FormData?g=u:(h["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob!="undefined"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData!="undefined"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let v=f;d&&(o=new AbortController,a=setTimeout(()=>o.abort(),d),f?(v=o.signal,f.addEventListener("abort",()=>o.abort())):v=o.signal);const x=yield this.fetch(m.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),s),body:g,signal:v}).catch(k=>{throw new bJ(k)}),b=x.headers.get("x-relay-error");if(b&&b==="true")throw new gA(x);if(!x.ok)throw new yA(x);let y=((i=x.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),j;return y==="application/json"?j=yield x.json():y==="application/octet-stream"||y==="application/pdf"?j=yield x.blob():y==="text/event-stream"?j=x:y==="multipart/form-data"?j=yield x.formData():j=yield x.text(),{data:j,error:null,response:x}}catch(s){return{data:null,error:s,response:s instanceof yA||s instanceof gA?s.context:void 0}}finally{a&&clearTimeout(a)}})}}const V3=3,vA=e=>Math.min(1e3*qa(2,e),3e4),kJ=[520,503],W3=["GET","HEAD","OPTIONS"];var _J=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function xA(e,t){return new Promise(r=>{if(t!=null&&t.aborted){r();return}const n=setTimeout(()=>{t==null||t.removeEventListener("abort",i),r()},e);function i(){clearTimeout(n),r()}t==null||t.addEventListener("abort",i)})}function jJ(e,t,r,n){return!(!n||r>=V3||!W3.includes(e)||!kJ.includes(t))}var SJ=class{constructor(e){var t,r,n,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=e.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=e.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=e.retry)!==null&&a!==void 0?a:!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let a=T(this,null,function*(){let o=0;for(;;){const u=new Headers(r.headers);o>0&&u.set("X-Retry-Count",String(o));let f;try{f=yield n(r.url.toString(),{method:r.method,headers:u,body:JSON.stringify(r.body),signal:r.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!W3.includes(r.method))throw d;if(r.retryEnabled&&o<V3){const h=vA(o);o++,yield xA(h,r.signal);continue}throw d}if(jJ(r.method,f.status,o,r.retryEnabled)){var s,c;const d=(s=(c=f.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&s!==void 0?s:null,h=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:vA(o);yield f.text(),o++,yield xA(h,r.signal);continue}return yield r.processResponse(f)}});return this.shouldThrowOnError||(a=a.catch(o=>{var s;let c="",u="",f="";const d=o==null?void 0:o.cause;if(d){var h,p,m,g;const b=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",y=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";c="".concat((m=o==null?void 0:o.name)!==null&&m!==void 0?m:"FetchError",": ").concat(o==null?void 0:o.message),c+="\n\nCaused by: ".concat((g=d==null?void 0:d.name)!==null&&g!==void 0?g:"Error",": ").concat(b),y&&(c+=" (".concat(y,")")),d!=null&&d.stack&&(c+="\n".concat(d.stack))}else{var v;c=(v=o==null?void 0:o.stack)!==null&&v!==void 0?v:""}const x=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(f="",u="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(u+=". Note: Your request URL is ".concat(x," characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side."))):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(f="",u="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(u+=". Your request URL is ".concat(x," characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead."))),{success:!1,error:{message:"".concat((s=o==null?void 0:o.name)!==null&&s!==void 0?s:"FetchError",": ").concat(o==null?void 0:o.message),details:c,hint:u,code:f},data:null,count:null,status:0,statusText:""}})),a.then(e,t)}processResponse(e){return T(this,null,function*(){var t=this;let r=null,n=null,i=null,a=e.status,o=e.statusText;if(e.ok){var s,c;if(t.method!=="HEAD"){var u;const h=yield e.text();h===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?n=h:n=JSON.parse(h))}const f=(s=t.headers.get("Prefer"))===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),d=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");f&&d&&d.length>1&&(i=parseInt(d[1])),t.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:"Results contain ".concat(n.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,i=null,a=406,o="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const f=yield e.text();try{r=JSON.parse(f),Array.isArray(r)&&e.status===404&&(n=[],r=null,a=200,o="OK")}catch(d){e.status===404&&f===""?(a=204,o="No Content"):r={message:f}}if(r&&t.shouldThrowOnError)throw new _J(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:o}})}returns(){return this}overrideTypes(){return this}},EJ=class extends SJ{select(e){let t=!1;const r=(e!=null?e:"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?"".concat(i,".order"):"order",o=this.url.searchParams.get(a);return this.url.searchParams.set(a,"".concat(o?"".concat(o,","):"").concat(e,".").concat(t?"asc":"desc").concat(r===void 0?"":r?".nullsfirst":".nullslast")),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r=="undefined"?"limit":"".concat(r,".limit");return this.url.searchParams.set(n,"".concat(e)),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n=="undefined"?"offset":"".concat(n,".offset"),a=typeof n=="undefined"?"limit":"".concat(n,".limit");return this.url.searchParams.set(i,"".concat(e)),this.url.searchParams.set(a,"".concat(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var o;const s=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(a,'; for="').concat(c,'"; options=').concat(s,";")),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(e)),this}};const bA=new RegExp("[,()]");var Ml=class extends EJ{eq(e,t){return this.url.searchParams.append(e,"eq.".concat(t)),this}neq(e,t){return this.url.searchParams.append(e,"neq.".concat(t)),this}gt(e,t){return this.url.searchParams.append(e,"gt.".concat(t)),this}gte(e,t){return this.url.searchParams.append(e,"gte.".concat(t)),this}lt(e,t){return this.url.searchParams.append(e,"lt.".concat(t)),this}lte(e,t){return this.url.searchParams.append(e,"lte.".concat(t)),this}like(e,t){return this.url.searchParams.append(e,"like.".concat(t)),this}likeAllOf(e,t){return this.url.searchParams.append(e,"like(all).{".concat(t.join(","),"}")),this}likeAnyOf(e,t){return this.url.searchParams.append(e,"like(any).{".concat(t.join(","),"}")),this}ilike(e,t){return this.url.searchParams.append(e,"ilike.".concat(t)),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,"ilike(all).{".concat(t.join(","),"}")),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,"ilike(any).{".concat(t.join(","),"}")),this}regexMatch(e,t){return this.url.searchParams.append(e,"match.".concat(t)),this}regexIMatch(e,t){return this.url.searchParams.append(e,"imatch.".concat(t)),this}is(e,t){return this.url.searchParams.append(e,"is.".concat(t)),this}isDistinct(e,t){return this.url.searchParams.append(e,"isdistinct.".concat(t)),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&bA.test(n)?'"'.concat(n,'"'):"".concat(n)).join(",");return this.url.searchParams.append(e,"in.(".concat(r,")")),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&bA.test(n)?'"'.concat(n,'"'):"".concat(n)).join(",");return this.url.searchParams.append(e,"not.in.(".concat(r,")")),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,"cs.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cs.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cs.".concat(JSON.stringify(t))),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,"cd.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cd.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cd.".concat(JSON.stringify(t))),this}rangeGt(e,t){return this.url.searchParams.append(e,"sr.".concat(t)),this}rangeGte(e,t){return this.url.searchParams.append(e,"nxl.".concat(t)),this}rangeLt(e,t){return this.url.searchParams.append(e,"sl.".concat(t)),this}rangeLte(e,t){return this.url.searchParams.append(e,"nxr.".concat(t)),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,"adj.".concat(t)),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,"ov.".concat(t)):this.url.searchParams.append(e,"ov.{".concat(t.join(","),"}")),this}textSearch(e,t,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const a=r===void 0?"":"(".concat(r,")");return this.url.searchParams.append(e,"".concat(i,"fts").concat(a,".").concat(t)),this}match(e){return Object.entries(e).filter(([t,r])=>r!==void 0).forEach(([t,r])=>{this.url.searchParams.append(t,"eq.".concat(r))}),this}not(e,t,r){return this.url.searchParams.append(e,"not.".concat(t,".").concat(r)),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?"".concat(r,".or"):"or";return this.url.searchParams.append(n,"(".concat(e,")")),this}filter(e,t,r){return this.url.searchParams.append(e,"".concat(t,".").concat(r)),this}},NJ=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t!=null?t:{},i=r?"HEAD":"GET";let a=!1;const o=(e!=null?e:"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set("select",o),n&&c.append("Prefer","count=".concat(n)),new Ml({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer","count=".concat(t)),r||o.append("Prefer","missing=default"),Array.isArray(e)){const s=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(s.length>0){const c=[...new Set(s)].map(u=>'"'.concat(u,'"'));a.searchParams.set("columns",c.join(","))}}return new Ml({method:i,url:a,headers:o,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const o="POST",{url:s,headers:c}=this.cloneRequestState();if(c.append("Prefer","resolution=".concat(r?"ignore":"merge","-duplicates")),t!==void 0&&s.searchParams.set("on_conflict",t),n&&c.append("Prefer","count=".concat(n)),i||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((f,d)=>f.concat(Object.keys(d)),[]);if(u.length>0){const f=[...new Set(u)].map(d=>'"'.concat(d,'"'));s.searchParams.set("columns",f.join(","))}}return new Ml({method:o,url:s,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer","count=".concat(t)),new Ml({method:n,url:i,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return e&&i.append("Prefer","count=".concat(e)),new Ml({method:r,url:n,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}function CJ(e,t){if(Uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TJ(e){var t=CJ(e,"string");return Uf(t)=="symbol"?t:t+""}function AJ(e,t,r){return(t=TJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wA(Object(r),!0).forEach(function(n){AJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var PJ=class q3{constructor(t,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:o=8e3,retry:s}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const c=i!=null?i:globalThis.fetch;a!==void 0&&a>0?this.fetch=(u,f)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),a),p=f==null?void 0:f.signal;if(p){if(p.aborted)return clearTimeout(h),c(u,f);const m=()=>{clearTimeout(h),d.abort()};return p.addEventListener("abort",m,{once:!0}),c(u,Yp(Yp({},f),{},{signal:d.signal})).finally(()=>{clearTimeout(h),p.removeEventListener("abort",m)})}return c(u,Yp(Yp({},f),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=c,this.retry=s}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new NJ(new URL("".concat(this.url,"/").concat(t)),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new q3(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,r={},{head:n=!1,get:i=!1,count:a}={}){var o;let s;const c=new URL("".concat(this.url,"/rpc/").concat(t));let u;const f=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(f)),d=n&&Object.values(r).some(f);d?(s="POST",u=r):n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([p,m])=>m!==void 0).map(([p,m])=>[p,Array.isArray(m)?"{".concat(m.join(","),"}"):"".concat(m)]).forEach(([p,m])=>{c.searchParams.append(p,m)})):(s="POST",u=r);const h=new Headers(this.headers);return d?h.set("Prefer",a?"count=".concat(a,",return=minimal"):"return=minimal"):a&&h.set("Prefer","count=".concat(a)),new Ml({method:s,url:c,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class OJ{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket!="undefined")return{type:"native",constructor:WebSocket};if(typeof globalThis!="undefined"&&typeof globalThis.WebSocket!="undefined")return{type:"native",constructor:globalThis.WebSocket};if(typeof global!="undefined"&&typeof global.WebSocket!="undefined")return{type:"native",constructor:global.WebSocket};if(typeof globalThis!="undefined"&&typeof globalThis.WebSocketPair!="undefined"&&typeof globalThis.WebSocket=="undefined")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis!="undefined"&&globalThis.EdgeRuntime||typeof navigator!="undefined"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const i=n.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket!="undefined"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:"Node.js ".concat(a," detected but native WebSocket not found."),workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:"Node.js ".concat(a," detected without native WebSocket support."),workaround:'For Node.js < 22, install "ws" package and provide it via the transport option:\nimport ws from "ws"\nnew RealtimeClient(url, { transport: ws })'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+="\n\nSuggested solution: ".concat(t.workaround)),new Error(r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch(t){return!1}}}const RJ="2.103.0",$J="realtime-js/".concat(RJ),MJ="1.0.0",G3="2.0.0",DJ=G3,IJ=1e4,LJ=100,uo={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Y3={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},O1={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class zJ{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t!=null?t:[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var r,n;const i=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,r,n){var i,a;const o=t.topic,s=(i=t.ref)!==null&&i!==void 0?i:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,f=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(f).length===0?"":JSON.stringify(f);if(c.length>255)throw new Error("joinRef length ".concat(c.length," exceeds maximum of 255"));if(s.length>255)throw new Error("ref length ".concat(s.length," exceeds maximum of 255"));if(o.length>255)throw new Error("topic length ".concat(o.length," exceeds maximum of 255"));if(u.length>255)throw new Error("userEvent length ".concat(u.length," exceeds maximum of 255"));if(d.length>255)throw new Error("metadata length ".concat(d.length," exceeds maximum of 255"));const h=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+s.length+o.length+u.length+d.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let m=new DataView(p),g=0;m.setUint8(g++,this.KINDS.userBroadcastPush),m.setUint8(g++,c.length),m.setUint8(g++,s.length),m.setUint8(g++,o.length),m.setUint8(g++,u.length),m.setUint8(g++,d.length),m.setUint8(g++,r),Array.from(c,x=>m.setUint8(g++,x.charCodeAt(0))),Array.from(s,x=>m.setUint8(g++,x.charCodeAt(0))),Array.from(o,x=>m.setUint8(g++,x.charCodeAt(0))),Array.from(u,x=>m.setUint8(g++,x.charCodeAt(0))),Array.from(d,x=>m.setUint8(g++,x.charCodeAt(0)));var v=new Uint8Array(p.byteLength+n.byteLength);return v.set(new Uint8Array(p),0),v.set(new Uint8Array(n),p.byteLength),v.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[i,a,o,s,c]=n;return r({join_ref:i,ref:a,topic:o,event:s,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,i)}}_decodeUserBroadcast(t,r,n){const i=r.getUint8(1),a=r.getUint8(2),o=r.getUint8(3),s=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+i));c=c+i;const f=n.decode(t.slice(c,c+a));c=c+a;const d=n.decode(t.slice(c,c+o));c=c+o;const h=t.slice(c,t.byteLength),p=s===this.JSON_ENCODING?JSON.parse(n.decode(h)):h,m={type:this.BROADCAST_EVENT,event:f,payload:p};return o>0&&(m.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:m}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}var ft;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(ft||(ft={}));const kA=(e,t,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((a,o)=>(a[o]=BJ(o,e,t,i),a),{}):{}},BJ=(e,t,r,n)=>{const i=t.find(s=>s.name===e),a=i==null?void 0:i.type,o=r[e];return a&&!n.includes(a)?X3(a,o):R1(o)},X3=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return HJ(t,r)}switch(e){case ft.bool:return UJ(t);case ft.float4:case ft.float8:case ft.int2:case ft.int4:case ft.int8:case ft.numeric:case ft.oid:return FJ(t);case ft.json:case ft.jsonb:return KJ(t);case ft.timestamp:return VJ(t);case ft.abstime:case ft.date:case ft.daterange:case ft.int4range:case ft.int8range:case ft.money:case ft.reltime:case ft.text:case ft.time:case ft.timestamptz:case ft.timetz:case ft.tsrange:case ft.tstzrange:return R1(t);default:return R1(t)}},R1=e=>e,UJ=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},FJ=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},KJ=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return e}return e},HJ=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let a;const o=e.slice(1,r);try{a=JSON.parse("["+o+"]")}catch(s){a=o?o.split(","):[]}return a.map(s=>X3(t,s))}return e},VJ=e=>typeof e=="string"?e.replace(" ","T"):e,J3=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var ef=e=>typeof e=="function"?e:function(){return e},WJ=typeof self!="undefined"?self:null,Dl=typeof window!="undefined"?window:null,Ti=WJ||Dl||globalThis,qJ="2.0.0",GJ=1e4,YJ=1e3,Mi={connecting:0,open:1,closing:2,closed:3},Hr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},da={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},$1={longpoll:"longpoll",websocket:"websocket"},XJ={complete:4},M1="base64url.bearer.phx.",Xp=class{constructor(e,t,r,n){this.channel=e,this.event=t,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Q3=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},JJ=class{constructor(e,t,r){this.state=Hr.closed,this.topic=e,this.params=ef(t||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Xp(this,da.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Q3(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Hr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=Hr.errored,this.socket.hasLogger()&&this.socket.log("channel","error ".concat(this.topic),n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel","close ".concat(this.topic)),this.state=Hr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel","error ".concat(this.topic),n),this.isJoining()&&this.joinPush.reset(),this.state=Hr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel","timeout ".concat(this.topic),this.joinPush.timeout),new Xp(this,da.leave,ef({}),this.timeout).send(),this.state=Hr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(da.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Hr.closed,this.bindings=[]}onClose(e){this.on(da.close,e)}onError(e){return this.on(da.error,t=>e(t))}on(e,t){let r=this.bindingRef++;return this.bindings.push({event:e,ref:r,callback:t}),r}off(e,t){this.bindings=this.bindings.filter(r=>!(r.event===e&&(typeof t=="undefined"||t===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,r=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error("tried to push '".concat(e,"' to '").concat(this.topic,"' before joining. Use channel.join() before pushing events"));let n=new Xp(this,e,function(){return t},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Hr.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel","leave ".concat(this.topic)),this.trigger(da.close,"leave")},r=new Xp(this,da.leave,ef({}),e);return r.receive("ok",()=>t()).receive("timeout",()=>t()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(e,t,r){return t}filterBindings(e,t,r){return!0}isMember(e,t,r,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Hr.joining,this.joinPush.resend(e))}trigger(e,t,r,n){let i=this.onMessage(e,t,r,n);if(t&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,r));for(let o=0;o<a.length;o++)a[o].callback(i,r,n||this.joinRef())}replyEventName(e){return"chan_reply_".concat(e)}isClosed(){return this.state===Hr.closed}isErrored(){return this.state===Hr.errored}isJoined(){return this.state===Hr.joined}isJoining(){return this.state===Hr.joining}isLeaving(){return this.state===Hr.leaving}},Vg=class{static request(e,t,r,n,i,a,o){if(Ti.XDomainRequest){let s=new Ti.XDomainRequest;return this.xdomainRequest(s,e,t,n,i,a,o)}else if(Ti.XMLHttpRequest){let s=new Ti.XMLHttpRequest;return this.xhrRequest(s,e,t,r,n,i,a,o)}else{if(Ti.fetch&&Ti.AbortController)return this.fetchRequest(e,t,r,n,i,a,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,r,n,i,a,o){let s={method:e,headers:r,body:n},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),Ti.fetch(t,s).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,r,n,i,a,o){return e.timeout=i,e.open(t,r),e.onload=()=>{let s=this.parseJSON(e.responseText);o&&o(s)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,r,n,i,a,o,s){e.open(t,r,!0),e.timeout=a;for(let[c,u]of Object.entries(n))e.setRequestHeader(c,u);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{if(e.readyState===XJ.complete&&s){let c=this.parseJSON(e.responseText);s(c)}},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let r=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let i=t?"".concat(t,"[").concat(n,"]"):n,a=e[n];typeof a=="object"?r.push(this.serialize(a,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let r=e.match(/\?/)?"&":"?";return"".concat(e).concat(r).concat(this.serialize(t))}},QJ=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let i=0;i<n;i++)t+=String.fromCharCode(r[i]);return btoa(t)},xl=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(M1)&&(this.authToken=atob(t[1].slice(M1.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Mi.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+$1.websocket),"$1/"+$1.longpoll)}endpointURL(){return Vg.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,r){this.close(e,t,r),this.readyState=Mi.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Mi.open||this.readyState===Mi.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:r,token:n,messages:i}=t;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:i.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Mi.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error("unhandled poll status ".concat(r))}})}send(e){typeof e!="string"&&(e=QJ(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join("\n"),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,r){for(let i of this.reqs)i.abort();this.readyState=Mi.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,r,n,i){let a,o=()=>{this.reqs.delete(a),n()};a=Vg.request(e,this.endpointURL(),t,r,this.timeout,o,s=>{this.reqs.delete(a),this.isActive()&&i(s)}),this.reqs.add(a)}},ZJ=class Md{constructor(t,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Md.syncState(this.state,i,a,o),this.pendingDiffs.forEach(c=>{this.state=Md.syncDiff(this.state,c,a,o)}),this.pendingDiffs=[],s()}),this.channel.on(n.diff,i=>{let{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Md.syncDiff(this.state,i,a,o),s())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Md.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,r,n,i){let a=this.clone(t),o={},s={};return this.map(a,(c,u)=>{r[c]||(s[c]=u)}),this.map(r,(c,u)=>{let f=a[c];if(f){let d=u.metas.map(g=>g.phx_ref),h=f.metas.map(g=>g.phx_ref),p=u.metas.filter(g=>h.indexOf(g.phx_ref)<0),m=f.metas.filter(g=>d.indexOf(g.phx_ref)<0);p.length>0&&(o[c]=u,o[c].metas=p),m.length>0&&(s[c]=this.clone(f),s[c].metas=m)}else o[c]=u}),this.syncDiff(a,{joins:o,leaves:s},n,i)}static syncDiff(t,r,n,i){let{joins:a,leaves:o}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(a,(s,c)=>{let u=t[s];if(t[s]=this.clone(c),u){let f=t[s].metas.map(h=>h.phx_ref),d=u.metas.filter(h=>f.indexOf(h.phx_ref)<0);t[s].metas.unshift(...d)}n(s,u,c)}),this.map(o,(s,c)=>{let u=t[s];if(!u)return;let f=c.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>f.indexOf(d.phx_ref)<0),i(s,u,c),u.metas.length===0&&delete t[s]}),t}static list(t,r){return r||(r=function(n,i){return i}),this.map(t,(n,i)=>r(n,i))}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static clone(t){return JSON.parse(JSON.stringify(t))}},Jp={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(r))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[r,n,i,a,o]=JSON.parse(e);return t({join_ref:r,ref:n,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:r,event:n,topic:i,payload:a}=e,o=this.META_LENGTH+t.length+r.length+i.length+n.length,s=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(s),u=0;c.setUint8(u++,this.KINDS.push),c.setUint8(u++,t.length),c.setUint8(u++,r.length),c.setUint8(u++,i.length),c.setUint8(u++,n.length),Array.from(t,d=>c.setUint8(u++,d.charCodeAt(0))),Array.from(r,d=>c.setUint8(u++,d.charCodeAt(0))),Array.from(i,d=>c.setUint8(u++,d.charCodeAt(0))),Array.from(n,d=>c.setUint8(u++,d.charCodeAt(0)));var f=new Uint8Array(s.byteLength+a.byteLength);return f.set(new Uint8Array(s),0),f.set(new Uint8Array(a),s.byteLength),f.buffer},binaryDecode(e){let t=new DataView(e),r=t.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=r.decode(e.slice(o,o+n));o=o+n;let c=r.decode(e.slice(o,o+i));o=o+i;let u=r.decode(e.slice(o,o+a));o=o+a;let f=e.slice(o,e.byteLength);return{join_ref:s,ref:null,topic:c,event:u,payload:f}},decodeReply(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(e.slice(s,s+n));s=s+n;let u=r.decode(e.slice(s,s+i));s=s+i;let f=r.decode(e.slice(s,s+a));s=s+a;let d=r.decode(e.slice(s,s+o));s=s+o;let h=e.slice(s,e.byteLength),p={status:d,response:h};return{join_ref:c,ref:u,topic:f,event:da.reply,payload:p}},decodeBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=r.decode(e.slice(a,a+n));a=a+n;let s=r.decode(e.slice(a,a+i));a=a+i;let c=e.slice(a,e.byteLength);return{join_ref:null,ref:null,topic:o,event:s,payload:c}}},eQ=class{constructor(e,t={}){var n,i;this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||GJ,this.transport=t.transport||Ti.WebSocket||xl,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Ti&&Ti.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Jp.encode.bind(Jp),this.defaultDecoder=Jp.decode.bind(Jp),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==xl?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;Dl&&Dl.addEventListener&&(Dl.addEventListener("pagehide",a=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Dl.addEventListener("pageshow",a=>{r===this.connectClock&&(r=null,this.connect())}),Dl.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=(n=t.autoSendHeartbeat)!=null?n:!0,this.heartbeatCallback=(i=t.heartbeatCallback)!=null?i:()=>{},this.rejoinAfterMs=a=>t.rejoinAfterMs?t.rejoinAfterMs(a):[1e3,2e3,5e3][a-1]||1e4,this.reconnectAfterMs=a=>t.reconnectAfterMs?t.reconnectAfterMs(a):[10,50,100,150,200,250,500,1e3,2e3][a-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(a,o,s)=>{console.log("".concat(a,": ").concat(o),s)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ef(t.params||{}),this.endPoint="".concat(e,"/").concat($1.websocket),this.vsn=t.vsn||qJ,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Q3(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(()=>T(this,null,function*(){t.beforeReconnect&&(yield t.beforeReconnect()),this.connect()}))},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return xl}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Vg.appendParams(Vg.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?"".concat(this.protocol(),":").concat(e):"".concat(this.protocol(),"://").concat(location.host).concat(e)}disconnect(e,t,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,r)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ef(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==xl?this.connectWithFallback(xl,this.longPollFallbackMs):this.transportConnect())}log(e,t,r){this.logger&&this.logger(e,t,r)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(i=>{i.ref===t&&(this.off([n]),e(Date.now()-r))});return!0}transportName(e){switch(e){case xl:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix","".concat(M1).concat(btoa(this.authToken).replace(/=/g,""))]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,a,o=this.transportName(e),s=c=>{this.log("transport","falling back to ".concat(o,"..."),c),this.off([i,a]),n=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession("phx:fallback:".concat(o)))return s("memorized");this.fallbackTimer=setTimeout(s,t),a=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),s(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession("phx:fallback:".concat(c),"true"),this.log("transport","established ".concat(c," fallback"))}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport","connected to ".concat(this.endPointURL())),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),YJ,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,r){if(!this.conn)return e&&e();const n=this.conn;this.waitForBufferDone(n,()=>{t?n.close(t,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,r=1){if(r===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,r+1)},150*r)}waitForSocketClosed(e,t,r=1){if(r===5||e.readyState===Mi.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,r+1)},150*r)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",e,t,r),(t===this.transport||r>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(da.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Mi.connecting:return"connecting";case Mi.open:return"open";case Mi.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([r])=>e.indexOf(r)===-1)}channel(e,t={}){let r=new JJ(e,t,this);return this.channels.push(r),r}push(e){if(this.hasLogger()){let{topic:t,event:r,payload:n,ref:i,join_ref:a}=e;this.log("push","".concat(t," ").concat(r," (").concat(a,", ").concat(i,")"),n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:r,event:n,payload:i,ref:a,join_ref:o}=t;if(a&&a===this.pendingHeartbeatRef){const s=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",s)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive","".concat(i.status||""," ").concat(r," ").concat(n," ").concat(a&&"("+a+")"||"").trim(),i);for(let s=0;s<this.channels.length;s++){const c=this.channels[s];c.isMember(r,n,i,o)&&c.trigger(n,i,a,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([r,n])=>{try{n(...t)}catch(i){this.log("error","error in ".concat(e," callback"),i)}})}catch(r){this.log("error","error triggering ".concat(e," callbacks"),r)}}leaveOpenTopic(e){let t=this.channels.find(r=>r.topic===e&&(r.isJoined()||r.isJoining()));t&&(this.hasLogger()&&this.log("transport",'leaving duplicate topic "'.concat(e,'"')),t.leave())}};class tf{constructor(t,r){const n=rQ(r);this.presence=new ZJ(t.getChannel(),n),this.presence.onJoin((i,a,o)=>{const s=tf.onJoinPayload(i,a,o);t.getChannel().trigger("presence",s)}),this.presence.onLeave((i,a,o)=>{const s=tf.onLeavePayload(i,a,o);t.getChannel().trigger("presence",s)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return tf.transformState(this.presence.state)}static transformState(t){return t=tQ(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const i=t[n];return r[n]=Zm(i),r},{})}static onJoinPayload(t,r,n){const i=_A(r),a=Zm(n);return{event:"join",key:t,currentPresences:i,newPresences:a}}static onLeavePayload(t,r,n){const i=_A(r),a=Zm(n);return{event:"leave",key:t,currentPresences:i,leftPresences:a}}}function Zm(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function tQ(e){return JSON.parse(JSON.stringify(e))}function rQ(e){return(e==null?void 0:e.events)&&{events:e.events}}function _A(e){return e!=null&&e.metas?Zm(e):[]}var jA;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(jA||(jA={}));class nQ{get state(){return this.presenceAdapter.state}constructor(t,r){this.channel=t,this.presenceAdapter=new tf(this.channel.channelAdapter,r)}}class iQ{constructor(t,r,n){const i=aQ(n);this.channel=t.getSocket().channel(r,i),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,r){return this.channel.on(t,r)}off(t,r){this.channel.off(t,r)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,r,n){let i;try{i=this.channel.push(t,r,n)}catch(a){throw"tried to push '".concat(t,"' to '").concat(this.channel.topic,"' before joining. Use channel.subscribe() before pushing events")}if(this.channel.pushBuffer.length>LJ){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel","discarded push due to buffer overflow: ".concat(a.event),a.payload())}return i}updateJoinPayload(t){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),t)}canPush(){return this.socket.isConnected()&&this.state===uo.joined}isJoined(){return this.state===uo.joined}isJoining(){return this.state===uo.joining}isClosed(){return this.state===uo.closed}isLeaving(){return this.state===uo.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function aQ(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var SA;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(SA||(SA={}));var ec;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ec||(ec={}));var fa;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(fa||(fa={}));class rf{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,r={config:{}},n){var i,a;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new iQ(this.socket.socketAdapter,t,this.params),this.presence=new nQ(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=J3(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw"tried to use replay on public channel '".concat(this.topic,"'. It must be a private channel.")}subscribe(t,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:s,private:c}}=this.params,u=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&i!==void 0?i:[],f=!!this.bindings[ec.PRESENCE]&&this.bindings[ec.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,d={},h={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:f}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(fa.CHANNEL_ERROR,p)}),this._onClose(()=>t==null?void 0:t(fa.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",m=>T(this,[m],function*({postgres_changes:p}){if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(fa.SUBSCRIBED);return}this._updatePostgresBindings(p,t)})).receive("error",p=>{this.state=uo.errored,t==null||t(fa.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(fa.TIMED_OUT)})}return this}_updatePostgresBindings(t,r){var n;const i=this.bindings.postgres_changes,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,o=[];for(let s=0;s<a;s++){const c=i[s],{filter:{event:u,schema:f,table:d,filter:h}}=c,p=t&&t[s];if(p&&p.event===u&&rf.isFilterValueEqual(p.schema,f)&&rf.isFilterValueEqual(p.table,d)&&rf.isFilterValueEqual(p.filter,h))o.push(Object.assign(Object.assign({},c),{id:p.id}));else{this.unsubscribe(),this.state=uo.errored,r==null||r(fa.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=uo.errored&&r&&r(fa.SUBSCRIBED)}presenceState(){return this.presence.state}track(n){return T(this,arguments,function*(t,r={}){return yield this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)})}untrack(){return T(this,arguments,function*(t={}){return yield this.send({type:"presence",event:"untrack"},t)})}on(t,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=t===ec.PRESENCE||t===ec.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel","cannot add `".concat(t,"` callbacks for ").concat(this.topic," after `subscribe()`.")),new Error("cannot add `".concat(t,"` callbacks for ").concat(this.topic," after `subscribe()`."));return this._on(t,r,n)}httpSend(i,a){return T(this,arguments,function*(t,r,n={}){var o;if(r==null)return Promise.reject("Payload is required for httpSend()");const s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization="Bearer ".concat(this.socket.accessTokenValue));const c={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},u=yield this._fetchWithTimeout(this.broadcastEndpointURL,c,(o=n.timeout)!==null&&o!==void 0?o:this.timeout);if(u.status===202)return{success:!0};let f=u.statusText;try{const d=yield u.json();f=d.error||d.message||f}catch(d){}return Promise.reject(new Error(f))})}send(n){return T(this,arguments,function*(t,r={}){var i,a;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:s}=t,c={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(c.Authorization="Bearer ".concat(this.socket.accessTokenValue));const u={method:"POST",headers:c,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:s,private:this.private}]})};try{const f=yield this._fetchWithTimeout(this.broadcastEndpointURL,u,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);return yield(a=f.body)===null||a===void 0?void 0:a.cancel(),f.ok?"ok":"error"}catch(f){return f.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var s,c,u;const f=this.channelAdapter.push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((u=(c=(s=this.params)===null||s===void 0?void 0:s.config)===null||c===void 0?void 0:c.broadcast)===null||u===void 0)&&u.ack)&&o("ok"),f.receive("ok",()=>o("ok")),f.receive("error",()=>o("error")),f.receive("timeout",()=>o("timed out"))})})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}unsubscribe(){return T(this,arguments,function*(t=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})})}teardown(){this.channelAdapter.teardown()}_fetchWithTimeout(t,r,n){return T(this,null,function*(){const i=new AbortController,a=setTimeout(()=>i.abort(),n),o=yield this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),o})}_on(t,r,n){const i=t.toLocaleLowerCase(),a=this.channelAdapter.on(t,n),o={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,r,n)=>{var i,a,o,s,c,u,f;const d=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,n))return!1;const h=(i=this.bindings[d])===null||i===void 0?void 0:i.find(p=>p.ref===t.ref);if(!h)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in h){const p=h.id,m=(a=h.filter)===null||a===void 0?void 0:a.event;return p&&((o=r.ids)===null||o===void 0?void 0:o.includes(p))&&(m==="*"||(m==null?void 0:m.toLocaleLowerCase())===((s=r.data)===null||s===void 0?void 0:s.type.toLocaleLowerCase()))}else{const p=(u=(c=h==null?void 0:h.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((f=r==null?void 0:r.event)===null||f===void 0?void 0:f.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===d})}_notThisChannelEvent(t,r){const{close:n,error:i,leave:a,join:o}=Y3;return r&&[n,i,a,o].includes(t)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:a,table:o,commit_timestamp:s,type:c,errors:u}=i;return Object.assign(Object.assign({},{schema:a,table:o,commit_timestamp:s,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(i))}return r})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in t.bindings)for(const n of t.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(t,r){const n=t!=null?t:void 0,i=r!=null?r:void 0;return n===i}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=kA(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=kA(t.columns,t.old_record)),r}}class oQ{constructor(t,r){this.socket=new eQ(t,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,r,n,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{t(),a("ok")},r,n)})}push(t){this.socket.push(t)}log(t,r,n){this.socket.log(t,r,n)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==O1.connecting}isDisconnecting(){return this.socket.connectionState()==O1.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const sQ={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},lQ=[1e3,2e3,5e3,1e4],cQ=1e4,uQ='\n addEventListener("message", (e) => {\n if (e.data.event === "start") {\n setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);\n }\n });';class dQ{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new zJ,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=a=>a?(...o)=>a(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const i=this._initializeOptions(r);this.socketAdapter=new oQ(t,i),this.httpEndpoint=J3(t),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const r=t.message;throw r.includes("Node.js")?new Error("".concat(r,"\n\n")+'To use Realtime in Node.js, you need to provide a WebSocket implementation:\n\nOption 1: Use Node.js 22+ which has native WebSocket support\nOption 2: Install and provide the "ws" package:\n\n npm install ws\n\n import ws from "ws"\n const client = new RealtimeClient(url, {\n ...options,\n transport: ws\n })'):new Error("WebSocket not available: ".concat(r))}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}disconnect(t,r){return T(this,null,function*(){return this.isDisconnecting()?"ok":yield this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,r)})}getChannels(){return this.channels}removeChannel(t){return T(this,null,function*(){const r=yield t.unsubscribe();return r==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),r})}removeAllChannels(){return T(this,null,function*(){const t=this.channels.map(n=>T(this,null,function*(){const i=yield n.unsubscribe();return n.teardown(),i})),r=yield Promise.all(t);return this.disconnect(),r})}log(t,r,n){this.socketAdapter.log(t,r,n)}connectionState(){return this.socketAdapter.connectionState()||O1.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,r={config:{}}){const n="realtime:".concat(t),i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new rf("realtime:".concat(t),r,this);return this.channels.push(a),a}}push(t){this.socketAdapter.push(t)}setAuth(t=null){return T(this,null,function*(){this._authPromise=this._performAuth(t);try{yield this._authPromise}finally{this._authPromise=null}})}_isManualToken(){return this._manuallySetToken}sendHeartbeat(){return T(this,null,function*(){this.socketAdapter.sendHeartbeat()})}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_performAuth(t=null){return T(this,null,function*(){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=yield this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(i=>{const a={access_token:r,version:$J};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(Y3.access_token,{access_token:r})}))})}_waitForAuthIfNeeded(){return T(this,null,function*(){this._authPromise&&(yield this._authPromise)})}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error","Error setting auth in ".concat(t),r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(r,n)=>{r=="sent"&&this._setAuthSafely(),t&&t(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker","starting worker for from ".concat(this.workerUrl)):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([uQ],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(t){var r,n,i,a,o,s,c,u,f;this.worker=(r=t==null?void 0:t.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=t==null?void 0:t.accessToken)!==null&&n!==void 0?n:null;const d={};d.timeout=(i=t==null?void 0:t.timeout)!==null&&i!==void 0?i:IJ,d.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:sQ.HEARTBEAT_INTERVAL,d.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:OJ.getWebSocketConstructor(),d.params=t==null?void 0:t.params,d.logger=t==null?void 0:t.logger,d.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),d.reconnectAfterMs=(s=t==null?void 0:t.reconnectAfterMs)!==null&&s!==void 0?s:g=>lQ[g-1]||cQ;let h,p;const m=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:DJ;switch(m){case MJ:h=(g,v)=>v(JSON.stringify(g)),p=(g,v)=>v(JSON.parse(g));break;case G3:h=this.serializer.encode.bind(this.serializer),p=this.serializer.decode.bind(this.serializer);break;default:throw new Error("Unsupported serializer version: ".concat(d.vsn))}if(d.vsn=m,d.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:h,d.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:p,d.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,d.params=Object.assign(Object.assign({},d.params),{log_level:this.logLevel})),this.worker){if(typeof window!="undefined"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,d.autoSendHeartbeat=!this.worker}return d}_reconnectAuth(){return T(this,null,function*(){yield this._waitForAuthIfNeeded(),this.isConnected()||this.connect()})}}var Ff=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function fQ(e,t,r){const n=new URL(t,e);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}function hQ(e){return T(this,null,function*(){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:"Bearer ".concat(e.token)}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?yield e.getHeaders():{}})}function pQ(e){var r;const t=(r=e.fetchImpl)!=null?r:globalThis.fetch;return{request(u){return T(this,arguments,function*({method:i,path:a,query:o,body:s,headers:c}){var v;const f=fQ(e.baseUrl,a,o),d=yield hQ(e.auth),h=yield t(f,{method:i,headers:N(N(N({},s?{"Content-Type":"application/json"}:{}),d),c),body:s?JSON.stringify(s):void 0}),p=yield h.text(),m=(h.headers.get("content-type")||"").includes("application/json"),g=m&&p?JSON.parse(p):p;if(!h.ok){const x=m?g:void 0,b=x==null?void 0:x.error;throw new Ff((v=b==null?void 0:b.message)!=null?v:"Request failed with status ".concat(h.status),{status:h.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:x})}return{status:h.status,headers:h.headers,data:g}})}}}function Qp(e){return e.join("")}var mQ=class{constructor(e,t=""){this.client=e,this.prefix=t}listNamespaces(e){return T(this,null,function*(){const t=e?{parent:Qp(e.namespace)}:void 0;return(yield this.client.request({method:"GET",path:"".concat(this.prefix,"/namespaces"),query:t})).data.namespaces.map(n=>({namespace:n}))})}createNamespace(e,t){return T(this,null,function*(){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(yield this.client.request({method:"POST",path:"".concat(this.prefix,"/namespaces"),body:r})).data})}dropNamespace(e){return T(this,null,function*(){yield this.client.request({method:"DELETE",path:"".concat(this.prefix,"/namespaces/").concat(Qp(e.namespace))})})}loadNamespaceMetadata(e){return T(this,null,function*(){return{properties:(yield this.client.request({method:"GET",path:"".concat(this.prefix,"/namespaces/").concat(Qp(e.namespace))})).data.properties}})}namespaceExists(e){return T(this,null,function*(){try{return yield this.client.request({method:"HEAD",path:"".concat(this.prefix,"/namespaces/").concat(Qp(e.namespace))}),!0}catch(t){if(t instanceof Ff&&t.status===404)return!1;throw t}})}createNamespaceIfNotExists(e,t){return T(this,null,function*(){try{return yield this.createNamespace(e,t)}catch(r){if(r instanceof Ff&&r.status===409)return;throw r}})}};function bl(e){return e.join("")}var gQ=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}listTables(e){return T(this,null,function*(){return(yield this.client.request({method:"GET",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables")})).data.identifiers})}createTable(e,t){return T(this,null,function*(){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(yield this.client.request({method:"POST",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables"),body:t,headers:r})).data.metadata})}updateTable(e,t){return T(this,null,function*(){const r=yield this.client.request({method:"POST",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables/").concat(e.name),body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}})}dropTable(e,t){return T(this,null,function*(){var r;yield this.client.request({method:"DELETE",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables/").concat(e.name),query:{purgeRequested:String((r=t==null?void 0:t.purge)!=null?r:!1)}})})}loadTable(e){return T(this,null,function*(){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(yield this.client.request({method:"GET",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables/").concat(e.name),headers:t})).data.metadata})}tableExists(e){return T(this,null,function*(){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return yield this.client.request({method:"HEAD",path:"".concat(this.prefix,"/namespaces/").concat(bl(e.namespace),"/tables/").concat(e.name),headers:t}),!0}catch(r){if(r instanceof Ff&&r.status===404)return!1;throw r}})}createTableIfNotExists(e,t){return T(this,null,function*(){try{return yield this.createTable(e,t)}catch(r){if(r instanceof Ff&&r.status===409)return yield this.loadTable({namespace:e.namespace,name:t.name});throw r}})}},yQ=class{constructor(e){var n;let t="v1";e.catalogName&&(t+="/".concat(e.catalogName));const r=e.baseUrl.endsWith("/")?e.baseUrl:"".concat(e.baseUrl,"/");this.client=pQ({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new mQ(this.client,t),this.tableOps=new gQ(this.client,t,this.accessDelegation)}listNamespaces(e){return T(this,null,function*(){return this.namespaceOps.listNamespaces(e)})}createNamespace(e,t){return T(this,null,function*(){return this.namespaceOps.createNamespace(e,t)})}dropNamespace(e){return T(this,null,function*(){yield this.namespaceOps.dropNamespace(e)})}loadNamespaceMetadata(e){return T(this,null,function*(){return this.namespaceOps.loadNamespaceMetadata(e)})}listTables(e){return T(this,null,function*(){return this.tableOps.listTables(e)})}createTable(e,t){return T(this,null,function*(){return this.tableOps.createTable(e,t)})}updateTable(e,t){return T(this,null,function*(){return this.tableOps.updateTable(e,t)})}dropTable(e,t){return T(this,null,function*(){yield this.tableOps.dropTable(e,t)})}loadTable(e){return T(this,null,function*(){return this.tableOps.loadTable(e)})}namespaceExists(e){return T(this,null,function*(){return this.namespaceOps.namespaceExists(e)})}tableExists(e){return T(this,null,function*(){return this.tableOps.tableExists(e)})}createNamespaceIfNotExists(e,t){return T(this,null,function*(){return this.namespaceOps.createNamespaceIfNotExists(e,t)})}createTableIfNotExists(e,t){return T(this,null,function*(){return this.tableOps.createTableIfNotExists(e,t)})}},Vv=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function Wv(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var D1=class extends Vv{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Z3=class extends Vv{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const vQ=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),xQ=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)},I1=e=>{if(Array.isArray(e))return e.map(r=>I1(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[i]=I1(n)}),t},bQ=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Kf(e){"@babel/helpers - typeof";return Kf=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},Kf(e)}function wQ(e,t){if(Kf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kQ(e){var t=wQ(e,"string");return Kf(t)=="symbol"?t:t+""}function _Q(e,t,r){return(t=kQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EA(Object(r),!0).forEach(function(n){_Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const NA=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},jQ=(e,t,r,n)=>T(Da,null,function*(){if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const i=e;let a=parseInt(i.status,10);Number.isFinite(a)||(a=500),i.json().then(o=>{const s=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new D1(NA(o),a,s,n))}).catch(()=>{const o=a+"";t(new D1(i.statusText||"HTTP ".concat(a," error"),a,o,n))})}else t(new Z3(NA(e),e,n))}),SQ=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!n)return Ee(Ee({},i),r);if(xQ(n)){var a;const o=(t==null?void 0:t.headers)||{};let s;for(const[c,u]of Object.entries(o))c.toLowerCase()==="content-type"&&(s=u);i.headers=EQ(o,"Content-Type",(a=s)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return t!=null&&t.duplex&&(i.duplex=t.duplex),Ee(Ee({},i),r)};function EQ(e,t,r){const n=Ee({},e);for(const i of Object.keys(n))i.toLowerCase()===t.toLowerCase()&&delete n[i];return n[t]=r,n}function yd(e,t,r,n,i,a,o){return T(this,null,function*(){return new Promise((s,c)=>{e(r,SQ(t,n,i,a)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(o==="vectors"){const f=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!f||!f.includes("application/json"))return{}}return u.json()}).then(u=>s(u)).catch(u=>jQ(u,c,n,o))})})}function e4(e="storage"){return{get:(t,r,n,i)=>T(this,null,function*(){return yd(t,"GET",r,n,i,void 0,e)}),post:(t,r,n,i,a)=>T(this,null,function*(){return yd(t,"POST",r,i,a,n,e)}),put:(t,r,n,i,a)=>T(this,null,function*(){return yd(t,"PUT",r,i,a,n,e)}),head:(t,r,n,i)=>T(this,null,function*(){return yd(t,"HEAD",r,Ee(Ee({},n),{},{noResolveJson:!0}),i,void 0,e)}),remove:(t,r,n,i,a)=>T(this,null,function*(){return yd(t,"DELETE",r,i,a,n,e)})}}const NQ=e4("storage"),{get:Hf,post:ti,put:L1,head:CQ,remove:KS}=NQ,dn=e4("vectors");var Du=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([i,a])=>[i.toLowerCase(),a])),this.fetch=vQ(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Ee(Ee({},this.headers),{},{[e.toLowerCase()]:t}),this}handleOperation(e){return T(this,null,function*(){var t=this;try{return{data:yield e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Wv(r))return{data:null,error:r};throw r}})}},TQ=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}execute(){return T(this,null,function*(){var e=this;try{return{data:(yield e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Wv(t))return{data:null,error:t};throw t}})}};let t4;t4=Symbol.toStringTag;var AQ=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[t4]="BlobDownloadBuilder",this.promise=null}asStream(){return new TQ(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return T(this,null,function*(){var e=this;try{return{data:yield(yield e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Wv(t))return{data:null,error:t};throw t}})}};const PQ={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},CA={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var OQ=class extends Du{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}uploadOrUpdate(e,t,r,n){return T(this,null,function*(){var i=this;return i.handleOperation(()=>T(this,null,function*(){let a;const o=Ee(Ee({},CA),n);let s=Ee(Ee({},i.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob!="undefined"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",o.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=r,s["cache-control"]="max-age=".concat(o.cacheControl),s["content-type"]=o.contentType,c&&(s["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream!="undefined"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(s=Ee(Ee({},s),n.headers));const u=i._removeEmptyFolders(t),f=i._getFinalPath(u),d=yield(e=="PUT"?L1:ti)(i.fetch,"".concat(i.url,"/object/").concat(f),a,Ee({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}}))})}upload(e,t,r){return T(this,null,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return T(this,null,function*(){var i=this;const a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+"/object/upload/sign/".concat(o));return s.searchParams.set("token",t),i.handleOperation(()=>T(this,null,function*(){let c;const u=Ee(Ee({},CA),n),f=Ee(Ee({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob!="undefined"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData!="undefined"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,f["cache-control"]="max-age=".concat(u.cacheControl),f["content-type"]=u.contentType),{path:a,fullPath:(yield L1(i.fetch,s.toString(),c,{headers:f})).Key}}))})}createSignedUploadUrl(e,t){return T(this,null,function*(){var r=this;return r.handleOperation(()=>T(this,null,function*(){let n=r._getFinalPath(e);const i=Ee({},r.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const a=yield ti(r.fetch,"".concat(r.url,"/object/upload/sign/").concat(n),{},{headers:i}),o=new URL(r.url+a.url),s=o.searchParams.get("token");if(!s)throw new Vv("No token returned by API");return{signedUrl:o.toString(),path:e,token:s}}))})}update(e,t,r){return T(this,null,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t,r){return T(this,null,function*(){var n=this;return n.handleOperation(()=>T(this,null,function*(){return yield ti(n.fetch,"".concat(n.url,"/object/move"),{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})}))})}copy(e,t,r){return T(this,null,function*(){var n=this;return n.handleOperation(()=>T(this,null,function*(){return{path:(yield ti(n.fetch,"".concat(n.url,"/object/copy"),{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}}))})}createSignedUrl(e,t,r){return T(this,null,function*(){var n=this;return n.handleOperation(()=>T(this,null,function*(){let i=n._getFinalPath(e);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=yield ti(n.fetch,"".concat(n.url,"/object/sign/").concat(i),Ee({expiresIn:t},a?{transform:r.transform}:{}),{headers:n.headers});const s=new URLSearchParams;r!=null&&r.download&&s.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&s.set("cacheNonce",String(r.cacheNonce));const c=s.toString(),u=a&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI("".concat(n.url).concat(u).concat(c?"&".concat(c):""))}}))})}createSignedUrls(e,t,r){return T(this,null,function*(){var n=this;return n.handleOperation(()=>T(this,null,function*(){const i=yield ti(n.fetch,"".concat(n.url,"/object/sign/").concat(n.bucketId),{expiresIn:t,paths:e},{headers:n.headers}),a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const o=a.toString();return i.map(s=>Ee(Ee({},s),{},{signedUrl:s.signedURL?encodeURI("".concat(n.url).concat(s.signedURL).concat(o?"&".concat(o):"")):null}))}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)!="undefined"?"render/image/authenticated":"object",i=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(i,t.transform),(t==null?void 0:t.cacheNonce)!=null&&i.set("cacheNonce",String(t.cacheNonce));const a=i.toString(),o=this._getFinalPath(e),s=()=>Hf(this.fetch,"".concat(this.url,"/").concat(n,"/").concat(o).concat(a?"?".concat(a):""),{headers:this.headers,noResolveJson:!0},r);return new AQ(s,this.shouldThrowOnError)}info(e){return T(this,null,function*(){var t=this;const r=t._getFinalPath(e);return t.handleOperation(()=>T(this,null,function*(){return I1(yield Hf(t.fetch,"".concat(t.url,"/object/info/").concat(r),{headers:t.headers}))}))})}exists(e){return T(this,null,function*(){var t=this;const r=t._getFinalPath(e);try{return yield CQ(t.fetch,"".concat(t.url,"/object/").concat(r),{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(Wv(i)){var n;const a=i instanceof D1?i.status:i instanceof Z3?(n=i.originalError)===null||n===void 0?void 0:n.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:i}}throw i}})}getPublicUrl(e,t){const r=this._getFinalPath(e),n=new URLSearchParams;t!=null&&t.download&&n.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(n,t.transform),(t==null?void 0:t.cacheNonce)!=null&&n.set("cacheNonce",String(t.cacheNonce));const i=n.toString(),a=typeof(t==null?void 0:t.transform)!="undefined"?"render/image":"object";return{data:{publicUrl:encodeURI("".concat(this.url,"/").concat(a,"/public/").concat(r))+(i?"?".concat(i):"")}}}remove(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield KS(t.fetch,"".concat(t.url,"/object/").concat(t.bucketId),{prefixes:e},{headers:t.headers})}))})}list(e,t,r){return T(this,null,function*(){var n=this;return n.handleOperation(()=>T(this,null,function*(){const i=Ee(Ee(Ee({},PQ),t),{},{prefix:e||""});return yield ti(n.fetch,"".concat(n.url,"/object/list/").concat(n.bucketId),i,{headers:n.headers},r)}))})}listV2(e,t){return T(this,null,function*(){var r=this;return r.handleOperation(()=>T(this,null,function*(){const n=Ee({},e);return yield ti(r.fetch,"".concat(r.url,"/object/list-v2/").concat(r.bucketId),n,{headers:r.headers},t)}))})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer!="undefined"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return"".concat(this.bucketId,"/").concat(e.replace(/^\/+/,""))}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const RQ="2.103.0",rp={"X-Client-Info":"storage-js/".concat(RQ)};var $Q=class extends Du{constructor(e,t={},r,n){const i=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),o=Ee(Ee({},rp),t);super(a,o,r,"storage")}listBuckets(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){const r=t.listBucketOptionsToQueryString(e);return yield Hf(t.fetch,"".concat(t.url,"/bucket").concat(r),{headers:t.headers})}))})}getBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield Hf(t.fetch,"".concat(t.url,"/bucket/").concat(e),{headers:t.headers})}))})}createBucket(r){return T(this,arguments,function*(e,t={public:!1}){var n=this;return n.handleOperation(()=>T(this,null,function*(){return yield ti(n.fetch,"".concat(n.url,"/bucket"),{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers})}))})}updateBucket(e,t){return T(this,null,function*(){var r=this;return r.handleOperation(()=>T(this,null,function*(){return yield L1(r.fetch,"".concat(r.url,"/bucket/").concat(e),{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers})}))})}emptyBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield ti(t.fetch,"".concat(t.url,"/bucket/").concat(e,"/empty"),{},{headers:t.headers})}))})}deleteBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield KS(t.fetch,"".concat(t.url,"/bucket/").concat(e),{},{headers:t.headers})}))})}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},MQ=class extends Du{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ee(Ee({},rp),t);super(n,i,r,"storage")}createBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield ti(t.fetch,"".concat(t.url,"/bucket"),{name:e},{headers:t.headers})}))})}listBuckets(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?"".concat(t.url,"/bucket?").concat(n):"".concat(t.url,"/bucket");return yield Hf(t.fetch,i,{headers:t.headers})}))})}deleteBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield KS(t.fetch,"".concat(t.url,"/bucket/").concat(e),{},{headers:t.headers})}))})}from(e){var t=this;if(!bQ(e))throw new Vv("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new yQ({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:()=>T(this,null,function*(){return t.headers})},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const o=i[a];return typeof o!="function"?o:(...s)=>T(this,null,function*(){try{return{data:yield o.apply(i,s),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}})}})}},DQ=class extends Du{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ee(Ee({},rp),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}createIndex(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return(yield dn.post(t.fetch,"".concat(t.url,"/CreateIndex"),e,{headers:t.headers}))||{}}))})}getIndex(e,t){return T(this,null,function*(){var r=this;return r.handleOperation(()=>T(this,null,function*(){return yield dn.post(r.fetch,"".concat(r.url,"/GetIndex"),{vectorBucketName:e,indexName:t},{headers:r.headers})}))})}listIndexes(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/ListIndexes"),e,{headers:t.headers})}))})}deleteIndex(e,t){return T(this,null,function*(){var r=this;return r.handleOperation(()=>T(this,null,function*(){return(yield dn.post(r.fetch,"".concat(r.url,"/DeleteIndex"),{vectorBucketName:e,indexName:t},{headers:r.headers}))||{}}))})}},IQ=class extends Du{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ee(Ee({},rp),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}putVectors(e){return T(this,null,function*(){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(()=>T(this,null,function*(){return(yield dn.post(t.fetch,"".concat(t.url,"/PutVectors"),e,{headers:t.headers}))||{}}))})}getVectors(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/GetVectors"),e,{headers:t.headers})}))})}listVectors(e){return T(this,null,function*(){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error("segmentIndex must be between 0 and ".concat(e.segmentCount-1))}return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/ListVectors"),e,{headers:t.headers})}))})}queryVectors(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/QueryVectors"),e,{headers:t.headers})}))})}deleteVectors(e){return T(this,null,function*(){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(()=>T(this,null,function*(){return(yield dn.post(t.fetch,"".concat(t.url,"/DeleteVectors"),e,{headers:t.headers}))||{}}))})}},LQ=class extends Du{constructor(e,t={},r){const n=e.replace(/\/$/,""),i=Ee(Ee({},rp),{},{"Content-Type":"application/json"},t);super(n,i,r,"vectors")}createBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return(yield dn.post(t.fetch,"".concat(t.url,"/CreateVectorBucket"),{vectorBucketName:e},{headers:t.headers}))||{}}))})}getBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/GetVectorBucket"),{vectorBucketName:e},{headers:t.headers})}))})}listBuckets(){return T(this,arguments,function*(e={}){var t=this;return t.handleOperation(()=>T(this,null,function*(){return yield dn.post(t.fetch,"".concat(t.url,"/ListVectorBuckets"),e,{headers:t.headers})}))})}deleteBucket(e){return T(this,null,function*(){var t=this;return t.handleOperation(()=>T(this,null,function*(){return(yield dn.post(t.fetch,"".concat(t.url,"/DeleteVectorBucket"),{vectorBucketName:e},{headers:t.headers}))||{}}))})}},zQ=class e extends LQ{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new BQ(this.url,this.headers,t,this.fetch)}createBucket(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"createBucket"),n=this;return r().call(n,t)})}getBucket(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"getBucket"),n=this;return r().call(n,t)})}listBuckets(){return T(this,arguments,function*(t={}){var r=()=>Kr(e.prototype,this,"listBuckets"),n=this;return r().call(n,t)})}deleteBucket(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"deleteBucket"),n=this;return r().call(n,t)})}},BQ=class e extends DQ{constructor(t,r,n,i){super(t,r,i),this.vectorBucketName=n}createIndex(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"createIndex"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName}))})}listIndexes(){return T(this,arguments,function*(t={}){var r=()=>Kr(e.prototype,this,"listIndexes"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName}))})}getIndex(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"getIndex"),n=this;return r().call(n,n.vectorBucketName,t)})}deleteIndex(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"deleteIndex"),n=this;return r().call(n,n.vectorBucketName,t)})}index(t){return new UQ(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},UQ=class e extends IQ{constructor(t,r,n,i,a){super(t,r,a),this.vectorBucketName=n,this.indexName=i}putVectors(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"putVectors"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))})}getVectors(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"getVectors"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))})}listVectors(){return T(this,arguments,function*(t={}){var r=()=>Kr(e.prototype,this,"listVectors"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))})}queryVectors(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"queryVectors"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))})}deleteVectors(t){return T(this,null,function*(){var r=()=>Kr(e.prototype,this,"deleteVectors"),n=this;return r().call(n,Ee(Ee({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))})}},FQ=class extends $Q{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new OQ(this.url,this.headers,e,this.fetch)}get vectors(){return new zQ(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new MQ(this.url+"/iceberg",this.headers,this.fetch)}};function qv(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}const r4="2.103.0",Il=30*1e3,z1=3,Vb=z1*Il,KQ="http://localhost:9999",HQ="supabase.auth.token",VQ={"X-Client-Info":"gotrue-js/".concat(r4)},B1="X-Supabase-Api-Version",n4={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},WQ=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,qQ=10*60*1e3;class Vf extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function be(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class GQ extends Vf{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function YQ(e){return be(e)&&e.name==="AuthApiError"}class ys extends Vf{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Ba extends Vf{constructor(t,r,n,i){super(t,n,i),this.name=r,this.status=n}}class an extends Ba{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Zp(e){return be(e)&&e.name==="AuthSessionMissingError"}class wl extends Ba{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class em extends Ba{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class tm extends Ba{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function XQ(e){return be(e)&&e.name==="AuthImplicitGrantRedirectError"}class TA extends Ba{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class JQ extends Ba{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class U1 extends Ba{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Wb(e){return be(e)&&e.name==="AuthRetryableFetchError"}class AA extends Ba{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class F1 extends Ba{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Wg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),PA=" \n\r=".split(""),QQ=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<PA.length;t+=1)e[PA[t].charCodeAt(0)]=-2;for(let t=0;t<Wg.length;t+=1)e[Wg[t].charCodeAt(0)]=t;return e})();function OA(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Wg[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Wg[n]),t.queuedBits-=6}}function i4(e,t,r){const n=QQ[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error('Invalid Base64-URL character "'.concat(String.fromCharCode(e),'"'))}}function RA(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{tZ(o,n,r)};for(let o=0;o<e.length;o+=1)i4(e.charCodeAt(o),i,a);return t.join("")}function ZQ(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error("Unrecognized Unicode codepoint: ".concat(e.toString(16)))}function eZ(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}ZQ(n,t)}}function tZ(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function bc(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)i4(e.charCodeAt(i),r,n);return new Uint8Array(t)}function rZ(e){const t=[];return eZ(e,r=>t.push(r)),new Uint8Array(t)}function ws(e){const t=[],r={queue:0,queuedBits:0},n=i=>{t.push(i)};return e.forEach(i=>OA(i,r,n)),OA(null,r,n),t.join("")}function nZ(e){return Math.round(Date.now()/1e3)+e}function iZ(){return Symbol("auth-callback")}const fr=()=>typeof window!="undefined"&&typeof document!="undefined",as={tested:!1,writable:!1},a4=()=>{if(!fr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch(t){return!1}if(as.tested)return as.writable;const e="lswt-".concat(Math.random()).concat(Math.random());try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),as.tested=!0,as.writable=!0}catch(t){as.tested=!0,as.writable=!1}return as.writable};function aZ(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch(n){}return r.searchParams.forEach((n,i)=>{t[i]=n}),t}const o4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),oZ=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ll=(e,t,r)=>T(Da,null,function*(){yield e.setItem(t,JSON.stringify(r))}),os=(e,t)=>T(Da,null,function*(){const r=yield e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return r}}),dr=(e,t)=>T(Da,null,function*(){yield e.removeItem(t)});class Gv{constructor(){this.promise=new Gv.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Gv.promiseConstructor=Promise;function rm(e){const t=e.split(".");if(t.length!==3)throw new F1("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!WQ.test(t[n]))throw new F1("JWT not in base64url format");return{header:JSON.parse(RA(t[0])),payload:JSON.parse(RA(t[1])),signature:bc(t[2]),raw:{header:t[0],payload:t[1]}}}function sZ(e){return T(this,null,function*(){return yield new Promise(t=>{setTimeout(()=>t(null),e)})})}function lZ(e,t){return new Promise((n,i)=>{T(this,null,function*(){for(let a=0;a<1/0;a++)try{const o=yield e(a);if(!t(a,null,o)){n(o);return}}catch(o){if(!t(a,o)){i(o);return}}})})}function cZ(e){return("0"+e.toString(16)).substr(-2)}function uZ(){const t=new Uint32Array(56);if(typeof crypto=="undefined"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(t),Array.from(t,cZ).join("")}function dZ(e){return T(this,null,function*(){const r=new TextEncoder().encode(e),n=yield crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")})}function fZ(e){return T(this,null,function*(){if(!(typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof TextEncoder!="undefined"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=yield dZ(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")})}function kl(e,t,r=!1){return T(this,null,function*(){const n=uZ();let i=n;r&&(i+="/PASSWORD_RECOVERY"),yield Ll(e,"".concat(t,"-code-verifier"),i);const a=yield fZ(n);return[a,n===a?"plain":"s256"]})}const hZ=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function pZ(e){const t=e.headers.get(B1);if(!t||!t.match(hZ))return null;try{return new Date("".concat(t,"T00:00:00.0Z"))}catch(r){return null}}function mZ(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function gZ(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const yZ=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function _l(e){if(!yZ.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function qb(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "'.concat(r,'" property of the session object is not supported. Please use getUser() instead.'))},set:(t,r)=>{throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "'.concat(r,'" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.'))},deleteProperty:(t,r)=>{throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "'.concat(r,'" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.'))}})}function vZ(e,t){return new Proxy(e,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,i)}})}function $A(e){return JSON.parse(JSON.stringify(e))}const fs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),xZ=[502,503,504];function MA(e){return T(this,null,function*(){var t;if(!oZ(e))throw new U1(fs(e),0);if(xZ.includes(e.status))throw new U1(fs(e),e.status);let r;try{r=yield e.json()}catch(a){throw new ys(fs(a),a)}let n;const i=pZ(e);if(i&&i.getTime()>=n4["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new AA(fs(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new an}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new AA(fs(r),e.status,r.weak_password.reasons);throw new GQ(fs(r),e.status||500,n)})}const bZ=(e,t,r,n)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};function Se(e,t,r,n){return T(this,null,function*(){var i;const a=Object.assign({},n==null?void 0:n.headers);a[B1]||(a[B1]=n4["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization="Bearer ".concat(n.jwt));const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=yield wZ(e,t,r+s,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}})}function wZ(e,t,r,n,i,a){return T(this,null,function*(){const o=bZ(t,n,i,a);let s;try{s=yield e(r,Object.assign({},o))}catch(c){throw console.error(c),new U1(fs(c),0)}if(s.ok||(yield MA(s)),n!=null&&n.noResolveJson)return s;try{return yield s.json()}catch(c){yield MA(c)}})}function Jn(e){var t;let r=null;jZ(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=nZ(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function DA(e){const t=Jn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function fo(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function kZ(e){return{data:e,error:null}}function _Z(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=e,o=qv(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},c=Object.assign({},o);return{data:{properties:s,user:c},error:null}}function IA(e){return e}function jZ(e){return e.access_token&&e.refresh_token&&e.expires_in}const Gb=["global","local","others"];class SZ{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=o4(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}signOut(n){return T(this,arguments,function*(t,r=Gb[0]){if(Gb.indexOf(r)<0)throw new Error("@supabase/auth-js: Parameter scope must be one of ".concat(Gb.join(", ")));try{return yield Se(this.fetch,"POST","".concat(this.url,"/logout?scope=").concat(r),{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(i){if(be(i))return{data:null,error:i};throw i}})}inviteUserByEmail(n){return T(this,arguments,function*(t,r={}){try{return yield Se(this.fetch,"POST","".concat(this.url,"/invite"),{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:fo})}catch(i){if(be(i))return{data:{user:null},error:i};throw i}})}generateLink(t){return T(this,null,function*(){try{const{options:r}=t,n=qv(t,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),yield Se(this.fetch,"POST","".concat(this.url,"/admin/generate_link"),{body:i,headers:this.headers,xform:_Z,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(be(r))return{data:{properties:null,user:null},error:r};throw r}})}createUser(t){return T(this,null,function*(){try{return yield Se(this.fetch,"POST","".concat(this.url,"/admin/users"),{body:t,headers:this.headers,xform:fo})}catch(r){if(be(r))return{data:{user:null},error:r};throw r}})}listUsers(t){return T(this,null,function*(){var r,n,i,a,o,s,c;try{const u={nextPage:null,lastPage:0,total:0},f=yield Se(this.fetch,"GET","".concat(this.url,"/admin/users"),{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:IA});if(f.error)throw f.error;const d=yield f.json(),h=(o=f.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(s=f.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(m=>{const g=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(m.split(";")[1].split("=")[1]);u["".concat(v,"Page")]=g}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(be(u))return{data:{users:[]},error:u};throw u}})}getUserById(t){return T(this,null,function*(){_l(t);try{return yield Se(this.fetch,"GET","".concat(this.url,"/admin/users/").concat(t),{headers:this.headers,xform:fo})}catch(r){if(be(r))return{data:{user:null},error:r};throw r}})}updateUserById(t,r){return T(this,null,function*(){_l(t);try{return yield Se(this.fetch,"PUT","".concat(this.url,"/admin/users/").concat(t),{body:r,headers:this.headers,xform:fo})}catch(n){if(be(n))return{data:{user:null},error:n};throw n}})}deleteUser(t,r=!1){return T(this,null,function*(){_l(t);try{return yield Se(this.fetch,"DELETE","".concat(this.url,"/admin/users/").concat(t),{headers:this.headers,body:{should_soft_delete:r},xform:fo})}catch(n){if(be(n))return{data:{user:null},error:n};throw n}})}_listFactors(t){return T(this,null,function*(){_l(t.userId);try{const{data:r,error:n}=yield Se(this.fetch,"GET","".concat(this.url,"/admin/users/").concat(t.userId,"/factors"),{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(be(r))return{data:null,error:r};throw r}})}_deleteFactor(t){return T(this,null,function*(){_l(t.userId),_l(t.id);try{return{data:yield Se(this.fetch,"DELETE","".concat(this.url,"/admin/users/").concat(t.userId,"/factors/").concat(t.id),{headers:this.headers}),error:null}}catch(r){if(be(r))return{data:null,error:r};throw r}})}_listOAuthClients(t){return T(this,null,function*(){var r,n,i,a,o,s,c;try{const u={nextPage:null,lastPage:0,total:0},f=yield Se(this.fetch,"GET","".concat(this.url,"/admin/oauth/clients"),{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:IA});if(f.error)throw f.error;const d=yield f.json(),h=(o=f.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(s=f.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(m=>{const g=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(m.split(";")[1].split("=")[1]);u["".concat(v,"Page")]=g}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(be(u))return{data:{clients:[]},error:u};throw u}})}_createOAuthClient(t){return T(this,null,function*(){try{return yield Se(this.fetch,"POST","".concat(this.url,"/admin/oauth/clients"),{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(be(r))return{data:null,error:r};throw r}})}_getOAuthClient(t){return T(this,null,function*(){try{return yield Se(this.fetch,"GET","".concat(this.url,"/admin/oauth/clients/").concat(t),{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(be(r))return{data:null,error:r};throw r}})}_updateOAuthClient(t,r){return T(this,null,function*(){try{return yield Se(this.fetch,"PUT","".concat(this.url,"/admin/oauth/clients/").concat(t),{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(be(n))return{data:null,error:n};throw n}})}_deleteOAuthClient(t){return T(this,null,function*(){try{return yield Se(this.fetch,"DELETE","".concat(this.url,"/admin/oauth/clients/").concat(t),{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(be(r))return{data:null,error:r};throw r}})}_regenerateOAuthClientSecret(t){return T(this,null,function*(){try{return yield Se(this.fetch,"POST","".concat(this.url,"/admin/oauth/clients/").concat(t,"/regenerate_secret"),{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(be(r))return{data:null,error:r};throw r}})}_listCustomProviders(t){return T(this,null,function*(){try{const r={};return t!=null&&t.type&&(r.type=t.type),yield Se(this.fetch,"GET","".concat(this.url,"/admin/custom-providers"),{headers:this.headers,query:r,xform:n=>{var i;return{data:{providers:(i=n==null?void 0:n.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(r){if(be(r))return{data:{providers:[]},error:r};throw r}})}_createCustomProvider(t){return T(this,null,function*(){try{return yield Se(this.fetch,"POST","".concat(this.url,"/admin/custom-providers"),{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(be(r))return{data:null,error:r};throw r}})}_getCustomProvider(t){return T(this,null,function*(){try{return yield Se(this.fetch,"GET","".concat(this.url,"/admin/custom-providers/").concat(t),{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(be(r))return{data:null,error:r};throw r}})}_updateCustomProvider(t,r){return T(this,null,function*(){try{return yield Se(this.fetch,"PUT","".concat(this.url,"/admin/custom-providers/").concat(t),{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(be(n))return{data:null,error:n};throw n}})}_deleteCustomProvider(t){return T(this,null,function*(){try{return yield Se(this.fetch,"DELETE","".concat(this.url,"/admin/custom-providers/").concat(t),{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(be(r))return{data:null,error:r};throw r}})}}function LA(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const Si={debug:!!(globalThis&&a4()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class s4 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class zA extends s4{}function EZ(e,t,r){return T(this,null,function*(){Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;let i;t>0&&(i=setTimeout(()=>{n.abort(),Si.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),yield Promise.resolve();try{return yield globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},a=>T(this,null,function*(){if(a){clearTimeout(i),Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return yield r()}finally{Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new zA('Acquiring an exclusive Navigator LockManager lock "'.concat(e,'" immediately failed'));if(Si.debug)try{const o=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),yield r()}}))}catch(a){if(t>0&&clearTimeout(i),(a==null?void 0:a.name)==="AbortError"&&t>0){if(n.signal.aborted)return Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn('@supabase/gotrue-js: Lock "'.concat(e,'" was not released within ').concat(t,"ms. ")+"This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover."),yield Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},o=>T(this,null,function*(){if(o){Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return yield r()}finally{Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),yield r()})));throw Si.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new zA('Lock "'.concat(e,'" was released because another request stole it'))}throw a}})}function NZ(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){typeof self!="undefined"&&(self.globalThis=self)}}function l4(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error('@supabase/auth-js: Address "'.concat(e,'" is invalid.'));return e.toLowerCase()}function CZ(e){return parseInt(e,16)}function TZ(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function AZ(e){var t;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:s,requestId:c,resources:u,scheme:f,uri:d,version:h}=e;{if(!Number.isInteger(r))throw new Error('@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: '.concat(r));if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error('@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: '.concat(o));if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error("@supabase/auth-js: Invalid SIWE message field \"version\". Version must be '1'. Provided value: ".concat(h));if(!((t=e.statement)===null||t===void 0)&&t.includes("\n"))throw new Error("@supabase/auth-js: Invalid SIWE message field \"statement\". Statement must not include '\\n'. Provided value: ".concat(e.statement))}const p=l4(e.address),m=f?"".concat(f,"://").concat(n):n,g=e.statement?"".concat(e.statement,"\n"):"",v="".concat(m," wants you to sign in with your Ethereum account:\n").concat(p,"\n\n").concat(g);let x="URI: ".concat(d,"\nVersion: ").concat(h,"\nChain ID: ").concat(r).concat(o?"\nNonce: ".concat(o):"","\nIssued At: ").concat(a.toISOString());if(i&&(x+="\nExpiration Time: ".concat(i.toISOString())),s&&(x+="\nNot Before: ".concat(s.toISOString())),c&&(x+="\nRequest ID: ".concat(c)),u){let b="\nResources:";for(const y of u){if(!y||typeof y!="string")throw new Error('@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: '.concat(y));b+="\n- ".concat(y)}x+=b}return"".concat(v,"\n").concat(x)}class Vt extends Error{constructor({message:t,code:r,cause:n,name:i}){var a;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i!=null?i:n instanceof Error?n.name:void 0)!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class qg extends Vt{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function PZ({error:e,options:t}){var r,n,i;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Vt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Vt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Vt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Vt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Vt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Vt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new Vt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Vt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(c4(o)){if(a.rp.id!==o)return new Vt({message:'The RP ID "'.concat(a.rp.id,'" is invalid for this domain'),code:"ERROR_INVALID_RP_ID",cause:e})}else return new Vt({message:"".concat(window.location.hostname," is an invalid domain"),code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Vt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Vt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function OZ({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Vt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Vt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(c4(n)){if(r.rpId!==n)return new Vt({message:'The RP ID "'.concat(r.rpId,'" is invalid for this domain'),code:"ERROR_INVALID_RP_ID",cause:e})}else return new Vt({message:"".concat(window.location.hostname," is an invalid domain"),code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Vt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Vt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class RZ{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const $Z=new RZ;function MZ(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential!="undefined"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,i=qv(e,["challenge","user","excludeCredentials"]),a=bc(t).buffer,o=Object.assign(Object.assign({},r),{id:bc(r.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];s.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:bc(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return s}function DZ(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential!="undefined"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=qv(e,["challenge","allowCredentials"]),i=bc(t).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},s),{id:bc(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return a}function IZ(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:ws(new Uint8Array(e.response.attestationObject)),clientDataJSON:ws(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function LZ(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ws(new Uint8Array(i.authenticatorData)),clientDataJSON:ws(new Uint8Array(i.clientDataJSON)),signature:ws(new Uint8Array(i.signature)),userHandle:i.userHandle?ws(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function c4(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function BA(){var e,t;return!!(fr()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}function zZ(e){return T(this,null,function*(){try{const t=yield navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new qg("Browser returned unexpected credential type",t)}:{data:null,error:new qg("Empty credential response",t)}}catch(t){return{data:null,error:PZ({error:t,options:e})}}})}function BZ(e){return T(this,null,function*(){try{const t=yield navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new qg("Browser returned unexpected credential type",t)}:{data:null,error:new qg("Empty credential response",t)}}catch(t){return{data:null,error:OZ({error:t,options:e})}}})}const UZ={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},FZ={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Gg(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of e)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(t(o)){const s=n[a];t(s)?n[a]=Gg(s,o):n[a]=Gg(o)}else n[a]=o}return n}function KZ(e,t){return Gg(UZ,e,t||{})}function HZ(e,t){return Gg(FZ,e,t||{})}class VZ{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}_enroll(t){return T(this,null,function*(){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))})}_challenge(o,s){return T(this,arguments,function*({factorId:t,webauthn:r,friendlyName:n,signal:i},a){var c;try{const{data:u,error:f}=yield this.client.mfa.challenge({factorId:t,webauthn:r});if(!u)return{data:null,error:f};const d=i!=null?i:$Z.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:h}=u.webauthn.credential_options.publicKey;if(!h.name){const p=n;if(p)h.name="".concat(h.id,":").concat(p);else{const g=(yield this.client.getUser()).data.user,v=((c=g==null?void 0:g.user_metadata)===null||c===void 0?void 0:c.name)||(g==null?void 0:g.email)||(g==null?void 0:g.id)||"User";h.name="".concat(h.id,":").concat(v)}}h.displayName||(h.displayName=h.name)}switch(u.webauthn.type){case"create":{const h=KZ(u.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:p,error:m}=yield zZ({publicKey:h,signal:d});return p?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:p}},error:null}:{data:null,error:m}}case"request":{const h=HZ(u.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:p,error:m}=yield BZ(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:h,signal:d}));return p?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:p}},error:null}:{data:null,error:m}}}}catch(u){return be(u)?{data:null,error:u}:{data:null,error:new ys("Unexpected error in challenge",u)}}})}_verify(i){return T(this,arguments,function*({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})})}_authenticate(o,s){return T(this,arguments,function*({factorId:t,webauthn:{rpId:r=typeof window!="undefined"?window.location.hostname:void 0,rpOrigins:n=typeof window!="undefined"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new Vf("rpId is required for WebAuthn authentication")};try{if(!BA())return{data:null,error:new ys("Browser does not support WebAuthn",null)};const{data:c,error:u}=yield this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!c)return{data:null,error:u};const{webauthn:f}=c;return this._verify({factorId:t,challengeId:c.challengeId,webauthn:{type:f.type,rpId:r,rpOrigins:n,credential_response:f.credential_response}})}catch(c){return be(c)?{data:null,error:c}:{data:null,error:new ys("Unexpected error in authenticate",c)}}})}_register(o,s){return T(this,arguments,function*({friendlyName:t,webauthn:{rpId:r=typeof window!="undefined"?window.location.hostname:void 0,rpOrigins:n=typeof window!="undefined"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new Vf("rpId is required for WebAuthn registration")};try{if(!BA())return{data:null,error:new ys("Browser does not support WebAuthn",null)};const{data:c,error:u}=yield this._enroll({friendlyName:t});if(!c)return yield this.client.mfa.listFactors().then(h=>{var p;return(p=h.data)===null||p===void 0?void 0:p.all.find(m=>m.factor_type==="webauthn"&&m.friendly_name===t&&m.status!=="unverified")}).then(h=>h?this.client.mfa.unenroll({factorId:h==null?void 0:h.id}):void 0),{data:null,error:u};const{data:f,error:d}=yield this._challenge({factorId:c.id,friendlyName:c.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return f?this._verify({factorId:c.id,challengeId:f.challengeId,webauthn:{rpId:r,rpOrigins:n,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:d}}catch(c){return be(c)?{data:null,error:c}:{data:null,error:new ys("Unexpected error in register",c)}}})}}NZ();const WZ={url:KQ,storageKey:HQ,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:VQ,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};function UA(e,t,r){return T(this,null,function*(){return yield r()})}const jl={};class Wf{get jwks(){var t,r;return(r=(t=jl[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){jl[this.storageKey]=Object.assign(Object.assign({},jl[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=jl[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){jl[this.storageKey]=Object.assign(Object.assign({},jl[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},WZ),t);if(this.storageKey=a.storageKey,this.instanceID=(r=Wf.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Wf.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&fr()){const o="".concat(this._logPrefix()," Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new SZ({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=o4(a.fetch),this.lock=a.lock||UA,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&fr()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=EZ:this.lock=UA,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new VZ(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:a4()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=LA(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=LA(this.memoryStorage)),fr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",o=>T(this,null,function*(){this._debug("received broadcast notification from other tab or client",o);try{yield this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(s){this._debug("#broadcastChannel","error",s)}}))}a.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return"GoTrueClient@"+"".concat(this.storageKey,":").concat(this.instanceID," (").concat(r4,") ").concat(new Date().toISOString())}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}initialize(){return T(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=T(this,null,function*(){return yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return T(this,null,function*(){var t;try{let r={},n="none";if(fr()&&(r=aZ(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":(yield this._isPKCECallback(r))&&(n="pkce")),fr()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=yield this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),XQ(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:o,redirectType:s}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),yield this._saveSession(o),setTimeout(()=>T(this,null,function*(){s==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",o):yield this._notifyAllSubscribers("SIGNED_IN",o)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(r){return be(r)?this._returnResult({error:r}):this._returnResult({error:new ys("Unexpected error during initialization",r)})}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(t){return T(this,null,function*(){var r,n,i;try{const a=yield Se(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Jn}),{data:o,error:s}=a;if(s||!o)return this._returnResult({data:{user:null,session:null},error:s});const c=o.session,u=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(be(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}signUp(t){return T(this,null,function*(){var r,n,i;try{let a;if("email"in t){const{email:f,password:d,options:h}=t;let p=null,m=null;this.flowType==="pkce"&&([p,m]=yield kl(this.storage,this.storageKey)),a=yield Se(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:f,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:m},xform:Jn})}else if("phone"in t){const{phone:f,password:d,options:h}=t;a=yield Se(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,body:{phone:f,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Jn})}else throw new em("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),this._returnResult({data:{user:null,session:null},error:s});const c=o.session,u=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}signInWithPassword(t){return T(this,null,function*(){try{let r;if("email"in t){const{email:a,password:o,options:s}=t;r=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=password"),{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:DA})}else if("phone"in t){const{phone:a,password:o,options:s}=t;r=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=password"),{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:DA})}else throw new em("You must provide either an email or phone number and a password");const{data:n,error:i}=r;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!n||!n.session||!n.user){const a=new wl;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(yield this._saveSession(n.session),yield this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(be(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}})}signInWithOAuth(t){return T(this,null,function*(){var r,n,i,a;return yield this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})})}exchangeCodeForSession(t){return T(this,null,function*(){return yield this.initializePromise,this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return this._exchangeCodeForSession(t)}))})}signInWithWeb3(t){return T(this,null,function*(){const{chain:r}=t;switch(r){case"ethereum":return yield this.signInWithEthereum(t);case"solana":return yield this.signInWithSolana(t);default:throw new Error('@supabase/auth-js: Unsupported chain "'.concat(r,'"'))}})}signInWithEthereum(t){return T(this,null,function*(){var r,n,i,a,o,s,c,u,f,d,h;let p,m;if("message"in t)p=t.message,m=t.signature;else{const{chain:g,wallet:v,statement:x,options:b}=t;let y;if(fr())if(typeof v=="object")y=v;else{const C=window;if("ethereum"in C&&typeof C.ethereum=="object"&&"request"in C.ethereum&&typeof C.ethereum.request=="function")y=C.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=v}const j=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),k=yield y.request({method:"eth_requestAccounts"}).then(C=>C).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!k||k.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=l4(k[0]);let S=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const C=yield y.request({method:"eth_chainId"});S=CZ(C)}const E={domain:j.host,address:_,statement:x,uri:j.href,version:"1",chainId:S,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(f=b==null?void 0:b.signInWithEthereum)===null||f===void 0?void 0:f.resources};p=AZ(E),m=yield y.request({method:"personal_sign",params:[TZ(p),_]})}try{const{data:g,error:v}=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=web3"),{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:m},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Jn});if(v)throw v;if(!g||!g.session||!g.user){const x=new wl;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(yield this._saveSession(g.session),yield this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:v})}catch(g){if(be(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}})}signInWithSolana(t){return T(this,null,function*(){var r,n,i,a,o,s,c,u,f,d,h,p;let m,g;if("message"in t)m=t.message,g=t.signature;else{const{chain:v,wallet:x,statement:b,options:y}=t;let j;if(fr())if(typeof x=="object")j=x;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))j=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=x}const k=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in j&&j.signIn){const _=yield j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:k.host,uri:k.href}),b?{statement:b}:null));let S;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")S=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)S=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)m=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),g=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");m=["".concat(k.host," wants you to sign in with your Solana account:"),j.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1","URI: ".concat(k.href),"Issued At: ".concat((i=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()),...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.notBefore?["Not Before: ".concat(y.signInWithSolana.notBefore)]:[],...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.expirationTime?["Expiration Time: ".concat(y.signInWithSolana.expirationTime)]:[],...!((s=y==null?void 0:y.signInWithSolana)===null||s===void 0)&&s.chainId?["Chain ID: ".concat(y.signInWithSolana.chainId)]:[],...!((c=y==null?void 0:y.signInWithSolana)===null||c===void 0)&&c.nonce?["Nonce: ".concat(y.signInWithSolana.nonce)]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?["Request ID: ".concat(y.signInWithSolana.requestId)]:[],...!((d=(f=y==null?void 0:y.signInWithSolana)===null||f===void 0?void 0:f.resources)===null||d===void 0)&&d.length?["Resources",...y.signInWithSolana.resources.map(S=>"- ".concat(S))]:[]].join("\n");const _=yield j.signMessage(new TextEncoder().encode(m),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=_}}try{const{data:v,error:x}=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=web3"),{headers:this.headers,body:Object.assign({chain:"solana",message:m,signature:ws(g)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Jn});if(x)throw x;if(!v||!v.session||!v.user){const b=new wl;return this._returnResult({data:{user:null,session:null},error:b})}return v.session&&(yield this._saveSession(v.session),yield this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:x})}catch(v){if(be(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}})}_exchangeCodeForSession(t){return T(this,null,function*(){const r=yield os(this.storage,"".concat(this.storageKey,"-code-verifier")),[n,i]=(r!=null?r:"").split("/");try{if(!n&&this.flowType==="pkce")throw new JQ;const{data:a,error:o}=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=pkce"),{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Jn});if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),o)throw o;if(!a||!a.session||!a.user){const s=new wl;return this._returnResult({data:{user:null,session:null,redirectType:null},error:s})}return a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i!=null?i:null}),error:o})}catch(a){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}})}signInWithIdToken(t){return T(this,null,function*(){try{const{options:r,provider:n,token:i,access_token:a,nonce:o}=t,s=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=id_token"),{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Jn}),{data:c,error:u}=s;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const f=new wl;return this._returnResult({data:{user:null,session:null},error:f})}return c.session&&(yield this._saveSession(c.session),yield this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(be(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}})}signInWithOtp(t){return T(this,null,function*(){var r,n,i,a,o;try{if("email"in t){const{email:s,options:c}=t;let u=null,f=null;this.flowType==="pkce"&&([u,f]=yield kl(this.storage,this.storageKey));const{error:d}=yield Se(this.fetch,"POST","".concat(this.url,"/otp"),{headers:this.headers,body:{email:s,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:s,options:c}=t,{data:u,error:f}=yield Se(this.fetch,"POST","".concat(this.url,"/otp"),{headers:this.headers,body:{phone:s,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:f})}throw new em("You must provide either an email or phone number.")}catch(s){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}verifyOtp(t){return T(this,null,function*(){var r,n;try{let i,a;"options"in t&&(i=(r=t.options)===null||r===void 0?void 0:r.redirectTo,a=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:s}=yield Se(this.fetch,"POST","".concat(this.url,"/verify"),{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Jn});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(yield this._saveSession(c),yield this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(be(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}signInWithSSO(t){return T(this,null,function*(){var r,n,i,a,o;try{let s=null,c=null;this.flowType==="pkce"&&([s,c]=yield kl(this.storage,this.storageKey));const u=yield Se(this.fetch,"POST","".concat(this.url,"/sso"),{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:c}),headers:this.headers,xform:kZ});return!((a=u.data)===null||a===void 0)&&a.url&&fr()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(s){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(s))return this._returnResult({data:null,error:s});throw s}})}reauthenticate(){return T(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return T(this,null,function*(){try{return yield this._useSession(t=>T(this,null,function*(){const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new an;const{error:i}=yield Se(this.fetch,"GET","".concat(this.url,"/reauthenticate"),{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})}))}catch(t){if(be(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}})}resend(t){return T(this,null,function*(){try{const r="".concat(this.url,"/resend");if("email"in t){const{email:n,type:i,options:a}=t,{error:o}=yield Se(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:i,options:a}=t,{data:o,error:s}=yield Se(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:s})}throw new em("You must provide either an email or phone number and a type")}catch(r){if(be(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}})}getSession(){return T(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return this._useSession(r=>T(this,null,function*(){return r}))}))})}_acquireLock(t,r){return T(this,null,function*(){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=T(this,null,function*(){return yield n,yield r()});return this.pendingInLock.push(T(this,null,function*(){try{yield i}catch(a){}})),i}return yield this.lock("lock:".concat(this.storageKey),t,()=>T(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push(T(this,null,function*(){try{yield n}catch(i){}})),yield n;this.pendingInLock.length;){const i=[...this.pendingInLock];yield Promise.all(i),this.pendingInLock.splice(0,i.length)}return yield n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(t){return T(this,null,function*(){this._debug("#_useSession","begin");try{const r=yield this.__loadSession();return yield t(r)}finally{this._debug("#_useSession","end")}})}__loadSession(){return T(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=yield os(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<Vb:!1;if(this._debug("#__loadSession()","session has".concat(n?"":" not"," expired"),"expires_at",t.expires_at),!n){if(this.userStorage){const o=yield os(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=qb()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=vZ(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:a}=yield this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}})}getUser(t){return T(this,null,function*(){if(t)return yield this._getUser(t);yield this.initializePromise;const r=yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._getUser()}));return r.data.user&&(this.suppressGetSessionWarning=!0),r})}_getUser(t){return T(this,null,function*(){try{return t?yield Se(this.fetch,"GET","".concat(this.url,"/user"),{headers:this.headers,jwt:t,xform:fo}):yield this._useSession(r=>T(this,null,function*(){var n,i,a;const{data:o,error:s}=r;if(s)throw s;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new an}:yield Se(this.fetch,"GET","".concat(this.url,"/user"),{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:fo})}))}catch(r){if(be(r))return Zp(r)&&(yield this._removeSession(),yield dr(this.storage,"".concat(this.storageKey,"-code-verifier"))),this._returnResult({data:{user:null},error:r});throw r}})}updateUser(n){return T(this,arguments,function*(t,r={}){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._updateUser(t,r)}))})}_updateUser(n){return T(this,arguments,function*(t,r={}){try{return yield this._useSession(i=>T(this,null,function*(){const{data:a,error:o}=i;if(o)throw o;if(!a.session)throw new an;const s=a.session;let c=null,u=null;this.flowType==="pkce"&&t.email!=null&&([c,u]=yield kl(this.storage,this.storageKey));const{data:f,error:d}=yield Se(this.fetch,"PUT","".concat(this.url,"/user"),{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:c,code_challenge_method:u}),jwt:s.access_token,xform:fo});if(d)throw d;return s.user=f.user,yield this._saveSession(s),yield this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})}))}catch(i){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(i))return this._returnResult({data:{user:null},error:i});throw i}})}setSession(t){return T(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._setSession(t)}))})}_setSession(t){return T(this,null,function*(){try{if(!t.access_token||!t.refresh_token)throw new an;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=rm(t.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{data:s,error:c}=yield this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!s)return{data:{user:null,session:null},error:null};a=s}else{const{data:s,error:c}=yield this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:t.access_token,refresh_token:t.refresh_token,user:s.user,token_type:"bearer",expires_in:n-r,expires_at:n},yield this._saveSession(a),yield this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(be(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}})}refreshSession(t){return T(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._refreshSession(t)}))})}_refreshSession(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n;if(!t){const{data:o,error:s}=r;if(s)throw s;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new an;const{data:i,error:a}=yield this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})}))}catch(r){if(be(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}})}_getSessionFromURL(t,r){return T(this,null,function*(){try{if(!fr())throw new tm("No browser detected.");if(t.error||t.error_description||t.error_code)throw new tm(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new TA("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new tm("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new TA("No code detected.");const{data:b,error:y}=yield this._exchangeCodeForSession(t.code);if(y)throw y;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:s,expires_at:c,token_type:u}=t;if(!a||!s||!o||!u)throw new tm("No session defined in URL");const f=Math.round(Date.now()/1e3),d=parseInt(s);let h=f+d;c&&(h=parseInt(c));const p=h-f;p*1e3<=Il&&console.warn("@supabase/gotrue-js: Session as retrieved from URL expires in ".concat(p,"s, should have been closer to ").concat(d,"s"));const m=h-d;f-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,h,f):f-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,h,f);const{data:g,error:v}=yield this._getUser(a);if(v)throw v;const x={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:h,refresh_token:o,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(n){if(be(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}})}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}_isPKCECallback(t){return T(this,null,function*(){const r=yield os(this.storage,"".concat(this.storageKey,"-code-verifier"));return!!(t.code&&r)})}signOut(){return T(this,arguments,function*(t={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){return yield this._signOut(t)}))})}_signOut(){return T(this,arguments,function*({scope:t}={scope:"global"}){return yield this._useSession(r=>T(this,null,function*(){var n;const{data:i,error:a}=r;if(a&&!Zp(a))return this._returnResult({error:a});const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:s}=yield this.admin.signOut(o,t);if(s&&!(YQ(s)&&(s.status===404||s.status===401||s.status===403)||Zp(s)))return this._returnResult({error:s})}return t!=="others"&&(yield this._removeSession(),yield dr(this.storage,"".concat(this.storageKey,"-code-verifier"))),this._returnResult({error:null})}))})}onAuthStateChange(t){const r=iZ(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),T(this,null,function*(){yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){this._emitInitialSession(r)}))}),{data:{subscription:n}}}_emitInitialSession(t){return T(this,null,function*(){return yield this._useSession(r=>T(this,null,function*(){var n,i;try{const{data:{session:a},error:o}=r;if(o)throw o;yield(n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){yield(i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",t,"error",a),Zp(a)?console.warn(a):console.error(a)}}))})}resetPasswordForEmail(n){return T(this,arguments,function*(t,r={}){let i=null,a=null;this.flowType==="pkce"&&([i,a]=yield kl(this.storage,this.storageKey,!0));try{return yield Se(this.fetch,"POST","".concat(this.url,"/recover"),{body:{email:t,code_challenge:i,code_challenge_method:a,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(o))return this._returnResult({data:null,error:o});throw o}})}getUserIdentities(){return T(this,null,function*(){var t;try{const{data:r,error:n}=yield this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}linkIdentity(t){return T(this,null,function*(){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)})}linkIdentityOAuth(t){return T(this,null,function*(){var r;try{const{data:n,error:i}=yield this._useSession(a=>T(this,null,function*(){var o,s,c,u,f;const{data:d,error:h}=a;if(h)throw h;const p=yield this._getUrlForProvider("".concat(this.url,"/user/identities/authorize"),t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=t.options)===null||s===void 0?void 0:s.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return yield Se(this.fetch,"GET",p,{headers:this.headers,jwt:(f=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&f!==void 0?f:void 0})}));if(i)throw i;return fr()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(be(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}})}linkIdentityIdToken(t){return T(this,null,function*(){return yield this._useSession(r=>T(this,null,function*(){var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:o,provider:s,token:c,access_token:u,nonce:f}=t,d=yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=id_token"),{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:s,id_token:c,access_token:u,nonce:f,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Jn}),{data:h,error:p}=d;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new wl}):(h.session&&(yield this._saveSession(h.session),yield this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(i){if(yield dr(this.storage,"".concat(this.storageKey,"-code-verifier")),be(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}))})}unlinkIdentity(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n,i;const{data:a,error:o}=r;if(o)throw o;return yield Se(this.fetch,"DELETE","".concat(this.url,"/user/identities/").concat(t.identity_id),{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}_refreshAccessToken(t){return T(this,null,function*(){const r="#_refreshAccessToken(".concat(t.substring(0,5),"...)");this._debug(r,"begin");try{const n=Date.now();return yield lZ(i=>T(this,null,function*(){return i>0&&(yield sZ(200*Math.pow(2,i-1))),this._debug(r,"refreshing attempt",i),yield Se(this.fetch,"POST","".concat(this.url,"/token?grant_type=refresh_token"),{body:{refresh_token:t},headers:this.headers,xform:Jn})}),(i,a)=>{const o=200*Math.pow(2,i);return a&&Wb(a)&&Date.now()+o-n<Il})}catch(n){if(this._debug(r,"error",n),be(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}})}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}_handleProviderSignIn(t,r){return T(this,null,function*(){const n=yield this._getUrlForProvider("".concat(this.url,"/authorize"),t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),fr()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}})}_recoverAndRefresh(){return T(this,null,function*(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=yield os(this.storage,this.storageKey);if(i&&this.userStorage){let o=yield os(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},yield Ll(this.userStorage,this.storageKey+"-user",o)),i.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:qb()}else if(i&&!i.user&&!i.user){const o=yield os(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,yield dr(this.storage,this.storageKey+"-user"),yield Ll(this.storage,this.storageKey,i)):i.user=qb()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&(yield this._removeSession());return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Vb;if(this._debug(n,"session has".concat(a?"":" not"," expired with margin of ").concat(Vb,"s")),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=yield this._callRefreshToken(i.refresh_token);o&&(console.error(o),Wb(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),yield this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:s}=yield this._getUser(i.access_token);!s&&(o!=null&&o.user)?(i.user=o.user,yield this._saveSession(i),yield this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else yield this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}})}_callRefreshToken(t){return T(this,null,function*(){var r,n;if(!t)throw new an;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i="#_callRefreshToken(".concat(t.substring(0,5),"...)");this._debug(i,"begin");try{this.refreshingDeferred=new Gv;const{data:a,error:o}=yield this._refreshAccessToken(t);if(o)throw o;if(!a.session)throw new an;yield this._saveSession(a.session),yield this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const s={data:a.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(a){if(this._debug(i,"error",a),be(a)){const o={data:null,error:a};return Wb(a)||(yield this._removeSession()),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}})}_notifyAllSubscribers(t,r,n=!0){return T(this,null,function*(){const i="#_notifyAllSubscribers(".concat(t,")");this._debug(i,"begin",r,"broadcast = ".concat(n));try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(s=>T(this,null,function*(){try{yield s.callback(t,r)}catch(c){a.push(c)}}));if(yield Promise.all(o),a.length>0){for(let s=0;s<a.length;s+=1)console.error(a[s]);throw a[0]}}finally{this._debug(i,"end")}})}_saveSession(t){return T(this,null,function*(){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,yield dr(this.storage,"".concat(this.storageKey,"-code-verifier"));const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&(yield Ll(this.userStorage,this.storageKey+"-user",{user:r.user}));const i=Object.assign({},r);delete i.user;const a=$A(i);yield Ll(this.storage,this.storageKey,a)}else{const i=$A(r);yield Ll(this.storage,this.storageKey,i)}})}_removeSession(){return T(this,null,function*(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,yield dr(this.storage,this.storageKey),yield dr(this.storage,this.storageKey+"-code-verifier"),yield dr(this.storage,this.storageKey+"-user"),this.userStorage&&(yield dr(this.userStorage,this.storageKey+"-user")),yield this._notifyAllSubscribers("SIGNED_OUT",null)})}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&fr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}_startAutoRefresh(){return T(this,null,function*(){yield this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Il);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(()=>T(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno!="undefined"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)})}_stopAutoRefresh(){return T(this,null,function*(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)})}startAutoRefresh(){return T(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return T(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return T(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>T(this,null,function*(){try{const t=Date.now();try{return yield this._useSession(r=>T(this,null,function*(){const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-t)/Il);this._debug("#_autoRefreshTokenTick()","access token expires in ".concat(i," ticks, a tick lasts ").concat(Il,"ms, refresh threshold is ").concat(z1," ticks")),i<=z1&&(yield this._callRefreshToken(n.refresh_token))}))}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(t){if(t.isAcquireTimeout||t instanceof s4)this._debug("auto refresh token tick lock not available");else throw t}})}_handleVisibilityChange(){return T(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!fr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>T(this,null,function*(){try{yield this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}}),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}})}_onVisibilityChanged(t){return T(this,null,function*(){const r="#_onVisibilityChanged(".concat(t,")");this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(yield this.initializePromise,yield this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(t,r,n){return T(this,null,function*(){const i=["provider=".concat(encodeURIComponent(r))];if(n!=null&&n.redirectTo&&i.push("redirect_to=".concat(encodeURIComponent(n.redirectTo))),n!=null&&n.scopes&&i.push("scopes=".concat(encodeURIComponent(n.scopes))),this.flowType==="pkce"){const[a,o]=yield kl(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:"".concat(encodeURIComponent(a)),code_challenge_method:"".concat(encodeURIComponent(o))});i.push(s.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push("skip_http_redirect=".concat(n.skipBrowserRedirect)),"".concat(t,"?").concat(i.join("&"))})}_unenroll(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):yield Se(this.fetch,"DELETE","".concat(this.url,"/factors/").concat(t.factorId),{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}_enroll(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n,i;const{data:a,error:o}=r;if(o)return this._returnResult({data:null,error:o});const s=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=yield Se(this.fetch,"POST","".concat(this.url,"/factors"),{body:s,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code="data:image/svg+xml;utf-8,".concat(c.totp.qr_code)),this._returnResult({data:c,error:null}))}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}_verify(t){return T(this,null,function*(){return this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?IZ(t.webauthn.credential_response):LZ(t.webauthn.credential_response)})}:{code:t.code}),{data:s,error:c}=yield Se(this.fetch,"POST","".concat(this.url,"/factors/").concat(t.factorId,"/verify"),{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),this._returnResult({data:s,error:c}))}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}}))})}_challenge(t){return T(this,null,function*(){return this._acquireLock(this.lockAcquireTimeout,()=>T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=yield Se(this.fetch,"POST","".concat(this.url,"/factors/").concat(t.factorId,"/challenge"),{body:t,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:s}=o;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:MZ(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:DZ(s.webauthn.credential_options.publicKey)})})}),error:null}}}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}}))})}_challengeAndVerify(t){return T(this,null,function*(){const{data:r,error:n}=yield this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):yield this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})})}_listFactors(){return T(this,null,function*(){var t;const{data:{user:r},error:n}=yield this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}})}_getAuthenticatorAssuranceLevel(t){return T(this,null,function*(){var r,n,i,a;if(t)try{const{payload:p}=rm(t);let m=null;p.aal&&(m=p.aal);let g=m;const{data:{user:v},error:x}=yield this.getUser(t);if(x)return this._returnResult({data:null,error:x});((n=(r=v==null?void 0:v.factors)===null||r===void 0?void 0:r.filter(j=>j.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(g="aal2");const y=p.amr||[];return{data:{currentLevel:m,nextLevel:g,currentAuthenticationMethods:y},error:null}}catch(p){if(be(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:s}=yield this.getSession();if(s)return this._returnResult({data:null,error:s});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=rm(o.access_token);let u=null;c.aal&&(u=c.aal);let f=u;((a=(i=o.user.factors)===null||i===void 0?void 0:i.filter(p=>p.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(f="aal2");const h=c.amr||[];return{data:{currentLevel:u,nextLevel:f,currentAuthenticationMethods:h},error:null}})}_getAuthorizationDetails(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?yield Se(this.fetch,"GET","".concat(this.url,"/oauth/authorizations/").concat(t),{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new an})}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}_approveAuthorization(t,r){return T(this,null,function*(){try{return yield this._useSession(n=>T(this,null,function*(){const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new an});const o=yield Se(this.fetch,"POST","".concat(this.url,"/oauth/authorizations/").concat(t,"/consent"),{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&fr()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o}))}catch(n){if(be(n))return this._returnResult({data:null,error:n});throw n}})}_denyAuthorization(t,r){return T(this,null,function*(){try{return yield this._useSession(n=>T(this,null,function*(){const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new an});const o=yield Se(this.fetch,"POST","".concat(this.url,"/oauth/authorizations/").concat(t,"/consent"),{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&&fr()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o}))}catch(n){if(be(n))return this._returnResult({data:null,error:n});throw n}})}_listOAuthGrants(){return T(this,null,function*(){try{return yield this._useSession(t=>T(this,null,function*(){const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?yield Se(this.fetch,"GET","".concat(this.url,"/user/oauth/grants"),{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new an})}))}catch(t){if(be(t))return this._returnResult({data:null,error:t});throw t}})}_revokeOAuthGrant(t){return T(this,null,function*(){try{return yield this._useSession(r=>T(this,null,function*(){const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(yield Se(this.fetch,"DELETE","".concat(this.url,"/user/oauth/grants"),{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new an})}))}catch(r){if(be(r))return this._returnResult({data:null,error:r});throw r}})}fetchJwk(n){return T(this,arguments,function*(t,r={keys:[]}){let i=r.keys.find(c=>c.kid===t);if(i)return i;const a=Date.now();if(i=this.jwks.keys.find(c=>c.kid===t),i&&this.jwks_cached_at+qQ>a)return i;const{data:o,error:s}=yield Se(this.fetch,"GET","".concat(this.url,"/.well-known/jwks.json"),{headers:this.headers});if(s)throw s;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=a,i=o.keys.find(c=>c.kid===t),!i)?null:i})}getClaims(n){return T(this,arguments,function*(t,r={}){try{let i=t;if(!i){const{data:m,error:g}=yield this.getSession();if(g||!m.session)return this._returnResult({data:null,error:g});i=m.session.access_token}const{header:a,payload:o,signature:s,raw:{header:c,payload:u}}=rm(i);r!=null&&r.allowExpired||mZ(o.exp);const f=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:yield this.fetchJwk(a.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!f){const{error:m}=yield this.getUser(i);if(m)throw m;return{data:{claims:o,header:a,signature:s},error:null}}const d=gZ(a.alg),h=yield crypto.subtle.importKey("jwk",f,d,!0,["verify"]);if(!(yield crypto.subtle.verify(d,h,s,rZ("".concat(c,".").concat(u)))))throw new F1("Invalid JWT signature");return{data:{claims:o,header:a,signature:s},error:null}}catch(i){if(be(i))return this._returnResult({data:null,error:i});throw i}})}}Wf.nextInstanceID={};const qZ=Wf,GZ="2.103.0";let Dd="";typeof Deno!="undefined"?Dd="deno":typeof document!="undefined"?Dd="web":typeof navigator!="undefined"&&navigator.product==="ReactNative"?Dd="react-native":Dd="node";const YZ={"X-Client-Info":"supabase-js-".concat(Dd,"/").concat(GZ)},XZ={headers:YZ},JZ={schema:"public"},QZ={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ZZ={};function qf(e){"@babel/helpers - typeof";return qf=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},qf(e)}function eee(e,t){if(qf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tee(e){var t=eee(e,"string");return qf(t)=="symbol"?t:t+""}function ree(e,t,r){return(t=tee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(r),!0).forEach(function(n){ree(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const nee=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),iee=()=>Headers,aee=(e,t,r)=>{const n=nee(r),i=iee();return(a,o)=>T(Da,null,function*(){var s;const c=(s=yield t())!==null&&s!==void 0?s:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization","Bearer ".concat(c)),n(a,Dt(Dt({},o),{},{headers:u}))})};function oee(e){return e.endsWith("/")?e:e+"/"}function see(e,t){var r,n;const{db:i,auth:a,realtime:o,global:s}=e,{db:c,auth:u,realtime:f,global:d}=t,h={db:Dt(Dt({},c),i),auth:Dt(Dt({},u),a),realtime:Dt(Dt({},f),o),storage:{},global:Dt(Dt(Dt({},d),s),{},{headers:Dt(Dt({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:()=>T(this,null,function*(){return""})};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function lee(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(oee(t))}catch(r){throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var cee=class extends qZ{constructor(e){super(e)}},uee=class{constructor(e,t,r){var n,i;this.supabaseUrl=e,this.supabaseKey=t;const a=lee(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const o="sb-".concat(a.hostname.split(".")[0],"-auth-token"),s={db:JZ,realtime:ZZ,auth:Dt(Dt({},QZ),{},{storageKey:o}),global:XZ},c=see(r!=null?r:{},s);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(f,d)=>{throw new Error("@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.".concat(String(d)," is not possible"))}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=aee(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Dt({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(f=>this.realtime.setAuth(f)).catch(f=>console.warn("Failed to set initial Realtime auth token:",f)),this.rest=new PJ(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new FQ(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new wJ(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){return T(this,null,function*(){var e=this,t,r;if(e.accessToken)return yield e.accessToken();const{data:n}=yield e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:u},f,d){const h={Authorization:"Bearer ".concat(this.supabaseKey),apikey:"".concat(this.supabaseKey)};return new cee({url:this.authUrl.href,headers:Dt(Dt({},h),f),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new dQ(this.realtimeUrl.href,Dt(Dt({},e),{},{params:Dt(Dt({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const dee=(e,t,r)=>new uee(e,t,r);function fee(){if(typeof window!="undefined")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}fee()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const hee="https://xvdpcfxfzrgppoefeptu.supabase.co",pee="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh2ZHBjZnhmenJncHBvZWZlcHR1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI4Mzk4OTcsImV4cCI6MjA4ODQxNTg5N30.OuejCEl5sFQl4fEpxSRhQVe2owlGnxO6wSTBImACiuU",Q=dee(hee,pee,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),u4=w.createContext(void 0);function mee({children:e}){const[t,r]=w.useState(null),[n,i]=w.useState(null),[a,o]=w.useState(!0),[s,c]=w.useState(!1),[u,f]=w.useState([]),[d,h]=w.useState(!0),p=k=>T(this,null,function*(){const{data:_}=yield Q.from("user_roles").select("role").eq("user_id",k).eq("role","admin");c(!!_&&_.length>0)}),m=k=>T(this,null,function*(){const{data:_}=yield Q.from("user_purchases").select("course_id").eq("user_id",k);_&&f(_.map(S=>S.course_id))}),g=k=>T(this,null,function*(){var S;const{data:_}=yield Q.from("profiles").select("email_verified").eq("id",k).single();h((S=_==null?void 0:_.email_verified)!=null?S:!0)}),v=()=>T(this,null,function*(){t&&(yield g(t.id))});w.useEffect(()=>{Q.auth.getSession().then(({data:{session:S}})=>{var E;i(S),r((E=S==null?void 0:S.user)!=null?E:null),o(!1),S!=null&&S.user&&(p(S.user.id),m(S.user.id),g(S.user.id))});const{data:{subscription:k}}=Q.auth.onAuthStateChange((S,E)=>{var C;i(E),r((C=E==null?void 0:E.user)!=null?C:null),o(!1),E!=null&&E.user?setTimeout(()=>{p(E.user.id),m(E.user.id),g(E.user.id)},0):(c(!1),f([]),h(!0))}),_=setInterval(()=>T(this,null,function*(){var E;const{data:{session:S}}=yield Q.auth.getSession();if(S){const C=(E=S.expires_at)!=null?E:0,R=Math.floor(Date.now()/1e3);if(C-R<300){const{error:M}=yield Q.auth.refreshSession();M&&console.warn("Session refresh failed:",M.message)}}}),10*60*1e3);return()=>{k.unsubscribe(),clearInterval(_)}},[]);const x=(k,_,S,E)=>T(this,null,function*(){const{error:C}=yield Q.auth.signUp({email:k,password:_,options:{data:{full_name:S,phone:E||""},emailRedirectTo:window.location.origin}});return{error:C}}),b=(k,_)=>T(this,null,function*(){const{error:S}=yield Q.auth.signInWithPassword({email:k,password:_});return{error:S}}),y=()=>T(this,null,function*(){yield Q.auth.signOut(),r(null),i(null),f([]),c(!1)}),j=k=>T(this,null,function*(){if(t)try{const{data:_,error:S}=yield Q.functions.invoke("claim-free-course",{body:{courseId:k}});if(S)throw S;_!=null&&_.success&&f(E=>[...E,k])}catch(_){throw _}});return l.jsx(u4.Provider,{value:{user:t,session:n,loading:a,isAdmin:s,emailVerified:d,signUp:x,signIn:b,signOut:y,purchasedCourseIds:u,claimFreeCourse:j,refreshEmailVerified:v},children:e})}function Ua(){const e=w.useContext(u4);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const HS=w.createContext({});function VS(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const gee=typeof window!="undefined",d4=gee?w.useLayoutEffect:w.useEffect,Yv=w.createContext(null);function WS(e,t){e.indexOf(t)===-1&&e.push(t)}function Yg(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Zi=(e,t,r)=>r>t?t:r<e?e:r;let Xv=()=>{},Qc=()=>{};const Vo={},f4=e=>new RegExp("^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$","u").test(e);function h4(e){return typeof e=="object"&&e!==null}const p4=e=>new RegExp("^0[^.\\s]+$","u").test(e);function m4(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ln=e=>e,yee=(e,t)=>r=>t(e(r)),np=(...e)=>e.reduce(yee),Gf=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class qS{constructor(){this.subscriptions=[]}add(t){return WS(this.subscriptions,t),()=>Yg(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const en=e=>e*1e3,Mn=e=>e/1e3;function g4(e,t){return t?e*(1e3/t):0}const y4=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,vee=1e-7,xee=12;function bee(e,t,r,n,i){let a,o,s=0;do o=t+(r-t)/2,a=y4(o,n,i)-e,a>0?r=o:t=o;while(Math.abs(a)>vee&&++s<xee);return o}function ip(e,t,r,n){if(e===t&&r===n)return Ln;const i=a=>bee(a,0,1,e,r);return a=>a===0||a===1?a:y4(i(a),t,n)}const v4=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,x4=e=>t=>1-e(1-t),b4=ip(.33,1.53,.69,.99),GS=x4(b4),w4=v4(GS),k4=e=>e>=1?1:(e*=2)<1?.5*GS(e):.5*(2-Math.pow(2,-10*(e-1))),YS=e=>1-Math.sin(Math.acos(e)),_4=x4(YS),j4=v4(YS),wee=ip(.42,0,1,1),kee=ip(0,0,.58,1),S4=ip(.42,0,.58,1),_ee=e=>Array.isArray(e)&&typeof e[0]!="number",E4=e=>Array.isArray(e)&&typeof e[0]=="number",KA={linear:Ln,easeIn:wee,easeInOut:S4,easeOut:kee,circIn:YS,circInOut:j4,circOut:_4,backIn:GS,backInOut:w4,backOut:b4,anticipate:k4},jee=e=>typeof e=="string",HA=e=>{if(E4(e)){Qc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,i]=e;return ip(t,r,n,i)}else if(jee(e))return Qc(KA[e]!==void 0,"Invalid easing type '".concat(e,"'"),"invalid-easing-type"),KA[e];return e},nm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],VA={value:null,addProjectionMetrics:null};function See(e,t){let r=new Set,n=new Set,i=!1,a=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},c=0;function u(d){o.has(d)&&(f.schedule(d),e()),c++,d(s)}const f={schedule:(d,h=!1,p=!1)=>{const g=p&&i?r:n;return h&&o.add(d),g.add(d),d},cancel:d=>{n.delete(d),o.delete(d)},process:d=>{if(s=d,i){a=!0;return}i=!0;const h=r;r=n,n=h,r.forEach(u),t&&VA.value&&VA.value.frameloop[t].push(c),c=0,r.clear(),i=!1,a&&(a=!1,f.process(d))}};return f}const Eee=40;function N4(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=nm.reduce((y,j)=>(y[j]=See(a,t?j:void 0),y),{}),{setup:s,read:c,resolveKeyframes:u,preUpdate:f,update:d,preRender:h,render:p,postRender:m}=o,g=()=>{const y=Vo.useManualTiming,j=y?i.timestamp:performance.now();r=!1,y||(i.delta=n?1e3/60:Math.max(Math.min(j-i.timestamp,Eee),1)),i.timestamp=j,i.isProcessing=!0,s.process(i),c.process(i),u.process(i),f.process(i),d.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(g))},v=()=>{r=!0,n=!0,i.isProcessing||e(g)};return{schedule:nm.reduce((y,j)=>{const k=o[j];return y[j]=(_,S=!1,E=!1)=>(r||v(),k.schedule(_,S,E)),y},{}),cancel:y=>{for(let j=0;j<nm.length;j++)o[nm[j]].cancel(y)},state:i,steps:o}}const{schedule:st,cancel:Wo,state:gr,steps:Yb}=N4(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Ln,!0);let eg;function Nee(){eg=void 0}const Ir={now:()=>(eg===void 0&&Ir.set(gr.isProcessing||Vo.useManualTiming?gr.timestamp:performance.now()),eg),set:e=>{eg=e,queueMicrotask(Nee)}},C4=e=>t=>typeof t=="string"&&t.startsWith(e),T4=C4("--"),Cee=C4("var(--"),XS=e=>Cee(e)?Tee.test(e.split("/*")[0].trim()):!1,Tee=new RegExp("var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$","iu");function WA(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Iu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yf=I(N({},Iu),{transform:e=>Zi(0,1,e)}),im=I(N({},Iu),{default:1}),nf=e=>Math.round(e*1e5)/1e5,JS=new RegExp("-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)","gu");function Aee(e){return e==null}const Pee=new RegExp("^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$","iu"),QS=(e,t)=>r=>!!(typeof r=="string"&&Pee.test(r)&&r.startsWith(e)||t&&!Aee(r)&&Object.prototype.hasOwnProperty.call(r,t)),A4=(e,t,r)=>n=>{if(typeof n!="string")return n;const[i,a,o,s]=n.match(JS);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},Oee=e=>Zi(0,255,e),Xb=I(N({},Iu),{transform:e=>Math.round(Oee(e))}),ks={test:QS("rgb","red"),parse:A4("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Xb.transform(e)+", "+Xb.transform(t)+", "+Xb.transform(r)+", "+nf(Yf.transform(n))+")"};function Ree(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const K1={test:QS("#"),parse:Ree,transform:ks.transform},ap=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),Za=ap("deg"),Wi=ap("%"),xe=ap("px"),$ee=ap("vh"),Mee=ap("vw"),qA=I(N({},Wi),{parse:e=>Wi.parse(e)/100,transform:e=>Wi.transform(e*100)}),tc={test:QS("hsl","hue"),parse:A4("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Wi.transform(nf(t))+", "+Wi.transform(nf(r))+", "+nf(Yf.transform(n))+")"},Wt={test:e=>ks.test(e)||K1.test(e)||tc.test(e),parse:e=>ks.test(e)?ks.parse(e):tc.test(e)?tc.parse(e):K1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ks.transform(e):tc.transform(e),getAnimatableNone:e=>{const t=Wt.parse(e);return t.alpha=0,Wt.transform(t)}},Dee=new RegExp("(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))","giu");function Iee(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(JS))==null?void 0:t.length)||0)+(((r=e.match(Dee))==null?void 0:r.length)||0)>0}const P4="number",O4="color",Lee="var",zee="var(",GA="${}",Bee=new RegExp("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 Zc(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(Bee,c=>(Wt.test(c)?(n.color.push(a),i.push(O4),r.push(Wt.parse(c))):c.startsWith(zee)?(n.var.push(a),i.push(Lee),r.push(c)):(n.number.push(a),i.push(P4),r.push(parseFloat(c))),++a,GA)).split(GA);return{values:r,split:s,indexes:n,types:i}}function Uee(e){return Zc(e).values}function R4({split:e,types:t}){const r=e.length;return n=>{let i="";for(let a=0;a<r;a++)if(i+=e[a],n[a]!==void 0){const o=t[a];o===P4?i+=nf(n[a]):o===O4?i+=Wt.transform(n[a]):i+=n[a]}return i}}function Fee(e){return R4(Zc(e))}const Kee=e=>typeof e=="number"?0:Wt.test(e)?Wt.getAnimatableNone(e):e,Hee=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Kee(e);function Vee(e){const t=Zc(e);return R4(t)(t.values.map((n,i)=>Hee(n,t.split[i])))}const mi={test:Iee,parse:Uee,createTransformer:Fee,getAnimatableNone:Vee};function Jb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Wee({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,a=0,o=0;if(!t)i=a=o=r;else{const s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;i=Jb(c,s,e+1/3),a=Jb(c,s,e),o=Jb(c,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function Xg(e,t){return r=>r>0?t:e}const jt=(e,t,r)=>e+(t-e)*r,Qb=(e,t,r)=>{const n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},qee=[K1,ks,tc],Gee=e=>qee.find(t=>t.test(e));function YA(e){const t=Gee(e);if(Xv(!!t,"'".concat(e,"' is not an animatable color. Use the equivalent color code instead."),"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===tc&&(r=Wee(r)),r}const XA=(e,t)=>{const r=YA(e),n=YA(t);if(!r||!n)return Xg(e,t);const i=N({},r);return a=>(i.red=Qb(r.red,n.red,a),i.green=Qb(r.green,n.green,a),i.blue=Qb(r.blue,n.blue,a),i.alpha=jt(r.alpha,n.alpha,a),ks.transform(i))},H1=new Set(["none","hidden"]);function Yee(e,t){return H1.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Xee(e,t){return r=>jt(e,t,r)}function ZS(e){return typeof e=="number"?Xee:typeof e=="string"?XS(e)?Xg:Wt.test(e)?XA:Zee:Array.isArray(e)?$4:typeof e=="object"?Wt.test(e)?XA:Jee:Xg}function $4(e,t){const r=[...e],n=r.length,i=e.map((a,o)=>ZS(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=i[o](a);return r}}function Jee(e,t){const r=N(N({},e),t),n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=ZS(e[i])(e[i],t[i]));return i=>{for(const a in n)r[a]=n[a](i);return r}}function Qee(e,t){var i;const r=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],s=e.indexes[o][n[o]],c=(i=e.values[s])!=null?i:0;r[a]=c,n[o]++}return r}const Zee=(e,t)=>{const r=mi.createTransformer(t),n=Zc(e),i=Zc(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?H1.has(e)&&!i.values.length||H1.has(t)&&!n.values.length?Yee(e,t):np($4(Qee(n,i),i.values),r):(Xv(!0,"Complex values '".concat(e,"' and '").concat(t,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition."),"complex-values-different"),Xg(e,t))};function M4(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?jt(e,t,r):ZS(e)(e,t)}const ete=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>st.update(t,r),stop:()=>Wo(t),now:()=>gr.isProcessing?gr.timestamp:Ir.now()}},D4=(e,t,r=10)=>{let n="";const i=Math.max(Math.round(t/r),2);for(let a=0;a<i;a++)n+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return"linear(".concat(n.substring(0,n.length-2),")")},Jg=2e4;function eE(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Jg;)t+=r,n=e.next(t);return t>=Jg?1/0:t}function tte(e,t=100,r){const n=r(I(N({},e),{keyframes:[0,t]})),i=Math.min(eE(n),Jg);return{type:"keyframes",ease:a=>n.next(i*a).value/t,duration:Mn(i)}}const At={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function V1(e,t){return e*Math.sqrt(1-t*t)}const rte=12;function nte(e,t,r){let n=r;for(let i=1;i<rte;i++)n=n-e(n)/t(n);return n}const Zb=.001;function ite({duration:e=At.duration,bounce:t=At.bounce,velocity:r=At.velocity,mass:n=At.mass}){let i,a;Xv(e<=en(At.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Zi(At.minDamping,At.maxDamping,o),e=Zi(At.minDuration,At.maxDuration,Mn(e)),o<1?(i=u=>{const f=u*o,d=f*e,h=f-r,p=V1(u,o),m=Math.exp(-d);return Zb-h/p*m},a=u=>{const d=u*o*e,h=d*r+r,p=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=V1(Math.pow(u,2),o);return(-i(u)+Zb>0?-1:1)*((h-p)*m)/g}):(i=u=>{const f=Math.exp(-u*e),d=(u-r)*e+1;return-Zb+f*d},a=u=>{const f=Math.exp(-u*e),d=(r-u)*(e*e);return f*d});const s=5/e,c=nte(i,a,s);if(e=en(e),isNaN(c))return{stiffness:At.stiffness,damping:At.damping,duration:e};{const u=Math.pow(c,2)*n;return{stiffness:u,damping:o*2*Math.sqrt(n*u),duration:e}}}const ate=["duration","bounce"],ote=["stiffness","damping","mass"];function JA(e,t){return t.some(r=>e[r]!==void 0)}function ste(e){let t=N({velocity:At.velocity,stiffness:At.stiffness,damping:At.damping,mass:At.mass,isResolvedFromDuration:!1},e);if(!JA(e,ote)&&JA(e,ate))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),i=n*n,a=2*Zi(.05,1,1-(e.bounce||0))*Math.sqrt(i);t=I(N({},t),{mass:At.mass,stiffness:i,damping:a})}else{const r=ite(I(N({},e),{velocity:0}));t=I(N(N({},t),r),{mass:At.mass}),t.isResolvedFromDuration=!0}return t}function Qg(e=At.visualDuration,t=At.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=ste(I(N({},r),{velocity:-Mn(r.velocity||0)})),m=h||0,g=u/(2*Math.sqrt(c*f)),v=o-a,x=Mn(Math.sqrt(c/f)),b=Math.abs(v)<5;n||(n=b?At.restSpeed.granular:At.restSpeed.default),i||(i=b?At.restDelta.granular:At.restDelta.default);let y,j,k,_,S,E;if(g<1)k=V1(x,g),_=(m+g*x*v)/k,y=R=>{const M=Math.exp(-g*x*R);return o-M*(_*Math.sin(k*R)+v*Math.cos(k*R))},S=g*x*_+v*k,E=g*x*v-_*k,j=R=>Math.exp(-g*x*R)*(S*Math.sin(k*R)+E*Math.cos(k*R));else if(g===1){y=M=>o-Math.exp(-x*M)*(v+(m+x*v)*M);const R=m+x*v;j=M=>Math.exp(-x*M)*(x*R*M-m)}else{const R=x*Math.sqrt(g*g-1);y=U=>{const F=Math.exp(-g*x*U),O=Math.min(R*U,300);return o-F*((m+g*x*v)*Math.sinh(O)+R*v*Math.cosh(O))/R};const M=(m+g*x*v)/R,L=g*x*M-v*R,H=g*x*v-M*R;j=U=>{const F=Math.exp(-g*x*U),O=Math.min(R*U,300);return F*(L*Math.sinh(O)+H*Math.cosh(O))}}const C={calculatedDuration:p&&d||null,velocity:R=>en(j(R)),next:R=>{if(!p&&g<1){const L=Math.exp(-g*x*R),H=Math.sin(k*R),U=Math.cos(k*R),F=o-L*(_*H+v*U),O=en(L*(S*H+E*U));return s.done=Math.abs(O)<=n&&Math.abs(o-F)<=i,s.value=s.done?o:F,s}const M=y(R);if(p)s.done=R>=d;else{const L=en(j(R));s.done=Math.abs(L)<=n&&Math.abs(o-M)<=i}return s.value=s.done?o:M,s},toString:()=>{const R=Math.min(eE(C),Jg),M=D4(L=>C.next(R*L).value,R,30);return R+"ms "+M},toTransition:()=>{}};return C}Qg.applyToOptions=e=>{const t=tte(e,100,Qg);return e.ease=t.ease,e.duration=en(t.duration),e.type="keyframes",e};const lte=5;function I4(e,t,r){const n=Math.max(t-lte,0);return g4(r-e(n),t-n)}function W1({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:u=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=E=>s!==void 0&&E<s||c!==void 0&&E>c,m=E=>s===void 0?c:c===void 0||Math.abs(s-E)<Math.abs(c-E)?s:c;let g=r*t;const v=d+g,x=o===void 0?v:o(v);x!==v&&(g=x-d);const b=E=>-g*Math.exp(-E/n),y=E=>x+b(E),j=E=>{const C=b(E),R=y(E);h.done=Math.abs(C)<=u,h.value=h.done?x:R};let k,_;const S=E=>{p(h.value)&&(k=E,_=Qg({keyframes:[h.value,m(h.value)],velocity:I4(y,E,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:f}))};return S(0),{calculatedDuration:null,next:E=>{let C=!1;return!_&&k===void 0&&(C=!0,j(E),S(E)),k!==void 0&&E>=k?_.next(E-k):(!C&&j(E),h)}}}function cte(e,t,r){const n=[],i=r||Vo.mix||M4,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ln:t;s=np(c,s)}n.push(s)}return n}function ute(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const a=e.length;if(Qc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=cte(t,n,i),c=s.length,u=f=>{if(o&&f<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(f<e[d+1]);d++);const h=Gf(e[d],e[d+1],f);return s[d](h)};return r?f=>u(Zi(e[0],e[a-1],f)):u}function dte(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=Gf(0,t,n);e.push(jt(r,1,i))}}function fte(e){const t=[0];return dte(t,e.length-1),t}function hte(e,t){return e.map(r=>r*t)}function pte(e,t){return e.map(()=>t||S4).splice(0,e.length-1)}function af({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=_ee(n)?n.map(HA):HA(n),a={done:!1,value:t[0]},o=hte(r&&r.length===t.length?r:fte(t),e),s=ute(o,t,{ease:Array.isArray(i)?i:pte(t,i)});return{calculatedDuration:e,next:c=>(a.value=s(c),a.done=c>=e,a)}}const mte=e=>e!==null;function Jv(e,{repeat:t,repeatType:r="loop"},n,i=1){const a=e.filter(mte),s=i<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}const gte={decay:W1,inertia:W1,tween:af,keyframes:af,spring:Qg};function L4(e){typeof e.type=="string"&&(e.type=gte[e.type])}class tE{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const yte=e=>e/100;class Zg extends tE{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,i;const{motionValue:r}=this.options;r&&r.updatedAt!==Ir.now()&&this.tick(Ir.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;L4(t);const{type:r=af,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:s}=t;const c=r||af;c!==af&&typeof s[0]!="number"&&(this.mixKeyframes=np(yte,M4(s[0],s[1])),s=[0,100]);const u=c(I(N({},t),{keyframes:s}));a==="mirror"&&(this.mirroredGenerator=c(I(N({},t),{keyframes:[...s].reverse(),velocity:-o}))),u.calculatedDuration===null&&(u.calculatedDuration=eE(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:f,repeat:d,repeatType:h,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,j=n;if(d){const E=Math.min(this.currentTime,i)/s;let C=Math.floor(E),R=E%1;!R&&E>=1&&(R=1),R===1&&C--,C=Math.min(C,d+1),!!(C%2)&&(h==="reverse"?(R=1-R,p&&(R-=p/s)):h==="mirror"&&(j=o)),y=Zi(0,1,R)*s}let k;b?(this.delayState.value=f[0],k=this.delayState):k=j.next(y),a&&!b&&(k.value=a(k.value));let{done:_}=k;!b&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return S&&m!==W1&&(k.value=Jv(f,this.options,v,this.speed)),g&&g(k.value),S&&this.finish(),k}then(t,r){return this.finished.then(t,r)}get duration(){return Mn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Mn(t)}get time(){return Mn(this.currentTime)}set time(t){t=en(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const r=this.generator.next(t).value;return I4(n=>this.generator.next(n).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(Ir.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=Mn(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=ete,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r!=null?r:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ir.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function vte(e){var t;for(let r=1;r<e.length;r++)(t=e[r])!=null||(e[r]=e[r-1])}const _s=e=>e*180/Math.PI,q1=e=>{const t=_s(Math.atan2(e[1],e[0]));return G1(t)},xte={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:q1,rotateZ:q1,skewX:e=>_s(Math.atan(e[1])),skewY:e=>_s(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},G1=e=>(e=e%360,e<0&&(e+=360),e),QA=q1,ZA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),eP=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bte={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ZA,scaleY:eP,scale:e=>(ZA(e)+eP(e))/2,rotateX:e=>G1(_s(Math.atan2(e[6],e[5]))),rotateY:e=>G1(_s(Math.atan2(-e[2],e[0]))),rotateZ:QA,rotate:QA,skewX:e=>_s(Math.atan(e[4])),skewY:e=>_s(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Y1(e){return e.includes("scale")?1:0}function X1(e,t){if(!e||e==="none")return Y1(t);const r=e.match(new RegExp("^matrix3d\\(([-\\d.e\\s,]+)\\)$","u"));let n,i;if(r)n=bte,i=r;else{const s=e.match(new RegExp("^matrix\\(([-\\d.e\\s,]+)\\)$","u"));n=xte,i=s}if(!i)return Y1(t);const a=n[t],o=i[1].split(",").map(kte);return typeof a=="function"?a(o):o[a]}const wte=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return X1(r,t)};function kte(e){return parseFloat(e.trim())}const Lu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zu=new Set(Lu),tP=e=>e===Iu||e===xe,_te=new Set(["x","y","z"]),jte=Lu.filter(e=>!_te.has(e));function Ste(e){const t=[];return jte.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const So={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:n})=>{const i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:n})=>{const i=e.max-e.min;return n==="border-box"?i:i-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>X1(t,"x"),y:(e,{transform:t})=>X1(t,"y")};So.translateX=So.x;So.translateY=So.y;const Bs=new Set;let J1=!1,Q1=!1,Z1=!1;function z4(){if(Q1){const e=Array.from(Bs).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const i=Ste(n);i.length&&(r.set(n,i),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const i=r.get(n);i&&i.forEach(([a,o])=>{var s;(s=n.getValue(a))==null||s.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Q1=!1,J1=!1,Bs.forEach(e=>e.complete(Z1)),Bs.clear()}function B4(){Bs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Q1=!0)})}function Ete(){Z1=!0,B4(),z4(),Z1=!1}class rE{constructor(t,r,n,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Bs.add(this),J1||(J1=!0,st.read(B4),st.resolveKeyframes(z4))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const s=n.readValue(r,o);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}vte(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bs.delete(this)}cancel(){this.state==="scheduled"&&(Bs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Nte=e=>e.startsWith("--");function U4(e,t,r){Nte(t)?e.style.setProperty(t,r):e.style[t]=r}const Cte={};function F4(e,t){const r=m4(e);return()=>{var n;return(n=Cte[t])!=null?n:r()}}const Tte=F4(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),K4=F4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Id=([e,t,r,n])=>"cubic-bezier(".concat(e,", ").concat(t,", ").concat(r,", ").concat(n,")"),rP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Id([0,.65,.55,1]),circOut:Id([.55,0,1,.45]),backIn:Id([.31,.01,.66,-.59]),backOut:Id([.33,1.53,.69,.99])};function H4(e,t){if(e)return typeof e=="function"?K4()?D4(e,t):"ease-out":E4(e)?Id(e):Array.isArray(e)?e.map(r=>H4(r,t)||rP.easeOut):rP[e]}function Ate(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:c}={},u=void 0){const f={[t]:r};c&&(f.offset=c);const d=H4(s,i);Array.isArray(d)&&(f.easing=d);const h={delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(f,h)}function V4(e){return typeof e=="function"&&"applyToOptions"in e}function Pte(r){var n=r,{type:e}=n,t=Z(n,["type"]);var i,a;return V4(e)&&K4()?e.applyToOptions(t):((i=t.duration)!=null||(t.duration=300),(a=t.ease)!=null||(t.ease="easeOut"),t)}class W4 extends tE{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:n,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,Qc(typeof t.type!="string",'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=Pte(t);this.animation=Ate(r,n,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const f=Jv(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(f),U4(r,n,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var r,n,i;const t=(r=this.options)==null?void 0:r.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(n=this.animation).commitStyles)==null||i.call(n))}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Mn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Mn(t)}get time(){return Mn(Number(this.animation.currentTime)||0)}set time(t){const r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=en(t),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){var t;return(t=this.manualStartTime)!=null?t:Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:n,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Tte()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),n&&(this.animation.rangeEnd=n),Ln):i(this)}}const q4={anticipate:k4,backInOut:w4,circInOut:j4};function Ote(e){return e in q4}function Rte(e){typeof e.ease=="string"&&Ote(e.ease)&&(e.ease=q4[e.ease])}const e0=10;class $te extends W4{constructor(t){Rte(t),L4(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const h=this.options,{motionValue:r,onUpdate:n,onComplete:i,element:a}=h,o=Z(h,["motionValue","onUpdate","onComplete","element"]);if(!r)return;if(t!==void 0){r.set(t);return}const s=new Zg(I(N({},o),{autoplay:!1})),c=Math.max(e0,Ir.now()-this.startTime),u=Zi(0,e0,c-e0),f=s.sample(c).value,{name:d}=this.options;a&&d&&U4(a,d,f),r.setWithVelocity(s.sample(Math.max(0,c-u)).value,f,u),s.stop()}}const nP=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mi.test(e)||e==="0")&&!e.startsWith("url("));function Mte(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Dte(e,t,r,n){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=nP(i,t),s=nP(a,t);return Xv(o===s,"You are trying to animate ".concat(t,' from "').concat(i,'" to "').concat(a,'". "').concat(o?a:i,'" is not an animatable value.'),"value-not-animatable"),!o||!s?!1:Mte(e)||(r==="spring"||V4(r))&&n}function ek(e){e.duration=0,e.type="keyframes"}const G4=new Set(["opacity","clipPath","filter","transform"]),Ite=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Lte(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ite.test(e[t]))return!0;return!1}const zte=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bte=m4(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ute(e){var d;const{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:f}=t.owner.getProps();return Bte()&&r&&(G4.has(r)||zte.has(r)&&Lte(s))&&(r!=="transform"||!f)&&!u&&!n&&i!=="mirror"&&a!==0&&o!=="inertia"}const Fte=40;class Kte extends tE{constructor(h){var p=h,{autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:s,name:c,motionValue:u,element:f}=p,d=Z(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var x,b;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ir.now();const m=N({autoplay:t,delay:r,type:n,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:f},d),g=(f==null?void 0:f.KeyframeResolver)||rE;this.keyframeResolver=new g(s,(x,b,y)=>this.onKeyframesResolved(x,b,m,!y),c,u,f),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,r,n,i){var x,b;this.keyframeResolver=void 0;const{name:a,type:o,velocity:s,delay:c,isHandoff:u,onUpdate:f}=n;this.resolvedAt=Ir.now();let d=!0;Dte(t,a,o,s)||(d=!1,(Vo.instantAnimations||!c)&&(f==null||f(Jv(t,n,r))),t[0]=t[t.length-1],ek(n),n.repeat=0);const h=i?this.resolvedAt?this.resolvedAt-this.createdAt>Fte?this.resolvedAt:this.createdAt:this.createdAt:void 0,p=I(N({startTime:h,finalKeyframe:r},n),{keyframes:t}),m=d&&!u&&Ute(p),g=(b=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:b.current;let v;if(m)try{v=new $te(I(N({},p),{element:g}))}catch(y){v=new Zg(p)}else v=new Zg(p);v.finished.then(()=>{this.notifyFinished()}).catch(Ln),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ete()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Y4(e,t,r,n=0,i=1){const a=Array.from(e).sort((u,f)=>u.sortNodePosition(f)).indexOf(t),o=e.size,s=(o-1)*n;return typeof r=="function"?r(a,o):i===1?a*n:s-a*n}const Hte=new RegExp("^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)","u");function Vte(e){const t=Hte.exec(e);if(!t)return[,];const[,r,n,i]=t;return["--".concat(r!=null?r:n),i]}const Wte=4;function X4(e,t,r=1){Qc(r<=Wte,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'),"max-css-var-depth");const[n,i]=Vte(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return f4(o)?parseFloat(o):o}return XS(i)?X4(i,t,r+1):i}const qte={type:"spring",stiffness:500,damping:25,restSpeed:10},Gte=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yte={type:"keyframes",duration:.8},Xte={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jte=(e,{keyframes:t})=>t.length>2?Yte:zu.has(e)?e.startsWith("scale")?Gte(t[1]):qte:Xte;function J4(e,t){if(e!=null&&e.inherit&&t){const r=e,{inherit:n}=r,i=Z(r,["inherit"]);return N(N({},t),i)}return e}function nE(e,t){var n,i;const r=(i=(n=e==null?void 0:e[t])!=null?n:e==null?void 0:e.default)!=null?i:e;return r!==e?J4(r,e):r}const Qte=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Zte(e){for(const t in e)if(!Qte.has(t))return!0;return!1}const iE=(e,t,r,n={},i,a)=>o=>{const s=nE(n,e)||{},c=s.delay||n.delay||0;let{elapsed:u=0}=n;u=u-en(c);const f=I(N({keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity()},s),{delay:-u,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i});Zte(s)||Object.assign(f,Jte(e,f)),f.duration&&(f.duration=en(f.duration)),f.repeatDelay&&(f.repeatDelay=en(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(ek(f),f.delay===0&&(d=!0)),(Vo.instantAnimations||Vo.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(d=!0,ek(f),f.delay=0),f.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){const h=Jv(f.keyframes,s);if(h!==void 0){st.update(()=>{f.onUpdate(h),f.onComplete()});return}}return s.isSync?new Zg(f):new Kte(f)};function iP(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function aE(e,t,r,n){if(typeof t=="function"){const[i,a]=iP(n);t=t(r!==void 0?r:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=iP(n);t=t(r!==void 0?r:e.custom,i,a)}return t}function Us(e,t,r){const n=e.getProps();return aE(n,t,r!==void 0?r:n.custom,e)}const Q4=new Set(["width","height","top","left","right","bottom",...Lu]),aP=30,ere=e=>!isNaN(parseFloat(e));class tre{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var a;const i=Ir.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Ir.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ere(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new qS);const n=this.events[t].add(r);return t==="change"?()=>{n(),st.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>aP)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,aP);return g4(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function eu(e,t){return new tre(e,t)}const tk=e=>Array.isArray(e);function rre(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,eu(r))}function nre(e){return tk(e)?e[e.length-1]||0:e}function ire(e,t){let o=Us(e,t)||{},{transitionEnd:n={},transition:i={}}=o,a=Z(o,["transitionEnd","transition"]);a=N(N({},a),n);for(const s in a){const c=nre(a[s]);rre(e,s,c)}}const xr=e=>!!(e&&e.getVelocity);function are(e){return!!(xr(e)&&e.add)}function rk(e,t){const r=e.getValue("willChange");if(are(r))return r.add(t);if(!r&&Vo.WillChange){const n=new Vo.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function oE(e){return e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase()))}const ore="framerAppearId",Z4="data-"+oE(ore);function eB(e){return e.props[Z4]}function sre({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function tB(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var p;let h=t,{transition:a,transitionEnd:o}=h,s=Z(h,["transition","transitionEnd"]);const c=e.getDefaultTransition();a=a?J4(a,c):c;const u=a==null?void 0:a.reduceMotion;n&&(a=n);const f=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const m in s){const g=e.getValue(m,(p=e.latestValues[m])!=null?p:null),v=s[m];if(v===void 0||d&&sre(d,m))continue;const x=N({delay:r},nE(a||{},m)),b=g.get();if(b!==void 0&&!g.isAnimating()&&!Array.isArray(v)&&v===b&&!x.velocity){st.update(()=>g.set(v));continue}let y=!1;if(window.MotionHandoffAnimation){const _=eB(e);if(_){const S=window.MotionHandoffAnimation(_,m,st);S!==null&&(x.startTime=S,y=!0)}}rk(e,m);const j=u!=null?u:e.shouldReduceMotion;g.start(iE(m,g,v,j&&Q4.has(m)?{type:!1}:x,e,y));const k=g.animation;k&&f.push(k)}if(o){const m=()=>st.update(()=>{o&&ire(e,o)});f.length?Promise.all(f).then(m):m()}return f}function nk(e,t,r={}){var c;const n=Us(e,t,r.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const a=n?()=>Promise.all(tB(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return lre(e,t,u,f,d,h,r)}:()=>Promise.resolve(),{when:s}=i;if(s){const[u,f]=s==="beforeChildren"?[a,o]:[o,a];return u().then(()=>f())}else return Promise.all([a(),o(r.delay)])}function lre(e,t,r=0,n=0,i=0,a=1,o){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(nk(c,t,I(N({},o),{delay:r+(typeof n=="function"?0:n)+Y4(e.variantChildren,c,n,i,a)})).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function cre(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(a=>nk(e,a,r));n=Promise.all(i)}else if(typeof t=="string")n=nk(e,t,r);else{const i=typeof t=="function"?Us(e,t,r.custom):t;n=Promise.all(tB(e,i,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}const ure={test:e=>e==="auto",parse:e=>e},rB=e=>t=>t.test(e),nB=[Iu,xe,Wi,Za,Mee,$ee,ure],oP=e=>nB.find(rB(e));function dre(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||p4(e):!0}const fre=new Set(["brightness","contrast","saturate","opacity"]);function hre(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(JS)||[];if(!n)return e;const i=r.replace(n,"");let a=fre.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+i+")"}const pre=new RegExp("\\b([a-z-]*)\\(.*?\\)","gu"),ik=I(N({},mi),{getAnimatableNone:e=>{const t=e.match(pre);return t?t.map(hre).join(" "):e}}),ak=I(N({},mi),{getAnimatableNone:e=>{const t=mi.parse(e);return mi.createTransformer(e)(t.map(n=>typeof n=="number"?0:typeof n=="object"?I(N({},n),{alpha:1}):n))}}),sP=I(N({},Iu),{transform:Math.round}),mre={rotate:Za,rotateX:Za,rotateY:Za,rotateZ:Za,scale:im,scaleX:im,scaleY:im,scaleZ:im,skew:Za,skewX:Za,skewY:Za,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:Yf,originX:qA,originY:qA,originZ:xe},sE=I(N({borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,inset:xe,insetBlock:xe,insetBlockStart:xe,insetBlockEnd:xe,insetInline:xe,insetInlineStart:xe,insetInlineEnd:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,paddingBlock:xe,paddingBlockStart:xe,paddingBlockEnd:xe,paddingInline:xe,paddingInlineStart:xe,paddingInlineEnd:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,marginBlock:xe,marginBlockStart:xe,marginBlockEnd:xe,marginInline:xe,marginInlineStart:xe,marginInlineEnd:xe,fontSize:xe,backgroundPositionX:xe,backgroundPositionY:xe},mre),{zIndex:sP,fillOpacity:Yf,strokeOpacity:Yf,numOctaves:sP}),gre=I(N({},sE),{color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:ik,WebkitFilter:ik,mask:ak,WebkitMask:ak}),iB=e=>gre[e],yre=new Set([ik,ak]);function aB(e,t){let r=iB(e);return yre.has(r)||(r=mi),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const vre=new Set(["auto","none","0"]);function xre(e,t,r){let n=0,i;for(;n<e.length&&!i;){const a=e[n];typeof a=="string"&&!vre.has(a)&&Zc(a).values.length&&(i=e[n]),n++}if(i&&r)for(const a of t)e[a]=aB(r,i)}class bre extends rE{constructor(t,r,n,i,a){super(t,r,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let f=0;f<t.length;f++){let d=t[f];if(typeof d=="string"&&(d=d.trim(),XS(d))){const h=X4(d,r.current);h!==void 0&&(t[f]=h),f===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Q4.has(n)||t.length!==2)return;const[i,a]=t,o=oP(i),s=oP(a),c=WA(i),u=WA(a);if(c!==u&&So[n]){this.needsMeasurement=!0;return}if(o!==s)if(tP(o)&&tP(s))for(let f=0;f<t.length;f++){const d=t[f];typeof d=="string"&&(t[f]=parseFloat(d))}else So[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let i=0;i<t.length;i++)(t[i]===null||dre(t[i]))&&n.push(i);n.length&&xre(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=So[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const i=r[r.length-1];i!==void 0&&t.getValue(n,i).jump(i,!1)}measureEndState(){var s;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=So[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(s=this.removedTransforms)!=null&&s.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function oB(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(n=>n!=null)}const sB=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tg(e){return h4(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lE,cancel:DIe}=N4(queueMicrotask,!1),Zn={x:!1,y:!1};function lB(){return Zn.x||Zn.y}function wre(e){return e==="x"||e==="y"?Zn[e]?null:(Zn[e]=!0,()=>{Zn[e]=!1}):Zn.x||Zn.y?null:(Zn.x=Zn.y=!0,()=>{Zn.x=Zn.y=!1})}function cB(e,t){const r=oB(e),n=new AbortController,i=I(N({passive:!0},t),{signal:n.signal});return[r,i,()=>n.abort()]}function kre(e){return!(e.pointerType==="touch"||lB())}function _re(e,t,r={}){const[n,i,a]=cB(e,r);return n.forEach(o=>{let s=!1,c=!1,u;const f=()=>{o.removeEventListener("pointerleave",m)},d=v=>{u&&(u(v),u=void 0),f()},h=v=>{s=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,d(v))},p=()=>{s=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},m=v=>{if(v.pointerType!=="touch"){if(s){c=!0;return}d(v)}},g=v=>{if(!kre(v))return;c=!1;const x=t(o,v);typeof x=="function"&&(u=x,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",g,i),o.addEventListener("pointerdown",p,i)}),a}const uB=(e,t)=>t?e===t?!0:uB(e,t.parentElement):!1,cE=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jre=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sre(e){return jre.has(e.tagName)||e.isContentEditable===!0}const Ere=new Set(["INPUT","SELECT","TEXTAREA"]);function Nre(e){return Ere.has(e.tagName)||e.isContentEditable===!0}const rg=new WeakSet;function lP(e){return t=>{t.key==="Enter"&&e(t)}}function t0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Cre=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=lP(()=>{if(rg.has(r))return;t0(r,"down");const i=lP(()=>{t0(r,"up")}),a=()=>t0(r,"cancel");r.addEventListener("keyup",i,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function cP(e){return cE(e)&&!lB()}const uP=new WeakSet;function Tre(e,t,r={}){const[n,i,a]=cB(e,r),o=s=>{const c=s.currentTarget;if(!cP(s)||uP.has(s))return;rg.add(c),r.stopPropagation&&uP.add(s);const u=t(c,s),f=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),rg.has(c)&&rg.delete(c),cP(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{f(p,c===window||c===document||r.useGlobalTarget||uB(c,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),tg(s)&&(s.addEventListener("focus",u=>Cre(u,i)),!Sre(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function uE(e){return h4(e)&&"ownerSVGElement"in e}const ng=new WeakMap;let eo;const dB=(e,t,r)=>(n,i)=>i&&i[0]?i[0][e+"Size"]:uE(n)&&"getBBox"in n?n.getBBox()[t]:n[r],Are=dB("inline","width","offsetWidth"),Pre=dB("block","height","offsetHeight");function Ore({target:e,borderBoxSize:t}){var r;(r=ng.get(e))==null||r.forEach(n=>{n(e,{get width(){return Are(e,t)},get height(){return Pre(e,t)}})})}function Rre(e){e.forEach(Ore)}function $re(){typeof ResizeObserver!="undefined"&&(eo=new ResizeObserver(Rre))}function Mre(e,t){eo||$re();const r=oB(e);return r.forEach(n=>{let i=ng.get(n);i||(i=new Set,ng.set(n,i)),i.add(t),eo==null||eo.observe(n)}),()=>{r.forEach(n=>{const i=ng.get(n);i==null||i.delete(t),i!=null&&i.size||eo==null||eo.unobserve(n)})}}const ig=new Set;let rc;function Dre(){rc=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ig.forEach(t=>t(e))},window.addEventListener("resize",rc)}function Ire(e){return ig.add(e),rc||Dre(),()=>{ig.delete(e),!ig.size&&typeof rc=="function"&&(window.removeEventListener("resize",rc),rc=void 0)}}function dP(e,t){return typeof e=="function"?Ire(e):Mre(e,t)}function Lre(e){return uE(e)&&e.tagName==="svg"}const zre=[...nB,Wt,mi],Bre=e=>zre.find(rB(e)),fP=()=>({translate:0,scale:1,origin:0,originPoint:0}),nc=()=>({x:fP(),y:fP()}),hP=()=>({min:0,max:0}),Zt=()=>({x:hP(),y:hP()}),Ure=new WeakMap;function Qv(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xf(e){return typeof e=="string"||Array.isArray(e)}const dE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fE=["initial",...dE];function Zv(e){return Qv(e.animate)||fE.some(t=>Xf(e[t]))}function fB(e){return!!(Zv(e)||e.variants)}function Fre(e,t,r){for(const n in t){const i=t[n],a=r[n];if(xr(i))e.addValue(n,i);else if(xr(a))e.addValue(n,eu(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(n);e.addValue(n,eu(o!==void 0?o:i,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const ok={current:null},hB={current:!1},Kre=typeof window!="undefined";function Hre(){if(hB.current=!0,!!Kre)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ok.current=e.matches;e.addEventListener("change",t),t()}else ok.current=!1}const pP=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ey={};function pB(e){ey=e}function Vre(){return ey}class Wre{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:o,visualState:s},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=rE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ir.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,st.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=s;this.latestValues=u,this.baseTarget=N({},u),this.initialValues=r.initial?N({},u):{},this.renderState=f,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Zv(r),this.isVariantNode=fB(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const p=this.scrapeMotionValuesFromProps(r,{},this),{willChange:d}=p,h=Z(p,["willChange"]);for(const m in h){const g=h[m];u[m]!==void 0&&xr(g)&&g.set(u[m])}}mount(t){var r,n,i;if(this.hasBeenMounted)for(const a in this.initialValues)(r=this.values.get(a))==null||r.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a];this.current=t,Ure.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((a,o)=>this.bindToMotionValue(o,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(hB.current||Hre(),this.shouldReduceMotion=ok.current),this.shouldSkipAnimations=(n=this.skipAnimationsConfig)!=null?n:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Wo(this.notifyUpdate),Wo(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){var r;this.children.add(t),(r=this.enteringChildren)!=null||(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&G4.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:s,times:c,ease:u,duration:f}=r.accelerate,d=new W4({element:this.current,name:t,keyframes:s,times:c,ease:u,duration:en(f)}),h=o(d);this.valueSubscriptions.set(t,()=>{h(),d.cancel()});return}const n=zu.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&st.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window!="undefined"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),r.owner&&r.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 ey){const r=ey[t];if(!r)continue;const{isEnabled:n,Feature:i}=r;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<pP.length;n++){const i=pP[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Fre(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=eu(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var i;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!=null?i:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(f4(n)||p4(n))?n=parseFloat(n):!Bre(n)&&mi.test(r)&&(n=aB(t,r)),this.setBaseTarget(t,xr(n)?n.get():n)),xr(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var a;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const o=aE(this.props,r,(a=this.presenceContext)==null?void 0:a.custom);o&&(n=o[t])}if(r&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!xr(i)?i:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new qS),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){lE.render(this.render)}}class mB extends Wre{constructor(){super(...arguments),this.KeyframeResolver=bre}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const n=t.style;return n?n[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xr(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent="".concat(r))}))}}class Qo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function gB({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function qre({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gre(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function r0(e){return e===void 0||e===1}function sk({scale:e,scaleX:t,scaleY:r}){return!r0(e)||!r0(t)||!r0(r)}function hs(e){return sk(e)||yB(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yB(e){return mP(e.x)||mP(e.y)}function mP(e){return e&&e!=="0%"}function ty(e,t,r){const n=e-r,i=t*n;return r+i}function gP(e,t,r,n,i){return i!==void 0&&(e=ty(e,i,n)),ty(e,r,n)+t}function lk(e,t=0,r=1,n,i){e.min=gP(e.min,t,r,n,i),e.max=gP(e.max,t,r,n,i)}function vB(e,{x:t,y:r}){lk(e.x,t.translate,t.scale,t.originPoint),lk(e.y,r.translate,r.scale,r.originPoint)}const yP=.999999999999,vP=1.0000000000001;function Yre(e,t,r,n=!1){var s;const i=r.length;if(!i)return;t.x=t.y=1;let a,o;for(let c=0;c<i;c++){a=r[c],o=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Di(e.x,-a.scroll.offset.x),Di(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,vB(e,o)),n&&hs(a.latestValues)&&ag(e,a.latestValues,(s=a.layout)==null?void 0:s.layoutBox))}t.x<vP&&t.x>yP&&(t.x=1),t.y<vP&&t.y>yP&&(t.y=1)}function Di(e,t){e.min+=t,e.max+=t}function xP(e,t,r,n,i=.5){const a=jt(e.min,e.max,i);lk(e,t,r,a,n)}function bP(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ag(e,t,r){const n=r!=null?r:e;xP(e.x,bP(t.x,n.x),t.scaleX,t.scale,t.originX),xP(e.y,bP(t.y,n.y),t.scaleY,t.scale,t.originY)}function xB(e,t){return gB(Gre(e.getBoundingClientRect(),t))}function Xre(e,t,r){const n=xB(e,r),{scroll:i}=t;return i&&(Di(n.x,i.offset.x),Di(n.y,i.offset.y)),n}const Jre={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qre=Lu.length;function Zre(e,t,r){let n="",i=!0;for(let a=0;a<Qre;a++){const o=Lu[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s=="number")c=s===(o.startsWith("scale")?1:0);else{const u=parseFloat(s);c=o.startsWith("scale")?u===1:u===0}if(!c||r){const u=sB(s,sE[o]);if(!c){i=!1;const f=Jre[o]||o;n+="".concat(f,"(").concat(u,") ")}r&&(t[o]=u)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}function hE(e,t,r){const{style:n,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const c in t){const u=t[c];if(zu.has(c)){o=!0;continue}else if(T4(c)){i[c]=u;continue}else{const f=sB(u,sE[c]);c.startsWith("origin")?(s=!0,a[c]=f):n[c]=f}}if(t.transform||(o||r?n.transform=Zre(t,e.transform,r):n.transform&&(n.transform="none")),s){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;n.transformOrigin="".concat(c," ").concat(u," ").concat(f)}}function bB(e,{style:t,vars:r},n,i){const a=e.style;let o;for(o in t)a[o]=t[o];i==null||i.applyProjectionStyles(a,n);for(o in r)a.setProperty(o,r[o])}function wP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(xe.test(e))e=parseFloat(e);else return e;const r=wP(e,t.target.x),n=wP(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},ene={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,i=mi.parse(e);if(i.length>5)return n;const a=mi.createTransformer(e),o=typeof i[0]!="number"?1:0,s=r.x.scale*t.x,c=r.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;const u=jt(s,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}},ck={borderRadius:I(N({},vd),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:vd,borderTopRightRadius:vd,borderBottomLeftRadius:vd,borderBottomRightRadius:vd,boxShadow:ene};function wB(e,{layout:t,layoutId:r}){return zu.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!ck[e]||e==="opacity")}function pE(e,t,r){var o;const n=e.style,i=t==null?void 0:t.style,a={};if(!n)return a;for(const s in n)(xr(n[s])||i&&xr(i[s])||wB(s,e)||((o=r==null?void 0:r.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function tne(e){return window.getComputedStyle(e)}class rne extends mB{constructor(){super(...arguments),this.type="html",this.renderInstance=bB}readValueFromInstance(t,r){var n;if(zu.has(r))return(n=this.projection)!=null&&n.isProjecting?Y1(r):wte(t,r);{const i=tne(t),a=(T4(r)?i.getPropertyValue(r):i[r])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:r}){return xB(t,r)}build(t,r,n){hE(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return pE(t,r,n)}}const nne={offset:"stroke-dashoffset",array:"stroke-dasharray"},ine={offset:"strokeDashoffset",array:"strokeDasharray"};function ane(e,t,r=1,n=0,i=!0){e.pathLength=1;const a=i?nne:ine;e[a.offset]="".concat(-n),e[a.array]="".concat(t," ").concat(r)}const one=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function kB(e,d,c,u,f){var h=d,{attrX:t,attrY:r,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:o=0}=h,s=Z(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var g,v;if(hE(e,s,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m}=e;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=(g=p.transformOrigin)!=null?g:"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(v=f==null?void 0:f.transformBox)!=null?v:"fill-box",delete p.transformBox);for(const x of one)p[x]!==void 0&&(m[x]=p[x],delete p[x]);t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),i!==void 0&&ane(p,i,a,o,!1)}const _B=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"]),jB=e=>typeof e=="string"&&e.toLowerCase()==="svg";function sne(e,t,r,n){bB(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(_B.has(i)?i:oE(i),t.attrs[i])}function SB(e,t,r){const n=pE(e,t,r);for(const i in e)if(xr(e[i])||xr(t[i])){const a=Lu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=e[i]}return n}class lne extends mB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Zt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(zu.has(r)){const n=iB(r);return n&&n.default||0}return r=_B.has(r)?r:oE(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return SB(t,r,n)}build(t,r,n){kB(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,i){sne(t,r,n,i)}mount(t){this.isSVGTag=jB(t.tagName),super.mount(t)}}const cne=fE.length;function EB(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?EB(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<cne;r++){const n=fE[r],i=e.props[n];(Xf(i)||i===!1)&&(t[n]=i)}return t}function NB(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const une=[...dE].reverse(),dne=dE.length;function fne(e){return t=>Promise.all(t.map(({animation:r,options:n})=>cre(e,r,n)))}function hne(e){let t=fne(e),r=kP(),n=!0,i=!1;const a=u=>(f,d)=>{var p;const h=Us(e,d,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const m=h,{transition:g,transitionEnd:v}=m,x=Z(m,["transition","transitionEnd"]);f=N(N(N({},f),x),v)}return f};function o(u){t=u(e)}function s(u){const{props:f}=e,d=EB(e.parent)||{},h=[],p=new Set;let m={},g=1/0;for(let x=0;x<dne;x++){const b=une[x],y=r[b],j=f[b]!==void 0?f[b]:d[b],k=Xf(j),_=b===u?y.isActive:null;_===!1&&(g=x);let S=j===d[b]&&j!==f[b]&&k;if(S&&(n||i)&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys=N({},m),!y.isActive&&_===null||!j&&!y.prevProp||Qv(j)||typeof j=="boolean")continue;if(b==="exit"&&y.isActive&&_!==!0){y.prevResolvedValues&&(m=N(N({},m),y.prevResolvedValues));continue}const E=pne(y.prevProp,j);let C=E||b===u&&y.isActive&&!S&&k||x>g&&k,R=!1;const M=Array.isArray(j)?j:[j];let L=M.reduce(a(b),{});_===!1&&(L={});const{prevResolvedValues:H={}}=y,U=N(N({},H),L),F=A=>{C=!0,p.has(A)&&(R=!0,p.delete(A)),y.needsAnimating[A]=!0;const D=e.getValue(A);D&&(D.liveStyle=!1)};for(const A in U){const D=L[A],B=H[A];if(m.hasOwnProperty(A))continue;let z=!1;tk(D)&&tk(B)?z=!NB(D,B):z=D!==B,z?D!=null?F(A):p.add(A):D!==void 0&&p.has(A)?F(A):y.protectedKeys[A]=!0}y.prevProp=j,y.prevResolvedValues=L,y.isActive&&(m=N(N({},m),L)),(n||i)&&e.blockInitialAnimation&&(C=!1);const O=S&&E;C&&(!O||R)&&h.push(...M.map(A=>{const D={type:b};if(typeof A=="string"&&(n||i)&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,z=Us(B,A);if(B.enteringChildren&&z){const{delayChildren:K}=z.transition||{};D.delay=Y4(B.enteringChildren,e,K)}}return{animation:A,options:D}}))}if(p.size){const x={};if(typeof f.initial!="boolean"){const b=Us(e,Array.isArray(f.initial)?f.initial[0]:f.initial);b&&b.transition&&(x.transition=b.transition)}p.forEach(b=>{const y=e.getBaseTarget(b),j=e.getValue(b);j&&(j.liveStyle=!0),x[b]=y!=null?y:null}),h.push({animation:x})}let v=!!h.length;return n&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(v=!1),n=!1,i=!1,v?t(h):Promise.resolve()}function c(u,f){var h;if(r[u].isActive===f)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var m;return(m=p.animationState)==null?void 0:m.setActive(u,f)}),r[u].isActive=f;const d=s(u);for(const p in r)r[p].protectedKeys={};return d}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>r,reset:()=>{r=kP(),i=!0}}}function pne(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!NB(t,e):!1}function ss(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kP(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}function uk(e,t){e.min=t.min,e.max=t.max}function Yn(e,t){uk(e.x,t.x),uk(e.y,t.y)}function _P(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const CB=1e-4,mne=1-CB,gne=1+CB,TB=.01,yne=0-TB,vne=0+TB;function Lr(e){return e.max-e.min}function xne(e,t,r){return Math.abs(e-t)<=r}function jP(e,t,r,n=.5){e.origin=n,e.originPoint=jt(t.min,t.max,e.origin),e.scale=Lr(r)/Lr(t),e.translate=jt(r.min,r.max,e.origin)-e.originPoint,(e.scale>=mne&&e.scale<=gne||isNaN(e.scale))&&(e.scale=1),(e.translate>=yne&&e.translate<=vne||isNaN(e.translate))&&(e.translate=0)}function of(e,t,r,n){jP(e.x,t.x,r.x,n?n.originX:void 0),jP(e.y,t.y,r.y,n?n.originY:void 0)}function SP(e,t,r,n=0){const i=n?jt(r.min,r.max,n):r.min;e.min=i+t.min,e.max=e.min+Lr(t)}function bne(e,t,r,n){SP(e.x,t.x,r.x,n==null?void 0:n.x),SP(e.y,t.y,r.y,n==null?void 0:n.y)}function EP(e,t,r,n=0){const i=n?jt(r.min,r.max,n):r.min;e.min=t.min-i,e.max=e.min+Lr(t)}function ry(e,t,r,n){EP(e.x,t.x,r.x,n==null?void 0:n.x),EP(e.y,t.y,r.y,n==null?void 0:n.y)}function NP(e,t,r,n,i){return e-=t,e=ty(e,1/r,n),i!==void 0&&(e=ty(e,1/i,n)),e}function wne(e,t=0,r=1,n=.5,i,a=e,o=e){if(Wi.test(t)&&(t=parseFloat(t),t=jt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=jt(a.min,a.max,n);e===a&&(s-=t),e.min=NP(e.min,t,r,s,i),e.max=NP(e.max,t,r,s,i)}function CP(e,t,[r,n,i],a,o){wne(e,t[r],t[n],t[i],t.scale,a,o)}const kne=["x","scaleX","originX"],_ne=["y","scaleY","originY"];function TP(e,t,r,n){CP(e.x,t,kne,r?r.x:void 0,n?n.x:void 0),CP(e.y,t,_ne,r?r.y:void 0,n?n.y:void 0)}function AP(e){return e.translate===0&&e.scale===1}function AB(e){return AP(e.x)&&AP(e.y)}function PP(e,t){return e.min===t.min&&e.max===t.max}function jne(e,t){return PP(e.x,t.x)&&PP(e.y,t.y)}function OP(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function PB(e,t){return OP(e.x,t.x)&&OP(e.y,t.y)}function RP(e){return Lr(e.x)/Lr(e.y)}function $P(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ni(e){return[e("x"),e("y")]}function Sne(e,t,r){let n="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((i||a||o)&&(n="translate3d(".concat(i,"px, ").concat(a,"px, ").concat(o,"px) ")),(t.x!==1||t.y!==1)&&(n+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),r){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:m}=r;u&&(n="perspective(".concat(u,"px) ").concat(n)),f&&(n+="rotate(".concat(f,"deg) ")),d&&(n+="rotateX(".concat(d,"deg) ")),h&&(n+="rotateY(".concat(h,"deg) ")),p&&(n+="skewX(".concat(p,"deg) ")),m&&(n+="skewY(".concat(m,"deg) "))}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(n+="scale(".concat(s,", ").concat(c,")")),n||"none"}const OB=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ene=OB.length,MP=e=>typeof e=="string"?parseFloat(e):e,DP=e=>typeof e=="number"||xe.test(e);function Nne(e,t,r,n,i,a){var o,s,c,u;i?(e.opacity=jt(0,(o=r.opacity)!=null?o:1,Cne(n)),e.opacityExit=jt((s=t.opacity)!=null?s:1,0,Tne(n))):a&&(e.opacity=jt((c=t.opacity)!=null?c:1,(u=r.opacity)!=null?u:1,n));for(let f=0;f<Ene;f++){const d=OB[f];let h=IP(t,d),p=IP(r,d);if(h===void 0&&p===void 0)continue;h||(h=0),p||(p=0),h===0||p===0||DP(h)===DP(p)?(e[d]=Math.max(jt(MP(h),MP(p),n),0),(Wi.test(p)||Wi.test(h))&&(e[d]+="%")):e[d]=p}(t.rotate||r.rotate)&&(e.rotate=jt(t.rotate||0,r.rotate||0,n))}function IP(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Cne=RB(0,.5,_4),Tne=RB(.5,.95,Ln);function RB(e,t,r){return n=>n<e?0:n>t?1:r(Gf(e,t,n))}function Ane(e,t,r){const n=xr(e)?e:eu(e);return n.start(iE("",n,t,r)),n.animation}function Jf(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const Pne=(e,t)=>e.depth-t.depth;class One{constructor(){this.children=[],this.isDirty=!1}add(t){WS(this.children,t),this.isDirty=!0}remove(t){Yg(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Pne),this.isDirty=!1,this.children.forEach(t)}}function Rne(e,t){const r=Ir.now(),n=({timestamp:i})=>{const a=i-r;a>=t&&(Wo(n),e(a-t))};return st.setup(n,!0),()=>Wo(n)}function og(e){return xr(e)?e.get():e}class $ne{constructor(){this.members=[]}add(t){WS(this.members,t);for(let r=this.members.length-1;r>=0;r--){const n=this.members[r];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;(!i||i.isConnected===!1)&&!n.snapshot&&(Yg(this.members,n),n.unmount())}t.scheduleRender()}remove(t){if(Yg(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){var r;for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&((r=i.instance)==null?void 0:r.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,r){var i;const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=n.options,{layoutDependency:o}=t.options;(a===void 0||a!==o)&&(t.resumeFrom=n,r&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var r,n,i,a,o;(n=(r=t.options).onExitComplete)==null||n.call(r),(o=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||o.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const sg={hasAnimatedSinceResize:!0,hasEverUpdated:!1},n0=["","X","Y","Z"],Mne=1e3;let Dne=0;function i0(e,t,r,n){const{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function $B(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=eB(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",st,!(i||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&$B(n)}function MB({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=Dne++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(zne),this.nodes.forEach(Vne),this.nodes.forEach(Wne),this.nodes.forEach(Bne)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new One)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new qS),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const c=this.eventHandlers.get(o);c&&c.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=uE(o)&&!Lre(o),this.instance=o;const{layoutId:s,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let f,d=0;const h=()=>this.root.updateBlockedByResize=!1;st.read(()=>{d=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,f&&f(),f=Rne(h,250),sg.hasAnimatedSinceResize&&(sg.hasAnimatedSinceResize=!1,this.nodes.forEach(BP)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Jne,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!PB(this.targetLayout,p),b=!d&&h;if(this.options.layoutRoot||this.resumeFrom||b||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y=I(N({},nE(m,"layout")),{onPlay:g,onComplete:v});(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(f,b)}else d||BP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Wo(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(qne),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$B(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(Fne),this.nodes.forEach(LP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kne),this.nodes.forEach(Hne),this.nodes.forEach(Ine),this.nodes.forEach(Lne)):this.nodes.forEach(zP),this.clearAllSnapshots();const s=Ir.now();gr.delta=Zi(0,1e3/60,s-gr.timestamp),gr.timestamp=s,gr.isProcessing=!0,Yb.update.process(gr),Yb.preRender.process(gr),Yb.render.process(gr),gr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Une),this.sharedNodes.forEach(Gne)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Lr(this.snapshot.measuredBox.x)&&!Lr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Zt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!AB(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||hs(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return o&&(c=this.removeTransform(c)),Qne(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Zt();const s=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Zne))){const{scroll:f}=this.root;f&&(Di(s.x,f.offset.x),Di(s.y,f.offset.y))}return s}removeElementScroll(o){var c;const s=Zt();if(Yn(s,o),(c=this.scroll)!=null&&c.wasRoot)return s;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:d,options:h}=f;f!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Yn(s,o),Di(s.x,d.offset.x),Di(s.y,d.offset.y))}return s}applyTransform(o,s=!1,c){var f,d;const u=c||Zt();Yn(u,o);for(let h=0;h<this.path.length;h++){const p=this.path[h];!s&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Di(u.x,-p.scroll.offset.x),Di(u.y,-p.scroll.offset.y)),hs(p.latestValues)&&ag(u,p.latestValues,(f=p.layout)==null?void 0:f.layoutBox)}return hs(this.latestValues)&&ag(u,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),u}removeTransform(o){var c;const s=Zt();Yn(s,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!hs(f.latestValues))continue;let d;f.instance&&(sk(f.latestValues)&&f.updateSnapshot(),d=Zt(),Yn(d,f.measurePageBox())),TP(s,f.latestValues,(c=f.snapshot)==null?void 0:c.layoutBox,d)}return hs(this.latestValues)&&TP(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options=I(N(N({},this.options),o),{crossfade:o.crossfade!==void 0?o.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!this.layout||!(f||d))return;this.resolvedRelativeTargetAt=gr.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Zt(),this.targetWithTransforms=Zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),bne(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Yn(this.target,this.layout.layoutBox),vB(this.target,this.targetDelta)):Yn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||sk(this.parent.latestValues)||yB(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,s,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Zt(),this.relativeTargetOrigin=Zt(),ry(this.relativeTargetOrigin,s,c,this.options.layoutAnchor||void 0),Yn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),s=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===gr.timestamp&&(c=!1),c)return;const{layout:u,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||!(u||f))return;Yn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Yre(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Zt());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_P(this.prevProjectionDelta.x,this.projectionDelta.x),_P(this.prevProjectionDelta.y,this.projectionDelta.y)),of(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!$P(this.projectionDelta.x,this.prevProjectionDelta.x)||!$P(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nc(),this.projectionDelta=nc(),this.projectionDeltaWithTransform=nc()}setAnimationOrigin(o,s=!1){const c=this.snapshot,u=c?c.latestValues:{},f=N({},this.latestValues),d=nc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const h=Zt(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,v=this.getStack(),x=!v||v.members.length<=1,b=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Xne));this.animationProgress=0;let y;this.mixTargetDelta=j=>{const k=j/1e3;UP(d.x,o.x,k),UP(d.y,o.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ry(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Yne(this.relativeTarget,this.relativeTargetOrigin,h,k),y&&jne(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Zt()),Yn(y,this.relativeTarget)),g&&(this.animationValues=f,Nne(f,u,this.latestValues,k,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var s,c,u;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Wo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{sg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=eu(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ane(this.motionValue,[0,1e3],I(N({},o),{velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),o.onUpdate&&o.onUpdate(f)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Mne),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:u,latestValues:f}=o;if(!(!s||!c||!u)){if(this!==o&&this.layout&&u&&DB(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Zt();const d=Lr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const h=Lr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Yn(s,c),ag(s,f),of(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $ne),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const u={};c.z&&i0("z",o,u,this.animationValues);for(let f=0;f<n0.length;f++)i0("rotate".concat(n0[f]),o,u,this.animationValues),i0("skew".concat(n0[f]),o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}applyProjectionStyles(o,s){var m,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=og(s==null?void 0:s.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=og(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!hs(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const f=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Sne(this.projectionDeltaWithTransform,this.treeScale,f);c&&(d=c(f,d)),o.transform=d;const{x:h,y:p}=this.projectionDelta;o.transformOrigin="".concat(h.origin*100,"% ").concat(p.origin*100,"% 0"),u.animationValues?o.opacity=u===this?(g=(m=f.opacity)!=null?m:this.latestValues.opacity)!=null?g:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:o.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const v in ck){if(f[v]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:y}=ck[v],j=d==="none"?f[v]:x(f[v],u);if(b){const k=b.length;for(let _=0;_<k;_++)o[b[_]]=j}else y?this.options.visualElement.renderState.vars[v]=j:o[v]=j}this.options.layoutId&&(o.pointerEvents=u===this?og(s==null?void 0:s.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(LP),this.root.sharedNodes.clear()}}}function Ine(e){e.updateLayout()}function Lne(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if(a==="size")Ni(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=Lr(h);h.min=n[d].min,h.max=h.min+p});else if(a==="x"||a==="y"){const d=a==="x"?"y":"x";uk(o?t.measuredBox[d]:t.layoutBox[d],n[d])}else DB(a,t.layoutBox,n)&&Ni(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],p=Lr(n[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=nc();of(s,n,t.layoutBox);const c=nc();o?of(c,e.applyTransform(i,!0),t.measuredBox):of(c,n,t.layoutBox);const u=!AB(s);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=e.options.layoutAnchor||void 0,g=Zt();ry(g,t.layoutBox,h.layoutBox,m);const v=Zt();ry(v,n,p.layoutBox,m),PB(g,v)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function zne(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Bne(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Une(e){e.clearSnapshot()}function LP(e){e.clearMeasurements()}function Fne(e){e.isLayoutDirty=!0,e.updateLayout()}function zP(e){e.isLayoutDirty=!1}function Kne(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Hne(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function BP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Vne(e){e.resolveTargetDelta()}function Wne(e){e.calcProjection()}function qne(e){e.resetSkewAndRotation()}function Gne(e){e.removeLeadSnapshot()}function UP(e,t,r){e.translate=jt(t.translate,0,r),e.scale=jt(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function FP(e,t,r,n){e.min=jt(t.min,r.min,n),e.max=jt(t.max,r.max,n)}function Yne(e,t,r,n){FP(e.x,t.x,r.x,n),FP(e.y,t.y,r.y,n)}function Xne(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Jne={duration:.45,ease:[.4,0,.1,1]},KP=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),HP=KP("applewebkit/")&&!KP("chrome/")?Math.round:Ln;function VP(e){e.min=HP(e.min),e.max=HP(e.max)}function Qne(e){VP(e.x),VP(e.y)}function DB(e,t,r){return e==="position"||e==="preserve-aspect"&&!xne(RP(t),RP(r),.2)}function Zne(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const eie=MB({attachResizeListener:(e,t)=>Jf(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),a0={current:void 0},IB=MB({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!a0.current){const e=new eie({});e.mount(window),e.setOptions({layoutScroll:!0}),a0.current=e}return a0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mE=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function WP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tie(...e){return t=>{let r=!1;const n=e.map(i=>{const a=WP(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():WP(e[i],null)}}}}function rie(...e){return w.useCallback(tie(...e),e)}class nie extends w.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(tg(r)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=r.offsetParent,i=tg(n)&&n.offsetWidth||0,a=tg(n)&&n.offsetHeight||0,o=getComputedStyle(r),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=r.offsetTop,s.left=r.offsetLeft,s.right=i-s.width-s.left,s.bottom=a-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function iie({children:e,isPresent:t,anchorX:r,anchorY:n,root:i,pop:a}){var h,p;const o=w.useId(),s=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(mE),f=(p=(h=e.props)==null?void 0:h.ref)!=null?p:e==null?void 0:e.ref,d=rie(s,f);return w.useInsertionEffect(()=>{const{width:m,height:g,top:v,left:x,right:b,bottom:y}=c.current;if(t||a===!1||!s.current||!m||!g)return;const j=r==="left"?"left: ".concat(x):"right: ".concat(b),k=n==="bottom"?"bottom: ".concat(y):"top: ".concat(v);s.current.dataset.motionPopId=o;const _=document.createElement("style");u&&(_.nonce=u);const S=i!=null?i:document.head;return S.appendChild(_),_.sheet&&_.sheet.insertRule('\n [data-motion-pop-id="'.concat(o,'"] {\n position: absolute !important;\n width: ').concat(m,"px !important;\n height: ").concat(g,"px !important;\n ").concat(j,"px !important;\n ").concat(k,"px !important;\n }\n ")),()=>{var E;(E=s.current)==null||E.removeAttribute("data-motion-pop-id"),S.contains(_)&&S.removeChild(_)}},[t]),l.jsx(nie,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:w.cloneElement(e,{ref:d})})}const aie=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:u})=>{const f=VS(oie),d=w.useId();let h=!0,p=w.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:r,custom:i,onExitComplete:m=>{f.set(m,!0);for(const g of f.values())if(!g)return;n&&n()},register:m=>(f.set(m,!1),()=>f.delete(m))}),[r,f,n]);return a&&h&&(p=N({},p)),w.useMemo(()=>{f.forEach((m,g)=>f.set(g,!1))},[r]),w.useEffect(()=>{!r&&!f.size&&n&&n()},[r]),e=l.jsx(iie,{pop:o==="popLayout",isPresent:r,anchorX:s,anchorY:c,root:u,children:e}),l.jsx(Yv.Provider,{value:p,children:e})};function oie(){return new Map}function LB(e=!0){const t=w.useContext(Yv);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:i}=t,a=w.useId();w.useEffect(()=>{if(e)return i(a)},[e]);const o=w.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const am=e=>e.key||"";function qP(e){const t=[];return w.Children.forEach(e,r=>{w.isValidElement(r)&&t.push(r)}),t}const gE=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",anchorY:c="top",root:u})=>{const[f,d]=LB(o),h=w.useMemo(()=>qP(e),[e]),p=o&&!f?[]:h.map(am),m=w.useRef(!0),g=w.useRef(h),v=VS(()=>new Map),x=w.useRef(new Set),[b,y]=w.useState(h),[j,k]=w.useState(h);d4(()=>{m.current=!1,g.current=h;for(let E=0;E<j.length;E++){const C=am(j[E]);p.includes(C)?(v.delete(C),x.current.delete(C)):v.get(C)!==!0&&v.set(C,!1)}},[j,p.length,p.join("-")]);const _=[];if(h!==b){let E=[...h];for(let C=0;C<j.length;C++){const R=j[C],M=am(R);p.includes(M)||(E.splice(C,0,R),_.push(R))}return a==="wait"&&_.length&&(E=_),k(qP(E)),y(h),null}const{forceRender:S}=w.useContext(HS);return l.jsx(l.Fragment,{children:j.map(E=>{const C=am(E),R=o&&!f?!1:h===j||p.includes(C),M=()=>{if(x.current.has(C))return;if(v.has(C))x.current.add(C),v.set(C,!0);else return;let L=!0;v.forEach(H=>{H||(L=!1)}),L&&(S==null||S(),k(g.current),o&&(d==null||d()),n&&n())};return l.jsx(aie,{isPresent:R,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:R?void 0:M,anchorX:s,anchorY:c,children:E},C)})})},zB=w.createContext({strict:!1}),GP={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let YP=!1;function sie(){if(YP)return;const e={};for(const t in GP)e[t]={isEnabled:r=>GP[t].some(n=>!!r[n])};pB(e),YP=!0}function BB(){return sie(),Vre()}function lie(e){const t=BB();for(const r in e)t[r]=N(N({},t[r]),e[r]);pB(t)}const cie=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ny(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cie.has(e)}let UB=e=>!ny(e);function uie(e){typeof e=="function"&&(UB=t=>t.startsWith("on")?!ny(t):e(t))}try{uie(require("@emotion/is-prop-valid").default)}catch(e){}function die(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||xr(e[i])||(UB(i)||r===!0&&ny(i)||!t&&!ny(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}const ex=w.createContext({});function fie(e,t){if(Zv(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Xf(r)?r:void 0,animate:Xf(n)?n:void 0}}return e.inherit!==!1?t:{}}function hie(e){const{initial:t,animate:r}=fie(e,w.useContext(ex));return w.useMemo(()=>({initial:t,animate:r}),[XP(t),XP(r)])}function XP(e){return Array.isArray(e)?e.join(" "):e}const yE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function FB(e,t,r){for(const n in t)!xr(t[n])&&!wB(n,r)&&(e[n]=t[n])}function pie({transformTemplate:e},t){return w.useMemo(()=>{const r=yE();return hE(r,t,e),Object.assign({},r.vars,r.style)},[t])}function mie(e,t){const r=e.style||{},n={};return FB(n,r,e),Object.assign(n,pie(e,t)),n}function gie(e,t){const r={},n=mie(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const KB=()=>I(N({},yE()),{attrs:{}});function yie(e,t,r,n){const i=w.useMemo(()=>{const a=KB();return kB(a,t,jB(n),e.transformTemplate,e.style),I(N({},a.attrs),{style:N({},a.style)})},[t]);if(e.style){const a={};FB(a,e.style,e),i.style=N(N({},a),i.style)}return i}const vie=["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 vE(e){return typeof e!="string"||e.includes("-")?!1:!!(vie.indexOf(e)>-1||new RegExp("[A-Z]","u").test(e))}function xie(e,t,r,{latestValues:n},i,a=!1,o){const c=((o!=null?o:vE(e))?yie:gie)(t,n,i,e),u=die(t,typeof e=="string",a),f=e!==w.Fragment?I(N(N({},u),c),{ref:r}):{},{children:d}=t,h=w.useMemo(()=>xr(d)?d.get():d,[d]);return w.createElement(e,I(N({},f),{children:h}))}function bie({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,i){return{latestValues:wie(r,n,i,e),renderState:t()}}function wie(e,t,r,n){const i={},a=n(e,{});for(const p in a)i[p]=og(a[p]);let{initial:o,animate:s}=e;const c=Zv(e),u=fB(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const d=f?s:o;if(d&&typeof d!="boolean"&&!Qv(d)){const p=Array.isArray(d)?d:[d];for(let m=0;m<p.length;m++){const g=aE(e,p[m]);if(g){const h=g,{transitionEnd:v,transition:x}=h,b=Z(h,["transitionEnd","transition"]);for(const y in b){let j=b[y];if(Array.isArray(j)){const k=f?j.length-1:0;j=j[k]}j!==null&&(i[y]=j)}for(const y in v)i[y]=v[y]}}}return i}const HB=e=>(t,r)=>{const n=w.useContext(ex),i=w.useContext(Yv),a=()=>bie(e,t,n,i);return r?a():VS(a)},kie=HB({scrapeMotionValuesFromProps:pE,createRenderState:yE}),_ie=HB({scrapeMotionValuesFromProps:SB,createRenderState:KB}),jie=Symbol.for("motionComponentSymbol");function Sie(e,t,r){const n=w.useRef(r);w.useInsertionEffect(()=>{n.current=r});const i=w.useRef(null);return w.useCallback(a=>{var s;a&&((s=e.onMount)==null||s.call(e,a));const o=n.current;if(typeof o=="function")if(a){const c=o(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const VB=w.createContext({});function zl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Eie(e,t,r,n,i,a){var y,j;const{visualElement:o}=w.useContext(ex),s=w.useContext(zB),c=w.useContext(Yv),u=w.useContext(mE),f=u.reducedMotion,d=u.skipAnimations,h=w.useRef(null),p=w.useRef(!1);n=n||s.renderer,!h.current&&n&&(h.current=n(e,{visualState:t,parent:o,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const m=h.current,g=w.useContext(VB);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Nie(h.current,r,i,g);const v=w.useRef(!1);w.useInsertionEffect(()=>{m&&v.current&&m.update(r,c)});const x=r[Z4],b=w.useRef(!!x&&typeof window!="undefined"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,x))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,x)));return d4(()=>{p.current=!0,m&&(v.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),w.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)==null||k.call(window,x)}),b.current=!1),m.enteringChildren=void 0)}),m}function Nie(e,t,r,n){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:u,layoutAnchor:f,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:WB(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&zl(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:c,layoutRoot:u,layoutAnchor:f})}function WB(e){if(e)return e.options.allowProjection!==!1?e.projection:WB(e.parent)}function o0(e,{forwardMotionProps:t=!1,type:r}={},n,i){var u,f;n&&lie(n);const a=r?r==="svg":vE(e),o=a?_ie:kie;function s(d,h){let p;const m=I(N(N({},w.useContext(mE)),d),{layoutId:Cie(d)}),{isStatic:g}=m,v=hie(d),x=o(d,g);if(!g&&typeof window!="undefined"){Tie();const b=Aie(m);p=b.MeasureLayout,v.visualElement=Eie(e,x,m,i,b.ProjectionNode,a)}return l.jsxs(ex.Provider,{value:v,children:[p&&v.visualElement?l.jsx(p,N({visualElement:v.visualElement},m)):null,xie(e,d,Sie(x,v.visualElement,h),x,g,t,a)]})}s.displayName="motion.".concat(typeof e=="string"?e:"create(".concat((f=(u=e.displayName)!=null?u:e.name)!=null?f:"",")"));const c=w.forwardRef(s);return c[jie]=e,c}function Cie({layoutId:e}){const t=w.useContext(HS).id;return t&&e!==void 0?t+"-"+e:e}function Tie(e,t){w.useContext(zB).strict}function Aie(e){const t=BB(),{drag:r,layout:n}=t;if(!r&&!n)return{};const i=N(N({},r),n);return{MeasureLayout:r!=null&&r.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Pie(e,t){if(typeof Proxy=="undefined")return o0;const r=new Map,n=(a,o)=>o0(a,o,e,t),i=(a,o)=>n(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?n:(r.has(o)||r.set(o,o0(o,void 0,e,t)),r.get(o))})}const Oie=(e,t)=>{var n;return((n=t.isSVG)!=null?n:vE(e))?new lne(t):new rne(t,{allowProjection:e!==w.Fragment})};class Rie extends Qo{constructor(t){super(t),t.animationState||(t.animationState=hne(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let $ie=0;class Mie extends Qo{constructor(){super(...arguments),this.id=$ie++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){const{initial:s,custom:c}=this.node.getProps();if(typeof s=="string"){const u=Us(this.node,s,c);if(u){const a=u,{transition:f,transitionEnd:d}=a,h=Z(a,["transition","transitionEnd"]);for(const p in h)(o=this.node.getValue(p))==null||o.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);r&&!t&&i.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Die={animation:{Feature:Rie},exit:{Feature:Mie}};function op(e){return{point:{x:e.pageX,y:e.pageY}}}const Iie=e=>t=>cE(t)&&e(t,op(t));function sf(e,t,r,n){return Jf(e,t,Iie(r),n)}const qB=({current:e})=>e?e.ownerDocument.defaultView:null,JP=(e,t)=>Math.abs(e-t);function Lie(e,t){const r=JP(e.x,t.x),n=JP(e.y,t.y);return Math.sqrt(qa(r,2)+qa(n,2))}const QP=new Set(["auto","scroll"]);class GB{constructor(t,r,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=om(this.lastRawMoveEventInfo,this.transformPagePoint));const p=s0(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=Lie(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=p,{timestamp:x}=gr;this.history.push(I(N({},v),{timestamp:x}));const{onStart:b,onMove:y}=this.handlers;m||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=om(m,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=s0(p.type==="pointercancel"?this.lastMoveEventInfo:om(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),v&&v(p,b)},!cE(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const c=op(t),u=om(c,this.transformPagePoint),{point:f}=u,{timestamp:d}=gr;this.history=[I(N({},f),{timestamp:d})];const{onSessionStart:h}=r;h&&h(t,s0(u,this.history)),this.removeListeners=np(sf(this.contextWindow,"pointermove",this.handlePointerMove),sf(this.contextWindow,"pointerup",this.handlePointerUp),sf(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){const n=getComputedStyle(r);(QP.has(n.overflowX)||QP.has(n.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-r.x,y:i.y-r.y};a.x===0&&a.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),st.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Wo(this.updatePoint)}}function om(e,t){return t?{point:t(e.point)}:e}function ZP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function s0({point:e},t){return{point:e,delta:ZP(e,YB(t)),offset:ZP(e,zie(t)),velocity:Bie(t,.1)}}function zie(e){return e[0]}function YB(e){return e[e.length-1]}function Bie(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const i=YB(e);for(;r>=0&&(n=e[r],!(i.timestamp-n.timestamp>en(t)));)r--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&i.timestamp-n.timestamp>en(t)*2&&(n=e[1]);const a=Mn(i.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-n.x)/a,y:(i.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Uie(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?jt(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?jt(r,e,n.max):Math.min(e,r)),e}function eO(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Fie(e,{top:t,left:r,bottom:n,right:i}){return{x:eO(e.x,r,i),y:eO(e.y,t,n)}}function tO(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function Kie(e,t){return{x:tO(e.x,t.x),y:tO(e.y,t.y)}}function Hie(e,t){let r=.5;const n=Lr(e),i=Lr(t);return i>n?r=Gf(t.min,t.max-n,e.min):n>i&&(r=Gf(e.min,e.max-i,t.min)),Zi(0,1,r)}function Vie(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const dk=.35;function Wie(e=dk){return e===!1?e=0:e===!0&&(e=dk),{x:rO(e,"left","right"),y:rO(e,"top","bottom")}}function rO(e,t,r){return{min:nO(e,t),max:nO(e,r)}}function nO(e,t){return typeof e=="number"?e:e[t]||0}const qie=new WeakMap;class Gie{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=Zt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=d=>{r&&this.snapToCursor(op(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wre(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ni(x=>{let b=this.getAxisMotionValue(x).get()||0;if(Wi.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const j=y.layout.layoutBox[x];j&&(b=Lr(j)*(parseFloat(b)/100))}}this.originPoint[x]=b}),g&&st.update(()=>g(d,h),!1,!0),rk(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=h;if(m&&this.currentDirection===null){this.currentDirection=Xie(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),v&&st.update(()=>v(d,h),!1,!0)},c=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:f}=this.getProps();this.panSession=new GB(t,{onSessionStart:a,onStart:o,onMove:s,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:n,contextWindow:qB(this.visualElement),element:this.visualElement.current})}stop(t,r){const n=t||this.latestPointerEvent,i=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&st.postRender(()=>s(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,n){const{drag:i}=this.getProps();if(!n||!sm(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=Uie(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&zl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Fie(n.layoutBox,t):this.constraints=!1,this.elastic=Wie(r),i!==this.constraints&&!zl(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ni(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Vie(n.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!zl(t))return!1;const n=t.current;Qc(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Xre(n,i.root,this.visualElement.getTransformPagePoint());let o=Kie(i.layout.layoutBox,a);if(r){const s=r(qre(o));this.hasMutatedConstraints=!!s,s&&(o=gB(s))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},u=Ni(f=>{if(!sm(f,r,this.currentDirection))return;let d=c&&c[f]||{};(o===!0||o===f)&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,m=N(N({type:"inertia",velocity:n?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},a),d);return this.startAxisValueAnimation(f,m)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return rk(this.visualElement,t),n.start(iE(t,n,0,r,this.visualElement,!1))}stopAnimation(){Ni(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r="_drag".concat(t.toUpperCase()),n=this.visualElement.getProps(),i=n[r];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Ni(r=>{const{drag:n}=this.getProps();if(!sm(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[r],c=a.get()||0;a.set(t[r]-jt(o,s,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!zl(r)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ni(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();i[o]=Hie({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ni(o=>{if(!sm(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];s.set(jt(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qie.set(this.visualElement,this);const t=this.visualElement.current,r=sf(t,"pointerdown",u=>{const{drag:f,dragListener:d=!0}=this.getProps(),h=u.target,p=h!==t&&Nre(h);f&&d&&!p&&this.start(u)});let n;const i=()=>{const{dragConstraints:u}=this.getProps();zl(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),n||(n=Yie(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),st.read(i);const s=Jf(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(Ni(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=u[d].translate,h.set(h.get()+u[d].translate))}),this.visualElement.render())});return()=>{s(),r(),o(),c&&c(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=dk,dragMomentum:s=!0}=t;return I(N({},t),{drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s})}}function iO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Yie(e,t,r){const n=dP(e,iO(r)),i=dP(t,iO(r));return()=>{n(),i()}}function sm(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Xie(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Jie extends Qo{constructor(t){super(t),this.removeGroupControls=Ln,this.removeListeners=Ln,this.controls=new Gie(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ln}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const l0=e=>(t,r)=>{e&&st.update(()=>e(t,r),!1,!0)};class Qie extends Qo{constructor(){super(...arguments),this.removePointerDownListener=Ln}onPointerDown(t){this.session=new GB(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qB(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:l0(t),onStart:l0(r),onMove:l0(n),onEnd:(a,o)=>{delete this.session,i&&st.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=sf(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let c0=!1;class Zie extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:a}=t;a&&(r.group&&r.group.add(a),n&&n.register&&i&&n.register(a),c0&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions(I(N({},a.options),{layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()}))),sg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:i,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,t.layoutDependency!==r&&o.setOptions(I(N({},o.options),{layoutDependency:r})),c0=!0,i||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||st.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:r}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=r,n.root.didUpdate(),lE.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=t;c0=!0,i&&(i.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function XB(e){const[t,r]=LB(),n=w.useContext(HS);return l.jsx(Zie,I(N({},e),{layoutGroup:n,switchLayoutGroup:w.useContext(VB),isPresent:t,safeToRemove:r}))}const eae={pan:{Feature:Qie},drag:{Feature:Jie,ProjectionNode:IB,MeasureLayout:XB}};function aO(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const i="onHover"+r,a=n[i];a&&st.postRender(()=>a(t,op(t)))}class tae extends Qo{mount(){const{current:t}=this.node;t&&(this.unmount=_re(t,(r,n)=>(aO(this.node,n,"Start"),i=>aO(this.node,i,"End"))))}unmount(){}}class rae extends Qo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(r){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=np(Jf(this.node.current,"focus",()=>this.onFocus()),Jf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oO(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const i="onTap"+(r==="End"?"":r),a=n[i];a&&st.postRender(()=>a(t,op(t)))}class nae extends Qo{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:n}=this.node.props;this.unmount=Tre(t,(i,a)=>(oO(this.node,a,"Start"),(o,{success:s})=>oO(this.node,o,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:(n==null?void 0:n.tap)===!1})}unmount(){}}const fk=new WeakMap,u0=new WeakMap,iae=e=>{const t=fk.get(e.target);t&&t(e)},aae=e=>{e.forEach(iae)};function oae(r){var n=r,{root:e}=n,t=Z(n,["root"]);const i=e||document;u0.has(i)||u0.set(i,{});const a=u0.get(i),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(aae,N({root:e},t))),a[o]}function sae(e,t,r){const n=oae(t);return fk.set(e,r),n.observe(e),()=>{fk.delete(e),n.unobserve(e)}}const lae={some:0,all:1};class cae extends Qo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:lae[i]},s=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=f?d:h;p&&p(u)};this.stopObserver=sae(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(uae(t,r))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function uae({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const dae={inView:{Feature:cae},tap:{Feature:nae},focus:{Feature:rae},hover:{Feature:tae}},fae={layout:{ProjectionNode:IB,MeasureLayout:XB}},hae=N(N(N(N({},Die),dae),eae),fae),pe=Pie(hae,Oie),sO=[{to:"/",label:"Ana Sayfa"},{to:"/hakkimizda",label:"Hakkımızda",children:[{to:"/ipek-kabidan",label:"İpek Kabidan Kimdir?"}]},{to:"/egitimler",label:"Eğitimler"},{to:"/blog",label:"Blog"},{to:"/sss",label:"SSS"},{to:"/iletisim",label:"İletişim"}];function pae(){const[e,t]=w.useState(!1),{user:r,isAdmin:n,signOut:i}=Ua(),a=bi();return l.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-border/50",children:[l.jsxs("div",{className:"container-wide mx-auto flex items-center justify-between h-16 md:h-20 px-4 md:px-8",children:[l.jsx(de,{to:"/",className:"font-heading text-xl md:text-2xl font-semibold tracking-tight text-foreground",children:"Mind Soul Academy"}),l.jsx("nav",{className:"hidden lg:flex items-center gap-8",children:sO.map(o=>o.children?l.jsxs("div",{className:"relative group",children:[l.jsxs(de,{to:o.to,className:"text-sm font-medium tracking-wide transition-colors duration-300 flex items-center gap-1 ".concat(a.pathname===o.to||a.pathname.startsWith(o.to+"/")||o.children.some(s=>s.to===a.pathname)?"text-primary":"text-muted-foreground hover:text-foreground"),children:[o.label,l.jsx(Mo,{size:14,className:"transition-transform duration-200 group-hover:rotate-180"})]}),l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200",children:l.jsx("div",{className:"bg-popover border border-border rounded-xl shadow-lg py-2 min-w-[200px]",children:o.children.map(s=>l.jsx(de,{to:s.to,className:"block px-4 py-2.5 text-sm transition-colors ".concat(a.pathname===s.to?"text-primary bg-secondary/50":"text-muted-foreground hover:text-foreground hover:bg-secondary/50"),children:s.label},s.to))})})]},o.to):l.jsx(de,{to:o.to,className:"text-sm font-medium tracking-wide transition-colors duration-300 ".concat(a.pathname===o.to?"text-primary":"text-muted-foreground hover:text-foreground"),children:o.label},o.to))}),l.jsx("div",{className:"hidden lg:flex items-center gap-4",children:r?l.jsxs(l.Fragment,{children:[n&&l.jsxs(de,{to:"/admin",className:"btn-ghost flex items-center gap-2 text-sm text-primary",children:[l.jsx(Iz,{size:16})," Admin"]}),l.jsxs(de,{to:"/panel",className:"btn-ghost flex items-center gap-2 text-sm",children:[l.jsx(Do,{size:16}),"Panelim"]}),l.jsx("button",{onClick:i,className:"btn-outline text-xs px-6 py-2",children:"Çıkış Yap"})]}):l.jsxs(l.Fragment,{children:[l.jsx(de,{to:"/giris",className:"btn-ghost text-sm",children:"Giriş Yap"}),l.jsx(de,{to:"/kayit",className:"btn-primary text-xs px-6 py-2.5",children:"Kayıt Ol"})]})}),l.jsx("button",{onClick:()=>t(!e),className:"lg:hidden p-2 text-foreground",children:e?l.jsx(yn,{size:24}):l.jsx(x7,{size:24})})]}),l.jsx(gE,{children:e&&l.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"lg:hidden bg-background border-b border-border",children:l.jsxs("nav",{className:"flex flex-col gap-1 px-4 py-4",children:[sO.map(o=>{var s;return l.jsxs("div",{children:[l.jsx(de,{to:o.to,onClick:()=>t(!1),className:"py-3 px-4 rounded-lg text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors block",children:o.label}),(s=o.children)==null?void 0:s.map(c=>l.jsx(de,{to:c.to,onClick:()=>t(!1),className:"py-2.5 px-4 pl-8 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors block",children:c.label},c.to))]},o.to)}),l.jsx("div",{className:"border-t border-border mt-2 pt-4 flex flex-col gap-2",children:r?l.jsxs(l.Fragment,{children:[l.jsx(de,{to:"/panel",onClick:()=>t(!1),className:"btn-ghost text-sm text-center",children:"Panelim"}),l.jsx("button",{onClick:()=>{i(),t(!1)},className:"btn-outline text-sm",children:"Çıkış Yap"})]}):l.jsxs(l.Fragment,{children:[l.jsx(de,{to:"/giris",onClick:()=>t(!1),className:"btn-ghost text-sm text-center",children:"Giriş Yap"}),l.jsx(de,{to:"/kayit",onClick:()=>t(!1),className:"btn-primary text-sm text-center",children:"Kayıt Ol"})]})})]})})})]})}function mae(){return l.jsx("footer",{className:"bg-foreground text-background",children:l.jsxs("div",{className:"container-wide mx-auto section-padding",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-16",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-heading text-2xl font-semibold mb-4",children:"Mind Soul Academy"}),l.jsx("p",{className:"text-background/60 text-sm leading-relaxed mb-6",children:"Meditasyon, farkındalık ve kişisel dönüşüm odaklı ses temelli eğitimlerle içsel yolculuğunuza rehberlik ediyoruz."}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("a",{href:"https://www.instagram.com/mindsoul.academy/",target:"_blank",rel:"noopener noreferrer",className:"w-9 h-9 rounded-lg bg-background/10 flex items-center justify-center text-background/60 hover:text-background hover:bg-background/20 transition-colors","aria-label":"Instagram",children:l.jsx(Dz,{size:16})}),l.jsx("a",{href:"https://wa.me/905488432337",target:"_blank",rel:"noopener noreferrer",className:"w-9 h-9 rounded-lg bg-background/10 flex items-center justify-center text-background/60 hover:text-background hover:bg-background/20 transition-colors","aria-label":"WhatsApp",children:l.jsx(xS,{size:16})}),l.jsx("a",{href:"mailto:mindsoulacademy@outlook.com",className:"w-9 h-9 rounded-lg bg-background/10 flex items-center justify-center text-background/60 hover:text-background hover:bg-background/20 transition-colors","aria-label":"E-posta",children:l.jsx(Yc,{size:16})})]})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"font-heading text-lg font-medium mb-4",children:"Sayfalar"}),l.jsxs("nav",{className:"flex flex-col gap-2",children:[l.jsx(de,{to:"/",className:"text-sm text-background/60 hover:text-background transition-colors",children:"Ana Sayfa"}),l.jsx(de,{to:"/hakkimizda",className:"text-sm text-background/60 hover:text-background transition-colors",children:"Hakkımızda"}),l.jsx(de,{to:"/egitimler",className:"text-sm text-background/60 hover:text-background transition-colors",children:"Eğitimler"}),l.jsx(de,{to:"/blog",className:"text-sm text-background/60 hover:text-background transition-colors",children:"Blog"}),l.jsx(de,{to:"/sss",className:"text-sm text-background/60 hover:text-background transition-colors",children:"SSS"})]})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"font-heading text-lg font-medium mb-4",children:"Destek"}),l.jsxs("nav",{className:"flex flex-col gap-2",children:[l.jsx(de,{to:"/iletisim",className:"text-sm text-background/60 hover:text-background transition-colors",children:"İletişim"}),l.jsx(de,{to:"/sss",className:"text-sm text-background/60 hover:text-background transition-colors",children:"Sık Sorulan Sorular"}),l.jsx(de,{to:"/ipek-kabidan",className:"text-sm text-background/60 hover:text-background transition-colors",children:"İpek Kabidan"})]})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"font-heading text-lg font-medium mb-4",children:"İletişim"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("a",{href:"mailto:mindsoulacademy@outlook.com",className:"text-sm text-background/60 hover:text-background transition-colors block",children:"mindsoulacademy@outlook.com"}),l.jsx("a",{href:"tel:+905488432337",className:"text-sm text-background/60 hover:text-background transition-colors block",children:"+90 548 843 23 37"}),l.jsx("p",{className:"text-sm text-background/60",children:"Saziye Maltizlar Sk, Lefkoşa"})]})]})]}),l.jsxs("div",{className:"border-t border-background/10 pt-8 text-center space-y-2",children:[l.jsxs("p",{className:"text-sm text-background/40",children:["© ",new Date().getFullYear()," Mind Soul Academy. Tüm hakları saklıdır."]}),l.jsxs("p",{className:"text-xs text-background/30",children:["Bu site"," ",l.jsx("a",{href:"https://adabrand.com",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-background/50 transition-colors",children:"Adabrand"})," ","tarafından geliştirilmiş ve bakımı yapılmaktadır."]})]})]})})}function gae(){const{pathname:e}=bi();return w.useEffect(()=>{window.scrollTo(0,0)},[e]),null}function yae(){const{user:e,emailVerified:t}=Ua(),[r,n]=w.useState(!1),[i,a]=w.useState(!1);if(!e||t||r)return null;const o=()=>T(this,null,function*(){a(!0);try{const{error:s}=yield Q.functions.invoke("send-verification-email");if(s)throw s;ee.success("Doğrulama e-postası gönderildi!")}catch(s){ee.error("Doğrulama e-postası gönderilemedi.")}a(!1)});return l.jsx("div",{className:"fixed top-20 left-0 right-0 z-40 bg-amber-500/95 backdrop-blur-sm text-white px-4 py-3",children:l.jsxs("div",{className:"container-wide mx-auto flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(Yc,{size:16}),l.jsx("span",{children:"E-posta adresiniz henüz doğrulanmadı."}),l.jsx("button",{onClick:o,disabled:i,className:"underline font-medium hover:no-underline disabled:opacity-50",children:i?"Gönderiliyor...":"Doğrulama e-postası gönder"})]}),l.jsx("button",{onClick:()=>n(!0),className:"shrink-0 hover:opacity-70 transition-opacity",children:l.jsx(yn,{size:16})})]})})}const vae="https://mindsoulacademy.life",xae="https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/ab79d742-4cbc-49b8-93fc-4c0e3d43e9e7/id-preview-453135da--ac20b82f-cd66-42af-9c68-114a041e96fe.lovable.app-1772878691280.png";function ct({title:e,description:t,canonical:r,ogImage:n,noIndex:i=!1,schemaJson:a}){const o=e.includes("Mind Soul Academy")?e:"".concat(e," | Mind Soul Academy"),s=r.startsWith("http")?r:"".concat(vae).concat(r),c=n||xae,u=a?Array.isArray(a)?a:[a]:[];return l.jsxs(ez,{children:[l.jsx("title",{children:o}),l.jsx("meta",{name:"description",content:t}),l.jsx("link",{rel:"canonical",href:s}),i&&l.jsx("meta",{name:"robots",content:"noindex, nofollow"}),l.jsx("meta",{property:"og:type",content:"website"}),l.jsx("meta",{property:"og:title",content:o}),l.jsx("meta",{property:"og:description",content:t}),l.jsx("meta",{property:"og:url",content:s}),l.jsx("meta",{property:"og:image",content:c}),l.jsx("meta",{property:"og:locale",content:"tr_TR"}),l.jsx("meta",{property:"og:site_name",content:"Mind Soul Academy"}),l.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),l.jsx("meta",{name:"twitter:title",content:o}),l.jsx("meta",{name:"twitter:description",content:t}),l.jsx("meta",{name:"twitter:image",content:c}),u.map((f,d)=>l.jsx("script",{type:"application/ld+json",children:JSON.stringify(f)},d))]})}const bae="/assets/hero-bg-uBTmKC45.jpg",hk="/assets/about-image-ZZjZ5shQ.jpg",wae="/assets/course-1-DV0iI9yZ.jpg",kae="/assets/course-2-CAU-JP2_.jpg",_ae="/assets/course-3-CV-mNjBi.jpg",pk=[wae,kae,_ae];function JB(e){let t=0;for(const r of e){if(!r.duration)continue;const n=r.duration.match(/(\d+)\s*(dk|min|saat|hr|h)/i);if(n){const i=parseInt(n[1],10),a=n[2].toLowerCase();t+=a==="saat"||a==="hr"||a==="h"?i*60:i}else{const i=parseInt(r.duration,10);isNaN(i)||(t+=i)}}if(t>=60){const r=Math.floor(t/60),n=t%60;return n>0?"".concat(r," saat ").concat(n," dk"):"".concat(r," saat")}return"".concat(t," dk")}function dl(e){var r;const t=(r=e==null?void 0:e.adminMode)!=null?r:!1;return ul({queryKey:["courses",t?"admin":"public"],queryFn:()=>T(this,null,function*(){const n=t?yield Q.from("courses").select("*").order("created_at",{ascending:!1}):yield Q.rpc("get_public_courses"),{data:i,error:a}=n;if(a)throw a;const{data:o}=yield Q.from("lessons").select("*").order("order",{ascending:!0});return(i||[]).map((s,c)=>{const u=(o||[]).filter(f=>f.course_id===s.id);return I(N({},s),{cover_image:s.cover_image||pk[c%pk.length],lessons:u,total_duration:JB(u)})})})})}function jae(e){return ul({queryKey:["course",e],queryFn:()=>T(this,null,function*(){var o;if(!e)return null;const{data:t,error:r}=yield Q.rpc("get_public_course_by_slug",{_slug:e});if(r)throw r;const n=(o=t==null?void 0:t[0])!=null?o:null;if(!n)return null;const{data:i}=yield Q.from("lessons").select("*").eq("course_id",n.id).order("order",{ascending:!0}),a=i||[];return I(N({},n),{cover_image:n.cover_image||pk[0],lessons:a,total_duration:JB(a)})}),enabled:!!e,retry:1})}function Sae(e,t){return ul({queryKey:["course-sensitive",e],queryFn:()=>T(this,null,function*(){if(!e)return null;const{data:r,error:n}=yield Q.from("courses").select("zoom_link, zoom_meeting_id, zoom_password, replay_video_url").eq("id",e).single();return n?null:r}),enabled:!!e&&t})}function sp(){return ul({queryKey:["categories"],queryFn:()=>T(this,null,function*(){const{data:e,error:t}=yield Q.from("categories").select("*").order("name");if(t)throw t;return e})})}const Eae={online_course:{label:"Online Eğitim",className:"bg-primary/10 text-primary",icon:$f},live_online:{label:"Canlı Online",className:"bg-blue-500/10 text-blue-600",icon:s1},face_to_face:{label:"Yüz Yüze",className:"bg-orange-500/10 text-orange-600",icon:$i},camp:{label:"Kamp",className:"bg-emerald-500/10 text-emerald-600",icon:Bi}};function d0(e){return e?new Date(e).toLocaleDateString("tr-TR",{day:"numeric",month:"long"}):""}function Nae(e){return e?e.slice(0,5):""}function tx({course:e,index:t=0}){const{data:r=[]}=sp(),n=r.find(f=>f.id===e.category_id),i=(n==null?void 0:n.name)||"Eğitim",a=e.course_type||"online_course",o=Eae[a],s=o.icon,[c,u]=w.useState(null);return w.useEffect(()=>{a==="camp"&&Q.from("camp_packages").select("price, currency, discounted_price, discount_end_date").eq("course_id",e.id).order("price",{ascending:!0}).then(({data:f})=>{if(f&&f.length>0){const d=new Date,h=f.map(g=>{const v=g.discounted_price&&g.discounted_price>0&&(!g.discount_end_date||new Date(g.discount_end_date+"T23:59:59")>=d);return Number(v?g.discounted_price:g.price)}),p=f.map(g=>Number(g.price)),m=f.some(g=>g.discounted_price&&g.discounted_price>0&&(!g.discount_end_date||new Date(g.discount_end_date+"T23:59:59")>=d));u({min:Math.min(...h),max:Math.max(...h),originalMin:Math.min(...p),originalMax:Math.max(...p),hasDiscount:m,currency:f[0].currency})}})},[a,e.id]),l.jsx(pe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:t*.15},viewport:{once:!0},children:l.jsxs(de,{to:"/egitim/".concat(e.slug),className:"card-premium block group",children:[l.jsxs("div",{className:"aspect-[4/3] overflow-hidden relative",children:[l.jsx("img",{src:e.cover_image,alt:e.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),l.jsxs("div",{className:"absolute top-3 left-3 flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium backdrop-blur-sm ".concat(o.className),children:[l.jsx(s,{size:12}),o.label]})]}),l.jsxs("div",{className:"p-6",children:[l.jsx(de,{to:n?"/kategori/".concat(n.slug):"/egitimler",onClick:f=>f.stopPropagation(),className:"badge-category mb-3 hover:opacity-80 transition-opacity",children:i}),l.jsx("h3",{className:"heading-card text-foreground mt-2 mb-2 group-hover:text-primary transition-colors duration-300",children:e.title}),l.jsx("div",{className:"text-small text-muted-foreground mb-4 line-clamp-2 [&_a]:text-muted-foreground [&_a]:no-underline [&_a]:pointer-events-none",dangerouslySetInnerHTML:{__html:e.short_description||""}}),l.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border",children:[l.jsxs("div",{className:"flex items-center gap-4 text-muted-foreground",children:[a==="online_course"&&l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(Ta,{size:14}),e.total_duration]}),l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx($f,{size:14}),e.lessons.length," ders"]})]}),a==="live_online"&&l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(Bi,{size:14}),d0(e.event_date)]}),e.start_time&&l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(Ta,{size:14}),Nae(e.start_time)]})]}),a==="face_to_face"&&l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(Bi,{size:14}),d0(e.event_date)]}),e.city&&l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx($i,{size:14}),e.city]})]}),a==="camp"&&l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx(Bi,{size:14}),d0(e.event_date)]}),e.city&&l.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[l.jsx($i,{size:14}),e.city]})]})]}),l.jsx("div",{className:"flex items-center gap-2",children:a==="camp"&&c?l.jsxs("span",{className:"font-heading text-xl font-semibold text-foreground",children:[c.currency==="USD"?"$":c.currency==="EUR"?"€":c.currency==="GBP"?"£":"₺",c.min===c.max?c.min:"".concat(c.min," – ").concat(c.max)]}):l.jsx("span",{className:"font-heading text-xl font-semibold text-foreground",children:(n==null?void 0:n.payment_type)==="subscription"&&(e.subscription_monthly_price||0)>0?"₺".concat(e.subscription_monthly_price,"/ay"):(n==null?void 0:n.payment_type)==="subscription"?"₺".concat(n.subscription_monthly_price||0,"/ay"):(n==null?void 0:n.payment_type)==="free"?"Ücretsiz":"₺".concat(e.price)})})]})]})]})})}const Cae=[{name:"Elif Y.",text:"Mind Soul Academy sayesinde her sabah meditasyonla güne başlıyorum. İç huzurumu bulmamda büyük bir yol arkadaşı oldu.",role:"Meditasyon Öğrencisi"},{name:"Mehmet K.",text:"Ses kayıtları çok profesyonel ve sakinleştirici. Stresli iş günlerinin ardından bu eğitimler bana nefes aldırıyor.",role:"İş İnsanı"},{name:"Ayşe D.",text:"Kişisel gelişim yolculuğumda Mind Soul Academy'nin eğitimleri dönüm noktası oldu. Herkese tavsiye ederim.",role:"Yaşam Koçu"}],mk=[{question:"Eğitimlere nasıl erişirim?",answer:"Satın alma işleminizi tamamladıktan sonra, eğitim içeriklerine kullanıcı panelinizden anında erişebilirsiniz. Ses kayıtlarını dilediğiniz zaman dinleyebilirsiniz."},{question:"Satın aldıktan sonra içerikler nerede görünür?",answer:"Satın aldığınız tüm eğitimler, hesabınıza giriş yaptıktan sonra 'Satın Aldığım Eğitimler' bölümünde listelenir."},{question:"Eğitimler ne formatta sunuluyor?",answer:"Eğitimlerimiz ses kaydı (audio) formatında sunulmaktadır. Her eğitim, birden fazla ses dersi içerir ve platform üzerinden dinlenebilir."},{question:"Ses kayıtlarını telefonumdan dinleyebilir miyim?",answer:"Evet, platformumuz tamamen mobil uyumludur. Telefonunuzun tarayıcısından giriş yaparak tüm ses kayıtlarını dinleyebilirsiniz."},{question:"Satın aldığım eğitimlere tekrar erişebilir miyim?",answer:"Evet, satın aldığınız eğitimlere sınırsız erişim hakkına sahipsiniz. Dilediğiniz kadar tekrar dinleyebilirsiniz."}];function xE(e){var r;const t=(r=e==null?void 0:e.adminMode)!=null?r:!1;return ul({queryKey:["blog-posts",t?"admin":"public"],queryFn:()=>T(this,null,function*(){if(t){const{data:a,error:o}=yield Q.from("blog_posts").select("*").order("created_at",{ascending:!1});if(o)throw o;return a||[]}const{data:n,error:i}=yield Q.rpc("get_published_blog_posts");if(i)throw i;return n||[]})})}function Tae(e){return ul({queryKey:["blog-post",e],queryFn:()=>T(this,null,function*(){if(!e)return{post:null,redirectTo:null};const{data:t,error:r}=yield Q.rpc("get_published_blog_post_by_slug",{_slug:e});if(r)throw r;const n=t||[];if(n.length>0)return{post:n[0],redirectTo:null};const{data:i}=yield Q.rpc("get_blog_slug_redirect",{_old_slug:e});return{post:null,redirectTo:i||null}}),enabled:!!e})}var rx="Collapsible",[Aae,QB]=La(rx),[Pae,bE]=Aae(rx),ZB=w.forwardRef((e,t)=>{const f=e,{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:o}=f,s=Z(f,["__scopeCollapsible","open","defaultOpen","disabled","onOpenChange"]),[c,u]=Qh({prop:n,defaultProp:i!=null?i:!1,onChange:o,caller:rx});return l.jsx(Pae,{scope:r,disabled:a,contentId:Zd(),open:c,onOpenToggle:w.useCallback(()=>u(d=>!d),[u]),children:l.jsx(ut.div,I(N({"data-state":kE(c),"data-disabled":a?"":void 0},s),{ref:t}))})});ZB.displayName=rx;var e5="CollapsibleTrigger",t5=w.forwardRef((e,t)=>{const a=e,{__scopeCollapsible:r}=a,n=Z(a,["__scopeCollapsible"]),i=bE(e5,r);return l.jsx(ut.button,I(N({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":kE(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n),{ref:t,onClick:ot(e.onClick,i.onOpenToggle)}))});t5.displayName=e5;var wE="CollapsibleContent",r5=w.forwardRef((e,t)=>{const a=e,{forceMount:r}=a,n=Z(a,["forceMount"]),i=bE(wE,e.__scopeCollapsible);return l.jsx(cl,{present:r||i.open,children:({present:o})=>l.jsx(Oae,I(N({},n),{ref:t,present:o}))})});r5.displayName=wE;var Oae=w.forwardRef((e,t)=>{const b=e,{__scopeCollapsible:r,present:n,children:i}=b,a=Z(b,["__scopeCollapsible","present","children"]),o=bE(wE,r),[s,c]=w.useState(n),u=w.useRef(null),f=ir(t,u),d=w.useRef(0),h=d.current,p=w.useRef(0),m=p.current,g=o.open||s,v=w.useRef(g),x=w.useRef(void 0);return w.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Ji(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const j=y.getBoundingClientRect();d.current=j.height,p.current=j.width,v.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),c(n)}},[o.open,n]),l.jsx(ut.div,I(N({"data-state":kE(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g},a),{ref:f,style:N({"--radix-collapsible-content-height":h?"".concat(h,"px"):void 0,"--radix-collapsible-content-width":m?"".concat(m,"px"):void 0},e.style),children:g&&i}))});function kE(e){return e?"open":"closed"}var Rae=ZB,$ae=t5,Mae=r5,Dae=w.createContext(void 0);function Iae(e){const t=w.useContext(Dae);return e||t||"ltr"}var wi="Accordion",Lae=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_E,zae,Bae]=iz(wi),[nx,LIe]=La(wi,[Bae,QB]),jE=QB(),n5=$.forwardRef((e,t)=>{const o=e,{type:r}=o,n=Z(o,["type"]),i=n,a=n;return l.jsx(_E.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?l.jsx(Hae,I(N({},a),{ref:t})):l.jsx(Kae,I(N({},i),{ref:t}))})});n5.displayName=wi;var[i5,Uae]=nx(wi),[a5,Fae]=nx(wi,{collapsible:!1}),Kae=$.forwardRef((e,t)=>{const u=e,{value:r,defaultValue:n,onValueChange:i=()=>{},collapsible:a=!1}=u,o=Z(u,["value","defaultValue","onValueChange","collapsible"]),[s,c]=Qh({prop:r,defaultProp:n!=null?n:"",onChange:i,caller:wi});return l.jsx(i5,{scope:e.__scopeAccordion,value:$.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:$.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(a5,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(o5,I(N({},o),{ref:t}))})})}),Hae=$.forwardRef((e,t)=>{const f=e,{value:r,defaultValue:n,onValueChange:i=()=>{}}=f,a=Z(f,["value","defaultValue","onValueChange"]),[o,s]=Qh({prop:r,defaultProp:n!=null?n:[],onChange:i,caller:wi}),c=$.useCallback(d=>s((h=[])=>[...h,d]),[s]),u=$.useCallback(d=>s((h=[])=>h.filter(p=>p!==d)),[s]);return l.jsx(i5,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(a5,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(o5,I(N({},a),{ref:t}))})})}),[Vae,ix]=nx(wi),o5=$.forwardRef((e,t)=>{const p=e,{__scopeAccordion:r,disabled:n,dir:i,orientation:a="vertical"}=p,o=Z(p,["__scopeAccordion","disabled","dir","orientation"]),s=$.useRef(null),c=ir(s,t),u=zae(r),d=Iae(i)==="ltr",h=ot(e.onKeyDown,m=>{var C;if(!Lae.includes(m.key))return;const g=m.target,v=u().filter(R=>{var M;return!((M=R.ref.current)!=null&&M.disabled)}),x=v.findIndex(R=>R.ref.current===g),b=v.length;if(x===-1)return;m.preventDefault();let y=x;const j=0,k=b-1,_=()=>{y=x+1,y>k&&(y=j)},S=()=>{y=x-1,y<j&&(y=k)};switch(m.key){case"Home":y=j;break;case"End":y=k;break;case"ArrowRight":a==="horizontal"&&(d?_():S());break;case"ArrowDown":a==="vertical"&&_();break;case"ArrowLeft":a==="horizontal"&&(d?S():_());break;case"ArrowUp":a==="vertical"&&S();break}const E=y%b;(C=v[E].ref.current)==null||C.focus()});return l.jsx(Vae,{scope:r,disabled:n,direction:i,orientation:a,children:l.jsx(_E.Slot,{scope:r,children:l.jsx(ut.div,I(N({},o),{"data-orientation":a,ref:c,onKeyDown:n?void 0:h}))})})}),iy="AccordionItem",[Wae,SE]=nx(iy),s5=$.forwardRef((e,t)=>{const d=e,{__scopeAccordion:r,value:n}=d,i=Z(d,["__scopeAccordion","value"]),a=ix(iy,r),o=Uae(iy,r),s=jE(r),c=Zd(),u=n&&o.value.includes(n)||!1,f=a.disabled||e.disabled;return l.jsx(Wae,{scope:r,open:u,disabled:f,triggerId:c,children:l.jsx(Rae,I(N(N({"data-orientation":a.orientation,"data-state":h5(u)},s),i),{ref:t,disabled:f,open:u,onOpenChange:h=>{h?o.onItemOpen(n):o.onItemClose(n)}}))})});s5.displayName=iy;var l5="AccordionHeader",c5=$.forwardRef((e,t)=>{const o=e,{__scopeAccordion:r}=o,n=Z(o,["__scopeAccordion"]),i=ix(wi,r),a=SE(l5,r);return l.jsx(ut.h3,I(N({"data-orientation":i.orientation,"data-state":h5(a.open),"data-disabled":a.disabled?"":void 0},n),{ref:t}))});c5.displayName=l5;var gk="AccordionTrigger",u5=$.forwardRef((e,t)=>{const c=e,{__scopeAccordion:r}=c,n=Z(c,["__scopeAccordion"]),i=ix(wi,r),a=SE(gk,r),o=Fae(gk,r),s=jE(r);return l.jsx(_E.ItemSlot,{scope:r,children:l.jsx($ae,I(N(N({"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId},s),n),{ref:t}))})});u5.displayName=gk;var d5="AccordionContent",f5=$.forwardRef((e,t)=>{const s=e,{__scopeAccordion:r}=s,n=Z(s,["__scopeAccordion"]),i=ix(wi,r),a=SE(d5,r),o=jE(r);return l.jsx(Mae,I(N(N({role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation},o),n),{ref:t,style:N({"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)"},e.style)}))});f5.displayName=d5;function h5(e){return e?"open":"closed"}var qae=n5,Gae=s5,Yae=c5,p5=u5,m5=f5;const g5=qae,EE=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(Gae,N({ref:r,className:Et("border-b",e)},t))});EE.displayName="AccordionItem";const NE=w.forwardRef((i,n)=>{var a=i,{className:e,children:t}=a,r=Z(a,["className","children"]);return l.jsx(Yae,{className:"flex",children:l.jsxs(p5,I(N({ref:n,className:Et("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e)},r),{children:[t,l.jsx(Mo,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]}))})});NE.displayName=p5.displayName;const CE=w.forwardRef((i,n)=>{var a=i,{className:e,children:t}=a,r=Z(a,["className","children"]);return l.jsx(m5,I(N({ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"},r),{children:l.jsx("div",{className:Et("pb-4 pt-0",e),children:t})}))});CE.displayName=m5.displayName;const Xae={initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7}},Jae=[{title:"Çocukla Kıbrıs Tatili",description:"Çocukla Kıbrıs tatili planlayan aileler için hem ebeveyn hem çocuk odaklı özel bir deneyim.",href:"/cocukla-kibris-tatili",image:"/images/cocukla-kibris-tatili-aile-deneyimi.webp"},{title:"İnziva Kampı Kıbrıs",description:"İnziva kampı arayanlar için Kıbrıs'ta özel bir deneyim. Hem kendine alan aç hem çocuğunla birlikte katıl.",href:"/inziva-kampi-kibris",image:"/images/inziva-kampi-kibris-farkindalik-deneyimi.webp"},{title:"Kıbrıs Etkinlik Önerisi",description:"Kıbrıs etkinlik arayanlar için ailece katılabileceğiniz özel bir deneyim.",href:"/kibris-etkinlik",image:"/images/kibris-etkinlik-aile-ve-farkindalik-programi.webp"},{title:"Maldives Homes Kıbrıs",description:"Maldives Homes Kıbrıs Esentepe'de hem kendin hem çocuğun için özel bir deneyim.",href:"/maldives-homes-kibris",image:"/images/maldives-homes-kibris-esentepe-bi-mola.webp"}];function Qae(){return l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsxs(pe.div,I(N({},Xae),{className:"text-center mb-12",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Keşfedin"}),l.jsx("h2",{className:"heading-section text-foreground mb-4",children:"Öne Çıkan Yazılar"}),l.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:"Kıbrıs'ta kendinize ve ailenize özel deneyimler hakkında yazılarımızı keşfedin."})]})),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:Jae.map((e,t)=>l.jsx(pe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:t*.1},viewport:{once:!0},children:l.jsxs(de,{to:e.href,className:"group block rounded-2xl overflow-hidden border border-border bg-card hover:shadow-lg transition-all duration-300 h-full",children:[l.jsx("div",{className:"aspect-video overflow-hidden bg-muted",children:e.image?l.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}):l.jsx("div",{className:"w-full h-full flex items-center justify-center bg-gradient-to-br from-primary/10 to-primary/5",children:l.jsx("span",{className:"text-primary/40 text-sm font-medium",children:"Kapak Fotoğrafı"})})}),l.jsxs("div",{className:"p-5",children:[l.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2 group-hover:text-primary transition-colors",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-3",children:e.description}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-primary text-sm font-medium group-hover:gap-2 transition-all duration-300",children:["Devamını Oku ",l.jsx(gc,{size:14})]})]})]})},e.href))})]})})}const kn={initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7}};function Zae(){const{user:e}=Ua(),{data:t=[]}=dl(),{data:r=[]}=xE(),n=t.filter(o=>o.featured&&o.published),i=r.slice(0,3),a=[{"@context":"https://schema.org","@type":"Organization",name:"Mind Soul Academy",url:"https://mindsoulacademy.life",logo:"https://mindsoulacademy.life/placeholder.svg",description:"Meditasyon, ses kayıtları ve kişisel gelişim odaklı eğitimler sunan dijital eğitim platformu.",address:{"@type":"PostalAddress",addressLocality:"Lefkoşa",addressCountry:"CY"},sameAs:["https://www.instagram.com/mindsoul.academy/"]},{"@context":"https://schema.org","@type":"WebSite",name:"Mind Soul Academy",url:"https://mindsoulacademy.life"}];return l.jsxs("main",{children:[l.jsx(ct,{title:"Meditasyon ve Kişisel Gelişim Eğitimleri",description:"Meditasyon, ses kayıtları ve kişisel gelişim odaklı eğitimlerle kendinize alan açın. Mind Soul Academy ile içsel yolculuğunuza bugün başlayın.",canonical:"/",schemaJson:a}),l.jsxs("section",{className:"relative min-h-screen flex items-center",children:[l.jsxs("div",{className:"absolute inset-0",children:[l.jsx("img",{src:bae,alt:"",className:"w-full h-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-background/95 via-background/80 to-background/40"})]}),l.jsx("div",{className:"relative container-wide mx-auto px-4 md:px-8 pt-20",children:l.jsxs(pe.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:1,delay:.2},className:"max-w-2xl",children:[l.jsx("span",{className:"badge-category mb-6 inline-block",children:"Mind Soul Academy"}),l.jsxs("h1",{className:"heading-hero text-foreground mb-6",children:["İçsel Yolculuğunuza",l.jsx("br",{}),"Bugün Başlayın"]}),l.jsx("p",{className:"text-body text-muted-foreground mb-10 max-w-lg",children:"Meditasyon, ses kayıtları ve kişisel gelişim odaklı eğitimlerle kendinize alan açın. Zihninizi sakinleştiren ve yaşamınıza denge katan bir deneyim sizi bekliyor."}),l.jsxs("div",{className:"flex flex-wrap gap-4",children:[l.jsx(de,{to:"/egitimler",className:"btn-primary",children:"Eğitimleri Keşfet"}),l.jsx(de,{to:e?"/egitimler":"/kayit",className:"btn-outline",children:"Hemen Başla"})]})]})})]}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsxs(pe.div,I(N({},kn),{className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Bireysel Eğitimler"}),l.jsx("h2",{className:"heading-section text-foreground mb-4",children:"Öne Çıkan Eğitimler"}),l.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:"Meditasyon ve kişisel gelişim yolculuğunuza başlamak için en çok tercih edilen eğitimlerimiz."})]})),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:n.map((o,s)=>l.jsx(tx,{course:o,index:s},o.id))}),l.jsx(pe.div,I(N({},kn),{className:"text-center mt-12",children:l.jsx(de,{to:"/egitimler",className:"btn-outline",children:"Tüm Eğitimleri Gör"})}))]})}),l.jsx("section",{className:"section-padding",children:l.jsx("div",{className:"container-wide mx-auto",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[l.jsxs(pe.div,I(N({},kn),{children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Hakkımızda"}),l.jsx("h2",{className:"heading-section text-foreground mb-6",children:"Ruhunuza İyi Gelecek Bir Yolculuk"}),l.jsx("p",{className:"text-body text-muted-foreground mb-6",children:"Mind Soul Academy, meditasyon ve kişisel gelişim alanında ses temelli dijital eğitimler sunan bir platformdur. İç huzurunuzu bulmanıza, farkındalığınızı artırmanıza ve yaşamınıza denge katmanıza yardımcı olmayı amaçlıyoruz."}),l.jsx("p",{className:"text-body text-muted-foreground mb-8",children:"Her bir eğitimimiz, alanında uzman eğitmenler tarafından özenle hazırlanmış ses kayıtlarından oluşmaktadır. Dilediğiniz zaman, dilediğiniz yerde kendinize zaman ayırabilirsiniz."}),l.jsxs(de,{to:"/hakkimizda",className:"inline-flex items-center gap-2 text-primary font-medium text-sm hover:gap-3 transition-all duration-300",children:["Daha Fazla Bilgi ",l.jsx(gc,{size:16})]})]})),l.jsx(pe.div,I(N({},kn),{transition:{duration:.7,delay:.2},children:l.jsx("div",{className:"rounded-3xl overflow-hidden shadow-lg",children:l.jsx("img",{src:hk,alt:"Mind Soul Academy",className:"w-full h-full object-cover"})})}))]})})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-narrow mx-auto text-center",children:[l.jsxs(pe.div,I(N({},kn),{children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Deneyimler"}),l.jsx("h2",{className:"heading-section text-foreground mb-16",children:"Öğrencilerimizden"})]})),l.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:Cae.map((o,s)=>l.jsxs(pe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.6,delay:s*.15},viewport:{once:!0},className:"p-8 rounded-2xl bg-background text-left",children:[l.jsxs("p",{className:"text-body text-muted-foreground mb-6 italic",children:['"',o.text,'"']}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-foreground",children:o.name}),l.jsx("p",{className:"text-xs text-muted-foreground",children:o.role})]})]},s))})]})}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsxs(pe.div,I(N({},kn),{className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Yardım"}),l.jsx("h2",{className:"heading-section text-foreground",children:"Sık Sorulan Sorular"})]})),l.jsx(pe.div,I(N({},kn),{children:l.jsx(g5,{type:"single",collapsible:!0,className:"space-y-3",children:mk.slice(0,3).map((o,s)=>l.jsxs(EE,{value:"faq-".concat(s),className:"border border-border rounded-xl px-6 data-[state=open]:bg-secondary/30",children:[l.jsx(NE,{className:"text-left font-heading text-lg font-medium py-5 hover:no-underline",children:o.question}),l.jsx(CE,{className:"text-muted-foreground text-body pb-5",children:o.answer})]},s))})})),l.jsx(pe.div,I(N({},kn),{className:"text-center mt-8",children:l.jsxs(de,{to:"/sss",className:"inline-flex items-center gap-2 text-primary font-medium text-sm hover:gap-3 transition-all duration-300",children:["Tüm Soruları Gör ",l.jsx(gc,{size:16})]})}))]})}),l.jsx(Qae,{}),i.length>0&&l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsxs(pe.div,I(N({},kn),{className:"text-center mb-12",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Blog"}),l.jsx("h2",{className:"heading-section text-foreground mb-4",children:"Son Yazılar"})]})),l.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:i.map((o,s)=>l.jsx(pe.div,I(N({},kn),{transition:{duration:.5,delay:s*.1},children:l.jsxs(de,{to:"/blog/".concat(o.slug),className:"group block rounded-2xl overflow-hidden border border-border bg-card hover:shadow-lg transition-all duration-300",children:[o.cover_image&&l.jsx("div",{className:"aspect-video overflow-hidden",children:l.jsx("img",{src:o.cover_image,alt:o.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),l.jsxs("div",{className:"p-5",children:[l.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mb-2 group-hover:text-primary transition-colors",children:o.title}),o.excerpt&&l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:o.excerpt})]})]})}),o.id))}),l.jsx(pe.div,I(N({},kn),{className:"text-center mt-8",children:l.jsxs(de,{to:"/blog",className:"inline-flex items-center gap-2 text-primary font-medium text-sm hover:gap-3 transition-all duration-300",children:["Tüm Yazıları Gör ",l.jsx(gc,{size:16})]})}))]})}),l.jsx("section",{className:"section-padding bg-primary",children:l.jsx("div",{className:"container-narrow mx-auto text-center",children:l.jsxs(pe.div,I(N({},kn),{children:[l.jsx("h2",{className:"heading-section text-primary-foreground mb-6",children:"Kendinize Zaman Ayırın"}),l.jsx("p",{className:"text-body text-primary-foreground/80 mb-10 max-w-lg mx-auto",children:"İçsel huzurunuzu bulmak ve kişisel dönüşümünüzü başlatmak için ilk adımı atın."}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[l.jsx(de,{to:"/egitimler",className:"bg-background text-foreground px-8 py-3 rounded-full text-sm font-medium tracking-wide uppercase transition-all duration-300 hover:shadow-lg",children:"Eğitimleri Keşfet"}),l.jsx(de,{to:"/kayit",className:"border border-primary-foreground/30 text-primary-foreground px-8 py-3 rounded-full text-sm font-medium tracking-wide uppercase transition-all duration-300 hover:bg-primary-foreground/10",children:"Ücretsiz Kayıt Ol"})]})]}))})})]})}function eoe({data:e}){return l.jsx(ez,{children:l.jsx("script",{type:"application/ld+json",children:JSON.stringify(e)})})}function wn({items:e}){const t={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Ana Sayfa",item:"https://mindsoulacademy.life/"},...e.map((r,n)=>N({"@type":"ListItem",position:n+2,name:r.label},r.href?{item:"https://mindsoulacademy.life".concat(r.href)}:{}))]};return l.jsxs(l.Fragment,{children:[l.jsx(eoe,{data:t}),l.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-6",children:l.jsxs("ol",{className:"flex items-center gap-1.5 text-sm text-muted-foreground flex-wrap",children:[l.jsx("li",{children:l.jsxs(de,{to:"/",className:"hover:text-foreground transition-colors flex items-center gap-1",children:[l.jsx(f7,{size:14})," Ana Sayfa"]})}),e.map((r,n)=>l.jsxs("li",{className:"flex items-center gap-1.5",children:[l.jsx(Oz,{size:14,className:"shrink-0"}),r.href?l.jsx(de,{to:r.href,className:"hover:text-foreground transition-colors",children:r.label}):l.jsx("span",{className:"text-foreground font-medium truncate max-w-[200px]",children:r.label})]},n))]})})]})}function toe(){const[e,t]=w.useState(null),{data:r=[],isLoading:n}=dl(),{data:i=[]}=sp(),a=r.filter(s=>s.published),o=e?a.filter(s=>s.category_id===e):a;return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Eğitimler",description:"Meditasyon, kişisel gelişim ve farkındalık alanındaki tüm eğitimlerimizi keşfedin. Online, canlı ve yüz yüze eğitim seçenekleri.",canonical:"/egitimler"}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsx(wn,{items:[{label:"Eğitimler"}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Eğitim Kataloğu"}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Eğitimler"}),l.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:"Meditasyon ve kişisel gelişim alanındaki ses temelli eğitimlerimizi keşfedin."})]}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mb-12",children:[l.jsx("button",{onClick:()=>t(null),className:"px-6 py-2.5 rounded-full text-sm font-medium transition-all duration-300 ".concat(e?"bg-secondary text-secondary-foreground hover:bg-accent":"bg-primary text-primary-foreground"),children:"Tümü"}),i.map(s=>l.jsx("button",{onClick:()=>t(s.id),className:"px-6 py-2.5 rounded-full text-sm font-medium transition-all duration-300 ".concat(e===s.id?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground hover:bg-accent"),children:s.name},s.id))]}),i.length>0&&l.jsx("div",{className:"flex flex-wrap justify-center gap-3 mb-12",children:i.map(s=>l.jsxs(de,{to:"/kategori/".concat(s.slug),className:"text-xs text-primary hover:underline",children:[s.name," sayfasına git →"]},s.id))}),n?l.jsx("p",{className:"text-center text-muted-foreground py-16",children:"Eğitimler yükleniyor..."}):l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:o.map((s,c)=>l.jsx(tx,{course:s,index:c},s.id))}),!n&&o.length===0&&l.jsx("p",{className:"text-center text-muted-foreground text-body py-16",children:"Bu kategoride henüz eğitim bulunmamaktadır."})]})})]})}function ls({instructor:e,variant:t="inline",maxVisible:r=3}){const[n,i]=w.useState(!1),a=e?e.split(",").map(c=>c.trim()).filter(Boolean):[];if(a.length===0)return null;if(t==="sidebar"){const c=n?a:a.slice(0,r);return a.length>r,l.jsx("div",{children:l.jsxs("div",{className:"flex justify-between",children:[l.jsxs("span",{children:["Eğitmen",a.length>1?"ler":""]}),l.jsx("span",{className:"font-medium text-foreground text-right",children:a.length<=r?a.join(", "):l.jsxs("span",{children:[c.join(", "),!n&&l.jsxs("button",{onClick:()=>i(!0),className:"ml-1 text-primary text-xs hover:underline inline-flex items-center gap-0.5",children:["+",a.length-r," ",l.jsx(Mo,{size:12})]}),n&&l.jsxs("button",{onClick:()=>i(!1),className:"ml-1 text-primary text-xs hover:underline inline-flex items-center gap-0.5",children:["Gizle ",l.jsx(Jd,{size:12})]})]})})]})})}if(t==="card"){const c=n?a:a.slice(0,6),u=a.length>6;return l.jsxs("div",{className:"p-6 rounded-2xl bg-secondary border border-border mb-8",children:[l.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(Do,{size:16,className:"text-muted-foreground"})," Eğitmenler"]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:c.map((f,d)=>l.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-background border border-border text-sm text-foreground",children:[l.jsx(Do,{size:12,className:"text-muted-foreground"}),f]},d))}),u&&l.jsx("button",{onClick:()=>i(!n),className:"mt-3 text-primary text-xs hover:underline inline-flex items-center gap-1",children:n?l.jsxs(l.Fragment,{children:["Daha az göster ",l.jsx(Jd,{size:14})]}):l.jsxs(l.Fragment,{children:["+",a.length-6," eğitmen daha ",l.jsx(Mo,{size:14})]})})]})}const o=n?a:a.slice(0,2),s=a.length>2;return l.jsxs("span",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx(Do,{size:16}),o.join(", "),s&&!n&&l.jsxs("button",{onClick:()=>i(!0),className:"text-primary text-xs hover:underline inline-flex items-center gap-0.5",children:["+",a.length-2," ",l.jsx(Mo,{size:12})]}),s&&n&&l.jsxs("button",{onClick:()=>i(!1),className:"text-primary text-xs hover:underline inline-flex items-center gap-0.5",children:["Gizle ",l.jsx(Jd,{size:12})]})]})}function roe(e){return e==="USD"?"$":e==="EUR"?"€":e==="GBP"?"£":"₺"}function lO(e){return e?new Date(e).toLocaleDateString("tr-TR",{day:"numeric",month:"long",year:"numeric"}):""}function cO(e){return e?e.slice(0,5):""}function noe({registration:e,courseTitle:t}){const r=w.useRef(null),n=e.courses,i=lO(n==null?void 0:n.event_date),a=n!=null&&n.event_end_date?lO(n.event_end_date):"",o=a?"".concat(i," – ").concat(a):i,s=cO(n==null?void 0:n.start_time),c=cO(n==null?void 0:n.end_time),u=s?"".concat(s).concat(c?" – ".concat(c):""):"",f=roe(e.currency),d=()=>T(this,null,function*(){const h=window.open("","_blank");if(!h)return;const p='\n<!DOCTYPE html>\n<html lang="tr">\n<head>\n <meta charset="utf-8" />\n <title>'.concat(t,' - Kayıt Onayı</title>\n <style>\n * { margin: 0; padding: 0; box-sizing: border-box; }\n body { font-family: \'Segoe UI\', Arial, sans-serif; background: #fff; color: #333; padding: 40px; }\n .container { max-width: 560px; margin: 0 auto; }\n .logo { text-align: center; font-size: 20px; font-weight: 600; color: #4a7c6f; margin-bottom: 8px; font-family: Georgia, serif; }\n .divider { border: none; border-top: 1px solid #e5e5e5; margin: 20px 0; }\n h1 { font-size: 22px; text-align: center; margin: 16px 0; }\n .check { color: #22c55e; }\n .greeting { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }\n .text { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }\n .box { border-radius: 12px; padding: 20px; margin-bottom: 16px; }\n .box-green { background: #f0f7f4; }\n .box-gray { background: #f5f5f5; }\n .box-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }\n table { width: 100%; font-size: 14px; }\n td { padding: 6px 0; }\n .label { color: #888; }\n .value { text-align: right; font-weight: 600; color: #333; }\n .info-text { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 8px; }\n .footer { font-size: 13px; color: #999; text-align: center; margin-top: 24px; }\n .brand { font-size: 13px; color: #4a7c6f; text-align: center; font-weight: 600; }\n .note-box { background: #fffbeb; border: 1px solid #fbbf24; border-radius: 12px; padding: 16px; margin-top: 20px; text-align: center; }\n .note-box p { font-size: 13px; color: #92400e; }\n @media print { body { padding: 20px; } .no-print { display: none; } }\n </style>\n</head>\n<body>\n <div class="container">\n <div class="logo">MindSoul Academy</div>\n <hr class="divider" />\n <h1>Kayıt Onayı <span class="check">✓</span></h1>\n <p class="greeting">Merhaba ').concat(e.full_name,',</p>\n <p class="text"><strong>').concat(t,'</strong> etkinliğine başarıyla kayıt oldunuz! Ödemeniz alınmıştır.</p>\n\n <div class="box box-green">\n <div class="box-title">Kayıt Detayları</div>\n <table>\n <tr><td class="label">Paket:</td><td class="value">').concat(e.package_description,'</td></tr>\n <tr><td class="label">Ödenen Tutar:</td><td class="value">').concat(f).concat(e.amount,'</td></tr>\n </table>\n </div>\n\n <div class="box box-gray">\n <div class="box-title">Etkinlik Detayları</div>\n <table>\n ').concat(i?'<tr><td class="label">Tarih:</td><td class="value">'.concat(o,"</td></tr>"):"","\n ").concat(u?'<tr><td class="label">Saat:</td><td class="value">'.concat(u,"</td></tr>"):"","\n ").concat(n!=null&&n.venue_name?'<tr><td class="label">Mekan:</td><td class="value">'.concat(n.venue_name,"</td></tr>"):"","\n ").concat(n!=null&&n.address?'<tr><td class="label">Adres:</td><td class="value">'.concat(n.address,"</td></tr>"):"","\n ").concat(n!=null&&n.city?'<tr><td class="label">Şehir:</td><td class="value">'.concat(n.city,"</td></tr>"):"","\n </table>\n </div>\n\n ").concat(n!=null&&n.participant_notes||n!=null&&n.what_to_bring?'\n <div class="box box-green">\n <div class="box-title">Ek Bilgiler</div>\n '.concat(n!=null&&n.participant_notes?'<p class="info-text">📋 '.concat(n.participant_notes,"</p>"):"","\n ").concat(n!=null&&n.what_to_bring?'<p class="info-text">🎒 Ne Getirilmeli: '.concat(n.what_to_bring,"</p>"):"","\n </div>\n "):"",'\n\n <hr class="divider" />\n <p class="footer">Sorularınız için bize ulaşmaktan çekinmeyin.</p>\n <p class="brand">MindSoul Academy</p>\n </div>\n\n <script>window.onload = function() { window.print(); }<\/script>\n</body>\n</html>');h.document.write(p),h.document.close()});return l.jsxs("div",{ref:r,className:"py-2",children:[l.jsxs("div",{className:"text-center mb-6",children:[l.jsx(Kn,{size:48,className:"mx-auto text-green-500 mb-3"}),l.jsx("h3",{className:"font-heading text-xl font-semibold text-foreground mb-1",children:"Kayıt Başarılı!"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Onay e-postanız gönderildi."})]}),l.jsxs("div",{className:"rounded-2xl bg-[hsl(var(--secondary))] p-5 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(i1,{size:16,className:"text-primary"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Kayıt Detayları"})]}),l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Paket"}),l.jsx("span",{className:"font-medium text-foreground",children:e.package_description})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Ödenen Tutar"}),l.jsxs("span",{className:"font-semibold text-foreground",children:[f,e.amount]})]})]})]}),l.jsxs("div",{className:"rounded-2xl bg-[hsl(var(--muted))] p-5 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(Bi,{size:16,className:"text-primary"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Etkinlik Detayları"})]}),l.jsxs("div",{className:"space-y-2 text-sm",children:[i&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Tarih"}),l.jsx("span",{className:"text-foreground",children:o})]}),u&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Saat"}),l.jsx("span",{className:"text-foreground",children:u})]}),(n==null?void 0:n.venue_name)&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Mekan"}),l.jsx("span",{className:"text-foreground",children:n.venue_name})]}),(n==null?void 0:n.address)&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Adres"}),l.jsx("span",{className:"text-foreground text-right max-w-[60%]",children:n.address})]}),(n==null?void 0:n.city)&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Şehir"}),l.jsx("span",{className:"text-foreground",children:n.city})]})]})]}),((n==null?void 0:n.participant_notes)||(n==null?void 0:n.what_to_bring))&&l.jsxs("div",{className:"rounded-2xl bg-[hsl(var(--secondary))] p-5 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(p7,{size:16,className:"text-primary"}),l.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Ek Bilgiler"})]}),(n==null?void 0:n.participant_notes)&&l.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:["📋 ",n.participant_notes]}),(n==null?void 0:n.what_to_bring)&&l.jsxs("p",{className:"text-sm text-muted-foreground",children:["🎒 Ne Getirilmeli: ",n.what_to_bring]})]}),l.jsx("div",{className:"rounded-2xl border border-amber-300 bg-amber-50 dark:bg-amber-950/30 dark:border-amber-700 p-4 mb-4",children:l.jsx("p",{className:"text-xs text-amber-800 dark:text-amber-300 text-center leading-relaxed",children:"📄 Kayıt onayınızın elinizde bulunması için lütfen aşağıdaki butona tıklayarak PDF olarak indirin."})}),l.jsxs("button",{onClick:d,className:"btn-primary w-full flex items-center justify-center gap-2",children:[l.jsx(u7,{size:18}),"Kayıt Onayını İndir (PDF)"]})]})}function ioe(e){return w.useMemo(()=>Array.from({length:e},(t,r)=>({size:4+Math.random()*4,hue:r%2===0?140+Math.random()*30:200+Math.random()*30,saturation:40+Math.random()*30,lightness:55+Math.random()*25,isEven:r%2===0,distance:90+Math.random()*40,extraDuration:Math.random()*2})),[e])}function aoe({index:e,total:t,data:r}){const n=e/t*360,i=e/t*3;return l.jsx(pe.div,{className:"absolute rounded-full",style:{width:r.size,height:r.size,background:"hsl(".concat(r.hue,", ").concat(r.saturation,"%, ").concat(r.lightness,"%)"),top:"50%",left:"50%",filter:"blur(0.5px)"},animate:{x:[0,Math.cos(n*Math.PI/180)*r.distance],y:[0,Math.sin(n*Math.PI/180)*r.distance],opacity:[0,.8,0],scale:[.3,1,.2]},transition:{duration:3+r.extraDuration,repeat:1/0,delay:i,ease:"easeOut"}})}function ooe({index:e,playing:t}){const r=e/8*360;return l.jsx(pe.div,{className:"absolute origin-bottom",style:{width:18,height:36,borderRadius:"50% 50% 0 0",background:"linear-gradient(to top, hsl(150, 25%, 45%), hsl(".concat(140+e*8,", 30%, ").concat(55+e*3,"%))"),top:"50%",left:"50%",marginLeft:-9,marginTop:-36,transformOrigin:"center bottom",rotate:"".concat(r,"deg"),opacity:.85},animate:t?{scale:[1,1.08,1],opacity:[.85,1,.85]}:{scale:1,opacity:.7},transition:{duration:2,repeat:1/0,delay:e*.25,ease:"easeInOut"}})}function soe({playing:e}){const t=ioe(20);return l.jsxs("div",{className:"relative w-32 h-32 mx-auto",children:[e&&t.map((r,n)=>l.jsx(aoe,{index:n,total:20,data:r},"p-".concat(n))),Array.from({length:8}).map((r,n)=>l.jsx(ooe,{index:n,playing:e},n)),l.jsx(pe.div,{className:"absolute rounded-full",style:{width:22,height:22,top:"50%",left:"50%",marginLeft:-11,marginTop:-11,background:"linear-gradient(135deg, hsl(35, 40%, 65%), hsl(40, 50%, 75%))",boxShadow:"0 0 12px hsl(40, 40%, 70% / 0.5)"},animate:e?{scale:[1,1.15,1],boxShadow:["0 0 12px hsl(40, 40%, 70% / 0.3)","0 0 24px hsl(40, 40%, 70% / 0.7)","0 0 12px hsl(40, 40%, 70% / 0.3)"]}:{},transition:{duration:2,repeat:1/0,ease:"easeInOut"}})]})}function uO(e){if(!isFinite(e))return"0:00";const t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))}function loe({open:e,onClose:t,title:r,audioUrl:n}){const i=w.useRef(null),[a,o]=w.useState(!1),[s,c]=w.useState(0),[u,f]=w.useState(0);w.useEffect(()=>(e&&i.current&&i.current.play().then(()=>o(!0)).catch(()=>{}),()=>{i.current&&i.current.pause()}),[e,n]);const d=w.useCallback(()=>{i.current&&(a?i.current.pause():i.current.play().catch(()=>{}))},[a]),h=w.useCallback(x=>{i.current&&(i.current.currentTime=Math.max(0,Math.min(i.current.currentTime+x,i.current.duration||0)))},[]),p=x=>{if(!i.current||!u)return;const b=x.currentTarget.getBoundingClientRect(),y=Math.max(0,Math.min(1,(x.clientX-b.left)/b.width));i.current.currentTime=y*u},m=()=>{i.current&&i.current.pause(),o(!1),c(0),t()},g=()=>{o(!1),m()},v=u>0?s/u*100:0;return l.jsx(gE,{children:e&&l.jsx(pe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 z-[100] flex items-center justify-center bg-foreground/40 backdrop-blur-sm",onClick:m,children:l.jsxs(pe.div,{initial:{opacity:0,scale:.85,y:30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.85,y:30},transition:{duration:.4,ease:"easeOut"},className:"relative w-[340px] max-w-[90vw] rounded-3xl border border-border bg-card p-8 shadow-2xl",onClick:x=>x.stopPropagation(),children:[l.jsx("button",{onClick:m,className:"absolute right-4 top-4 rounded-full p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",children:l.jsx(yn,{size:18})}),l.jsx("audio",{ref:i,src:n,onTimeUpdate:()=>{var x;return c(((x=i.current)==null?void 0:x.currentTime)||0)},onLoadedMetadata:()=>{var x;return f(((x=i.current)==null?void 0:x.duration)||0)},onPlay:()=>o(!0),onPause:()=>o(!1),onEnded:g,preload:"metadata"}),l.jsx("div",{className:"mb-6 mt-2",children:l.jsx(soe,{playing:a})}),l.jsx("p",{className:"text-center font-heading text-base font-semibold text-foreground mb-5 truncate px-4",children:r}),l.jsxs("div",{className:"mb-2",children:[l.jsx("div",{className:"h-2 w-full rounded-full bg-muted cursor-pointer overflow-hidden",onClick:p,children:l.jsx(pe.div,{className:"h-full rounded-full bg-primary",style:{width:"".concat(v,"%")},transition:{duration:.1}})}),l.jsxs("div",{className:"flex justify-between mt-1.5 text-xs text-muted-foreground font-medium",children:[l.jsx("span",{children:uO(s)}),l.jsx("span",{children:uO(u)})]})]}),l.jsxs("div",{className:"flex items-center justify-center gap-5 mt-4",children:[l.jsxs("button",{onClick:()=>h(-10),className:"relative flex items-center justify-center w-11 h-11 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"10 saniye geri",children:[l.jsx(T7,{size:20}),l.jsx("span",{className:"absolute -bottom-3.5 text-[10px] font-medium text-muted-foreground",children:"10s"})]}),l.jsx("button",{onClick:d,className:"flex items-center justify-center w-14 h-14 rounded-full bg-primary text-primary-foreground shadow-lg hover:opacity-90 transition-opacity","aria-label":a?"Duraklat":"Oynat",children:a?l.jsx(j7,{size:24}):l.jsx(a1,{size:24,className:"ml-0.5"})}),l.jsxs("button",{onClick:()=>h(10),className:"relative flex items-center justify-center w-11 h-11 rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"10 saniye ileri",children:[l.jsx(A7,{size:20}),l.jsx("span",{className:"absolute -bottom-3.5 text-[10px] font-medium text-muted-foreground",children:"10s"})]})]})]})})})}function coe(e){if(!e)return"";const t="/lesson-audio/",r=e.indexOf(t);return r!==-1?e.substring(r+t.length):e}function uoe(e,t){const[r,n]=w.useState(null),[i,a]=w.useState(!1);return w.useEffect(()=>{if(!e||!t){n(null);return}let o=!1;a(!0);const s=coe(e);return Q.storage.from("lesson-audio").createSignedUrl(s,3600).then(({data:c,error:u})=>{o||(u?(console.error("Signed URL error:",u),n(null)):n(c.signedUrl),a(!1))}),()=>{o=!0}},[e,t]),{signedUrl:r,loading:i}}function doe({title:e,duration:t,audioUrl:r,locked:n=!1}){const[i,a]=w.useState(!1),{signedUrl:o}=uoe(r,!n&&!!r);return n?l.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl bg-muted/50 opacity-60",children:[l.jsx("div",{className:"w-10 h-10 rounded-full bg-border flex items-center justify-center",children:l.jsx(a1,{size:16,className:"text-muted-foreground ml-0.5"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e}),l.jsxs("p",{className:"text-xs text-muted-foreground/60",children:[t," • 🔒 Kilitli"]})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl bg-sage-light/50 hover:bg-sage-light transition-colors duration-300 cursor-pointer",onClick:()=>o&&a(!0),children:[l.jsx("button",{disabled:!o,className:"w-10 h-10 rounded-full bg-primary flex items-center justify-center text-primary-foreground hover:opacity-90 transition-opacity disabled:opacity-50",children:l.jsx(a1,{size:16,className:"ml-0.5"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:e}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[t,!r&&l.jsx("span",{className:"text-muted-foreground/60 ml-2",children:"Ses dosyası yok"})]})]}),l.jsx(D7,{size:16,className:"text-muted-foreground"})]}),o&&l.jsx(loe,{open:i,onClose:()=>a(!1),title:e,audioUrl:o})]})}var f0="focusScope.autoFocusOnMount",h0="focusScope.autoFocusOnUnmount",dO={bubbles:!1,cancelable:!0},foe="FocusScope",y5=w.forwardRef((e,t)=>{const g=e,{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a}=g,o=Z(g,["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"]),[s,c]=w.useState(null),u=Xi(i),f=Xi(a),d=w.useRef(null),h=ir(t,v=>c(v)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let v=function(j){if(p.paused||!s)return;const k=j.target;s.contains(k)?d.current=k:to(d.current,{select:!0})},x=function(j){if(p.paused||!s)return;const k=j.relatedTarget;k!==null&&(s.contains(k)||to(d.current,{select:!0}))},b=function(j){if(document.activeElement===document.body)for(const _ of j)_.removedNodes.length>0&&to(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,s,p.paused]),w.useEffect(()=>{if(s){hO.add(p);const v=document.activeElement;if(!s.contains(v)){const b=new CustomEvent(f0,dO);s.addEventListener(f0,u),s.dispatchEvent(b),b.defaultPrevented||(hoe(voe(v5(s)),{select:!0}),document.activeElement===v&&to(s))}return()=>{s.removeEventListener(f0,u),setTimeout(()=>{const b=new CustomEvent(h0,dO);s.addEventListener(h0,f),s.dispatchEvent(b),b.defaultPrevented||to(v!=null?v:document.body,{select:!0}),s.removeEventListener(h0,f),hO.remove(p)},0)}}},[s,u,f,p]);const m=w.useCallback(v=>{if(!r&&!n||p.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[j,k]=poe(y);j&&k?!v.shiftKey&&b===k?(v.preventDefault(),r&&to(j,{select:!0})):v.shiftKey&&b===j&&(v.preventDefault(),r&&to(k,{select:!0})):b===y&&v.preventDefault()}},[r,n,p.paused]);return l.jsx(ut.div,I(N({tabIndex:-1},o),{ref:h,onKeyDown:m}))});y5.displayName=foe;function hoe(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(to(n,{select:t}),document.activeElement!==r)return}function poe(e){const t=v5(e),r=fO(t,e),n=fO(t.reverse(),e);return[r,n]}function v5(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function fO(e,t){for(const r of e)if(!moe(r,{upTo:t}))return r}function moe(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 goe(e){return e instanceof HTMLInputElement&&"select"in e}function to(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&goe(e)&&t&&e.select()}}var hO=yoe();function yoe(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=pO(e,t),e.unshift(t)},remove(t){var r;e=pO(e,t),(r=e[0])==null||r.resume()}}}function pO(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function voe(e){return e.filter(t=>t.tagName!=="A")}var p0=0;function xoe(){w.useEffect(()=>{var t,r;const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=e[0])!=null?t:mO()),document.body.insertAdjacentElement("beforeend",(r=e[1])!=null?r:mO()),p0++,()=>{p0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),p0--}},[])}function mO(){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 Li=function(){return Li=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Li.apply(this,arguments)};function x5(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function boe(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var lg="right-scroll-bar-position",cg="width-before-scroll-bar",woe="with-scroll-bars-hidden",koe="--removed-body-scroll-bar-size";function m0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _oe(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}var joe=typeof window!="undefined"?w.useLayoutEffect:w.useEffect,gO=new WeakMap;function Soe(e,t){var r=_oe(null,function(n){return e.forEach(function(i){return m0(i,n)})});return joe(function(){var n=gO.get(r);if(n){var i=new Set(n),a=new Set(e),o=r.current;i.forEach(function(s){a.has(s)||m0(s,null)}),a.forEach(function(s){i.has(s)||m0(s,o)})}gO.set(r,e)},[e]),r}function Eoe(e){return e}function Noe(e,t){t===void 0&&(t=Eoe);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var o=t(a,n);return r.push(o),function(){r=r.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(n=!0;r.length;){var o=r;r=[],o.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var o=[];if(r.length){var s=r;r=[],s.forEach(a),o=r}var c=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),r}}}};return i}function Coe(e){e===void 0&&(e={});var t=Noe(null);return t.options=Li({async:!0,ssr:!1},e),t}var b5=function(e){var t=e.sideCar,r=x5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Li({},r))};b5.isSideCarExport=!0;function Toe(e,t){return e.useMedium(t),b5}var w5=Coe(),g0=function(){},ax=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:g0,onWheelCapture:g0,onTouchMoveCapture:g0}),i=n[0],a=n[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,y=e.gapMode,j=x5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,_=Soe([r,t]),S=Li(Li({},j),i);return w.createElement(w.Fragment,null,f&&w.createElement(k,{sideCar:w5,removeScrollBar:u,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),o?w.cloneElement(w.Children.only(s),Li(Li({},S),{ref:_})):w.createElement(b,Li({},S,{className:c,ref:_}),s))});ax.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ax.classNames={fullWidth:cg,zeroRight:lg};var Aoe=function(){if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function Poe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Aoe();return t&&e.setAttribute("nonce",t),e}function Ooe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Roe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $oe=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Poe())&&(Ooe(t,r),Roe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Moe=function(){var e=$oe();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},k5=function(){var e=Moe(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},Doe={left:0,top:0,right:0,gap:0},y0=function(e){return parseInt(e||"",10)||0},Ioe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[y0(r),y0(n),y0(i)]},Loe=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Doe;var t=Ioe(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},zoe=k5(),wc="data-scroll-locked",Boe=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),"\n .".concat(woe," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(wc,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),r==="margin"&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(o,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(lg," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(cg," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(lg," .").concat(lg," {\n right: 0 ").concat(n,";\n }\n \n .").concat(cg," .").concat(cg," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(wc,"] {\n ").concat(koe,": ").concat(s,"px;\n }\n")},yO=function(){var e=parseInt(document.body.getAttribute(wc)||"0",10);return isFinite(e)?e:0},Uoe=function(){w.useEffect(function(){return document.body.setAttribute(wc,(yO()+1).toString()),function(){var e=yO()-1;e<=0?document.body.removeAttribute(wc):document.body.setAttribute(wc,e.toString())}},[])},Foe=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Uoe();var a=w.useMemo(function(){return Loe(i)},[i]);return w.createElement(zoe,{styles:Boe(a,!t,i,r?"":"!important")})},yk=!1;if(typeof window!="undefined")try{var lm=Object.defineProperty({},"passive",{get:function(){return yk=!0,!0}});window.addEventListener("test",lm,lm),window.removeEventListener("test",lm,lm)}catch(e){yk=!1}var Sl=yk?{passive:!1}:!1,Koe=function(e){return e.tagName==="TEXTAREA"},_5=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Koe(e)&&r[t]==="visible")},Hoe=function(e){return _5(e,"overflowY")},Voe=function(e){return _5(e,"overflowX")},vO=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot!="undefined"&&n instanceof ShadowRoot&&(n=n.host);var i=j5(e,n);if(i){var a=S5(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Woe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},qoe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},j5=function(e,t){return e==="v"?Hoe(t):Voe(t)},S5=function(e,t){return e==="v"?Woe(t):qoe(t)},Goe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yoe=function(e,t,r,n,i){var a=Goe(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,c=t.contains(s),u=!1,f=o>0,d=0,h=0;do{if(!s)break;var p=S5(e,s),m=p[0],g=p[1],v=p[2],x=g-v-a*m;(m||x)&&j5(e,s)&&(d+=x,h+=m);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&(Math.abs(d)<1||!i)||!f&&(Math.abs(h)<1||!i))&&(u=!0),u},cm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xO=function(e){return[e.deltaX,e.deltaY]},bO=function(e){return e&&"current"in e?e.current:e},Xoe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Joe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Qoe=0,El=[];function Zoe(e){var t=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),i=w.useState(Qoe++)[0],a=w.useState(k5)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=boe([e.lockRef.current],(e.shards||[]).map(bO),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=cm(g),b=r.current,y="deltaX"in g?g.deltaX:b[0]-x[0],j="deltaY"in g?g.deltaY:b[1]-x[1],k,_=g.target,S=Math.abs(y)>Math.abs(j)?"h":"v";if("touches"in g&&S==="h"&&_.type==="range")return!1;var E=vO(S,_);if(!E)return!0;if(E?k=S:(k=S==="v"?"h":"v",E=vO(S,_)),!E)return!1;if(!n.current&&"changedTouches"in g&&(y||j)&&(n.current=k),!k)return!0;var C=n.current||k;return Yoe(C,v,g,C==="h"?y:j,!0)},[]),c=w.useCallback(function(g){var v=g;if(!(!El.length||El[El.length-1]!==a)){var x="deltaY"in v?xO(v):cm(v),b=t.current.filter(function(k){return k.name===v.type&&(k.target===v.target||v.target===k.shadowParent)&&Xoe(k.delta,x)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var y=(o.current.shards||[]).map(bO).filter(Boolean).filter(function(k){return k.contains(v.target)}),j=y.length>0?s(v,y[0]):!o.current.noIsolation;j&&v.cancelable&&v.preventDefault()}}},[]),u=w.useCallback(function(g,v,x,b){var y={name:g,delta:v,target:x,should:b,shadowParent:ese(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(j){return j!==y})},1)},[]),f=w.useCallback(function(g){r.current=cm(g),n.current=void 0},[]),d=w.useCallback(function(g){u(g.type,xO(g),g.target,s(g,e.lockRef.current))},[]),h=w.useCallback(function(g){u(g.type,cm(g),g.target,s(g,e.lockRef.current))},[]);w.useEffect(function(){return El.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Sl),document.addEventListener("touchmove",c,Sl),document.addEventListener("touchstart",f,Sl),function(){El=El.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,Sl),document.removeEventListener("touchmove",c,Sl),document.removeEventListener("touchstart",f,Sl)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:Joe(i)}):null,p?w.createElement(Foe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ese(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tse=Toe(w5,Zoe);var E5=w.forwardRef(function(e,t){return w.createElement(ax,Li({},e,{ref:t,sideCar:tse}))});E5.classNames=ax.classNames;var rse=function(e){if(typeof document=="undefined")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nl=new WeakMap,um=new WeakMap,dm={},v0=0,N5=function(e){return e&&(e.host||N5(e.parentNode))},nse=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=N5(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ise=function(e,t,r,n){var i=nse(t,Array.isArray(e)?e:[e]);dm[r]||(dm[r]=new WeakMap);var a=dm[r],o=[],s=new Set,c=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(n),m=p!==null&&p!=="false",g=(Nl.get(h)||0)+1,v=(a.get(h)||0)+1;Nl.set(h,g),a.set(h,v),o.push(h),g===1&&m&&um.set(h,!0),v===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return f(t),s.clear(),v0++,function(){o.forEach(function(d){var h=Nl.get(d)-1,p=a.get(d)-1;Nl.set(d,h),a.set(d,p),h||(um.has(d)||d.removeAttribute(n),um.delete(d)),p||d.removeAttribute(r)}),v0--,v0||(Nl=new WeakMap,Nl=new WeakMap,um=new WeakMap,dm={})}},ase=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=rse(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),ise(n,i,r,"aria-hidden")):function(){return null}},ox="Dialog",[C5,T5]=La(ox),[ose,ki]=C5(ox),A5=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),c=w.useRef(null),[u,f]=Qh({prop:n,defaultProp:i!=null?i:!1,onChange:a,caller:ox});return l.jsx(ose,{scope:t,triggerRef:s,contentRef:c,contentId:Zd(),titleId:Zd(),descriptionId:Zd(),open:u,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(d=>!d),[f]),modal:o,children:r})};A5.displayName=ox;var P5="DialogTrigger",O5=w.forwardRef((e,t)=>{const o=e,{__scopeDialog:r}=o,n=Z(o,["__scopeDialog"]),i=ki(P5,r),a=ir(t,i.triggerRef);return l.jsx(ut.button,I(N({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PE(i.open)},n),{ref:a,onClick:ot(e.onClick,i.onOpenToggle)}))});O5.displayName=P5;var TE="DialogPortal",[sse,R5]=C5(TE,{forceMount:void 0}),$5=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ki(TE,t);return l.jsx(sse,{scope:t,forceMount:r,children:w.Children.map(n,o=>l.jsx(cl,{present:r||a.open,children:l.jsx(uS,{asChild:!0,container:i,children:o})}))})};$5.displayName=TE;var ay="DialogOverlay",M5=w.forwardRef((e,t)=>{const r=R5(ay,e.__scopeDialog),o=e,{forceMount:n=r.forceMount}=o,i=Z(o,["forceMount"]),a=ki(ay,e.__scopeDialog);return a.modal?l.jsx(cl,{present:n||a.open,children:l.jsx(cse,I(N({},i),{ref:t}))}):null});M5.displayName=ay;var lse=Rf("DialogOverlay.RemoveScroll"),cse=w.forwardRef((e,t)=>{const a=e,{__scopeDialog:r}=a,n=Z(a,["__scopeDialog"]),i=ki(ay,r);return l.jsx(E5,{as:lse,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(ut.div,I(N({"data-state":PE(i.open)},n),{ref:t,style:N({pointerEvents:"auto"},n.style)}))})}),Zs="DialogContent",D5=w.forwardRef((e,t)=>{const r=R5(Zs,e.__scopeDialog),o=e,{forceMount:n=r.forceMount}=o,i=Z(o,["forceMount"]),a=ki(Zs,e.__scopeDialog);return l.jsx(cl,{present:n||a.open,children:a.modal?l.jsx(use,I(N({},i),{ref:t})):l.jsx(dse,I(N({},i),{ref:t}))})});D5.displayName=Zs;var use=w.forwardRef((e,t)=>{const r=ki(Zs,e.__scopeDialog),n=w.useRef(null),i=ir(t,r.contentRef,n);return w.useEffect(()=>{const a=n.current;if(a)return ase(a)},[]),l.jsx(I5,I(N({},e),{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ot(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ot(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ot(e.onFocusOutside,a=>a.preventDefault())}))}),dse=w.forwardRef((e,t)=>{const r=ki(Zs,e.__scopeDialog),n=w.useRef(!1),i=w.useRef(!1);return l.jsx(I5,I(N({},e),{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}}))}),I5=w.forwardRef((e,t)=>{const f=e,{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a}=f,o=Z(f,["__scopeDialog","trapFocus","onOpenAutoFocus","onCloseAutoFocus"]),s=ki(Zs,r),c=w.useRef(null),u=ir(t,c);return xoe(),l.jsxs(l.Fragment,{children:[l.jsx(y5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(Ov,I(N({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":PE(s.open)},o),{ref:u,onDismiss:()=>s.onOpenChange(!1)}))}),l.jsxs(l.Fragment,{children:[l.jsx(hse,{titleId:s.titleId}),l.jsx(mse,{contentRef:c,descriptionId:s.descriptionId})]})]})}),AE="DialogTitle",L5=w.forwardRef((e,t)=>{const a=e,{__scopeDialog:r}=a,n=Z(a,["__scopeDialog"]),i=ki(AE,r);return l.jsx(ut.h2,I(N({id:i.titleId},n),{ref:t}))});L5.displayName=AE;var z5="DialogDescription",B5=w.forwardRef((e,t)=>{const a=e,{__scopeDialog:r}=a,n=Z(a,["__scopeDialog"]),i=ki(z5,r);return l.jsx(ut.p,I(N({id:i.descriptionId},n),{ref:t}))});B5.displayName=z5;var U5="DialogClose",F5=w.forwardRef((e,t)=>{const a=e,{__scopeDialog:r}=a,n=Z(a,["__scopeDialog"]),i=ki(U5,r);return l.jsx(ut.button,I(N({type:"button"},n),{ref:t,onClick:ot(e.onClick,()=>i.onOpenChange(!1))}))});F5.displayName=U5;function PE(e){return e?"open":"closed"}var K5="DialogTitleWarning",[fse,H5]=u9(K5,{contentName:Zs,titleName:AE,docsSlug:"dialog"}),hse=({titleId:e})=>{const t=H5(K5),r="`".concat(t.contentName,"` requires a `").concat(t.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(t.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(t.docsSlug);return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},pse="DialogDescriptionWarning",mse=({contentRef:e,descriptionId:t})=>{const r=H5(pse),n="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(r.contentName,"}.");return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},V5=A5,gse=O5,W5=$5,OE=M5,RE=D5,$E=L5,ME=B5,DE=F5;const yse=V5,vse=W5,q5=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(OE,N({ref:r,className:Et("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))});q5.displayName=OE.displayName;const G5=w.forwardRef((i,n)=>{var a=i,{className:e,children:t}=a,r=Z(a,["className","children"]);return l.jsxs(vse,{children:[l.jsx(q5,{}),l.jsxs(RE,I(N({ref:n,className:Et("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e)},r),{children:[t,l.jsxs(DE,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(yn,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});G5.displayName=RE.displayName;const Y5=r=>{var n=r,{className:e}=n,t=Z(n,["className"]);return l.jsx("div",N({className:Et("flex flex-col space-y-1.5 text-center sm:text-left",e)},t))};Y5.displayName="DialogHeader";const X5=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx($E,N({ref:r,className:Et("text-lg font-semibold leading-none tracking-tight",e)},t))});X5.displayName=$E.displayName;const xse=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(ME,N({ref:r,className:Et("text-sm text-muted-foreground",e)},t))});xse.displayName=ME.displayName;function bse({open:e,onOpenChange:t,onSuccess:r}){const[n,i]=w.useState("login"),[a,o]=w.useState(""),[s,c]=w.useState(""),[u,f]=w.useState(""),[d,h]=w.useState(""),[p,m]=w.useState(!1),{signIn:g,signUp:v}=Ua(),x=()=>{o(""),c(""),f(""),h("")},b=y=>T(this,null,function*(){if(y.preventDefault(),m(!0),n==="login"){const{error:j}=yield g(a,s);m(!1),j?ee.error("Giriş başarısız. Lütfen bilgilerinizi kontrol edin."):(ee.success("Başarıyla giriş yaptınız!"),x(),t(!1),r==null||r())}else{if(s.length<6){ee.error("Şifre en az 6 karakter olmalıdır."),m(!1);return}const{error:j}=yield v(a,s,u,d.trim());m(!1),j?ee.error("Kayıt başarısız. Lütfen bilgilerinizi kontrol edin."):(ee.success("Kayıt başarılı! E-posta adresinizi kontrol edin."),x(),i("login"))}});return l.jsx(yse,{open:e,onOpenChange:t,children:l.jsxs(G5,{className:"sm:max-w-md rounded-3xl border-border bg-card p-8",children:[l.jsx(Y5,{children:l.jsx(X5,{className:"font-heading text-2xl text-center text-foreground",children:n==="login"?"Giriş Yap":"Kayıt Ol"})}),l.jsx("p",{className:"text-sm text-muted-foreground text-center mb-2",children:n==="login"?"Satın alma işlemi için hesabınıza giriş yapın.":"Hemen ücretsiz hesap oluşturun."}),l.jsxs("form",{onSubmit:b,className:"space-y-4",children:[n==="register"&&l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:"Ad Soyad"}),l.jsx("input",{type:"text",value:u,onChange:y=>f(y.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Adınız Soyadınız"})]}),n==="register"&&l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:"Telefon Numarası"}),l.jsx("input",{type:"tel",value:d,onChange:y=>h(y.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"05XX XXX XX XX"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:"E-posta"}),l.jsx("input",{type:"email",value:a,onChange:y=>o(y.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"ornek@mail.com"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:"Şifre"}),l.jsx("input",{type:"password",value:s,onChange:y=>c(y.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"••••••••"})]}),l.jsx("button",{type:"submit",disabled:p,className:"btn-primary w-full text-center",children:p?n==="login"?"Giriş yapılıyor...":"Kayıt yapılıyor...":n==="login"?"Giriş Yap":"Kayıt Ol"})]}),l.jsx("p",{className:"text-sm text-muted-foreground text-center mt-2",children:n==="login"?l.jsxs(l.Fragment,{children:["Hesabınız yok mu?"," ",l.jsx("button",{onClick:()=>i("register"),className:"text-primary font-medium hover:underline",children:"Kayıt Ol"})]}):l.jsxs(l.Fragment,{children:["Zaten hesabınız var mı?"," ",l.jsx("button",{onClick:()=>i("login"),className:"text-primary font-medium hover:underline",children:"Giriş Yap"})]})})]})})}const fm=e=>e==="USD"?"$":e==="EUR"?"€":e==="GBP"?"£":"₺";function J5(e){return!e.discounted_price||e.discounted_price<=0?!1:e.discount_end_date?new Date(e.discount_end_date+"T23:59:59")>=new Date:!0}function wO(e){return J5(e)?e.discounted_price:e.price}function wse(e){return new Date(e).toLocaleDateString("tr-TR",{day:"numeric",month:"long",year:"numeric"})}function kse({courseId:e,courseTitle:t,packages:r,capacity:n,paidCount:i=0}){var S;const[a,o]=w.useState(""),[s,c]=w.useState(""),[u,f]=w.useState(""),[d,h]=w.useState(((S=r[0])==null?void 0:S.id)||""),[p,m]=w.useState(!1),[g,v]=w.useState(!1),x=r.find(E=>E.id===d),b=n!=null&&n>0&&i>=n,y=n!=null&&n>0?Math.max(0,n-i):null,j=E=>T(this,null,function*(){if(E.preventDefault(),!a.trim()||!s.trim()||!u.trim()||!d){ee.error("Lütfen tüm alanları doldurun.");return}m(!0);try{const{data:C,error:R}=yield Q.functions.invoke("create-camp-checkout",{body:{courseId:e,packageId:d,fullName:a.trim(),email:s.trim(),phone:u.trim()}});if(R)throw R;C!=null&&C.url&&(window.location.href=C.url)}catch(C){ee.error("Ödeme başlatılamadı: "+(C.message||"Bilinmeyen hata"))}m(!1)});if(g)return l.jsxs("div",{className:"text-center py-8",children:[l.jsx(Kn,{size:48,className:"mx-auto text-green-500 mb-4"}),l.jsx("h3",{className:"heading-card text-foreground mb-2",children:"Kayıt Başarılı!"}),l.jsx("p",{className:"text-muted-foreground",children:"Doğrulama e-postanız gönderildi."})]});const k="w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",_=x?wO(x):0;return l.jsxs("form",{onSubmit:j,className:"space-y-5",children:[l.jsx("h3",{className:"heading-card text-foreground",children:"Kayıt Formu"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ad Soyad"}),l.jsx("input",{type:"text",value:a,onChange:E=>o(E.target.value),required:!0,placeholder:"Adınız Soyadınız",className:k})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:s,onChange:E=>c(E.target.value),required:!0,placeholder:"ornek@email.com",className:k})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Telefon"}),l.jsx("input",{type:"tel",value:u,onChange:E=>f(E.target.value),required:!0,placeholder:"+90 5XX XXX XX XX",className:k})]}),r.length>0&&l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-3 block",children:"Paket Seçimi"}),l.jsx("div",{className:"space-y-2",children:r.map(E=>{const C=J5(E);return wO(E),l.jsxs("label",{className:"flex items-center justify-between p-4 rounded-xl border cursor-pointer transition-all ".concat(d===E.id?"border-primary bg-primary/5":"border-border hover:border-primary/40"),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"radio",name:"package",value:E.id,checked:d===E.id,onChange:()=>h(E.id),className:"accent-primary"}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:E.description}),C&&E.discount_end_date&&l.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[l.jsx(bS,{size:12,className:"text-primary"}),l.jsxs("span",{className:"text-xs text-primary font-medium",children:["İndirim ",wse(E.discount_end_date)," tarihine kadar geçerli"]})]})]})]}),l.jsx("div",{className:"text-right",children:C?l.jsxs("div",{className:"flex flex-col items-end",children:[l.jsxs("span",{className:"text-xs text-muted-foreground line-through",children:[fm(E.currency),E.price]}),l.jsxs("span",{className:"text-sm font-bold text-primary",children:[fm(E.currency),E.discounted_price]})]}):l.jsxs("span",{className:"text-sm font-bold text-foreground",children:[fm(E.currency),E.price]})})]},E.id)})})]}),b?l.jsxs("div",{className:"w-full py-4 px-6 rounded-xl bg-muted text-center",children:[l.jsx("p",{className:"text-sm font-semibold text-destructive",children:"Kontenjan Doldu"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Bu kamp için tüm yerler satılmıştır."})]}):l.jsxs(l.Fragment,{children:[y!==null&&y<=5&&l.jsxs("p",{className:"text-xs text-center text-destructive font-medium",children:["Son ",y," yer kaldı!"]}),l.jsx("button",{type:"submit",disabled:p,className:"btn-primary w-full text-center",children:p?"İşleniyor...":"Kayıt Ol ve Öde ".concat(x?"(".concat(fm(x.currency)).concat(_,")"):"")})]})]})}function _se({open:e,onClose:t,onSubmit:r,defaultEmail:n="",defaultName:i="",defaultPhone:a="",loading:o=!1,title:s="Ödemeye Geç",subtitle:c="Ödeme için iletişim bilgilerinizi girin.",submitLabel:u="Ödemeye Devam Et",showLoginLink:f=!1,onLoginClick:d,showExtraFields:h=!1}){const[p,m]=w.useState(i),[g,v]=w.useState(n),[x,b]=w.useState(a),[y,j]=w.useState(""),[k,_]=w.useState(""),[S,E]=w.useState(""),[C,R]=w.useState(""),M=["Arkadaş","WhatsApp grubu","Facebook","Instagram","Diğer"];if(!e)return null;const L="w-full max-w-full box-border px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",H=U=>{U.preventDefault(),!(!p.trim()||!g.trim()||!x.trim())&&(h&&(!y.trim()||!k.trim()||!S.trim()||!C.trim())||r(N({fullName:p.trim(),email:g.trim(),phone:x.trim()},h?{region:y.trim(),profession:k.trim(),birthDate:S,heardFrom:C}:{})))};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:t,children:l.jsxs("div",{className:"bg-background rounded-2xl shadow-xl w-full max-w-md p-6 relative max-h-[90vh] overflow-y-auto overflow-x-hidden",onClick:U=>U.stopPropagation(),children:[l.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-1 hover:bg-secondary rounded-full transition-colors",children:l.jsx(yn,{size:18,className:"text-muted-foreground"})}),l.jsx("h3",{className:"heading-card text-foreground mb-1",children:s}),l.jsx("p",{className:"text-sm text-muted-foreground mb-5",children:c}),l.jsxs("form",{onSubmit:H,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ad Soyad"}),l.jsx("input",{type:"text",value:p,onChange:U=>m(U.target.value),required:!0,placeholder:"Adınız Soyadınız",className:L})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:g,onChange:U=>v(U.target.value),required:!0,placeholder:"ornek@email.com",className:L})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Telefon"}),l.jsx("input",{type:"tel",value:x,onChange:U=>b(U.target.value),required:!0,placeholder:"+90 5XX XXX XX XX",className:L})]}),h&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Doğum Tarihi"}),l.jsx("input",{type:"date",value:S,onChange:U=>E(U.target.value),required:!0,className:L})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Katıldığınız Bölge"}),l.jsx("input",{type:"text",value:y,onChange:U=>j(U.target.value),required:!0,placeholder:"Şehir / Bölge",className:L})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Mesleğiniz"}),l.jsx("input",{type:"text",value:k,onChange:U=>_(U.target.value),required:!0,placeholder:"Mesleğiniz",className:L})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Bu etkinliği nereden duydunuz?"}),l.jsxs("select",{value:C,onChange:U=>R(U.target.value),required:!0,className:L,children:[l.jsx("option",{value:"",disabled:!0,children:"Seçiniz"}),M.map(U=>l.jsx("option",{value:U,children:U},U))]})]})]}),l.jsx("button",{type:"submit",disabled:o,className:"btn-primary w-full text-center",children:o?"İşleniyor...":u}),l.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Hesap oluşturmadan ödeme yapabilirsiniz."}),f&&d&&l.jsxs("p",{className:"text-xs text-center text-muted-foreground pt-2 border-t border-border",children:["Hesabınız varsa"," ",l.jsx("button",{type:"button",onClick:d,className:"text-primary font-medium hover:underline",children:"giriş yapabilirsiniz"})," ","— bilgileriniz otomatik doldurulur."]})]})]})})}const kO={online_course:"Online Eğitim",live_online:"Canlı Online Eğitim",face_to_face:"Yüz Yüze Eğitim",camp:"Kamp"};function Ja(e){return e?new Date(e).toLocaleDateString("tr-TR",{day:"numeric",month:"long",year:"numeric"}):""}function _n(e){return e?e.slice(0,5):""}function _O({text:e}){const[t,r]=w.useState(!1);return l.jsxs("div",{className:"rounded-2xl border border-border mb-8 overflow-hidden",children:[l.jsxs("button",{onClick:()=>r(!t),className:"w-full flex items-center justify-between p-6 bg-secondary hover:bg-secondary/80 transition-colors text-left",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[l.jsx(Qd,{size:16,className:"text-muted-foreground"})," Konaklama Bilgileri"]}),l.jsx(Mo,{size:18,className:"text-muted-foreground transition-transform duration-200 ".concat(t?"rotate-180":"")})]}),l.jsx(gE,{initial:!1,children:t&&l.jsx(pe.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-6 pt-4 bg-secondary",children:l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:e})})})})]})}function jse(){var oe,ke,Ie;const{slug:e}=BS(),[t]=Hv(),{user:r,purchasedCourseIds:n,claimFreeCourse:i,session:a}=Ua(),[o,s]=w.useState(!1),[c,u]=w.useState(!1),[f,d]=w.useState(!1),[h,p]=w.useState("month"),[m,g]=w.useState("course"),[v,x]=w.useState(null),b=w.useRef(!1),{data:y,isLoading:j,error:k}=jae(e),{data:_=[]}=sp(),S=y?n.includes(y.id):!1,{data:E}=Sae(y==null?void 0:y.id,S),[C,R]=w.useState([]),[M,L]=w.useState([]),[H,U]=w.useState(0),[F,O]=w.useState(0),[P,A]=w.useState(!1),[D,B]=w.useState(null),z=w.useRef(null),K=y?_.find(ae=>ae.id===y.category_id):null,Y=(K==null?void 0:K.name)||"Eğitim",G=(K==null?void 0:K.payment_type)||"one_time",re=(y==null?void 0:y.course_type)||"online_course",le=y?y.purchase_enabled!==!1:!0;if(w.useEffect(()=>{y&&re==="camp"&&(Q.from("camp_packages").select("*").eq("course_id",y.id).order("order",{ascending:!0}).then(({data:ae})=>R(ae||[])),Q.from("camp_images").select("*").eq("course_id",y.id).order("order",{ascending:!0}).then(({data:ae})=>{const he=ae||[];L(he.length>0?he:y.cover_image?[{image_url:y.cover_image,order:0}]:[])}),Q.from("camp_registrations").select("id",{count:"exact",head:!0}).eq("course_id",y.id).eq("status","paid").then(({count:ae})=>U(ae||0)))},[y,re]),w.useEffect(()=>{const ae=t.get("camp_payment"),he=t.get("session_id");ae==="success"&&he&&y&&T(this,null,function*(){try{const{data:Ae,error:Ce}=yield Q.functions.invoke("verify-camp-payment",{body:{sessionId:he}});if(Ce)throw Ce;Ae!=null&&Ae.verified&&(A(!0),B(Ae.registration),ee.success("Kayıt başarılı! Onay e-postanız gönderildi."))}catch(Ae){console.error("Camp payment verification error:",Ae),ee.success("Kayıt başarılı!"),A(!0)}})},[t,y]),w.useEffect(()=>{P&&z.current&&setTimeout(()=>{var ae;(ae=z.current)==null||ae.scrollIntoView({behavior:"smooth",block:"center"})},300)},[P]),w.useEffect(()=>{const ae=t.get("payment"),he=t.get("session_id");ae==="success"&&he&&y?T(this,null,function*(){var Ae;try{const{data:Ce,error:Ye}=yield Q.functions.invoke("verify-payment",{body:{sessionId:he}});if(Ye)throw Ye;Ce!=null&&Ce.verified&&(Ce.paymentType==="deposit"&&Ce.ticketNumber&&r?(x({ticketNumber:Ce.ticketNumber,courseName:y.title,amount:y.deposit_amount||0}),yield Q.functions.invoke("send-reservation-email",{body:{ticketNumber:Ce.ticketNumber,courseTitle:y.title,depositAmount:y.deposit_amount||0,userName:((Ae=r.user_metadata)==null?void 0:Ae.full_name)||""}}),ee.success("Ön kaydınız oluşturuldu! Bilet numaranız e-posta ile gönderildi.")):(ee.success("Ödeme başarılı! Onay e-postanız gönderildi."),r&&(window.location.href="/egitim/".concat(y.slug))))}catch(Ce){console.error("Payment verification error:",Ce),ee.success("Ödeme başarılı!"),r&&(window.location.href="/egitim/".concat(y.slug))}}):ae==="success"&&!he&&y&&(ee.success("Ödeme başarılı!"),r&&(window.location.href="/egitim/".concat(y.slug)))},[t,y,r]),w.useEffect(()=>{if(r&&b.current&&y){b.current=!1;const ae=setTimeout(()=>T(this,null,function*(){const he=_.find(Ae=>Ae.id===y.category_id),ue=(he==null?void 0:he.payment_type)||"one_time";if(ue==="free"){try{yield i(y.id),ee.success("Eğitim başarıyla eklendi! Tüm derslere erişiminiz aktif.")}catch(Ae){ee.error("Hata: "+((Ae==null?void 0:Ae.message)||"Bilinmeyen hata"))}return}d(!0);try{const Ae={courseId:y.id,paymentType:ue,billingInterval:ue==="subscription"?h:void 0,subscriptionScope:ue==="subscription"?m:void 0},{data:Ce,error:Ye}=yield Q.functions.invoke("create-checkout",{body:Ae});if(Ye)throw Ye;Ce!=null&&Ce.url&&window.open(Ce.url,"_blank")}catch(Ae){ee.error("Ödeme başlatılamadı: "+(Ae.message||"Bilinmeyen hata"))}d(!1)}),300);return()=>clearTimeout(ae)}},[r,y,_]),j)return l.jsx("main",{className:"pt-20 section-padding text-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."})});if(!y)return l.jsxs("main",{className:"pt-20 section-padding text-center",children:[l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Eğitim Bulunamadı"}),k&&l.jsxs("p",{className:"text-muted-foreground text-sm mb-4",children:["Hata: ",(k==null?void 0:k.message)||"Bilinmeyen hata"]}),l.jsx(de,{to:"/egitimler",className:"btn-primary",children:"Eğitimlere Dön"})]});const me=()=>T(this,null,function*(){var ae,he;if(G==="free"){if(r)try{yield i(y.id),ee.success("Eğitim başarıyla eklendi! Tüm derslere erişiminiz aktif.")}catch(ue){ee.error("Hata: "+((ue==null?void 0:ue.message)||"Bilinmeyen hata"))}else u(!0);return}if(G==="subscription"){if(!r){s(!0);return}yield te({});return}if(r){yield te({fullName:((ae=r.user_metadata)==null?void 0:ae.full_name)||"",email:r.email||"",phone:((he=r.user_metadata)==null?void 0:he.phone)||""});return}u(!0)}),Ke=ae=>T(this,null,function*(){var he,ue,Ae;d(!0);try{const{error:Ce}=yield Q.from("course_registrations").insert({course_id:y.id,user_id:null,full_name:ae.fullName,email:ae.email,phone:ae.phone,region:(he=ae.region)!=null?he:null,profession:(ue=ae.profession)!=null?ue:null,birth_date:ae.birthDate||null,heard_from:(Ae=ae.heardFrom)!=null?Ae:null,amount:0,currency:"TRY",payment_type:"free",status:"paid"});if(Ce)throw Ce;ee.success("Kayıt tamamlandı! Bilgileriniz alındı, en kısa sürede sizinle iletişime geçeceğiz."),u(!1)}catch(Ce){ee.error("Kayıt başarısız: "+(Ce.message||"Bilinmeyen hata"))}d(!1)}),te=ae=>T(this,null,function*(){d(!0);try{const he=N({courseId:y.id,paymentType:G,billingInterval:G==="subscription"?h:void 0,subscriptionScope:G==="subscription"?m:void 0},ae),{data:ue,error:Ae}=yield Q.functions.invoke("create-checkout",{body:he});if(Ae)throw Ae;if(ue!=null&&ue.url)window.open(ue.url,"_blank"),u(!1);else if(ue!=null&&ue.error)throw new Error(ue.error)}catch(he){ee.error("Ödeme başlatılamadı: "+(he.message||"Bilinmeyen hata"))}d(!1)}),ie=()=>{b.current=!0,u(!1)},we=()=>G==="free"?"Ücretsiz":G==="deposit"?"₺".concat(y.deposit_amount||0):G==="subscription"?m==="course"?h==="year"?"₺".concat(y.subscription_yearly_price||0,"/yıl"):"₺".concat(y.subscription_monthly_price||0,"/ay"):h==="year"?"₺".concat((K==null?void 0:K.subscription_yearly_price)||0,"/yıl"):"₺".concat((K==null?void 0:K.subscription_monthly_price)||0,"/ay"):"₺".concat(y.price),J=()=>G==="free"?"Ücretsiz Kayıt Ol":G==="deposit"?"Yer Ayırt (Ön Ödeme)":G==="subscription"?"Abone Ol":"Satın Al",Pe=()=>G==="free"?l.jsx(DT,{size:16}):G==="deposit"?l.jsx(i7,{size:16}):G==="subscription"?l.jsx(l7,{size:16}):l.jsx(DT,{size:16}),je=()=>G==="free"?"Bu eğitim ücretsizdir. Hemen başlayabilirsiniz.":G==="deposit"?"Yer ayırtma ön ödemesi. Toplam eğitim ücreti: ₺".concat(y.price):G==="subscription"?m==="course"?"Sadece bu eğitime abonelik erişimi.":"".concat(K==null?void 0:K.name," kategorisindeki tüm eğitimlere sınırsız erişim."):"Satın aldıktan sonra tüm derslere sınırsız erişim kazanırsınız.",De=()=>re==="online_course"?l.jsxs("div",{className:"mt-8 space-y-4 text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Toplam Süre"}),l.jsx("span",{className:"font-medium text-foreground",children:y.total_duration})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Ders Sayısı"}),l.jsx("span",{className:"font-medium text-foreground",children:y.lessons.length})]}),l.jsx(ls,{instructor:y.instructor,variant:"sidebar"}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Erişim"}),l.jsx("span",{className:"font-medium text-foreground",children:G==="subscription"?"Abonelik süresince":"Sınırsız"})]})]}):re==="live_online"?l.jsxs("div",{className:"mt-8 space-y-4 text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Etkinlik Türü"}),l.jsx("span",{className:"font-medium text-foreground",children:"Canlı Online Eğitim"})]}),y.event_date&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Tarih"}),l.jsx("span",{className:"font-medium text-foreground",children:Ja(y.event_date)})]}),y.start_time&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Saat"}),l.jsxs("span",{className:"font-medium text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Platform"}),l.jsx("span",{className:"font-medium text-foreground",children:"Zoom"})]}),l.jsx(ls,{instructor:y.instructor,variant:"sidebar"}),y.capacity&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Kontenjan"}),l.jsxs("span",{className:"font-medium text-foreground",children:[y.capacity," kişi"]})]}),y.has_replay&&y.replay_days&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Tekrar İzleme"}),l.jsxs("span",{className:"font-medium text-foreground",children:[y.replay_days," gün"]})]})]}):re==="camp"?l.jsxs("div",{className:"mt-8 space-y-4 text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Etkinlik Türü"}),l.jsx("span",{className:"font-medium text-foreground",children:"Kamp"})]}),y.event_date&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Tarih"}),l.jsxs("span",{className:"font-medium text-foreground",children:[Ja(y.event_date),y.event_end_date?" – ".concat(Ja(y.event_end_date)):""]})]}),y.start_time&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Saat"}),l.jsxs("span",{className:"font-medium text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),y.venue_name&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Mekan"}),l.jsx("span",{className:"font-medium text-foreground",children:y.venue_name})]}),y.city&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Şehir"}),l.jsx("span",{className:"font-medium text-foreground",children:y.city})]}),y.capacity&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Kontenjan"}),l.jsxs("span",{className:"font-medium text-foreground",children:[y.capacity," kişi"]})]})]}):l.jsxs("div",{className:"mt-8 space-y-4 text-sm text-muted-foreground",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Etkinlik Türü"}),l.jsx("span",{className:"font-medium text-foreground",children:"Yüz Yüze Eğitim"})]}),y.event_date&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Tarih"}),l.jsx("span",{className:"font-medium text-foreground",children:Ja(y.event_date)})]}),y.start_time&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Saat"}),l.jsxs("span",{className:"font-medium text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),y.venue_name&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Mekan"}),l.jsx("span",{className:"font-medium text-foreground",children:y.venue_name})]}),y.city&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Şehir"}),l.jsx("span",{className:"font-medium text-foreground",children:y.city})]}),l.jsx(ls,{instructor:y.instructor,variant:"sidebar"}),y.capacity&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{children:"Kontenjan"}),l.jsxs("span",{className:"font-medium text-foreground",children:[y.capacity," kişi"]})]})]}),Re=()=>re==="online_course"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap gap-6 text-muted-foreground text-sm mb-10",children:[l.jsx(ls,{instructor:y.instructor,variant:"inline"}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Ta,{size:16})," ",y.total_duration]}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx($f,{size:16})," ",y.lessons.length," ders"]})]}),l.jsxs("div",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:"Ders İçeriği"}),l.jsx("div",{className:"space-y-3",children:y.lessons.map((ae,he)=>l.jsx(doe,{title:"".concat(he+1,". ").concat(ae.title),duration:ae.duration,audioUrl:ae.audio_url,locked:!S},ae.id))})]})]}):re==="live_online"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap gap-6 text-muted-foreground text-sm mb-10",children:[l.jsx(ls,{instructor:y.instructor,variant:"inline"}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(s1,{size:16})," Canlı Zoom Eğitimi"]})]}),l.jsxs("div",{className:"p-6 rounded-2xl bg-blue-500/5 border border-blue-500/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(Bi,{size:16,className:"text-blue-500"})," Etkinlik Bilgileri"]}),l.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[y.event_date&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Tarih"}),l.jsx("p",{className:"font-heading font-semibold text-foreground",children:Ja(y.event_date)})]}),y.start_time&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Saat"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Platform"}),l.jsx("p",{className:"font-heading font-semibold text-foreground",children:"Zoom"})]})]})]}),S&&(E==null?void 0:E.zoom_link)&&l.jsxs("div",{className:"p-6 rounded-2xl bg-primary/5 border border-primary/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[l.jsx(Mz,{size:16,className:"text-primary"})," Zoom Erişim Bilgileri"]}),l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-muted-foreground",children:"Link:"}),l.jsx("a",{href:E.zoom_link,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline break-all",children:E.zoom_link})]}),E.zoom_meeting_id&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-muted-foreground",children:"Meeting ID:"}),l.jsx("span",{className:"text-foreground font-mono",children:E.zoom_meeting_id})]}),E.zoom_password&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-muted-foreground",children:"Şifre:"}),l.jsx("span",{className:"text-foreground font-mono",children:E.zoom_password})]})]})]}),y.has_replay&&y.replay_days&&(()=>{const ae=y.event_date?new Date(y.event_date):null,he=ae?new Date(ae.getTime()+y.replay_days*24*60*60*1e3):null,ue=new Date,Ae=he?ue>he:!1,Ce=he?Math.max(0,Math.ceil((he.getTime()-ue.getTime())/(1e3*60*60*24))):null;return l.jsxs("div",{className:"space-y-3 mb-8",children:[l.jsxs("div",{className:"p-4 rounded-xl bg-secondary text-sm text-foreground flex items-center gap-2",children:[l.jsx(Tu,{size:16,className:"text-primary shrink-0"}),Ae?"Tekrar izleme süresi sona erdi.":Ce!==null?"Kayıt ".concat(y.replay_days," gün boyunca izlenebilir. (").concat(Ce," gün kaldı)"):"Kayıt ".concat(y.replay_days," gün boyunca izlenebilir.")]}),S&&(E==null?void 0:E.replay_video_url)&&!Ae&&l.jsxs("div",{className:"p-4 rounded-xl bg-primary/5 border border-primary/20 text-sm",children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Kayıt Tekrarı:"}),l.jsx("a",{href:E.replay_video_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline break-all",children:E.replay_video_url})]})]})})()]}):re==="camp"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex flex-wrap gap-6 text-muted-foreground text-sm mb-10",children:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Qd,{size:16})," Kamp"]})}),y.instructor&&y.instructor.split(",").length>1&&l.jsx(ls,{instructor:y.instructor,variant:"card"}),l.jsxs("div",{className:"p-6 rounded-2xl bg-emerald-500/5 border border-emerald-500/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(Bi,{size:16,className:"text-emerald-500"})," Etkinlik Bilgileri"]}),l.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[y.event_date&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Tarih"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[Ja(y.event_date),y.event_end_date?" – ".concat(Ja(y.event_end_date)):""]})]}),y.start_time&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Saat"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),y.capacity&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Kontenjan"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[H," / ",y.capacity," kişi"]}),H>=y.capacity&&l.jsx("p",{className:"text-xs text-destructive font-medium mt-1",children:"Kontenjan Doldu"})]})]})]}),(y.venue_name||y.address||y.city)&&l.jsxs("div",{className:"p-6 rounded-2xl bg-emerald-500/5 border border-emerald-500/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx($i,{size:16,className:"text-emerald-500"})," Konum Bilgileri"]}),l.jsxs("div",{className:"space-y-3 text-sm",children:[y.venue_name&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Mekan: "}),l.jsx("span",{className:"text-foreground font-medium",children:y.venue_name})]}),y.address&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Adres: "}),l.jsx("span",{className:"text-foreground",children:y.address})]}),y.city&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Şehir: "}),l.jsx("span",{className:"text-foreground",children:y.city})]})]}),y.maps_link&&l.jsx("div",{className:"mt-4",children:l.jsxs("a",{href:y.maps_link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline flex items-center gap-1.5",children:[l.jsx($i,{size:14})," Google Maps'te Göster"]})})]}),y.accommodation_info&&l.jsx(_O,{text:y.accommodation_info}),(y.participant_notes||y.what_to_bring)&&l.jsxs("div",{className:"p-6 rounded-2xl bg-secondary border border-border mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(i1,{size:16,className:"text-muted-foreground"})," Ek Bilgiler"]}),y.participant_notes&&l.jsxs("div",{className:"mb-3",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Katılımcı Notları"}),l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:y.participant_notes})]}),y.what_to_bring&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Ne Getirilmeli"}),l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:y.what_to_bring})]})]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap gap-6 text-muted-foreground text-sm mb-10",children:[l.jsx(ls,{instructor:y.instructor,variant:"inline"}),l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx($i,{size:16})," Yüz Yüze Eğitim"]})]}),l.jsxs("div",{className:"p-6 rounded-2xl bg-orange-500/5 border border-orange-500/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(Bi,{size:16,className:"text-orange-500"})," Etkinlik Bilgileri"]}),l.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[y.event_date&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Tarih"}),l.jsx("p",{className:"font-heading font-semibold text-foreground",children:Ja(y.event_date)})]}),y.start_time&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Saat"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[_n(y.start_time),y.end_time?" – ".concat(_n(y.end_time)):""]})]}),y.capacity&&l.jsxs("div",{className:"text-center p-4 rounded-xl bg-background",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Kontenjan"}),l.jsxs("p",{className:"font-heading font-semibold text-foreground",children:[y.capacity," kişi"]})]})]})]}),l.jsxs("div",{className:"p-6 rounded-2xl bg-orange-500/5 border border-orange-500/20 mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx($i,{size:16,className:"text-orange-500"})," Konum Bilgileri"]}),l.jsxs("div",{className:"space-y-3 text-sm",children:[y.venue_name&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Mekan: "}),l.jsx("span",{className:"text-foreground font-medium",children:y.venue_name})]}),y.address&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Adres: "}),l.jsx("span",{className:"text-foreground",children:y.address})]}),y.city&&l.jsxs("div",{children:[l.jsx("span",{className:"text-muted-foreground",children:"Şehir: "}),l.jsx("span",{className:"text-foreground",children:y.city})]})]}),y.maps_link&&l.jsxs("div",{className:"mt-4",children:[l.jsxs("a",{href:y.maps_link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline flex items-center gap-1.5",children:[l.jsx($i,{size:14})," Google Maps'te Göster"]}),y.maps_link.includes("google.com/maps")&&l.jsx("div",{className:"mt-3 rounded-xl overflow-hidden border border-border",children:l.jsx("iframe",{src:y.maps_link.replace("/maps/","/maps/embed/"),width:"100%",height:"250",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})]})]}),y.accommodation_info&&l.jsx(_O,{text:y.accommodation_info}),(y.participant_notes||y.what_to_bring)&&l.jsxs("div",{className:"p-6 rounded-2xl bg-secondary border border-border mb-8",children:[l.jsxs("h2",{className:"text-sm font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(i1,{size:16,className:"text-muted-foreground"})," Ek Bilgiler"]}),y.participant_notes&&l.jsxs("div",{className:"mb-3",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Katılımcı Notları"}),l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:y.participant_notes})]}),y.what_to_bring&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Ne Getirilmeli"}),l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:y.what_to_bring})]})]})]}),q=N(N({"@context":"https://schema.org","@type":"Course",name:y.title,description:y.short_description||y.full_description||"",provider:{"@type":"Organization",name:"Mind Soul Academy",sameAs:"https://mindsoulacademy.life"}},y.instructor?{instructor:{"@type":"Person",name:y.instructor}}:{}),y.cover_image?{image:y.cover_image}:{});return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:y.title,description:(y.short_description||"".concat(y.title," - Mind Soul Academy eğitimi. Detaylı bilgi ve kayıt için tıklayın.")).substring(0,155)+((y.short_description||"").length>155?"...":""),canonical:"/egitim/".concat(y.slug),ogImage:y.cover_image||void 0,schemaJson:q}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsx(wn,{items:[{label:"Eğitimler",href:"/egitimler"},...K?[{label:K.name,href:"/kategori/".concat(K.slug)}]:[],{label:y.title}]}),l.jsxs(de,{to:"/egitimler",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground text-sm mb-8 transition-colors",children:[l.jsx(Ys,{size:16})," Eğitimlere Dön"]}),l.jsxs("div",{className:"grid lg:grid-cols-5 gap-12",children:[l.jsxs(pe.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.7},className:"lg:col-span-3",children:[re==="camp"&&M.length>1?l.jsxs("div",{className:"rounded-3xl overflow-hidden mb-8 relative",children:[l.jsx("img",{src:((oe=M[F])==null?void 0:oe.image_url)||y.cover_image,alt:y.title,className:"w-full object-cover transition-opacity duration-300",style:{aspectRatio:"4/3"}}),l.jsx("button",{onClick:()=>O(ae=>(ae-1+M.length)%M.length),className:"absolute left-3 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-black/40 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/60 transition-colors",children:l.jsx(o7,{size:20})}),l.jsx("button",{onClick:()=>O(ae=>(ae+1)%M.length),className:"absolute right-3 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-black/40 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/60 transition-colors",children:l.jsx(Oz,{size:20})}),l.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2",children:M.map((ae,he)=>l.jsx("button",{onClick:()=>O(he),className:"w-2.5 h-2.5 rounded-full transition-all ".concat(he===F?"bg-white scale-110":"bg-white/50")},he))}),l.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium backdrop-blur-md bg-emerald-500/20 text-emerald-600",children:[l.jsx(Qd,{size:14})," ",kO[re]]}),l.jsxs("div",{className:"absolute top-4 right-4 px-3 py-1.5 rounded-full text-xs font-medium backdrop-blur-md bg-black/40 text-white",children:[F+1," / ",M.length]})]}):l.jsxs("div",{className:"rounded-3xl overflow-hidden mb-8 relative",children:[l.jsx("img",{src:y.cover_image,alt:y.title,className:"w-full object-cover",style:{aspectRatio:"4/3"}}),l.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium backdrop-blur-md ".concat(re==="live_online"?"bg-blue-500/20 text-blue-600":re==="face_to_face"?"bg-orange-500/20 text-orange-600":re==="camp"?"bg-emerald-500/20 text-emerald-600":"bg-primary/20 text-primary"),children:[re==="live_online"?l.jsx(s1,{size:14}):re==="face_to_face"?l.jsx($i,{size:14}):re==="camp"?l.jsx(Qd,{size:14}):l.jsx($f,{size:14}),kO[re]]})]}),l.jsx(de,{to:K?"/kategori/".concat(K.slug):"/egitimler",className:"badge-category mb-4 inline-block hover:opacity-80 transition-opacity",children:Y}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:y.title}),l.jsx("div",{className:"text-body text-muted-foreground mb-8 prose prose-sm max-w-none [&_a]:text-primary [&_a]:underline [&_a]:hover:text-primary/80",dangerouslySetInnerHTML:{__html:y.full_description||""}}),Re()]}),l.jsx(pe.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.7,delay:.2},className:"lg:col-span-2",children:l.jsxs("div",{className:"sticky top-28 p-8 rounded-3xl bg-card border border-border",children:[re==="camp"?P?l.jsx("div",{ref:z,children:D?l.jsx(noe,{registration:D,courseTitle:y.title}):l.jsxs("div",{className:"text-center py-4",children:[l.jsx(Kn,{size:48,className:"mx-auto text-green-500 mb-4"}),l.jsx("h2",{className:"heading-card text-foreground mb-2",children:"Kayıt Başarılı!"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Onay e-postanız gönderildi."})]})}):le?l.jsx(kse,{courseId:y.id,courseTitle:y.title,packages:C,capacity:y.capacity,paidCount:H}):l.jsxs("div",{className:"text-center py-6",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-muted/40 mx-auto mb-4 flex items-center justify-center",children:l.jsx(Bi,{size:24,className:"text-muted-foreground"})}),l.jsx("h2",{className:"heading-card text-foreground mb-2",children:"Yakında"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Bu kamp için kayıtlar yakında açılacak."})]}):l.jsxs(l.Fragment,{children:[G==="subscription"&&!S&&(y.subscription_monthly_price||0)>0&&l.jsxs("div",{className:"mb-4",children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-2 text-center",children:"Abonelik Kapsamı"}),l.jsxs("div",{className:"flex rounded-xl bg-secondary p-1 mb-4",children:[l.jsx("button",{onClick:()=>g("course"),className:"flex-1 py-2 rounded-lg text-xs font-medium transition-all ".concat(m==="course"?"bg-primary text-primary-foreground":"text-muted-foreground"),children:"Sadece Bu Kurs"}),l.jsxs("button",{onClick:()=>g("category"),className:"flex-1 py-2 rounded-lg text-xs font-medium transition-all ".concat(m==="category"?"bg-primary text-primary-foreground":"text-muted-foreground"),children:["Tüm ",K==null?void 0:K.name]})]})]}),G==="subscription"&&!S&&l.jsxs("div",{className:"flex rounded-xl bg-secondary p-1 mb-6",children:[l.jsx("button",{onClick:()=>p("month"),className:"flex-1 py-2 rounded-lg text-sm font-medium transition-all ".concat(h==="month"?"bg-primary text-primary-foreground":"text-muted-foreground"),children:"Aylık"}),l.jsx("button",{onClick:()=>p("year"),className:"flex-1 py-2 rounded-lg text-sm font-medium transition-all ".concat(h==="year"?"bg-primary text-primary-foreground":"text-muted-foreground"),children:"Yıllık"})]}),l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("span",{className:"font-heading text-4xl font-semibold text-foreground",children:we()}),G==="deposit"&&l.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Toplam: ₺",y.price]})]}),S?l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"btn-primary w-full text-center mb-3 bg-sage",children:"✓ Erişim Aktif"}),l.jsx("p",{className:"text-small text-muted-foreground",children:re==="online_course"?"Bu eğitime erişiminiz aktif. Yukarıdaki dersleri dinleyebilirsiniz.":re==="live_online"?"Bu etkinliğe kaydınız tamamlandı. Zoom bilgileriniz yukarıda görüntülenmektedir.":"Bu etkinliğe kaydınız tamamlandı."})]}):l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:me,disabled:f||!le,className:"btn-primary w-full text-center mb-3 flex items-center justify-center gap-2 ".concat(le?"":"opacity-50 cursor-not-allowed grayscale"),children:f?"İşleniyor...":le?l.jsxs(l.Fragment,{children:[Pe()," ",J()]}):"Yakında"}),le?l.jsx("p",{className:"text-small text-muted-foreground text-center",children:je()}):l.jsx("p",{className:"text-small text-muted-foreground text-center",children:"Bu eğitim satın alınmaya yakında açılacak."})]})]}),De()]})})]})]})}),!S&&re!=="camp"&&l.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-50 bg-card/95 backdrop-blur-md border-t border-border shadow-[0_-4px_20px_-4px_hsl(var(--foreground)/0.08)]",children:l.jsxs("div",{className:"container-wide mx-auto px-4 py-3 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"font-heading font-semibold text-foreground truncate text-sm sm:text-base",children:y.title}),l.jsx("p",{className:"font-heading text-lg sm:text-xl font-bold text-primary",children:we()})]}),l.jsx("button",{onClick:me,disabled:f||!le,className:"btn-primary shrink-0 flex items-center gap-2 text-sm sm:text-base ".concat(le?"":"opacity-50 cursor-not-allowed grayscale"),children:f?"İşleniyor...":le?l.jsxs(l.Fragment,{children:[Pe()," ",J()]}):"Yakında"})]})}),!S&&!v&&re!=="camp"&&l.jsx("div",{className:"h-20"}),v&&l.jsx("div",{className:"fixed inset-0 z-[60] bg-black/50 backdrop-blur-sm flex items-center justify-center p-4",children:l.jsxs(pe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"bg-card rounded-2xl border border-border shadow-2xl max-w-md w-full p-8",children:[l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mx-auto mb-4",children:l.jsx(Kn,{className:"text-green-500",size:32})}),l.jsx("h2",{className:"text-xl font-heading font-bold text-foreground mb-1",children:"Ön Kayıt Onaylandı!"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Bilet bilgileriniz e-posta adresinize gönderildi."})]}),l.jsxs("div",{className:"bg-primary/5 border-2 border-dashed border-primary/30 rounded-xl p-6 text-center mb-6",children:[l.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-2",children:"Bilet Numaranız"}),l.jsx("p",{className:"font-mono text-2xl font-bold text-primary tracking-wider",children:v.ticketNumber})]}),l.jsxs("div",{className:"space-y-3 text-sm mb-6",children:[l.jsxs("div",{className:"flex justify-between py-2 border-b border-border",children:[l.jsx("span",{className:"text-muted-foreground",children:"Eğitim"}),l.jsx("span",{className:"font-medium text-foreground",children:v.courseName})]}),l.jsxs("div",{className:"flex justify-between py-2 border-b border-border",children:[l.jsx("span",{className:"text-muted-foreground",children:"Ön Ödeme"}),l.jsxs("span",{className:"font-medium text-foreground",children:["₺",v.amount]})]}),l.jsxs("div",{className:"flex justify-between py-2",children:[l.jsx("span",{className:"text-muted-foreground",children:"Durum"}),l.jsx("span",{className:"font-medium text-green-600",children:"Onaylandı ✓"})]})]}),l.jsxs("div",{className:"flex gap-3",children:[l.jsxs("button",{onClick:()=>{navigator.clipboard.writeText(v.ticketNumber),ee.success("Bilet numarası kopyalandı!")},className:"flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm font-medium hover:bg-secondary transition-colors",children:[l.jsx(mS,{size:16})," Kopyala"]}),l.jsx("button",{onClick:()=>{x(null),window.location.href="/egitim/".concat(y.slug)},className:"flex-1 btn-primary text-center",children:"Tamam"})]})]})}),l.jsx(bse,{open:o,onOpenChange:s,onSuccess:ie}),l.jsx(_se,{open:c,onClose:()=>u(!1),onSubmit:ae=>G==="free"?Ke(ae):te(ae),defaultEmail:(r==null?void 0:r.email)||"",defaultName:((ke=r==null?void 0:r.user_metadata)==null?void 0:ke.full_name)||"",defaultPhone:((Ie=r==null?void 0:r.user_metadata)==null?void 0:Ie.phone)||"",loading:f,title:G==="free"?"Ücretsiz Kayıt":G==="deposit"?"Yer Ayırt - Ön Ödeme":"Eğitimi Satın Al",subtitle:G==="free"?"Bu eğitime ücretsiz kaydolmak için iletişim bilgilerinizi girin.":"Hesap açmadan ödeme yapabilirsiniz. İletişim bilgileriniz gerekli.",submitLabel:G==="free"?"Ücretsiz Kayıt Ol":"Ödemeye Devam Et",showLoginLink:!r,showExtraFields:G==="free",onLoginClick:()=>{u(!1),s(!0)}})]})}const hm={initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7}};function Sse(){return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Hakkımızda",description:"Mind Soul Academy'nin vizyonu, misyonu ve değerleri. Meditasyon ve kişisel gelişim alanında ses temelli dijital eğitimler sunan platformumuz hakkında bilgi edinin.",canonical:"/hakkimizda",ogImage:hk}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(wn,{items:[{label:"Hakkımızda"}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Hakkımızda"}),l.jsx("h1",{className:"heading-section text-foreground mb-6",children:"MindSoul Academy"})]})]})}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto grid lg:grid-cols-2 gap-16 items-center",children:[l.jsx(pe.div,I(N({},hm),{children:l.jsx("div",{className:"rounded-3xl overflow-hidden",children:l.jsx("img",{src:hk,alt:"Mind Soul Academy",className:"w-full object-cover"})})})),l.jsxs(pe.div,I(N({},hm),{transition:{duration:.7,delay:.2},children:[l.jsx("h2",{className:"heading-section text-foreground mb-6",children:"Biz Kimiz?"}),l.jsxs("p",{className:"text-body text-muted-foreground leading-relaxed",children:["MindSoul Academy, Gamana Danışmanlık ve Koçluk Merkezi Direktörü ",l.jsx("strong",{className:"text-foreground",children:"İpek Kabidan"})," tarafından kurulmuştur. Türkiye ve Kıbrıs başta olmak üzere çeşitli kitlelere temas ederek, çok çeşitli konularda yüzlerce kişiye eğitim fırsatı sunmaktadır. Kişisel Gelişim ve Psikoloji alanlarında yaygın bir pazar üstünlüğü bulunan platform ayrıca inziva kampları, atölyeler ve bireysel eğitim fırsatları da sunmaktadır."]})]}))]})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsx("div",{className:"container-wide mx-auto",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-10 max-w-5xl mx-auto",children:[l.jsxs(pe.div,I(N({},hm),{className:"p-8 md:p-10 rounded-2xl bg-background border border-border",children:[l.jsx("div",{className:"w-14 h-14 rounded-2xl bg-sage-light flex items-center justify-center mb-6",children:l.jsx(Tu,{size:24,className:"text-primary"})}),l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Vizyon"}),l.jsx("p",{className:"text-body text-muted-foreground leading-relaxed",children:"Toplumun fiziksel, zihinsel, duygusal ve ruhsal sağlığını bütüncül bir yaklaşımla iyileştirmek ve sürdürülebilir kılmak için dünya çapında lider ve yenilikçi bir eğitim kurumu olmak. Eğitim programlarımızla, bireylerin ve sağlık profesyonellerinin bilgi, beceri ve farkındalıklarını artırarak, sağlıklı yaşam kültürünü yaygınlaştırmak ve sağlıklı nesiller yetiştirilmesine katkıda bulunmak."})]})),l.jsxs(pe.div,I(N({},hm),{transition:{duration:.7,delay:.15},className:"p-8 md:p-10 rounded-2xl bg-background border border-border",children:[l.jsx("div",{className:"w-14 h-14 rounded-2xl bg-sage-light flex items-center justify-center mb-6",children:l.jsx(P7,{size:24,className:"text-primary"})}),l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Misyon"}),l.jsx("p",{className:"text-body text-muted-foreground leading-relaxed",children:"MindSoul Academy; multidisipliner yaklaşımı benimsemiş bir platformdur. Farklı disiplinlerden uzmanları bir araya getirerek, zihinsel, ruhsal ve fiziksel sağlık sorunlarını kapsamlı bir şekilde ele almayı amaçlamıştır. Bu da biyolojik, psikolojik ve sosyal faktörleri dikkate alan bütüncül bir yaklaşımı içermektedir."})]}))]})})}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto text-center",children:[l.jsx("h2",{className:"heading-card text-foreground mb-4",children:"Daha Fazla Keşfedin"}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[l.jsx(de,{to:"/ipek-kabidan",className:"btn-outline",children:"İpek Kabidan Kimdir?"}),l.jsx(de,{to:"/egitimler",className:"btn-primary",children:"Eğitimleri Keşfet"}),l.jsx(de,{to:"/blog",className:"btn-outline",children:"Blog Yazıları"})]})]})})]})}function Ese(){const e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:mk.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))};return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Sık Sorulan Sorular",description:"Mind Soul Academy eğitimleri, üyelik, ödeme ve erişim hakkında merak ettiğiniz tüm soruların yanıtları.",canonical:"/sss",schemaJson:e}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(wn,{items:[{label:"Sık Sorulan Sorular"}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Yardım Merkezi"}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Sık Sorulan Sorular"}),l.jsx("p",{className:"text-body text-muted-foreground",children:"Merak ettiğiniz soruların yanıtlarını burada bulabilirsiniz."})]}),l.jsx(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,delay:.2},children:l.jsx(g5,{type:"single",collapsible:!0,className:"space-y-3",children:mk.map((t,r)=>l.jsxs(EE,{value:"faq-".concat(r),className:"border border-border rounded-xl px-6 data-[state=open]:bg-secondary/30",children:[l.jsx(NE,{className:"text-left font-heading text-lg font-medium py-5 hover:no-underline",children:t.question}),l.jsx(CE,{className:"text-muted-foreground text-body pb-5",children:t.answer})]},r))})})]})})]})}function Nse(){const[e,t]=w.useState({name:"",email:"",message:""}),[r,n]=w.useState(!1),i=a=>T(this,null,function*(){if(a.preventDefault(),!e.name.trim()||!e.email.trim()||!e.message.trim()){ee.error("Lütfen tüm alanları doldurun.");return}n(!0);const{error:o}=yield Q.from("contact_messages").insert({name:e.name.trim().slice(0,100),email:e.email.trim().slice(0,255),message:e.message.trim().slice(0,2e3)});n(!1),o?ee.error("Mesaj gönderilemedi. Lütfen tekrar deneyin."):(ee.success("Mesajınız başarıyla gönderildi. En kısa sürede sizinle iletişime geçeceğiz."),t({name:"",email:"",message:""}))});return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"İletişim",description:"Mind Soul Academy ile iletişime geçin. Sorularınız, önerileriniz veya işbirliği talepleriniz için bize ulaşın.",canonical:"/iletisim"}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(wn,{items:[{label:"İletişim"}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Bize Ulaşın"}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"İletişim"}),l.jsx("p",{className:"text-body text-muted-foreground",children:"Sorularınız veya önerileriniz için bizimle iletişime geçebilirsiniz."})]}),l.jsxs("div",{className:"grid lg:grid-cols-5 gap-12",children:[l.jsx(pe.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.7},className:"lg:col-span-3",children:l.jsxs("form",{onSubmit:i,className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Adınız Soyadınız"}),l.jsx("input",{type:"text",value:e.name,onChange:a=>t(I(N({},e),{name:a.target.value})),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all",placeholder:"Adınızı giriniz"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta Adresiniz"}),l.jsx("input",{type:"email",value:e.email,onChange:a=>t(I(N({},e),{email:a.target.value})),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all",placeholder:"ornek@mail.com"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Mesajınız"}),l.jsx("textarea",{value:e.message,onChange:a=>t(I(N({},e),{message:a.target.value})),required:!0,rows:5,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all resize-none",placeholder:"Mesajınızı yazınız..."})]}),l.jsx("button",{type:"submit",disabled:r,className:"btn-primary",children:r?"Gönderiliyor...":"Mesaj Gönder"})]})}),l.jsxs(pe.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.7,delay:.2},className:"lg:col-span-2 space-y-8",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"w-12 h-12 rounded-xl bg-sage-light flex items-center justify-center shrink-0",children:l.jsx(Yc,{size:20,className:"text-primary"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-foreground mb-1",children:"E-posta"}),l.jsx("a",{href:"mailto:mindsoulacademy@outlook.com",className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:"mindsoulacademy@outlook.com"})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"w-12 h-12 rounded-xl bg-sage-light flex items-center justify-center shrink-0",children:l.jsx(S7,{size:20,className:"text-primary"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Telefon"}),l.jsx("a",{href:"tel:+905488432337",className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:"+90 548 843 23 37"})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"w-12 h-12 rounded-xl bg-sage-light flex items-center justify-center shrink-0",children:l.jsx($i,{size:20,className:"text-primary"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-foreground mb-1",children:"Konum"}),l.jsx("a",{href:"https://maps.app.goo.gl/vGnJbwKna2y6xh8H7",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:"Saziye Maltizlar Sk, Ali Arsun Apt. Daire 1, Lefkoşa"})]})]}),l.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[l.jsx("a",{href:"https://www.instagram.com/mindsoul.academy/",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-xl bg-sage-light flex items-center justify-center text-primary hover:bg-primary hover:text-primary-foreground transition-colors","aria-label":"Instagram",children:l.jsx(Dz,{size:18})}),l.jsx("a",{href:"https://wa.me/905488432337",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-xl bg-sage-light flex items-center justify-center text-primary hover:bg-primary hover:text-primary-foreground transition-colors","aria-label":"WhatsApp",children:l.jsx(xS,{size:18})}),l.jsx("a",{href:"mailto:mindsoulacademy@outlook.com",className:"w-11 h-11 rounded-xl bg-sage-light flex items-center justify-center text-primary hover:bg-primary hover:text-primary-foreground transition-colors","aria-label":"E-posta",children:l.jsx(Yc,{size:18})})]})]})]})]})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsx("div",{className:"container-narrow mx-auto",children:l.jsxs(pe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},children:[l.jsx("h2",{className:"heading-card text-foreground mb-6 text-center",children:"Bizi Ziyaret Edin"}),l.jsx("div",{className:"rounded-2xl overflow-hidden border border-border shadow-sm",children:l.jsx("iframe",{src:"https://maps.google.com/maps?q=KKTC+Profesyonel+Ko%C3%A7+ve+Dan%C4%B1%C5%9Fman+%C4%B0pek+Kabidan,+Saziye+maltizlar+sk+Ali+Arsun+apt+Lefko%C5%9Fa&t=&z=17&ie=UTF8&iwloc=B&output=embed",width:"100%",height:"400",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"MindSoul Academy Konum",className:"w-full"})})]})})})]})}function Cse(){const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(!1),{signIn:o}=Ua(),s=Mu(),c=u=>T(this,null,function*(){u.preventDefault(),a(!0);const{error:f}=yield o(e,r);a(!1),f?ee.error("Giriş başarısız. Lütfen bilgilerinizi kontrol edin."):(ee.success("Başarıyla giriş yaptınız!"),s("/panel"))});return l.jsxs("main",{className:"pt-20 min-h-screen flex items-center",children:[l.jsx(ct,{title:"Giriş Yap",description:"Mind Soul Academy hesabınıza giriş yapın.",canonical:"/giris",noIndex:!0}),l.jsx("div",{className:"container-narrow mx-auto px-4 py-16",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[l.jsxs(pe.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.7},className:"hidden lg:block",children:[l.jsx("h2",{className:"heading-section text-foreground mb-6",children:"Hoş Geldiniz"}),l.jsx("p",{className:"text-body text-muted-foreground",children:"Mind Soul Academy hesabınıza giriş yaparak satın aldığınız eğitimlere erişebilir, ses kayıtlarını dinleyebilir ve kişisel gelişim yolculuğunuza devam edebilirsiniz."})]}),l.jsx(pe.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.7},children:l.jsxs("div",{className:"p-8 md:p-10 rounded-3xl bg-card border border-border",children:[l.jsx("h1",{className:"heading-card text-foreground text-center mb-8",children:"Giriş Yap"}),l.jsxs("form",{onSubmit:c,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:e,onChange:u=>t(u.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"ornek@mail.com"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Şifre"}),l.jsx("input",{type:"password",value:r,onChange:u=>n(u.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"••••••••"})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx(de,{to:"/sifremi-unuttum",className:"text-xs text-primary hover:underline",children:"Şifremi Unuttum"})}),l.jsx("button",{type:"submit",disabled:i,className:"btn-primary w-full text-center",children:i?"Giriş yapılıyor...":"Giriş Yap"})]}),l.jsxs("p",{className:"text-sm text-muted-foreground text-center mt-6",children:["Hesabınız yok mu?"," ",l.jsx(de,{to:"/kayit",className:"text-primary font-medium hover:underline",children:"Kayıt Ol"})]})]})})]})})]})}function Tse(){const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(""),[o,s]=w.useState(""),[c,u]=w.useState(!1),{signUp:f}=Ua(),d=Mu(),h=p=>T(this,null,function*(){if(p.preventDefault(),o.length<6){ee.error("Şifre en az 6 karakter olmalıdır.");return}u(!0);const{error:m}=yield f(r,o,e,i.trim());u(!1),m?ee.error("Kayıt başarısız. Lütfen bilgilerinizi kontrol edin."):(ee.success("Kayıt başarılı! Hoş geldiniz."),d("/panel"))});return l.jsxs("main",{className:"pt-20 min-h-screen flex items-center",children:[l.jsx(ct,{title:"Kayıt Ol",description:"Mind Soul Academy'ye ücretsiz kayıt olun.",canonical:"/kayit",noIndex:!0}),l.jsx("div",{className:"container-narrow mx-auto px-4 py-16",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 items-center",children:[l.jsxs(pe.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.7},className:"hidden lg:block",children:[l.jsx("h2",{className:"heading-section text-foreground mb-6",children:"Yolculuğunuz Burada Başlıyor"}),l.jsx("p",{className:"text-body text-muted-foreground",children:"Mind Soul Academy'ye ücretsiz kayıt olarak meditasyon ve kişisel gelişim eğitimlerine erişmeye başlayın."})]}),l.jsx(pe.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.7},children:l.jsxs("div",{className:"p-8 md:p-10 rounded-3xl bg-card border border-border",children:[l.jsx("h1",{className:"heading-card text-foreground text-center mb-8",children:"Kayıt Ol"}),l.jsxs("form",{onSubmit:h,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ad Soyad"}),l.jsx("input",{type:"text",value:e,onChange:p=>t(p.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Adınız Soyadınız"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Telefon Numarası"}),l.jsx("input",{type:"tel",value:i,onChange:p=>a(p.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"05XX XXX XX XX"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:r,onChange:p=>n(p.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"ornek@mail.com"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Şifre"}),l.jsx("input",{type:"password",value:o,onChange:p=>s(p.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"En az 6 karakter"})]}),l.jsx("button",{type:"submit",disabled:c,className:"btn-primary w-full text-center",children:c?"Kayıt yapılıyor...":"Kayıt Ol"})]}),l.jsxs("p",{className:"text-sm text-muted-foreground text-center mt-6",children:["Zaten hesabınız var mı?"," ",l.jsx(de,{to:"/giris",className:"text-primary font-medium hover:underline",children:"Giriş Yap"})]})]})})]})})]})}function Ase(){const[e,t]=w.useState(""),[r,n]=w.useState(!1),[i,a]=w.useState(!1),o=s=>T(this,null,function*(){s.preventDefault(),n(!0);const{error:c}=yield Q.auth.resetPasswordForEmail(e,{redirectTo:"".concat(window.location.origin,"/sifre-sifirla")});n(!1),c?ee.error("Bir hata oluştu. Lütfen tekrar deneyin."):(a(!0),ee.success("Şifre sıfırlama bağlantısı e-posta adresinize gönderildi."))});return l.jsxs("main",{className:"pt-20 min-h-screen flex items-center",children:[l.jsx(ct,{title:"Şifremi Unuttum",description:"Mind Soul Academy şifre sıfırlama sayfası.",canonical:"/sifremi-unuttum",noIndex:!0}),l.jsx("div",{className:"container-narrow mx-auto px-4 py-16",children:l.jsx("div",{className:"max-w-md mx-auto",children:l.jsx(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7},children:l.jsxs("div",{className:"p-8 md:p-10 rounded-3xl bg-card border border-border",children:[l.jsxs(de,{to:"/giris",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground text-sm mb-6 transition-colors",children:[l.jsx(Ys,{size:16})," Giriş sayfasına dön"]}),l.jsx("h1",{className:"heading-card text-foreground mb-3",children:"Şifremi Unuttum"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-8",children:"E-posta adresinizi girin, size şifre sıfırlama bağlantısı gönderelim."}),i?l.jsxs("div",{className:"text-center py-6",children:[l.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:l.jsx("span",{className:"text-2xl",children:"✉️"})}),l.jsx("p",{className:"text-foreground font-medium mb-2",children:"E-posta gönderildi!"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.jsx("strong",{children:e})," adresine şifre sıfırlama bağlantısı gönderdik. Lütfen gelen kutunuzu kontrol edin."]})]}):l.jsxs("form",{onSubmit:o,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:e,onChange:s=>t(s.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"ornek@mail.com"})]}),l.jsx("button",{type:"submit",disabled:r,className:"btn-primary w-full text-center",children:r?"Gönderiliyor...":"Sıfırlama Bağlantısı Gönder"})]})]})})})})]})}function Pse(){const[e,t]=w.useState(""),[r,n]=w.useState(""),[i,a]=w.useState(!1),[o,s]=w.useState(!1),c=Mu();w.useEffect(()=>{const{data:{subscription:f}}=Q.auth.onAuthStateChange(h=>{h==="PASSWORD_RECOVERY"&&s(!0)});return window.location.hash.includes("type=recovery")&&s(!0),()=>f.unsubscribe()},[]);const u=f=>T(this,null,function*(){if(f.preventDefault(),e.length<6){ee.error("Şifre en az 6 karakter olmalıdır.");return}if(e!==r){ee.error("Şifreler eşleşmiyor.");return}a(!0);const{error:d}=yield Q.auth.updateUser({password:e});a(!1),d?ee.error("Şifre güncellenemedi. Lütfen tekrar deneyin."):(ee.success("Şifreniz başarıyla güncellendi!"),c("/panel"))});return o?l.jsxs("main",{className:"pt-20 min-h-screen flex items-center",children:[l.jsx(ct,{title:"Yeni Şifre Belirle",description:"Mind Soul Academy şifre güncelleme sayfası.",canonical:"/sifre-sifirla",noIndex:!0}),l.jsx("div",{className:"container-narrow mx-auto px-4 py-16",children:l.jsx("div",{className:"max-w-md mx-auto",children:l.jsx(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7},children:l.jsxs("div",{className:"p-8 md:p-10 rounded-3xl bg-card border border-border",children:[l.jsx("h1",{className:"heading-card text-foreground mb-3",children:"Yeni Şifre Belirle"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-8",children:"Hesabınız için yeni bir şifre belirleyin."}),l.jsxs("form",{onSubmit:u,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Yeni Şifre"}),l.jsx("input",{type:"password",value:e,onChange:f=>t(f.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"En az 6 karakter"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Şifre Tekrar"}),l.jsx("input",{type:"password",value:r,onChange:f=>n(f.target.value),required:!0,minLength:6,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Şifrenizi tekrar girin"})]}),l.jsx("button",{type:"submit",disabled:i,className:"btn-primary w-full text-center",children:i?"Güncelleniyor...":"Şifreyi Güncelle"})]})]})})})})]}):l.jsx("main",{className:"pt-20 min-h-screen flex items-center",children:l.jsx("div",{className:"container-narrow mx-auto px-4 py-16 text-center",children:l.jsxs(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[l.jsx("h1",{className:"heading-card text-foreground mb-4",children:"Geçersiz Bağlantı"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Bu şifre sıfırlama bağlantısı geçersiz veya süresi dolmuş. Lütfen tekrar deneyin."}),l.jsx("button",{onClick:()=>c("/sifremi-unuttum"),className:"btn-primary",children:"Yeni Bağlantı İste"})]})})})}function Ose(){var B;const{user:e,purchasedCourseIds:t,loading:r,signOut:n,emailVerified:i,refreshEmailVerified:a}=Ua(),{data:o=[]}=dl(),[s,c]=w.useState("courses"),[u,f]=w.useState(""),[d,h]=w.useState(""),[p,m]=w.useState(""),[g,v]=w.useState(!1),[x,b]=w.useState(""),[y,j]=w.useState(""),[k,_]=w.useState(""),[S,E]=w.useState(!1),[C,R]=w.useState(!1),[M,L]=w.useState(!1);if(w.useEffect(()=>{var z;e&&(f(((z=e.user_metadata)==null?void 0:z.full_name)||""),h(e.email||""),Q.from("profiles").select("phone").eq("id",e.id).single().then(({data:K})=>{K&&m(K.phone||"")}))},[e]),r)return l.jsx("div",{className:"min-h-screen pt-20 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."})});if(!e)return l.jsx(US,{to:"/giris"});const H=o.filter(z=>t.includes(z.id)),U=z=>T(this,null,function*(){z.preventDefault();const K=u.trim().slice(0,100),Y=d.trim().slice(0,255);if(!K){ee.error("Ad soyad boş olamaz.");return}v(!0);try{const{error:G}=yield Q.auth.updateUser({data:{full_name:K}});if(G)throw G;if(Y!==e.email){const{error:re}=yield Q.auth.updateUser({email:Y});if(re)throw re;ee.success("E-posta değişikliği için onay bağlantısı gönderildi.")}yield Q.from("profiles").update({full_name:K,email:Y,phone:p.trim().slice(0,20)||null}).eq("id",e.id),ee.success("Profil bilgileriniz güncellendi.")}catch(G){ee.error(G.message||"Profil güncellenirken hata oluştu.")}v(!1)}),F=z=>T(this,null,function*(){if(z.preventDefault(),y.length<6){ee.error("Yeni şifre en az 6 karakter olmalıdır.");return}if(y!==k){ee.error("Şifreler eşleşmiyor.");return}E(!0);try{const{error:K}=yield Q.auth.signInWithPassword({email:e.email,password:x});if(K){ee.error("Mevcut şifreniz yanlış."),E(!1);return}const{error:Y}=yield Q.auth.updateUser({password:y});if(Y)throw Y;ee.success("Şifreniz başarıyla güncellendi."),b(""),j(""),_("")}catch(K){ee.error(K.message||"Şifre güncellenirken hata oluştu.")}E(!1)}),O=()=>T(this,null,function*(){yield n(),ee.success("Çıkış yapıldı.")}),P=()=>T(this,null,function*(){L(!0);try{const{error:z}=yield Q.functions.invoke("send-verification-email");if(z)throw z;ee.success("Doğrulama e-postası gönderildi. Lütfen gelen kutunuzu kontrol edin.")}catch(z){ee.error("Doğrulama e-postası gönderilemedi.")}L(!1)}),A=[{id:"courses",label:"Eğitimlerim",icon:pS},{id:"profile",label:"Profilim",icon:Do},{id:"settings",label:"Ayarlar",icon:C7}],D="w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20";return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Panelim",description:"Mind Soul Academy kullanıcı paneli.",canonical:"/panel",noIndex:!0}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsxs(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[l.jsx("h1",{className:"heading-section text-foreground mb-2",children:"Hoş Geldiniz"}),l.jsx("p",{className:"text-body text-muted-foreground mb-4",children:((B=e.user_metadata)==null?void 0:B.full_name)||e.email}),!i&&l.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-2xl bg-amber-500/10 border border-amber-500/20 mb-10",children:[l.jsx(Yc,{size:20,className:"text-amber-600 shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:"E-posta adresiniz henüz doğrulanmadı."}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Hesabınızın güvenliği için e-postanızı doğrulayın."})]}),l.jsx("button",{onClick:P,disabled:M,className:"shrink-0 px-4 py-2 rounded-xl bg-amber-500 text-white text-xs font-medium hover:bg-amber-600 transition-colors disabled:opacity-50",children:M?"Gönderiliyor...":"Doğrulama Gönder"})]})]}),l.jsx("div",{className:"flex flex-wrap gap-2 mb-10 border-b border-border pb-4",children:A.map(z=>l.jsxs("button",{onClick:()=>c(z.id),className:"flex items-center gap-2 px-5 py-2.5 rounded-full text-sm font-medium transition-all duration-300 ".concat(s===z.id?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-secondary"),children:[l.jsx(z.icon,{size:16})," ",z.label]},z.id))}),s==="courses"&&l.jsxs("div",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:"Satın Aldığım Eğitimler"}),H.length===0?l.jsxs("div",{className:"text-center py-16",children:[l.jsx($f,{size:48,className:"text-muted-foreground/30 mx-auto mb-4"}),l.jsx("p",{className:"text-muted-foreground mb-4",children:"Henüz satın aldığınız bir eğitim bulunmamaktadır."}),l.jsx(de,{to:"/egitimler",className:"btn-primary",children:"Eğitimleri Keşfet"})]}):l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:H.map(z=>l.jsxs(de,{to:"/egitim/".concat(z.slug),className:"card-premium block group",children:[l.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:l.jsx("img",{src:z.cover_image,alt:z.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),l.jsxs("div",{className:"p-5",children:[l.jsx("h3",{className:"font-heading text-lg font-medium text-foreground group-hover:text-primary transition-colors",children:z.title}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[z.lessons.length," ders • ",z.total_duration]})]})]},z.id))})]}),s==="profile"&&l.jsx("div",{className:"max-w-lg",children:l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:"Profil Bilgileri"}),l.jsxs("form",{onSubmit:U,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ad Soyad"}),l.jsx("input",{type:"text",value:u,onChange:z=>f(z.target.value),required:!0,maxLength:100,className:D,placeholder:"Adınız Soyadınız"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"E-posta"}),l.jsx("input",{type:"email",value:d,onChange:z=>h(z.target.value),required:!0,maxLength:255,className:D,placeholder:"ornek@mail.com"}),d!==e.email&&l.jsx("p",{className:"text-xs text-muted-foreground mt-1.5",children:"E-posta değişikliği için onay bağlantısı gönderilecektir."})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Telefon Numarası"}),l.jsx("input",{type:"tel",value:p,onChange:z=>m(z.target.value),maxLength:20,className:D,placeholder:"05XX XXX XX XX"})]}),l.jsxs("div",{className:"flex justify-between items-center pt-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Satın alınan eğitim: ",l.jsx("strong",{children:t.length})]}),l.jsxs("button",{type:"submit",disabled:g,className:"btn-primary flex items-center gap-2",children:[l.jsx(E7,{size:16})," ",g?"Kaydediliyor...":"Kaydet"]})]})]})]})}),s==="settings"&&l.jsxs("div",{className:"max-w-lg space-y-6",children:[l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[l.jsx(m7,{size:20,className:"text-primary"}),l.jsx("h2",{className:"heading-card text-foreground",children:"Şifre Değiştir"})]}),l.jsxs("form",{onSubmit:F,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Mevcut Şifre"}),l.jsx("input",{type:"password",value:x,onChange:z=>b(z.target.value),required:!0,className:D,placeholder:"••••••••"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Yeni Şifre"}),l.jsx("input",{type:"password",value:y,onChange:z=>j(z.target.value),required:!0,minLength:6,className:D,placeholder:"••••••••"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Yeni Şifre (Tekrar)"}),l.jsx("input",{type:"password",value:k,onChange:z=>_(z.target.value),required:!0,minLength:6,className:D,placeholder:"••••••••"})]}),l.jsx("button",{type:"submit",disabled:S,className:"btn-primary w-full",children:S?"Güncelleniyor...":"Şifreyi Güncelle"})]})]}),l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(MT,{size:20,className:"text-muted-foreground"}),l.jsx("h2",{className:"heading-card text-foreground",children:"Oturum"})]}),l.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Hesabınızdan güvenli bir şekilde çıkış yapın."}),l.jsxs("button",{onClick:O,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl border border-border text-sm font-medium text-foreground hover:bg-secondary transition-colors",children:[l.jsx(MT,{size:16})," Çıkış Yap"]})]}),l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-destructive/30",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx($7,{size:20,className:"text-destructive"}),l.jsx("h2",{className:"heading-card text-foreground",children:"Tehlikeli Bölge"})]}),l.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Hesabınızı sildiğinizde tüm verileriniz kalıcı olarak silinir. Bu işlem geri alınamaz."}),C?l.jsxs("div",{className:"p-4 rounded-xl bg-destructive/5 border border-destructive/20 space-y-3",children:[l.jsx("p",{className:"text-sm font-medium text-destructive",children:"Hesabınızı silmek istediğinize emin misiniz?"}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{onClick:()=>R(!1),className:"px-4 py-2 rounded-lg border border-border text-sm text-foreground hover:bg-secondary transition-colors",children:"Vazgeç"}),l.jsx("button",{onClick:()=>T(this,null,function*(){ee.error("Hesap silme işlemi için lütfen bizimle iletişime geçin."),R(!1)}),className:"px-4 py-2 rounded-lg bg-destructive text-destructive-foreground text-sm font-medium hover:opacity-90 transition-opacity",children:"Evet, Hesabımı Sil"})]})]}):l.jsxs("button",{onClick:()=>R(!0),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl border border-destructive/30 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:[l.jsx(pi,{size:16})," Hesabımı Sil"]})]})]})]})})]})}var Rse=Array.isArray,tn=Rse,$se=typeof Ul=="object"&&Ul&&Ul.Object===Object&&Ul,Q5=$se,Mse=Q5,Dse=typeof self=="object"&&self&&self.Object===Object&&self,Ise=Mse||Dse||Function("return this")(),ia=Ise,Lse=ia,zse=Lse.Symbol,lp=zse,jO=lp,Z5=Object.prototype,Bse=Z5.hasOwnProperty,Use=Z5.toString,xd=jO?jO.toStringTag:void 0;function Fse(e){var t=Bse.call(e,xd),r=e[xd];try{e[xd]=void 0;var n=!0}catch(a){}var i=Use.call(e);return n&&(t?e[xd]=r:delete e[xd]),i}var Kse=Fse,Hse=Object.prototype,Vse=Hse.toString;function Wse(e){return Vse.call(e)}var qse=Wse,SO=lp,Gse=Kse,Yse=qse,Xse="[object Null]",Jse="[object Undefined]",EO=SO?SO.toStringTag:void 0;function Qse(e){return e==null?e===void 0?Jse:Xse:EO&&EO in Object(e)?Gse(e):Yse(e)}var Fa=Qse;function Zse(e){return e!=null&&typeof e=="object"}var Ka=Zse,ele=Fa,tle=Ka,rle="[object Symbol]";function nle(e){return typeof e=="symbol"||tle(e)&&ele(e)==rle}var Bu=nle,ile=tn,ale=Bu,ole=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sle=/^\w*$/;function lle(e,t){if(ile(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ale(e)?!0:sle.test(e)||!ole.test(e)||t!=null&&e in Object(t)}var IE=lle;function cle(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zo=cle;const Uu=Qe(Zo);var ule=Fa,dle=Zo,fle="[object AsyncFunction]",hle="[object Function]",ple="[object GeneratorFunction]",mle="[object Proxy]";function gle(e){if(!dle(e))return!1;var t=ule(e);return t==hle||t==ple||t==fle||t==mle}var LE=gle;const Le=Qe(LE);var yle=ia,vle=yle["__core-js_shared__"],xle=vle,x0=xle,NO=function(){var e=/[^.]+$/.exec(x0&&x0.keys&&x0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ble(e){return!!NO&&NO in e}var wle=ble,kle=Function.prototype,_le=kle.toString;function jle(e){if(e!=null){try{return _le.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var eU=jle,Sle=LE,Ele=wle,Nle=Zo,Cle=eU,Tle=/[\\^$.*+?()[\]{}|]/g,Ale=/^\[object .+?Constructor\]$/,Ple=Function.prototype,Ole=Object.prototype,Rle=Ple.toString,$le=Ole.hasOwnProperty,Mle=RegExp("^"+Rle.call($le).replace(Tle,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dle(e){if(!Nle(e)||Ele(e))return!1;var t=Sle(e)?Mle:Ale;return t.test(Cle(e))}var Ile=Dle;function Lle(e,t){return e==null?void 0:e[t]}var zle=Lle,Ble=Ile,Ule=zle;function Fle(e,t){var r=Ule(e,t);return Ble(r)?r:void 0}var fl=Fle,Kle=fl,Hle=Kle(Object,"create"),sx=Hle,CO=sx;function Vle(){this.__data__=CO?CO(null):{},this.size=0}var Wle=Vle;function qle(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gle=qle,Yle=sx,Xle="__lodash_hash_undefined__",Jle=Object.prototype,Qle=Jle.hasOwnProperty;function Zle(e){var t=this.__data__;if(Yle){var r=t[e];return r===Xle?void 0:r}return Qle.call(t,e)?t[e]:void 0}var ece=Zle,tce=sx,rce=Object.prototype,nce=rce.hasOwnProperty;function ice(e){var t=this.__data__;return tce?t[e]!==void 0:nce.call(t,e)}var ace=ice,oce=sx,sce="__lodash_hash_undefined__";function lce(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=oce&&t===void 0?sce:t,this}var cce=lce,uce=Wle,dce=Gle,fce=ece,hce=ace,pce=cce;function Fu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fu.prototype.clear=uce;Fu.prototype.delete=dce;Fu.prototype.get=fce;Fu.prototype.has=hce;Fu.prototype.set=pce;var mce=Fu;function gce(){this.__data__=[],this.size=0}var yce=gce;function vce(e,t){return e===t||e!==e&&t!==t}var zE=vce,xce=zE;function bce(e,t){for(var r=e.length;r--;)if(xce(e[r][0],t))return r;return-1}var lx=bce,wce=lx,kce=Array.prototype,_ce=kce.splice;function jce(e){var t=this.__data__,r=wce(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():_ce.call(t,r,1),--this.size,!0}var Sce=jce,Ece=lx;function Nce(e){var t=this.__data__,r=Ece(t,e);return r<0?void 0:t[r][1]}var Cce=Nce,Tce=lx;function Ace(e){return Tce(this.__data__,e)>-1}var Pce=Ace,Oce=lx;function Rce(e,t){var r=this.__data__,n=Oce(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var $ce=Rce,Mce=yce,Dce=Sce,Ice=Cce,Lce=Pce,zce=$ce;function Ku(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ku.prototype.clear=Mce;Ku.prototype.delete=Dce;Ku.prototype.get=Ice;Ku.prototype.has=Lce;Ku.prototype.set=zce;var cx=Ku,Bce=fl,Uce=ia,Fce=Bce(Uce,"Map"),BE=Fce,TO=mce,Kce=cx,Hce=BE;function Vce(){this.size=0,this.__data__={hash:new TO,map:new(Hce||Kce),string:new TO}}var Wce=Vce;function qce(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Gce=qce,Yce=Gce;function Xce(e,t){var r=e.__data__;return Yce(t)?r[typeof t=="string"?"string":"hash"]:r.map}var ux=Xce,Jce=ux;function Qce(e){var t=Jce(this,e).delete(e);return this.size-=t?1:0,t}var Zce=Qce,eue=ux;function tue(e){return eue(this,e).get(e)}var rue=tue,nue=ux;function iue(e){return nue(this,e).has(e)}var aue=iue,oue=ux;function sue(e,t){var r=oue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lue=sue,cue=Wce,uue=Zce,due=rue,fue=aue,hue=lue;function Hu(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hu.prototype.clear=cue;Hu.prototype.delete=uue;Hu.prototype.get=due;Hu.prototype.has=fue;Hu.prototype.set=hue;var UE=Hu,tU=UE,pue="Expected a function";function FE(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pue);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(FE.Cache||tU),r}FE.Cache=tU;var rU=FE;const mue=Qe(rU);var gue=rU,yue=500;function vue(e){var t=gue(e,function(n){return r.size===yue&&r.clear(),n}),r=t.cache;return t}var xue=vue,bue=xue,wue=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kue=/\\(\\)?/g,_ue=bue(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wue,function(r,n,i,a){t.push(i?a.replace(kue,"$1"):n||r)}),t}),jue=_ue;function Sue(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var KE=Sue,AO=lp,Eue=KE,Nue=tn,Cue=Bu,Tue=1/0,PO=AO?AO.prototype:void 0,OO=PO?PO.toString:void 0;function nU(e){if(typeof e=="string")return e;if(Nue(e))return Eue(e,nU)+"";if(Cue(e))return OO?OO.call(e):"";var t=e+"";return t=="0"&&1/e==-Tue?"-0":t}var Aue=nU,Pue=Aue;function Oue(e){return e==null?"":Pue(e)}var iU=Oue,Rue=tn,$ue=IE,Mue=jue,Due=iU;function Iue(e,t){return Rue(e)?e:$ue(e,t)?[e]:Mue(Due(e))}var aU=Iue,Lue=Bu,zue=1/0;function Bue(e){if(typeof e=="string"||Lue(e))return e;var t=e+"";return t=="0"&&1/e==-zue?"-0":t}var dx=Bue,Uue=aU,Fue=dx;function Kue(e,t){t=Uue(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Fue(t[r++])];return r&&r==n?e:void 0}var HE=Kue,Hue=HE;function Vue(e,t,r){var n=e==null?void 0:Hue(e,t);return n===void 0?r:n}var oU=Vue;const zn=Qe(oU);function Wue(e){return e==null}var que=Wue;const Ue=Qe(que);var Gue=Fa,Yue=tn,Xue=Ka,Jue="[object String]";function Que(e){return typeof e=="string"||!Yue(e)&&Xue(e)&&Gue(e)==Jue}var Zue=Que;const el=Qe(Zue);var sU={exports:{}},nt={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var VE=Symbol.for("react.element"),WE=Symbol.for("react.portal"),fx=Symbol.for("react.fragment"),hx=Symbol.for("react.strict_mode"),px=Symbol.for("react.profiler"),mx=Symbol.for("react.provider"),gx=Symbol.for("react.context"),ede=Symbol.for("react.server_context"),yx=Symbol.for("react.forward_ref"),vx=Symbol.for("react.suspense"),xx=Symbol.for("react.suspense_list"),bx=Symbol.for("react.memo"),wx=Symbol.for("react.lazy"),tde=Symbol.for("react.offscreen"),lU;lU=Symbol.for("react.module.reference");function Vn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case VE:switch(e=e.type,e){case fx:case px:case hx:case vx:case xx:return e;default:switch(e=e&&e.$$typeof,e){case ede:case gx:case yx:case wx:case bx:case mx:return e;default:return t}}case WE:return t}}}nt.ContextConsumer=gx;nt.ContextProvider=mx;nt.Element=VE;nt.ForwardRef=yx;nt.Fragment=fx;nt.Lazy=wx;nt.Memo=bx;nt.Portal=WE;nt.Profiler=px;nt.StrictMode=hx;nt.Suspense=vx;nt.SuspenseList=xx;nt.isAsyncMode=function(){return!1};nt.isConcurrentMode=function(){return!1};nt.isContextConsumer=function(e){return Vn(e)===gx};nt.isContextProvider=function(e){return Vn(e)===mx};nt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VE};nt.isForwardRef=function(e){return Vn(e)===yx};nt.isFragment=function(e){return Vn(e)===fx};nt.isLazy=function(e){return Vn(e)===wx};nt.isMemo=function(e){return Vn(e)===bx};nt.isPortal=function(e){return Vn(e)===WE};nt.isProfiler=function(e){return Vn(e)===px};nt.isStrictMode=function(e){return Vn(e)===hx};nt.isSuspense=function(e){return Vn(e)===vx};nt.isSuspenseList=function(e){return Vn(e)===xx};nt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fx||e===px||e===hx||e===vx||e===xx||e===tde||typeof e=="object"&&e!==null&&(e.$$typeof===wx||e.$$typeof===bx||e.$$typeof===mx||e.$$typeof===gx||e.$$typeof===yx||e.$$typeof===lU||e.getModuleId!==void 0)};nt.typeOf=Vn;sU.exports=nt;var rde=sU.exports,nde=Fa,ide=Ka,ade="[object Number]";function ode(e){return typeof e=="number"||ide(e)&&nde(e)==ade}var cU=ode;const sde=Qe(cU);var lde=cU;function cde(e){return lde(e)&&e!=+e}var ude=cde;const cp=Qe(ude);var di=function(t){return t===0?0:t>0?1:-1},js=function(t){return el(t)&&t.indexOf("%")===t.length-1},se=function(t){return sde(t)&&!cp(t)},dde=function(t){return Ue(t)},nr=function(t){return se(t)||el(t)},fde=0,up=function(t){var r=++fde;return"".concat(t||"").concat(r)},tl=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&!el(t))return n;var a;if(js(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return cp(a)&&(a=n),i&&a>r&&(a=r),a},ho=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},hde=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},li=function(t,r){return se(t)&&se(r)?function(n){return t+n*(r-t)}:function(){return r}};function oy(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):zn(n,t))===r})}var pde=function(t,r){return se(t)&&se(r)?t-r:el(t)&&el(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function kc(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function vk(e){"@babel/helpers - typeof";return vk=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},vk(e)}var mde=["viewBox","children"],gde=["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","colorRendering","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"],RO=["points","pathLength"],b0={svg:mde,polygon:RO,polyline:RO},qE=["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","onDragCapture","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"],sy=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(w.isValidElement(t)&&(n=t.props),!Uu(n))return null;var i={};return Object.keys(n).forEach(function(a){qE.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},yde=function(t,r,n){return function(i){return t(r,n,i),null}},ly=function(t,r,n){if(!Uu(t)||vk(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];qE.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=yde(o,r,n))}),i},vde=["children"],xde=["children"];function $O(e,t){if(e==null)return{};var r=bde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xk(e){"@babel/helpers - typeof";return xk=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},xk(e)}var MO={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"},wa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},DO=null,w0=null,GE=function e(t){if(t===DO&&Array.isArray(w0))return w0;var r=[];return w.Children.forEach(t,function(n){Ue(n)||(rde.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),w0=r,DO=t,r};function Bn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return wa(i)}):n=[wa(t)],GE(e).forEach(function(i){var a=zn(i,"type.displayName")||zn(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function cn(e,t){var r=Bn(e,t);return r&&r[0]}var IO=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!se(n)||n<=0||!se(i)||i<=0)},wde=["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"],kde=function(t){return t&&t.type&&el(t.type)&&wde.indexOf(t.type)>=0},_de=function(t){return t&&xk(t)==="object"&&"clipDot"in t},jde=function(t,r,n,i){var a,o=(a=b0==null?void 0:b0[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Le(t)&&(i&&o.includes(r)||gde.includes(r))||n&&qE.includes(r)},qe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!Uu(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;jde((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},bk=function e(t,r){if(t===r)return!0;var n=w.Children.count(t);if(n!==w.Children.count(r))return!1;if(n===0)return!0;if(n===1)return LO(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!LO(a,o))return!1}return!0},LO=function(t,r){if(Ue(t)&&Ue(r))return!0;if(!Ue(t)&&!Ue(r)){var n=t.props||{},i=n.children,a=$O(n,vde),o=r.props||{},s=o.children,c=$O(o,xde);return i&&s?kc(a,c)&&bk(i,s):!i&&!s?kc(a,c):!1}return!1},zO=function(t,r){var n=[],i={};return GE(t).forEach(function(a,o){if(kde(a))n.push(a);else if(a){var s=wa(a.type),c=r[s]||{},u=c.handler,f=c.once;if(u&&(!f||!i[s])){var d=u(a,s,o);n.push(d),i[s]=!0}}}),n},Sde=function(t){var r=t&&t.type;return r&&MO[r]?MO[r]:null},Ede=function(t,r){return GE(r).indexOf(t)},Nde=["children","width","height","viewBox","className","style","title","desc"];function wk(){return wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wk.apply(this,arguments)}function Cde(e,t){if(e==null)return{};var r=Tde(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tde(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kk(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,u=Cde(e,Nde),f=i||{width:r,height:n,x:0,y:0},d=Ge("recharts-surface",a);return $.createElement("svg",wk({},qe(u,!0,"svg"),{className:d,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),$.createElement("title",null,s),$.createElement("desc",null,c),t)}var Ade=["children","className"];function _k(){return _k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_k.apply(this,arguments)}function Pde(e,t){if(e==null)return{};var r=Ode(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ode(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ut=$.forwardRef(function(e,t){var r=e.children,n=e.className,i=Pde(e,Ade),a=Ge("recharts-layer",n);return $.createElement("g",_k({className:a},qe(i,!0),{ref:t}),r)}),ka=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function Rde(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var $de=Rde,Mde=$de;function Dde(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Mde(e,t,r)}var Ide=Dde,Lde="\\ud800-\\udfff",zde="\\u0300-\\u036f",Bde="\\ufe20-\\ufe2f",Ude="\\u20d0-\\u20ff",Fde=zde+Bde+Ude,Kde="\\ufe0e\\ufe0f",Hde="\\u200d",Vde=RegExp("["+Hde+Lde+Fde+Kde+"]");function Wde(e){return Vde.test(e)}var uU=Wde;function qde(e){return e.split("")}var Gde=qde,dU="\\ud800-\\udfff",Yde="\\u0300-\\u036f",Xde="\\ufe20-\\ufe2f",Jde="\\u20d0-\\u20ff",Qde=Yde+Xde+Jde,Zde="\\ufe0e\\ufe0f",efe="["+dU+"]",jk="["+Qde+"]",Sk="\\ud83c[\\udffb-\\udfff]",tfe="(?:"+jk+"|"+Sk+")",fU="[^"+dU+"]",hU="(?:\\ud83c[\\udde6-\\uddff]){2}",pU="[\\ud800-\\udbff][\\udc00-\\udfff]",rfe="\\u200d",mU=tfe+"?",gU="["+Zde+"]?",nfe="(?:"+rfe+"(?:"+[fU,hU,pU].join("|")+")"+gU+mU+")*",ife=gU+mU+nfe,afe="(?:"+[fU+jk+"?",jk,hU,pU,efe].join("|")+")",ofe=RegExp(Sk+"(?="+Sk+")|"+afe+ife,"g");function sfe(e){return e.match(ofe)||[]}var lfe=sfe,cfe=Gde,ufe=uU,dfe=lfe;function ffe(e){return ufe(e)?dfe(e):cfe(e)}var hfe=ffe,pfe=Ide,mfe=uU,gfe=hfe,yfe=iU;function vfe(e){return function(t){t=yfe(t);var r=mfe(t)?gfe(t):void 0,n=r?r[0]:t.charAt(0),i=r?pfe(r,1).join(""):t.slice(1);return n[e]()+i}}var xfe=vfe,bfe=xfe,wfe=bfe("toUpperCase"),kfe=wfe;const kx=Qe(kfe);function ht(e){return function(){return e}}const yU=Math.cos,cy=Math.sin,_i=Math.sqrt,uy=Math.PI,_x=2*uy,Ek=Math.PI,Nk=2*Ek,ps=1e-6,_fe=Nk-ps;function vU(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function jfe(e){let t=Math.floor(e);if(!(t>=0))throw new Error("invalid digits: ".concat(e));if(t>15)return vU;const r=qa(10,t);return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}var xD,bD,wD,kD,_D,jD,SD,ED,ND,CD,TD,AD,PD,OD;class Sfe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vU:jfe(t)}moveTo(t,r){this._append(xD||(xD=Rr(["M",",",""])),this._x0=this._x1=+t,this._y0=this._y1=+r)}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append(bD||(bD=Rr(["Z"]))))}lineTo(t,r){this._append(wD||(wD=Rr(["L",",",""])),this._x1=+t,this._y1=+r)}quadraticCurveTo(t,r,n,i){this._append(kD||(kD=Rr(["Q",",",",",",",""])),+t,+r,this._x1=+n,this._y1=+i)}bezierCurveTo(t,r,n,i,a,o){this._append(_D||(_D=Rr(["C",",",",",",",",",",",""])),+t,+r,+n,+i,this._x1=+a,this._y1=+o)}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error("negative radius: ".concat(a));let o=this._x1,s=this._y1,c=n-t,u=i-r,f=o-t,d=s-r,h=f*f+d*d;if(this._x1===null)this._append(jD||(jD=Rr(["M",",",""])),this._x1=t,this._y1=r);else if(h>ps)if(!(Math.abs(d*c-u*f)>ps)||!a)this._append(SD||(SD=Rr(["L",",",""])),this._x1=t,this._y1=r);else{let p=n-o,m=i-s,g=c*c+u*u,v=p*p+m*m,x=Math.sqrt(g),b=Math.sqrt(h),y=a*Math.tan((Ek-Math.acos((g+h-v)/(2*x*b)))/2),j=y/b,k=y/x;Math.abs(j-1)>ps&&this._append(ED||(ED=Rr(["L",",",""])),t+j*f,r+j*d),this._append(ND||(ND=Rr(["A",",",",0,0,",",",",",""])),a,a,+(d*p>f*m),this._x1=t+k*c,this._y1=r+k*u)}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error("negative radius: ".concat(n));let s=n*Math.cos(i),c=n*Math.sin(i),u=t+s,f=r+c,d=1^o,h=o?i-a:a-i;this._x1===null?this._append(CD||(CD=Rr(["M",",",""])),u,f):(Math.abs(this._x1-u)>ps||Math.abs(this._y1-f)>ps)&&this._append(TD||(TD=Rr(["L",",",""])),u,f),n&&(h<0&&(h=h%Nk+Nk),h>_fe?this._append(AD||(AD=Rr(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,d,t-s,r-c,n,n,d,this._x1=u,this._y1=f):h>ps&&this._append(PD||(PD=Rr(["A",",",",0,",",",",",",",""])),n,n,+(h>=Ek),d,this._x1=t+n*Math.cos(a),this._y1=r+n*Math.sin(a)))}rect(t,r,n,i){this._append(OD||(OD=Rr(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+r,n=+n,+i,-n)}toString(){return this._}}function YE(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError("invalid digits: ".concat(r));t=n}return e},()=>new Sfe(t)}function XE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xU(e){this._context=e}xU.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 jx(e){return new xU(e)}function bU(e){return e[0]}function wU(e){return e[1]}function kU(e,t){var r=ht(!0),n=null,i=jx,a=null,o=YE(s);e=typeof e=="function"?e:e===void 0?bU:ht(e),t=typeof t=="function"?t:t===void 0?wU:ht(t);function s(c){var u,f=(c=XE(c)).length,d,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=f;++u)!(u<f&&r(d=c[u],u,c))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(d,u,c),+t(d,u,c));if(p)return a=null,p+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ht(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ht(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ht(!!c),s):r},s.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),s):i},s.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),s):n},s}function pm(e,t,r){var n=null,i=ht(!0),a=null,o=jx,s=null,c=YE(u);e=typeof e=="function"?e:e===void 0?bU:ht(+e),t=typeof t=="function"?t:ht(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?wU:ht(+r);function u(d){var h,p,m,g=(d=XE(d)).length,v,x=!1,b,y=new Array(g),j=new Array(g);for(a==null&&(s=o(b=c())),h=0;h<=g;++h){if(!(h<g&&i(v=d[h],h,d))===x)if(x=!x)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=h-1;m>=p;--m)s.point(y[m],j[m]);s.lineEnd(),s.areaEnd()}x&&(y[h]=+e(v,h,d),j[h]=+t(v,h,d),s.point(n?+n(v,h,d):y[h],r?+r(v,h,d):j[h]))}if(b)return s=null,b+""||null}function f(){return kU().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:ht(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ht(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ht(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:ht(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ht(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ht(+d),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ht(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),u):a},u}class _U{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Efe(e){return new _U(e,!0)}function Nfe(e){return new _U(e,!1)}const JE={draw(e,t){const r=_i(t/uy);e.moveTo(r,0),e.arc(0,0,r,0,_x)}},Cfe={draw(e,t){const r=_i(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},jU=_i(1/3),Tfe=jU*2,Afe={draw(e,t){const r=_i(t/Tfe),n=r*jU;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Pfe={draw(e,t){const r=_i(t),n=-r/2;e.rect(n,n,r,r)}},Ofe=.8908130915292852,SU=cy(uy/10)/cy(7*uy/10),Rfe=cy(_x/10)*SU,$fe=-yU(_x/10)*SU,Mfe={draw(e,t){const r=_i(t*Ofe),n=Rfe*r,i=$fe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=_x*a/5,s=yU(o),c=cy(o);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*i,c*n+s*i)}e.closePath()}},k0=_i(3),Dfe={draw(e,t){const r=-_i(t/(k0*3));e.moveTo(0,r*2),e.lineTo(-k0*r,-r),e.lineTo(k0*r,-r),e.closePath()}},jn=-.5,Sn=_i(3)/2,Ck=1/_i(12),Ife=(Ck/2+1)*3,Lfe={draw(e,t){const r=_i(t/Ife),n=r/2,i=r*Ck,a=n,o=r*Ck+r,s=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(jn*n-Sn*i,Sn*n+jn*i),e.lineTo(jn*a-Sn*o,Sn*a+jn*o),e.lineTo(jn*s-Sn*c,Sn*s+jn*c),e.lineTo(jn*n+Sn*i,jn*i-Sn*n),e.lineTo(jn*a+Sn*o,jn*o-Sn*a),e.lineTo(jn*s+Sn*c,jn*c-Sn*s),e.closePath()}};function zfe(e,t){let r=null,n=YE(i);e=typeof e=="function"?e:ht(e||JE),t=typeof t=="function"?t:ht(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:ht(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:ht(+a),i):t},i.context=function(a){return arguments.length?(r=a==null?null:a,i):r},i}function dy(){}function fy(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function EU(e){this._context=e}EU.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:fy(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:fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bfe(e){return new EU(e)}function NU(e){this._context=e}NU.prototype={areaStart:dy,areaEnd:dy,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:fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ufe(e){return new NU(e)}function CU(e){this._context=e}CU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:fy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ffe(e){return new CU(e)}function TU(e){this._context=e}TU.prototype={areaStart:dy,areaEnd:dy,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 Kfe(e){return new TU(e)}function BO(e){return e<0?-1:1}function UO(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(BO(a)+BO(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function FO(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _0(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function hy(e){this._context=e}hy.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:_0(this,this._t0,FO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_0(this,FO(this,r=UO(this,e,t)),r);break;default:_0(this,this._t0,r=UO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function AU(e){this._context=new PU(e)}(AU.prototype=Object.create(hy.prototype)).point=function(e,t){hy.prototype.point.call(this,t,e)};function PU(e){this._context=e}PU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Hfe(e){return new hy(e)}function Vfe(e){return new AU(e)}function OU(e){this._context=e}OU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=KO(e),i=KO(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function KO(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Wfe(e){return new OU(e)}function Sx(e,t){this._context=e,this._t=t}Sx.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function qfe(e){return new Sx(e,.5)}function Gfe(e){return new Sx(e,0)}function Yfe(e){return new Sx(e,1)}function tu(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Tk(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Xfe(e,t){return e[t]}function Jfe(e){const t=[];return t.key=e,t}function Qfe(){var e=ht([]),t=Tk,r=tu,n=Xfe;function i(a){var o=Array.from(e.apply(this,arguments),Jfe),s,c=o.length,u=-1,f;for(const d of a)for(s=0,++u;s<c;++s)(o[s][u]=[0,+n(d,o[s].key,u,a)]).data=d;for(s=0,f=XE(t(o));s<c;++s)o[f[s]].index=s;return r(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ht(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ht(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Tk:typeof a=="function"?a:ht(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a==null?tu:a,i):r},i}function Zfe(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}tu(e,t)}}function ehe(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}tu(e,t)}}function the(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,c=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[n][1]||0,h=f[n-1][1]||0,p=(d-h)/2,m=0;m<s;++m){var g=e[t[m]],v=g[n][1]||0,x=g[n-1][1]||0;p+=v-x}c+=d,u+=p*d}i[n-1][1]+=i[n-1][0]=r,c&&(r-=u/c)}i[n-1][1]+=i[n-1][0]=r,tu(e,t)}}function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}var rhe=["type","size","sizeType"];function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ak.apply(this,arguments)}function HO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VO(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(r),!0).forEach(function(n){nhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nhe(e,t,r){return t=ihe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ihe(e){var t=ahe(e,"string");return Qf(t)=="symbol"?t:t+""}function ahe(e,t){if(Qf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ohe(e,t){if(e==null)return{};var r=she(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function she(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var RU={symbolCircle:JE,symbolCross:Cfe,symbolDiamond:Afe,symbolSquare:Pfe,symbolStar:Mfe,symbolTriangle:Dfe,symbolWye:Lfe},lhe=Math.PI/180,che=function(t){var r="symbol".concat(kx(t));return RU[r]||JE},uhe=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*lhe;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}},dhe=function(t,r){RU["symbol".concat(kx(t))]=r},QE=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,c=ohe(t,rhe),u=VO(VO({},c),{},{type:n,size:a,sizeType:s}),f=function(){var v=che(n),x=zfe().type(v).size(uhe(a,s,n));return x()},d=u.className,h=u.cx,p=u.cy,m=qe(u,!0);return h===+h&&p===+p&&a===+a?$.createElement("path",Ak({},m,{className:Ge("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};QE.registerSymbol=dhe;function ru(e){"@babel/helpers - typeof";return ru=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},ru(e)}function Pk(){return Pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pk.apply(this,arguments)}function WO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fhe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(r),!0).forEach(function(n){Zf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WO(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function phe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MU(n.key),n)}}function mhe(e,t,r){return t&&phe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ghe(e,t,r){return t=py(t),yhe(e,$U()?Reflect.construct(t,r||[],py(e).constructor):t.apply(e,r))}function yhe(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vhe(e)}function vhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return($U=function(){return!!e})()}function py(e){return py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},py(e)}function xhe(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&&Ok(e,t)}function Ok(e,t){return Ok=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ok(e,t)}function Zf(e,t,r){return t=MU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MU(e){var t=bhe(e,"string");return ru(t)=="symbol"?t:t+""}function bhe(e,t){if(ru(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ru(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var En=32,ZE=function(e){function t(){return hhe(this,t),ghe(this,t,arguments)}return xhe(t,e),mhe(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=En/2,o=En/6,s=En/3,c=n.inactive?i:n.color;if(n.type==="plainline")return $.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:En,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return $.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(s,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,"\n H").concat(En,"M").concat(2*s,",").concat(a,"\n A").concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return $.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(En/8,"h").concat(En,"v").concat(En*3/4,"h").concat(-En,"z"),className:"recharts-legend-icon"});if($.isValidElement(n.legendIcon)){var u=fhe({},n);return delete u.legendIcon,$.cloneElement(n.legendIcon,u)}return $.createElement(QE,{fill:c,cx:a,cy:a,size:En,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,c=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:En,height:En},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,m){var g=p.formatter||c,v=Ge(Zf(Zf({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var x=Le(p.value)?null:p.value;ka(!Le(p.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 b=p.inactive?u:p.color;return $.createElement("li",Pk({className:v,style:d,key:"legend-item-".concat(m)},ly(n.props,p,m)),$.createElement(kk,{width:o,height:o,viewBox:f,style:h},n.renderIcon(p)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},g?g(x,p,m):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(w.PureComponent);Zf(ZE,"displayName","Legend");Zf(ZE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var whe=cx;function khe(){this.__data__=new whe,this.size=0}var _he=khe;function jhe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var She=jhe;function Ehe(e){return this.__data__.get(e)}var Nhe=Ehe;function Che(e){return this.__data__.has(e)}var The=Che,Ahe=cx,Phe=BE,Ohe=UE,Rhe=200;function $he(e,t){var r=this.__data__;if(r instanceof Ahe){var n=r.__data__;if(!Phe||n.length<Rhe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ohe(n)}return r.set(e,t),this.size=r.size,this}var Mhe=$he,Dhe=cx,Ihe=_he,Lhe=She,zhe=Nhe,Bhe=The,Uhe=Mhe;function Vu(e){var t=this.__data__=new Dhe(e);this.size=t.size}Vu.prototype.clear=Ihe;Vu.prototype.delete=Lhe;Vu.prototype.get=zhe;Vu.prototype.has=Bhe;Vu.prototype.set=Uhe;var DU=Vu,Fhe="__lodash_hash_undefined__";function Khe(e){return this.__data__.set(e,Fhe),this}var Hhe=Khe;function Vhe(e){return this.__data__.has(e)}var Whe=Vhe,qhe=UE,Ghe=Hhe,Yhe=Whe;function my(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new qhe;++t<r;)this.add(e[t])}my.prototype.add=my.prototype.push=Ghe;my.prototype.has=Yhe;var IU=my;function Xhe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var LU=Xhe;function Jhe(e,t){return e.has(t)}var zU=Jhe,Qhe=IU,Zhe=LU,epe=zU,tpe=1,rpe=2;function npe(e,t,r,n,i,a){var o=r&tpe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=r&rpe?new Qhe:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],g=t[d];if(n)var v=o?n(g,m,d,t,e,a):n(m,g,d,e,t,a);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!Zhe(t,function(x,b){if(!epe(p,b)&&(m===x||i(m,x,r,n,a)))return p.push(b)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var BU=npe,ipe=ia,ape=ipe.Uint8Array,ope=ape;function spe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var lpe=spe;function cpe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var eN=cpe,qO=lp,GO=ope,upe=zE,dpe=BU,fpe=lpe,hpe=eN,ppe=1,mpe=2,gpe="[object Boolean]",ype="[object Date]",vpe="[object Error]",xpe="[object Map]",bpe="[object Number]",wpe="[object RegExp]",kpe="[object Set]",_pe="[object String]",jpe="[object Symbol]",Spe="[object ArrayBuffer]",Epe="[object DataView]",YO=qO?qO.prototype:void 0,j0=YO?YO.valueOf:void 0;function Npe(e,t,r,n,i,a,o){switch(r){case Epe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Spe:return!(e.byteLength!=t.byteLength||!a(new GO(e),new GO(t)));case gpe:case ype:case bpe:return upe(+e,+t);case vpe:return e.name==t.name&&e.message==t.message;case wpe:case _pe:return e==t+"";case xpe:var s=fpe;case kpe:var c=n&ppe;if(s||(s=hpe),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=mpe,o.set(e,t);var f=dpe(s(e),s(t),n,i,a,o);return o.delete(e),f;case jpe:if(j0)return j0.call(e)==j0.call(t)}return!1}var Cpe=Npe;function Tpe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var UU=Tpe,Ape=UU,Ppe=tn;function Ope(e,t,r){var n=t(e);return Ppe(e)?n:Ape(n,r(e))}var Rpe=Ope;function $pe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var Mpe=$pe;function Dpe(){return[]}var Ipe=Dpe,Lpe=Mpe,zpe=Ipe,Bpe=Object.prototype,Upe=Bpe.propertyIsEnumerable,XO=Object.getOwnPropertySymbols,Fpe=XO?function(e){return e==null?[]:(e=Object(e),Lpe(XO(e),function(t){return Upe.call(e,t)}))}:zpe,Kpe=Fpe;function Hpe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Vpe=Hpe,Wpe=Fa,qpe=Ka,Gpe="[object Arguments]";function Ype(e){return qpe(e)&&Wpe(e)==Gpe}var Xpe=Ype,JO=Xpe,Jpe=Ka,FU=Object.prototype,Qpe=FU.hasOwnProperty,Zpe=FU.propertyIsEnumerable,eme=JO(function(){return arguments}())?JO:function(e){return Jpe(e)&&Qpe.call(e,"callee")&&!Zpe.call(e,"callee")},tN=eme,gy={exports:{}};function tme(){return!1}var rme=tme;gy.exports;(function(e,t){var r=ia,n=rme,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(gy,gy.exports);var KU=gy.exports,nme=9007199254740991,ime=/^(?:0|[1-9]\d*)$/;function ame(e,t){var r=typeof e;return t=t==null?nme:t,!!t&&(r=="number"||r!="symbol"&&ime.test(e))&&e>-1&&e%1==0&&e<t}var rN=ame,ome=9007199254740991;function sme(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ome}var nN=sme,lme=Fa,cme=nN,ume=Ka,dme="[object Arguments]",fme="[object Array]",hme="[object Boolean]",pme="[object Date]",mme="[object Error]",gme="[object Function]",yme="[object Map]",vme="[object Number]",xme="[object Object]",bme="[object RegExp]",wme="[object Set]",kme="[object String]",_me="[object WeakMap]",jme="[object ArrayBuffer]",Sme="[object DataView]",Eme="[object Float32Array]",Nme="[object Float64Array]",Cme="[object Int8Array]",Tme="[object Int16Array]",Ame="[object Int32Array]",Pme="[object Uint8Array]",Ome="[object Uint8ClampedArray]",Rme="[object Uint16Array]",$me="[object Uint32Array]",kt={};kt[Eme]=kt[Nme]=kt[Cme]=kt[Tme]=kt[Ame]=kt[Pme]=kt[Ome]=kt[Rme]=kt[$me]=!0;kt[dme]=kt[fme]=kt[jme]=kt[hme]=kt[Sme]=kt[pme]=kt[mme]=kt[gme]=kt[yme]=kt[vme]=kt[xme]=kt[bme]=kt[wme]=kt[kme]=kt[_me]=!1;function Mme(e){return ume(e)&&cme(e.length)&&!!kt[lme(e)]}var Dme=Mme;function Ime(e){return function(t){return e(t)}}var HU=Ime,yy={exports:{}};yy.exports;(function(e,t){var r=Q5,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch(u){}}();e.exports=s})(yy,yy.exports);var Lme=yy.exports,zme=Dme,Bme=HU,QO=Lme,ZO=QO&&QO.isTypedArray,Ume=ZO?Bme(ZO):zme,VU=Ume,Fme=Vpe,Kme=tN,Hme=tn,Vme=KU,Wme=rN,qme=VU,Gme=Object.prototype,Yme=Gme.hasOwnProperty;function Xme(e,t){var r=Hme(e),n=!r&&Kme(e),i=!r&&!n&&Vme(e),a=!r&&!n&&!i&&qme(e),o=r||n||i||a,s=o?Fme(e.length,String):[],c=s.length;for(var u in e)(t||Yme.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Wme(u,c)))&&s.push(u);return s}var Jme=Xme,Qme=Object.prototype;function Zme(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Qme;return e===r}var ege=Zme;function tge(e,t){return function(r){return e(t(r))}}var WU=tge,rge=WU,nge=rge(Object.keys,Object),ige=nge,age=ege,oge=ige,sge=Object.prototype,lge=sge.hasOwnProperty;function cge(e){if(!age(e))return oge(e);var t=[];for(var r in Object(e))lge.call(e,r)&&r!="constructor"&&t.push(r);return t}var uge=cge,dge=LE,fge=nN;function hge(e){return e!=null&&fge(e.length)&&!dge(e)}var dp=hge,pge=Jme,mge=uge,gge=dp;function yge(e){return gge(e)?pge(e):mge(e)}var Ex=yge,vge=Rpe,xge=Kpe,bge=Ex;function wge(e){return vge(e,bge,xge)}var kge=wge,e2=kge,_ge=1,jge=Object.prototype,Sge=jge.hasOwnProperty;function Ege(e,t,r,n,i,a){var o=r&_ge,s=e2(e),c=s.length,u=e2(t),f=u.length;if(c!=f&&!o)return!1;for(var d=c;d--;){var h=s[d];if(!(o?h in t:Sge.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var g=!0;a.set(e,t),a.set(t,e);for(var v=o;++d<c;){h=s[d];var x=e[h],b=t[h];if(n)var y=o?n(b,x,h,t,e,a):n(x,b,h,e,t,a);if(!(y===void 0?x===b||i(x,b,r,n,a):y)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var j=e.constructor,k=t.constructor;j!=k&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof k=="function"&&k instanceof k)&&(g=!1)}return a.delete(e),a.delete(t),g}var Nge=Ege,Cge=fl,Tge=ia,Age=Cge(Tge,"DataView"),Pge=Age,Oge=fl,Rge=ia,$ge=Oge(Rge,"Promise"),Mge=$ge,Dge=fl,Ige=ia,Lge=Dge(Ige,"Set"),qU=Lge,zge=fl,Bge=ia,Uge=zge(Bge,"WeakMap"),Fge=Uge,Rk=Pge,$k=BE,Mk=Mge,Dk=qU,Ik=Fge,GU=Fa,Wu=eU,t2="[object Map]",Kge="[object Object]",r2="[object Promise]",n2="[object Set]",i2="[object WeakMap]",a2="[object DataView]",Hge=Wu(Rk),Vge=Wu($k),Wge=Wu(Mk),qge=Wu(Dk),Gge=Wu(Ik),ms=GU;(Rk&&ms(new Rk(new ArrayBuffer(1)))!=a2||$k&&ms(new $k)!=t2||Mk&&ms(Mk.resolve())!=r2||Dk&&ms(new Dk)!=n2||Ik&&ms(new Ik)!=i2)&&(ms=function(e){var t=GU(e),r=t==Kge?e.constructor:void 0,n=r?Wu(r):"";if(n)switch(n){case Hge:return a2;case Vge:return t2;case Wge:return r2;case qge:return n2;case Gge:return i2}return t});var Yge=ms,S0=DU,Xge=BU,Jge=Cpe,Qge=Nge,o2=Yge,s2=tn,l2=KU,Zge=VU,eye=1,c2="[object Arguments]",u2="[object Array]",mm="[object Object]",tye=Object.prototype,d2=tye.hasOwnProperty;function rye(e,t,r,n,i,a){var o=s2(e),s=s2(t),c=o?u2:o2(e),u=s?u2:o2(t);c=c==c2?mm:c,u=u==c2?mm:u;var f=c==mm,d=u==mm,h=c==u;if(h&&l2(e)){if(!l2(t))return!1;o=!0,f=!1}if(h&&!f)return a||(a=new S0),o||Zge(e)?Xge(e,t,r,n,i,a):Jge(e,t,c,r,n,i,a);if(!(r&eye)){var p=f&&d2.call(e,"__wrapped__"),m=d&&d2.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,v=m?t.value():t;return a||(a=new S0),i(g,v,r,n,a)}}return h?(a||(a=new S0),Qge(e,t,r,n,i,a)):!1}var nye=rye,iye=nye,f2=Ka;function YU(e,t,r,n,i){return e===t?!0:e==null||t==null||!f2(e)&&!f2(t)?e!==e&&t!==t:iye(e,t,r,n,YU,i)}var iN=YU,aye=DU,oye=iN,sye=1,lye=2;function cye(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var c=s[0],u=e[c],f=s[1];if(o&&s[2]){if(u===void 0&&!(c in e))return!1}else{var d=new aye;if(n)var h=n(u,f,c,e,t,d);if(!(h===void 0?oye(f,u,sye|lye,n,d):h))return!1}}return!0}var uye=cye,dye=Zo;function fye(e){return e===e&&!dye(e)}var XU=fye,hye=XU,pye=Ex;function mye(e){for(var t=pye(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,hye(i)]}return t}var gye=mye;function yye(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var JU=yye,vye=uye,xye=gye,bye=JU;function wye(e){var t=xye(e);return t.length==1&&t[0][2]?bye(t[0][0],t[0][1]):function(r){return r===e||vye(r,e,t)}}var kye=wye;function _ye(e,t){return e!=null&&t in Object(e)}var jye=_ye,Sye=aU,Eye=tN,Nye=tn,Cye=rN,Tye=nN,Aye=dx;function Pye(e,t,r){t=Sye(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=Aye(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&Tye(i)&&Cye(o,i)&&(Nye(e)||Eye(e)))}var Oye=Pye,Rye=jye,$ye=Oye;function Mye(e,t){return e!=null&&$ye(e,t,Rye)}var Dye=Mye,Iye=iN,Lye=oU,zye=Dye,Bye=IE,Uye=XU,Fye=JU,Kye=dx,Hye=1,Vye=2;function Wye(e,t){return Bye(e)&&Uye(t)?Fye(Kye(e),t):function(r){var n=Lye(r,e);return n===void 0&&n===t?zye(r,e):Iye(t,n,Hye|Vye)}}var qye=Wye;function Gye(e){return e}var qu=Gye;function Yye(e){return function(t){return t==null?void 0:t[e]}}var Xye=Yye,Jye=HE;function Qye(e){return function(t){return Jye(t,e)}}var Zye=Qye,eve=Xye,tve=Zye,rve=IE,nve=dx;function ive(e){return rve(e)?eve(nve(e)):tve(e)}var ave=ive,ove=kye,sve=qye,lve=qu,cve=tn,uve=ave;function dve(e){return typeof e=="function"?e:e==null?lve:typeof e=="object"?cve(e)?sve(e[0],e[1]):ove(e):uve(e)}var es=dve;function fve(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var QU=fve;function hve(e){return e!==e}var pve=hve;function mve(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var gve=mve,yve=QU,vve=pve,xve=gve;function bve(e,t,r){return t===t?xve(e,t,r):yve(e,vve,r)}var wve=bve,kve=wve;function _ve(e,t){var r=e==null?0:e.length;return!!r&&kve(e,t,0)>-1}var jve=_ve;function Sve(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var Eve=Sve;function Nve(){}var Cve=Nve,E0=qU,Tve=Cve,Ave=eN,Pve=1/0,Ove=E0&&1/Ave(new E0([,-0]))[1]==Pve?function(e){return new E0(e)}:Tve,Rve=Ove,$ve=IU,Mve=jve,Dve=Eve,Ive=zU,Lve=Rve,zve=eN,Bve=200;function Uve(e,t,r){var n=-1,i=Mve,a=e.length,o=!0,s=[],c=s;if(r)o=!1,i=Dve;else if(a>=Bve){var u=t?null:Lve(e);if(u)return zve(u);o=!1,i=Ive,c=new $ve}else c=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(f)}else i(c,d,r)||(c!==s&&c.push(d),s.push(f))}return s}var Fve=Uve,Kve=es,Hve=Fve;function Vve(e,t){return e&&e.length?Hve(e,Kve(t)):[]}var Wve=Vve;const h2=Qe(Wve);function ZU(e,t,r){return t===!0?h2(e,r):Le(t)?h2(e,t):e}function nu(e){"@babel/helpers - typeof";return nu=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},nu(e)}var qve=["ref"];function p2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function la(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(r),!0).forEach(function(n){Nx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tF(n.key),n)}}function Yve(e,t,r){return t&&m2(e.prototype,t),r&&m2(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xve(e,t,r){return t=vy(t),Jve(e,eF()?Reflect.construct(t,r||[],vy(e).constructor):t.apply(e,r))}function Jve(e,t){if(t&&(nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qve(e)}function Qve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(eF=function(){return!!e})()}function vy(e){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vy(e)}function Zve(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&&Lk(e,t)}function Lk(e,t){return Lk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Lk(e,t)}function Nx(e,t,r){return t=tF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tF(e){var t=exe(e,"string");return nu(t)=="symbol"?t:t+""}function exe(e,t){if(nu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function txe(e,t){if(e==null)return{};var r=rxe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rxe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function nxe(e){return e.value}function ixe(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var r=txe(t,qve);return $.createElement(ZE,r)}var g2=1,_c=function(e){function t(){var r;Gve(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Xve(this,t,[].concat(i)),Nx(r,"lastBoundingBox",{width:-1,height:-1}),r}return Zve(t,e),Yve(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>g2||Math.abs(i.height-this.lastBoundingBox.height)>g2)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?la({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,c=i.margin,u=i.chartWidth,f=i.chartHeight,d,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((f||0)-m.height)/2}}else h=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return la(la({},d),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=la(la({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return $.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){n.wrapperNode=p}},ixe(a,la(la({},this.props),{},{payload:ZU(f,u,nxe)})))}}],[{key:"getWithHeight",value:function(n,i){var a=la(la({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&se(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(w.PureComponent);Nx(_c,"displayName","Legend");Nx(_c,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var y2=lp,axe=tN,oxe=tn,v2=y2?y2.isConcatSpreadable:void 0;function sxe(e){return oxe(e)||axe(e)||!!(v2&&e&&e[v2])}var lxe=sxe,cxe=UU,uxe=lxe;function rF(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=uxe),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?rF(s,t-1,r,n,i):cxe(i,s):n||(i[i.length]=s)}return i}var nF=rF;function dxe(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var c=o[e?s:++i];if(r(a[c],c,a)===!1)break}return t}}var fxe=dxe,hxe=fxe,pxe=hxe(),mxe=pxe,gxe=mxe,yxe=Ex;function vxe(e,t){return e&&gxe(e,t,yxe)}var iF=vxe,xxe=dp;function bxe(e,t){return function(r,n){if(r==null)return r;if(!xxe(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var wxe=bxe,kxe=iF,_xe=wxe,jxe=_xe(kxe),aN=jxe,Sxe=aN,Exe=dp;function Nxe(e,t){var r=-1,n=Exe(e)?Array(e.length):[];return Sxe(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var aF=Nxe;function Cxe(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Txe=Cxe,x2=Bu;function Axe(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=x2(e),o=t!==void 0,s=t===null,c=t===t,u=x2(t);if(!s&&!u&&!a&&e>t||a&&o&&c&&!s&&!u||n&&o&&c||!r&&c||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!c)return-1}return 0}var Pxe=Axe,Oxe=Pxe;function Rxe(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var c=Oxe(i[n],a[n]);if(c){if(n>=s)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var $xe=Rxe,N0=KE,Mxe=HE,Dxe=es,Ixe=aF,Lxe=Txe,zxe=HU,Bxe=$xe,Uxe=qu,Fxe=tn;function Kxe(e,t,r){t.length?t=N0(t,function(a){return Fxe(a)?function(o){return Mxe(o,a.length===1?a[0]:a)}:a}):t=[Uxe];var n=-1;t=N0(t,zxe(Dxe));var i=Ixe(e,function(a,o,s){var c=N0(t,function(u){return u(a)});return{criteria:c,index:++n,value:a}});return Lxe(i,function(a,o){return Bxe(a,o,r)})}var Hxe=Kxe;function Vxe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Wxe=Vxe,qxe=Wxe,b2=Math.max;function Gxe(e,t,r){return t=b2(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=b2(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),qxe(e,this,s)}}var Yxe=Gxe;function Xxe(e){return function(){return e}}var Jxe=Xxe,Qxe=fl,Zxe=function(){try{var e=Qxe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),oF=Zxe,ebe=Jxe,w2=oF,tbe=qu,rbe=w2?function(e,t){return w2(e,"toString",{configurable:!0,enumerable:!1,value:ebe(t),writable:!0})}:tbe,nbe=rbe,ibe=800,abe=16,obe=Date.now;function sbe(e){var t=0,r=0;return function(){var n=obe(),i=abe-(n-r);if(r=n,i>0){if(++t>=ibe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var lbe=sbe,cbe=nbe,ube=lbe,dbe=ube(cbe),fbe=dbe,hbe=qu,pbe=Yxe,mbe=fbe;function gbe(e,t){return mbe(pbe(e,t,hbe),e+"")}var ybe=gbe,vbe=zE,xbe=dp,bbe=rN,wbe=Zo;function kbe(e,t,r){if(!wbe(r))return!1;var n=typeof t;return(n=="number"?xbe(r)&&bbe(t,r.length):n=="string"&&t in r)?vbe(r[t],e):!1}var Cx=kbe,_be=nF,jbe=Hxe,Sbe=ybe,k2=Cx,Ebe=Sbe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&k2(e,t[0],t[1])?t=[]:r>2&&k2(t[0],t[1],t[2])&&(t=[t[0]]),jbe(e,_be(t,1),[])}),Nbe=Ebe;const oN=Qe(Nbe);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)}function zk(){return zk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zk.apply(this,arguments)}function Cbe(e,t){return Obe(e)||Pbe(e,t)||Abe(e,t)||Tbe()}function Tbe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Abe(e,t){if(e){if(typeof e=="string")return _2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _2(e,t)}}function _2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pbe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Obe(e){if(Array.isArray(e))return e}function j2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function C0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(r),!0).forEach(function(n){Rbe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rbe(e,t,r){return t=$be(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $be(e){var t=Mbe(e,"string");return eh(t)=="symbol"?t:t+""}function Mbe(e,t){if(eh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(eh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dbe(e){return Array.isArray(e)&&nr(e[0])&&nr(e[1])?e.join(" ~ "):e}var Ibe=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,p=t.wrapperClassName,m=t.labelClassName,g=t.label,v=t.labelFormatter,x=t.accessibilityLayer,b=x===void 0?!1:x,y=function(){if(f&&f.length){var L={padding:0,margin:0},H=(h?oN(f,h):f).map(function(U,F){if(U.type==="none")return null;var O=C0({display:"block",paddingTop:4,paddingBottom:4,color:U.color||"#000"},s),P=U.formatter||d||Dbe,A=U.value,D=U.name,B=A,z=D;if(P&&B!=null&&z!=null){var K=P(A,D,U,F,f);if(Array.isArray(K)){var Y=Cbe(K,2);B=Y[0],z=Y[1]}else B=K}return $.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(F),style:O},nr(z)?$.createElement("span",{className:"recharts-tooltip-item-name"},z):null,nr(z)?$.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,$.createElement("span",{className:"recharts-tooltip-item-value"},B),$.createElement("span",{className:"recharts-tooltip-item-unit"},U.unit||""))});return $.createElement("ul",{className:"recharts-tooltip-item-list",style:L},H)}return null},j=C0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),k=C0({margin:0},u),_=!Ue(g),S=_?g:"",E=Ge("recharts-default-tooltip",p),C=Ge("recharts-tooltip-label",m);_&&v&&f!==void 0&&f!==null&&(S=v(g,f));var R=b?{role:"status","aria-live":"assertive"}:{};return $.createElement("div",zk({className:E,style:j},R),$.createElement("p",{className:C,style:k},$.isValidElement(S)?S:"".concat(S)),y())};function th(e){"@babel/helpers - typeof";return th=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},th(e)}function gm(e,t,r){return t=Lbe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lbe(e){var t=zbe(e,"string");return th(t)=="symbol"?t:t+""}function zbe(e,t){if(th(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(th(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bd="recharts-tooltip-wrapper",Bbe={visibility:"hidden"};function Ube(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Ge(bd,gm(gm(gm(gm({},"".concat(bd,"-right"),se(r)&&t&&se(t.x)&&r>=t.x),"".concat(bd,"-left"),se(r)&&t&&se(t.x)&&r<t.x),"".concat(bd,"-bottom"),se(n)&&t&&se(t.y)&&n>=t.y),"".concat(bd,"-top"),se(n)&&t&&se(t.y)&&n<t.y))}function S2(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&se(a[n]))return a[n];var f=r[n]-s-i,d=r[n]+i;if(t[n])return o[n]?f:d;if(o[n]){var h=f,p=c[n];return h<p?Math.max(d,c[n]):Math.max(f,c[n])}var m=d+s,g=c[n]+u;return m>g?Math.max(f,c[n]):Math.max(d,c[n])}function Fbe(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Kbe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,f,d;return o.height>0&&o.width>0&&r?(f=S2({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=S2({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=Fbe({translateX:f,translateY:d,useTranslate3d:s})):u=Bbe,{cssProperties:u,cssClasses:Ube({translateX:f,translateY:d,coordinate:r})}}function iu(e){"@babel/helpers - typeof";return iu=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},iu(e)}function E2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(r),!0).forEach(function(n){Uk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vbe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lF(n.key),n)}}function Wbe(e,t,r){return t&&Vbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qbe(e,t,r){return t=xy(t),Gbe(e,sF()?Reflect.construct(t,r||[],xy(e).constructor):t.apply(e,r))}function Gbe(e,t){if(t&&(iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ybe(e)}function Ybe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(sF=function(){return!!e})()}function xy(e){return xy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xy(e)}function Xbe(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&&Bk(e,t)}function Bk(e,t){return Bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bk(e,t)}function Uk(e,t,r){return t=lF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lF(e){var t=Jbe(e,"string");return iu(t)=="symbol"?t:t+""}function Jbe(e,t){if(iu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(iu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C2=1,Qbe=function(e){function t(){var r;Hbe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=qbe(this,t,[].concat(i)),Uk(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Uk(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,c,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return Xbe(t,e),Wbe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>C2||Math.abs(n.height-this.state.lastBoundingBox.height)>C2)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.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 n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,g=i.reverseDirection,v=i.useTranslate3d,x=i.viewBox,b=i.wrapperStyle,y=Kbe({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),j=y.cssClasses,k=y.cssProperties,_=N2(N2({transition:h&&a?"transform ".concat(s,"ms ").concat(c):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return $.createElement("div",{tabIndex:-1,className:j,style:_,ref:function(E){n.wrapperNode=E}},u)}}])}(w.PureComponent),Zbe=function(){return!(typeof window!="undefined"&&window.document&&window.document.createElement&&window.setTimeout)},_a={isSsr:Zbe(),get:function(t){return _a[t]},set:function(t,r){if(typeof t=="string")_a[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(i){_a[i]=t[i]})}}};function au(e){"@babel/helpers - typeof";return au=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},au(e)}function T2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(r),!0).forEach(function(n){sN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t0e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uF(n.key),n)}}function r0e(e,t,r){return t&&t0e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n0e(e,t,r){return t=by(t),i0e(e,cF()?Reflect.construct(t,r||[],by(e).constructor):t.apply(e,r))}function i0e(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a0e(e)}function a0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(cF=function(){return!!e})()}function by(e){return by=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},by(e)}function o0e(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&&Fk(e,t)}function Fk(e,t){return Fk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fk(e,t)}function sN(e,t,r){return t=uF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uF(e){var t=s0e(e,"string");return au(t)=="symbol"?t:t+""}function s0e(e,t){if(au(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l0e(e){return e.dataKey}function c0e(e,t){return $.isValidElement(e)?$.cloneElement(e,t):typeof e=="function"?$.createElement(e,t):$.createElement(Ibe,t)}var Ai=function(e){function t(){return e0e(this,t),n0e(this,t,arguments)}return o0e(t,e),r0e(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,p=i.offset,m=i.payload,g=i.payloadUniqBy,v=i.position,x=i.reverseDirection,b=i.useTranslate3d,y=i.viewBox,j=i.wrapperStyle,k=m!=null?m:[];d&&k.length&&(k=ZU(m.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),g,l0e));var _=k.length>0;return $.createElement(Qbe,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:a,coordinate:f,hasPayload:_,offset:p,position:v,reverseDirection:x,useTranslate3d:b,viewBox:y,wrapperStyle:j},c0e(u,A2(A2({},this.props),{},{payload:k})))}}])}(w.PureComponent);sN(Ai,"displayName","Tooltip");sN(Ai,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_a.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 u0e=ia,d0e=function(){return u0e.Date.now()},f0e=d0e,h0e=/\s/;function p0e(e){for(var t=e.length;t--&&h0e.test(e.charAt(t)););return t}var m0e=p0e,g0e=m0e,y0e=/^\s+/;function v0e(e){return e&&e.slice(0,g0e(e)+1).replace(y0e,"")}var x0e=v0e,b0e=x0e,P2=Zo,w0e=Bu,O2=NaN,k0e=/^[-+]0x[0-9a-f]+$/i,_0e=/^0b[01]+$/i,j0e=/^0o[0-7]+$/i,S0e=parseInt;function E0e(e){if(typeof e=="number")return e;if(w0e(e))return O2;if(P2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=P2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=b0e(e);var r=_0e.test(e);return r||j0e.test(e)?S0e(e.slice(2),r?2:8):k0e.test(e)?O2:+e}var dF=E0e,N0e=Zo,T0=f0e,R2=dF,C0e="Expected a function",T0e=Math.max,A0e=Math.min;function P0e(e,t,r){var n,i,a,o,s,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(C0e);t=R2(t)||0,N0e(r)&&(f=!!r.leading,d="maxWait"in r,a=d?T0e(R2(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(_){var S=n,E=i;return n=i=void 0,u=_,o=e.apply(E,S),o}function m(_){return u=_,s=setTimeout(x,t),f?p(_):o}function g(_){var S=_-c,E=_-u,C=t-S;return d?A0e(C,a-E):C}function v(_){var S=_-c,E=_-u;return c===void 0||S>=t||S<0||d&&E>=a}function x(){var _=T0();if(v(_))return b(_);s=setTimeout(x,g(_))}function b(_){return s=void 0,h&&n?p(_):(n=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function j(){return s===void 0?o:b(T0())}function k(){var _=T0(),S=v(_);if(n=arguments,i=this,c=_,S){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(x,t),p(c)}return s===void 0&&(s=setTimeout(x,t)),o}return k.cancel=y,k.flush=j,k}var O0e=P0e,R0e=O0e,$0e=Zo,M0e="Expected a function";function D0e(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(M0e);return $0e(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),R0e(e,t,{leading:n,maxWait:t,trailing:i})}var I0e=D0e;const fF=Qe(I0e);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 $2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ym(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(r),!0).forEach(function(n){L0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L0e(e,t,r){return t=z0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z0e(e){var t=B0e(e,"string");return rh(t)=="symbol"?t:t+""}function B0e(e,t){if(rh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function U0e(e,t){return V0e(e)||H0e(e,t)||K0e(e,t)||F0e()}function F0e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function K0e(e,t){if(e){if(typeof e=="string")return M2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M2(e,t)}}function M2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function H0e(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function V0e(e){if(Array.isArray(e))return e}var W0e=w.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,c=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,p=e.children,m=e.debounce,g=m===void 0?0:m,v=e.id,x=e.className,b=e.onResize,y=e.style,j=y===void 0?{}:y,k=w.useRef(null),_=w.useRef();_.current=b,w.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var S=w.useState({containerWidth:i.width,containerHeight:i.height}),E=U0e(S,2),C=E[0],R=E[1],M=w.useCallback(function(H,U){R(function(F){var O=Math.round(H),P=Math.round(U);return F.containerWidth===O&&F.containerHeight===P?F:{containerWidth:O,containerHeight:P}})},[]);w.useEffect(function(){var H=function(D){var B,z=D[0].contentRect,K=z.width,Y=z.height;M(K,Y),(B=_.current)===null||B===void 0||B.call(_,K,Y)};g>0&&(H=fF(H,g,{trailing:!0,leading:!1}));var U=new ResizeObserver(H),F=k.current.getBoundingClientRect(),O=F.width,P=F.height;return M(O,P),U.observe(k.current),function(){U.disconnect()}},[M,g]);var L=w.useMemo(function(){var H=C.containerWidth,U=C.containerHeight;if(H<0||U<0)return null;ka(js(o)||js(c),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",o,c),ka(!r||r>0,"The aspect(%s) must be greater than zero.",r);var F=js(o)?H:o,O=js(c)?U:c;r&&r>0&&(F?O=F/r:O&&(F=O*r),h&&O>h&&(O=h)),ka(F>0||O>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",F,O,o,c,f,d,r);var P=!Array.isArray(p)&&wa(p.type).endsWith("Chart");return $.Children.map(p,function(A){return $.isValidElement(A)?w.cloneElement(A,ym({width:F,height:O},P?{style:ym({height:"100%",width:"100%",maxHeight:O,maxWidth:F},A.props.style)}:{})):A})},[r,p,c,h,d,f,C,o]);return $.createElement("div",{id:v?"".concat(v):void 0,className:Ge("recharts-responsive-container",x),style:ym(ym({},j),{},{width:o,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:k},L)}),hF=function(t){return null};hF.displayName="Cell";function nh(e){"@babel/helpers - typeof";return nh=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},nh(e)}function D2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D2(Object(r),!0).forEach(function(n){q0e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q0e(e,t,r){return t=G0e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G0e(e){var t=Y0e(e,"string");return nh(t)=="symbol"?t:t+""}function Y0e(e,t){if(nh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cl={widthCache:{},cacheCount:0},X0e=2e3,J0e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},I2="recharts_measurement_span";function Q0e(e){var t=Kk({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var lf=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||_a.isSsr)return{width:0,height:0};var n=Q0e(r),i=JSON.stringify({text:t,copyStyle:n});if(Cl.widthCache[i])return Cl.widthCache[i];try{var a=document.getElementById(I2);a||(a=document.createElement("span"),a.setAttribute("id",I2),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Kk(Kk({},J0e),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),c={width:s.width,height:s.height};return Cl.widthCache[i]=c,++Cl.cacheCount>X0e&&(Cl.cacheCount=0,Cl.widthCache={}),c}catch(u){return{width:0,height:0}}},Z0e=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 wy(e,t){return nwe(e)||rwe(e,t)||twe(e,t)||ewe()}function ewe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function twe(e,t){if(e){if(typeof e=="string")return L2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L2(e,t)}}function L2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rwe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function nwe(e){if(Array.isArray(e))return e}function iwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,owe(n.key),n)}}function awe(e,t,r){return t&&z2(e.prototype,t),r&&z2(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function owe(e){var t=swe(e,"string");return ih(t)=="symbol"?t:t+""}function swe(e,t){if(ih(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ih(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,U2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,lwe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,cwe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,pF={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},uwe=Object.keys(pF),ic="NaN";function dwe(e,t){return e*pF[t]}var vm=function(){function e(t,r){iwe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!lwe.test(r)&&(this.num=NaN,this.unit=""),uwe.includes(r)&&(this.num=dwe(t,r),this.unit="px")}return awe(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=cwe.exec(r))!==null&&n!==void 0?n:[],a=wy(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s!=null?s:"")}}])}();function mF(e){if(e.includes(ic))return ic;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=B2.exec(t))!==null&&r!==void 0?r:[],i=wy(n,4),a=i[1],o=i[2],s=i[3],c=vm.parse(a!=null?a:""),u=vm.parse(s!=null?s:""),f=o==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return ic;t=t.replace(B2,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=U2.exec(t))!==null&&d!==void 0?d:[],p=wy(h,4),m=p[1],g=p[2],v=p[3],x=vm.parse(m!=null?m:""),b=vm.parse(v!=null?v:""),y=g==="+"?x.add(b):x.subtract(b);if(y.isNaN())return ic;t=t.replace(U2,y.toString())}return t}var F2=/\(([^()]*)\)/;function fwe(e){for(var t=e;t.includes("(");){var r=F2.exec(t),n=wy(r,2),i=n[1];t=t.replace(F2,mF(i))}return t}function hwe(e){var t=e.replace(/\s+/g,"");return t=fwe(t),t=mF(t),t}function pwe(e){try{return hwe(e)}catch(t){return ic}}function A0(e){var t=pwe(e.slice(5,-1));return t===ic?"":t}var mwe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],gwe=["dx","dy","angle","className","breakAll"];function Hk(){return Hk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hk.apply(this,arguments)}function K2(e,t){if(e==null)return{};var r=ywe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ywe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function H2(e,t){return wwe(e)||bwe(e,t)||xwe(e,t)||vwe()}function vwe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function xwe(e,t){if(e){if(typeof e=="string")return V2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V2(e,t)}}function V2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bwe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function wwe(e){if(Array.isArray(e))return e}var gF=/[ \f\n\r\t\v\u2028\u2029]+/,yF=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];Ue(r)||(n?a=r.toString().split(""):a=r.toString().split(gF));var o=a.map(function(c){return{word:c,width:lf(c,i).width}}),s=n?0:lf(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch(c){return null}},kwe=function(t,r,n,i,a){var o=t.maxLines,s=t.children,c=t.style,u=t.breakAll,f=se(o),d=s,h=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(O,P){var A=P.word,D=P.width,B=O[O.length-1];if(B&&(i==null||a||B.width+D+n<Number(i)))B.words.push(A),B.width+=D+n;else{var z={words:[A],width:D};O.push(z)}return O},[])},p=h(r),m=function(F){return F.reduce(function(O,P){return O.width>P.width?O:P})};if(!f)return p;for(var g="…",v=function(F){var O=d.slice(0,F),P=yF({breakAll:u,style:c,children:O+g}).wordsWithComputedWidth,A=h(P),D=A.length>o||m(A).width>Number(i);return[D,A]},x=0,b=d.length-1,y=0,j;x<=b&&y<=d.length-1;){var k=Math.floor((x+b)/2),_=k-1,S=v(_),E=H2(S,2),C=E[0],R=E[1],M=v(k),L=H2(M,1),H=L[0];if(!C&&!H&&(x=k+1),C&&H&&(b=k-1),!C&&H){j=R;break}y++}return j||p},W2=function(t){var r=Ue(t)?[]:t.toString().split(gF);return[{words:r}]},_we=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!_a.isSsr){var c,u,f=yF({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return W2(i);return kwe({breakAll:o,children:i,maxLines:s,style:a},c,u,r,n)}return W2(i)},q2="#808080",ky=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,v=t.fill,x=v===void 0?q2:v,b=K2(t,mwe),y=w.useMemo(function(){return _we({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:d,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,d,b.style,b.width]),j=b.dx,k=b.dy,_=b.angle,S=b.className,E=b.breakAll,C=K2(b,gwe);if(!nr(n)||!nr(a))return null;var R=n+(se(j)?j:0),M=a+(se(k)?k:0),L;switch(g){case"start":L=A0("calc(".concat(u,")"));break;case"middle":L=A0("calc(".concat((y.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:L=A0("calc(".concat(y.length-1," * -").concat(s,")"));break}var H=[];if(d){var U=y[0].width,F=b.width;H.push("scale(".concat((se(F)?F/U:1)/U,")"))}return _&&H.push("rotate(".concat(_,", ").concat(R,", ").concat(M,")")),H.length&&(C.transform=H.join(" ")),$.createElement("text",Hk({},qe(C,!0),{x:R,y:M,className:Ge("recharts-text",S),textAnchor:p,fill:x.includes("url")?q2:x}),y.map(function(O,P){var A=O.words.join(E?"":" ");return $.createElement("tspan",{x:R,dy:P===0?L:s,key:"".concat(A,"-").concat(P)},A)}))};function zo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jwe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lN(e){let t,r,n;e.length!==2?(t=zo,r=(s,c)=>zo(e(s),c),n=(s,c)=>e(s)-c):(t=e===zo||e===jwe?e:Swe,r=e,n=e);function i(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<0?u=d+1:f=d}while(u<f)}return u}function a(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,c,u=0,f=s.length){const d=i(s,c,u,f-1);return d>u&&n(s[d-1],c)>-n(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function Swe(){return 0}function vF(e){return e===null?NaN:+e}function*Ewe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Nwe=lN(zo),fp=Nwe.right;lN(vF).center;class G2 extends Map{constructor(t,r=Awe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Y2(this,t))}has(t){return super.has(Y2(this,t))}set(t,r){return super.set(Cwe(this,t),r)}delete(t){return super.delete(Twe(this,t))}}function Y2({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Cwe({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Twe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Awe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Pwe(e=zo){if(e===zo)return xF;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function xF(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Owe=Math.sqrt(50),Rwe=Math.sqrt(10),$we=Math.sqrt(2);function _y(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=Owe?10:a>=Rwe?5:a>=$we?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),c=Math.round(t*u),s/u<e&&++s,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),c=Math.round(t/u),s*u<e&&++s,c*u>t&&--c),c<s&&.5<=r&&r<2?_y(e,t,r*2):[s,c,u]}function Vk(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?_y(t,e,r):_y(e,t,r);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)c[u]=(a-u)/-o;else for(let u=0;u<s;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)c[u]=(i+u)/-o;else for(let u=0;u<s;++u)c[u]=(i+u)*o;return c}function Wk(e,t,r){return t=+t,e=+e,r=+r,_y(e,t,r)[2]}function qk(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Wk(t,e,r):Wk(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function X2(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function J2(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function bF(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?xF:Pwe(i);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*d/c+h)),m=Math.min(n,Math.floor(t+(c-u)*d/c+h));bF(e,t,p,m,i)}const a=e[t];let o=r,s=n;for(wd(e,r,t),i(e[n],a)>0&&wd(e,r,n);o<s;){for(wd(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?wd(e,r,s):(++s,wd(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function wd(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Mwe(e,t,r){if(e=Float64Array.from(Ewe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return J2(e);if(t>=1)return X2(e);var n,i=(n-1)*t,a=Math.floor(i),o=X2(bF(e,a).subarray(0,a+1)),s=J2(e.subarray(a+1));return o+(s-o)*(i-a)}}function Dwe(e,t,r=vF){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function Iwe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Wn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ha(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 Gk=Symbol("implicit");function cN(){var e=new G2,t=[],r=[],n=Gk;function i(a){let o=e.get(a);if(o===void 0){if(n!==Gk)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new G2;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return cN(t,r).unknown(n)},Wn.apply(i,arguments),i}function ah(){var e=cN().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,p=i<n,m=p?i:n,g=p?n:i;a=(g-m)/Math.max(1,h-c+u*2),s&&(a=Math.floor(a)),m+=(g-m-a*(h-c))*f,o=a*(1-c),s&&(m=Math.round(m),o=Math.round(o));var v=Iwe(h).map(function(x){return m+a*x});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,d()):s},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return ah(t(),[n,i]).round(s).paddingInner(c).paddingOuter(u).align(f)},Wn.apply(d(),arguments)}function wF(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return wF(t())},e}function cf(){return wF(ah.apply(null,arguments).paddingInner(1))}function uN(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function kF(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function hp(){}var oh=.7,jy=1/oh,jc="\\s*([+-]?\\d+)\\s*",sh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lwe=/^#([0-9a-f]{3,8})$/,zwe=new RegExp("^rgb\\(".concat(jc,",").concat(jc,",").concat(jc,"\\)$")),Bwe=new RegExp("^rgb\\(".concat(qi,",").concat(qi,",").concat(qi,"\\)$")),Uwe=new RegExp("^rgba\\(".concat(jc,",").concat(jc,",").concat(jc,",").concat(sh,"\\)$")),Fwe=new RegExp("^rgba\\(".concat(qi,",").concat(qi,",").concat(qi,",").concat(sh,"\\)$")),Kwe=new RegExp("^hsl\\(".concat(sh,",").concat(qi,",").concat(qi,"\\)$")),Hwe=new RegExp("^hsla\\(".concat(sh,",").concat(qi,",").concat(qi,",").concat(sh,"\\)$")),Q2={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};uN(hp,lh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Z2,formatHex:Z2,formatHex8:Vwe,formatHsl:Wwe,formatRgb:eR,toString:eR});function Z2(){return this.rgb().formatHex()}function Vwe(){return this.rgb().formatHex8()}function Wwe(){return _F(this).formatHsl()}function eR(){return this.rgb().formatRgb()}function lh(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Lwe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?tR(t):r===3?new Xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xm(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=zwe.exec(e))?new Xr(t[1],t[2],t[3],1):(t=Bwe.exec(e))?new Xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Uwe.exec(e))?xm(t[1],t[2],t[3],t[4]):(t=Fwe.exec(e))?xm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Kwe.exec(e))?iR(t[1],t[2]/100,t[3]/100,1):(t=Hwe.exec(e))?iR(t[1],t[2]/100,t[3]/100,t[4]):Q2.hasOwnProperty(e)?tR(Q2[e]):e==="transparent"?new Xr(NaN,NaN,NaN,0):null}function tR(e){return new Xr(e>>16&255,e>>8&255,e&255,1)}function xm(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xr(e,t,r,n)}function qwe(e){return e instanceof hp||(e=lh(e)),e?(e=e.rgb(),new Xr(e.r,e.g,e.b,e.opacity)):new Xr}function Yk(e,t,r,n){return arguments.length===1?qwe(e):new Xr(e,t,r,n==null?1:n)}function Xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}uN(Xr,Yk,kF(hp,{brighter(e){return e=e==null?jy:Math.pow(jy,e),new Xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?oh:Math.pow(oh,e),new Xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xr(Fs(this.r),Fs(this.g),Fs(this.b),Sy(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:rR,formatHex:rR,formatHex8:Gwe,formatRgb:nR,toString:nR}));function rR(){return"#".concat(Ss(this.r)).concat(Ss(this.g)).concat(Ss(this.b))}function Gwe(){return"#".concat(Ss(this.r)).concat(Ss(this.g)).concat(Ss(this.b)).concat(Ss((isNaN(this.opacity)?1:this.opacity)*255))}function nR(){const e=Sy(this.opacity);return"".concat(e===1?"rgb(":"rgba(").concat(Fs(this.r),", ").concat(Fs(this.g),", ").concat(Fs(this.b)).concat(e===1?")":", ".concat(e,")"))}function Sy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ss(e){return e=Fs(e),(e<16?"0":"")+e.toString(16)}function iR(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ci(e,t,r,n)}function _F(e){if(e instanceof ci)return new ci(e.h,e.s,e.l,e.opacity);if(e instanceof hp||(e=lh(e)),!e)return new ci;if(e instanceof ci)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new ci(o,s,c,e.opacity)}function Ywe(e,t,r,n){return arguments.length===1?_F(e):new ci(e,t,r,n==null?1:n)}function ci(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}uN(ci,Ywe,kF(hp,{brighter(e){return e=e==null?jy:Math.pow(jy,e),new ci(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?oh:Math.pow(oh,e),new ci(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Xr(P0(e>=240?e-240:e+120,i,n),P0(e,i,n),P0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ci(aR(this.h),bm(this.s),bm(this.l),Sy(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=Sy(this.opacity);return"".concat(e===1?"hsl(":"hsla(").concat(aR(this.h),", ").concat(bm(this.s)*100,"%, ").concat(bm(this.l)*100,"%").concat(e===1?")":", ".concat(e,")"))}}));function aR(e){return e=(e||0)%360,e<0?e+360:e}function bm(e){return Math.max(0,Math.min(1,e||0))}function P0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const dN=e=>()=>e;function Xwe(e,t){return function(r){return e+r*t}}function Jwe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Qwe(e){return(e=+e)==1?jF:function(t,r){return r-t?Jwe(t,r,e):dN(isNaN(t)?r:t)}}function jF(e,t){var r=t-e;return r?Xwe(e,r):dN(isNaN(e)?t:e)}const oR=function e(t){var r=Qwe(t);function n(i,a){var o=r((i=Yk(i)).r,(a=Yk(a)).r),s=r(i.g,a.g),c=r(i.b,a.b),u=jF(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=c(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function Zwe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function e1e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function t1e(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Gu(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function r1e(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Ey(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function n1e(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Gu(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Xk=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,O0=new RegExp(Xk.source,"g");function i1e(e){return function(){return e}}function a1e(e){return function(t){return e(t)+""}}function o1e(e,t){var r=Xk.lastIndex=O0.lastIndex=0,n,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(n=Xk.exec(e))&&(i=O0.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Ey(n,i)})),r=O0.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?a1e(c[0].x):i1e(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)s[(d=c[f]).i]=d.x(u);return s.join("")})}function Gu(e,t){var r=typeof t,n;return t==null||r==="boolean"?dN(t):(r==="number"?Ey:r==="string"?(n=lh(t))?(t=n,oR):o1e:t instanceof lh?oR:t instanceof Date?r1e:e1e(t)?Zwe:Array.isArray(t)?t1e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?n1e:Ey)(e,t)}function fN(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function s1e(e,t){t===void 0&&(t=e,e=Gu);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function l1e(e){return function(){return e}}function Ny(e){return+e}var sR=[0,1];function zr(e){return e}function Jk(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:l1e(isNaN(t)?NaN:.5)}function c1e(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function u1e(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=Jk(i,n),a=r(o,a)):(n=Jk(n,i),a=r(a,o)),function(s){return a(n(s))}}function d1e(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=Jk(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var c=fp(e,s,1,n)-1;return a[c](i[c](s))}}function pp(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Tx(){var e=sR,t=sR,r=Gu,n,i,a,o=zr,s,c,u;function f(){var h=Math.min(e.length,t.length);return o!==zr&&(o=c1e(e[0],e[h-1])),s=h>2?d1e:u1e,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(c||(c=s(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(i((u||(u=s(t,e.map(n),Ey)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Ny),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=fN,f()},d.clamp=function(h){return arguments.length?(o=h?!0:zr,f()):o!==zr},d.interpolate=function(h){return arguments.length?(r=h,f()):r},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return n=h,i=p,f()}}function hN(){return Tx()(zr,zr)}function f1e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Cy(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function ou(e){return e=Cy(Math.abs(e)),e?e[1]:NaN}function h1e(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),a.push(r.substring(i-=s,i+s)),!((c+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function p1e(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var m1e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ch(e){if(!(t=m1e.exec(e)))throw new Error("invalid format: "+e);var t;return new pN({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]})}ch.prototype=pN.prototype;function pN(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+""}pN.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 g1e(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var SF;function y1e(e,t){var r=Cy(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(SF=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Cy(e,Math.max(0,t+a-1))[0]}function lR(e,t){var r=Cy(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const cR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:f1e,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)=>lR(e*100,t),r:lR,s:y1e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uR(e){return e}var dR=Array.prototype.map,fR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v1e(e){var t=e.grouping===void 0||e.thousands===void 0?uR:h1e(dR.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?uR:p1e(dR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=ch(d);var h=d.fill,p=d.align,m=d.sign,g=d.symbol,v=d.zero,x=d.width,b=d.comma,y=d.precision,j=d.trim,k=d.type;k==="n"?(b=!0,k="g"):cR[k]||(y===void 0&&(y=12),j=!0,k="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var _=g==="$"?r:g==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",S=g==="$"?n:/[%p]/.test(k)?o:"",E=cR[k],C=/[defgprs%]/.test(k);y=y===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function R(M){var L=_,H=S,U,F,O;if(k==="c")H=E(M)+H,M="";else{M=+M;var P=M<0||1/M<0;if(M=isNaN(M)?c:E(Math.abs(M),y),j&&(M=g1e(M)),P&&+M==0&&m!=="+"&&(P=!1),L=(P?m==="("?m:s:m==="-"||m==="("?"":m)+L,H=(k==="s"?fR[8+SF/3]:"")+H+(P&&m==="("?")":""),C){for(U=-1,F=M.length;++U<F;)if(O=M.charCodeAt(U),48>O||O>57){H=(O===46?i+M.slice(U+1):M.slice(U))+H,M=M.slice(0,U);break}}}b&&!v&&(M=t(M,1/0));var A=L.length+M.length+H.length,D=A<x?new Array(x-A+1).join(h):"";switch(b&&v&&(M=t(D+M,D.length?x-H.length:1/0),D=""),p){case"<":M=L+M+H+D;break;case"=":M=L+D+M+H;break;case"^":M=D.slice(0,A=D.length>>1)+L+M+H+D.slice(A);break;default:M=D+L+M+H;break}return a(M)}return R.toString=function(){return d+""},R}function f(d,h){var p=u((d=ch(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(ou(h)/3)))*3,g=Math.pow(10,-m),v=fR[8+m/3];return function(x){return p(g*x)+v}}return{format:u,formatPrefix:f}}var wm,mN,EF;x1e({thousands:",",grouping:[3],currency:["$",""]});function x1e(e){return wm=v1e(e),mN=wm.format,EF=wm.formatPrefix,wm}function b1e(e){return Math.max(0,-ou(Math.abs(e)))}function w1e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ou(t)/3)))*3-ou(Math.abs(e)))}function k1e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ou(t)-ou(e))+1}function NF(e,t,r,n){var i=qk(e,t,r),a;switch(n=ch(n==null?",f":n),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=w1e(i,o))&&(n.precision=a),EF(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=k1e(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=b1e(i))&&(n.precision=a-(n.type==="%")*2);break}}return mN(n)}function ts(e){var t=e.domain;return e.ticks=function(r){var n=t();return Vk(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var i=t();return NF(i[0],i[i.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],c,u,f=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);f-- >0;){if(u=Wk(o,s,r),u===c)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function Ty(){var e=hN();return e.copy=function(){return pp(e,Ty())},Wn.apply(e,arguments),ts(e)}function CF(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ny),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return CF(e).unknown(t)},e=arguments.length?Array.from(e,Ny):[0,1],ts(r)}function TF(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function hR(e){return Math.log(e)}function pR(e){return Math.exp(e)}function _1e(e){return-Math.log(-e)}function j1e(e){return-Math.exp(-e)}function S1e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function E1e(e){return e===10?S1e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function N1e(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 mR(e){return(t,r)=>-e(-t,r)}function gN(e){const t=e(hR,pR),r=t.domain;let n=10,i,a;function o(){return i=N1e(n),a=E1e(n),r()[0]<0?(i=mR(i),a=mR(a),e(_1e,j1e)):e(hR,pR),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const c=r();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),p=i(f),m,g;const v=s==null?10:+s;let x=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(m=1;m<n;++m)if(g=h<0?m/a(-h):m*a(h),!(g<u)){if(g>f)break;x.push(g)}}else for(;h<=p;++h)for(m=n-1;m>=1;--m)if(g=h>0?m/a(-h):m*a(h),!(g<u)){if(g>f)break;x.push(g)}x.length*2<v&&(x=Vk(u,f,v))}else x=Vk(h,p,Math.min(p-h,v)).map(a);return d?x.reverse():x},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=ch(c)).precision==null&&(c.trim=!0),c=mN(c)),s===1/0)return c;const u=Math.max(1,n*s/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*n<n-.5&&(d*=n),d<=u?c(f):""}},t.nice=()=>r(TF(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function AF(){const e=gN(Tx()).domain([1,10]);return e.copy=()=>pp(e,AF()).base(e.base()),Wn.apply(e,arguments),e}function gR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function yR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yN(e){var t=1,r=e(gR(t),yR(t));return r.constant=function(n){return arguments.length?e(gR(t=+n),yR(t)):t},ts(r)}function PF(){var e=yN(Tx());return e.copy=function(){return pp(e,PF()).constant(e.constant())},Wn.apply(e,arguments)}function vR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function C1e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function T1e(e){return e<0?-e*e:e*e}function vN(e){var t=e(zr,zr),r=1;function n(){return r===1?e(zr,zr):r===.5?e(C1e,T1e):e(vR(r),vR(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ts(t)}function xN(){var e=vN(Tx());return e.copy=function(){return pp(e,xN()).exponent(e.exponent())},Wn.apply(e,arguments),e}function A1e(){return xN.apply(null,arguments).exponent(.5)}function xR(e){return Math.sign(e)*e*e}function P1e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function OF(){var e=hN(),t=[0,1],r=!1,n;function i(a){var o=P1e(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(xR(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ny)).map(xR)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return OF(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Wn.apply(i,arguments),ts(i)}function RF(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=Dwe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[fp(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(zo),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return RF().domain(e).range(t).unknown(n)},Wn.apply(a,arguments)}function $F(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[fp(n,c,0,r)]:a}function s(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,s()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return $F().domain([e,t]).range(i).unknown(a)},Wn.apply(ts(o),arguments)}function MF(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[fp(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return MF().domain(e).range(t).unknown(r)},Wn.apply(i,arguments)}const R0=new Date,$0=new Date;function ar(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let u;do c.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return c},i.filter=a=>ar(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(R0.setTime(+a),$0.setTime(+o),e(R0),e($0),Math.floor(r(R0,$0))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Ay=ar(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ay.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ar(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ay);Ay.range;const ya=1e3,Dn=ya*60,va=Dn*60,Oa=va*24,bN=Oa*7,bR=Oa*30,M0=Oa*365,Es=ar(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ya)},(e,t)=>(t-e)/ya,e=>e.getUTCSeconds());Es.range;const wN=ar(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ya)},(e,t)=>{e.setTime(+e+t*Dn)},(e,t)=>(t-e)/Dn,e=>e.getMinutes());wN.range;const kN=ar(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Dn)},(e,t)=>(t-e)/Dn,e=>e.getUTCMinutes());kN.range;const _N=ar(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ya-e.getMinutes()*Dn)},(e,t)=>{e.setTime(+e+t*va)},(e,t)=>(t-e)/va,e=>e.getHours());_N.range;const jN=ar(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*va)},(e,t)=>(t-e)/va,e=>e.getUTCHours());jN.range;const mp=ar(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Dn)/Oa,e=>e.getDate()-1);mp.range;const Ax=ar(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Oa,e=>e.getUTCDate()-1);Ax.range;const DF=ar(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Oa,e=>Math.floor(e/Oa));DF.range;function hl(e){return ar(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Dn)/bN)}const Px=hl(0),Py=hl(1),O1e=hl(2),R1e=hl(3),su=hl(4),$1e=hl(5),M1e=hl(6);Px.range;Py.range;O1e.range;R1e.range;su.range;$1e.range;M1e.range;function pl(e){return ar(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/bN)}const Ox=pl(0),Oy=pl(1),D1e=pl(2),I1e=pl(3),lu=pl(4),L1e=pl(5),z1e=pl(6);Ox.range;Oy.range;D1e.range;I1e.range;lu.range;L1e.range;z1e.range;const SN=ar(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());SN.range;const EN=ar(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());EN.range;const Ra=ar(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());Ra.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ar(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Ra.range;const $a=ar(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());$a.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ar(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});$a.range;function IF(e,t,r,n,i,a){const o=[[Es,1,ya],[Es,5,5*ya],[Es,15,15*ya],[Es,30,30*ya],[a,1,Dn],[a,5,5*Dn],[a,15,15*Dn],[a,30,30*Dn],[i,1,va],[i,3,3*va],[i,6,6*va],[i,12,12*va],[n,1,Oa],[n,2,2*Oa],[r,1,bN],[t,1,bR],[t,3,3*bR],[e,1,M0]];function s(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const p=d&&typeof d.range=="function"?d:c(u,f,d),m=p?p.range(u,+f+1):[];return h?m.reverse():m}function c(u,f,d){const h=Math.abs(f-u)/d,p=lN(([,,v])=>v).right(o,h);if(p===o.length)return e.every(qk(u/M0,f/M0,d));if(p===0)return Ay.every(Math.max(qk(u,f,d),1));const[m,g]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return m.every(g)}return[s,c]}const[B1e,U1e]=IF($a,EN,Ox,DF,jN,kN),[F1e,K1e]=IF(Ra,SN,Px,mp,_N,wN);function D0(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 I0(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 kd(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function H1e(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,u=_d(i),f=jd(i),d=_d(a),h=jd(a),p=_d(o),m=jd(o),g=_d(s),v=jd(s),x=_d(c),b=jd(c),y={a:P,A,b:D,B,c:null,d:ER,e:ER,f:hke,g:_ke,G:Ske,H:uke,I:dke,j:fke,L:LF,m:pke,M:mke,p:z,q:K,Q:TR,s:AR,S:gke,u:yke,U:vke,V:xke,w:bke,W:wke,x:null,X:null,y:kke,Y:jke,Z:Eke,"%":CR},j={a:Y,A:G,b:re,B:le,c:null,d:NR,e:NR,f:Ake,g:Bke,G:Fke,H:Nke,I:Cke,j:Tke,L:BF,m:Pke,M:Oke,p:me,q:Ke,Q:TR,s:AR,S:Rke,u:$ke,U:Mke,V:Dke,w:Ike,W:Lke,x:null,X:null,y:zke,Y:Uke,Z:Kke,"%":CR},k={a:R,A:M,b:L,B:H,c:U,d:jR,e:jR,f:oke,g:_R,G:kR,H:SR,I:SR,j:rke,L:ake,m:tke,M:nke,p:C,q:eke,Q:lke,s:cke,S:ike,u:Y1e,U:X1e,V:J1e,w:G1e,W:Q1e,x:F,X:O,y:_R,Y:kR,Z:Z1e,"%":ske};y.x=_(r,y),y.X=_(n,y),y.c=_(t,y),j.x=_(r,j),j.X=_(n,j),j.c=_(t,j);function _(te,ie){return function(we){var J=[],Pe=-1,je=0,De=te.length,Re,q,oe;for(we instanceof Date||(we=new Date(+we));++Pe<De;)te.charCodeAt(Pe)===37&&(J.push(te.slice(je,Pe)),(q=wR[Re=te.charAt(++Pe)])!=null?Re=te.charAt(++Pe):q=Re==="e"?" ":"0",(oe=ie[Re])&&(Re=oe(we,q)),J.push(Re),je=Pe+1);return J.push(te.slice(je,Pe)),J.join("")}}function S(te,ie){return function(we){var J=kd(1900,void 0,1),Pe=E(J,te,we+="",0),je,De;if(Pe!=we.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(ie&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(je=I0(kd(J.y,0,1)),De=je.getUTCDay(),je=De>4||De===0?Oy.ceil(je):Oy(je),je=Ax.offset(je,(J.V-1)*7),J.y=je.getUTCFullYear(),J.m=je.getUTCMonth(),J.d=je.getUTCDate()+(J.w+6)%7):(je=D0(kd(J.y,0,1)),De=je.getDay(),je=De>4||De===0?Py.ceil(je):Py(je),je=mp.offset(je,(J.V-1)*7),J.y=je.getFullYear(),J.m=je.getMonth(),J.d=je.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),De="Z"in J?I0(kd(J.y,0,1)).getUTCDay():D0(kd(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(De+5)%7:J.w+J.U*7-(De+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,I0(J)):D0(J)}}function E(te,ie,we,J){for(var Pe=0,je=ie.length,De=we.length,Re,q;Pe<je;){if(J>=De)return-1;if(Re=ie.charCodeAt(Pe++),Re===37){if(Re=ie.charAt(Pe++),q=k[Re in wR?ie.charAt(Pe++):Re],!q||(J=q(te,we,J))<0)return-1}else if(Re!=we.charCodeAt(J++))return-1}return J}function C(te,ie,we){var J=u.exec(ie.slice(we));return J?(te.p=f.get(J[0].toLowerCase()),we+J[0].length):-1}function R(te,ie,we){var J=p.exec(ie.slice(we));return J?(te.w=m.get(J[0].toLowerCase()),we+J[0].length):-1}function M(te,ie,we){var J=d.exec(ie.slice(we));return J?(te.w=h.get(J[0].toLowerCase()),we+J[0].length):-1}function L(te,ie,we){var J=x.exec(ie.slice(we));return J?(te.m=b.get(J[0].toLowerCase()),we+J[0].length):-1}function H(te,ie,we){var J=g.exec(ie.slice(we));return J?(te.m=v.get(J[0].toLowerCase()),we+J[0].length):-1}function U(te,ie,we){return E(te,t,ie,we)}function F(te,ie,we){return E(te,r,ie,we)}function O(te,ie,we){return E(te,n,ie,we)}function P(te){return o[te.getDay()]}function A(te){return a[te.getDay()]}function D(te){return c[te.getMonth()]}function B(te){return s[te.getMonth()]}function z(te){return i[+(te.getHours()>=12)]}function K(te){return 1+~~(te.getMonth()/3)}function Y(te){return o[te.getUTCDay()]}function G(te){return a[te.getUTCDay()]}function re(te){return c[te.getUTCMonth()]}function le(te){return s[te.getUTCMonth()]}function me(te){return i[+(te.getUTCHours()>=12)]}function Ke(te){return 1+~~(te.getUTCMonth()/3)}return{format:function(te){var ie=_(te+="",y);return ie.toString=function(){return te},ie},parse:function(te){var ie=S(te+="",!1);return ie.toString=function(){return te},ie},utcFormat:function(te){var ie=_(te+="",j);return ie.toString=function(){return te},ie},utcParse:function(te){var ie=S(te+="",!0);return ie.toString=function(){return te},ie}}}var wR={"-":"",_:" ",0:"0"},ur=/^\s*\d+/,V1e=/^%/,W1e=/[\\^$*+?|[\]().{}]/g;function Je(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function q1e(e){return e.replace(W1e,"\\$&")}function _d(e){return new RegExp("^(?:"+e.map(q1e).join("|")+")","i")}function jd(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function G1e(e,t,r){var n=ur.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Y1e(e,t,r){var n=ur.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function X1e(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function J1e(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Q1e(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function kR(e,t,r){var n=ur.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function _R(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Z1e(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function eke(e,t,r){var n=ur.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function tke(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function jR(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function rke(e,t,r){var n=ur.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function SR(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function nke(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function ike(e,t,r){var n=ur.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ake(e,t,r){var n=ur.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function oke(e,t,r){var n=ur.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ske(e,t,r){var n=V1e.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function lke(e,t,r){var n=ur.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function cke(e,t,r){var n=ur.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ER(e,t){return Je(e.getDate(),t,2)}function uke(e,t){return Je(e.getHours(),t,2)}function dke(e,t){return Je(e.getHours()%12||12,t,2)}function fke(e,t){return Je(1+mp.count(Ra(e),e),t,3)}function LF(e,t){return Je(e.getMilliseconds(),t,3)}function hke(e,t){return LF(e,t)+"000"}function pke(e,t){return Je(e.getMonth()+1,t,2)}function mke(e,t){return Je(e.getMinutes(),t,2)}function gke(e,t){return Je(e.getSeconds(),t,2)}function yke(e){var t=e.getDay();return t===0?7:t}function vke(e,t){return Je(Px.count(Ra(e)-1,e),t,2)}function zF(e){var t=e.getDay();return t>=4||t===0?su(e):su.ceil(e)}function xke(e,t){return e=zF(e),Je(su.count(Ra(e),e)+(Ra(e).getDay()===4),t,2)}function bke(e){return e.getDay()}function wke(e,t){return Je(Py.count(Ra(e)-1,e),t,2)}function kke(e,t){return Je(e.getFullYear()%100,t,2)}function _ke(e,t){return e=zF(e),Je(e.getFullYear()%100,t,2)}function jke(e,t){return Je(e.getFullYear()%1e4,t,4)}function Ske(e,t){var r=e.getDay();return e=r>=4||r===0?su(e):su.ceil(e),Je(e.getFullYear()%1e4,t,4)}function Eke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Je(t/60|0,"0",2)+Je(t%60,"0",2)}function NR(e,t){return Je(e.getUTCDate(),t,2)}function Nke(e,t){return Je(e.getUTCHours(),t,2)}function Cke(e,t){return Je(e.getUTCHours()%12||12,t,2)}function Tke(e,t){return Je(1+Ax.count($a(e),e),t,3)}function BF(e,t){return Je(e.getUTCMilliseconds(),t,3)}function Ake(e,t){return BF(e,t)+"000"}function Pke(e,t){return Je(e.getUTCMonth()+1,t,2)}function Oke(e,t){return Je(e.getUTCMinutes(),t,2)}function Rke(e,t){return Je(e.getUTCSeconds(),t,2)}function $ke(e){var t=e.getUTCDay();return t===0?7:t}function Mke(e,t){return Je(Ox.count($a(e)-1,e),t,2)}function UF(e){var t=e.getUTCDay();return t>=4||t===0?lu(e):lu.ceil(e)}function Dke(e,t){return e=UF(e),Je(lu.count($a(e),e)+($a(e).getUTCDay()===4),t,2)}function Ike(e){return e.getUTCDay()}function Lke(e,t){return Je(Oy.count($a(e)-1,e),t,2)}function zke(e,t){return Je(e.getUTCFullYear()%100,t,2)}function Bke(e,t){return e=UF(e),Je(e.getUTCFullYear()%100,t,2)}function Uke(e,t){return Je(e.getUTCFullYear()%1e4,t,4)}function Fke(e,t){var r=e.getUTCDay();return e=r>=4||r===0?lu(e):lu.ceil(e),Je(e.getUTCFullYear()%1e4,t,4)}function Kke(){return"+0000"}function CR(){return"%"}function TR(e){return+e}function AR(e){return Math.floor(+e/1e3)}var Tl,FF,KF;Hke({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","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 Hke(e){return Tl=H1e(e),FF=Tl.format,Tl.parse,KF=Tl.utcFormat,Tl.utcParse,Tl}function Vke(e){return new Date(e)}function Wke(e){return e instanceof Date?+e:+new Date(+e)}function NN(e,t,r,n,i,a,o,s,c,u){var f=hN(),d=f.invert,h=f.domain,p=u(".%L"),m=u(":%S"),g=u("%I:%M"),v=u("%I %p"),x=u("%a %d"),b=u("%b %d"),y=u("%B"),j=u("%Y");function k(_){return(c(_)<_?p:s(_)<_?m:o(_)<_?g:a(_)<_?v:n(_)<_?i(_)<_?x:b:r(_)<_?y:j)(_)}return f.invert=function(_){return new Date(d(_))},f.domain=function(_){return arguments.length?h(Array.from(_,Wke)):h().map(Vke)},f.ticks=function(_){var S=h();return e(S[0],S[S.length-1],_==null?10:_)},f.tickFormat=function(_,S){return S==null?k:u(S)},f.nice=function(_){var S=h();return(!_||typeof _.range!="function")&&(_=t(S[0],S[S.length-1],_==null?10:_)),_?h(TF(S,_)):f},f.copy=function(){return pp(f,NN(e,t,r,n,i,a,o,s,c,u))},f}function qke(){return Wn.apply(NN(F1e,K1e,Ra,SN,Px,mp,_N,wN,Es,FF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Gke(){return Wn.apply(NN(B1e,U1e,$a,EN,Ox,Ax,jN,kN,Es,KF).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Rx(){var e=0,t=1,r,n,i,a,o=zr,s=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-r)*i,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(h){var p,m;return arguments.length?([p,m]=h,o=d(p,m),u):[o(0),o(1)]}}return u.range=f(Gu),u.rangeRound=f(fN),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return a=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),u}}function rs(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function HF(){var e=ts(Rx()(zr));return e.copy=function(){return rs(e,HF())},Ha.apply(e,arguments)}function VF(){var e=gN(Rx()).domain([1,10]);return e.copy=function(){return rs(e,VF()).base(e.base())},Ha.apply(e,arguments)}function WF(){var e=yN(Rx());return e.copy=function(){return rs(e,WF()).constant(e.constant())},Ha.apply(e,arguments)}function CN(){var e=vN(Rx());return e.copy=function(){return rs(e,CN()).exponent(e.exponent())},Ha.apply(e,arguments)}function Yke(){return CN.apply(null,arguments).exponent(.5)}function qF(){var e=[],t=zr;function r(n){if(n!=null&&!isNaN(n=+n))return t((fp(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(zo),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>Mwe(e,a/n))},r.copy=function(){return qF(t).domain(e)},Ha.apply(r,arguments)}function $x(){var e=0,t=.5,r=1,n=1,i,a,o,s,c,u=zr,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-a)*(n*g<n*a?s:c),u(d?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,r]=g,i=f(e=+e),a=f(t=+t),o=f(r=+r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p):[e,t,r]},p.clamp=function(g){return arguments.length?(d=!!g,p):d},p.interpolator=function(g){return arguments.length?(u=g,p):u};function m(g){return function(v){var x,b,y;return arguments.length?([x,b,y]=v,u=s1e(g,[x,b,y]),p):[u(0),u(.5),u(1)]}}return p.range=m(Gu),p.rangeRound=m(fN),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return f=g,i=g(e),a=g(t),o=g(r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,p}}function GF(){var e=ts($x()(zr));return e.copy=function(){return rs(e,GF())},Ha.apply(e,arguments)}function YF(){var e=gN($x()).domain([.1,1,10]);return e.copy=function(){return rs(e,YF()).base(e.base())},Ha.apply(e,arguments)}function XF(){var e=yN($x());return e.copy=function(){return rs(e,XF()).constant(e.constant())},Ha.apply(e,arguments)}function TN(){var e=vN($x());return e.copy=function(){return rs(e,TN()).exponent(e.exponent())},Ha.apply(e,arguments)}function Xke(){return TN.apply(null,arguments).exponent(.5)}const PR=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ah,scaleDiverging:GF,scaleDivergingLog:YF,scaleDivergingPow:TN,scaleDivergingSqrt:Xke,scaleDivergingSymlog:XF,scaleIdentity:CF,scaleImplicit:Gk,scaleLinear:Ty,scaleLog:AF,scaleOrdinal:cN,scalePoint:cf,scalePow:xN,scaleQuantile:RF,scaleQuantize:$F,scaleRadial:OF,scaleSequential:HF,scaleSequentialLog:VF,scaleSequentialPow:CN,scaleSequentialQuantile:qF,scaleSequentialSqrt:Yke,scaleSequentialSymlog:WF,scaleSqrt:A1e,scaleSymlog:PF,scaleThreshold:MF,scaleTime:qke,scaleUtc:Gke,tickFormat:NF},Symbol.toStringTag,{value:"Module"}));var Jke=Bu;function Qke(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!Jke(o):r(o,s)))var s=o,c=a}return c}var JF=Qke;function Zke(e,t){return e>t}var e_e=Zke,t_e=JF,r_e=e_e,n_e=qu;function i_e(e){return e&&e.length?t_e(e,n_e,r_e):void 0}var a_e=i_e;const Mx=Qe(a_e);function o_e(e,t){return e<t}var s_e=o_e,l_e=JF,c_e=s_e,u_e=qu;function d_e(e){return e&&e.length?l_e(e,u_e,c_e):void 0}var f_e=d_e;const Dx=Qe(f_e);var h_e=KE,p_e=es,m_e=aF,g_e=tn;function y_e(e,t){var r=g_e(e)?h_e:m_e;return r(e,p_e(t))}var v_e=y_e,x_e=nF,b_e=v_e;function w_e(e,t){return x_e(b_e(e,t),1)}var k_e=w_e;const __e=Qe(k_e);var j_e=iN;function S_e(e,t){return j_e(e,t)}var E_e=S_e;const Ix=Qe(E_e);var Yu=1e9,N_e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},PN,Tt=!0,Hn="[DecimalError] ",Ks=Hn+"Invalid argument: ",AN=Hn+"Exponent out of range: ",Xu=Math.floor,gs=Math.pow,C_e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fn,or=1e7,_t=7,QF=9007199254740991,Ry=Xu(QF/_t),ye={};ye.absoluteValue=ye.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ye.comparedTo=ye.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};ye.decimalPlaces=ye.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*_t;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ye.dividedBy=ye.div=function(e){return ja(this,new this.constructor(e))};ye.dividedToIntegerBy=ye.idiv=function(e){var t=this,r=t.constructor;return lt(ja(t,new r(e),0,1),r.precision)};ye.equals=ye.eq=function(e){return!this.cmp(e)};ye.exponent=function(){return Gt(this)};ye.greaterThan=ye.gt=function(e){return this.cmp(e)>0};ye.greaterThanOrEqualTo=ye.gte=function(e){return this.cmp(e)>=0};ye.isInteger=ye.isint=function(){return this.e>this.d.length-2};ye.isNegative=ye.isneg=function(){return this.s<0};ye.isPositive=ye.ispos=function(){return this.s>0};ye.isZero=function(){return this.s===0};ye.lessThan=ye.lt=function(e){return this.cmp(e)<0};ye.lessThanOrEqualTo=ye.lte=function(e){return this.cmp(e)<1};ye.logarithm=ye.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(fn))throw Error(Hn+"NaN");if(r.s<1)throw Error(Hn+(r.s?"NaN":"-Infinity"));return r.eq(fn)?new n(0):(Tt=!1,t=ja(uh(r,a),uh(e,a),a),Tt=!0,lt(t,i))};ye.minus=ye.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?t6(t,e):ZF(t,(e.s=-e.s,e))};ye.modulo=ye.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Hn+"NaN");return r.s?(Tt=!1,t=ja(r,e,0,1).times(e),Tt=!0,r.minus(t)):lt(new n(r),i)};ye.naturalExponential=ye.exp=function(){return e6(this)};ye.naturalLogarithm=ye.ln=function(){return uh(this)};ye.negated=ye.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ye.plus=ye.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ZF(t,e):t6(t,(e.s=-e.s,e))};ye.precision=ye.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ks+e);if(t=Gt(i)+1,n=i.d.length-1,r=n*_t+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ye.squareRoot=ye.sqrt=function(){var e,t,r,n,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(Hn+"NaN")}for(e=Gt(s),Tt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Fi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Xu((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),n=new c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(a=n,n=a.plus(ja(s,a,o+2)).times(.5),Fi(a.d).slice(0,o)===(t=Fi(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(lt(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Tt=!0,lt(n,r)};ye.times=ye.mul=function(e){var t,r,n,i,a,o,s,c,u,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,c=h.length,u=p.length,c<u&&(a=h,h=p,p=a,o=c,c=u,u=o),a=[],o=c+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=c+n;i>n;)s=a[i]+p[n]*h[i-n-1]+t,a[i--]=s%or|0,t=s/or|0;a[i]=(a[i]+t)%or|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Tt?lt(e,d.precision):e};ye.toDecimalPlaces=ye.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ea(e,0,Yu),t===void 0?t=n.rounding:ea(t,0,8),lt(r,e+Gt(r)+1,t))};ye.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=rl(n,!0):(ea(e,0,Yu),t===void 0?t=i.rounding:ea(t,0,8),n=lt(new i(n),e+1,t),r=rl(n,!0,e+1)),r};ye.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?rl(i):(ea(e,0,Yu),t===void 0?t=a.rounding:ea(t,0,8),n=lt(new a(i),e+Gt(i)+1,t),r=rl(n.abs(),!1,e+Gt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ye.toInteger=ye.toint=function(){var e=this,t=e.constructor;return lt(new t(e),Gt(e)+1,t.rounding)};ye.toNumber=function(){return+this};ye.toPower=ye.pow=function(e){var t,r,n,i,a,o,s=this,c=s.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(fn);if(s=new c(s),!s.s){if(e.s<1)throw Error(Hn+"Infinity");return s}if(s.eq(fn))return s;if(n=c.precision,e.eq(fn))return lt(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=QF){for(i=new c(fn),t=Math.ceil(n/_t+4),Tt=!1;r%2&&(i=i.times(s),RR(i.d,t)),r=Xu(r/2),r!==0;)s=s.times(s),RR(s.d,t);return Tt=!0,e.s<0?new c(fn).div(i):lt(i,n)}}else if(a<0)throw Error(Hn+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Tt=!1,i=e.times(uh(s,n+u)),Tt=!0,i=e6(i),i.s=a,i};ye.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Gt(i),n=rl(i,r<=a.toExpNeg||r>=a.toExpPos)):(ea(e,1,Yu),t===void 0?t=a.rounding:ea(t,0,8),i=lt(new a(i),e,t),r=Gt(i),n=rl(i,e<=r||r<=a.toExpNeg,e)),n};ye.toSignificantDigits=ye.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ea(e,1,Yu),t===void 0?t=n.rounding:ea(t,0,8)),lt(new n(r),e,t)};ye.toString=ye.valueOf=ye.val=ye.toJSON=ye[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Gt(e),r=e.constructor;return rl(e,t<=r.toExpNeg||t>=r.toExpPos)};function ZF(e,t){var r,n,i,a,o,s,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Tt?lt(t,d):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,s=u.length):(n=u,i=o,s=c.length),o=Math.ceil(d/_t),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=c.length,a=u.length,s-a<0&&(a=s,n=u,u=c,c=n),r=0;a;)r=(c[--a]=c[a]+u[a]+r)/or|0,c[a]%=or;for(r&&(c.unshift(r),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,Tt?lt(t,d):t}function ea(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ks+e)}function Fi(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=_t-n.length,r&&(a+=ao(r)),a+=n;o=e[t],n=o+"",r=_t-n.length,r&&(a+=ao(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var ja=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%or|0,o=a/or|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,c;if(a!=o)c=a>o?1:-1;else for(s=c=0;s<a;s++)if(n[s]!=i[s]){c=n[s]>i[s]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*or+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,c,u,f,d,h,p,m,g,v,x,b,y,j,k,_,S,E,C=n.constructor,R=n.s==i.s?1:-1,M=n.d,L=i.d;if(!n.s)return new C(n);if(!i.s)throw Error(Hn+"Division by zero");for(c=n.e-i.e,S=L.length,k=M.length,p=new C(R),m=p.d=[],u=0;L[u]==(M[u]||0);)++u;if(L[u]>(M[u]||0)&&--c,a==null?b=a=C.precision:o?b=a+(Gt(n)-Gt(i))+1:b=a,b<0)return new C(0);if(b=b/_t+2|0,u=0,S==1)for(f=0,L=L[0],b++;(u<k||f)&&b--;u++)y=f*or+(M[u]||0),m[u]=y/L|0,f=y%L|0;else{for(f=or/(L[0]+1)|0,f>1&&(L=e(L,f),M=e(M,f),S=L.length,k=M.length),j=S,g=M.slice(0,S),v=g.length;v<S;)g[v++]=0;E=L.slice(),E.unshift(0),_=L[0],L[1]>=or/2&&++_;do f=0,s=t(L,g,S,v),s<0?(x=g[0],S!=v&&(x=x*or+(g[1]||0)),f=x/_|0,f>1?(f>=or&&(f=or-1),d=e(L,f),h=d.length,v=g.length,s=t(d,g,h,v),s==1&&(f--,r(d,S<h?E:L,h))):(f==0&&(s=f=1),d=L.slice()),h=d.length,h<v&&d.unshift(0),r(g,d,v),s==-1&&(v=g.length,s=t(L,g,S,v),s<1&&(f++,r(g,S<v?E:L,v))),v=g.length):s===0&&(f++,g=[0]),m[u++]=f,s&&g[0]?g[v++]=M[j]||0:(g=[M[j]],v=1);while((j++<k||g[0]!==void 0)&&b--)}return m[0]||m.shift(),p.e=c,lt(p,o?a+Gt(p)+1:a)}}();function e6(e,t){var r,n,i,a,o,s,c=0,u=0,f=e.constructor,d=f.precision;if(Gt(e)>16)throw Error(AN+Gt(e));if(!e.s)return new f(fn);for(t==null?(Tt=!1,s=d):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(gs(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(fn),f.precision=s;;){if(i=lt(i.times(e),s),r=r.times(++c),o=a.plus(ja(i,r,s)),Fi(o.d).slice(0,s)===Fi(a.d).slice(0,s)){for(;u--;)a=lt(a.times(a),s);return f.precision=d,t==null?(Tt=!0,lt(a,d)):a}a=o}}function Gt(e){for(var t=e.e*_t,r=e.d[0];r>=10;r/=10)t++;return t}function L0(e,t,r){if(t>e.LN10.sd())throw Tt=!0,r&&(e.precision=r),Error(Hn+"LN10 precision limit exceeded");return lt(new e(e.LN10),t)}function ao(e){for(var t="";e--;)t+="0";return t}function uh(e,t){var r,n,i,a,o,s,c,u,f,d=1,h=10,p=e,m=p.d,g=p.constructor,v=g.precision;if(p.s<1)throw Error(Hn+(p.s?"NaN":"-Infinity"));if(p.eq(fn))return new g(0);if(t==null?(Tt=!1,u=v):u=t,p.eq(10))return t==null&&(Tt=!0),L0(g,u);if(u+=h,g.precision=u,r=Fi(m),n=r.charAt(0),a=Gt(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Fi(p.d),n=r.charAt(0),d++;a=Gt(p),n>1?(p=new g("0."+r),a++):p=new g(n+"."+r.slice(1))}else return c=L0(g,u+2,v).times(a+""),p=uh(new g(n+"."+r.slice(1)),u-h).plus(c),g.precision=v,t==null?(Tt=!0,lt(p,v)):p;for(s=o=p=ja(p.minus(fn),p.plus(fn),u),f=lt(p.times(p),u),i=3;;){if(o=lt(o.times(f),u),c=s.plus(ja(o,new g(i),u)),Fi(c.d).slice(0,u)===Fi(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(L0(g,u+2,v).times(a+""))),s=ja(s,new g(d),u),g.precision=v,t==null?(Tt=!0,lt(s,v)):s;s=c,i+=2}}function OR(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Xu(r/_t),e.d=[],n=(r+1)%_t,r<0&&(n+=_t),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=_t;n<i;)e.d.push(+t.slice(n,n+=_t));t=t.slice(n),n=_t-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Tt&&(e.e>Ry||e.e<-Ry))throw Error(AN+r)}else e.s=0,e.e=0,e.d=[0];return e}function lt(e,t,r){var n,i,a,o,s,c,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=_t,i=t,u=d[f=0];else{if(f=Math.ceil((n+1)/_t),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;n%=_t,i=n-_t+o}if(r!==void 0&&(a=gs(10,o-i-1),s=u/a%10|0,c=t<0||d[f+1]!==void 0||u%a,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?i>0?u/gs(10,o-i):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return c?(a=Gt(e),d.length=1,t=t-a-1,d[0]=gs(10,(_t-t%_t)%_t),e.e=Xu(-t/_t)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,a=1,f--):(d.length=f+1,a=gs(10,_t-n),d[f]=i>0?(u/gs(10,o-i)%gs(10,i)|0)*a:0),c)for(;;)if(f==0){(d[0]+=a)==or&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=or)break;d[f--]=0,a=1}for(n=d.length;d[--n]===0;)d.pop();if(Tt&&(e.e>Ry||e.e<-Ry))throw Error(AN+Gt(e));return e}function t6(e,t){var r,n,i,a,o,s,c,u,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Tt?lt(t,p):t;if(c=e.d,d=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(f=o<0,f?(r=c,o=-o,s=d.length):(r=d,n=u,s=c.length),i=Math.max(Math.ceil(p/_t),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,s=d.length,f=i<s,f&&(s=i),i=0;i<s;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}o=0}for(f&&(r=c,c=d,d=r,t.s=-t.s),s=c.length,i=d.length-s;i>0;--i)c[s++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=or-1;--c[a],c[i]+=or}c[i]-=d[i]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,Tt?lt(t,p):t):new h(0)}function rl(e,t,r){var n,i=Gt(e),a=Fi(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+ao(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ao(-i-1)+a,r&&(n=r-o)>0&&(a+=ao(n))):i>=o?(a+=ao(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+ao(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=ao(n))),e.s<0?"-"+a:a}function RR(e,t){if(e.length>t)return e.length=t,!0}function r6(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ks+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return OR(o,a.toString())}else if(typeof a!="string")throw Error(Ks+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,C_e.test(a))OR(o,a);else throw Error(Ks+a)}if(i.prototype=ye,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=r6,i.config=i.set=T_e,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function T_e(e){if(!e||typeof e!="object")throw Error(Hn+"Object expected");var t,r,n,i=["precision",1,Yu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Xu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ks+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ks+r+": "+n);return this}var PN=r6(N_e);fn=new PN(1);const it=PN;function A_e(e){return $_e(e)||R_e(e)||O_e(e)||P_e()}function P_e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O_e(e,t){if(e){if(typeof e=="string")return Qk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qk(e,t)}}function R_e(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function $_e(e){if(Array.isArray(e))return Qk(e)}function Qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var M_e=function(t){return t},n6={"@@functional/placeholder":!0},i6=function(t){return t===n6},$R=function(t){return function r(){return arguments.length===0||arguments.length===1&&i6(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},D_e=function e(t,r){return t===1?r:$R(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==n6}).length;return o>=t?r.apply(void 0,i):e(t-o,$R(function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=i.map(function(d){return i6(d)?c.shift():d});return r.apply(void 0,A_e(f).concat(c))}))})},Lx=function(t){return D_e(t.length,t)},Zk=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},I_e=Lx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),L_e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return M_e;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,c){return c(s)},a.apply(void 0,arguments))}},e_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},a6=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,c){return s===r[c]})||(r=a,n=t.apply(void 0,a)),n}};function z_e(e){var t;return e===0?t=1:t=Math.floor(new it(e).abs().log(10).toNumber())+1,t}function B_e(e,t,r){for(var n=new it(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var U_e=Lx(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),F_e=Lx(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),K_e=Lx(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const zx={rangeStep:B_e,getDigitCount:z_e,interpolateNumber:U_e,uninterpolateNumber:F_e,uninterpolateTruncation:K_e};function t_(e){return W_e(e)||V_e(e)||o6(e)||H_e()}function H_e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V_e(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function W_e(e){if(Array.isArray(e))return r_(e)}function dh(e,t){return Y_e(e)||G_e(e,t)||o6(e,t)||q_e()}function q_e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o6(e,t){if(e){if(typeof e=="string")return r_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r_(e,t)}}function r_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function G_e(e,t){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function Y_e(e){if(Array.isArray(e))return e}function s6(e){var t=dh(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function l6(e,t,r){if(e.lte(0))return new it(0);var n=zx.getDigitCount(e.toNumber()),i=new it(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new it(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=s.mul(i);return t?c:new it(Math.ceil(c))}function X_e(e,t,r){var n=1,i=new it(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new it(10).pow(zx.getDigitCount(e)-1),i=new it(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new it(Math.floor(e)))}else e===0?i=new it(Math.floor((t-1)/2)):r||(i=new it(Math.floor(e)));var o=Math.floor((t-1)/2),s=L_e(I_e(function(c){return i.add(new it(c-o).mul(n)).toNumber()}),Zk);return s(0,t)}function c6(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new it(0),tickMin:new it(0),tickMax:new it(0)};var a=l6(new it(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new it(0):(o=new it(e).add(t).div(2),o=o.sub(new it(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new it(t).sub(o).div(a).toNumber()),u=s+c+1;return u>r?c6(e,t,r,n,i+1):(u<r&&(c=t>0?c+(r-u):c,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new it(s).mul(a)),tickMax:o.add(new it(c).mul(a))})}function J_e(e){var t=dh(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=s6([r,n]),c=dh(s,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(t_(Zk(0,i-1).map(function(){return 1/0}))):[].concat(t_(Zk(0,i-1).map(function(){return-1/0})),[f]);return r>n?e_(d):d}if(u===f)return X_e(u,i,a);var h=c6(u,f,o,a),p=h.step,m=h.tickMin,g=h.tickMax,v=zx.rangeStep(m,g.add(new it(.1).mul(p)),p);return r>n?e_(v):v}function Q_e(e,t){var r=dh(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=s6([n,i]),s=dh(o,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[n,i];if(c===u)return[c];var f=Math.max(t,2),d=l6(new it(u).sub(c).div(f-1),a,0),h=[].concat(t_(zx.rangeStep(new it(c),new it(u).sub(new it(.99).mul(d)),d)),[u]);return n>i?e_(h):h}var Z_e=a6(J_e),eje=a6(Q_e),tje="Invariant failed";function nl(e,t){throw new Error(tje)}var rje=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}function $y(){return $y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$y.apply(this,arguments)}function nje(e,t){return sje(e)||oje(e,t)||aje(e,t)||ije()}function ije(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function aje(e,t){if(e){if(typeof e=="string")return MR(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MR(e,t)}}function MR(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oje(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function sje(e){if(Array.isArray(e))return e}function lje(e,t){if(e==null)return{};var r=cje(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cje(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dje(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f6(n.key),n)}}function fje(e,t,r){return t&&dje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hje(e,t,r){return t=My(t),pje(e,u6()?Reflect.construct(t,r||[],My(e).constructor):t.apply(e,r))}function pje(e,t){if(t&&(cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mje(e)}function mje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u6=function(){return!!e})()}function My(e){return My=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},My(e)}function gje(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&&n_(e,t)}function n_(e,t){return n_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},n_(e,t)}function d6(e,t,r){return t=f6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f6(e){var t=yje(e,"string");return cu(t)=="symbol"?t:t+""}function yje(e,t){if(cu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gp=function(e){function t(){return uje(this,t),hje(this,t,arguments)}return gje(t,e),fje(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,h=lje(n,rje),p=qe(h,!1);this.props.direction==="x"&&f.type!=="number"&&nl();var m=c.map(function(g){var v=u(g,s),x=v.x,b=v.y,y=v.value,j=v.errorVal;if(!j)return null;var k=[],_,S;if(Array.isArray(j)){var E=nje(j,2);_=E[0],S=E[1]}else _=S=j;if(a==="vertical"){var C=f.scale,R=b+i,M=R+o,L=R-o,H=C(y-_),U=C(y+S);k.push({x1:U,y1:M,x2:U,y2:L}),k.push({x1:H,y1:R,x2:U,y2:R}),k.push({x1:H,y1:M,x2:H,y2:L})}else if(a==="horizontal"){var F=d.scale,O=x+i,P=O-o,A=O+o,D=F(y-_),B=F(y+S);k.push({x1:P,y1:B,x2:A,y2:B}),k.push({x1:O,y1:D,x2:O,y2:B}),k.push({x1:P,y1:D,x2:A,y2:D})}return $.createElement(Ut,$y({className:"recharts-errorBar",key:"bar-".concat(k.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},p),k.map(function(z){return $.createElement("line",$y({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return $.createElement(Ut,{className:"recharts-errorBars"},m)}}])}($.Component);d6(gp,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});d6(gp,"displayName","ErrorBar");function fh(e){"@babel/helpers - typeof";return fh=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},fh(e)}function DR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DR(Object(r),!0).forEach(function(n){vje(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vje(e,t,r){return t=xje(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xje(e){var t=bje(e,"string");return fh(t)=="symbol"?t:t+""}function bje(e,t){if(fh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var h6=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=cn(r,_c);if(!o)return null;var s=_c.defaultProps,c=s!==void 0?cs(cs({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(f,d){var h=d.item,p=d.props,m=p.sectors||p.data||[];return f.concat(m.map(function(g){return{type:o.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(n||[]).map(function(f){var d=f.item,h=d.type.defaultProps,p=h!==void 0?cs(cs({},h),d.props):{},m=p.dataKey,g=p.name,v=p.legendType,x=p.hide;return{inactive:x,dataKey:m,type:c.iconType||v||"square",color:ON(d),value:g||m,payload:p}}),cs(cs(cs({},c),_c.getWithHeight(o,i)),{},{payload:u,item:o})};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 IR(e){return jje(e)||_je(e)||kje(e)||wje()}function wje(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function kje(e,t){if(e){if(typeof e=="string")return i_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i_(e,t)}}function _je(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jje(e){if(Array.isArray(e))return i_(e)}function i_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function LR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LR(Object(r),!0).forEach(function(n){Sc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sc(e,t,r){return t=Sje(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sje(e){var t=Eje(e,"string");return hh(t)=="symbol"?t:t+""}function Eje(e,t){if(hh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vn(e,t,r){return Ue(e)||Ue(t)?r:nr(t)?zn(e,t,r):Le(t)?t(e):r}function uf(e,t,r,n){var i=__e(e,function(s){return vn(s,t)});if(r==="number"){var a=i.filter(function(s){return se(s)||parseFloat(s)});return a.length?[Dx(a),Mx(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!Ue(s)}):i;return o.map(function(s){return nr(s)||s instanceof Date?s:""})}var Nje=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<s;u++){var f=u>0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(di(d-f)!==di(h-d)){var m=[];if(di(h-d)===di(c[1]-c[0])){p=h;var g=d+c[1]-c[0];m[0]=Math.min(g,(g+f)/2),m[1]=Math.max(g,(g+f)/2)}else{p=f;var v=h+c[1]-c[0];m[0]=Math.min(d,(v+d)/2),m[1]=Math.max(d,(v+d)/2)}var x=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>x[0]&&t<=x[1]||t>=m[0]&&t<=m[1]){o=i[u].index;break}}else{var b=Math.min(f,h),y=Math.max(f,h);if(t>(b+d)/2&&t<=(y+d)/2){o=i[u].index;break}}}else for(var j=0;j<s;j++)if(j===0&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j>0&&j<s-1&&t>(n[j].coordinate+n[j-1].coordinate)/2&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j===s-1&&t>(n[j].coordinate+n[j-1].coordinate)/2){o=n[j].index;break}return o},ON=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},Cje=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),c=0,u=s.length;c<u;c++)for(var f=a[s[c]].stackGroups,d=Object.keys(f),h=0,p=d.length;h<p;h++){var m=f[d[h]],g=m.items,v=m.cateAxisId,x=g.filter(function(S){return wa(S.type).indexOf("Bar")>=0});if(x&&x.length){var b=x[0].type.defaultProps,y=b!==void 0?Lt(Lt({},b),x[0].props):x[0].props,j=y.barSize,k=y[v];o[k]||(o[k]=[]);var _=Ue(j)?r:j;o[k].push({item:x[0],stackList:x.slice(1),barSize:Ue(_)?void 0:tl(_,n,0)})}}return o},Tje=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,c=o.length;if(c<1)return null;var u=tl(r,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/c,m=o.reduce(function(j,k){return j+k.barSize||0},0);m+=(c-1)*u,m>=i&&(m-=(c-1)*u,u=0),m>=i&&p>0&&(h=!0,p*=.9,m=c*p);var g=(i-m)/2>>0,v={offset:g-u,size:0};f=o.reduce(function(j,k){var _={item:k.item,position:{offset:v.offset+v.size+u,size:h?p:k.barSize}},S=[].concat(IR(j),[_]);return v=S[S.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function(E){S.push({item:E,position:v})}),S},d)}else{var x=tl(n,i,0,!0);i-2*x-(c-1)*u<=0&&(u=0);var b=(i-2*x-(c-1)*u)/c;b>1&&(b>>=0);var y=s===+s?Math.min(b,s):b;f=o.reduce(function(j,k,_){var S=[].concat(IR(j),[{item:k.item,position:{offset:x+(b+u)*_+(b-y)/2,size:y}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function(E){S.push({item:E,position:S[S.length-1].position})}),S},d)}return f},Aje=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,c=o-(s.left||0)-(s.right||0),u=h6({children:a,legendWidth:c});if(u){var f=i||{},d=f.width,h=f.height,p=u.align,m=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&se(t[p]))return Lt(Lt({},t),{},Sc({},p,t[p]+(d||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&se(t[m]))return Lt(Lt({},t),{},Sc({},m,t[m]+(h||0)))}return t},Pje=function(t,r,n){return Ue(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},p6=function(t,r,n,i,a){var o=r.props.children,s=Bn(o,gp).filter(function(u){return Pje(i,a,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=vn(f,n);if(Ue(d))return u;var h=Array.isArray(d)?[Dx(d),Mx(d)]:[d,d],p=c.reduce(function(m,g){var v=vn(f,g,0),x=h[0]-Math.abs(Array.isArray(v)?v[0]:v),b=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,m[0]),Math.max(b,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},Oje=function(t,r,n,i,a){var o=r.map(function(s){return p6(t,s,n,a,i)}).filter(function(s){return!Ue(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},m6=function(t,r,n,i,a){var o=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&p6(t,c,u,i)||uf(t,u,n,a)});if(n==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,c.push(u[f]));return c},[])},g6=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},y6=function(t,r,n,i){if(i)return t.map(function(c){return c.coordinate});var a,o,s=t.map(function(c){return c.coordinate===r&&(a=!0),c.coordinate===n&&(o=!0),c.coordinate});return a||s.push(r),o||s.push(n),s},xa=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?di(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!cp(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},z0=new WeakMap,km=function(t,r){if(typeof r!="function")return t;z0.has(t)||z0.set(t,new WeakMap);var n=z0.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},Rje=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:ah(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Ty(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:cf(),realScaleType:"point"}:a==="category"?{scale:ah(),realScaleType:"band"}:{scale:Ty(),realScaleType:"linear"};if(el(i)){var c="scale".concat(kx(i));return{scale:(PR[c]||cf)(),realScaleType:PR[c]?c:"point"}}return Le(i)?{scale:i}:{scale:cf(),realScaleType:"point"}},zR=1e-4,$je=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-zR,o=Math.max(i[0],i[1])+zR,s=t(r[0]),c=t(r[n-1]);(s<a||s>o||c<a||c>o)&&t.domain([r[0],r[n-1]])}},Mje=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},Dje=function(t,r){if(!r||r.length!==2||!se(r[0])||!se(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!se(t[0])||t[0]<n)&&(a[0]=n),(!se(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},Ije=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var c=cp(t[s][n][1])?t[s][n][0]:t[s][n][1];c>=0?(t[s][n][0]=a,t[s][n][1]=a+c,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+c,o=t[s][n][1])}},Lje=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=cp(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},zje={sign:Ije,expand:Zfe,none:tu,silhouette:ehe,wiggle:the,positive:Lje},Bje=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=zje[n],o=Qfe().keys(i).value(function(s,c){return+vn(s,c,0)}).order(Tk).offset(a);return o(t)},Uje=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,c={},u=s.reduce(function(d,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Lt(Lt({},h.type.defaultProps),h.props):h.props,g=m.stackId,v=m.hide;if(v)return d;var x=m[n],b=d[x]||{hasStack:!1,stackGroups:{}};if(nr(g)){var y=b.stackGroups[g]||{numericAxisId:n,cateAxisId:i,items:[]};y.items.push(h),b.hasStack=!0,b.stackGroups[g]=y}else b.stackGroups[up("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return Lt(Lt({},d),{},Sc({},x,b))},c),f={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,v){var x=p.stackGroups[v];return Lt(Lt({},g),{},Sc({},v,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:Bje(t,x.items,a)}))},m)}return Lt(Lt({},d),{},Sc({},h,p))},f)},Fje=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=Z_e(u,a,s);return t.domain([Dx(f),Mx(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=eje(d,a,s);return{niceTicks:h}}return null};function BR(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ue(i[t.dataKey])){var s=oy(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=vn(i,Ue(o)?t.dataKey:o);return Ue(c)?null:t.scale(c)}var UR=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var c=vn(o,r.dataKey,r.domain[s]);return Ue(c)?null:r.scale(c)-a/2+i},Kje=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},Hje=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(nr(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Vje=function(t){return t.reduce(function(r,n){return[Dx(n.concat([r[0]]).filter(se)),Mx(n.concat([r[1]]).filter(se))]},[1/0,-1/0])},v6=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,c=s.reduce(function(u,f){var d=Vje(f.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[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})},FR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,KR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,a_=function(t,r,n){if(Le(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(se(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(FR.test(t[0])){var a=+FR.exec(t[0])[1];i[0]=r[0]-a}else Le(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(se(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(KR.test(t[1])){var o=+KR.exec(t[1])[1];i[1]=r[1]+o}else Le(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},Dy=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=oN(r,function(d){return d.coordinate}),o=1/0,s=1,c=a.length;s<c;s++){var u=a[s],f=a[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},HR=function(t,r,n){return!t||!t.length||Ix(t,zn(n,"type.defaultProps.domain"))?r:t},x6=function(t,r){var n=t.type.defaultProps?Lt(Lt({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return Lt(Lt({},qe(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:ON(t),value:vn(r,i),type:c,payload:r,chartType:u,hide:f})};function ph(e){"@babel/helpers - typeof";return ph=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},ph(e)}function VR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function WR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VR(Object(r),!0).forEach(function(n){Wje(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wje(e,t,r){return t=qje(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qje(e){var t=Gje(e,"string");return ph(t)=="symbol"?t:t+""}function Gje(e,t){if(ph(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ph(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iy=Math.PI/180,Yje=function(t){return t*180/Math.PI},br=function(t,r,n,i){return{x:t+Math.cos(-Iy*i)*n,y:r+Math.sin(-Iy*i)*n}},Xje=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},Jje=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=Xje({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var c=(n-a)/s,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:s,angle:Yje(u),angleInRadian:u}},Qje=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},Zje=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},qR=function(t,r){var n=t.x,i=t.y,a=Jje({x:n,y:i},r),o=a.radius,s=a.angle,c=r.innerRadius,u=r.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var f=Qje(r),d=f.startAngle,h=f.endAngle,p=s,m;if(d<=h){for(;p>h;)p-=360;for(;p<d;)p+=360;m=p>=d&&p<=h}else{for(;p>d;)p-=360;for(;p<h;)p+=360;m=p>=h&&p<=d}return m?WR(WR({},r),{},{radius:o,angle:Zje(p,r)}):null};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)}var eSe=["offset"];function tSe(e){return aSe(e)||iSe(e)||nSe(e)||rSe()}function rSe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nSe(e,t){if(e){if(typeof e=="string")return o_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o_(e,t)}}function iSe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aSe(e){if(Array.isArray(e))return o_(e)}function o_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oSe(e,t){if(e==null)return{};var r=sSe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sSe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GR(Object(r),!0).forEach(function(n){lSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lSe(e,t,r){return t=cSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cSe(e){var t=uSe(e,"string");return mh(t)=="symbol"?t:t+""}function uSe(e,t){if(mh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mh(n)!="object")return n;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 r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gh.apply(this,arguments)}var dSe=function(t){var r=t.value,n=t.formatter,i=Ue(t.children)?r:t.children;return Le(n)?n(i):i},fSe=function(t,r){var n=di(r-t),i=Math.min(Math.abs(r-t),360);return n*i},hSe=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,c=a,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,p=c.startAngle,m=c.endAngle,g=c.clockWise,v=(d+h)/2,x=fSe(p,m),b=x>=0?1:-1,y,j;i==="insideStart"?(y=p+b*o,j=g):i==="insideEnd"?(y=m-b*o,j=!g):i==="end"&&(y=m+b*o,j=g),j=x<=0?j:!j;var k=br(u,f,v,y),_=br(u,f,v,y+(j?1:-1)*359),S="M".concat(k.x,",").concat(k.y,"\n A").concat(v,",").concat(v,",0,1,").concat(j?0:1,",\n ").concat(_.x,",").concat(_.y),E=Ue(t.id)?up("recharts-radial-line-"):t.id;return $.createElement("text",gh({},n,{dominantBaseline:"central",className:Ge("recharts-radial-bar-label",s)}),$.createElement("defs",null,$.createElement("path",{id:E,d:S})),$.createElement("textPath",{xlinkHref:"#".concat(E)},r))},pSe=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,c=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,h=(f+d)/2;if(i==="outside"){var p=br(o,s,u+n,h),m=p.x,g=p.y;return{x:m,y:g,textAnchor:m>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,x=br(o,s,v,h),b=x.x,y=x.y;return{x:b,y,textAnchor:"middle",verticalAnchor:"middle"}},mSe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,c=o.y,u=o.width,f=o.height,d=f>=0?1:-1,h=d*i,p=d>0?"end":"start",m=d>0?"start":"end",g=u>=0?1:-1,v=g*i,x=g>0?"end":"start",b=g>0?"start":"end";if(a==="top"){var y={x:s+u/2,y:c-d*i,textAnchor:"middle",verticalAnchor:p};return Qt(Qt({},y),n?{height:Math.max(c-n.y,0),width:u}:{})}if(a==="bottom"){var j={x:s+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:m};return Qt(Qt({},j),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(a==="left"){var k={x:s-v,y:c+f/2,textAnchor:x,verticalAnchor:"middle"};return Qt(Qt({},k),n?{width:Math.max(k.x-n.x,0),height:f}:{})}if(a==="right"){var _={x:s+u+v,y:c+f/2,textAnchor:b,verticalAnchor:"middle"};return Qt(Qt({},_),n?{width:Math.max(n.x+n.width-_.x,0),height:f}:{})}var S=n?{width:u,height:f}:{};return a==="insideLeft"?Qt({x:s+v,y:c+f/2,textAnchor:b,verticalAnchor:"middle"},S):a==="insideRight"?Qt({x:s+u-v,y:c+f/2,textAnchor:x,verticalAnchor:"middle"},S):a==="insideTop"?Qt({x:s+u/2,y:c+h,textAnchor:"middle",verticalAnchor:m},S):a==="insideBottom"?Qt({x:s+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:p},S):a==="insideTopLeft"?Qt({x:s+v,y:c+h,textAnchor:b,verticalAnchor:m},S):a==="insideTopRight"?Qt({x:s+u-v,y:c+h,textAnchor:x,verticalAnchor:m},S):a==="insideBottomLeft"?Qt({x:s+v,y:c+f-h,textAnchor:b,verticalAnchor:p},S):a==="insideBottomRight"?Qt({x:s+u-v,y:c+f-h,textAnchor:x,verticalAnchor:p},S):Uu(a)&&(se(a.x)||js(a.x))&&(se(a.y)||js(a.y))?Qt({x:s+tl(a.x,u),y:c+tl(a.y,f),textAnchor:"end",verticalAnchor:"end"},S):Qt({x:s+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},S)},gSe=function(t){return"cx"in t&&se(t.cx)};function Cr(e){var t=e.offset,r=t===void 0?5:t,n=oSe(e,eSe),i=Qt({offset:r},n),a=i.viewBox,o=i.position,s=i.value,c=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||Ue(s)&&Ue(c)&&!w.isValidElement(u)&&!Le(u))return null;if(w.isValidElement(u))return w.cloneElement(u,i);var p;if(Le(u)){if(p=w.createElement(u,i),w.isValidElement(p))return p}else p=dSe(i);var m=gSe(a),g=qe(i,!0);if(m&&(o==="insideStart"||o==="insideEnd"||o==="end"))return hSe(i,p,g);var v=m?pSe(i):mSe(i);return $.createElement(ky,gh({className:Ge("recharts-label",d)},g,v,{breakAll:h}),p)}Cr.displayName="Label";var b6=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,p=t.top,m=t.left,g=t.width,v=t.height,x=t.clockWise,b=t.labelViewBox;if(b)return b;if(se(g)&&se(v)){if(se(d)&&se(h))return{x:d,y:h,width:g,height:v};if(se(p)&&se(m))return{x:p,y:m,width:g,height:v}}return se(d)&&se(h)?{x:d,y:h,width:0,height:0}:se(r)&&se(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||c||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},ySe=function(t,r){return t?t===!0?$.createElement(Cr,{key:"label-implicit",viewBox:r}):nr(t)?$.createElement(Cr,{key:"label-implicit",viewBox:r,value:t}):w.isValidElement(t)?t.type===Cr?w.cloneElement(t,{key:"label-implicit",viewBox:r}):$.createElement(Cr,{key:"label-implicit",content:t,viewBox:r}):Le(t)?$.createElement(Cr,{key:"label-implicit",content:t,viewBox:r}):Uu(t)?$.createElement(Cr,gh({viewBox:r},t,{key:"label-implicit"})):null:null},vSe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=b6(t),o=Bn(i,Cr).map(function(c,u){return w.cloneElement(c,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=ySe(t.label,r||a);return[s].concat(tSe(o))};Cr.parseViewBox=b6;Cr.renderCallByParent=vSe;function xSe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var bSe=xSe;const wSe=Qe(bSe);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 kSe=["valueAccessor"],_Se=["data","dataKey","clockWise","id","textBreakAll"];function jSe(e){return CSe(e)||NSe(e)||ESe(e)||SSe()}function SSe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ESe(e,t){if(e){if(typeof e=="string")return s_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s_(e,t)}}function NSe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CSe(e){if(Array.isArray(e))return s_(e)}function s_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ly.apply(this,arguments)}function YR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YR(Object(r),!0).forEach(function(n){TSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TSe(e,t,r){return t=ASe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ASe(e){var t=PSe(e,"string");return yh(t)=="symbol"?t:t+""}function PSe(e,t){if(yh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JR(e,t){if(e==null)return{};var r=OSe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OSe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var RSe=function(t){return Array.isArray(t.value)?wSe(t.value):t.value};function Bo(e){var t=e.valueAccessor,r=t===void 0?RSe:t,n=JR(e,kSe),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,c=n.textBreakAll,u=JR(n,_Se);return!i||!i.length?null:$.createElement(Ut,{className:"recharts-label-list"},i.map(function(f,d){var h=Ue(a)?r(f,d):vn(f&&f.payload,a),p=Ue(s)?{}:{id:"".concat(s,"-").concat(d)};return $.createElement(Cr,Ly({},qe(f,!0),u,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:Cr.parseViewBox(Ue(o)?f:XR(XR({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Bo.displayName="LabelList";function $Se(e,t){return e?e===!0?$.createElement(Bo,{key:"labelList-implicit",data:t}):$.isValidElement(e)||Le(e)?$.createElement(Bo,{key:"labelList-implicit",data:t,content:e}):Uu(e)?$.createElement(Bo,Ly({data:t},e,{key:"labelList-implicit"})):null:null}function MSe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Bn(n,Bo).map(function(o,s){return w.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=$Se(e.label,t);return[a].concat(jSe(i))}Bo.renderCallByParent=MSe;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 l_(){return l_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l_.apply(this,arguments)}function QR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QR(Object(r),!0).forEach(function(n){DSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DSe(e,t,r){return t=ISe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ISe(e){var t=LSe(e,"string");return vh(t)=="symbol"?t:t+""}function LSe(e,t){if(vh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zSe=function(t,r){var n=di(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},_m=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(s?1:-1)+i,d=Math.asin(c/f)/Iy,h=u?a:a+o*d,p=br(r,n,f,h),m=br(r,n,i,h),g=u?a-o*d:a,v=br(r,n,f*Math.cos(d*Iy),g);return{center:p,circleTangency:m,lineTangency:v,theta:d}},w6=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,c=zSe(o,s),u=o+c,f=br(r,n,a,o),d=br(r,n,a,u),h="M ".concat(f.x,",").concat(f.y,"\n A ").concat(a,",").concat(a,",0,\n ").concat(+(Math.abs(c)>180),",").concat(+(o>u),",\n ").concat(d.x,",").concat(d.y,"\n ");if(i>0){var p=br(r,n,i,o),m=br(r,n,i,u);h+="L ".concat(m.x,",").concat(m.y,"\n A ").concat(i,",").concat(i,",0,\n ").concat(+(Math.abs(c)>180),",").concat(+(o<=u),",\n ").concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},BSe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=di(f-u),h=_m({cx:r,cy:n,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:c}),p=h.circleTangency,m=h.lineTangency,g=h.theta,v=_m({cx:r,cy:n,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:c}),x=v.circleTangency,b=v.lineTangency,y=v.theta,j=c?Math.abs(u-f):Math.abs(u-f)-g-y;if(j<0)return s?"M ".concat(m.x,",").concat(m.y,"\n a").concat(o,",").concat(o,",0,0,1,").concat(o*2,",0\n a").concat(o,",").concat(o,",0,0,1,").concat(-o*2,",0\n "):w6({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var k="M ".concat(m.x,",").concat(m.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,"\n A").concat(a,",").concat(a,",0,").concat(+(j>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,"\n ");if(i>0){var _=_m({cx:r,cy:n,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),S=_.circleTangency,E=_.lineTangency,C=_.theta,R=_m({cx:r,cy:n,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),M=R.circleTangency,L=R.lineTangency,H=R.theta,U=c?Math.abs(u-f):Math.abs(u-f)-C-H;if(U<0&&o===0)return"".concat(k,"L").concat(r,",").concat(n,"Z");k+="L".concat(L.x,",").concat(L.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(M.x,",").concat(M.y,"\n A").concat(i,",").concat(i,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(S.x,",").concat(S.y,"\n A").concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(E.x,",").concat(E.y,"Z")}else k+="L".concat(r,",").concat(n,"Z");return k},USe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},k6=function(t){var r=ZR(ZR({},USe),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,h=r.className;if(o<a||f===d)return null;var p=Ge("recharts-sector",h),m=o-a,g=tl(s,m,0,!0),v;return g>0&&Math.abs(f-d)<360?v=BSe({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(g,m/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):v=w6({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),$.createElement("path",l_({},qe(r,!0),{className:p,d:v,role:"img"}))};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 c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c_.apply(this,arguments)}function e$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function t$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e$(Object(r),!0).forEach(function(n){FSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FSe(e,t,r){return t=KSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KSe(e){var t=HSe(e,"string");return xh(t)=="symbol"?t:t+""}function HSe(e,t){if(xh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r$={curveBasisClosed:Ufe,curveBasisOpen:Ffe,curveBasis:Bfe,curveBumpX:Efe,curveBumpY:Nfe,curveLinearClosed:Kfe,curveLinear:jx,curveMonotoneX:Hfe,curveMonotoneY:Vfe,curveNatural:Wfe,curveStep:qfe,curveStepAfter:Yfe,curveStepBefore:Gfe},jm=function(t){return t.x===+t.x&&t.y===+t.y},Sd=function(t){return t.x},Ed=function(t){return t.y},VSe=function(t,r){if(Le(t))return t;var n="curve".concat(kx(t));return(n==="curveMonotone"||n==="curveBump")&&r?r$["".concat(n).concat(r==="vertical"?"Y":"X")]:r$[n]||jx},WSe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=VSe(n,s),d=u?a.filter(function(g){return jm(g)}):a,h;if(Array.isArray(o)){var p=u?o.filter(function(g){return jm(g)}):o,m=d.map(function(g,v){return t$(t$({},g),{},{base:p[v]})});return s==="vertical"?h=pm().y(Ed).x1(Sd).x0(function(g){return g.base.x}):h=pm().x(Sd).y1(Ed).y0(function(g){return g.base.y}),h.defined(jm).curve(f),h(m)}return s==="vertical"&&se(o)?h=pm().y(Ed).x1(Sd).x0(o):se(o)?h=pm().x(Sd).y1(Ed).y0(o):h=kU().x(Sd).y(Ed),h.defined(jm).curve(f),h(d)},u_=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?WSe(t):i;return w.createElement("path",c_({},qe(t,!1),sy(t),{className:Ge("recharts-curve",r),d:o,ref:a}))},_6={exports:{}},qSe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",GSe=qSe,YSe=GSe;function j6(){}function S6(){}S6.resetWarningCache=j6;var XSe=function(){function e(n,i,a,o,s,c){if(c!==YSe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:S6,resetWarningCache:j6};return r.PropTypes=r,r};_6.exports=XSe();var JSe=_6.exports;const Ze=Qe(JSe);var QSe=Object.getOwnPropertyNames,ZSe=Object.getOwnPropertySymbols,eEe=Object.prototype.hasOwnProperty;function n$(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function Sm(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var a=i.cache,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);var c=e(r,n,i);return a.delete(r),a.delete(n),c}}function i$(e){return QSe(e).concat(ZSe(e))}var tEe=Object.hasOwn||function(e,t){return eEe.call(e,t)};function ml(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var rEe="__v",nEe="__o",iEe="_owner",a$=Object.getOwnPropertyDescriptor,o$=Object.keys;function aEe(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function oEe(e,t){return ml(e.getTime(),t.getTime())}function sEe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lEe(e,t){return e===t}function s$(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,s,c=0;(o=a.next())&&!o.done;){for(var u=t.entries(),f=!1,d=0;(s=u.next())&&!s.done;){if(i[d]){d++;continue}var h=o.value,p=s.value;if(r.equals(h[0],p[0],c,d,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){f=i[d]=!0;break}d++}if(!f)return!1;c++}return!0}var cEe=ml;function uEe(e,t,r){var n=o$(e),i=n.length;if(o$(t).length!==i)return!1;for(;i-- >0;)if(!E6(e,t,r,n[i]))return!1;return!0}function Nd(e,t,r){var n=i$(e),i=n.length;if(i$(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],!E6(e,t,r,a)||(o=a$(e,a),s=a$(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function dEe(e,t){return ml(e.valueOf(),t.valueOf())}function fEe(e,t){return e.source===t.source&&e.flags===t.flags}function l$(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var c=t.values(),u=!1,f=0;(s=c.next())&&!s.done;){if(!i[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function hEe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function pEe(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 E6(e,t,r,n){return(n===iEe||n===nEe||n===rEe)&&(e.$$typeof||t.$$typeof)?!0:tEe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var mEe="[object Arguments]",gEe="[object Boolean]",yEe="[object Date]",vEe="[object Error]",xEe="[object Map]",bEe="[object Number]",wEe="[object Object]",kEe="[object RegExp]",_Ee="[object Set]",jEe="[object String]",SEe="[object URL]",EEe=Array.isArray,c$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,u$=Object.assign,NEe=Object.prototype.toString.call.bind(Object.prototype.toString);function CEe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,d=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(m,g,v){if(m===g)return!0;if(m==null||g==null)return!1;var x=typeof m;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?o(m,g,v):x==="function"?i(m,g,v):!1;var b=m.constructor;if(b!==g.constructor)return!1;if(b===Object)return s(m,g,v);if(EEe(m))return t(m,g,v);if(c$!=null&&c$(m))return d(m,g,v);if(b===Date)return r(m,g,v);if(b===RegExp)return u(m,g,v);if(b===Map)return a(m,g,v);if(b===Set)return f(m,g,v);var y=NEe(m);return y===yEe?r(m,g,v):y===kEe?u(m,g,v):y===xEe?a(m,g,v):y===_Ee?f(m,g,v):y===wEe?typeof m.then!="function"&&typeof g.then!="function"&&s(m,g,v):y===SEe?h(m,g,v):y===vEe?n(m,g,v):y===mEe?s(m,g,v):y===gEe||y===bEe||y===jEe?c(m,g,v):!1}}function TEe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Nd:aEe,areDatesEqual:oEe,areErrorsEqual:sEe,areFunctionsEqual:lEe,areMapsEqual:n?n$(s$,Nd):s$,areNumbersEqual:cEe,areObjectsEqual:n?Nd:uEe,arePrimitiveWrappersEqual:dEe,areRegExpsEqual:fEe,areSetsEqual:n?n$(l$,Nd):l$,areTypedArraysEqual:n?Nd:hEe,areUrlsEqual:pEe};if(r&&(i=u$({},i,r(i))),t){var a=Sm(i.areArraysEqual),o=Sm(i.areMapsEqual),s=Sm(i.areObjectsEqual),c=Sm(i.areSetsEqual);i=u$({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:c})}return i}function AEe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function PEe(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(c,u){var f=n(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,p=f.meta;return r(c,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return r(c,u,o)}}var OEe=ns();ns({strict:!0});ns({circular:!0});ns({circular:!0,strict:!0});ns({createInternalComparator:function(){return ml}});ns({strict:!0,createInternalComparator:function(){return ml}});ns({circular:!0,createInternalComparator:function(){return ml}});ns({circular:!0,createInternalComparator:function(){return ml},strict:!0});function ns(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=TEe(e),c=CEe(s),u=n?n(c):AEe(c);return PEe({circular:r,comparator:c,createState:i,equals:u,strict:o})}function REe(e){typeof requestAnimationFrame!="undefined"&&requestAnimationFrame(e)}function d$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):REe(i)};requestAnimationFrame(n)}function d_(e){"@babel/helpers - typeof";return d_=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},d_(e)}function $Ee(e){return LEe(e)||IEe(e)||DEe(e)||MEe()}function MEe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function DEe(e,t){if(e){if(typeof e=="string")return f$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f$(e,t)}}function f$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function IEe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LEe(e){if(Array.isArray(e))return e}function zEe(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=$Ee(o),c=s[0],u=s.slice(1);if(typeof c=="number"){d$(i.bind(null,u),c);return}i(c),d$(i.bind(null,u));return}d_(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function bh(e){"@babel/helpers - typeof";return bh=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},bh(e)}function h$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function p$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h$(Object(r),!0).forEach(function(n){N6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N6(e,t,r){return t=BEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BEe(e){var t=UEe(e,"string");return bh(t)==="symbol"?t:String(t)}function UEe(e,t){if(bh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FEe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},KEe=function(t){return t},HEe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},df=function(t,r){return Object.keys(r).reduce(function(n,i){return p$(p$({},n),{},N6({},i,t(i,r[i])))},{})},m$=function(t,r,n){return t.map(function(i){return"".concat(HEe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function VEe(e,t){return GEe(e)||qEe(e,t)||C6(e,t)||WEe()}function WEe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function qEe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function GEe(e){if(Array.isArray(e))return e}function YEe(e){return QEe(e)||JEe(e)||C6(e)||XEe()}function XEe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C6(e,t){if(e){if(typeof e=="string")return f_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f_(e,t)}}function JEe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QEe(e){if(Array.isArray(e))return f_(e)}function f_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var zy=1e-4,T6=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},A6=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},g$=function(t,r){return function(n){var i=T6(t,r);return A6(i,n)}},ZEe=function(t,r){return function(n){var i=T6(t,r),a=[].concat(YEe(i.map(function(o,s){return o*s}).slice(1)),[0]);return A6(a,n)}},y$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),f=VEe(u,4);i=f[0],a=f[1],o=f[2],s=f[3]}}}var d=g$(i,o),h=g$(a,s),p=ZEe(i,o),m=function(x){return x>1?1:x<0?0:x},g=function(x){for(var b=x>1?1:x,y=b,j=0;j<8;++j){var k=d(y)-b,_=p(y);if(Math.abs(k-b)<zy||_<zy)return h(y);y=m(y-k/_)}return h(y)};return g.isStepper=!1,g},eNe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,c=function(f,d,h){var p=-(f-d)*n,m=h*a,g=h+(p-m)*s/1e3,v=h*s/1e3+f;return Math.abs(v-d)<zy&&Math.abs(g)<zy?[d,0]:[v,g]};return c.isStepper=!0,c.dt=s,c},tNe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return y$(i);case"spring":return eNe();default:if(i.split("(")[0]==="cubic-bezier")return y$(i)}return typeof i=="function"?i:null};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 v$(e){return iNe(e)||nNe(e)||P6(e)||rNe()}function rNe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nNe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iNe(e){if(Array.isArray(e))return p_(e)}function x$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(r),!0).forEach(function(n){h_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function h_(e,t,r){return t=aNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aNe(e){var t=oNe(e,"string");return wh(t)==="symbol"?t:String(t)}function oNe(e,t){if(wh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sNe(e,t){return uNe(e)||cNe(e,t)||P6(e,t)||lNe()}function lNe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P6(e,t){if(e){if(typeof e=="string")return p_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(e,t)}}function p_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cNe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function uNe(e){if(Array.isArray(e))return e}var By=function(t,r,n){return t+(r-t)*n},m_=function(t){var r=t.from,n=t.to;return r!==n},dNe=function e(t,r,n){var i=df(function(a,o){if(m_(o)){var s=t(o.from,o.to,o.velocity),c=sNe(s,2),u=c[0],f=c[1];return hr(hr({},o),{},{from:u,velocity:f})}return o},r);return n<1?df(function(a,o){return m_(o)?hr(hr({},o),{},{velocity:By(o.velocity,i[a].velocity,n),from:By(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const fNe=function(e,t,r,n,i){var a=FEe(e,t),o=a.reduce(function(v,x){return hr(hr({},v),{},h_({},x,[e[x],t[x]]))},{}),s=a.reduce(function(v,x){return hr(hr({},v),{},h_({},x,{from:e[x],velocity:0,to:t[x]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return df(function(x,b){return b.from},s)},p=function(){return!Object.values(s).filter(m_).length},m=function(x){u||(u=x);var b=x-u,y=b/r.dt;s=dNe(r,s,y),i(hr(hr(hr({},e),t),h())),u=x,p()||(c=requestAnimationFrame(d))},g=function(x){f||(f=x);var b=(x-f)/n,y=df(function(k,_){return By.apply(void 0,v$(_).concat([r(b)]))},o);if(i(hr(hr(hr({},e),t),y)),b<1)c=requestAnimationFrame(d);else{var j=df(function(k,_){return By.apply(void 0,v$(_).concat([r(1)]))},o);i(hr(hr(hr({},e),t),j))}};return d=r.isStepper?m:g,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function uu(e){"@babel/helpers - typeof";return uu=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},uu(e)}var hNe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function pNe(e,t){if(e==null)return{};var r=mNe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mNe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function B0(e){return xNe(e)||vNe(e)||yNe(e)||gNe()}function gNe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yNe(e,t){if(e){if(typeof e=="string")return g_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g_(e,t)}}function vNe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xNe(e){if(Array.isArray(e))return g_(e)}function g_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(r),!0).forEach(function(n){Ld(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ld(e,t,r){return t=O6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wNe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O6(n.key),n)}}function kNe(e,t,r){return t&&wNe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function O6(e){var t=_Ne(e,"string");return uu(t)==="symbol"?t:String(t)}function _Ne(e,t){if(uu(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uu(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jNe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y_(e,t)}function y_(e,t){return y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},y_(e,t)}function SNe(e){var t=ENe();return function(){var n=Uy(e),i;if(t){var a=Uy(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return v_(this,i)}}function v_(e,t){if(t&&(uu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x_(e)}function x_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ENe(){if(typeof Reflect=="undefined"||!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(e){return!1}}function Uy(e){return Uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uy(e)}var Ma=function(e){jNe(r,e);var t=SNe(r);function r(n,i){var a;bNe(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,c=o.attributeName,u=o.from,f=o.to,d=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(x_(a)),a.changeStyle=a.changeStyle.bind(x_(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),v_(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},v_(a);a.state={style:c?Ld({},c,u):u}}else a.state={style:{}};return a}return kNe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(s){if(!o){var p={style:c?Ld({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(p);return}if(!(OEe(i.to,f)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||u?d:i.to;if(this.state&&h){var v={style:c?Ld({},c,g):g};(c&&h[c]!==g||!c&&h!==g)&&this.setState(v)}this.runAnimation(Xn(Xn({},this.props),{},{from:g,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 a=this,o=i.from,s=i.to,c=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,p=fNe(o,s,tNe(u),c,this.changeStyle),m=function(){a.stopJSAnimation=p()};this.manager.start([h,f,m,c,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,c=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,h=d===void 0?0:d,p=function(g,v,x){if(x===0)return g;var b=v.duration,y=v.easing,j=y===void 0?"ease":y,k=v.style,_=v.properties,S=v.onAnimationEnd,E=x>0?o[x-1]:v,C=_||Object.keys(k);if(typeof j=="function"||j==="spring")return[].concat(B0(g),[a.runJSAnimation.bind(a,{from:E.style,to:k,duration:b,easing:j}),b]);var R=m$(C,b,j),M=Xn(Xn(Xn({},E.style),k),{},{transition:R});return[].concat(B0(g),[M,b,S]).filter(KEe)};return this.manager.start([c].concat(B0(o.reduce(p,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=zEe());var a=i.begin,o=i.duration,s=i.attributeName,c=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var g=s?Ld({},s,c):c,v=m$(Object.keys(g),o,u);m.start([f,a,Xn(Xn({},g),{},{transition:v}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=pNe(i,hNe),u=w.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var d=function(p){var m=p.props,g=m.style,v=g===void 0?{}:g,x=m.className,b=w.cloneElement(p,Xn(Xn({},c),{},{style:Xn(Xn({},v),f),className:x}));return b};return u===1?d(w.Children.only(a)):$.createElement("div",null,w.Children.map(a,function(h){return d(h)}))}}]),r}(w.PureComponent);Ma.displayName="Animate";Ma.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ma.propTypes={from:Ze.oneOfType([Ze.object,Ze.string]),to:Ze.oneOfType([Ze.object,Ze.string]),attributeName:Ze.string,duration:Ze.number,begin:Ze.number,easing:Ze.oneOfType([Ze.string,Ze.func]),steps:Ze.arrayOf(Ze.shape({duration:Ze.number.isRequired,style:Ze.object.isRequired,easing:Ze.oneOfType([Ze.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ze.func]),properties:Ze.arrayOf("string"),onAnimationEnd:Ze.func})),children:Ze.oneOfType([Ze.node,Ze.func]),isActive:Ze.bool,canBegin:Ze.bool,onAnimationEnd:Ze.func,shouldReAnimate:Ze.bool,onAnimationStart:Ze.func,onAnimationReStart:Ze.func};function kh(e){"@babel/helpers - typeof";return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kh(e)}function Fy(){return Fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fy.apply(this,arguments)}function NNe(e,t){return PNe(e)||ANe(e,t)||TNe(e,t)||CNe()}function CNe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function TNe(e,t){if(e){if(typeof e=="string")return w$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w$(e,t)}}function w$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ANe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function PNe(e){if(Array.isArray(e))return e}function k$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(r),!0).forEach(function(n){ONe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ONe(e,t,r){return t=RNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RNe(e){var t=$Ne(e,"string");return kh(t)=="symbol"?t:t+""}function $Ne(e,t){if(kh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j$=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,c=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,p=4;h<p;h++)d[h]=a[h]>o?o:a[h];f="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(r)),f+="L ".concat(t+n-c*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,",\n ").concat(t+n,",").concat(r+s*d[1])),f+="L ".concat(t+n,",").concat(r+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,",\n ").concat(t+n-c*d[2],",").concat(r+i)),f+="L ".concat(t+c*d[3],",").concat(r+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,",\n ").concat(t,",").concat(r+i-s*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var m=Math.min(o,a);f="M ".concat(t,",").concat(r+s*m,"\n A ").concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+c*m,",").concat(r,"\n L ").concat(t+n-c*m,",").concat(r,"\n A ").concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*m,"\n L ").concat(t+n,",").concat(r+i-s*m,"\n A ").concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-c*m,",").concat(r+i,"\n L ").concat(t+c*m,",").concat(r+i,"\n A ").concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*m," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},MNe=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,c=r.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),d=Math.min(o,o+c),h=Math.max(o,o+c);return n>=u&&n<=f&&i>=d&&i<=h}return!1},DNe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},RN=function(t){var r=_$(_$({},DNe),t),n=w.useRef(),i=w.useState(-1),a=NNe(i,2),o=a[0],s=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&s(j)}catch(k){}},[]);var c=r.x,u=r.y,f=r.width,d=r.height,h=r.radius,p=r.className,m=r.animationEasing,g=r.animationDuration,v=r.animationBegin,x=r.isAnimationActive,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var y=Ge("recharts-rectangle",p);return b?$.createElement(Ma,{canBegin:o>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:g,animationEasing:m,isActive:b},function(j){var k=j.width,_=j.height,S=j.x,E=j.y;return $.createElement(Ma,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:x,easing:m},$.createElement("path",Fy({},qe(r,!0),{className:y,d:j$(S,E,k,_,h),ref:n})))}):$.createElement("path",Fy({},qe(r,!0),{className:y,d:j$(c,u,f,d,h)}))};function b_(){return b_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b_.apply(this,arguments)}var $N=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=Ge("recharts-dot",a);return r===+r&&n===+n&&i===+i?w.createElement("circle",b_({},qe(t,!1),sy(t),{className:o,cx:r,cy:n,r:i})):null};function _h(e){"@babel/helpers - typeof";return _h=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},_h(e)}var INe=["x","y","top","left","width","height","className"];function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w_.apply(this,arguments)}function S$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LNe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(r),!0).forEach(function(n){zNe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zNe(e,t,r){return t=BNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BNe(e){var t=UNe(e,"string");return _h(t)=="symbol"?t:t+""}function UNe(e,t){if(_h(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_h(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FNe(e,t){if(e==null)return{};var r=KNe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KNe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var HNe=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},VNe=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,p=h===void 0?0:h,m=t.className,g=FNe(t,INe),v=LNe({x:n,y:a,top:s,left:u,width:d,height:p},g);return!se(n)||!se(a)||!se(d)||!se(p)||!se(s)||!se(u)?null:$.createElement("path",w_({},qe(v,!0),{className:Ge("recharts-cross",m),d:HNe(n,a,d,p,s,u)}))},WNe=WU,qNe=WNe(Object.getPrototypeOf,Object),GNe=qNe,YNe=Fa,XNe=GNe,JNe=Ka,QNe="[object Object]",ZNe=Function.prototype,eCe=Object.prototype,R6=ZNe.toString,tCe=eCe.hasOwnProperty,rCe=R6.call(Object);function nCe(e){if(!JNe(e)||YNe(e)!=QNe)return!1;var t=XNe(e);if(t===null)return!0;var r=tCe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&R6.call(r)==rCe}var iCe=nCe;const aCe=Qe(iCe);var oCe=Fa,sCe=Ka,lCe="[object Boolean]";function cCe(e){return e===!0||e===!1||sCe(e)&&oCe(e)==lCe}var uCe=cCe;const dCe=Qe(uCe);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 Ky(){return Ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ky.apply(this,arguments)}function fCe(e,t){return gCe(e)||mCe(e,t)||pCe(e,t)||hCe()}function hCe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pCe(e,t){if(e){if(typeof e=="string")return E$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E$(e,t)}}function E$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mCe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function gCe(e){if(Array.isArray(e))return e}function N$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function C$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N$(Object(r),!0).forEach(function(n){yCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yCe(e,t,r){return t=vCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vCe(e){var t=xCe(e,"string");return jh(t)=="symbol"?t:t+""}function xCe(e,t){if(jh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T$=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},bCe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},wCe=function(t){var r=C$(C$({},bCe),t),n=w.useRef(),i=w.useState(-1),a=fCe(i,2),o=a[0],s=a[1];w.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var y=n.current.getTotalLength();y&&s(y)}catch(j){}},[]);var c=r.x,u=r.y,f=r.upperWidth,d=r.lowerWidth,h=r.height,p=r.className,m=r.animationEasing,g=r.animationDuration,v=r.animationBegin,x=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var b=Ge("recharts-trapezoid",p);return x?$.createElement(Ma,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:g,animationEasing:m,isActive:x},function(y){var j=y.upperWidth,k=y.lowerWidth,_=y.height,S=y.x,E=y.y;return $.createElement(Ma,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:m},$.createElement("path",Ky({},qe(r,!0),{className:b,d:T$(S,E,j,k,_),ref:n})))}):$.createElement("g",null,$.createElement("path",Ky({},qe(r,!0),{className:b,d:T$(c,u,f,d,h)})))},kCe=["option","shapeType","propTransformer","activeClassName","isActive"];function Sh(e){"@babel/helpers - typeof";return Sh=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},Sh(e)}function _Ce(e,t){if(e==null)return{};var r=jCe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jCe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function A$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(r),!0).forEach(function(n){SCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SCe(e,t,r){return t=ECe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ECe(e){var t=NCe(e,"string");return Sh(t)=="symbol"?t:t+""}function NCe(e,t){if(Sh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CCe(e,t){return Hy(Hy({},t),e)}function TCe(e,t){return e==="symbols"}function P$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return $.createElement(RN,r);case"trapezoid":return $.createElement(wCe,r);case"sector":return $.createElement(k6,r);case"symbols":if(TCe(t))return $.createElement(QE,r);break;default:return null}}function ACe(e){return w.isValidElement(e)?e.props:e}function PCe(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?CCe:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,c=_Ce(e,kCe),u;if(w.isValidElement(t))u=w.cloneElement(t,Hy(Hy({},c),ACe(t)));else if(Le(t))u=t(c);else if(aCe(t)&&!dCe(t)){var f=i(t,c);u=$.createElement(P$,{shapeType:r,elementProps:f})}else{var d=c;u=$.createElement(P$,{shapeType:r,elementProps:d})}return s?$.createElement(Ut,{className:o},u):u}function Bx(e,t){return t!=null&&"trapezoids"in e.props}function Ux(e,t){return t!=null&&"sectors"in e.props}function Eh(e,t){return t!=null&&"points"in e.props}function OCe(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function RCe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function $Ce(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function MCe(e,t){var r;return Bx(e,t)?r=OCe:Ux(e,t)?r=RCe:Eh(e,t)&&(r=$Ce),r}function DCe(e,t){var r;return Bx(e,t)?r="trapezoids":Ux(e,t)?r="sectors":Eh(e,t)&&(r="points"),r}function ICe(e,t){if(Bx(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Ux(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Eh(e,t)?t.payload:{}}function LCe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=DCe(r,t),a=ICe(r,t),o=n.filter(function(c,u){var f=Ix(a,c),d=r.props[i].filter(function(m){var g=MCe(r,t);return g(m,t)}),h=r.props[i].indexOf(d[d.length-1]),p=u===h;return f&&p}),s=n.indexOf(o[o.length-1]);return s}var zCe=Math.ceil,BCe=Math.max;function UCe(e,t,r,n){for(var i=-1,a=BCe(zCe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var FCe=UCe,KCe=dF,O$=1/0,HCe=17976931348623157e292;function VCe(e){if(!e)return e===0?e:0;if(e=KCe(e),e===O$||e===-O$){var t=e<0?-1:1;return t*HCe}return e===e?e:0}var $6=VCe,WCe=FCe,qCe=Cx,U0=$6;function GCe(e){return function(t,r,n){return n&&typeof n!="number"&&qCe(t,r,n)&&(r=n=void 0),t=U0(t),r===void 0?(r=t,t=0):r=U0(r),n=n===void 0?t<r?1:-1:U0(n),WCe(t,r,n,e)}}var YCe=GCe,XCe=YCe,JCe=XCe(),QCe=JCe;const Vy=Qe(QCe);function Nh(e){"@babel/helpers - typeof";return Nh=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},Nh(e)}function R$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(r),!0).forEach(function(n){M6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M6(e,t,r){return t=ZCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZCe(e){var t=eTe(e,"string");return Nh(t)=="symbol"?t:t+""}function eTe(e,t){if(Nh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tTe=["Webkit","Moz","O","ms"],rTe=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=tTe.reduce(function(a,o){return $$($$({},a),{},M6({},o+n,r))},{});return i[t]=r,i};function du(e){"@babel/helpers - typeof";return du=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},du(e)}function Wy(){return Wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wy.apply(this,arguments)}function M$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I6(n.key),n)}}function iTe(e,t,r){return t&&D$(e.prototype,t),r&&D$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function aTe(e,t,r){return t=qy(t),oTe(e,D6()?Reflect.construct(t,r||[],qy(e).constructor):t.apply(e,r))}function oTe(e,t){if(t&&(du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sTe(e)}function sTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(D6=function(){return!!e})()}function qy(e){return qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qy(e)}function lTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k_(e,t)}function k_(e,t){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},k_(e,t)}function sn(e,t,r){return t=I6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I6(e){var t=cTe(e,"string");return du(t)=="symbol"?t:t+""}function cTe(e,t){if(du(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uTe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=cf().domain(Vy(0,c)).range([a,a+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:f}},I$=function(t){return t.changedTouches&&!!t.changedTouches.length},fu=function(e){function t(r){var n;return nTe(this,t),n=aTe(this,t,[r]),sn(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),sn(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),sn(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),sn(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),sn(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),sn(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),sn(n,"handleSlideDragStart",function(i){var a=I$(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return lTe(t,e),iTe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,f=u.length-1,d=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,d),m=t.getIndexInRange(o,h);return{startIndex:p-p%c,endIndex:m===f?f:m-m%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,c=vn(a[n],s,n);return Le(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,p=c.endIndex,m=c.onChange,g=n.pageX-a;g>0?g=Math.min(g,u+f-d-s,u+f-d-o):g<0&&(g=Math.max(g,u-o,u-s));var v=this.getIndex({startX:o+g,endX:s+g});(v.startIndex!==h||v.endIndex!==p)&&m&&m(v),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=I$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,c=i.startX,u=this.state[o],f=this.props,d=f.x,h=f.width,p=f.travellerWidth,m=f.onChange,g=f.gap,v=f.data,x={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,d+h-p-u):b<0&&(b=Math.max(b,d-u)),x[o]=u+b;var y=this.getIndex(x),j=y.startIndex,k=y.endIndex,_=function(){var E=v.length-1;return o==="startX"&&(s>c?j%g===0:k%g===0)||s<c&&k===E||o==="endX"&&(s>c?k%g===0:j%g===0)||s>c&&k===E};this.setState(sn(sn({},o,u+b),"brushMoveStartX",n.pageX),function(){m&&_()&&m(y)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,c=o.startX,u=o.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var h=d+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(sn({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.fill,u=n.stroke;return $.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.data,u=n.children,f=n.padding,d=w.Children.only(u);return d?$.cloneElement(d,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,p=c.ariaLabel,m=c.data,g=c.startIndex,v=c.endIndex,x=Math.max(n,this.props.x),b=F0(F0({},qe(this.props,!1)),{},{x,y:u,width:f,height:d}),y=p||"Min value: ".concat((a=m[g])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=m[v])===null||o===void 0?void 0:o.name);return $.createElement(Ut,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),s.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,c=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,d=Math.max(Math.abs(i-n)-u,0);return $.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:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,d=f.startX,h=f.endX,p=5,m={pointerEvents:"none",fill:u};return $.createElement(Ut,{className:"recharts-brush-texts"},$.createElement(ky,Wy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:o+s/2},m),this.getTextOfTick(i)),$.createElement(ky,Wy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+p,y:o+s/2},m),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,c=n.y,u=n.width,f=n.height,d=n.alwaysShowText,h=this.state,p=h.startX,m=h.endX,g=h.isTextActive,v=h.isSlideMoving,x=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!se(s)||!se(c)||!se(u)||!se(f)||u<=0||f<=0)return null;var y=Ge("recharts-brush",a),j=$.Children.count(o)===1,k=rTe("userSelect","none");return $.createElement(Ut,{className:y,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||v||x||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,c=n.stroke,u=Math.floor(a+s/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:a,width:o,height:s,fill:c,stroke:"none"}),$.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return $.isValidElement(n)?a=$.cloneElement(n,i):Le(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,d=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return F0({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?uTe({data:a,width:o,x:s,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([s,s+o-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var c=Math.floor((o+s)/2);n[c]>i?s=c:o=c}return i>=n[s]?s:o}}])}(w.PureComponent);sn(fu,"displayName","Brush");sn(fu,"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 dTe=aN;function fTe(e,t){var r;return dTe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var hTe=fTe,pTe=LU,mTe=es,gTe=hTe,yTe=tn,vTe=Cx;function xTe(e,t,r){var n=yTe(e)?pTe:gTe;return r&&vTe(e,t,r)&&(t=void 0),n(e,mTe(t))}var bTe=xTe;const wTe=Qe(bTe);var Gi=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},L$=oF;function kTe(e,t,r){t=="__proto__"&&L$?L$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _Te=kTe,jTe=_Te,STe=iF,ETe=es;function NTe(e,t){var r={};return t=ETe(t),STe(e,function(n,i,a){jTe(r,i,t(n,i,a))}),r}var CTe=NTe;const TTe=Qe(CTe);function ATe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var PTe=ATe,OTe=aN;function RTe(e,t){var r=!0;return OTe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var $Te=RTe,MTe=PTe,DTe=$Te,ITe=es,LTe=tn,zTe=Cx;function BTe(e,t,r){var n=LTe(e)?MTe:DTe;return r&&zTe(e,t,r)&&(t=void 0),n(e,ITe(t))}var UTe=BTe;const L6=Qe(UTe);var FTe=["x","y"];function Ch(e){"@babel/helpers - typeof";return Ch=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},Ch(e)}function __(){return __=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},__.apply(this,arguments)}function z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z$(Object(r),!0).forEach(function(n){KTe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KTe(e,t,r){return t=HTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HTe(e){var t=VTe(e,"string");return Ch(t)=="symbol"?t:t+""}function VTe(e,t){if(Ch(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ch(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WTe(e,t){if(e==null)return{};var r=qTe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qTe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GTe(e,t){var r=e.x,n=e.y,i=WTe(e,FTe),a="".concat(r),o=parseInt(a,10),s="".concat(n),c=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Cd(Cd(Cd(Cd(Cd({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function B$(e){return $.createElement(PCe,__({shapeType:"rectangle",propTransformer:GTe,activeClassName:"recharts-active-bar"},e))}var YTe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=se(n)||dde(n);return a?t(n,i):(a||nl(),r)}},XTe=["value","background"],z6;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 JTe(e,t){if(e==null)return{};var r=QTe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QTe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gy.apply(this,arguments)}function U$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U$(Object(r),!0).forEach(function(n){Eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,U6(n.key),n)}}function eAe(e,t,r){return t&&F$(e.prototype,t),r&&F$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tAe(e,t,r){return t=Yy(t),rAe(e,B6()?Reflect.construct(t,r||[],Yy(e).constructor):t.apply(e,r))}function rAe(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 nAe(e)}function nAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(B6=function(){return!!e})()}function Yy(e){return Yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yy(e)}function iAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j_(e,t)}function j_(e,t){return j_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j_(e,t)}function Eo(e,t,r){return t=U6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U6(e){var t=aAe(e,"string");return hu(t)=="symbol"?t:t+""}function aAe(e,t){if(hu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yp=function(e){function t(){var r;ZTe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=tAe(this,t,[].concat(i)),Eo(r,"state",{isAnimationFinished:!1}),Eo(r,"id",up("recharts-bar-")),Eo(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Eo(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return iAe(t,e),eAe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,c=a.activeIndex,u=a.activeBar,f=qe(this.props,!1);return n&&n.map(function(d,h){var p=h===c,m=p?u:o,g=Ht(Ht(Ht({},f),d),{},{isActive:p,option:m,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return $.createElement(Ut,Gy({className:"recharts-bar-rectangle"},ly(i.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),$.createElement(B$,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,h=this.state.prevData;return $.createElement(Ma,{begin:c,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,g=a.map(function(v,x){var b=h&&h[x];if(b){var y=li(b.x,v.x),j=li(b.y,v.y),k=li(b.width,v.width),_=li(b.height,v.height);return Ht(Ht({},v),{},{x:y(m),y:j(m),width:k(m),height:_(m)})}if(o==="horizontal"){var S=li(0,v.height),E=S(m);return Ht(Ht({},v),{},{y:v.y+v.height-E,height:E})}var C=li(0,v.width),R=C(m);return Ht(Ht({},v),{},{width:R})});return $.createElement(Ut,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Ix(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,c=qe(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,h=JTe(u,XTe);if(!d)return null;var p=Ht(Ht(Ht(Ht(Ht({},h),{},{fill:"#eee"},d),c),ly(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return $.createElement(B$,Gy({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},p))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=Bn(f,gp);if(!d)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,p=function(v,x){var b=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:b,errorVal:vn(v,x)}},m={clipPath:n?"url(#clipPath-".concat(i,")"):null};return $.createElement(Ut,m,d.map(function(g){return $.cloneElement(g,{key:"error-bar-".concat(i,"-").concat(g.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,c=n.yAxis,u=n.left,f=n.top,d=n.width,h=n.height,p=n.isAnimationActive,m=n.background,g=n.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,x=Ge("recharts-bar",o),b=s&&s.allowDataOverflow,y=c&&c.allowDataOverflow,j=b||y,k=Ue(g)?this.id:g;return $.createElement(Ut,{className:x},b||y?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(k)},$.createElement("rect",{x:b?u:u-d/2,y:y?f:f-h/2,width:b?d:d*2,height:y?h:h*2}))):null,$.createElement(Ut,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(k,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,k),(!p||v)&&Bo.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(w.PureComponent);z6=yp;Eo(yp,"displayName","Bar");Eo(yp,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!_a.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Eo(yp,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=Mje(n,r);if(!p)return null;var m=t.layout,g=r.type.defaultProps,v=g!==void 0?Ht(Ht({},g),r.props):r.props,x=v.dataKey,b=v.children,y=v.minPointSize,j=m==="horizontal"?o:a,k=u?j.scale.domain():null,_=Kje({numericAxis:j}),S=Bn(b,hF),E=d.map(function(C,R){var M,L,H,U,F,O;u?M=Dje(u[f+R],k):(M=vn(C,x),Array.isArray(M)||(M=[_,M]));var P=YTe(y,z6.defaultProps.minPointSize)(M[1],R);if(m==="horizontal"){var A,D=[o.scale(M[0]),o.scale(M[1])],B=D[0],z=D[1];L=UR({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:C,index:R}),H=(A=z!=null?z:B)!==null&&A!==void 0?A:void 0,U=p.size;var K=B-z;if(F=Number.isNaN(K)?0:K,O={x:L,y:o.y,width:U,height:o.height},Math.abs(P)>0&&Math.abs(F)<Math.abs(P)){var Y=di(F||P)*(Math.abs(P)-Math.abs(F));H-=Y,F+=Y}}else{var G=[a.scale(M[0]),a.scale(M[1])],re=G[0],le=G[1];if(L=re,H=UR({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:C,index:R}),U=le-re,F=p.size,O={x:a.x,y:H,width:a.width,height:F},Math.abs(P)>0&&Math.abs(U)<Math.abs(P)){var me=di(U||P)*(Math.abs(P)-Math.abs(U));U+=me}}return Ht(Ht(Ht({},C),{},{x:L,y:H,width:U,height:F,value:u?M:M[1],payload:C,background:O},S&&S[R]&&S[R].props),{},{tooltipPayload:[x6(r,C)],tooltipPosition:{x:L+U/2,y:H+F/2}})});return Ht({data:E,layout:m},h)});function Th(e){"@babel/helpers - typeof";return Th=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},Th(e)}function oAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F6(n.key),n)}}function sAe(e,t,r){return t&&K$(e.prototype,t),r&&K$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function H$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ai(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(r),!0).forEach(function(n){Fx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fx(e,t,r){return t=F6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F6(e){var t=lAe(e,"string");return Th(t)=="symbol"?t:t+""}function lAe(e,t){if(Th(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Th(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cAe=function(t,r,n,i,a){var o=t.width,s=t.height,c=t.layout,u=t.children,f=Object.keys(r),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!cn(u,yp);return f.reduce(function(p,m){var g=r[m],v=g.orientation,x=g.domain,b=g.padding,y=b===void 0?{}:b,j=g.mirror,k=g.reversed,_="".concat(v).concat(j?"Mirror":""),S,E,C,R,M;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var L=x[1]-x[0],H=1/0,U=g.categoricalDomain.sort(pde);if(U.forEach(function(G,re){re>0&&(H=Math.min((G||0)-(U[re-1]||0),H))}),Number.isFinite(H)){var F=H/L,O=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(S=F*O/2),g.padding==="no-gap"){var P=tl(t.barCategoryGap,F*O),A=F*O/2;S=A-P-(A-P)/O*P}}}i==="xAxis"?E=[n.left+(y.left||0)+(S||0),n.left+n.width-(y.right||0)-(S||0)]:i==="yAxis"?E=c==="horizontal"?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0)+(S||0),n.top+n.height-(y.bottom||0)-(S||0)]:E=g.range,k&&(E=[E[1],E[0]]);var D=Rje(g,a,h),B=D.scale,z=D.realScaleType;B.domain(x).range(E),$je(B);var K=Fje(B,ai(ai({},g),{},{realScaleType:z}));i==="xAxis"?(M=v==="top"&&!j||v==="bottom"&&j,C=n.left,R=d[_]-M*g.height):i==="yAxis"&&(M=v==="left"&&!j||v==="right"&&j,C=d[_]-M*g.width,R=n.top);var Y=ai(ai(ai({},g),K),{},{realScaleType:z,x:C,y:R,scale:B,width:i==="xAxis"?n.width:g.width,height:i==="yAxis"?n.height:g.height});return Y.bandSize=Dy(Y,K),!g.hide&&i==="xAxis"?d[_]+=(M?-1:1)*Y.height:g.hide||(d[_]+=(M?-1:1)*Y.width),ai(ai({},p),{},Fx({},m,Y))},{})},K6=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},uAe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return K6({x:r,y:n},{x:i,y:a})},H6=function(){function e(t){oAe(this,e),this.scale=t}return sAe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Fx(H6,"EPS",1e-4);var MN=function(t){var r=Object.keys(t).reduce(function(n,i){return ai(ai({},n),{},Fx({},i,H6.create(t[i])))},{});return ai(ai({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return TTe(i,function(c,u){return r[u].apply(c,{bandAware:o,position:s})})},isInRange:function(i){return L6(i,function(a,o){return r[o].isInRange(a)})}})};function dAe(e){return(e%180+180)%180}var fAe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=dAe(i),o=a*Math.PI/180,s=Math.atan(n/r),c=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},hAe=es,pAe=dp,mAe=Ex;function gAe(e){return function(t,r,n){var i=Object(t);if(!pAe(t)){var a=hAe(r);t=mAe(t),r=function(s){return a(i[s],s,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var yAe=gAe,vAe=$6;function xAe(e){var t=vAe(e),r=t%1;return t===t?r?t-r:t:0}var bAe=xAe,wAe=QU,kAe=es,_Ae=bAe,jAe=Math.max;function SAe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:_Ae(r);return i<0&&(i=jAe(n+i,0)),wAe(e,kAe(t),i)}var EAe=SAe,NAe=yAe,CAe=EAe,TAe=NAe(CAe),AAe=TAe;const PAe=Qe(AAe);var OAe=mue(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("")}),DN=w.createContext(void 0),IN=w.createContext(void 0),V6=w.createContext(void 0),W6=w.createContext({}),q6=w.createContext(void 0),G6=w.createContext(0),Y6=w.createContext(0),V$=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,c=t.width,u=t.height,f=OAe(a);return $.createElement(DN.Provider,{value:n},$.createElement(IN.Provider,{value:i},$.createElement(W6.Provider,{value:a},$.createElement(V6.Provider,{value:f},$.createElement(q6.Provider,{value:o},$.createElement(G6.Provider,{value:u},$.createElement(Y6.Provider,{value:c},s)))))))},RAe=function(){return w.useContext(q6)},X6=function(t){var r=w.useContext(DN);r==null&&nl();var n=r[t];return n==null&&nl(),n},$Ae=function(){var t=w.useContext(DN);return ho(t)},MAe=function(){var t=w.useContext(IN),r=PAe(t,function(n){return L6(n.domain,Number.isFinite)});return r||ho(t)},J6=function(t){var r=w.useContext(IN);r==null&&nl();var n=r[t];return n==null&&nl(),n},DAe=function(){var t=w.useContext(V6);return t},IAe=function(){return w.useContext(W6)},LN=function(){return w.useContext(Y6)},zN=function(){return w.useContext(G6)};function pu(e){"@babel/helpers - typeof";return pu=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},pu(e)}function LAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zAe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Z6(n.key),n)}}function BAe(e,t,r){return t&&zAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UAe(e,t,r){return t=Xy(t),FAe(e,Q6()?Reflect.construct(t,r||[],Xy(e).constructor):t.apply(e,r))}function FAe(e,t){if(t&&(pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return KAe(e)}function KAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Q6=function(){return!!e})()}function Xy(e){return Xy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xy(e)}function HAe(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&&S_(e,t)}function S_(e,t){return S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},S_(e,t)}function W$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function q$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W$(Object(r),!0).forEach(function(n){BN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BN(e,t,r){return t=Z6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z6(e){var t=VAe(e,"string");return pu(t)=="symbol"?t:t+""}function VAe(e,t){if(pu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WAe(e,t){return XAe(e)||YAe(e,t)||GAe(e,t)||qAe()}function qAe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function GAe(e,t){if(e){if(typeof e=="string")return G$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G$(e,t)}}function G$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YAe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function XAe(e){if(Array.isArray(e))return e}function E_(){return E_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E_.apply(this,arguments)}var JAe=function(t,r){var n;return $.isValidElement(t)?n=$.cloneElement(t,r):Le(t)?n=t(r):n=$.createElement("line",E_({},r,{className:"recharts-reference-line-line"})),n},QAe=function(t,r,n,i,a,o,s,c,u){var f=a.x,d=a.y,h=a.width,p=a.height;if(n){var m=u.y,g=t.y.apply(m,{position:o});if(Gi(u,"discard")&&!t.y.isInRange(g))return null;var v=[{x:f+h,y:g},{x:f,y:g}];return c==="left"?v.reverse():v}if(r){var x=u.x,b=t.x.apply(x,{position:o});if(Gi(u,"discard")&&!t.x.isInRange(b))return null;var y=[{x:b,y:d+p},{x:b,y:d}];return s==="top"?y.reverse():y}if(i){var j=u.segment,k=j.map(function(_){return t.apply(_,{position:o})});return Gi(u,"discard")&&wTe(k,function(_){return!t.isInRange(_)})?null:k}return null};function ZAe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,c=e.alwaysShow,u=RAe(),f=X6(i),d=J6(a),h=DAe();if(!u||!h)return null;ka(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=MN({x:f.scale,y:d.scale}),m=nr(t),g=nr(r),v=n&&n.length===2,x=QAe(p,m,g,v,h,e.position,f.orientation,d.orientation,e);if(!x)return null;var b=WAe(x,2),y=b[0],j=y.x,k=y.y,_=b[1],S=_.x,E=_.y,C=Gi(e,"hidden")?"url(#".concat(u,")"):void 0,R=q$(q$({clipPath:C},qe(e,!0)),{},{x1:j,y1:k,x2:S,y2:E});return $.createElement(Ut,{className:Ge("recharts-reference-line",s)},JAe(o,R),Cr.renderCallByParent(e,uAe({x1:j,y1:k,x2:S,y2:E})))}var UN=function(e){function t(){return LAe(this,t),UAe(this,t,arguments)}return HAe(t,e),BAe(t,[{key:"render",value:function(){return $.createElement(ZAe,this.props)}}])}($.Component);BN(UN,"displayName","ReferenceLine");BN(UN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N_.apply(this,arguments)}function mu(e){"@babel/helpers - typeof";return mu=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},mu(e)}function Y$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y$(Object(r),!0).forEach(function(n){Kx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ePe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tPe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t8(n.key),n)}}function rPe(e,t,r){return t&&tPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nPe(e,t,r){return t=Jy(t),iPe(e,e8()?Reflect.construct(t,r||[],Jy(e).constructor):t.apply(e,r))}function iPe(e,t){if(t&&(mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aPe(e)}function aPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(e8=function(){return!!e})()}function Jy(e){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jy(e)}function oPe(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&&C_(e,t)}function C_(e,t){return C_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},C_(e,t)}function Kx(e,t,r){return t=t8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t8(e){var t=sPe(e,"string");return mu(t)=="symbol"?t:t+""}function sPe(e,t){if(mu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lPe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=MN({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Gi(t,"discard")&&!o.isInRange(s)?null:s},Hx=function(e){function t(){return ePe(this,t),nPe(this,t,arguments)}return oPe(t,e),rPe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,c=n.clipPathId,u=nr(i),f=nr(a);if(ka(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=lPe(this.props);if(!d)return null;var h=d.x,p=d.y,m=this.props,g=m.shape,v=m.className,x=Gi(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=X$(X$({clipPath:x},qe(this.props,!0)),{},{cx:h,cy:p});return $.createElement(Ut,{className:Ge("recharts-reference-dot",v)},t.renderDot(g,b),Cr.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])}($.Component);Kx(Hx,"displayName","ReferenceDot");Kx(Hx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Kx(Hx,"renderDot",function(e,t){var r;return $.isValidElement(e)?r=$.cloneElement(e,t):Le(e)?r=e(t):r=$.createElement($N,N_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T_.apply(this,arguments)}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 J$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J$(Object(r),!0).forEach(function(n){Vx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uPe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n8(n.key),n)}}function dPe(e,t,r){return t&&uPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fPe(e,t,r){return t=Qy(t),hPe(e,r8()?Reflect.construct(t,r||[],Qy(e).constructor):t.apply(e,r))}function hPe(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 pPe(e)}function pPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(r8=function(){return!!e})()}function Qy(e){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qy(e)}function mPe(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&&A_(e,t)}function A_(e,t){return A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},A_(e,t)}function Vx(e,t,r){return t=n8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n8(e){var t=gPe(e,"string");return gu(t)=="symbol"?t:t+""}function gPe(e,t){if(gu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yPe=function(t,r,n,i,a){var o=a.x1,s=a.x2,c=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var h=MN({x:f.scale,y:d.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},m={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Gi(a,"discard")&&(!h.isInRange(p)||!h.isInRange(m))?null:K6(p,m)},Wx=function(e){function t(){return cPe(this,t),fPe(this,t,arguments)}return mPe(t,e),dPe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;ka(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=nr(i),h=nr(a),p=nr(o),m=nr(s),g=this.props.shape;if(!d&&!h&&!p&&!m&&!g)return null;var v=yPe(d,h,p,m,this.props);if(!v&&!g)return null;var x=Gi(this.props,"hidden")?"url(#".concat(f,")"):void 0;return $.createElement(Ut,{className:Ge("recharts-reference-area",c)},t.renderRect(g,Q$(Q$({clipPath:x},qe(this.props,!0)),v)),Cr.renderCallByParent(this.props,v))}}])}($.Component);Vx(Wx,"displayName","ReferenceArea");Vx(Wx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Vx(Wx,"renderRect",function(e,t){var r;return $.isValidElement(e)?r=$.cloneElement(e,t):Le(e)?r=e(t):r=$.createElement(RN,T_({},t,{className:"recharts-reference-area-rect"})),r});function i8(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function vPe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return fAe(n,r)}function xPe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Zy(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function bPe(e,t){return i8(e,t+1)}function wPe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,c=0,u=1,f=o,d=function(){var m=n==null?void 0:n[c];if(m===void 0)return{v:i8(n,u)};var g=c,v,x=function(){return v===void 0&&(v=r(m,g)),v},b=m.coordinate,y=c===0||Zy(e,b,x,f,s);y||(c=0,f=o,u+=1),y&&(f=b+e*(x()/2+i),c+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function Ah(e){"@babel/helpers - typeof";return Ah=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},Ah(e)}function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z$(Object(r),!0).forEach(function(n){kPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kPe(e,t,r){return t=_Pe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Pe(e){var t=jPe(e,"string");return Ah(t)=="symbol"?t:t+""}function jPe(e,t){if(Ah(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ah(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SPe(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,c=t.end,u=function(h){var p=a[h],m,g=function(){return m===void 0&&(m=r(p,h)),m};if(h===o-1){var v=e*(p.coordinate+e*g()/2-c);a[h]=p=Er(Er({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else a[h]=p=Er(Er({},p),{},{tickCoord:p.coordinate});var x=Zy(e,p.tickCoord,g,s,c);x&&(c=p.tickCoord-e*(g()/2+i),a[h]=Er(Er({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function EPe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,c=t.start,u=t.end;if(a){var f=n[s-1],d=r(f,s-1),h=e*(f.coordinate+e*d/2-u);o[s-1]=f=Er(Er({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=Zy(e,f.tickCoord,function(){return d},c,u);p&&(u=f.tickCoord-e*(d/2+i),o[s-1]=Er(Er({},f),{},{isShow:!0}))}for(var m=a?s-1:s,g=function(b){var y=o[b],j,k=function(){return j===void 0&&(j=r(y,b)),j};if(b===0){var _=e*(y.coordinate-e*k()/2-c);o[b]=y=Er(Er({},y),{},{tickCoord:_<0?y.coordinate-_*e:y.coordinate})}else o[b]=y=Er(Er({},y),{},{tickCoord:y.coordinate});var S=Zy(e,y.tickCoord,k,c,u);S&&(c=y.tickCoord+e*(k()/2+i),o[b]=Er(Er({},y),{},{isShow:!0}))},v=0;v<m;v++)g(v);return o}function FN(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!n)return[];if(se(c)||_a.isSsr)return bPe(i,typeof c=="number"&&se(c)?c:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",m=f&&p==="width"?lf(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(y,j){var k=Le(u)?u(y.value,j):y.value;return p==="width"?vPe(lf(k,{fontSize:t,letterSpacing:r}),m,d):lf(k,{fontSize:t,letterSpacing:r})[p]},v=i.length>=2?di(i[1].coordinate-i[0].coordinate):1,x=xPe(a,v,p);return c==="equidistantPreserveStart"?wPe(v,x,g,i,o):(c==="preserveStart"||c==="preserveStartEnd"?h=EPe(v,x,g,i,o,c==="preserveStartEnd"):h=SPe(v,x,g,i,o),h.filter(function(b){return b.isShow}))}var NPe=["viewBox"],CPe=["viewBox"],TPe=["ticks"];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 ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ac.apply(this,arguments)}function eM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(n){KN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K0(e,t){if(e==null)return{};var r=APe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function APe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function PPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o8(n.key),n)}}function OPe(e,t,r){return t&&tM(e.prototype,t),r&&tM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function RPe(e,t,r){return t=ev(t),$Pe(e,a8()?Reflect.construct(t,r||[],ev(e).constructor):t.apply(e,r))}function $Pe(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 MPe(e)}function MPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a8=function(){return!!e})()}function ev(e){return ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ev(e)}function DPe(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(n,i){return n.__proto__=i,n},P_(e,t)}function KN(e,t,r){return t=o8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o8(e){var t=IPe(e,"string");return yu(t)=="symbol"?t:t+""}function IPe(e,t){if(yu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ju=function(e){function t(r){var n;return PPe(this,t),n=RPe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return DPe(t,e),OPe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=K0(n,NPe),s=this.props,c=s.viewBox,u=K0(s,CPe);return!kc(a,c)||!kc(o,u)||!kc(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,c=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,h=i.tickMargin,p,m,g,v,x,b,y=d?-1:1,j=n.tickSize||f,k=se(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=m=n.coordinate,v=o+ +!d*c,g=v-y*j,b=g-y*h,x=k;break;case"left":g=v=n.coordinate,m=a+ +!d*s,p=m-y*j,x=p-y*h,b=k;break;case"right":g=v=n.coordinate,m=a+ +d*s,p=m+y*j,x=p+y*h,b=k;break;default:p=m=n.coordinate,v=o+ +d*c,g=v+y*j,b=g+y*h,x=k;break}return{line:{x1:p,y1:g,x2:m,y2:v},tick:{x,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,d=Jt(Jt(Jt({},qe(this.props,!1)),qe(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=Jt(Jt({},d),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var p=+(c==="left"&&!u||c==="right"&&u);d=Jt(Jt({},d),{},{x1:i+p*o,y1:a,x2:i+p*o,y2:a+s})}return $.createElement("line",ac({},d,{className:Ge("recharts-cartesian-axis-line",zn(f,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,c=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,h=s.unit,p=FN(Jt(Jt({},this.props),{},{ticks:n}),i,a),m=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),v=qe(this.props,!1),x=qe(f,!1),b=Jt(Jt({},v),{},{fill:"none"},qe(c,!1)),y=p.map(function(j,k){var _=o.getTickLineCoord(j),S=_.line,E=_.tick,C=Jt(Jt(Jt(Jt({textAnchor:m,verticalAnchor:g},v),{},{stroke:"none",fill:u},x),E),{},{index:k,payload:j,visibleTicksCount:p.length,tickFormatter:d});return $.createElement(Ut,ac({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},ly(o.props,j,k)),c&&$.createElement("line",ac({},b,S,{className:Ge("recharts-cartesian-axis-tick-line",zn(c,"className"))})),f&&t.renderTickItem(f,C,"".concat(Le(d)?d(j.value,k):j.value).concat(h||"")))});return $.createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,c=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,h=d.ticks,p=K0(d,TPe),m=h;return Le(c)&&(m=h&&h.length>0?c(this.props):c(p)),o<=0||s<=0||!m||!m.length?null:$.createElement(Ut,{className:Ge("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Cr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=Ge(i.className,"recharts-cartesian-axis-tick-value");return $.isValidElement(n)?o=$.cloneElement(n,Jt(Jt({},i),{},{className:s})):Le(n)?o=n(Jt(Jt({},i),{},{className:s})):o=$.createElement(ky,ac({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(w.Component);KN(Ju,"displayName","CartesianAxis");KN(Ju,"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 LPe=["x1","y1","x2","y2","key"],zPe=["offset"];function il(e){"@babel/helpers - typeof";return il=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},il(e)}function rM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rM(Object(r),!0).forEach(function(n){BPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BPe(e,t,r){return t=UPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UPe(e){var t=FPe(e,"string");return il(t)=="symbol"?t:t+""}function FPe(e,t){if(il(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(il(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ns(){return Ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ns.apply(this,arguments)}function nM(e,t){if(e==null)return{};var r=KPe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KPe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var HPe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,c=t.ry;return $.createElement("rect",{x:i,y:a,ry:c,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function s8(e,t){var r;if($.isValidElement(e))r=$.cloneElement(e,t);else if(Le(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=nM(t,LPe),u=qe(c,!1);u.offset;var f=nM(u,zPe);r=$.createElement("line",Ns({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function VPe(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,c){var u=Tr(Tr({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(c),index:c});return s8(i,u)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function WPe(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,c){var u=Tr(Tr({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(c),index:c});return s8(i,u)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function qPe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var m=!f[p+1],g=m?i+o-h:f[p+1]-h;if(g<=0)return null;var v=p%t.length;return $.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:g,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function GPe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var m=!f[p+1],g=m?a+s-h:f[p+1]-h;if(g<=0)return null;var v=p%n.length;return $.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:g,height:c,stroke:"none",fill:n[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var YPe=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return y6(FN(Tr(Tr(Tr({},Ju.defaultProps),n),{},{ticks:xa(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},XPe=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return y6(FN(Tr(Tr(Tr({},Ju.defaultProps),n),{},{ticks:xa(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Al={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function l8(e){var t,r,n,i,a,o,s=LN(),c=zN(),u=IAe(),f=Tr(Tr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Al.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Al.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Al.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Al.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Al.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Al.verticalFill,x:se(e.x)?e.x:u.left,y:se(e.y)?e.y:u.top,width:se(e.width)?e.width:u.width,height:se(e.height)?e.height:u.height}),d=f.x,h=f.y,p=f.width,m=f.height,g=f.syncWithTicks,v=f.horizontalValues,x=f.verticalValues,b=$Ae(),y=MAe();if(!se(p)||p<=0||!se(m)||m<=0||!se(d)||d!==+d||!se(h)||h!==+h)return null;var j=f.verticalCoordinatesGenerator||YPe,k=f.horizontalCoordinatesGenerator||XPe,_=f.horizontalPoints,S=f.verticalPoints;if((!_||!_.length)&&Le(k)){var E=v&&v.length,C=k({yAxis:y?Tr(Tr({},y),{},{ticks:E?v:y.ticks}):void 0,width:s,height:c,offset:u},E?!0:g);ka(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(il(C),"]")),Array.isArray(C)&&(_=C)}if((!S||!S.length)&&Le(j)){var R=x&&x.length,M=j({xAxis:b?Tr(Tr({},b),{},{ticks:R?x:b.ticks}):void 0,width:s,height:c,offset:u},R?!0:g);ka(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(il(M),"]")),Array.isArray(M)&&(S=M)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement(HPe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),$.createElement(VPe,Ns({},f,{offset:u,horizontalPoints:_,xAxis:b,yAxis:y})),$.createElement(WPe,Ns({},f,{offset:u,verticalPoints:S,xAxis:b,yAxis:y})),$.createElement(qPe,Ns({},f,{horizontalPoints:_})),$.createElement(GPe,Ns({},f,{verticalPoints:S})))}l8.displayName="CartesianGrid";var JPe=["type","layout","connectNulls","ref"],QPe=["key"];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 iM(e,t){if(e==null)return{};var r=ZPe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZPe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ff(){return ff=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ff.apply(this,arguments)}function aM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function on(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aM(Object(r),!0).forEach(function(n){oi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pl(e){return nOe(e)||rOe(e)||tOe(e)||eOe()}function eOe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tOe(e,t){if(e){if(typeof e=="string")return O_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O_(e,t)}}function rOe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nOe(e){if(Array.isArray(e))return O_(e)}function O_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u8(n.key),n)}}function aOe(e,t,r){return t&&oM(e.prototype,t),r&&oM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oOe(e,t,r){return t=tv(t),sOe(e,c8()?Reflect.construct(t,r||[],tv(e).constructor):t.apply(e,r))}function sOe(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 lOe(e)}function lOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c8=function(){return!!e})()}function tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tv(e)}function cOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},R_(e,t)}function oi(e,t,r){return t=u8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u8(e){var t=uOe(e,"string");return vu(t)=="symbol"?t:t+""}function uOe(e,t){if(vu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xu=function(e){function t(){var r;iOe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=oOe(this,t,[].concat(i)),oi(r,"state",{isAnimationFinished:!0,totalLength:0}),oi(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),oi(r,"getStrokeDasharray",function(o,s,c){var u=c.reduce(function(x,b){return x+b});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/u),d=o%u,h=s-o,p=[],m=0,g=0;m<c.length;g+=c[m],++m)if(g+c[m]>d){p=[].concat(Pl(c.slice(0,m)),[d-g]);break}var v=p.length%2===0?[0,h]:[h];return[].concat(Pl(t.repeat(c,f)),Pl(p),v).map(function(x){return"".concat(x,"px")}).join(", ")}),oi(r,"id",up("recharts-line-")),oi(r,"pathRef",function(o){r.mainCurve=o}),oi(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),oi(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return cOe(t,e),aOe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch(i){return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=Bn(f,gp);if(!d)return null;var h=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:vn(g.payload,v)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return $.createElement(Ut,p,d.map(function(m){return $.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,c=s.dot,u=s.points,f=s.dataKey,d=qe(this.props,!1),h=qe(c,!0),p=u.map(function(g,v){var x=on(on(on({key:"dot-".concat(v),r:3},d),h),{},{index:v,cx:g.x,cy:g.y,value:g.value,dataKey:f,payload:g.payload,points:u});return t.renderDotItem(c,x)}),m={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return $.createElement(Ut,ff({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,c=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=iM(s,JPe),h=on(on(on({},qe(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:c,layout:u,connectNulls:f});return $.createElement(u_,ff({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,c=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,h=o.animationEasing,p=o.animationId,m=o.animateNewValues,g=o.width,v=o.height,x=this.state,b=x.prevPoints,y=x.totalLength;return $.createElement(Ma,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var k=j.t;if(b){var _=b.length/s.length,S=s.map(function(L,H){var U=Math.floor(H*_);if(b[U]){var F=b[U],O=li(F.x,L.x),P=li(F.y,L.y);return on(on({},L),{},{x:O(k),y:P(k)})}if(m){var A=li(g*2,L.x),D=li(v/2,L.y);return on(on({},L),{},{x:A(k),y:D(k)})}return on(on({},L),{},{x:L.x,y:L.y})});return a.renderCurveStatically(S,n,i)}var E=li(0,y),C=E(k),R;if(c){var M="".concat(c).split(/[,\s]+/gim).map(function(L){return parseFloat(L)});R=a.getStrokeDasharray(C,y,M)}else R=a.generateSimpleStrokeDasharray(y,C);return a.renderCurveStatically(s,n,i,{strokeDasharray:R})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return s&&o&&o.length&&(!u&&f>0||!Ix(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,u=i.xAxis,f=i.yAxis,d=i.top,h=i.left,p=i.width,m=i.height,g=i.isAnimationActive,v=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,b=s.length===1,y=Ge("recharts-line",c),j=u&&u.allowDataOverflow,k=f&&f.allowDataOverflow,_=j||k,S=Ue(v)?this.id:v,E=(n=qe(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=E.r,R=C===void 0?3:C,M=E.strokeWidth,L=M===void 0?2:M,H=_de(o)?o:{},U=H.clipDot,F=U===void 0?!0:U,O=R*2+L;return $.createElement(Ut,{className:y},j||k?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(S)},$.createElement("rect",{x:j?h:h-p/2,y:k?d:d-m/2,width:j?p:p*2,height:k?m:m*2})),!F&&$.createElement("clipPath",{id:"clipPath-dots-".concat(S)},$.createElement("rect",{x:h-O/2,y:d-O/2,width:p+O,height:m+O}))):null,!b&&this.renderCurve(_,S),this.renderErrorBar(_,S),(b||o)&&this.renderDots(_,F,S),(!g||x)&&Bo.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Pl(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Pl(o),Pl(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if($.isValidElement(n))a=$.cloneElement(n,i);else if(Le(n))a=n(i);else{var o=i.key,s=iM(i,QPe),c=Ge("recharts-line-dot",typeof n!="boolean"?n.className:"");a=$.createElement($N,ff({key:o},s,{className:c}))}return a}}])}(w.PureComponent);oi(xu,"displayName","Line");oi(xu,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!_a.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});oi(xu,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,p){var m=vn(h,o);return f==="horizontal"?{x:BR({axis:r,ticks:i,bandSize:s,entry:h,index:p}),y:Ue(m)?null:n.scale(m),value:m,payload:h}:{x:Ue(m)?null:r.scale(m),y:BR({axis:n,ticks:a,bandSize:s,entry:h,index:p}),value:m,payload:h}});return on({points:d,layout:f},u)});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 dOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h8(n.key),n)}}function hOe(e,t,r){return t&&fOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pOe(e,t,r){return t=rv(t),mOe(e,d8()?Reflect.construct(t,r||[],rv(e).constructor):t.apply(e,r))}function mOe(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 gOe(e)}function gOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d8=function(){return!!e})()}function rv(e){return rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rv(e)}function yOe(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&&$_(e,t)}function $_(e,t){return $_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$_(e,t)}function f8(e,t,r){return t=h8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h8(e){var t=vOe(e,"string");return bu(t)=="symbol"?t:t+""}function vOe(e,t){if(bu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M_.apply(this,arguments)}function xOe(e){var t=e.xAxisId,r=LN(),n=zN(),i=X6(t);return i==null?null:w.createElement(Ju,M_({},i,{className:Ge("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return xa(o,!0)}}))}var qx=function(e){function t(){return dOe(this,t),pOe(this,t,arguments)}return yOe(t,e),hOe(t,[{key:"render",value:function(){return w.createElement(xOe,this.props)}}])}(w.Component);f8(qx,"displayName","XAxis");f8(qx,"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 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)}function bOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g8(n.key),n)}}function kOe(e,t,r){return t&&wOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Oe(e,t,r){return t=nv(t),jOe(e,p8()?Reflect.construct(t,r||[],nv(e).constructor):t.apply(e,r))}function jOe(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 SOe(e)}function SOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p8=function(){return!!e})()}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nv(e)}function EOe(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&&D_(e,t)}function D_(e,t){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},D_(e,t)}function m8(e,t,r){return t=g8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g8(e){var t=NOe(e,"string");return wu(t)=="symbol"?t:t+""}function NOe(e,t){if(wu(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I_.apply(this,arguments)}var COe=function(t){var r=t.yAxisId,n=LN(),i=zN(),a=J6(r);return a==null?null:w.createElement(Ju,I_({},a,{className:Ge("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return xa(s,!0)}}))},Gx=function(e){function t(){return bOe(this,t),_Oe(this,t,arguments)}return EOe(t,e),kOe(t,[{key:"render",value:function(){return w.createElement(COe,this.props)}}])}(w.Component);m8(Gx,"displayName","YAxis");m8(Gx,"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 sM(e){return OOe(e)||POe(e)||AOe(e)||TOe()}function TOe(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function AOe(e,t){if(e){if(typeof e=="string")return L_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L_(e,t)}}function POe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OOe(e){if(Array.isArray(e))return L_(e)}function L_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var z_=function(t,r,n,i,a){var o=Bn(t,UN),s=Bn(t,Hx),c=[].concat(sM(o),sM(s)),u=Bn(t,Wx),f="".concat(i,"Id"),d=i[0],h=r;if(c.length&&(h=c.reduce(function(g,v){if(v.props[f]===n&&Gi(v.props,"extendDomain")&&se(v.props[d])){var x=v.props[d];return[Math.min(g[0],x),Math.max(g[1],x)]}return g},h)),u.length){var p="".concat(d,"1"),m="".concat(d,"2");h=u.reduce(function(g,v){if(v.props[f]===n&&Gi(v.props,"extendDomain")&&se(v.props[p])&&se(v.props[m])){var x=v.props[p],b=v.props[m];return[Math.min(g[0],x,b),Math.max(g[1],x,b)]}return g},h)}return a&&a.length&&(h=a.reduce(function(g,v){return se(v)?[Math.min(g[0],v),Math.max(g[1],v)]:g},h)),h},y8={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new i(f,d||c,h),m=r?r+u:u;return c._events[m]?c._events[m].fn?c._events[m]=[c._events[m],p]:c._events[m].push(p):(c._events[m]=p,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=r?r+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,m=new Array(p);h<p;h++)m[h]=d[h].fn;return m},s.prototype.listenerCount=function(u){var f=r?r+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,h,p,m){var g=r?r+u:u;if(!this._events[g])return!1;var v=this._events[g],x=arguments.length,b,y;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),x){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,f),!0;case 3:return v.fn.call(v.context,f,d),!0;case 4:return v.fn.call(v.context,f,d,h),!0;case 5:return v.fn.call(v.context,f,d,h,p),!0;case 6:return v.fn.call(v.context,f,d,h,p,m),!0}for(y=1,b=new Array(x-1);y<x;y++)b[y-1]=arguments[y];v.fn.apply(v.context,b)}else{var j=v.length,k;for(y=0;y<j;y++)switch(v[y].once&&this.removeListener(u,v[y].fn,void 0,!0),x){case 1:v[y].fn.call(v[y].context);break;case 2:v[y].fn.call(v[y].context,f);break;case 3:v[y].fn.call(v[y].context,f,d);break;case 4:v[y].fn.call(v[y].context,f,d,h);break;default:if(!b)for(k=1,b=new Array(x-1);k<x;k++)b[k-1]=arguments[k];v[y].fn.apply(v[y].context,b)}}return!0},s.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,h){var p=r?r+u:u;if(!this._events[p])return this;if(!f)return o(this,p),this;var m=this._events[p];if(m.fn)m.fn===f&&(!h||m.once)&&(!d||m.context===d)&&o(this,p);else{for(var g=0,v=[],x=m.length;g<x;g++)(m[g].fn!==f||h&&!m[g].once||d&&m[g].context!==d)&&v.push(m[g]);v.length?this._events[p]=v.length===1?v[0]:v:o(this,p)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(y8);var ROe=y8.exports;const $Oe=Qe(ROe);var H0=new $Oe,V0="recharts.syncMouseEvents";function Ph(e){"@babel/helpers - typeof";return Ph=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},Ph(e)}function MOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v8(n.key),n)}}function IOe(e,t,r){return t&&DOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function W0(e,t,r){return t=v8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v8(e){var t=LOe(e,"string");return Ph(t)=="symbol"?t:t+""}function LOe(e,t){if(Ph(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ph(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zOe=function(){function e(){MOe(this,e),W0(this,"activeIndex",0),W0(this,"coordinateList",[]),W0(this,"layout","horizontal")}return IOe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,c=r.layout,u=c===void 0?null:c,f=r.offset,d=f===void 0?null:f,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=a!=null?a:this.coordinateList)!==null&&n!==void 0?n:[],this.container=s!=null?s:this.container,this.layout=u!=null?u:this.layout,this.offset=d!=null?d:this.offset,this.mouseHandlerCallback=p!=null?p:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=a+c+u,h=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function BOe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&se(n)&&se(i))return!0}return!1}function UOe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function x8(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=br(t,r,n,i),s=br(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function FOe(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=br(s,c,u,d),p=br(s,c,f,d);n=h.x,i=h.y,a=p.x,o=p.y}else return x8(t);return[{x:n,y:i},{x:a,y:o}]}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 lM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lM(Object(r),!0).forEach(function(n){KOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KOe(e,t,r){return t=HOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HOe(e){var t=VOe(e,"string");return Oh(t)=="symbol"?t:t+""}function VOe(e,t){if(Oh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WOe(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var m,g=u_;if(h==="ScatterChart")m=o,g=VNe;else if(h==="BarChart")m=UOe(d,o,c,f),g=RN;else if(d==="radial"){var v=x8(o),x=v.cx,b=v.cy,y=v.radius,j=v.startAngle,k=v.endAngle;m={cx:x,cy:b,startAngle:j,endAngle:k,innerRadius:y,outerRadius:y},g=k6}else m={points:FOe(d,o,c)},g=u_;var _=Em(Em(Em(Em({stroke:"#ccc",pointerEvents:"none"},c),m),qe(p,!1)),{},{payload:s,payloadIndex:u,className:Ge("recharts-tooltip-cursor",p.className)});return w.isValidElement(p)?w.cloneElement(p,_):w.createElement(g,_)}var qOe=["item"],GOe=["children","className","width","height","style","compact","title","desc"];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 oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oc.apply(this,arguments)}function cM(e,t){return JOe(e)||XOe(e,t)||w8(e,t)||YOe()}function YOe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function XOe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function JOe(e){if(Array.isArray(e))return e}function uM(e,t){if(e==null)return{};var r=QOe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ZOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e2e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k8(n.key),n)}}function t2e(e,t,r){return t&&e2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r2e(e,t,r){return t=iv(t),n2e(e,b8()?Reflect.construct(t,r||[],iv(e).constructor):t.apply(e,r))}function n2e(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 i2e(e)}function i2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b8=function(){return!!e})()}function iv(e){return iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},iv(e)}function a2e(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&&B_(e,t)}function B_(e,t){return B_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},B_(e,t)}function _u(e){return l2e(e)||s2e(e)||w8(e)||o2e()}function o2e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w8(e,t){if(e){if(typeof e=="string")return U_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U_(e,t)}}function s2e(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l2e(e){if(Array.isArray(e))return U_(e)}function U_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dM(Object(r),!0).forEach(function(n){Ne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(e,t,r){return t=k8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k8(e){var t=c2e(e,"string");return ku(t)=="symbol"?t:t+""}function c2e(e,t){if(ku(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ku(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u2e={xAxis:["bottom","top"],yAxis:["left","right"]},d2e={width:"100%",height:"100%"},_8={x:0,y:0};function Nm(e){return e}var f2e=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},h2e=function(t,r,n,i){var a=r.find(function(f){return f&&f.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return X(X(X({},i),br(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var c=a.coordinate,u=i.angle;return X(X(X({},i),br(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return _8},Yx=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n!=null?n:[]).reduce(function(s,c){var u=c.props.data;return u&&u.length?[].concat(_u(s),_u(u)):s},[]);return o.length>0?o:t&&t.length&&se(i)&&se(a)?t.slice(i,a+1):[]};function j8(e){return e==="number"?[0,"auto"]:void 0}var F_=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Yx(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=d===void 0?s:d;h=oy(p,o.dataKey,i)}else h=d&&d[n]||s[n];return h?[].concat(_u(c),[x6(u,h)]):c},[])},fM=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=f2e(a,n),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=Nje(o,s,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=F_(t,r,f,d),p=h2e(n,s,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},p2e=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,p=g6(f,a);return n.reduce(function(m,g){var v,x=g.type.defaultProps!==void 0?X(X({},g.type.defaultProps),g.props):g.props,b=x.type,y=x.dataKey,j=x.allowDataOverflow,k=x.allowDuplicatedCategory,_=x.scale,S=x.ticks,E=x.includeHidden,C=x[o];if(m[C])return m;var R=Yx(t.data,{graphicalItems:i.filter(function(K){var Y,G=o in K.props?K.props[o]:(Y=K.type.defaultProps)===null||Y===void 0?void 0:Y[o];return G===C}),dataStartIndex:c,dataEndIndex:u}),M=R.length,L,H,U;BOe(x.domain,j,b)&&(L=a_(x.domain,null,j),p&&(b==="number"||_!=="auto")&&(U=uf(R,y,"category")));var F=j8(b);if(!L||L.length===0){var O,P=(O=x.domain)!==null&&O!==void 0?O:F;if(y){if(L=uf(R,y,b),b==="category"&&p){var A=hde(L);k&&A?(H=L,L=Vy(0,M)):k||(L=HR(P,L,g).reduce(function(K,Y){return K.indexOf(Y)>=0?K:[].concat(_u(K),[Y])},[]))}else if(b==="category")k?L=L.filter(function(K){return K!==""&&!Ue(K)}):L=HR(P,L,g).reduce(function(K,Y){return K.indexOf(Y)>=0||Y===""||Ue(Y)?K:[].concat(_u(K),[Y])},[]);else if(b==="number"){var D=Oje(R,i.filter(function(K){var Y,G,re=o in K.props?K.props[o]:(Y=K.type.defaultProps)===null||Y===void 0?void 0:Y[o],le="hide"in K.props?K.props.hide:(G=K.type.defaultProps)===null||G===void 0?void 0:G.hide;return re===C&&(E||!le)}),y,a,f);D&&(L=D)}p&&(b==="number"||_!=="auto")&&(U=uf(R,y,"category"))}else p?L=Vy(0,M):s&&s[C]&&s[C].hasStack&&b==="number"?L=h==="expand"?[0,1]:v6(s[C].stackGroups,c,u):L=m6(R,i.filter(function(K){var Y=o in K.props?K.props[o]:K.type.defaultProps[o],G="hide"in K.props?K.props.hide:K.type.defaultProps.hide;return Y===C&&(E||!G)}),b,f,!0);if(b==="number")L=z_(d,L,C,a,S),P&&(L=a_(P,L,j));else if(b==="category"&&P){var B=P,z=L.every(function(K){return B.indexOf(K)>=0});z&&(L=B)}}return X(X({},m),{},Ne({},C,X(X({},x),{},{axisType:a,domain:L,categoricalDomain:U,duplicateDomain:H,originalDomain:(v=x.domain)!==null&&v!==void 0?v:F,isCategorical:p,layout:f})))},{})},m2e=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,h=Yx(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,m=g6(f,a),g=-1;return n.reduce(function(v,x){var b=x.type.defaultProps!==void 0?X(X({},x.type.defaultProps),x.props):x.props,y=b[o],j=j8("number");if(!v[y]){g++;var k;return m?k=Vy(0,p):s&&s[y]&&s[y].hasStack?(k=v6(s[y].stackGroups,c,u),k=z_(d,k,y,a)):(k=a_(j,m6(h,n.filter(function(_){var S,E,C=o in _.props?_.props[o]:(S=_.type.defaultProps)===null||S===void 0?void 0:S[o],R="hide"in _.props?_.props.hide:(E=_.type.defaultProps)===null||E===void 0?void 0:E.hide;return C===y&&!R}),"number",f),i.defaultProps.allowDataOverflow),k=z_(d,k,y,a)),X(X({},v),{},Ne({},y,X(X({axisType:a},i.defaultProps),{},{hide:!0,orientation:zn(u2e,"".concat(a,".").concat(g%2),null),domain:k,originalDomain:j,isCategorical:m,layout:f})))}return v},{})},g2e=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=Bn(f,a),p={};return h&&h.length?p=p2e(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=m2e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),p},y2e=function(t){var r=ho(t),n=xa(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:oN(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Dy(r,n)}},hM=function(t){var r=t.children,n=t.defaultShowTooltip,i=cn(r,fu),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},v2e=function(t){return!t||!t.length?!1:t.some(function(r){var n=wa(r&&r.type);return n&&n.indexOf("Bar")>=0})},pM=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"}},x2e=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,c=s===void 0?{}:s,u=n.width,f=n.height,d=n.children,h=n.margin||{},p=cn(d,fu),m=cn(d,_c),g=Object.keys(c).reduce(function(k,_){var S=c[_],E=S.orientation;return!S.mirror&&!S.hide?X(X({},k),{},Ne({},E,k[E]+S.width)):k},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(k,_){var S=o[_],E=S.orientation;return!S.mirror&&!S.hide?X(X({},k),{},Ne({},E,zn(k,"".concat(E))+S.height)):k},{top:h.top||0,bottom:h.bottom||0}),x=X(X({},v),g),b=x.bottom;p&&(x.bottom+=p.props.height||fu.defaultProps.height),m&&r&&(x=Aje(x,i,n,r));var y=u-x.left-x.right,j=f-x.top-x.bottom;return X(X({brushBottom:b},x),{},{width:Math.max(y,0),height:Math.max(j,0)})},b2e=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},w2e=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(x,b){var y=b.graphicalItems,j=b.stackGroups,k=b.offset,_=b.updateId,S=b.dataStartIndex,E=b.dataEndIndex,C=x.barSize,R=x.layout,M=x.barGap,L=x.barCategoryGap,H=x.maxBarSize,U=pM(R),F=U.numericAxisName,O=U.cateAxisName,P=v2e(y),A=[];return y.forEach(function(D,B){var z=Yx(x.data,{graphicalItems:[D],dataStartIndex:S,dataEndIndex:E}),K=D.type.defaultProps!==void 0?X(X({},D.type.defaultProps),D.props):D.props,Y=K.dataKey,G=K.maxBarSize,re=K["".concat(F,"Id")],le=K["".concat(O,"Id")],me={},Ke=c.reduce(function(ae,he){var ue=b["".concat(he.axisType,"Map")],Ae=K["".concat(he.axisType,"Id")];ue&&ue[Ae]||he.axisType==="zAxis"||nl();var Ce=ue[Ae];return X(X({},ae),{},Ne(Ne({},he.axisType,Ce),"".concat(he.axisType,"Ticks"),xa(Ce)))},me),te=Ke[O],ie=Ke["".concat(O,"Ticks")],we=j&&j[re]&&j[re].hasStack&&Hje(D,j[re].stackGroups),J=wa(D.type).indexOf("Bar")>=0,Pe=Dy(te,ie),je=[],De=P&&Cje({barSize:C,stackGroups:j,totalSize:b2e(Ke,O)});if(J){var Re,q,oe=Ue(G)?H:G,ke=(Re=(q=Dy(te,ie,!0))!==null&&q!==void 0?q:oe)!==null&&Re!==void 0?Re:0;je=Tje({barGap:M,barCategoryGap:L,bandSize:ke!==Pe?ke:Pe,sizeList:De[le],maxBarSize:oe}),ke!==Pe&&(je=je.map(function(ae){return X(X({},ae),{},{position:X(X({},ae.position),{},{offset:ae.position.offset-ke/2})})}))}var Ie=D&&D.type&&D.type.getComposedData;Ie&&A.push({props:X(X({},Ie(X(X({},Ke),{},{displayedData:z,props:x,dataKey:Y,item:D,bandSize:Pe,barPosition:je,offset:k,stackedData:we,layout:R,dataStartIndex:S,dataEndIndex:E}))),{},Ne(Ne(Ne({key:D.key||"item-".concat(B)},F,Ke[F]),O,Ke[O]),"animationId",_)),childIndex:Ede(D,x.children),item:D})}),A},p=function(x,b){var y=x.props,j=x.dataStartIndex,k=x.dataEndIndex,_=x.updateId;if(!IO({props:y}))return null;var S=y.children,E=y.layout,C=y.stackOffset,R=y.data,M=y.reverseStackOrder,L=pM(E),H=L.numericAxisName,U=L.cateAxisName,F=Bn(S,n),O=Uje(R,F,"".concat(H,"Id"),"".concat(U,"Id"),C,M),P=c.reduce(function(K,Y){var G="".concat(Y.axisType,"Map");return X(X({},K),{},Ne({},G,g2e(y,X(X({},Y),{},{graphicalItems:F,stackGroups:Y.axisType===H&&O,dataStartIndex:j,dataEndIndex:k}))))},{}),A=x2e(X(X({},P),{},{props:y,graphicalItems:F}),b==null?void 0:b.legendBBox);Object.keys(P).forEach(function(K){P[K]=f(y,P[K],A,K.replace("Map",""),r)});var D=P["".concat(U,"Map")],B=y2e(D),z=h(y,X(X({},P),{},{dataStartIndex:j,dataEndIndex:k,updateId:_,graphicalItems:F,stackGroups:O,offset:A}));return X(X({formattedGraphicalItems:z,graphicalItems:F,offset:A,stackGroups:O},B),P)},m=function(v){function x(b){var y,j,k;return ZOe(this,x),k=r2e(this,x,[b]),Ne(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(k,"accessibilityManager",new zOe),Ne(k,"handleLegendBBoxUpdate",function(_){if(_){var S=k.state,E=S.dataStartIndex,C=S.dataEndIndex,R=S.updateId;k.setState(X({legendBBox:_},p({props:k.props,dataStartIndex:E,dataEndIndex:C,updateId:R},X(X({},k.state),{},{legendBBox:_}))))}}),Ne(k,"handleReceiveSyncEvent",function(_,S,E){if(k.props.syncId===_){if(E===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(S)}}),Ne(k,"handleBrushChange",function(_){var S=_.startIndex,E=_.endIndex;if(S!==k.state.dataStartIndex||E!==k.state.dataEndIndex){var C=k.state.updateId;k.setState(function(){return X({dataStartIndex:S,dataEndIndex:E},p({props:k.props,dataStartIndex:S,dataEndIndex:E,updateId:C},k.state))}),k.triggerSyncEvent({dataStartIndex:S,dataEndIndex:E})}}),Ne(k,"handleMouseEnter",function(_){var S=k.getMouseInfo(_);if(S){var E=X(X({},S),{},{isTooltipActive:!0});k.setState(E),k.triggerSyncEvent(E);var C=k.props.onMouseEnter;Le(C)&&C(E,_)}}),Ne(k,"triggeredAfterMouseMove",function(_){var S=k.getMouseInfo(_),E=S?X(X({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState(E),k.triggerSyncEvent(E);var C=k.props.onMouseMove;Le(C)&&C(E,_)}),Ne(k,"handleItemMouseEnter",function(_){k.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),Ne(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),Ne(k,"handleMouseMove",function(_){_.persist(),k.throttleTriggeredAfterMouseMove(_)}),Ne(k,"handleMouseLeave",function(_){k.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};k.setState(S),k.triggerSyncEvent(S);var E=k.props.onMouseLeave;Le(E)&&E(S,_)}),Ne(k,"handleOuterEvent",function(_){var S=Sde(_),E=zn(k.props,"".concat(S));if(S&&Le(E)){var C,R;/.*touch.*/i.test(S)?R=k.getMouseInfo(_.changedTouches[0]):R=k.getMouseInfo(_),E((C=R)!==null&&C!==void 0?C:{},_)}}),Ne(k,"handleClick",function(_){var S=k.getMouseInfo(_);if(S){var E=X(X({},S),{},{isTooltipActive:!0});k.setState(E),k.triggerSyncEvent(E);var C=k.props.onClick;Le(C)&&C(E,_)}}),Ne(k,"handleMouseDown",function(_){var S=k.props.onMouseDown;if(Le(S)){var E=k.getMouseInfo(_);S(E,_)}}),Ne(k,"handleMouseUp",function(_){var S=k.props.onMouseUp;if(Le(S)){var E=k.getMouseInfo(_);S(E,_)}}),Ne(k,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),Ne(k,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&k.handleMouseDown(_.changedTouches[0])}),Ne(k,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&k.handleMouseUp(_.changedTouches[0])}),Ne(k,"handleDoubleClick",function(_){var S=k.props.onDoubleClick;if(Le(S)){var E=k.getMouseInfo(_);S(E,_)}}),Ne(k,"handleContextMenu",function(_){var S=k.props.onContextMenu;if(Le(S)){var E=k.getMouseInfo(_);S(E,_)}}),Ne(k,"triggerSyncEvent",function(_){k.props.syncId!==void 0&&H0.emit(V0,k.props.syncId,_,k.eventEmitterSymbol)}),Ne(k,"applySyncEvent",function(_){var S=k.props,E=S.layout,C=S.syncMethod,R=k.state.updateId,M=_.dataStartIndex,L=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)k.setState(X({dataStartIndex:M,dataEndIndex:L},p({props:k.props,dataStartIndex:M,dataEndIndex:L,updateId:R},k.state)));else if(_.activeTooltipIndex!==void 0){var H=_.chartX,U=_.chartY,F=_.activeTooltipIndex,O=k.state,P=O.offset,A=O.tooltipTicks;if(!P)return;if(typeof C=="function")F=C(A,_);else if(C==="value"){F=-1;for(var D=0;D<A.length;D++)if(A[D].value===_.activeLabel){F=D;break}}var B=X(X({},P),{},{x:P.left,y:P.top}),z=Math.min(H,B.x+B.width),K=Math.min(U,B.y+B.height),Y=A[F]&&A[F].value,G=F_(k.state,k.props.data,F),re=A[F]?{x:E==="horizontal"?A[F].coordinate:z,y:E==="horizontal"?K:A[F].coordinate}:_8;k.setState(X(X({},_),{},{activeLabel:Y,activeCoordinate:re,activePayload:G,activeTooltipIndex:F}))}else k.setState(_)}),Ne(k,"renderCursor",function(_){var S,E=k.state,C=E.isTooltipActive,R=E.activeCoordinate,M=E.activePayload,L=E.offset,H=E.activeTooltipIndex,U=E.tooltipAxisBandSize,F=k.getTooltipEventType(),O=(S=_.props.active)!==null&&S!==void 0?S:C,P=k.props.layout,A=_.key||"_recharts-cursor";return $.createElement(WOe,{key:A,activeCoordinate:R,activePayload:M,activeTooltipIndex:H,chartName:r,element:_,isActive:O,layout:P,offset:L,tooltipAxisBandSize:U,tooltipEventType:F})}),Ne(k,"renderPolarAxis",function(_,S,E){var C=zn(_,"type.axisType"),R=zn(k.state,"".concat(C,"Map")),M=_.type.defaultProps,L=M!==void 0?X(X({},M),_.props):_.props,H=R&&R[L["".concat(C,"Id")]];return w.cloneElement(_,X(X({},H),{},{className:Ge(C,H.className),key:_.key||"".concat(S,"-").concat(E),ticks:xa(H,!0)}))}),Ne(k,"renderPolarGrid",function(_){var S=_.props,E=S.radialLines,C=S.polarAngles,R=S.polarRadius,M=k.state,L=M.radiusAxisMap,H=M.angleAxisMap,U=ho(L),F=ho(H),O=F.cx,P=F.cy,A=F.innerRadius,D=F.outerRadius;return w.cloneElement(_,{polarAngles:Array.isArray(C)?C:xa(F,!0).map(function(B){return B.coordinate}),polarRadius:Array.isArray(R)?R:xa(U,!0).map(function(B){return B.coordinate}),cx:O,cy:P,innerRadius:A,outerRadius:D,key:_.key||"polar-grid",radialLines:E})}),Ne(k,"renderLegend",function(){var _=k.state.formattedGraphicalItems,S=k.props,E=S.children,C=S.width,R=S.height,M=k.props.margin||{},L=C-(M.left||0)-(M.right||0),H=h6({children:E,formattedGraphicalItems:_,legendWidth:L,legendContent:u});if(!H)return null;var U=H.item,F=uM(H,qOe);return w.cloneElement(U,X(X({},F),{},{chartWidth:C,chartHeight:R,margin:M,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),Ne(k,"renderTooltip",function(){var _,S=k.props,E=S.children,C=S.accessibilityLayer,R=cn(E,Ai);if(!R)return null;var M=k.state,L=M.isTooltipActive,H=M.activeCoordinate,U=M.activePayload,F=M.activeLabel,O=M.offset,P=(_=R.props.active)!==null&&_!==void 0?_:L;return w.cloneElement(R,{viewBox:X(X({},O),{},{x:O.left,y:O.top}),active:P,label:F,payload:P?U:[],coordinate:H,accessibilityLayer:C})}),Ne(k,"renderBrush",function(_){var S=k.props,E=S.margin,C=S.data,R=k.state,M=R.offset,L=R.dataStartIndex,H=R.dataEndIndex,U=R.updateId;return w.cloneElement(_,{key:_.key||"_recharts-brush",onChange:km(k.handleBrushChange,_.props.onChange),data:C,x:se(_.props.x)?_.props.x:M.left,y:se(_.props.y)?_.props.y:M.top+M.height+M.brushBottom-(E.bottom||0),width:se(_.props.width)?_.props.width:M.width,startIndex:L,endIndex:H,updateId:"brush-".concat(U)})}),Ne(k,"renderReferenceElement",function(_,S,E){if(!_)return null;var C=k,R=C.clipPathId,M=k.state,L=M.xAxisMap,H=M.yAxisMap,U=M.offset,F=_.type.defaultProps||{},O=_.props,P=O.xAxisId,A=P===void 0?F.xAxisId:P,D=O.yAxisId,B=D===void 0?F.yAxisId:D;return w.cloneElement(_,{key:_.key||"".concat(S,"-").concat(E),xAxis:L[A],yAxis:H[B],viewBox:{x:U.left,y:U.top,width:U.width,height:U.height},clipPathId:R})}),Ne(k,"renderActivePoints",function(_){var S=_.item,E=_.activePoint,C=_.basePoint,R=_.childIndex,M=_.isRange,L=[],H=S.props.key,U=S.item.type.defaultProps!==void 0?X(X({},S.item.type.defaultProps),S.item.props):S.item.props,F=U.activeDot,O=U.dataKey,P=X(X({index:R,dataKey:O,cx:E.x,cy:E.y,r:4,fill:ON(S.item),strokeWidth:2,stroke:"#fff",payload:E.payload,value:E.value},qe(F,!1)),sy(F));return L.push(x.renderActiveDot(F,P,"".concat(H,"-activePoint-").concat(R))),C?L.push(x.renderActiveDot(F,X(X({},P),{},{cx:C.x,cy:C.y}),"".concat(H,"-basePoint-").concat(R))):M&&L.push(null),L}),Ne(k,"renderGraphicChild",function(_,S,E){var C=k.filterFormatItem(_,S,E);if(!C)return null;var R=k.getTooltipEventType(),M=k.state,L=M.isTooltipActive,H=M.tooltipAxis,U=M.activeTooltipIndex,F=M.activeLabel,O=k.props.children,P=cn(O,Ai),A=C.props,D=A.points,B=A.isRange,z=A.baseLine,K=C.item.type.defaultProps!==void 0?X(X({},C.item.type.defaultProps),C.item.props):C.item.props,Y=K.activeDot,G=K.hide,re=K.activeBar,le=K.activeShape,me=!!(!G&&L&&P&&(Y||re||le)),Ke={};R!=="axis"&&P&&P.props.trigger==="click"?Ke={onClick:km(k.handleItemMouseEnter,_.props.onClick)}:R!=="axis"&&(Ke={onMouseLeave:km(k.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:km(k.handleItemMouseEnter,_.props.onMouseEnter)});var te=w.cloneElement(_,X(X({},C.props),Ke));function ie(he){return typeof H.dataKey=="function"?H.dataKey(he.payload):null}if(me)if(U>=0){var we,J;if(H.dataKey&&!H.allowDuplicatedCategory){var Pe=typeof H.dataKey=="function"?ie:"payload.".concat(H.dataKey.toString());we=oy(D,Pe,F),J=B&&z&&oy(z,Pe,F)}else we=D==null?void 0:D[U],J=B&&z&&z[U];if(le||re){var je=_.props.activeIndex!==void 0?_.props.activeIndex:U;return[w.cloneElement(_,X(X(X({},C.props),Ke),{},{activeIndex:je})),null,null]}if(!Ue(we))return[te].concat(_u(k.renderActivePoints({item:C,activePoint:we,basePoint:J,childIndex:U,isRange:B})))}else{var De,Re=(De=k.getItemByXY(k.state.activeCoordinate))!==null&&De!==void 0?De:{graphicalItem:te},q=Re.graphicalItem,oe=q.item,ke=oe===void 0?_:oe,Ie=q.childIndex,ae=X(X(X({},C.props),Ke),{},{activeIndex:Ie});return[w.cloneElement(ke,ae),null,null]}return B?[te,null,null]:[te,null]}),Ne(k,"renderCustomized",function(_,S,E){return w.cloneElement(_,X(X({key:"recharts-customized-".concat(E)},k.props),k.state))}),Ne(k,"renderMap",{CartesianGrid:{handler:Nm,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:Nm},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:Nm},YAxis:{handler:Nm},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((y=b.id)!==null&&y!==void 0?y:up("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=fF(k.triggeredAfterMouseMove,(j=b.throttleDelay)!==null&&j!==void 0?j:1e3/60),k.state={},k}return a2e(x,v),t2e(x,[{key:"componentDidMount",value:function(){var y,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var y=this.props,j=y.children,k=y.data,_=y.height,S=y.layout,E=cn(j,Ai);if(E){var C=E.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,M=F_(this.state,k,C,R),L=this.state.tooltipTicks[C].coordinate,H=(this.state.offset.top+_)/2,U=S==="horizontal",F=U?{x:L,y:H}:{y:L,x:H},O=this.state.formattedGraphicalItems.find(function(A){var D=A.item;return D.type.name==="Scatter"});O&&(F=X(X({},F),O.props.points[C].tooltipPosition),M=O.props.points[C].tooltipPayload);var P={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:R,activePayload:M,activeCoordinate:F};this.setState(P),this.renderCursor(E),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(y,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==y.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==y.margin){var k,_;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(y){bk([cn(y.children,Ai)],[cn(this.props.children,Ai)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var y=cn(this.props.children,Ai);if(y&&typeof y.props.shared=="boolean"){var j=y.props.shared?"axis":"item";return s.indexOf(j)>=0?j:a}return a}},{key:"getMouseInfo",value:function(y){if(!this.container)return null;var j=this.container,k=j.getBoundingClientRect(),_=Z0e(k),S={chartX:Math.round(y.pageX-_.left),chartY:Math.round(y.pageY-_.top)},E=k.width/j.offsetWidth||1,C=this.inRange(S.chartX,S.chartY,E);if(!C)return null;var R=this.state,M=R.xAxisMap,L=R.yAxisMap,H=this.getTooltipEventType(),U=fM(this.state,this.props.data,this.props.layout,C);if(H!=="axis"&&M&&L){var F=ho(M).scale,O=ho(L).scale,P=F&&F.invert?F.invert(S.chartX):null,A=O&&O.invert?O.invert(S.chartY):null;return X(X({},S),{},{xValue:P,yValue:A},U)}return U?X(X({},S),U):null}},{key:"inRange",value:function(y,j){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=y/k,E=j/k;if(_==="horizontal"||_==="vertical"){var C=this.state.offset,R=S>=C.left&&S<=C.left+C.width&&E>=C.top&&E<=C.top+C.height;return R?{x:S,y:E}:null}var M=this.state,L=M.angleAxisMap,H=M.radiusAxisMap;if(L&&H){var U=ho(L);return qR({x:S,y:E},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var y=this.props.children,j=this.getTooltipEventType(),k=cn(y,Ai),_={};k&&j==="axis"&&(k.props.trigger==="click"?_={onClick:this.handleClick}:_={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 S=sy(this.props,this.handleOuterEvent);return X(X({},S),_)}},{key:"addListener",value:function(){H0.on(V0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){H0.removeListener(V0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(y,j,k){for(var _=this.state.formattedGraphicalItems,S=0,E=_.length;S<E;S++){var C=_[S];if(C.item===y||C.props.key===y.key||j===wa(C.item.type)&&k===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var y=this.clipPathId,j=this.state.offset,k=j.left,_=j.top,S=j.height,E=j.width;return $.createElement("defs",null,$.createElement("clipPath",{id:y},$.createElement("rect",{x:k,y:_,height:S,width:E})))}},{key:"getXScales",value:function(){var y=this.state.xAxisMap;return y?Object.entries(y).reduce(function(j,k){var _=cM(k,2),S=_[0],E=_[1];return X(X({},j),{},Ne({},S,E.scale))},{}):null}},{key:"getYScales",value:function(){var y=this.state.yAxisMap;return y?Object.entries(y).reduce(function(j,k){var _=cM(k,2),S=_[0],E=_[1];return X(X({},j),{},Ne({},S,E.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(y){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[y])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(y){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[y])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(y){var j=this.state,k=j.formattedGraphicalItems,_=j.activeItem;if(k&&k.length)for(var S=0,E=k.length;S<E;S++){var C=k[S],R=C.props,M=C.item,L=M.type.defaultProps!==void 0?X(X({},M.type.defaultProps),M.props):M.props,H=wa(M.type);if(H==="Bar"){var U=(R.data||[]).find(function(A){return MNe(y,A)});if(U)return{graphicalItem:C,payload:U}}else if(H==="RadialBar"){var F=(R.data||[]).find(function(A){return qR(y,A)});if(F)return{graphicalItem:C,payload:F}}else if(Bx(C,_)||Ux(C,_)||Eh(C,_)){var O=LCe({graphicalItem:C,activeTooltipItem:_,itemData:L.data}),P=L.activeIndex===void 0?O:L.activeIndex;return{graphicalItem:X(X({},C),{},{childIndex:P}),payload:Eh(C,_)?L.data[O]:C.props.data[O]}}}return null}},{key:"render",value:function(){var y=this;if(!IO(this))return null;var j=this.props,k=j.children,_=j.className,S=j.width,E=j.height,C=j.style,R=j.compact,M=j.title,L=j.desc,H=uM(j,GOe),U=qe(H,!1);if(R)return $.createElement(V$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement(kk,oc({},U,{width:S,height:E,title:M,desc:L}),this.renderClipPath(),zO(k,this.renderMap)));if(this.props.accessibilityLayer){var F,O;U.tabIndex=(F=this.props.tabIndex)!==null&&F!==void 0?F:0,U.role=(O=this.props.role)!==null&&O!==void 0?O:"application",U.onKeyDown=function(A){y.accessibilityManager.keyboardEvent(A)},U.onFocus=function(){y.accessibilityManager.focus()}}var P=this.parseEventsOfWrapper();return $.createElement(V$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},$.createElement("div",oc({className:Ge("recharts-wrapper",_),style:X({position:"relative",cursor:"default",width:S,height:E},C)},P,{ref:function(D){y.container=D}}),$.createElement(kk,oc({},U,{width:S,height:E,title:M,desc:L,style:d2e}),this.renderClipPath(),zO(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);Ne(m,"displayName",r),Ne(m,"defaultProps",X({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),Ne(m,"getDerivedStateFromProps",function(v,x){var b=v.dataKey,y=v.data,j=v.children,k=v.width,_=v.height,S=v.layout,E=v.stackOffset,C=v.margin,R=x.dataStartIndex,M=x.dataEndIndex;if(x.updateId===void 0){var L=hM(v);return X(X(X({},L),{},{updateId:0},p(X(X({props:v},L),{},{updateId:0}),x)),{},{prevDataKey:b,prevData:y,prevWidth:k,prevHeight:_,prevLayout:S,prevStackOffset:E,prevMargin:C,prevChildren:j})}if(b!==x.prevDataKey||y!==x.prevData||k!==x.prevWidth||_!==x.prevHeight||S!==x.prevLayout||E!==x.prevStackOffset||!kc(C,x.prevMargin)){var H=hM(v),U={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},F=X(X({},fM(x,y,S)),{},{updateId:x.updateId+1}),O=X(X(X({},H),U),F);return X(X(X({},O),p(X({props:v},O),x)),{},{prevDataKey:b,prevData:y,prevWidth:k,prevHeight:_,prevLayout:S,prevStackOffset:E,prevMargin:C,prevChildren:j})}if(!bk(j,x.prevChildren)){var P,A,D,B,z=cn(j,fu),K=z&&(P=(A=z.props)===null||A===void 0?void 0:A.startIndex)!==null&&P!==void 0?P:R,Y=z&&(D=(B=z.props)===null||B===void 0?void 0:B.endIndex)!==null&&D!==void 0?D:M,G=K!==R||Y!==M,re=!Ue(y),le=re&&!G?x.updateId:x.updateId+1;return X(X({updateId:le},p(X(X({props:v},x),{},{updateId:le,dataStartIndex:K,dataEndIndex:Y}),x)),{},{prevChildren:j,dataStartIndex:K,dataEndIndex:Y})}return null}),Ne(m,"renderActiveDot",function(v,x,b){var y;return w.isValidElement(v)?y=w.cloneElement(v,x):Le(v)?y=v(x):y=$.createElement($N,x),$.createElement(Ut,{className:"recharts-active-dot",key:b},y)});var g=w.forwardRef(function(x,b){return $.createElement(m,oc({},x,{ref:b}))});return g.displayName=m.displayName,g},k2e=w2e({chartName:"LineChart",GraphicalChild:xu,axisComponents:[{axisType:"xAxis",AxisComp:qx},{axisType:"yAxis",AxisComp:Gx}],formatAxisMap:cAe});const _2e=[{value:7,label:"Son 7 gün"},{value:14,label:"Son 14 gün"},{value:30,label:"Son 30 gün"},{value:90,label:"Son 90 gün"}];function j2e(e){return e.toLocaleDateString("tr-TR",{day:"2-digit",month:"short"})}function S2e(e){if(!e||e<1)return"0sn";const t=Math.floor(e/60),r=Math.floor(e%60);return t===0?"".concat(r,"sn"):"".concat(t,"dk ").concat(r,"sn")}function E2e(){const[e,t]=w.useState(7),{data:r=[],isLoading:n}=ul({queryKey:["analytics-page-views",e],queryFn:()=>T(this,null,function*(){const a=new Date;a.setDate(a.getDate()-e);const{data:o,error:s}=yield Q.from("page_views").select("id, session_id, path, referrer_host, country, device, created_at").gte("created_at",a.toISOString()).order("created_at",{ascending:!0}).limit(5e4);if(s)throw s;return o||[]})}),i=w.useMemo(()=>{const a=new Map;for(const k of r){const _=a.get(k.session_id)||[];_.push(k),a.set(k.session_id,_)}const o=a.size,s=r.length,c=o?s/o:0;let u=0,f=0,d=0;a.forEach(k=>{if(k.length===1&&d++,k.length>1){const _=new Date(k[0].created_at).getTime(),S=new Date(k[k.length-1].created_at).getTime();u+=(S-_)/1e3,f++}});const h=f?u/f:0,p=o?d/o*100:0,m=new Map;for(let k=e-1;k>=0;k--){const _=new Date;_.setDate(_.getDate()-k);const S=_.toISOString().slice(0,10);m.set(S,{visitors:new Set,pageviews:0})}for(const k of r){const _=k.created_at.slice(0,10),S=m.get(_);S&&(S.pageviews++,S.visitors.add(k.session_id))}const g=Array.from(m.entries()).map(([k,_])=>({date:j2e(new Date(k)),visitors:_.visitors.size,pageviews:_.pageviews})),v=k=>{const _=new Map;for(const S of k){const E=(S||"").trim();E&&_.set(E,(_.get(E)||0)+1)}return Array.from(_.entries()).sort((S,E)=>E[1]-S[1]).slice(0,10)},x=v(r.map(k=>k.path)),b=v(r.map(k=>k.referrer_host||"Direct")),y=v(r.map(k=>k.country||"Unknown")),j=v(r.map(k=>k.device||"unknown"));return{totalVisitors:o,totalPageviews:s,pageviewsPerVisit:c,avgDuration:h,bounceRate:p,timeSeries:g,topPages:x,topReferrers:b,topCountries:y,topDevices:j}},[r,e]);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsx("h2",{className:"heading-card text-foreground",children:"Site Analytics"}),l.jsx("div",{className:"flex gap-2 flex-wrap",children:_2e.map(a=>l.jsx("button",{onClick:()=>t(a.value),className:"px-3 py-1.5 rounded-full text-xs font-medium transition-colors ".concat(e===a.value?"bg-primary text-primary-foreground":"bg-secondary text-foreground/80 hover:bg-secondary/80"),children:a.label},a.value))})]}),n?l.jsx("p",{className:"text-muted-foreground text-center py-12",children:"Yükleniyor..."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",children:[l.jsx(Td,{icon:Xs,label:"Visitors",value:i.totalVisitors.toLocaleString("tr-TR")}),l.jsx(Td,{icon:Tu,label:"Pageviews",value:i.totalPageviews.toLocaleString("tr-TR")}),l.jsx(Td,{icon:k7,label:"Views / Visit",value:i.pageviewsPerVisit.toFixed(2)}),l.jsx(Td,{icon:Ta,label:"Avg. Duration",value:S2e(i.avgDuration)}),l.jsx(Td,{icon:O7,label:"Bounce Rate",value:"".concat(i.bounceRate.toFixed(0),"%")})]}),l.jsxs("div",{className:"p-4 md:p-6 rounded-2xl bg-card border border-border",children:[l.jsx("h3",{className:"text-sm font-medium text-foreground mb-4",children:"Ziyaretçi & Sayfa Görüntüleme"}),l.jsx("div",{className:"h-72",children:l.jsx(W0e,{width:"100%",height:"100%",children:l.jsxs(k2e,{data:i.timeSeries,children:[l.jsx(l8,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),l.jsx(qx,{dataKey:"date",stroke:"hsl(var(--muted-foreground))",fontSize:12}),l.jsx(Gx,{stroke:"hsl(var(--muted-foreground))",fontSize:12,allowDecimals:!1}),l.jsx(Ai,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:8,fontSize:12}}),l.jsx(xu,{type:"monotone",dataKey:"visitors",stroke:"hsl(var(--primary))",strokeWidth:2,dot:!1,name:"Visitors"}),l.jsx(xu,{type:"monotone",dataKey:"pageviews",stroke:"hsl(var(--muted-foreground))",strokeWidth:2,dot:!1,name:"Pageviews"})]})})})]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[l.jsx(Cm,{icon:$z,title:"Top Sayfalar",items:i.topPages}),l.jsx(Cm,{icon:Rz,title:"Trafik Kaynağı",items:i.topReferrers}),l.jsx(Cm,{icon:Mz,title:"Ülkeler",items:i.topCountries}),l.jsx(Cm,{icon:w7,title:"Cihazlar",items:i.topDevices})]}),i.totalPageviews===0&&l.jsx("p",{className:"text-center text-sm text-muted-foreground py-8",children:"Henüz veri yok. Ziyaretçiler siteye girdikçe burada görünecek."})]})]})}function Td({icon:e,label:t,value:r}){return l.jsxs("div",{className:"p-4 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground mb-2",children:[l.jsx(e,{size:14}),l.jsx("span",{className:"text-xs font-medium",children:t})]}),l.jsx("p",{className:"text-2xl font-semibold text-foreground",children:r})]})}function Cm({icon:e,title:t,items:r}){const n=r.reduce((i,[,a])=>Math.max(i,a),0);return l.jsxs("div",{className:"p-4 md:p-6 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(e,{size:16,className:"text-primary"}),l.jsx("h3",{className:"text-sm font-medium text-foreground",children:t})]}),r.length===0?l.jsx("p",{className:"text-xs text-muted-foreground",children:"Veri yok"}):l.jsx("ul",{className:"space-y-2",children:r.map(([i,a])=>{const o=n?a/n*100:0;return l.jsxs("li",{className:"relative",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs gap-2 relative z-10 px-2 py-1.5",children:[l.jsx("span",{className:"text-foreground truncate",title:i,children:i}),l.jsx("span",{className:"text-muted-foreground font-medium shrink-0",children:a})]}),l.jsx("div",{className:"absolute inset-y-0 left-0 rounded-md bg-primary/10",style:{width:"".concat(o,"%")}})]},i)})})]})}function K_(e){"@babel/helpers - typeof";return K_=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},K_(e)}function N2e(e,t,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function C2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T2e(e,t,r){return t=$h(t),A2e(e,HN()?Reflect.construct(t,r||[],$h(e).constructor):t.apply(e,r))}function A2e(e,t){if(t&&(K_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P2e(e)}function P2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O2e(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&&Rh(e,t)}function H_(e){var t=typeof Map=="function"?new Map:void 0;return H_=function(n){if(n===null||!$2e(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return R2e(n,arguments,$h(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Rh(i,n)},H_(e)}function R2e(e,t,r){if(HN())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&Rh(i,r.prototype),i}function HN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(HN=function(){return!!e})()}function $2e(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function Rh(e,t){return Rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rh(e,t)}function $h(e){return $h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$h(e)}var Tm=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(C2e(this,t),n=T2e(this,t,[r]),n.originalRequest=a,n.originalResponse=o,n.causingError=i,i!=null&&(r+=", caused by ".concat(i.toString())),a!=null){var s=a.getHeader("X-Request-ID")||"n/a",c=a.getMethod(),u=a.getURL(),f=o?o.getStatus():"n/a",d=o?o.getBody()||"":"n/a";r+=", originated from request (method: ".concat(c,", url: ").concat(u,", response code: ").concat(f,", response text: ").concat(d,", request id: ").concat(s,")")}return n.message=r,n}return O2e(t,e),N2e(t)}(H_(Error));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 M2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D2e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L2e(n.key),n)}}function I2e(e,t,r){return t&&D2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function L2e(e){var t=z2e(e,"string");return Mh(t)=="symbol"?t:t+""}function z2e(e,t){if(Mh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B2e=function(){function e(){M2e(this,e)}return I2e(e,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(r){return Promise.resolve([])}},{key:"removeUpload",value:function(r){return Promise.resolve()}},{key:"addUpload",value:function(r,n){return Promise.resolve(null)}}])}();const S8="3.7.8",U2e=S8,Qu=typeof Buffer=="function",mM=typeof TextDecoder=="function"?new TextDecoder:void 0,gM=typeof TextEncoder=="function"?new TextEncoder:void 0,F2e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",zd=Array.prototype.slice.call(F2e),Am=(e=>{let t={};return e.forEach((r,n)=>t[r]=n),t})(zd),K2e=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,yr=String.fromCharCode.bind(String),yM=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),E8=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),N8=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),C8=e=>{let t,r,n,i,a="";const o=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,a+=zd[t>>18&63]+zd[t>>12&63]+zd[t>>6&63]+zd[t&63]}return o?a.slice(0,o-3)+"===".substring(o):a},VN=typeof btoa=="function"?e=>btoa(e):Qu?e=>Buffer.from(e,"binary").toString("base64"):C8,V_=Qu?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,i=e.length;n<i;n+=4096)r.push(yr.apply(null,e.subarray(n,n+4096)));return VN(r.join(""))},ug=(e,t=!1)=>t?E8(V_(e)):V_(e),H2e=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?yr(192|t>>>6)+yr(128|t&63):yr(224|t>>>12&15)+yr(128|t>>>6&63)+yr(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return yr(240|t>>>18&7)+yr(128|t>>>12&63)+yr(128|t>>>6&63)+yr(128|t&63)}},V2e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,T8=e=>e.replace(V2e,H2e),vM=Qu?e=>Buffer.from(e,"utf8").toString("base64"):gM?e=>V_(gM.encode(e)):e=>VN(T8(e)),Ec=(e,t=!1)=>t?E8(vM(e)):vM(e),xM=e=>Ec(e,!0),W2e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,q2e=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return yr((r>>>10)+55296)+yr((r&1023)+56320);case 3:return yr((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return yr((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A8=e=>e.replace(W2e,q2e),P8=e=>{if(e=e.replace(/\s+/g,""),!K2e.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r,n,i=[];for(let a=0;a<e.length;)t=Am[e.charAt(a++)]<<18|Am[e.charAt(a++)]<<12|(r=Am[e.charAt(a++)])<<6|(n=Am[e.charAt(a++)]),r===64?i.push(yr(t>>16&255)):n===64?i.push(yr(t>>16&255,t>>8&255)):i.push(yr(t>>16&255,t>>8&255,t&255));return i.join("")},WN=typeof atob=="function"?e=>atob(N8(e)):Qu?e=>Buffer.from(e,"base64").toString("binary"):P8,O8=Qu?e=>yM(Buffer.from(e,"base64")):e=>yM(WN(e).split("").map(t=>t.charCodeAt(0))),R8=e=>O8($8(e)),G2e=Qu?e=>Buffer.from(e,"base64").toString("utf8"):mM?e=>mM.decode(O8(e)):e=>A8(WN(e)),$8=e=>N8(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),W_=e=>G2e($8(e)),Y2e=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},M8=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),D8=function(){const e=(t,r)=>Object.defineProperty(String.prototype,t,M8(r));e("fromBase64",function(){return W_(this)}),e("toBase64",function(t){return Ec(this,t)}),e("toBase64URI",function(){return Ec(this,!0)}),e("toBase64URL",function(){return Ec(this,!0)}),e("toUint8Array",function(){return R8(this)})},I8=function(){const e=(t,r)=>Object.defineProperty(Uint8Array.prototype,t,M8(r));e("toBase64",function(t){return ug(this,t)}),e("toBase64URI",function(){return ug(this,!0)}),e("toBase64URL",function(){return ug(this,!0)})},X2e=()=>{D8(),I8()},J2e={version:S8,VERSION:U2e,atob:WN,atobPolyfill:P8,btoa:VN,btoaPolyfill:C8,fromBase64:W_,toBase64:Ec,encode:Ec,encodeURI:xM,encodeURL:xM,utob:T8,btou:A8,decode:W_,isValid:Y2e,fromUint8Array:ug,toUint8Array:R8,extendString:D8,extendUint8Array:I8,extendBuiltins:X2e};var Q2e=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},qN={},Z2e=Object.prototype.hasOwnProperty,eRe;function bM(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return null}}function wM(e){try{return encodeURIComponent(e)}catch(t){return null}}function tRe(e){for(var t=/([^=?#&]+)=?([^&]*)/g,r={},n;n=t.exec(e);){var i=bM(n[1]),a=bM(n[2]);i===null||a===null||i in r||(r[i]=a)}return r}function rRe(e,t){t=t||"";var r=[],n,i;typeof t!="string"&&(t="?");for(i in e)if(Z2e.call(e,i)){if(n=e[i],!n&&(n===null||n===eRe||isNaN(n))&&(n=""),i=wM(i),n=wM(n),i===null||n===null)continue;r.push(i+"="+n)}return r.length?t+r.join("&"):""}qN.stringify=rRe;qN.parse=tRe;var L8=Q2e,Xx=qN,nRe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,z8=/[\n\r\t]/g,iRe=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,B8=/:\d+$/,aRe=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,oRe=/^[a-zA-Z]:/;function GN(e){return(e||"").toString().replace(nRe,"")}var q_=[["#","hash"],["?","query"],function(t,r){return Yi(r.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],kM={hash:1,query:1};function U8(e){var t;typeof window!="undefined"?t=window:typeof Ul!="undefined"?t=Ul:typeof self!="undefined"?t=self:t={};var r=t.location||{};e=e||r;var n={},i=typeof e,a;if(e.protocol==="blob:")n=new ta(unescape(e.pathname),{});else if(i==="string"){n=new ta(e,{});for(a in kM)delete n[a]}else if(i==="object"){for(a in e)a in kM||(n[a]=e[a]);n.slashes===void 0&&(n.slashes=iRe.test(e.href))}return n}function Yi(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function F8(e,t){e=GN(e),e=e.replace(z8,""),t=t||{};var r=aRe.exec(e),n=r[1]?r[1].toLowerCase():"",i=!!r[2],a=!!r[3],o=0,s;return i?a?(s=r[2]+r[3]+r[4],o=r[2].length+r[3].length):(s=r[2]+r[4],o=r[2].length):a?(s=r[3]+r[4],o=r[3].length):s=r[4],n==="file:"?o>=2&&(s=s.slice(2)):Yi(n)?s=r[4]:n?i&&(s=s.slice(2)):o>=2&&Yi(t.protocol)&&(s=r[4]),{protocol:n,slashes:i||Yi(n),slashesCount:o,rest:s}}function sRe(e,t){if(e==="")return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],a=!1,o=0;n--;)r[n]==="."?r.splice(n,1):r[n]===".."?(r.splice(n,1),o++):o&&(n===0&&(a=!0),r.splice(n,1),o--);return a&&r.unshift(""),(i==="."||i==="..")&&r.push(""),r.join("/")}function ta(e,t,r){if(e=GN(e),e=e.replace(z8,""),!(this instanceof ta))return new ta(e,t,r);var n,i,a,o,s,c,u=q_.slice(),f=typeof t,d=this,h=0;for(f!=="object"&&f!=="string"&&(r=t,t=null),r&&typeof r!="function"&&(r=Xx.parse),t=U8(t),i=F8(e||"",t),n=!i.protocol&&!i.slashes,d.slashes=i.slashes||n&&t.slashes,d.protocol=i.protocol||t.protocol||"",e=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||oRe.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!Yi(d.protocol)))&&(u[3]=[/(.*)/,"pathname"]);h<u.length;h++){if(o=u[h],typeof o=="function"){e=o(e,d);continue}a=o[0],c=o[1],a!==a?d[c]=e:typeof a=="string"?(s=a==="@"?e.lastIndexOf(a):e.indexOf(a),~s&&(typeof o[2]=="number"?(d[c]=e.slice(0,s),e=e.slice(s+o[2])):(d[c]=e.slice(s),e=e.slice(0,s)))):(s=a.exec(e))&&(d[c]=s[1],e=e.slice(0,s.index)),d[c]=d[c]||n&&o[3]&&t[c]||"",o[4]&&(d[c]=d[c].toLowerCase())}r&&(d.query=r(d.query)),n&&t.slashes&&d.pathname.charAt(0)!=="/"&&(d.pathname!==""||t.pathname!=="")&&(d.pathname=sRe(d.pathname,t.pathname)),d.pathname.charAt(0)!=="/"&&Yi(d.protocol)&&(d.pathname="/"+d.pathname),L8(d.port,d.protocol)||(d.host=d.hostname,d.port=""),d.username=d.password="",d.auth&&(s=d.auth.indexOf(":"),~s?(d.username=d.auth.slice(0,s),d.username=encodeURIComponent(decodeURIComponent(d.username)),d.password=d.auth.slice(s+1),d.password=encodeURIComponent(decodeURIComponent(d.password))):d.username=encodeURIComponent(decodeURIComponent(d.auth)),d.auth=d.password?d.username+":"+d.password:d.username),d.origin=d.protocol!=="file:"&&Yi(d.protocol)&&d.host?d.protocol+"//"+d.host:"null",d.href=d.toString()}function lRe(e,t,r){var n=this;switch(e){case"query":typeof t=="string"&&t.length&&(t=(r||Xx.parse)(t)),n[e]=t;break;case"port":n[e]=t,L8(t,n.protocol)?t&&(n.host=n.hostname+":"+t):(n.host=n.hostname,n[e]="");break;case"hostname":n[e]=t,n.port&&(t+=":"+n.port),n.host=t;break;case"host":n[e]=t,B8.test(t)?(t=t.split(":"),n.port=t.pop(),n.hostname=t.join(":")):(n.hostname=t,n.port="");break;case"protocol":n.protocol=t.toLowerCase(),n.slashes=!r;break;case"pathname":case"hash":if(t){var i=e==="pathname"?"/":"#";n[e]=t.charAt(0)!==i?i+t:t}else n[e]=t;break;case"username":case"password":n[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(n.username=t.slice(0,a),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=t.slice(a+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<q_.length;o++){var s=q_[o];s[4]&&(n[s[1]]=n[s[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin=n.protocol!=="file:"&&Yi(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function cRe(e){(!e||typeof e!="function")&&(e=Xx.stringify);var t,r=this,n=r.host,i=r.protocol;i&&i.charAt(i.length-1)!==":"&&(i+=":");var a=i+(r.protocol&&r.slashes||Yi(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):r.protocol!=="file:"&&Yi(r.protocol)&&!n&&r.pathname!=="/"&&(a+="@"),(n[n.length-1]===":"||B8.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,t=typeof r.query=="object"?e(r.query):r.query,t&&(a+=t.charAt(0)!=="?"?"?"+t:t),r.hash&&(a+=r.hash),a}ta.prototype={set:lRe,toString:cRe};ta.extractProtocol=F8;ta.location=U8;ta.trimLeft=GN;ta.qs=Xx;var uRe=ta;const dRe=Qe(uRe);function fRe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,r=e==="x"?t:t&3|8;return r.toString(16)})}function G_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */G_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(O,P,A){O[P]=A.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(O,P,A){return Object.defineProperty(O,P,{value:A,enumerable:!0,configurable:!0,writable:!0}),O[P]}try{u({},"")}catch(O){u=function(A,D,B){return A[D]=B}}function f(O,P,A,D){var B=P&&P.prototype instanceof x?P:x,z=Object.create(B.prototype),K=new U(D||[]);return i(z,"_invoke",{value:R(O,A,K)}),z}function d(O,P,A){try{return{type:"normal",arg:O.call(P,A)}}catch(D){return{type:"throw",arg:D}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",v={};function x(){}function b(){}function y(){}var j={};u(j,o,function(){return this});var k=Object.getPrototypeOf,_=k&&k(k(F([])));_&&_!==r&&n.call(_,o)&&(j=_);var S=y.prototype=x.prototype=Object.create(j);function E(O){["next","throw","return"].forEach(function(P){u(O,P,function(A){return this._invoke(P,A)})})}function C(O,P){function A(B,z,K,Y){var G=d(O[B],O,z);if(G.type!=="throw"){var re=G.arg,le=re.value;return le&&al(le)=="object"&&n.call(le,"__await")?P.resolve(le.__await).then(function(me){A("next",me,K,Y)},function(me){A("throw",me,K,Y)}):P.resolve(le).then(function(me){re.value=me,K(re)},function(me){return A("throw",me,K,Y)})}Y(G.arg)}var D;i(this,"_invoke",{value:function(z,K){function Y(){return new P(function(G,re){A(z,K,G,re)})}return D=D?D.then(Y,Y):Y()}})}function R(O,P,A){var D=h;return function(B,z){if(D===m)throw Error("Generator is already running");if(D===g){if(B==="throw")throw z;return{value:e,done:!0}}for(A.method=B,A.arg=z;;){var K=A.delegate;if(K){var Y=M(K,A);if(Y){if(Y===v)continue;return Y}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(D===h)throw D=g,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);D=m;var G=d(O,P,A);if(G.type==="normal"){if(D=A.done?g:p,G.arg===v)continue;return{value:G.arg,done:A.done}}G.type==="throw"&&(D=g,A.method="throw",A.arg=G.arg)}}}function M(O,P){var A=P.method,D=O.iterator[A];if(D===e)return P.delegate=null,A==="throw"&&O.iterator.return&&(P.method="return",P.arg=e,M(O,P),P.method==="throw")||A!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+A+"' method")),v;var B=d(D,O.iterator,P.arg);if(B.type==="throw")return P.method="throw",P.arg=B.arg,P.delegate=null,v;var z=B.arg;return z?z.done?(P[O.resultName]=z.value,P.next=O.nextLoc,P.method!=="return"&&(P.method="next",P.arg=e),P.delegate=null,v):z:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,v)}function L(O){var P={tryLoc:O[0]};1 in O&&(P.catchLoc=O[1]),2 in O&&(P.finallyLoc=O[2],P.afterLoc=O[3]),this.tryEntries.push(P)}function H(O){var P=O.completion||{};P.type="normal",delete P.arg,O.completion=P}function U(O){this.tryEntries=[{tryLoc:"root"}],O.forEach(L,this),this.reset(!0)}function F(O){if(O||O===""){var P=O[o];if(P)return P.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var A=-1,D=function B(){for(;++A<O.length;)if(n.call(O,A))return B.value=O[A],B.done=!1,B;return B.value=e,B.done=!0,B};return D.next=D}}throw new TypeError(al(O)+" is not iterable")}return b.prototype=y,i(S,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:b,configurable:!0}),b.displayName=u(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(O){var P=typeof O=="function"&&O.constructor;return!!P&&(P===b||(P.displayName||P.name)==="GeneratorFunction")},t.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,y):(O.__proto__=y,u(O,c,"GeneratorFunction")),O.prototype=Object.create(S),O},t.awrap=function(O){return{__await:O}},E(C.prototype),u(C.prototype,s,function(){return this}),t.AsyncIterator=C,t.async=function(O,P,A,D,B){B===void 0&&(B=Promise);var z=new C(f(O,P,A,D),B);return t.isGeneratorFunction(P)?z:z.next().then(function(K){return K.done?K.value:z.next()})},E(S),u(S,c,"Generator"),u(S,o,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(O){var P=Object(O),A=[];for(var D in P)A.push(D);return A.reverse(),function B(){for(;A.length;){var z=A.pop();if(z in P)return B.value=z,B.done=!1,B}return B.done=!0,B}},t.values=F,U.prototype={constructor:U,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(H),!P)for(var A in this)A.charAt(0)==="t"&&n.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=e)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var A=this;function D(re,le){return K.type="throw",K.arg=P,A.next=re,le&&(A.method="next",A.arg=e),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var z=this.tryEntries[B],K=z.completion;if(z.tryLoc==="root")return D("end");if(z.tryLoc<=this.prev){var Y=n.call(z,"catchLoc"),G=n.call(z,"finallyLoc");if(Y&&G){if(this.prev<z.catchLoc)return D(z.catchLoc,!0);if(this.prev<z.finallyLoc)return D(z.finallyLoc)}else if(Y){if(this.prev<z.catchLoc)return D(z.catchLoc,!0)}else{if(!G)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return D(z.finallyLoc)}}}},abrupt:function(P,A){for(var D=this.tryEntries.length-1;D>=0;--D){var B=this.tryEntries[D];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var z=B;break}}z&&(P==="break"||P==="continue")&&z.tryLoc<=A&&A<=z.finallyLoc&&(z=null);var K=z?z.completion:{};return K.type=P,K.arg=A,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(K)},complete:function(P,A){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&A&&(this.next=A),v},finish:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var D=this.tryEntries[A];if(D.finallyLoc===P)return this.complete(D.completion,D.afterLoc),H(D),v}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var D=this.tryEntries[A];if(D.tryLoc===P){var B=D.completion;if(B.type==="throw"){var z=B.arg;H(D)}return z}}throw Error("illegal catch attempt")},delegateYield:function(P,A,D){return this.delegate={iterator:F(P),resultName:A,nextLoc:D},this.method==="next"&&(this.arg=e),v}},t}function _M(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(u){r(u);return}s.done?t(c):Promise.resolve(c).then(n,i)}function hRe(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(c){_M(a,n,i,o,s,"next",c)}function s(c){_M(a,n,i,o,s,"throw",c)}o(void 0)})}}function K8(e,t){return gRe(e)||mRe(e,t)||H8(e,t)||pRe()}function pRe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mRe(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function gRe(e){if(Array.isArray(e))return e}function al(e){"@babel/helpers - typeof";return al=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},al(e)}function yRe(e,t){var r=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=H8(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function H8(e,t){if(e){if(typeof e=="string")return jM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jM(e,t)}}function jM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SM(Object(r),!0).forEach(function(n){vRe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vRe(e,t,r){return t=V8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EM(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V8(n.key),n)}}function bRe(e,t,r){return t&&EM(e.prototype,t),r&&EM(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function V8(e){var t=wRe(e,"string");return al(t)=="symbol"?t:t+""}function wRe(e,t){if(al(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(al(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dg="tus-v1",fg="ietf-draft-03",Bd="ietf-draft-05",kRe={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:W8,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:dg},av=function(){function e(t,r){xRe(this,e),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return bRe(e,[{key:"findPreviousUploads",value:function(){var r=this;return this.options.fingerprint(this.file,this.options).then(function(n){return r._urlStorage.findUploadsByFingerprint(n)})}},{key:"resumeFromPreviousUpload",value:function(r){this.url=r.uploadUrl||null,this._parallelUploadUrls=r.parallelUploadUrls||null,this._urlStorageKey=r.urlStorageKey}},{key:"start",value:function(){var r=this,n=this.file;if(!n){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(![dg,fg,Bd].includes(this.options.protocol)){this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var i=this.options.retryDelays;if(i!=null&&Object.prototype.toString.call(i)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var a=0,o=["uploadUrl","uploadSize","uploadLengthDeferred"];a<o.length;a++){var s=o[a];if(this.options[s]){this._emitError(new Error("tus: cannot use the ".concat(s," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(n,this.options).then(function(c){return r._fingerprint=c,r._source?r._source:r.options.fileReader.openFile(n,r.options.chunkSize)}).then(function(c){if(r._source=c,r.options.uploadLengthDeferred)r._size=null;else if(r.options.uploadSize!=null){if(r._size=Number(r.options.uploadSize),Number.isNaN(r._size)){r._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(r._size=r._source.size,r._size==null){r._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}r.options.parallelUploads>1||r._parallelUploadUrls!=null?r._startParallelUpload():r._startSingleUpload()}).catch(function(c){r._emitError(c)})}},{key:"_startParallelUpload",value:function(){var r,n=this,i=this._size,a=0;this._parallelUploads=[];var o=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,s=(r=this.options.parallelUploadBoundaries)!==null&&r!==void 0?r:jRe(this._source.size,o);this._parallelUploadUrls&&s.forEach(function(f,d){f.uploadUrl=n._parallelUploadUrls[d]||null}),this._parallelUploadUrls=new Array(s.length);var c=s.map(function(f,d){var h=0;return n._source.slice(f.start,f.end).then(function(p){var m=p.value;return new Promise(function(g,v){var x=Ol(Ol({},n.options),{},{uploadUrl:f.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:n.options.metadataForPartialUploads,headers:Ol(Ol({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:g,onError:v,onProgress:function(j){a=a-h+j,h=j,n._emitProgress(a,i)},onUploadUrlAvailable:function(){n._parallelUploadUrls[d]=b.url,n._parallelUploadUrls.filter(function(j){return!!j}).length===s.length&&n._saveUploadInUrlStorage()}}),b=new e(m,x);b.start(),n._parallelUploads.push(b)})})}),u;Promise.all(c).then(function(){u=n._openRequest("POST",n.options.endpoint),u.setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var f=NM(n.options.metadata);return f!==""&&u.setHeader("Upload-Metadata",f),n._sendRequest(u,null)}).then(function(f){if(!Bl(f.getStatus(),200)){n._emitHttpError(u,f,"tus: unexpected response while creating upload");return}var d=f.getHeader("Location");if(d==null){n._emitHttpError(u,f,"tus: invalid or missing Location header");return}n.url=PM(n.options.endpoint,d),"Created upload at ".concat(n.url),n._emitSuccess(f)}).catch(function(f){n._emitError(f)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){"Resuming upload from previous URL: ".concat(this.url),this._resumeUpload();return}if(this.options.uploadUrl!=null){"Resuming upload from provided URL: ".concat(this.options.uploadUrl),this.url=this.options.uploadUrl,this._resumeUpload();return}this._createUpload()}},{key:"abort",value:function(r){var n=this;if(this._parallelUploads!=null){var i=yRe(this._parallelUploads),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;o.abort(r)}}catch(s){i.e(s)}finally{i.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!r||this.url==null?Promise.resolve():e.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(r,n,i,a){this._emitError(new Tm(i,a,r,n))}},{key:"_emitError",value:function(r){var n=this;if(!this._aborted){if(this.options.retryDelays!=null){var i=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(i&&(this._retryAttempt=0),AM(r,this._retryAttempt,this.options)){var a=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){n.start()},a);return}}if(typeof this.options.onError=="function")this.options.onError(r);else throw r}}},{key:"_emitSuccess",value:function(r){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess({lastResponse:r})}},{key:"_emitProgress",value:function(r,n){typeof this.options.onProgress=="function"&&this.options.onProgress(r,n)}},{key:"_emitChunkComplete",value:function(r,n,i){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(r,n,i)}},{key:"_createUpload",value:function(){var r=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var n=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?n.setHeader("Upload-Defer-Length","1"):n.setHeader("Upload-Length","".concat(this._size));var i=NM(this.options.metadata);i!==""&&n.setHeader("Upload-Metadata",i);var a;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,a=this._addChunkToRequest(n)):((this.options.protocol===fg||this.options.protocol===Bd)&&n.setHeader("Upload-Complete","?0"),a=this._sendRequest(n,null)),a.then(function(o){if(!Bl(o.getStatus(),200)){r._emitHttpError(n,o,"tus: unexpected response while creating upload");return}var s=o.getHeader("Location");if(s==null){r._emitHttpError(n,o,"tus: invalid or missing Location header");return}if(r.url=PM(r.options.endpoint,s),"Created upload at ".concat(r.url),typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._size===0){r._emitSuccess(o),r._source.close();return}r._saveUploadInUrlStorage().then(function(){r.options.uploadDataDuringCreation?r._handleUploadResponse(n,o):(r._offset=0,r._performUpload())})}).catch(function(o){r._emitHttpError(n,null,"tus: failed to create upload",o)})}},{key:"_resumeUpload",value:function(){var r=this,n=this._openRequest("HEAD",this.url),i=this._sendRequest(n,null);i.then(function(a){var o=a.getStatus();if(!Bl(o,200)){if(o===423){r._emitHttpError(n,a,"tus: upload is currently locked; retry later");return}if(Bl(o,400)&&r._removeFromUrlStorage(),!r.options.endpoint){r._emitHttpError(n,a,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}r.url=null,r._createUpload();return}var s=Number.parseInt(a.getHeader("Upload-Offset"),10);if(Number.isNaN(s)){r._emitHttpError(n,a,"tus: invalid or missing offset value");return}var c=Number.parseInt(a.getHeader("Upload-Length"),10);if(Number.isNaN(c)&&!r.options.uploadLengthDeferred&&r.options.protocol===dg){r._emitHttpError(n,a,"tus: invalid or missing length value");return}typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._saveUploadInUrlStorage().then(function(){if(s===c){r._emitProgress(c,c),r._emitSuccess(a);return}r._offset=s,r._performUpload()})}).catch(function(a){r._emitHttpError(n,null,"tus: failed to resume upload",a)})}},{key:"_performUpload",value:function(){var r=this;if(!this._aborted){var n;this.options.overridePatchMethod?(n=this._openRequest("POST",this.url),n.setHeader("X-HTTP-Method-Override","PATCH")):n=this._openRequest("PATCH",this.url),n.setHeader("Upload-Offset","".concat(this._offset));var i=this._addChunkToRequest(n);i.then(function(a){if(!Bl(a.getStatus(),200)){r._emitHttpError(n,a,"tus: unexpected response while uploading chunk");return}r._handleUploadResponse(n,a)}).catch(function(a){r._aborted||r._emitHttpError(n,null,"tus: failed to upload chunk at offset ".concat(r._offset),a)})}}},{key:"_addChunkToRequest",value:function(r){var n=this,i=this._offset,a=this._offset+this.options.chunkSize;return r.setProgressHandler(function(o){n._emitProgress(i+o,n._size)}),this.options.protocol===dg?r.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===Bd&&r.setHeader("Content-Type","application/partial-upload"),(a===Number.POSITIVE_INFINITY||a>this._size)&&!this.options.uploadLengthDeferred&&(a=this._size),this._source.slice(i,a).then(function(o){var s=o.value,c=o.done,u=s!=null&&s.size?s.size:0;n.options.uploadLengthDeferred&&c&&(n._size=n._offset+u,r.setHeader("Upload-Length","".concat(n._size)));var f=n._offset+u;return!n.options.uploadLengthDeferred&&c&&f!==n._size?Promise.reject(new Error("upload was configured with a size of ".concat(n._size," bytes, but the source is done after ").concat(f," bytes"))):s===null?n._sendRequest(r):((n.options.protocol===fg||n.options.protocol===Bd)&&r.setHeader("Upload-Complete",c?"?1":"?0"),n._emitProgress(n._offset,n._size),n._sendRequest(r,s))})}},{key:"_handleUploadResponse",value:function(r,n){var i=Number.parseInt(n.getHeader("Upload-Offset"),10);if(Number.isNaN(i)){this._emitHttpError(r,n,"tus: invalid or missing offset value");return}if(this._emitProgress(i,this._size),this._emitChunkComplete(i-this._offset,i,this._size),this._offset=i,i===this._size){this._emitSuccess(n),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(r,n){var i=CM(r,n,this.options);return this._req=i,i}},{key:"_removeFromUrlStorage",value:function(){var r=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(n){r._emitError(n)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var r=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var n={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?n.parallelUploadUrls=this._parallelUploadUrls:n.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,n).then(function(i){r._urlStorageKey=i})}},{key:"_sendRequest",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return TM(r,n,this.options)}}],[{key:"terminate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=CM("DELETE",r,n);return TM(i,null,n).then(function(a){if(a.getStatus()!==204)throw new Tm("tus: unexpected response while terminating upload",null,i,a)}).catch(function(a){if(a instanceof Tm||(a=new Tm("tus: failed to terminate upload",a,i,null)),!AM(a,0,n))throw a;var o=n.retryDelays[0],s=n.retryDelays.slice(1),c=Ol(Ol({},n),{},{retryDelays:s});return new Promise(function(u){return setTimeout(u,o)}).then(function(){return e.terminate(r,c)})})}}])}();function NM(e){return Object.entries(e).map(function(t){var r=K8(t,2),n=r[0],i=r[1];return"".concat(n," ").concat(J2e.encode(String(i)))}).join(",")}function Bl(e,t){return e>=t&&e<t+100}function CM(e,t,r){var n=r.httpStack.createRequest(e,t);r.protocol===fg?n.setHeader("Upload-Draft-Interop-Version","5"):r.protocol===Bd?n.setHeader("Upload-Draft-Interop-Version","6"):n.setHeader("Tus-Resumable","1.0.0");for(var i=r.headers||{},a=0,o=Object.entries(i);a<o.length;a++){var s=K8(o[a],2),c=s[0],u=s[1];n.setHeader(c,u)}if(r.addRequestId){var f=fRe();n.setHeader("X-Request-ID",f)}return n}function TM(e,t,r){return Y_.apply(this,arguments)}function Y_(){return Y_=hRe(G_().mark(function e(t,r,n){var i;return G_().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(typeof n.onBeforeRequest!="function"){o.next=3;break}return o.next=3,n.onBeforeRequest(t);case 3:return o.next=5,t.send(r);case 5:if(i=o.sent,typeof n.onAfterResponse!="function"){o.next=9;break}return o.next=9,n.onAfterResponse(t,i);case 9:return o.abrupt("return",i);case 10:case"end":return o.stop()}},e)})),Y_.apply(this,arguments)}function _Re(){var e=!0;return typeof navigator!="undefined"&&navigator.onLine===!1&&(e=!1),e}function AM(e,t,r){return r.retryDelays==null||t>=r.retryDelays.length||e.originalRequest==null?!1:r&&typeof r.onShouldRetry=="function"?r.onShouldRetry(e,t,r):W8(e)}function W8(e){var t=e.originalResponse?e.originalResponse.getStatus():0;return(!Bl(t,400)||t===409||t===423)&&_Re()}function PM(e,t){return new dRe(t,e).toString()}function jRe(e,t){for(var r=Math.floor(e/t),n=[],i=0;i<t;i++)n.push({start:r*i,end:r*(i+1)});return n[t-1].end=e,n}av.defaultOptions=kRe;var q8=function(){return typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function SRe(e){return new Promise(function(t,r){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var i=n.response;t(i)},n.onerror=function(i){r(i)},n.open("GET",e),n.send()})}var ERe=function(){return typeof window!="undefined"&&(typeof window.PhoneGap!="undefined"||typeof window.Cordova!="undefined"||typeof window.cordova!="undefined")};function NRe(e){return new Promise(function(t,r){var n=new FileReader;n.onload=function(){var i=new Uint8Array(n.result);t({value:i})},n.onerror=function(i){r(i)},n.readAsArrayBuffer(e)})}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 CRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TRe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,PRe(n.key),n)}}function ARe(e,t,r){return t&&TRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PRe(e){var t=ORe(e,"string");return Dh(t)=="symbol"?t:t+""}function ORe(e,t){if(Dh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var OM=function(){function e(t){CRe(this,e),this._file=t,this.size=t.size}return ARe(e,[{key:"slice",value:function(r,n){if(ERe())return NRe(this._file.slice(r,n));var i=this._file.slice(r,n),a=n>=this.size;return Promise.resolve({value:i,done:a})}},{key:"close",value:function(){}}])}();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 RRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Re(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DRe(n.key),n)}}function MRe(e,t,r){return t&&$Re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DRe(e){var t=IRe(e,"string");return Ih(t)=="symbol"?t:t+""}function IRe(e,t){if(Ih(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ih(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RM(e){return e===void 0?0:e.size!==void 0?e.size:e.length}function LRe(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}throw new Error("Unknown data type")}var zRe=function(){function e(t){RRe(this,e),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return MRe(e,[{key:"slice",value:function(r,n){return r<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(r,n)}},{key:"_readUntilEnoughDataOrDone",value:function(r,n){var i=this,a=n<=this._bufferOffset+RM(this._buffer);if(this._done||a){var o=this._getDataFromBuffer(r,n),s=o==null?this._done:!1;return Promise.resolve({value:o,done:s})}return this._reader.read().then(function(c){var u=c.value,f=c.done;return f?i._done=!0:i._buffer===void 0?i._buffer=u:i._buffer=LRe(i._buffer,u),i._readUntilEnoughDataOrDone(r,n)})}},{key:"_getDataFromBuffer",value:function(r,n){r>this._bufferOffset&&(this._buffer=this._buffer.slice(r-this._bufferOffset),this._bufferOffset=r);var i=RM(this._buffer)===0;return this._done&&i?null:this._buffer.slice(0,n-r)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])}();function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function X_(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */X_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(O,P,A){O[P]=A.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(O,P,A){return Object.defineProperty(O,P,{value:A,enumerable:!0,configurable:!0,writable:!0}),O[P]}try{u({},"")}catch(O){u=function(A,D,B){return A[D]=B}}function f(O,P,A,D){var B=P&&P.prototype instanceof x?P:x,z=Object.create(B.prototype),K=new U(D||[]);return i(z,"_invoke",{value:R(O,A,K)}),z}function d(O,P,A){try{return{type:"normal",arg:O.call(P,A)}}catch(D){return{type:"throw",arg:D}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",v={};function x(){}function b(){}function y(){}var j={};u(j,o,function(){return this});var k=Object.getPrototypeOf,_=k&&k(k(F([])));_&&_!==r&&n.call(_,o)&&(j=_);var S=y.prototype=x.prototype=Object.create(j);function E(O){["next","throw","return"].forEach(function(P){u(O,P,function(A){return this._invoke(P,A)})})}function C(O,P){function A(B,z,K,Y){var G=d(O[B],O,z);if(G.type!=="throw"){var re=G.arg,le=re.value;return le&&ol(le)=="object"&&n.call(le,"__await")?P.resolve(le.__await).then(function(me){A("next",me,K,Y)},function(me){A("throw",me,K,Y)}):P.resolve(le).then(function(me){re.value=me,K(re)},function(me){return A("throw",me,K,Y)})}Y(G.arg)}var D;i(this,"_invoke",{value:function(z,K){function Y(){return new P(function(G,re){A(z,K,G,re)})}return D=D?D.then(Y,Y):Y()}})}function R(O,P,A){var D=h;return function(B,z){if(D===m)throw Error("Generator is already running");if(D===g){if(B==="throw")throw z;return{value:e,done:!0}}for(A.method=B,A.arg=z;;){var K=A.delegate;if(K){var Y=M(K,A);if(Y){if(Y===v)continue;return Y}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(D===h)throw D=g,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);D=m;var G=d(O,P,A);if(G.type==="normal"){if(D=A.done?g:p,G.arg===v)continue;return{value:G.arg,done:A.done}}G.type==="throw"&&(D=g,A.method="throw",A.arg=G.arg)}}}function M(O,P){var A=P.method,D=O.iterator[A];if(D===e)return P.delegate=null,A==="throw"&&O.iterator.return&&(P.method="return",P.arg=e,M(O,P),P.method==="throw")||A!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+A+"' method")),v;var B=d(D,O.iterator,P.arg);if(B.type==="throw")return P.method="throw",P.arg=B.arg,P.delegate=null,v;var z=B.arg;return z?z.done?(P[O.resultName]=z.value,P.next=O.nextLoc,P.method!=="return"&&(P.method="next",P.arg=e),P.delegate=null,v):z:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,v)}function L(O){var P={tryLoc:O[0]};1 in O&&(P.catchLoc=O[1]),2 in O&&(P.finallyLoc=O[2],P.afterLoc=O[3]),this.tryEntries.push(P)}function H(O){var P=O.completion||{};P.type="normal",delete P.arg,O.completion=P}function U(O){this.tryEntries=[{tryLoc:"root"}],O.forEach(L,this),this.reset(!0)}function F(O){if(O||O===""){var P=O[o];if(P)return P.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var A=-1,D=function B(){for(;++A<O.length;)if(n.call(O,A))return B.value=O[A],B.done=!1,B;return B.value=e,B.done=!0,B};return D.next=D}}throw new TypeError(ol(O)+" is not iterable")}return b.prototype=y,i(S,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:b,configurable:!0}),b.displayName=u(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(O){var P=typeof O=="function"&&O.constructor;return!!P&&(P===b||(P.displayName||P.name)==="GeneratorFunction")},t.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,y):(O.__proto__=y,u(O,c,"GeneratorFunction")),O.prototype=Object.create(S),O},t.awrap=function(O){return{__await:O}},E(C.prototype),u(C.prototype,s,function(){return this}),t.AsyncIterator=C,t.async=function(O,P,A,D,B){B===void 0&&(B=Promise);var z=new C(f(O,P,A,D),B);return t.isGeneratorFunction(P)?z:z.next().then(function(K){return K.done?K.value:z.next()})},E(S),u(S,c,"Generator"),u(S,o,function(){return this}),u(S,"toString",function(){return"[object Generator]"}),t.keys=function(O){var P=Object(O),A=[];for(var D in P)A.push(D);return A.reverse(),function B(){for(;A.length;){var z=A.pop();if(z in P)return B.value=z,B.done=!1,B}return B.done=!0,B}},t.values=F,U.prototype={constructor:U,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(H),!P)for(var A in this)A.charAt(0)==="t"&&n.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=e)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var A=this;function D(re,le){return K.type="throw",K.arg=P,A.next=re,le&&(A.method="next",A.arg=e),!!le}for(var B=this.tryEntries.length-1;B>=0;--B){var z=this.tryEntries[B],K=z.completion;if(z.tryLoc==="root")return D("end");if(z.tryLoc<=this.prev){var Y=n.call(z,"catchLoc"),G=n.call(z,"finallyLoc");if(Y&&G){if(this.prev<z.catchLoc)return D(z.catchLoc,!0);if(this.prev<z.finallyLoc)return D(z.finallyLoc)}else if(Y){if(this.prev<z.catchLoc)return D(z.catchLoc,!0)}else{if(!G)throw Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return D(z.finallyLoc)}}}},abrupt:function(P,A){for(var D=this.tryEntries.length-1;D>=0;--D){var B=this.tryEntries[D];if(B.tryLoc<=this.prev&&n.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var z=B;break}}z&&(P==="break"||P==="continue")&&z.tryLoc<=A&&A<=z.finallyLoc&&(z=null);var K=z?z.completion:{};return K.type=P,K.arg=A,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(K)},complete:function(P,A){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&A&&(this.next=A),v},finish:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var D=this.tryEntries[A];if(D.finallyLoc===P)return this.complete(D.completion,D.afterLoc),H(D),v}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var D=this.tryEntries[A];if(D.tryLoc===P){var B=D.completion;if(B.type==="throw"){var z=B.arg;H(D)}return z}}throw Error("illegal catch attempt")},delegateYield:function(P,A,D){return this.delegate={iterator:F(P),resultName:A,nextLoc:D},this.method==="next"&&(this.arg=e),v}},t}function $M(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(u){r(u);return}s.done?t(c):Promise.resolve(c).then(n,i)}function BRe(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(c){$M(a,n,i,o,s,"next",c)}function s(c){$M(a,n,i,o,s,"throw",c)}o(void 0)})}}function URe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FRe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,HRe(n.key),n)}}function KRe(e,t,r){return t&&FRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HRe(e){var t=VRe(e,"string");return ol(t)=="symbol"?t:t+""}function VRe(e,t){if(ol(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ol(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var WRe=function(){function e(){URe(this,e)}return KRe(e,[{key:"openFile",value:function(){var t=BRe(X_().mark(function n(i,a){var o;return X_().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!(q8()&&i&&typeof i.uri!="undefined")){c.next=11;break}return c.prev=1,c.next=4,SRe(i.uri);case 4:return o=c.sent,c.abrupt("return",new OM(o));case 8:throw c.prev=8,c.t0=c.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(c.t0));case 11:if(!(typeof i.slice=="function"&&typeof i.size!="undefined")){c.next=13;break}return c.abrupt("return",Promise.resolve(new OM(i)));case 13:if(typeof i.read!="function"){c.next=18;break}if(a=Number(a),Number.isFinite(a)){c.next=17;break}return c.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return c.abrupt("return",Promise.resolve(new zRe(i,a)));case 18:return c.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return c.stop()}},n,null,[[1,8]])}));function r(n,i){return t.apply(this,arguments)}return r}()}])}();function qRe(e,t){return q8()?Promise.resolve(GRe(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}function GRe(e,t){var r=e.exif?YRe(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",r,t.endpoint].join("/")}function YRe(e){var t=0;if(e.length===0)return t;for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);t=(t<<5)-t+n,t&=t}return t}function Lh(e){"@babel/helpers - typeof";return Lh=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},Lh(e)}function YN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XRe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,JRe(n.key),n)}}function XN(e,t,r){return t&&XRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JRe(e){var t=QRe(e,"string");return Lh(t)=="symbol"?t:t+""}function QRe(e,t){if(Lh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZRe=function(){function e(){YN(this,e)}return XN(e,[{key:"createRequest",value:function(r,n){return new e$e(r,n)}},{key:"getName",value:function(){return"XHRHttpStack"}}])}(),e$e=function(){function e(t,r){YN(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}}return XN(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(r,n){this._xhr.setRequestHeader(r,n),this._headers[r]=n}},{key:"getHeader",value:function(r){return this._headers[r]}},{key:"setProgressHandler",value:function(r){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(n){n.lengthComputable&&r(n.loaded)})}},{key:"send",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(i,a){r._xhr.onload=function(){i(new t$e(r._xhr))},r._xhr.onerror=function(o){a(o)},r._xhr.send(n)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}(),t$e=function(){function e(t){YN(this,e),this._xhr=t}return XN(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(r){return this._xhr.getResponseHeader(r)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}();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 r$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a$e(n.key),n)}}function i$e(e,t,r){return t&&n$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a$e(e){var t=o$e(e,"string");return zh(t)=="symbol"?t:t+""}function o$e(e,t){if(zh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var J_=!1;try{J_="localStorage"in window;var q0="tusSupport",MM=localStorage.getItem(q0);localStorage.setItem(q0,MM),MM===null&&localStorage.removeItem(q0)}catch(e){if(e.code===e.SECURITY_ERR||e.code===e.QUOTA_EXCEEDED_ERR)J_=!1;else throw e}var s$e=J_,l$e=function(){function e(){r$e(this,e)}return i$e(e,[{key:"findAllUploads",value:function(){var r=this._findEntries("tus::");return Promise.resolve(r)}},{key:"findUploadsByFingerprint",value:function(r){var n=this._findEntries("tus::".concat(r,"::"));return Promise.resolve(n)}},{key:"removeUpload",value:function(r){return localStorage.removeItem(r),Promise.resolve()}},{key:"addUpload",value:function(r,n){var i=Math.round(Math.random()*1e12),a="tus::".concat(r,"::").concat(i);return localStorage.setItem(a,JSON.stringify(n)),Promise.resolve(a)}},{key:"_findEntries",value:function(r){for(var n=[],i=0;i<localStorage.length;i++){var a=localStorage.key(i);if(a.indexOf(r)===0)try{var o=JSON.parse(localStorage.getItem(a));o.urlStorageKey=a,n.push(o)}catch(s){}}return n}}])}();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 c$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y8(n.key),n)}}function d$e(e,t,r){return r&&u$e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f$e(e,t,r){return t=ov(t),h$e(e,G8()?Reflect.construct(t,r||[],ov(e).constructor):t.apply(e,r))}function h$e(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 p$e(e)}function p$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(G8=function(){return!!e})()}function ov(e){return ov=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ov(e)}function m$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&&Q_(e,t)}function Q_(e,t){return Q_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Q_(e,t)}function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(r),!0).forEach(function(n){g$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g$e(e,t,r){return t=Y8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y8(e){var t=y$e(e,"string");return ju(t)=="symbol"?t:t+""}function y$e(e,t){if(ju(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ju(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IM=sc(sc({},av.defaultOptions),{},{httpStack:new ZRe,fileReader:new WRe,urlStorage:s$e?new l$e:new B2e,fingerprint:qRe}),v$e=function(e){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return c$e(this,t),n=sc(sc({},IM),n),f$e(this,t,[r,n])}return m$e(t,e),d$e(t,null,[{key:"terminate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i=sc(sc({},IM),i),av.terminate(n,i)}}])}(av);const sv=500,X8=sv*1024*1024;function Z_(e){return e<1024*1024?"".concat((e/1024).toFixed(0)," KB"):"".concat((e/(1024*1024)).toFixed(1)," MB")}function x$e({lessons:e,onChange:t}){const r=()=>{t([...e,{title:"",duration:"",audio_url:"",order:e.length+1,isNew:!0}])},n=(o,s,c)=>{const u=[...e];u[o][s]=c,t(u)},i=o=>{const s=e.filter((c,u)=>u!==o);s.forEach((c,u)=>c.order=u+1),t(s)},a=(o,s)=>{if(s.size>X8){ee.error("Dosya boyutu çok büyük (".concat(Z_(s.size),"). Maksimum ").concat(sv,"MB yükleyebilirsiniz. Lütfen dosyayı sıkıştırarak tekrar deneyin."));return}const c=[...e];c[o].audioFile=s,t(c)};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Ders İçeriği"}),l.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-primary/10 text-primary text-xs font-medium hover:bg-primary/20 transition-colors",children:[l.jsx(Xo,{size:14})," Ders Ekle"]})]}),e.length===0&&l.jsxs("div",{className:"text-center py-8 border-2 border-dashed border-border rounded-xl",children:[l.jsx(_7,{size:24,className:"mx-auto text-muted-foreground mb-2"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Henüz ders eklenmemiş."}),l.jsx("button",{type:"button",onClick:r,className:"mt-3 text-xs text-primary font-medium hover:underline",children:"İlk dersi ekle"})]}),l.jsx("div",{className:"space-y-3",children:e.map((o,s)=>l.jsx("div",{className:"p-4 rounded-xl border border-border bg-background space-y-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("div",{className:"flex items-center gap-1 pt-2.5 text-muted-foreground",children:[l.jsx(yS,{size:14}),l.jsxs("span",{className:"text-xs font-medium w-5 text-center",children:[s+1,"."]})]}),l.jsxs("div",{className:"flex-1 space-y-3",children:[l.jsx("input",{type:"text",value:o.title,onChange:c=>n(s,"title",c.target.value),placeholder:"Ders başlığı",className:"w-full px-3 py-2 rounded-lg border border-border bg-card text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("input",{type:"text",value:o.duration,onChange:c=>n(s,"duration",c.target.value),placeholder:"Süre (ör: 12 dk)",className:"w-32 px-3 py-2 rounded-lg border border-border bg-card text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"}),l.jsxs("label",{className:"flex-1 flex items-center gap-2 px-3 py-2 rounded-lg border border-dashed border-border bg-card text-sm cursor-pointer hover:border-primary/40 transition-colors",children:[l.jsx(o1,{size:14,className:"text-muted-foreground shrink-0"}),l.jsx("span",{className:"text-muted-foreground truncate text-xs",children:o.audioFile?"".concat(o.audioFile.name," (").concat(Z_(o.audioFile.size),")"):o.audio_url?"Ses dosyası mevcut ✓":"Ses dosyası yükle"}),l.jsx("input",{type:"file",accept:"audio/*",className:"hidden",onChange:c=>{var f;const u=(f=c.target.files)==null?void 0:f[0];u&&a(s,u)}})]})]})]}),l.jsx("button",{type:"button",onClick:()=>i(s),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors mt-1",children:l.jsx(pi,{size:14,className:"text-destructive"})})]})},s))}),l.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[l.jsx(s7,{size:12}),"Maksimum dosya boyutu: ",sv,"MB. Büyük dosyalar otomatik olarak parçalı yüklenir."]})]})}let Nc=null;function b$e(){Nc&&(Nc.abort(),Nc=null)}function w$e(e,t,r,n,i){return new Promise((a,o)=>{const s="https://xvdpcfxfzrgppoefeptu.supabase.co",c=new v$e(r,{endpoint:"".concat(s,"/storage/v1/upload/resumable"),retryDelays:[0,1e3,3e3,5e3],headers:{authorization:"Bearer ".concat(n),"x-upsert":"true"},uploadDataDuringCreation:!0,removeFingerprintOnSuccess:!0,metadata:{bucketName:e,objectName:t,contentType:r.type,cacheControl:"3600"},chunkSize:6291456,onError:u=>{Nc=null,o(new Error("Yükleme hatası: ".concat(u.message)))},onProgress:(u,f)=>{const d=Math.round(u/f*100);i==null||i(d)},onSuccess:()=>{Nc=null,a()}});Nc=c,c.findPreviousUploads().then(u=>{u.length&&c.resumeFromPreviousUpload(u[0]),c.start()})})}function k$e(e,t,r){return T(this,null,function*(){const i=e.filter(u=>u.audioFile).length;let a=0;const{data:{session:o}}=yield Q.auth.getSession(),s=o==null?void 0:o.access_token;if(!s)throw new Error("Oturum bulunamadı. Lütfen tekrar giriş yapın.");const c=[];for(const u of e){let f=u.audio_url;if(u.audioFile){if(u.audioFile.size>X8)throw new Error('"'.concat(u.title,'" dosyası çok büyük (').concat(Z_(u.audioFile.size),"). Maksimum ").concat(sv,"MB."));const d=u.audioFile.name.split(".").pop(),h="".concat(t,"/lesson-").concat(u.order,"-").concat(Date.now(),".").concat(d);yield w$e("lesson-audio",h,u.audioFile,s,p=>{const m=Math.round((a+p/100)/i*100);r==null||r({currentLesson:a+1,totalLessons:i,lessonTitle:u.title||"Ders ".concat(u.order),percent:m})}),f=h,a++,r==null||r({currentLesson:a,totalLessons:i,lessonTitle:u.title||"Ders ".concat(u.order),percent:Math.round(a/i*100)})}c.push(I(N({},u),{audio_url:f,audioFile:void 0}))}return c})}function _$e({form:e,onChange:t}){const r=(n,i)=>t(I(N({},e),{[n]:i}));return l.jsxs("div",{className:"space-y-5",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2",children:"Etkinlik Bilgileri"}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Etkinlik Tarihi"}),l.jsx("input",{type:"date",value:e.event_date||"",onChange:n=>r("event_date",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Başlangıç Saati"}),l.jsx("input",{type:"time",value:e.start_time||"",onChange:n=>r("start_time",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Bitiş Saati"}),l.jsx("input",{type:"time",value:e.end_time||"",onChange:n=>r("end_time",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Zoom Toplantı Linki"}),l.jsx("input",{type:"url",value:e.zoom_link||"",onChange:n=>r("zoom_link",n.target.value),placeholder:"https://zoom.us/j/...",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Zoom Meeting ID"}),l.jsx("input",{type:"text",value:e.zoom_meeting_id||"",onChange:n=>r("zoom_meeting_id",n.target.value),placeholder:"123 456 7890",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Zoom Şifresi"}),l.jsx("input",{type:"text",value:e.zoom_password||"",onChange:n=>r("zoom_password",n.target.value),placeholder:"abc123",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kontenjan (opsiyonel)"}),l.jsx("input",{type:"number",value:e.capacity||"",onChange:n=>r("capacity",n.target.value),placeholder:"50",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Tekrar İzleme Ayarları"}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:e.has_replay||!1,onChange:n=>r("has_replay",n.target.checked),className:"rounded border-border"}),"Kayıt Tekrarı Mevcut"]}),e.has_replay&&l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Tekrar İzleme Süresi (gün)"}),l.jsx("input",{type:"number",value:e.replay_days||"",onChange:n=>r("replay_days",n.target.value),placeholder:"7",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Video URL (opsiyonel)"}),l.jsx("input",{type:"url",value:e.replay_video_url||"",onChange:n=>r("replay_video_url",n.target.value),placeholder:"https://...",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]})]})}function j$e({form:e,onChange:t}){const r=(n,i)=>t(I(N({},e),{[n]:i}));return l.jsxs("div",{className:"space-y-5",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2",children:"Etkinlik Bilgileri"}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Etkinlik Tarihi"}),l.jsx("input",{type:"date",value:e.event_date||"",onChange:n=>r("event_date",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Başlangıç Saati"}),l.jsx("input",{type:"time",value:e.start_time||"",onChange:n=>r("start_time",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Bitiş Saati"}),l.jsx("input",{type:"time",value:e.end_time||"",onChange:n=>r("end_time",n.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kontenjan (opsiyonel)"}),l.jsx("input",{type:"number",value:e.capacity||"",onChange:n=>r("capacity",n.target.value),placeholder:"30",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Konum Bilgileri"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Mekan Adı"}),l.jsx("input",{type:"text",value:e.venue_name||"",onChange:n=>r("venue_name",n.target.value),placeholder:"MindSoul Academy Merkezi",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Adres"}),l.jsx("input",{type:"text",value:e.address||"",onChange:n=>r("address",n.target.value),placeholder:"Tam adres",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Şehir"}),l.jsx("input",{type:"text",value:e.city||"",onChange:n=>r("city",n.target.value),placeholder:"Lefkoşa",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Google Maps Linki"}),l.jsx("input",{type:"url",value:e.maps_link||"",onChange:n=>r("maps_link",n.target.value),placeholder:"https://maps.google.com/...",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Ek Bilgiler"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Katılımcı Notları"}),l.jsx("textarea",{value:e.participant_notes||"",onChange:n=>r("participant_notes",n.target.value),rows:3,placeholder:"Katılımcılara önemli notlar...",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ne Getirilmeli (opsiyonel)"}),l.jsx("textarea",{value:e.what_to_bring||"",onChange:n=>r("what_to_bring",n.target.value),rows:2,placeholder:"Yoga matı, su şişesi...",className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none"})]})]})}function S$e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return w.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const Jx=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function Zu(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function JN(e){return"nodeType"in e}function rn(e){var t,r;return e?Zu(e)?e:JN(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function QN(e){const{Document:t}=rn(e);return e instanceof t}function vp(e){return Zu(e)?!1:e instanceof rn(e).HTMLElement}function J8(e){return e instanceof rn(e).SVGElement}function ed(e){return e?Zu(e)?e.document:JN(e)?QN(e)?e:vp(e)||J8(e)?e.ownerDocument:document:document:document}const ra=Jx?w.useLayoutEffect:w.useEffect;function ZN(e){const t=w.useRef(e);return ra(()=>{t.current=e}),w.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function E$e(){const e=w.useRef(null),t=w.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=w.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Bh(e,t){t===void 0&&(t=[e]);const r=w.useRef(e);return ra(()=>{r.current!==e&&(r.current=e)},t),r}function xp(e,t){const r=w.useRef();return w.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function lv(e){const t=ZN(e),r=w.useRef(null),n=w.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function ej(e){const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current}let G0={};function bp(e,t){return w.useMemo(()=>{if(t)return t;const r=G0[e]==null?0:G0[e]+1;return G0[e]=r,e+"-"+r},[e,t])}function Q8(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((a,o)=>{const s=Object.entries(o);for(const[c,u]of s){const f=a[c];f!=null&&(a[c]=f+e*u)}return a},N({},t))}}const Cc=Q8(1),Uh=Q8(-1);function N$e(e){return"clientX"in e&&"clientY"in e}function eC(e){if(!e)return!1;const{KeyboardEvent:t}=rn(e.target);return t&&e instanceof t}function C$e(e){if(!e)return!1;const{TouchEvent:t}=rn(e.target);return t&&e instanceof t}function tj(e){if(C$e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return N$e(e)?{x:e.clientX,y:e.clientY}:null}const Su=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Su.Translate.toString(e),Su.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),LM="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function T$e(e){return e.matches(LM)?e:e.querySelector(LM)}const A$e={display:"none"};function P$e(e){let{id:t,value:r}=e;return $.createElement("div",{id:t,style:A$e},r)}function O$e(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function R$e(){const[e,t]=w.useState("");return{announce:w.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const Z8=w.createContext(null);function $$e(e){const t=w.useContext(Z8);w.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function M$e(){const[e]=w.useState(()=>new Set),t=w.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[w.useCallback(n=>{let{type:i,event:a}=n;e.forEach(o=>{var s;return(s=o[i])==null?void 0:s.call(o,a)})},[e]),t]}const D$e={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},I$e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function L$e(e){let{announcements:t=I$e,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=D$e}=e;const{announce:a,announcement:o}=R$e(),s=bp("DndLiveRegion"),[c,u]=w.useState(!1);if(w.useEffect(()=>{u(!0)},[]),$$e(w.useMemo(()=>({onDragStart(d){let{active:h}=d;a(t.onDragStart({active:h}))},onDragMove(d){let{active:h,over:p}=d;t.onDragMove&&a(t.onDragMove({active:h,over:p}))},onDragOver(d){let{active:h,over:p}=d;a(t.onDragOver({active:h,over:p}))},onDragEnd(d){let{active:h,over:p}=d;a(t.onDragEnd({active:h,over:p}))},onDragCancel(d){let{active:h,over:p}=d;a(t.onDragCancel({active:h,over:p}))}}),[a,t])),!c)return null;const f=$.createElement($.Fragment,null,$.createElement(P$e,{id:n,value:i.draggable}),$.createElement(O$e,{id:s,announcement:o}));return r?zi.createPortal(f,r):f}var tr;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(tr||(tr={}));function cv(){}function rj(e,t){return w.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function eK(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return w.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const xi=Object.freeze({x:0,y:0});function tK(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rK(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function z$e(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function zM(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function nK(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function BM(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const iK=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=BM(t,t.left,t.top),a=[];for(const o of n){const{id:s}=o,c=r.get(s);if(c){const u=tK(BM(c),i);a.push({id:s,data:{droppableContainer:o,value:u}})}}return a.sort(rK)},B$e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=zM(t),a=[];for(const o of n){const{id:s}=o,c=r.get(s);if(c){const u=zM(c),f=i.reduce((h,p,m)=>h+tK(u[m],p),0),d=Number((f/4).toFixed(4));a.push({id:s,data:{droppableContainer:o,value:d}})}}return a.sort(rK)};function U$e(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){const c=t.width*t.height,u=e.width*e.height,f=o*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const F$e=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const a of n){const{id:o}=a,s=r.get(o);if(s){const c=U$e(s,t);c>0&&i.push({id:o,data:{droppableContainer:a,value:c}})}}return i.sort(z$e)};function K$e(e,t,r){return I(N({},e),{scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1})}function aK(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:xi}function H$e(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>I(N({},o),{top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),N({},r))}}const V$e=H$e(1);function W$e(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function q$e(e,t,r){const n=W$e(t);if(!n)return e;const{scaleX:i,scaleY:a,x:o,y:s}=n,c=e.left-o-(1-i)*parseFloat(r),u=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),f=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const G$e={ignoreTransform:!1};function td(e,t){t===void 0&&(t=G$e);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=rn(e).getComputedStyle(e);u&&(r=q$e(r,u,f))}const{top:n,left:i,width:a,height:o,bottom:s,right:c}=r;return{top:n,left:i,width:a,height:o,bottom:s,right:c}}function UM(e){return td(e,{ignoreTransform:!0})}function Y$e(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function X$e(e,t){return t===void 0&&(t=rn(e).getComputedStyle(e)),t.position==="fixed"}function J$e(e,t){t===void 0&&(t=rn(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?r.test(a):!1})}function Qx(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(QN(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!vp(i)||J8(i)||r.includes(i))return r;const a=rn(e).getComputedStyle(i);return i!==e&&J$e(i,a)&&r.push(i),X$e(i,a)?r:n(i.parentNode)}return e?n(e):r}function oK(e){const[t]=Qx(e,1);return t!=null?t:null}function Y0(e){return!Jx||!e?null:Zu(e)?e:JN(e)?QN(e)||e===ed(e).scrollingElement?window:vp(e)?e:null:null}function sK(e){return Zu(e)?e.scrollX:e.scrollLeft}function lK(e){return Zu(e)?e.scrollY:e.scrollTop}function nj(e){return{x:sK(e),y:lK(e)}}var lr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(lr||(lr={}));function cK(e){return!Jx||!e?!1:e===document.scrollingElement}function uK(e){const t={x:0,y:0},r=cK(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}const Q$e={x:.2,y:.2};function Z$e(e,t,r,n,i){let{top:a,left:o,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=Q$e);const{isTop:u,isBottom:f,isLeft:d,isRight:h}=uK(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&a<=t.top+g.height?(p.y=lr.Backward,m.y=n*Math.abs((t.top+g.height-a)/g.height)):!f&&c>=t.bottom-g.height&&(p.y=lr.Forward,m.y=n*Math.abs((t.bottom-g.height-c)/g.height)),!h&&s>=t.right-g.width?(p.x=lr.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!d&&o<=t.left+g.width&&(p.x=lr.Backward,m.x=n*Math.abs((t.left+g.width-o)/g.width)),{direction:p,speed:m}}function eMe(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function dK(e){return e.reduce((t,r)=>Cc(t,nj(r)),xi)}function tMe(e){return e.reduce((t,r)=>t+sK(r),0)}function rMe(e){return e.reduce((t,r)=>t+lK(r),0)}function nMe(e,t){if(t===void 0&&(t=td),!e)return;const{top:r,left:n,bottom:i,right:a}=t(e);oK(e)&&(i<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const iMe=[["x",["left","right"],tMe],["y",["top","bottom"],rMe]];class tC{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Qx(r),i=dK(n);this.rect=N({},t),this.width=t.width,this.height=t.height;for(const[a,o,s]of iMe)for(const c of o)Object.defineProperty(this,c,{get:()=>{const u=s(n),f=i[a]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class hf{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function aMe(e){const{EventTarget:t}=rn(e);return e instanceof t?e:ed(e)}function X0(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(qa(r,2)+qa(n,2))>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Pn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pn||(Pn={}));function FM(e){e.preventDefault()}function oMe(e){e.stopPropagation()}var We;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(We||(We={}));const fK={start:[We.Space,We.Enter],cancel:[We.Esc],end:[We.Space,We.Enter,We.Tab]},sMe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case We.Right:return I(N({},r),{x:r.x+25});case We.Left:return I(N({},r),{x:r.x-25});case We.Down:return I(N({},r),{y:r.y+25});case We.Up:return I(N({},r),{y:r.y-25})}};class rC{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new hf(ed(r)),this.windowListeners=new hf(rn(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&nMe(n),r(xi)}handleKeyDown(t){if(eC(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:a=fK,coordinateGetter:o=sMe,scrollBehavior:s="smooth"}=i,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,f=u?{x:u.left,y:u.top}:xi;this.referenceCoordinates||(this.referenceCoordinates=f);const d=o(t,{active:r,context:n.current,currentCoordinates:f});if(d){const h=Uh(d,f),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:x,isRight:b,isLeft:y,isBottom:j,maxScroll:k,minScroll:_}=uK(g),S=eMe(g),E={x:Math.min(v===We.Right?S.right-S.width/2:S.right,Math.max(v===We.Right?S.left:S.left+S.width/2,d.x)),y:Math.min(v===We.Down?S.bottom-S.height/2:S.bottom,Math.max(v===We.Down?S.top:S.top+S.height/2,d.y))},C=v===We.Right&&!b||v===We.Left&&!y,R=v===We.Down&&!j||v===We.Up&&!x;if(C&&E.x!==d.x){const M=g.scrollLeft+h.x,L=v===We.Right&&M<=k.x||v===We.Left&&M>=_.x;if(L&&!h.y){g.scrollTo({left:M,behavior:s});return}L?p.x=g.scrollLeft-M:p.x=v===We.Right?g.scrollLeft-k.x:g.scrollLeft-_.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(R&&E.y!==d.y){const M=g.scrollTop+h.y,L=v===We.Down&&M<=k.y||v===We.Up&&M>=_.y;if(L&&!h.x){g.scrollTo({top:M,behavior:s});return}L?p.y=g.scrollTop-M:p.y=v===We.Down?g.scrollTop-k.y:g.scrollTop-_.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Cc(Uh(d,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}rC.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=fK,onActivation:i}=t,{active:a}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function KM(e){return!!(e&&"distance"in e)}function HM(e){return!!(e&&"delay"in e)}class nC{constructor(t,r,n){var i;n===void 0&&(n=aMe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=ed(o),this.documentListeners=new hf(this.document),this.listeners=new hf(n),this.windowListeners=new hf(rn(o)),this.initialCoordinates=(i=tj(a))!=null?i:xi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Pn.Resize,this.handleCancel),this.windowListeners.add(Pn.DragStart,FM),this.windowListeners.add(Pn.VisibilityChange,this.handleCancel),this.windowListeners.add(Pn.ContextMenu,FM),this.documentListeners.add(Pn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(HM(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(KM(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Pn.Click,oMe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:s}}=a;if(!i)return;const c=(r=tj(t))!=null?r:xi,u=Uh(i,c);if(!n&&s){if(KM(s)){if(s.tolerance!=null&&X0(u,s.tolerance))return this.handleCancel();if(X0(u,s.distance))return this.handleStart()}if(HM(s)&&X0(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),o(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===We.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lMe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Zx extends nC{constructor(t){const{event:r}=t,n=ed(r.target);super(t,lMe,n)}}Zx.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const cMe={move:{name:"mousemove"},end:{name:"mouseup"}};var ij;(function(e){e[e.RightClick=2]="RightClick"})(ij||(ij={}));class uMe extends nC{constructor(t){super(t,cMe,ed(t.event.target))}}uMe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===ij.RightClick?!1:(n==null||n({event:r}),!0)}}];const J0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dMe extends nC{constructor(t){super(t,J0)}static setup(){return window.addEventListener(J0.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(J0.move.name,t)};function t(){}}}dMe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var pf;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(pf||(pf={}));var uv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(uv||(uv={}));function fMe(e){let{acceleration:t,activator:r=pf.Pointer,canScroll:n,draggingRect:i,enabled:a,interval:o=5,order:s=uv.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:h}=e;const p=pMe({delta:d,disabled:!a}),[m,g]=E$e(),v=w.useRef({x:0,y:0}),x=w.useRef({x:0,y:0}),b=w.useMemo(()=>{switch(r){case pf.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case pf.DraggableRect:return i}},[r,i,c]),y=w.useRef(null),j=w.useCallback(()=>{const _=y.current;if(!_)return;const S=v.current.x*x.current.x,E=v.current.y*x.current.y;_.scrollBy(S,E)},[]),k=w.useMemo(()=>s===uv.TreeOrder?[...u].reverse():u,[s,u]);w.useEffect(()=>{if(!a||!u.length||!b){g();return}for(const _ of k){if((n==null?void 0:n(_))===!1)continue;const S=u.indexOf(_),E=f[S];if(!E)continue;const{direction:C,speed:R}=Z$e(_,E,b,t,h);for(const M of["x","y"])p[M][C[M]]||(R[M]=0,C[M]=0);if(R.x>0||R.y>0){g(),y.current=_,m(j,o),v.current=R,x.current=C;return}}v.current={x:0,y:0},x.current={x:0,y:0},g()},[t,j,n,g,a,o,JSON.stringify(b),JSON.stringify(p),m,u,k,f,JSON.stringify(h)])}const hMe={x:{[lr.Backward]:!1,[lr.Forward]:!1},y:{[lr.Backward]:!1,[lr.Forward]:!1}};function pMe(e){let{delta:t,disabled:r}=e;const n=ej(t);return xp(i=>{if(r||!n||!i)return hMe;const a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[lr.Backward]:i.x[lr.Backward]||a.x===-1,[lr.Forward]:i.x[lr.Forward]||a.x===1},y:{[lr.Backward]:i.y[lr.Backward]||a.y===-1,[lr.Forward]:i.y[lr.Forward]||a.y===1}}},[r,t,n])}function mMe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return xp(i=>{var a;return t==null?null:(a=n!=null?n:i)!=null?a:null},[n,t])}function gMe(e,t){return w.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var Fh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Fh||(Fh={}));var aj;(function(e){e.Optimized="optimized"})(aj||(aj={}));const VM=new Map;function yMe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[a,o]=w.useState(null),{frequency:s,measure:c,strategy:u}=i,f=w.useRef(e),d=v(),h=Bh(d),p=w.useCallback(function(x){x===void 0&&(x=[]),!h.current&&o(b=>b===null?x:b.concat(x.filter(y=>!b.includes(y))))},[h]),m=w.useRef(null),g=xp(x=>{if(d&&!r)return VM;if(!x||x===VM||f.current!==e||a!=null){const b=new Map;for(let y of e){if(!y)continue;if(a&&a.length>0&&!a.includes(y.id)&&y.rect.current){b.set(y.id,y.rect.current);continue}const j=y.node.current,k=j?new tC(c(j),j):null;y.rect.current=k,k&&b.set(y.id,k)}return b}return x},[e,a,r,d,c]);return w.useEffect(()=>{f.current=e},[e]),w.useEffect(()=>{d||p()},[r,d]),w.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),w.useEffect(()=>{d||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:a!=null};function v(){switch(u){case Fh.Always:return!1;case Fh.BeforeDragging:return r;default:return!r}}}function hK(e,t){return xp(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function vMe(e,t){return hK(e,t)}function xMe(e){let{callback:t,disabled:r}=e;const n=ZN(t),i=w.useMemo(()=>{if(r||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:a}=window;return new a(n)},[n,r]);return w.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function eb(e){let{callback:t,disabled:r}=e;const n=ZN(t),i=w.useMemo(()=>{if(r||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:a}=window;return new a(n)},[r]);return w.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bMe(e){return new tC(td(e),e)}function WM(e,t,r){t===void 0&&(t=bMe);const[n,i]=w.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c!=null?c:r)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const o=xMe({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),s=eb({callback:a});return ra(()=>{a(),e?(s==null||s.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),o==null||o.disconnect())},[e]),n}function wMe(e){const t=hK(e);return aK(e,t)}const qM=[];function kMe(e){const t=w.useRef(e),r=xp(n=>e?n&&n!==qM&&e&&t.current&&e.parentNode===t.current.parentNode?n:Qx(e):qM,[e]);return w.useEffect(()=>{t.current=e},[e]),r}function _Me(e){const[t,r]=w.useState(null),n=w.useRef(e),i=w.useCallback(a=>{const o=Y0(a.target);o&&r(s=>s?(s.set(o,nj(o)),new Map(s)):null)},[]);return w.useEffect(()=>{const a=n.current;if(e!==a){o(a);const s=e.map(c=>{const u=Y0(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,nj(u)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(a)};function o(s){s.forEach(c=>{const u=Y0(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),w.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Cc(a,o),xi):dK(e):xi,[e,t])}function GM(e,t){t===void 0&&(t=[]);const r=w.useRef(null);return w.useEffect(()=>{r.current=null},t),w.useEffect(()=>{const n=e!==xi;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Uh(e,r.current):xi}function jMe(e){w.useEffect(()=>{if(!Jx)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function SMe(e,t){return w.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:a}=n;return r[i]=o=>{a(o,t)},r},{}),[e,t])}function pK(e){return w.useMemo(()=>e?Y$e(e):null,[e])}const YM=[];function EMe(e,t){t===void 0&&(t=td);const[r]=e,n=pK(r?rn(r):null),[i,a]=w.useState(YM);function o(){a(()=>e.length?e.map(c=>cK(c)?n:new tC(t(c),c)):YM)}const s=eb({callback:o});return ra(()=>{s==null||s.disconnect(),o(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function NMe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vp(t)?t:e}function CMe(e){let{measure:t}=e;const[r,n]=w.useState(null),i=w.useCallback(u=>{for(const{target:f}of u)if(vp(f)){n(d=>{const h=t(f);return d?I(N({},d),{width:h.width,height:h.height}):h});break}},[t]),a=eb({callback:i}),o=w.useCallback(u=>{const f=NMe(u);a==null||a.disconnect(),f&&(a==null||a.observe(f)),n(f?t(f):null)},[t,a]),[s,c]=lv(o);return w.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const TMe=[{sensor:Zx,options:{}},{sensor:rC,options:{}}],AMe={current:{}},hg={draggable:{measure:UM},droppable:{measure:UM,strategy:Fh.WhileDragging,frequency:aj.Optimized},dragOverlay:{measure:td}};class mf extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const PMe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new mf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:cv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:hg,measureDroppableContainers:cv,windowRect:null,measuringScheduled:!1},OMe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:cv,draggableNodes:new Map,over:null,measureDroppableContainers:cv},tb=w.createContext(OMe),mK=w.createContext(PMe);function RMe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new mf}}}function $Me(e,t){switch(t.type){case tr.DragStart:return I(N({},e),{draggable:I(N({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case tr.DragMove:return e.draggable.active==null?e:I(N({},e),{draggable:I(N({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case tr.DragEnd:case tr.DragCancel:return I(N({},e),{draggable:I(N({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case tr.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new mf(e.droppable.containers);return i.set(n,r),I(N({},e),{droppable:I(N({},e.droppable),{containers:i})})}case tr.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new mf(e.droppable.containers);return o.set(r,I(N({},a),{disabled:i})),I(N({},e),{droppable:I(N({},e.droppable),{containers:o})})}case tr.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const a=new mf(e.droppable.containers);return a.delete(r),I(N({},e),{droppable:I(N({},e.droppable),{containers:a})})}default:return e}}function MMe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=w.useContext(tb),a=ej(n),o=ej(r==null?void 0:r.id);return w.useEffect(()=>{if(!t&&!n&&a&&o!=null){if(!eC(a)||document.activeElement===a.target)return;const s=i.get(o);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=T$e(f);if(d){d.focus();break}}})}},[n,t,i,o,a]),null}function DMe(e,t){let i=t,{transform:r}=i,n=Z(i,["transform"]);return e!=null&&e.length?e.reduce((a,o)=>o(N({transform:a},n)),r):r}function IMe(e){return w.useMemo(()=>({draggable:N(N({},hg.draggable),e==null?void 0:e.draggable),droppable:N(N({},hg.droppable),e==null?void 0:e.droppable),dragOverlay:N(N({},hg.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function LMe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const a=w.useRef(!1),{x:o,y:s}=typeof i=="boolean"?{x:i,y:i}:i;ra(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!n)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const f=r(u),d=aK(f,n);if(o||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=oK(u);h&&h.scrollBy({top:d.y,left:d.x})}},[t,o,s,n,r])}const gK=w.createContext(I(N({},xi),{scaleX:1,scaleY:1}));var oo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(oo||(oo={}));const yK=w.memo(function(t){var r,n,i,a;let gl=t,{id:o,accessibility:s,autoScroll:c=!0,children:u,sensors:f=TMe,collisionDetection:d=F$e,measuring:h,modifiers:p}=gl,m=Z(gl,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=w.useReducer($Me,void 0,RMe),[v,x]=g,[b,y]=M$e(),[j,k]=w.useState(oo.Uninitialized),_=j===oo.Initialized,{draggable:{active:S,nodes:E,translate:C},droppable:{containers:R}}=v,M=S!=null?E.get(S):null,L=w.useRef({initial:null,translated:null}),H=w.useMemo(()=>{var gt;return S!=null?{id:S,data:(gt=M==null?void 0:M.data)!=null?gt:AMe,rect:L}:null},[S,M]),U=w.useRef(null),[F,O]=w.useState(null),[P,A]=w.useState(null),D=Bh(m,Object.values(m)),B=bp("DndDescribedBy",o),z=w.useMemo(()=>R.getEnabled(),[R]),K=IMe(h),{droppableRects:Y,measureDroppableContainers:G,measuringScheduled:re}=yMe(z,{dragging:_,dependencies:[C.x,C.y],config:K.droppable}),le=mMe(E,S),me=w.useMemo(()=>P?tj(P):null,[P]),Ke=nb(),te=vMe(le,K.draggable.measure);LMe({activeNode:S!=null?E.get(S):null,config:Ke.layoutShiftCompensation,initialRect:te,measure:K.draggable.measure});const ie=WM(le,K.draggable.measure,te),we=WM(le?le.parentElement:null),J=w.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Pe=R.getNodeFor((r=J.current.over)==null?void 0:r.id),je=CMe({measure:K.dragOverlay.measure}),De=(n=je.nodeRef.current)!=null?n:le,Re=_?(i=je.rect)!=null?i:ie:null,q=!!(je.nodeRef.current&&je.rect),oe=wMe(q?null:ie),ke=pK(De?rn(De):null),Ie=kMe(_?Pe!=null?Pe:le:null),ae=EMe(Ie),he=DMe(p,{transform:{x:C.x-oe.x,y:C.y-oe.y,scaleX:1,scaleY:1},activatorEvent:P,active:H,activeNodeRect:ie,containerNodeRect:we,draggingNodeRect:Re,over:J.current.over,overlayNodeRect:je.rect,scrollableAncestors:Ie,scrollableAncestorRects:ae,windowRect:ke}),ue=me?Cc(me,C):null,Ae=_Me(Ie),Ce=GM(Ae),Ye=GM(Ae,[ie]),Yt=Cc(he,Ce),W=Re?V$e(Re,he):null,fe=H&&W?d({active:H,collisionRect:W,droppableRects:Y,droppableContainers:z,pointerCoordinates:ue}):null,Oe=nK(fe,"id"),[Me,nn]=w.useState(null),mt=q?he:Cc(he,Ye),at=K$e(mt,(a=Me==null?void 0:Me.rect)!=null?a:null,ie),zt=w.useRef(null),dt=w.useCallback((gt,Pr)=>{let{sensor:_e,options:ze}=Pr;if(U.current==null)return;const Be=E.get(U.current);if(!Be)return;const yt=gt.nativeEvent,$t=new _e({active:U.current,activeNode:Be,event:yt,options:ze,context:J,onAbort(vt){if(!E.get(vt))return;const{onDragAbort:Xt}=D.current,aa={id:vt};Xt==null||Xt(aa),b({type:"onDragAbort",event:aa})},onPending(vt,Kt,Xt,aa){if(!E.get(vt))return;const{onDragPending:nd}=D.current,Wa={id:vt,constraint:Kt,initialCoordinates:Xt,offset:aa};nd==null||nd(Wa),b({type:"onDragPending",event:Wa})},onStart(vt){const Kt=U.current;if(Kt==null)return;const Xt=E.get(Kt);if(!Xt)return;const{onDragStart:aa}=D.current,rd={activatorEvent:yt,active:{id:Kt,data:Xt.data,rect:L}};zi.unstable_batchedUpdates(()=>{aa==null||aa(rd),k(oo.Initializing),x({type:tr.DragStart,initialCoordinates:vt,active:Kt}),b({type:"onDragStart",event:rd}),O(zt.current),A(yt)})},onMove(vt){x({type:tr.DragMove,coordinates:vt})},onEnd:Or(tr.DragEnd),onCancel:Or(tr.DragCancel)});zt.current=$t;function Or(vt){return function(){return T(this,null,function*(){const{active:Xt,collisions:aa,over:rd,scrollAdjustedTranslate:nd}=J.current;let Wa=null;if(Xt&&nd){const{cancelDrop:id}=D.current;Wa={activatorEvent:yt,active:Xt,collisions:aa,delta:nd,over:rd},vt===tr.DragEnd&&typeof id=="function"&&(yield Promise.resolve(id(Wa)))&&(vt=tr.DragCancel)}U.current=null,zi.unstable_batchedUpdates(()=>{x({type:vt}),k(oo.Uninitialized),nn(null),O(null),A(null),zt.current=null;const id=vt===tr.DragEnd?"onDragEnd":"onDragCancel";if(Wa){const ib=D.current[id];ib==null||ib(Wa),b({type:id,event:Wa})}})})}}},[E]),tt=w.useCallback((gt,Pr)=>(_e,ze)=>{const Be=_e.nativeEvent,yt=E.get(ze);if(U.current!==null||!yt||Be.dndKit||Be.defaultPrevented)return;const $t={active:yt};gt(_e,Pr.options,$t)===!0&&(Be.dndKit={capturedBy:Pr.sensor},U.current=ze,dt(_e,Pr))},[E,dt]),wp=gMe(f,tt);jMe(f),ra(()=>{ie&&j===oo.Initializing&&k(oo.Initialized)},[ie,j]),w.useEffect(()=>{const{onDragMove:gt}=D.current,{active:Pr,activatorEvent:_e,collisions:ze,over:Be}=J.current;if(!Pr||!_e)return;const yt={active:Pr,activatorEvent:_e,collisions:ze,delta:{x:Yt.x,y:Yt.y},over:Be};zi.unstable_batchedUpdates(()=>{gt==null||gt(yt),b({type:"onDragMove",event:yt})})},[Yt.x,Yt.y]),w.useEffect(()=>{const{active:gt,activatorEvent:Pr,collisions:_e,droppableContainers:ze,scrollAdjustedTranslate:Be}=J.current;if(!gt||U.current==null||!Pr||!Be)return;const{onDragOver:yt}=D.current,$t=ze.get(Oe),Or=$t&&$t.rect.current?{id:$t.id,rect:$t.rect.current,data:$t.data,disabled:$t.disabled}:null,vt={active:gt,activatorEvent:Pr,collisions:_e,delta:{x:Be.x,y:Be.y},over:Or};zi.unstable_batchedUpdates(()=>{nn(Or),yt==null||yt(vt),b({type:"onDragOver",event:vt})})},[Oe]),ra(()=>{J.current={activatorEvent:P,active:H,activeNode:le,collisionRect:W,collisions:fe,droppableRects:Y,draggableNodes:E,draggingNode:De,draggingNodeRect:Re,droppableContainers:R,over:Me,scrollableAncestors:Ie,scrollAdjustedTranslate:Yt},L.current={initial:Re,translated:W}},[H,le,fe,W,E,De,Re,Y,R,Me,Ie,Yt]),fMe(I(N({},Ke),{delta:C,draggingRect:W,pointerCoordinates:ue,scrollableAncestors:Ie,scrollableAncestorRects:ae}));const kp=w.useMemo(()=>({active:H,activeNode:le,activeNodeRect:ie,activatorEvent:P,collisions:fe,containerNodeRect:we,dragOverlay:je,draggableNodes:E,droppableContainers:R,droppableRects:Y,over:Me,measureDroppableContainers:G,scrollableAncestors:Ie,scrollableAncestorRects:ae,measuringConfiguration:K,measuringScheduled:re,windowRect:ke}),[H,le,ie,P,fe,we,je,E,R,Y,Me,G,Ie,ae,K,re,ke]),_p=w.useMemo(()=>({activatorEvent:P,activators:wp,active:H,activeNodeRect:ie,ariaDescribedById:{draggable:B},dispatch:x,draggableNodes:E,over:Me,measureDroppableContainers:G}),[P,wp,H,ie,x,B,E,Me,G]);return $.createElement(Z8.Provider,{value:y},$.createElement(tb.Provider,{value:_p},$.createElement(mK.Provider,{value:kp},$.createElement(gK.Provider,{value:at},u)),$.createElement(MMe,{disabled:(s==null?void 0:s.restoreFocus)===!1})),$.createElement(L$e,I(N({},s),{hiddenTextDescribedById:B})));function nb(){const gt=(F==null?void 0:F.autoScrollEnabled)===!1,Pr=typeof c=="object"?c.enabled===!1:c===!1,_e=_&&!gt&&!Pr;return typeof c=="object"?I(N({},c),{enabled:_e}):{enabled:_e}}}),zMe=w.createContext(null),XM="button",BMe="Draggable";function UMe(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const a=bp(BMe),{activators:o,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:h}=w.useContext(tb),{role:p=XM,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(c==null?void 0:c.id)===t,x=w.useContext(v?gK:zMe),[b,y]=lv(),[j,k]=lv(),_=SMe(o,t),S=Bh(r);ra(()=>(d.set(t,{id:t,key:a,node:b,activatorNode:j,data:S}),()=>{const C=d.get(t);C&&C.key===a&&d.delete(t)}),[d,t]);const E=w.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===XM?!0:void 0,"aria-roledescription":m,"aria-describedby":f.draggable}),[n,p,g,v,m,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:E,isDragging:v,listeners:n?void 0:_,node:b,over:h,setNodeRef:y,setActivatorNodeRef:k,transform:x}}function FMe(){return w.useContext(mK)}const KMe="Droppable",HMe={timeout:25};function VMe(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const a=bp(KMe),{active:o,dispatch:s,over:c,measureDroppableContainers:u}=w.useContext(tb),f=w.useRef({disabled:r}),d=w.useRef(!1),h=w.useRef(null),p=w.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=N(N({},HMe),i),x=Bh(g!=null?g:n),b=w.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(x.current)?x.current:[x.current]),p.current=null},v)},[v]),y=eb({callback:b,disabled:m||!o}),j=w.useCallback((E,C)=>{y&&(C&&(y.unobserve(C),d.current=!1),E&&y.observe(E))},[y]),[k,_]=lv(j),S=Bh(t);return w.useEffect(()=>{!y||!k.current||(y.disconnect(),d.current=!1,y.observe(k.current))},[k,y]),w.useEffect(()=>(s({type:tr.RegisterDroppable,element:{id:n,key:a,disabled:r,node:k,rect:h,data:S}}),()=>s({type:tr.UnregisterDroppable,key:a,id:n})),[n]),w.useEffect(()=>{r!==f.current.disabled&&(s({type:tr.SetDroppableDisabled,id:n,key:a,disabled:r}),f.current.disabled=r)},[n,a,r,s]),{active:o,rect:h,isOver:(c==null?void 0:c.id)===n,node:k,over:c,setNodeRef:_}}function rb(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function WMe(e,t){return e.reduce((r,n,i)=>{const a=t.get(n);return a&&(r[i]=a),r},Array(e.length))}function Pm(e){return e!==null&&e>=0}function qMe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function GMe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Om={scaleX:1,scaleY:1},YMe=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:a,index:o}=e;const s=(t=r[i])!=null?t:n;if(!s)return null;const c=XMe(r,o,i);if(o===i){const u=r[a];return u?N({x:i<a?u.left+u.width-(s.left+s.width):u.left-s.left,y:0},Om):null}return o>i&&o<=a?N({x:-s.width-c,y:0},Om):o<i&&o>=a?N({x:s.width+c,y:0},Om):N({x:0,y:0},Om)};function XMe(e,t,r){const n=e[t],i=e[t-1],a=e[t+1];return!n||!i&&!a?0:r<t?i?n.left-(i.left+i.width):a.left-(n.left+n.width):a?a.left-(n.left+n.width):n.left-(i.left+i.width)}const vK=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const a=rb(t,n,r),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Rm={scaleX:1,scaleY:1},JMe=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:i,rects:a,overIndex:o}=e;const s=(t=a[r])!=null?t:n;if(!s)return null;if(i===r){const u=a[o];return u?N({x:0,y:r<o?u.top+u.height-(s.top+s.height):u.top-s.top},Rm):null}const c=QMe(a,i,r);return i>r&&i<=o?N({x:0,y:-s.height-c},Rm):i<r&&i>=o?N({x:0,y:s.height+c},Rm):N({x:0,y:0},Rm)};function QMe(e,t,r){const n=e[t],i=e[t-1],a=e[t+1];return n?r<t?i?n.top-(i.top+i.height):a?a.top-(n.top+n.height):0:a?a.top-(n.top+n.height):i?n.top-(i.top+i.height):0:0}const xK="Sortable",bK=$.createContext({activeIndex:-1,containerId:xK,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:vK,disabled:{draggable:!1,droppable:!1}});function wK(e){let{children:t,id:r,items:n,strategy:i=vK,disabled:a=!1}=e;const{active:o,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:f}=FMe(),d=bp(xK,r),h=s.rect!==null,p=w.useMemo(()=>n.map(_=>typeof _=="object"&&"id"in _?_.id:_),[n]),m=o!=null,g=o?p.indexOf(o.id):-1,v=u?p.indexOf(u.id):-1,x=w.useRef(p),b=!qMe(p,x.current),y=v!==-1&&g===-1||b,j=GMe(a);ra(()=>{b&&m&&f(p)},[b,p,m,f]),w.useEffect(()=>{x.current=p},[p]);const k=w.useMemo(()=>({activeIndex:g,containerId:d,disabled:j,disableTransforms:y,items:p,overIndex:v,useDragOverlay:h,sortedRects:WMe(p,c),strategy:i}),[g,d,j.draggable,j.droppable,y,p,v,c,h,i]);return $.createElement(bK.Provider,{value:k},t)}const ZMe=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return rb(r,n,i).indexOf(t)},eDe=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!n||s!==a&&i===o?!1:r?!0:o!==i&&t===c},tDe={duration:200,easing:"ease"},kK="transform",rDe=Su.Transition.toString({property:kK,duration:0,easing:"linear"}),nDe={roleDescription:"sortable"};function iDe(e){let{disabled:t,index:r,node:n,rect:i}=e;const[a,o]=w.useState(null),s=w.useRef(r);return ra(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=td(n.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&o(f)}}r!==s.current&&(s.current=r)},[t,r,n,i]),w.useEffect(()=>{a&&o(null)},[a]),a}function _K(e){let{animateLayoutChanges:t=eDe,attributes:r,disabled:n,data:i,getNewIndex:a=ZMe,id:o,strategy:s,resizeObserverConfig:c,transition:u=tDe}=e;const{items:f,containerId:d,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:x,strategy:b}=w.useContext(bK),y=aDe(n,p),j=f.indexOf(o),k=w.useMemo(()=>N({sortable:{containerId:d,index:j,items:f}},i),[d,i,j,f]),_=w.useMemo(()=>f.slice(f.indexOf(o)),[f,o]),{rect:S,node:E,isOver:C,setNodeRef:R}=VMe({id:o,data:k,disabled:y.droppable,resizeObserverConfig:N({updateMeasurementsFor:_},c)}),{active:M,activatorEvent:L,activeNodeRect:H,attributes:U,setNodeRef:F,listeners:O,isDragging:P,over:A,setActivatorNodeRef:D,transform:B}=UMe({id:o,data:k,attributes:N(N({},nDe),r),disabled:y.draggable}),z=S$e(R,F),K=!!M,Y=K&&!m&&Pm(h)&&Pm(v),G=!x&&P,re=G&&Y?B:null,le=s!=null?s:b,me=Y?re!=null?re:le({rects:g,activeNodeRect:H,activeIndex:h,overIndex:v,index:j}):null,Ke=Pm(h)&&Pm(v)?a({id:o,items:f,activeIndex:h,overIndex:v}):j,te=M==null?void 0:M.id,ie=w.useRef({activeId:te,items:f,newIndex:Ke,containerId:d}),we=f!==ie.current.items,J=t({active:M,containerId:d,isDragging:P,isSorting:K,id:o,index:j,items:f,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:u,wasDragging:ie.current.activeId!=null}),Pe=iDe({disabled:!J,index:j,node:E,rect:S});return w.useEffect(()=>{K&&ie.current.newIndex!==Ke&&(ie.current.newIndex=Ke),d!==ie.current.containerId&&(ie.current.containerId=d),f!==ie.current.items&&(ie.current.items=f)},[K,Ke,d,f]),w.useEffect(()=>{if(te===ie.current.activeId)return;if(te!=null&&ie.current.activeId==null){ie.current.activeId=te;return}const De=setTimeout(()=>{ie.current.activeId=te},50);return()=>clearTimeout(De)},[te]),{active:M,activeIndex:h,attributes:U,data:k,rect:S,index:j,newIndex:Ke,items:f,isOver:C,isSorting:K,isDragging:P,listeners:O,node:E,overIndex:v,over:A,setNodeRef:z,setActivatorNodeRef:D,setDroppableNodeRef:R,setDraggableNodeRef:F,transform:Pe!=null?Pe:me,transition:je()};function je(){if(Pe||we&&ie.current.newIndex===j)return rDe;if(!(G&&!eC(L)||!u)&&(K||J))return Su.Transition.toString(I(N({},u),{property:kK}))}}function aDe(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function dv(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const oDe=[We.Down,We.Right,We.Up,We.Left],sDe=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(oDe.includes(e.code)){if(e.preventDefault(),!r||!n)return;const c=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const h=i.get(d.id);if(h)switch(e.code){case We.Down:n.top<h.top&&c.push(d);break;case We.Up:n.top>h.top&&c.push(d);break;case We.Left:n.left>h.left&&c.push(d);break;case We.Right:n.left<h.left&&c.push(d);break}});const u=B$e({active:r,collisionRect:n,droppableRects:i,droppableContainers:c,pointerCoordinates:null});let f=nK(u,"id");if(f===(o==null?void 0:o.id)&&u.length>1&&(f=u[1].id),f!=null){const d=a.get(r.id),h=a.get(f),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&d&&h){const v=Qx(m).some((_,S)=>s[S]!==_),x=jK(d,h),b=lDe(d,h),y=v||!x?{x:0,y:0}:{x:b?n.width-p.width:0,y:b?n.height-p.height:0},j={x:p.left,y:p.top};return y.x&&y.y?j:Uh(j,y)}}}};function jK(e,t){return!dv(e)||!dv(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function lDe(e,t){return!dv(e)||!dv(t)||!jK(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const cDe=[{value:"TRY",label:"₺ TRY"},{value:"USD",label:"$ USD"},{value:"EUR",label:"€ EUR"},{value:"GBP",label:"£ GBP"}],mr="w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20";function uDe({pkg:e,index:t,sortId:r,onUpdate:n,onRemove:i}){const{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:u,isDragging:f}=_K({id:r}),d={transform:Su.Transform.toString(c),transition:u,opacity:f?.5:1};return l.jsxs("div",{ref:s,style:d,className:"flex items-start gap-3 p-4 rounded-xl bg-secondary/50 border border-border",children:[l.jsx("button",I(N(N({type:"button",className:"p-1.5 mt-1 cursor-grab active:cursor-grabbing hover:bg-muted rounded-lg transition-colors touch-none"},a),o),{children:l.jsx(yS,{size:16,className:"text-muted-foreground"})})),l.jsxs("div",{className:"flex-1 space-y-3",children:[l.jsx("input",{type:"text",value:e.description,onChange:h=>n(t,"description",h.target.value),placeholder:"Paket açıklaması (örn: Tek Kişi Konaklama)",className:mr}),l.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Normal Fiyat"}),l.jsx("input",{type:"number",value:e.price,onChange:h=>n(t,"price",h.target.value),placeholder:"Fiyat",className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"İndirimli Fiyat (opsiyonel)"}),l.jsx("input",{type:"number",value:e.discounted_price,onChange:h=>n(t,"discounted_price",h.target.value),placeholder:"İndirimli fiyat",className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"İndirim Bitiş Tarihi"}),l.jsx("input",{type:"date",value:e.discount_end_date,onChange:h=>n(t,"discount_end_date",h.target.value),className:mr})]})]}),l.jsx("select",{value:e.currency,onChange:h=>n(t,"currency",h.target.value),className:mr,children:cDe.map(h=>l.jsx("option",{value:h.value,children:h.label},h.value))})]}),l.jsx("button",{type:"button",onClick:()=>i(t),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors mt-1",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})}function dDe({form:e,onChange:t,packages:r,onPackagesChange:n}){const i=(d,h)=>t(I(N({},e),{[d]:h})),a=eK(rj(Zx,{activationConstraint:{distance:5}}),rj(rC,{coordinateGetter:sDe})),o=()=>{n([...r,{description:"",price:"",currency:"TRY",order:r.length,discounted_price:"",discount_end_date:""}])},s=(d,h,p)=>{const m=[...r];m[d]=I(N({},m[d]),{[h]:p}),n(m)},c=d=>{n(r.filter((h,p)=>p!==d).map((h,p)=>I(N({},h),{order:p})))},u=d=>{const{active:h,over:p}=d;if(!p||h.id===p.id)return;const m=r.findIndex((x,b)=>"pkg-".concat(b)===h.id),g=r.findIndex((x,b)=>"pkg-".concat(b)===p.id);if(m===-1||g===-1)return;const v=rb(r,m,g).map((x,b)=>I(N({},x),{order:b}));n(v)},f=r.map((d,h)=>"pkg-".concat(h));return l.jsxs("div",{className:"space-y-5",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2",children:"Etkinlik Bilgileri"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Başlangıç Tarihi"}),l.jsx("input",{type:"date",value:e.event_date||"",onChange:d=>i("event_date",d.target.value),className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Bitiş Tarihi"}),l.jsx("input",{type:"date",value:e.event_end_date||"",onChange:d=>i("event_end_date",d.target.value),className:mr})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Başlangıç Saati"}),l.jsx("input",{type:"time",value:e.start_time||"",onChange:d=>i("start_time",d.target.value),className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Bitiş Saati"}),l.jsx("input",{type:"time",value:e.end_time||"",onChange:d=>i("end_time",d.target.value),className:mr})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kontenjan (opsiyonel)"}),l.jsx("input",{type:"number",value:e.capacity||"",onChange:d=>i("capacity",d.target.value),placeholder:"50",className:mr})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Konum Bilgileri"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Mekan Adı"}),l.jsx("input",{type:"text",value:e.venue_name||"",onChange:d=>i("venue_name",d.target.value),placeholder:"Kamp Alanı",className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Adres"}),l.jsx("input",{type:"text",value:e.address||"",onChange:d=>i("address",d.target.value),placeholder:"Tam adres",className:mr})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Şehir"}),l.jsx("input",{type:"text",value:e.city||"",onChange:d=>i("city",d.target.value),placeholder:"Antalya",className:mr})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Google Maps Linki"}),l.jsx("input",{type:"url",value:e.maps_link||"",onChange:d=>i("maps_link",d.target.value),placeholder:"https://maps.google.com/...",className:mr})]})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Ek Bilgiler"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Katılımcı Notları"}),l.jsx("textarea",{value:e.participant_notes||"",onChange:d=>i("participant_notes",d.target.value),rows:3,placeholder:"Katılımcılara önemli notlar...",className:mr+" resize-none"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Konaklama Bilgileri (opsiyonel)"}),l.jsx("textarea",{value:e.accommodation_info||"",onChange:d=>i("accommodation_info",d.target.value),rows:3,placeholder:"Oda tipleri, konaklama detayları...",className:mr+" resize-none"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ne Getirilmeli (opsiyonel)"}),l.jsx("textarea",{value:e.what_to_bring||"",onChange:d=>i("what_to_bring",d.target.value),rows:2,placeholder:"Uyku tulumu, rahat kıyafetler...",className:mr+" resize-none"})]}),l.jsx("h3",{className:"text-sm font-semibold text-foreground border-b border-border pb-2 pt-2",children:"Ödeme Paketleri"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Farklı katılım seçenekleri oluşturun. Sıralamayı değiştirmek için sürükleyip bırakın."}),l.jsx(yK,{sensors:a,collisionDetection:iK,onDragEnd:u,children:l.jsx(wK,{items:f,strategy:JMe,children:l.jsx("div",{className:"space-y-3",children:r.map((d,h)=>l.jsx(uDe,{sortId:f[h],pkg:d,index:h,onUpdate:s,onRemove:c},f[h]))})})}),l.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-2 text-sm text-primary hover:text-primary/80 transition-colors font-medium",children:[l.jsx(Xo,{size:16})," Paket Ekle"]})]})}var fDe=Object.defineProperty,hDe=(e,t,r)=>t in e?fDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nt=(e,t,r)=>hDe(e,typeof t!="symbol"?t+"":t,r);const fv={x:0,y:0,width:0,height:0,unit:"px"},Rl=(e,t,r)=>Math.min(Math.max(e,t),r),pDe=(...e)=>e.filter(t=>t&&typeof t=="string").join(" "),JM=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function mDe(e,t,r,n){const i=Ci(e,r,n);return e.width&&(i.height=i.width/t),e.height&&(i.width=i.height*t),i.y+i.height>n&&(i.height=n-i.y,i.width=i.height*t),i.x+i.width>r&&(i.width=r-i.x,i.height=i.width/t),e.unit==="%"?so(i,r,n):i}function gDe(e,t,r){const n=Ci(e,t,r);return n.x=(t-n.width)/2,n.y=(r-n.height)/2,e.unit==="%"?so(n,t,r):n}function so(e,t,r){return e.unit==="%"?I(N(N({},fv),e),{unit:"%"}):{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/r*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/r*100:0}}function Ci(e,t,r){return e.unit?e.unit==="px"?I(N(N({},fv),e),{unit:"px"}):{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*r/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*r/100:0}:I(N(N({},fv),e),{unit:"px"})}function QM(e,t,r,n,i,a=0,o=0,s=n,c=i){const u=N({},e);let f=Math.min(a,n),d=Math.min(o,i),h=Math.min(s,n),p=Math.min(c,i);t&&(t>1?(f=o?o*t:f,d=f/t,h=s*t):(d=a?a/t:d,f=d*t,p=c/t)),u.y<0&&(u.height=Math.max(u.height+u.y,d),u.y=0),u.x<0&&(u.width=Math.max(u.width+u.x,f),u.x=0);const m=n-(u.x+u.width);m<0&&(u.x=Math.min(u.x,n-f),u.width+=m);const g=i-(u.y+u.height);if(g<0&&(u.y=Math.min(u.y,i-d),u.height+=g),u.width<f&&((r==="sw"||r=="nw")&&(u.x-=f-u.width),u.width=f),u.height<d&&((r==="nw"||r=="ne")&&(u.y-=d-u.height),u.height=d),u.width>h&&((r==="sw"||r=="nw")&&(u.x-=h-u.width),u.width=h),u.height>p&&((r==="nw"||r=="ne")&&(u.y-=p-u.height),u.height=p),t){const v=u.width/u.height;if(v<t){const x=Math.max(u.width/t,d);(r==="nw"||r=="ne")&&(u.y-=x-u.height),u.height=x}else if(v>t){const x=Math.max(u.height*t,f);(r==="sw"||r=="nw")&&(u.x-=x-u.width),u.width=x}}return u}function yDe(e,t,r,n){const i=N({},e);return t==="ArrowLeft"?n==="nw"?(i.x-=r,i.y-=r,i.width+=r,i.height+=r):n==="w"?(i.x-=r,i.width+=r):n==="sw"?(i.x-=r,i.width+=r,i.height+=r):n==="ne"?(i.y+=r,i.width-=r,i.height-=r):n==="e"?i.width-=r:n==="se"&&(i.width-=r,i.height-=r):t==="ArrowRight"&&(n==="nw"?(i.x+=r,i.y+=r,i.width-=r,i.height-=r):n==="w"?(i.x+=r,i.width-=r):n==="sw"?(i.x+=r,i.width-=r,i.height-=r):n==="ne"?(i.y-=r,i.width+=r,i.height+=r):n==="e"?i.width+=r:n==="se"&&(i.width+=r,i.height+=r)),t==="ArrowUp"?n==="nw"?(i.x-=r,i.y-=r,i.width+=r,i.height+=r):n==="n"?(i.y-=r,i.height+=r):n==="ne"?(i.y-=r,i.width+=r,i.height+=r):n==="sw"?(i.x+=r,i.width-=r,i.height-=r):n==="s"?i.height-=r:n==="se"&&(i.width-=r,i.height-=r):t==="ArrowDown"&&(n==="nw"?(i.x+=r,i.y+=r,i.width-=r,i.height-=r):n==="n"?(i.y+=r,i.height-=r):n==="ne"?(i.y+=r,i.width-=r,i.height-=r):n==="sw"?(i.x-=r,i.width+=r,i.height+=r):n==="s"?i.height+=r:n==="se"&&(i.width+=r,i.height+=r)),i}const $l={capture:!0,passive:!1};let vDe=0;const ro=class Qn extends w.PureComponent{constructor(){super(...arguments),Nt(this,"docMoveBound",!1),Nt(this,"mouseDownOnCrop",!1),Nt(this,"dragStarted",!1),Nt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Nt(this,"componentRef",w.createRef()),Nt(this,"mediaRef",w.createRef()),Nt(this,"resizeObserver"),Nt(this,"initChangeCalled",!1),Nt(this,"instanceId","rc-".concat(vDe++)),Nt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Nt(this,"onCropPointerDown",t=>{const{crop:r,disabled:n}=this.props,i=this.getBox();if(!r)return;const a=Ci(r,i.width,i.height);if(n)return;t.cancelable&&t.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const o=t.target.dataset.ord,s=!!o;let c=t.clientX,u=t.clientY,f=a.x,d=a.y;if(o){const h=t.clientX-i.x,p=t.clientY-i.y;let m=0,g=0;o==="ne"||o=="e"?(m=h-(a.x+a.width),g=p-a.y,f=a.x,d=a.y+a.height):o==="se"||o==="s"?(m=h-(a.x+a.width),g=p-(a.y+a.height),f=a.x,d=a.y):o==="sw"||o=="w"?(m=h-a.x,g=p-(a.y+a.height),f=a.x+a.width,d=a.y):(o==="nw"||o=="n")&&(m=h-a.x,g=p-a.y,f=a.x+a.width,d=a.y+a.height),c=f+i.x+m,u=d+i.y+g}this.evData={startClientX:c,startClientY:u,startCropX:f,startCropY:d,clientX:t.clientX,clientY:t.clientY,isResize:s,ord:o},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Nt(this,"onComponentPointerDown",t=>{const{crop:r,disabled:n,locked:i,keepSelection:a,onChange:o}=this.props,s=this.getBox();if(n||i||a&&r)return;t.cancelable&&t.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const c=t.clientX-s.x,u=t.clientY-s.y,f={unit:"px",x:c,y:u,width:0,height:0};this.evData={startClientX:t.clientX,startClientY:t.clientY,startCropX:c,startCropY:u,clientX:t.clientX,clientY:t.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(Ci(f,s.width,s.height),so(f,s.width,s.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Nt(this,"onDocPointerMove",t=>{const{crop:r,disabled:n,onChange:i,onDragStart:a}=this.props,o=this.getBox();if(n||!r||!this.mouseDownOnCrop)return;t.cancelable&&t.preventDefault(),this.dragStarted||(this.dragStarted=!0,a&&a(t));const{evData:s}=this;s.clientX=t.clientX,s.clientY=t.clientY;let c;s.isResize?c=this.resizeCrop():c=this.dragCrop(),JM(r,c)||i(Ci(c,o.width,o.height),so(c,o.width,o.height))}),Nt(this,"onComponentKeyDown",t=>{const{crop:r,disabled:n,onChange:i,onComplete:a}=this.props;if(n)return;const o=t.key;let s=!1;if(!r)return;const c=this.getBox(),u=this.makePixelCrop(c),f=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?Qn.nudgeStepLarge:t.shiftKey?Qn.nudgeStepMedium:Qn.nudgeStep;if(o==="ArrowLeft"?(u.x-=f,s=!0):o==="ArrowRight"?(u.x+=f,s=!0):o==="ArrowUp"?(u.y-=f,s=!0):o==="ArrowDown"&&(u.y+=f,s=!0),s){t.cancelable&&t.preventDefault(),u.x=Rl(u.x,0,c.width-u.width),u.y=Rl(u.y,0,c.height-u.height);const d=Ci(u,c.width,c.height),h=so(u,c.width,c.height);i(d,h),a&&a(d,h)}}),Nt(this,"onHandlerKeyDown",(t,r)=>{const{aspect:n=0,crop:i,disabled:a,minWidth:o=0,minHeight:s=0,maxWidth:c,maxHeight:u,onChange:f,onComplete:d}=this.props,h=this.getBox();if(a||!i)return;if(t.key==="ArrowUp"||t.key==="ArrowDown"||t.key==="ArrowLeft"||t.key==="ArrowRight")t.stopPropagation(),t.preventDefault();else return;const p=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?Qn.nudgeStepLarge:t.shiftKey?Qn.nudgeStepMedium:Qn.nudgeStep,m=Ci(i,h.width,h.height),g=yDe(m,t.key,p,r),v=QM(g,n,r,h.width,h.height,o,s,c,u);if(!JM(i,v)){const x=so(v,h.width,h.height);f(v,x),d&&d(v,x)}}),Nt(this,"onDocPointerDone",t=>{const{crop:r,disabled:n,onComplete:i,onDragEnd:a}=this.props,o=this.getBox();this.unbindDocMove(),!(n||!r)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,a&&a(t),i&&i(Ci(r,o.width,o.height),so(r,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Nt(this,"onDragFocus",()=>{var t;(t=this.componentRef.current)==null||t.scrollTo(0,0)})}get document(){return document}getBox(){const t=this.mediaRef.current;if(!t)return{x:0,y:0,width:0,height:0};const{x:r,y:n,width:i,height:a}=t.getBoundingClientRect();return{x:r,y:n,width:i,height:a}}componentDidUpdate(t){const{crop:r,onComplete:n}=this.props;if(n&&!t.crop&&r){const{width:i,height:a}=this.getBox();i&&a&&n(Ci(r,i,a),so(r,i,a))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,$l),this.document.addEventListener("pointerup",this.onDocPointerDone,$l),this.document.addEventListener("pointercancel",this.onDocPointerDone,$l),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,$l),this.document.removeEventListener("pointerup",this.onDocPointerDone,$l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,$l),this.docMoveBound=!1)}getCropStyle(){const{crop:t}=this.props;if(t)return{top:"".concat(t.y).concat(t.unit),left:"".concat(t.x).concat(t.unit),width:"".concat(t.width).concat(t.unit),height:"".concat(t.height).concat(t.unit)}}dragCrop(){const{evData:t}=this,r=this.getBox(),n=this.makePixelCrop(r),i=t.clientX-t.startClientX,a=t.clientY-t.startClientY;return n.x=Rl(t.startCropX+i,0,r.width-n.width),n.y=Rl(t.startCropY+a,0,r.height-n.height),n}getPointRegion(t,r,n,i){const{evData:a}=this,o=a.clientX-t.x,s=a.clientY-t.y;let c;i&&r?c=r==="nw"||r==="n"||r==="ne":c=s<a.startCropY;let u;return n&&r?u=r==="nw"||r==="w"||r==="sw":u=o<a.startCropX,u?c?"nw":"sw":c?"ne":"se"}resolveMinDimensions(t,r,n=0,i=0){const a=Math.min(n,t.width),o=Math.min(i,t.height);return!r||!a&&!o?[a,o]:r>1?a?[a,a/r]:[o*r,o]:o?[o*r,o]:[a,a/r]}resizeCrop(){const{evData:t}=this,{aspect:r=0,maxWidth:n,maxHeight:i}=this.props,a=this.getBox(),[o,s]=this.resolveMinDimensions(a,r,this.props.minWidth,this.props.minHeight);let c=this.makePixelCrop(a);const u=this.getPointRegion(a,t.ord,o,s),f=t.ord||u;let d=t.clientX-t.startClientX,h=t.clientY-t.startClientY;(o&&f==="nw"||f==="w"||f==="sw")&&(d=Math.min(d,-o)),(s&&f==="nw"||f==="n"||f==="ne")&&(h=Math.min(h,-s));const p={unit:"px",x:0,y:0,width:0,height:0};u==="ne"?(p.x=t.startCropX,p.width=d,r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(h),p.y=t.startCropY-p.height)):u==="se"?(p.x=t.startCropX,p.y=t.startCropY,p.width=d,r?p.height=p.width/r:p.height=h):u==="sw"?(p.x=t.startCropX+d,p.y=t.startCropY,p.width=Math.abs(d),r?p.height=p.width/r:p.height=h):u==="nw"&&(p.x=t.startCropX+d,p.width=Math.abs(d),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(h),p.y=t.startCropY+h));const m=QM(p,r,u,a.width,a.height,o,s,n,i);return r||Qn.xyOrds.indexOf(f)>-1?c=m:Qn.xOrds.indexOf(f)>-1?(c.x=m.x,c.width=m.width):Qn.yOrds.indexOf(f)>-1&&(c.y=m.y,c.height=m.height),c.x=Rl(c.x,0,a.width-c.width),c.y=Rl(c.y,0,a.height-c.height),c}renderCropSelection(){const{ariaLabels:t=Qn.defaultProps.ariaLabels,disabled:r,locked:n,renderSelectionAddon:i,ruleOfThirds:a,crop:o}=this.props,s=this.getCropStyle();if(o)return $.createElement("div",{style:s,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!r&&!n&&$.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},$.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),$.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),$.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),$.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"nw"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"n"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"ne"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"e"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"se"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"s"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"sw"),role:"button"}),$.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:c=>this.onHandlerKeyDown(c,"w"),role:"button"})),i&&$.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:c=>c.stopPropagation()},i(this.state)),a&&$.createElement($.Fragment,null,$.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),$.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(t){const r=N(N({},fv),this.props.crop||{});return Ci(r,t.width,t.height)}render(){const{aspect:t,children:r,circularCrop:n,className:i,crop:a,disabled:o,locked:s,style:c,ruleOfThirds:u}=this.props,{cropIsActive:f,newCropIsBeingDrawn:d}=this.state,h=a?this.renderCropSelection():null,p=pDe("ReactCrop",i,f&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&t&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&u&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return $.createElement("div",{ref:this.componentRef,className:p,style:c},$.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),a?$.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},$.createElement("defs",null,$.createElement("mask",{id:"hole-".concat(this.instanceId)},$.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?$.createElement("ellipse",{cx:"".concat(a.x+a.width/2).concat(a.unit),cy:"".concat(a.y+a.height/2).concat(a.unit),rx:"".concat(a.width/2).concat(a.unit),ry:"".concat(a.height/2).concat(a.unit),fill:"black"}):$.createElement("rect",{x:"".concat(a.x).concat(a.unit),y:"".concat(a.y).concat(a.unit),width:"".concat(a.width).concat(a.unit),height:"".concat(a.height).concat(a.unit),fill:"black"}))),$.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:"url(#hole-".concat(this.instanceId,")")})):void 0,h)}};Nt(ro,"xOrds",["e","w"]),Nt(ro,"yOrds",["n","s"]),Nt(ro,"xyOrds",["nw","ne","se","sw"]),Nt(ro,"nudgeStep",1),Nt(ro,"nudgeStepMedium",10),Nt(ro,"nudgeStepLarge",100),Nt(ro,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let xDe=ro;function bDe(e,t,r){return gDe(mDe({unit:"%",width:90},r,e,t),e,t)}function hv({imageSrc:e,aspect:t=4/3,onCropComplete:r,onCancel:n}){const[i,a]=w.useState(),[o,s]=w.useState(),c=w.useRef(null),u=w.useCallback(d=>{const{naturalWidth:h,naturalHeight:p}=d.currentTarget;a(bDe(h,p,t))},[t]),f=w.useCallback(()=>T(this,null,function*(){const d=c.current;if(!d||!o)return;const h=document.createElement("canvas"),p=d.naturalWidth/d.width,m=d.naturalHeight/d.height,g={x:o.x*p,y:o.y*m,width:o.width*p,height:o.height*m};h.width=g.width,h.height=g.height;const v=h.getContext("2d");v&&(v.drawImage(d,g.x,g.y,g.width,g.height,0,0,g.width,g.height),h.toBlob(x=>{if(x){const b=new File([x],"cropped-cover-".concat(Date.now(),".jpg"),{type:"image/jpeg"});r(b)}},"image/jpeg",.92))}),[o,r]);return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",children:l.jsxs("div",{className:"bg-card rounded-2xl border border-border max-w-2xl w-full max-h-[90vh] flex flex-col overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[l.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Görseli Kırp (4:3)"}),l.jsx("button",{onClick:n,className:"p-1.5 hover:bg-secondary rounded-lg transition-colors",children:l.jsx(yn,{size:18,className:"text-muted-foreground"})})]}),l.jsx("div",{className:"flex-1 overflow-auto p-4 flex items-center justify-center bg-secondary/30",children:l.jsx(xDe,{crop:i,onChange:d=>a(d),onComplete:d=>s(d),aspect:t,className:"max-h-[60vh]",children:l.jsx("img",{ref:c,src:e,alt:"Kırpılacak görsel",onLoad:u,className:"max-h-[60vh] max-w-full"})})}),l.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[l.jsx("button",{onClick:n,className:"px-5 py-2.5 rounded-full text-sm font-medium text-muted-foreground hover:bg-secondary transition-colors",children:"İptal"}),l.jsxs("button",{onClick:f,className:"btn-primary flex items-center gap-2",children:[l.jsx(r1,{size:16})," Kırp ve Uygula"]})]})]})})}const wDe="w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20";function SK({value:e,onChange:t}){const[r,n]=w.useState(""),[i,a]=w.useState(!1),o=e?e.split(",").map(f=>f.trim()).filter(Boolean):[],s=f=>{const d=f.trim();if(!d||o.some(p=>p.toLowerCase()===d.toLowerCase()))return;const h=[...o,d];t(h.join(", ")),n(""),a(!1)},c=f=>{const d=o.filter((h,p)=>p!==f);t(d.join(", "))},u=f=>{f.key==="Enter"&&(f.preventDefault(),s(r)),f.key==="Escape"&&(a(!1),n(""))};return l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Eğitmenler"}),o.length>0&&l.jsx("div",{className:"space-y-2 mb-3",children:o.map((f,d)=>l.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl bg-secondary/50 border border-border",children:[l.jsx(Do,{size:16,className:"text-muted-foreground shrink-0"}),l.jsx("span",{className:"flex-1 text-sm text-foreground font-medium",children:f}),l.jsx("button",{type:"button",onClick:()=>c(d),className:"p-1.5 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(yn,{size:14,className:"text-destructive"})})]},d))}),i?l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"text",value:r,onChange:f=>n(f.target.value),onKeyDown:u,autoFocus:!0,className:wDe,placeholder:"Eğitmen adını yazın ve Enter'a basın"}),l.jsx("button",{type:"button",onClick:()=>s(r),className:"px-4 py-2 rounded-xl bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-colors shrink-0",children:"Ekle"}),l.jsx("button",{type:"button",onClick:()=>{a(!1),n("")},className:"px-3 py-2 rounded-xl border border-border text-sm text-muted-foreground hover:bg-secondary transition-colors shrink-0",children:"İptal"})]}):l.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex items-center gap-2 text-sm text-primary hover:text-primary/80 transition-colors font-medium",children:[l.jsx(Xo,{size:16})," Eğitmen Ekle"]})]})}function kDe({img:e,index:t,onRemove:r}){const{attributes:n,listeners:i,setNodeRef:a,transform:o,transition:s,isDragging:c}=_K({id:"img-".concat(t)}),u={transform:Su.Transform.toString(o),transition:s,opacity:c?.5:1};return l.jsxs("div",{ref:a,style:u,className:"relative shrink-0 w-28 h-28 rounded-xl overflow-hidden border border-border group",children:[l.jsx("img",{src:e.image_url,alt:"",className:"w-full h-full object-cover"}),l.jsx("button",{type:"button",onClick:()=>r(t),className:"absolute top-1 right-1 p-1 bg-black/60 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",children:l.jsx(yn,{size:12,className:"text-white"})}),l.jsx("div",I(N(N({},n),i),{className:"absolute bottom-1 left-1 p-1 bg-black/60 rounded-full cursor-grab active:cursor-grabbing opacity-0 group-hover:opacity-100 transition-opacity touch-none",children:l.jsx(yS,{size:12,className:"text-white"})})),t===0&&l.jsx("span",{className:"absolute top-1 left-1 text-[10px] bg-primary text-primary-foreground px-1.5 py-0.5 rounded-full",children:"Kapak"})]})}const Q0=e=>e==="USD"?"$":e==="EUR"?"€":e==="GBP"?"£":"₺",_De=e=>e==="paid"?l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-green-600",children:[l.jsx(Kn,{size:12})," Ödendi"]}):e==="pending"?l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-yellow-600",children:[l.jsx(Ta,{size:12})," Bekliyor"]}):l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-destructive",children:[l.jsx(Mv,{size:12})," Başarısız"]}),ZM={title:"",description:"",instructor:"Mind Soul Academy",category:"",featured:!1,published:!1,event_date:"",event_end_date:"",start_time:"",end_time:"",capacity:"",venue_name:"",address:"",city:"",maps_link:"",participant_notes:"",what_to_bring:"",accommodation_info:""};function jDe({courses:e,categories:t,queryClient:r,generateSlug:n}){var Re;const[i,a]=w.useState("list"),[o,s]=w.useState(""),[c,u]=w.useState([]),[f,d]=w.useState(!1),[h,p]=w.useState(null),[m,g]=w.useState(N({},ZM)),[v,x]=w.useState([]),[b,y]=w.useState(null),[j,k]=w.useState(null),[_,S]=w.useState(null),[E,C]=w.useState(null),[R,M]=w.useState(!1),[L,H]=w.useState([]),[U,F]=w.useState([]),[O,P]=w.useState(null),A=eK(rj(Zx,{activationConstraint:{distance:5}})),D=t.filter(q=>q.payment_type==="camp"),B=e.filter(q=>q.course_type==="camp"),z=q=>T(this,null,function*(){if(!q)return;d(!0);const{data:oe,error:ke}=yield Q.from("camp_registrations").select("*").eq("course_id",q).order("created_at",{ascending:!1});ke?(console.error("Camp registrations error:",ke),ee.error("Kayıtlar yüklenirken hata oluştu: "+ke.message)):u(oe||[]),d(!1)}),K="w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",Y=()=>{var q;g(I(N({},ZM),{category:((q=D[0])==null?void 0:q.id)||""})),x([]),y(null),k(null),S(null),C(null),H([]),F([]),P(null)},G=q=>{k(q),S(URL.createObjectURL(q)),C(null)},re=q=>T(this,null,function*(){var Ie,ae,he;y(q),g({title:q.title,description:q.short_description||"",instructor:q.instructor||"Mind Soul Academy",category:q.category_id||((Ie=D[0])==null?void 0:Ie.id)||"",featured:(ae=q.featured)!=null?ae:!1,published:(he=q.published)!=null?he:!1,event_date:q.event_date||"",event_end_date:q.event_end_date||"",start_time:q.start_time||"",end_time:q.end_time||"",capacity:q.capacity?String(q.capacity):"",venue_name:q.venue_name||"",address:q.address||"",city:q.city||"",maps_link:q.maps_link||"",participant_notes:q.participant_notes||"",what_to_bring:q.what_to_bring||"",accommodation_info:q.accommodation_info||""}),S(q.cover_image||null),k(null);const{data:oe}=yield Q.from("camp_packages").select("*").eq("course_id",q.id).order("order",{ascending:!0});x((oe||[]).map(ue=>({id:ue.id,description:ue.description,price:String(ue.price),currency:ue.currency,order:ue.order,discounted_price:ue.discounted_price?String(ue.discounted_price):"",discount_end_date:ue.discount_end_date||""})));const{data:ke}=yield Q.from("camp_images").select("*").eq("course_id",q.id).order("order",{ascending:!0});H((ke||[]).map(ue=>({id:ue.id,image_url:ue.image_url,order:ue.order}))),a("edit")}),le=q=>T(this,null,function*(){if(q.preventDefault(),!m.title.trim()){ee.error("Kamp başlığı gereklidir.");return}M(!0);try{const oe=b?b.slug:n(m.title),ke=[];for(const ue of L)if(ue.file){const Ae=ue.file.name.split(".").pop(),Ce="".concat(oe,"-").concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,6),".").concat(Ae),{error:Ye}=yield Q.storage.from("course-covers").upload(Ce,ue.file);if(Ye)throw Ye;const{data:Yt}=Q.storage.from("course-covers").getPublicUrl(Ce);ke.push({image_url:Yt.publicUrl,order:ue.order})}else ke.push({image_url:ue.image_url,order:ue.order});const Ie=ke.length>0?ke[0].image_url:(b==null?void 0:b.cover_image)||"",ae={title:m.title,short_description:m.description,full_description:m.description,category_id:m.category||null,price:0,cover_image:Ie,featured:m.featured,published:m.published,instructor:m.instructor||"Mind Soul Academy",course_type:"camp",event_date:m.event_date||null,event_end_date:m.event_end_date||null,start_time:m.start_time||null,end_time:m.end_time||null,capacity:m.capacity?parseInt(m.capacity):null,venue_name:m.venue_name||null,address:m.address||null,city:m.city||null,maps_link:m.maps_link||null,participant_notes:m.participant_notes||null,what_to_bring:m.what_to_bring||null,accommodation_info:m.accommodation_info||null};let he;if(b){const{error:ue}=yield Q.from("courses").update(ae).eq("id",b.id);if(ue)throw ue;if(he=b.id,yield Q.from("camp_packages").delete().eq("course_id",b.id),v.length>0){const Ae=v.map((Ce,Ye)=>({course_id:b.id,description:Ce.description,price:parseFloat(Ce.price)||0,currency:Ce.currency,order:Ye,discounted_price:Ce.discounted_price?parseFloat(Ce.discounted_price):null,discount_end_date:Ce.discount_end_date||null}));yield Q.from("camp_packages").insert(Ae)}ee.success("Kamp başarıyla güncellendi!")}else{const{data:ue,error:Ae}=yield Q.from("courses").insert(I(N({},ae),{slug:oe})).select().single();if(Ae)throw Ae;if(he=ue.id,v.length>0){const Ce=v.map((Ye,Yt)=>({course_id:he,description:Ye.description,price:parseFloat(Ye.price)||0,currency:Ye.currency,order:Yt,discounted_price:Ye.discounted_price?parseFloat(Ye.discounted_price):null,discount_end_date:Ye.discount_end_date||null}));yield Q.from("camp_packages").insert(Ce)}ee.success("Kamp başarıyla oluşturuldu!")}if(yield Q.from("camp_images").delete().eq("course_id",he),ke.length>0){const ue=ke.map((Ae,Ce)=>({course_id:he,image_url:Ae.image_url,order:Ce}));yield Q.from("camp_images").insert(ue)}Y(),r.invalidateQueries({queryKey:["courses"]}),a("list")}catch(oe){ee.error("Hata: "+(oe.message||"Bilinmeyen hata"))}M(!1)}),me=q=>T(this,null,function*(){if(confirm("Bu kampı silmek istediğinize emin misiniz?"))try{yield Q.from("camp_packages").delete().eq("course_id",q),yield Q.from("camp_registrations").delete().eq("course_id",q);const{error:oe}=yield Q.from("courses").delete().eq("id",q);if(oe)throw oe;ee.success("Kamp silindi."),r.invalidateQueries({queryKey:["courses"]})}catch(oe){ee.error("Silme işlemi başarısız.")}}),Ke=(q,oe)=>T(this,null,function*(){try{const{error:ke}=yield Q.from("courses").update({published:!oe}).eq("id",q);if(ke)throw ke;ee.success(oe?"Kamp taslağa alındı.":"Kamp yayınlandı."),r.invalidateQueries({queryKey:["courses"]})}catch(ke){ee.error("İşlem başarısız.")}}),[te,ie]=w.useState(!1),we=(q,oe=!1)=>T(this,null,function*(){ie(!0);try{const{data:ke,error:Ie}=yield Q.functions.invoke("sync-pending-registrations",{body:{courseId:q,kind:"camp"}});if(Ie)throw Ie;oe||ee.success("Senkronize edildi: ".concat((ke==null?void 0:ke.updated)||0," ödeme güncellendi.")),yield z(q)}catch(ke){oe||ee.error("Senkronizasyon hatası: "+(ke.message||""))}ie(!1)}),J=q=>T(this,null,function*(){s(q),a("registrations"),yield z(q),we(q,!0)}),Pe=c.filter(q=>q.status==="paid"),je=Pe.reduce((q,oe)=>q+oe.amount,0);if(i==="list")return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h2",{className:"heading-card text-foreground",children:"Kamplar"}),l.jsxs("button",{onClick:()=>{Y(),a("create")},className:"btn-primary flex items-center gap-2 text-sm",children:[l.jsx(Xo,{size:16})," Yeni Kamp"]})]}),l.jsxs("div",{className:"space-y-3",children:[B.map(q=>{const oe=t.find(ke=>ke.id===q.category_id);return l.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl bg-card border border-border",children:[q.cover_image&&l.jsx("img",{src:q.cover_image,alt:q.title,className:"w-16 h-16 rounded-lg object-cover"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium text-foreground truncate",children:q.title}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[q.event_date&&l.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(q.event_date).toLocaleDateString("tr-TR")}),q.city&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:["📍 ",q.city]}),oe&&l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-secondary text-muted-foreground",children:oe.name})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>J(q.id),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors text-muted-foreground",children:[l.jsx(Xs,{size:14})," Kayıtlar"]}),l.jsxs("button",{onClick:()=>re(q),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors text-muted-foreground",children:[l.jsx(Iv,{size:14})," Düzenle"]}),l.jsx("button",{onClick:()=>Ke(q.id,q.published),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors",children:q.published?l.jsxs(l.Fragment,{children:[l.jsx(Tu,{size:14,className:"text-primary"})," Yayında"]}):l.jsxs(l.Fragment,{children:[l.jsx(gS,{size:14,className:"text-muted-foreground"})," Taslak"]})}),l.jsx("button",{onClick:()=>me(q.id),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})]},q.id)}),B.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz kamp oluşturulmamış."})]})]});if(i==="create"||i==="edit")return l.jsxs("div",{className:"max-w-2xl",children:[l.jsxs("button",{onClick:()=>{Y(),a("list")},className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-4 transition-colors",children:[l.jsx(Ys,{size:16})," Kamplara Dön"]}),l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:i==="edit"?"Kampı Düzenle":"Yeni Kamp Oluştur"}),l.jsxs("form",{onSubmit:le,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kamp Başlığı"}),l.jsx("input",{type:"text",value:m.title,onChange:q=>g(I(N({},m),{title:q.target.value})),required:!0,className:K,placeholder:"Kamp başlığını giriniz"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Açıklama"}),l.jsx("textarea",{value:m.description,onChange:q=>g(I(N({},m),{description:q.target.value})),rows:4,className:K+" resize-none",placeholder:"Kamp açıklamasını giriniz"})]}),l.jsx(SK,{value:m.instructor,onChange:q=>g(I(N({},m),{instructor:q}))}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kategori"}),l.jsxs("select",{value:m.category,onChange:q=>g(I(N({},m),{category:q.target.value})),className:K,children:[l.jsx("option",{value:"",children:"Kategori seçiniz..."}),t.map(q=>l.jsx("option",{value:q.id,children:q.name},q.id))]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Görseller"}),l.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"İlk görsel kapak fotoğrafı olarak kullanılır. Sürükleyip bırakarak sıralayın."}),l.jsx(yK,{sensors:A,collisionDetection:iK,onDragEnd:q=>{const{active:oe,over:ke}=q;if(!ke||oe.id===ke.id)return;const Ie=L.findIndex((he,ue)=>"img-".concat(ue)===oe.id),ae=L.findIndex((he,ue)=>"img-".concat(ue)===ke.id);Ie===-1||ae===-1||H(rb(L,Ie,ae).map((he,ue)=>I(N({},he),{order:ue})))},children:l.jsx(wK,{items:L.map((q,oe)=>"img-".concat(oe)),strategy:YMe,children:l.jsx("div",{className:"flex gap-3 overflow-x-auto pb-2 mb-3",children:L.map((q,oe)=>l.jsx(kDe,{img:q,index:oe,onRemove:ke=>H(L.filter((Ie,ae)=>ae!==ke).map((Ie,ae)=>I(N({},Ie),{order:ae})))},"img-".concat(oe)))})})}),l.jsxs("label",{className:"flex items-center justify-center gap-2 w-full px-4 py-6 rounded-xl border-2 border-dashed border-border bg-background text-muted-foreground text-sm cursor-pointer hover:border-primary/40 transition-colors",children:[l.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:q=>{const oe=Array.from(q.target.files||[]);oe.length>0&&(F(oe.slice(1)),P(URL.createObjectURL(oe[0]))),q.target.value=""},className:"hidden"}),l.jsx(h7,{size:16})," Görsel Ekle"]})]}),l.jsx("div",{className:"border-t border-border pt-5",children:l.jsx(dDe,{form:m,onChange:q=>g(oe=>N(N({},oe),q)),packages:v,onPackagesChange:x})}),l.jsxs("div",{className:"flex items-center gap-6",children:[l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:m.featured,onChange:q=>g(I(N({},m),{featured:q.target.checked})),className:"rounded border-border"})," Öne Çıkan"]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:m.published,onChange:q=>g(I(N({},m),{published:q.target.checked})),className:"rounded border-border"})," Yayınla"]})]}),l.jsx("button",{type:"submit",disabled:R,className:"btn-primary",children:R?"Kaydediliyor...":i==="edit"?"Değişiklikleri Kaydet":"Kampı Oluştur"})]})]}),E&&l.jsx(hv,{imageSrc:E,aspect:4/3,onCropComplete:G,onCancel:()=>C(null)}),O&&l.jsx(hv,{imageSrc:O,aspect:4/3,onCropComplete:q=>{if(H(oe=>[...oe,{image_url:URL.createObjectURL(q),order:oe.length,file:q}]),P(null),U.length>0){const[oe,...ke]=U;F(ke),setTimeout(()=>P(URL.createObjectURL(oe)),100)}},onCancel:()=>{if(P(null),U.length>0){const[q,...oe]=U;F(oe),setTimeout(()=>P(URL.createObjectURL(q)),100)}}})]});const De=B.find(q=>q.id===o);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("button",{onClick:()=>a("list"),className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(Ys,{size:16})," Kamplara Dön"]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h2",{className:"heading-card text-foreground",children:[De==null?void 0:De.title," - Kayıtlar"]}),l.jsxs("button",{onClick:()=>we(o),disabled:te,className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors text-muted-foreground disabled:opacity-50",children:[l.jsx(yc,{size:14,className:te?"animate-spin":""})," ",te?"Senkronize ediliyor...":"Stripe ile Senkronize Et"]})]}),f?l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Xs,{size:20,className:"mx-auto text-primary mb-2"}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:Pe.length}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Toplam Kayıt"})]}),l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Dv,{size:20,className:"mx-auto text-green-600 mb-2"}),l.jsxs("p",{className:"text-2xl font-heading font-bold text-foreground",children:[Q0(((Re=Pe[0])==null?void 0:Re.currency)||"TRY"),je.toLocaleString("tr-TR")]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Toplam Gelir"})]}),l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Ta,{size:20,className:"mx-auto text-yellow-600 mb-2"}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:c.filter(q=>q.status==="pending").length}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Bekleyen"})]})]}),l.jsxs("div",{className:"space-y-3",children:[c.map(q=>l.jsxs("div",{className:"rounded-xl bg-card border border-border overflow-hidden",children:[l.jsxs("button",{onClick:()=>p(h===q.id?null:q.id),className:"w-full flex items-center gap-4 p-4 text-left hover:bg-secondary/50 transition-colors",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium text-foreground truncate",children:q.full_name}),l.jsx("p",{className:"text-xs text-muted-foreground",children:q.email})]}),l.jsxs("div",{className:"text-right shrink-0",children:[l.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[Q0(q.currency),q.amount]}),l.jsx("p",{className:"text-xs text-muted-foreground truncate max-w-[150px]",children:q.package_description})]}),l.jsx("div",{className:"shrink-0",children:_De(q.status)}),h===q.id?l.jsx(Jd,{size:16,className:"text-muted-foreground"}):l.jsx(Mo,{size:16,className:"text-muted-foreground"})]}),h===q.id&&l.jsxs("div",{className:"px-4 pb-4 pt-1 border-t border-border space-y-2 text-sm",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Ad Soyad"}),l.jsx("p",{className:"font-medium text-foreground",children:q.full_name})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"E-posta"}),l.jsx("p",{className:"text-foreground",children:q.email})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Telefon"}),l.jsx("p",{className:"text-foreground",children:q.phone})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Paket"}),l.jsx("p",{className:"text-foreground",children:q.package_description})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Tutar"}),l.jsxs("p",{className:"font-semibold text-foreground",children:[Q0(q.currency),q.amount]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Kayıt Tarihi"}),l.jsx("p",{className:"text-foreground",children:new Date(q.created_at).toLocaleString("tr-TR")})]})]}),l.jsxs("div",{className:"pt-2 border-t border-border flex justify-end gap-2",children:[q.status!=="paid"&&l.jsxs("button",{onClick:()=>T(this,null,function*(){if(confirm("".concat(q.full_name," adlı kişiye yeni ödeme linki göndermek istediğinize emin misiniz?")))try{const{data:oe,error:ke}=yield Q.functions.invoke("retry-camp-payment",{body:{registrationId:q.id}});if(ke)throw ke;oe!=null&&oe.url&&(yield navigator.clipboard.writeText(oe.url),ee.success("Ödeme linki panoya kopyalandı! Müşteriye iletebilirsiniz."))}catch(oe){ee.error("Ödeme linki oluşturulamadı: "+(oe.message||"Bilinmeyen hata"))}}),className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary/80 font-medium px-3 py-1.5 rounded-lg hover:bg-primary/10 transition-colors",children:[l.jsx(yc,{size:14})," Ödeme Linki Oluştur"]}),l.jsxs("button",{onClick:()=>T(this,null,function*(){if(confirm("".concat(q.full_name," adlı kişinin kaydını silmek istediğinize emin misiniz? Bu işlem kontenjanı geri açacaktır.")))try{const{error:oe}=yield Q.from("camp_registrations").delete().eq("id",q.id);if(oe)throw oe;ee.success("Kayıt silindi, kontenjan güncellendi."),u(ke=>ke.filter(Ie=>Ie.id!==q.id))}catch(oe){ee.error("Kayıt silinemedi.")}}),className:"flex items-center gap-1.5 text-xs text-destructive hover:text-destructive/80 font-medium px-3 py-1.5 rounded-lg hover:bg-destructive/10 transition-colors",children:[l.jsx(pi,{size:14})," Kaydı Sil"]})]})]})]},q.id)),c.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Bu kampa henüz kayıt yapılmamış."})]})]})]})}const Z0=e=>e==="USD"?"$":e==="EUR"?"€":e==="GBP"?"£":"₺",SDe=e=>e==="paid"?l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-green-600",children:[l.jsx(Kn,{size:12})," Ödendi"]}):e==="pending"?l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-yellow-600",children:[l.jsx(Ta,{size:12})," Bekliyor"]}):l.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-destructive",children:[l.jsx(Mv,{size:12})," Başarısız"]}),eD=e=>e==="one_time"?"Tek Seferlik":e==="deposit"?"Ön Ödeme":e==="subscription"?"Abonelik":e;function EDe({courses:e}){var S;const[t,r]=w.useState([]),[n,i]=w.useState(!1),[a,o]=w.useState(null),[s,c]=w.useState("all"),[u,f]=w.useState("all"),[d,h]=w.useState(""),p=w.useMemo(()=>e.filter(E=>E.course_type!=="camp"),[e]),m=w.useMemo(()=>{const E=new Map;return e.forEach(C=>E.set(C.id,C)),E},[e]),g=()=>T(this,null,function*(){i(!0);const{data:E,error:C}=yield Q.from("course_registrations").select("*").order("created_at",{ascending:!1});if(C)ee.error("Kayıtlar yüklenirken hata: "+C.message);else{const R=new Set(p.map(M=>M.id));r((E||[]).filter(M=>R.has(M.course_id)))}i(!1)}),v=(E=!1)=>T(this,null,function*(){try{const{data:C,error:R}=yield Q.functions.invoke("sync-pending-registrations",{body:{kind:"course"}});if(R)throw R;E||ee.success("Senkronize edildi: ".concat((C==null?void 0:C.updated)||0," ödeme güncellendi.")),yield g()}catch(C){E||ee.error("Senkronizasyon hatası: "+(C.message||""))}});w.useEffect(()=>{g().then(()=>v(!0))},[p.length]);const x=t.filter(E=>{if(s!=="all"&&E.course_id!==s||u!=="all"&&E.status!==u)return!1;if(d){const C=d.toLowerCase();if(!E.full_name.toLowerCase().includes(C)&&!E.email.toLowerCase().includes(C)&&!E.phone.includes(C))return!1}return!0}),b=x.filter(E=>E.status==="paid"),y=x.filter(E=>E.status==="pending"),j=b.reduce((E,C)=>E+Number(C.amount||0),0),k=(E,C)=>T(this,null,function*(){if(!confirm("".concat(C," adlı kişinin kaydını silmek istediğinize emin misiniz?")))return;const{error:R}=yield Q.from("course_registrations").delete().eq("id",E);if(R){ee.error("Silme başarısız: "+R.message);return}ee.success("Kayıt silindi."),r(M=>M.filter(L=>L.id!==E))}),_="px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20";return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[l.jsx("h2",{className:"heading-card text-foreground",children:"Eğitim Kayıtları"}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{onClick:()=>v(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Stripe ile Senkronize Et"}),l.jsx("button",{onClick:g,className:"text-xs text-muted-foreground hover:text-foreground",children:"Yenile"})]})]}),l.jsxs("div",{className:"flex flex-wrap gap-3",children:[l.jsxs("div",{className:"relative",children:[l.jsx(N7,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),l.jsx("input",{type:"text",value:d,onChange:E=>h(E.target.value),placeholder:"Ad, e-posta, telefon ara...",className:"".concat(_," pl-9 w-64")})]}),l.jsxs("select",{value:s,onChange:E=>c(E.target.value),className:_,children:[l.jsx("option",{value:"all",children:"Tüm Eğitimler"}),p.map(E=>l.jsx("option",{value:E.id,children:E.title},E.id))]}),l.jsxs("select",{value:u,onChange:E=>f(E.target.value),className:_,children:[l.jsx("option",{value:"all",children:"Tüm Durumlar"}),l.jsx("option",{value:"paid",children:"Ödendi"}),l.jsx("option",{value:"pending",children:"Bekliyor"}),l.jsx("option",{value:"failed",children:"Başarısız"})]})]}),l.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Xs,{size:20,className:"mx-auto text-primary mb-2"}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:b.length}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Ödenen Kayıt"})]}),l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Dv,{size:20,className:"mx-auto text-green-600 mb-2"}),l.jsxs("p",{className:"text-2xl font-heading font-bold text-foreground",children:[Z0(((S=b[0])==null?void 0:S.currency)||"TRY"),j.toLocaleString("tr-TR")]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Toplam Gelir"})]}),l.jsxs("div",{className:"p-5 rounded-xl bg-card border border-border text-center",children:[l.jsx(Ta,{size:20,className:"mx-auto text-yellow-600 mb-2"}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:y.length}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Bekleyen"})]})]}),n?l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Yükleniyor..."}):l.jsxs("div",{className:"space-y-3",children:[x.map(E=>{const C=m.get(E.course_id);return l.jsxs("div",{className:"rounded-xl bg-card border border-border overflow-hidden",children:[l.jsxs("button",{onClick:()=>o(a===E.id?null:E.id),className:"w-full flex items-center gap-4 p-4 text-left hover:bg-secondary/50 transition-colors",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium text-foreground truncate",children:E.full_name}),l.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[E.email," • ",(C==null?void 0:C.title)||"—"]})]}),l.jsxs("div",{className:"text-right shrink-0",children:[l.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[Z0(E.currency),E.amount]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:eD(E.payment_type)})]}),l.jsx("div",{className:"shrink-0",children:SDe(E.status)}),a===E.id?l.jsx(Jd,{size:16,className:"text-muted-foreground"}):l.jsx(Mo,{size:16,className:"text-muted-foreground"})]}),a===E.id&&l.jsxs("div",{className:"px-4 pb-4 pt-1 border-t border-border space-y-2 text-sm",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Ad Soyad"}),l.jsx("p",{className:"font-medium text-foreground",children:E.full_name})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"E-posta"}),l.jsx("p",{className:"text-foreground",children:E.email})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Telefon"}),l.jsx("p",{className:"text-foreground",children:E.phone||"—"})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Eğitim"}),l.jsx("p",{className:"text-foreground",children:(C==null?void 0:C.title)||"—"})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Ödeme Tipi"}),l.jsx("p",{className:"text-foreground",children:eD(E.payment_type)})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Tutar"}),l.jsxs("p",{className:"font-semibold text-foreground",children:[Z0(E.currency),E.amount]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Hesap"}),l.jsx("p",{className:"text-foreground",children:E.user_id?"Üye":"Misafir"})]}),l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Kayıt Tarihi"}),l.jsx("p",{className:"text-foreground",children:new Date(E.created_at).toLocaleString("tr-TR")})]}),E.region&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Bölge"}),l.jsx("p",{className:"text-foreground",children:E.region})]}),E.profession&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Meslek"}),l.jsx("p",{className:"text-foreground",children:E.profession})]}),E.birth_date&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Doğum Tarihi"}),l.jsx("p",{className:"text-foreground",children:new Date(E.birth_date).toLocaleDateString("tr-TR")})]}),E.heard_from&&l.jsxs("div",{children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Nereden Duydu"}),l.jsx("p",{className:"text-foreground",children:E.heard_from})]})]}),l.jsx("div",{className:"pt-2 border-t border-border flex justify-end",children:l.jsxs("button",{onClick:()=>k(E.id,E.full_name),className:"flex items-center gap-1.5 text-xs text-destructive hover:text-destructive/80 font-medium px-3 py-1.5 rounded-lg hover:bg-destructive/10 transition-colors",children:[l.jsx(pi,{size:14})," Kaydı Sil"]})})]})]},E.id)}),x.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Kayıt bulunamadı."})]})]})}var iC="Progress",aC=100,[NDe,zIe]=La(iC),[CDe,TDe]=NDe(iC),EK=w.forwardRef((e,t)=>{const f=e,{__scopeProgress:r,value:n=null,max:i,getValueLabel:a=ADe}=f,o=Z(f,["__scopeProgress","value","max","getValueLabel"]);(i||i===0)&&!tD(i)&&console.error(PDe("".concat(i),"Progress"));const s=tD(i)?i:aC;n!==null&&!rD(n,s)&&console.error(ODe("".concat(n),"Progress"));const c=rD(n,s)?n:null,u=pv(c)?a(c,s):void 0;return l.jsx(CDe,{scope:r,value:c,max:s,children:l.jsx(ut.div,I(N({"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":pv(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":TK(c,s),"data-value":c!=null?c:void 0,"data-max":s},o),{ref:t}))})});EK.displayName=iC;var NK="ProgressIndicator",CK=w.forwardRef((e,t)=>{var o;const a=e,{__scopeProgress:r}=a,n=Z(a,["__scopeProgress"]),i=TDe(NK,r);return l.jsx(ut.div,I(N({"data-state":TK(i.value,i.max),"data-value":(o=i.value)!=null?o:void 0,"data-max":i.max},n),{ref:t}))});CK.displayName=NK;function ADe(e,t){return"".concat(Math.round(e/t*100),"%")}function TK(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function pv(e){return typeof e=="number"}function tD(e){return pv(e)&&!isNaN(e)&&e>0}function rD(e,t){return pv(e)&&!isNaN(e)&&e<=t&&e>=0}function PDe(e,t){return"Invalid prop `max` of value `".concat(e,"` supplied to `").concat(t,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(aC,"`.")}function ODe(e,t){return"Invalid prop `value` of value `".concat(e,"` supplied to `").concat(t,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(aC," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")}var AK=EK,RDe=CK;const PK=w.forwardRef((i,n)=>{var a=i,{className:e,value:t}=a,r=Z(a,["className","value"]);return l.jsx(AK,I(N({ref:n,className:Et("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e)},r),{children:l.jsx(RDe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(t||0),"%)")}})}))});PK.displayName=AK.displayName;const OK=[{value:"one_time",label:"Tek Seferlik Ödeme"},{value:"subscription",label:"Abonelik"},{value:"deposit",label:"Ön Ödeme (Yüz yüze)"},{value:"free",label:"Ücretsiz"},{value:"camp",label:"Kamp (Paket Bazlı)"}],$De=e=>{var t;return((t=OK.find(r=>r.value===e))==null?void 0:t.label)||e},$m={name:"",payment_type:"one_time",subscription_monthly_price:"",subscription_yearly_price:""};function MDe({categories:e,courses:t,queryClient:r,generateSlug:n}){const[i,a]=w.useState(!1),[o,s]=w.useState(N({},$m)),[c,u]=w.useState(null),[f,d]=w.useState(N({},$m)),[h,p]=w.useState(!1),m=()=>r.invalidateQueries({queryKey:["categories"]}),g=()=>T(this,null,function*(){if(o.name.trim()){p(!0);try{let j=n(o.name.trim());const{data:k}=yield Q.from("categories").select("slug").eq("slug",j);k&&k.length>0&&(j="".concat(j,"-").concat(Date.now().toString(36)));const{error:_}=yield Q.from("categories").insert({name:o.name.trim(),slug:j,payment_type:o.payment_type,subscription_monthly_price:parseFloat(o.subscription_monthly_price)||0,subscription_yearly_price:parseFloat(o.subscription_yearly_price)||0});if(_)throw _;ee.success("Kategori oluşturuldu."),s(N({},$m)),a(!1),m()}catch(j){ee.error("Hata: "+j.message)}p(!1)}}),v=j=>T(this,null,function*(){if(f.name.trim()){p(!0);try{let k=n(f.name.trim());const{data:_}=yield Q.from("categories").select("slug").eq("slug",k).neq("id",j);_&&_.length>0&&(k="".concat(k,"-").concat(Date.now().toString(36)));const{error:S}=yield Q.from("categories").update({name:f.name.trim(),slug:k,payment_type:f.payment_type,subscription_monthly_price:parseFloat(f.subscription_monthly_price)||0,subscription_yearly_price:parseFloat(f.subscription_yearly_price)||0}).eq("id",j);if(S)throw S;ee.success("Kategori güncellendi."),u(null),m()}catch(k){ee.error("Hata: "+k.message)}p(!1)}}),x=(j,k)=>T(this,null,function*(){const _=t.filter(S=>S.category_id===j).length;if(_>0){ee.error('"'.concat(k,'" kategorisinde ').concat(_," eğitim bulunuyor. Önce eğitimleri başka bir kategoriye taşıyın."));return}if(confirm('"'.concat(k,'" kategorisini silmek istediğinize emin misiniz?')))try{const{error:S}=yield Q.from("categories").delete().eq("id",j);if(S)throw S;ee.success("Kategori silindi."),m()}catch(S){ee.error("Hata: "+S.message)}}),b=j=>{u(j.id),d({name:j.name,payment_type:j.payment_type||"one_time",subscription_monthly_price:String(j.subscription_monthly_price||""),subscription_yearly_price:String(j.subscription_yearly_price||"")})},y=(j,k)=>l.jsxs("div",{className:"space-y-3",children:[l.jsx("input",{value:j.name,onChange:_=>k(I(N({},j),{name:_.target.value})),placeholder:"Kategori adı",className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"}),l.jsx("select",{value:j.payment_type,onChange:_=>k(I(N({},j),{payment_type:_.target.value})),className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",children:OK.map(_=>l.jsx("option",{value:_.value,children:_.label},_.value))}),j.payment_type==="subscription"&&l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Aylık Fiyat (₺)"}),l.jsx("input",{type:"number",value:j.subscription_monthly_price,onChange:_=>k(I(N({},j),{subscription_monthly_price:_.target.value})),placeholder:"99",className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Yıllık Fiyat (₺)"}),l.jsx("input",{type:"number",value:j.subscription_yearly_price,onChange:_=>k(I(N({},j),{subscription_yearly_price:_.target.value})),placeholder:"899",className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]})]});return l.jsxs("div",{className:"max-w-lg space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("h2",{className:"heading-card text-foreground",children:"Kategoriler"}),!i&&l.jsxs("button",{onClick:()=>a(!0),className:"btn-primary flex items-center gap-2 text-sm",children:[l.jsx(Xo,{size:16})," Yeni Kategori"]})]}),i&&l.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border space-y-3",children:[y(o,s),l.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[l.jsxs("button",{onClick:g,disabled:h,className:"btn-primary flex items-center gap-2 text-sm",children:[l.jsx(r1,{size:16})," Oluştur"]}),l.jsx("button",{onClick:()=>{a(!1),s(N({},$m))},className:"p-2 hover:bg-secondary rounded-lg transition-colors text-muted-foreground",children:l.jsx(yn,{size:18})})]})]}),l.jsxs("div",{className:"space-y-3",children:[e.map(j=>l.jsx("div",{className:"p-4 rounded-xl bg-card border border-border",children:c===j.id?l.jsxs("div",{className:"space-y-3",children:[y(f,d),l.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[l.jsxs("button",{onClick:()=>v(j.id),disabled:h,className:"btn-primary flex items-center gap-2 text-sm",children:[l.jsx(r1,{size:16})," Kaydet"]}),l.jsx("button",{onClick:()=>u(null),className:"p-2 hover:bg-secondary rounded-lg transition-colors text-muted-foreground",children:l.jsx(yn,{size:18})})]})]}):l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("span",{className:"font-medium text-foreground",children:j.name}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[l.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-primary/10 text-primary font-medium",children:$De(j.payment_type||"one_time")}),j.payment_type==="subscription"&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:["₺",j.subscription_monthly_price,"/ay • ₺",j.subscription_yearly_price,"/yıl"]}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.filter(k=>k.category_id===j.id).length," eğitim"]})]})]}),l.jsx("button",{onClick:()=>b(j),className:"p-2 hover:bg-secondary rounded-lg transition-colors text-muted-foreground",children:l.jsx(Iv,{size:16})}),l.jsx("button",{onClick:()=>x(j.id,j.name),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})},j.id)),e.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz kategori oluşturulmamış."})]})]})}function DDe({courses:e,categories:t}){const[r,n]=w.useState([]),[i,a]=w.useState(!0),[o,s]=w.useState("all"),c=e.filter(m=>{const g=t.find(v=>v.id===m.category_id);return(g==null?void 0:g.payment_type)==="deposit"}),u=()=>T(this,null,function*(){a(!0);try{let m=Q.from("reservations").select("*").order("created_at",{ascending:!1});o!=="all"&&(m=m.eq("course_id",o));const{data:g,error:v}=yield m;if(v)throw v;n(g||[])}catch(m){console.error("Reservations fetch error:",m.message)}a(!1)});w.useEffect(()=>{u()},[o]);const f=r,d=f.length,h=f.reduce((m,g)=>m+(g.deposit_amount||0),0),p=m=>{var g;return((g=e.find(v=>v.id===m))==null?void 0:g.title)||"Bilinmeyen Eğitim"};return[...new Set(r.map(m=>m.course_id))],l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex items-center justify-between mb-2",children:l.jsx("h2",{className:"heading-card text-foreground",children:"Ön Kayıtlar (Rezervasyonlar)"})}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(Xs,{size:16,className:"text-primary"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Toplam Kayıt"})]}),l.jsx("p",{className:"text-2xl font-heading font-semibold text-foreground",children:d})]}),l.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(Dv,{size:16,className:"text-primary"}),l.jsx("span",{className:"text-xs text-muted-foreground",children:"Toplam Ön Ödeme"})]}),l.jsxs("p",{className:"text-2xl font-heading font-semibold text-foreground",children:["₺",h.toLocaleString("tr-TR")]})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(d7,{size:16,className:"text-muted-foreground"}),l.jsxs("select",{value:o,onChange:m=>s(m.target.value),className:"px-4 py-2 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",children:[l.jsx("option",{value:"all",children:"Tüm Eğitimler"}),c.map(m=>l.jsx("option",{value:m.id,children:m.title},m.id))]})]}),i?l.jsx("div",{className:"flex items-center justify-center py-12",children:l.jsx(vS,{className:"animate-spin text-primary",size:24})}):f.length===0?l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz ön kayıt bulunmuyor."}):l.jsx("div",{className:"space-y-3",children:f.map(m=>l.jsx("div",{className:"p-4 rounded-xl bg-card border border-border",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx(Lz,{size:14,className:"text-primary"}),l.jsx("span",{className:"font-mono text-sm font-semibold text-primary",children:m.ticket_number})]}),l.jsx("p",{className:"text-sm font-medium text-foreground",children:m.user_name||m.user_email}),l.jsx("p",{className:"text-xs text-muted-foreground",children:m.user_email}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:p(m.course_id)})]}),l.jsxs("div",{className:"text-right shrink-0",children:[l.jsxs("p",{className:"text-sm font-semibold text-foreground",children:["₺",m.deposit_amount]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(m.created_at).toLocaleDateString("tr-TR",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}),l.jsx("span",{className:"inline-block mt-1 text-xs px-2 py-0.5 rounded-full font-medium ".concat(m.status==="confirmed"?"bg-green-500/10 text-green-600":"bg-secondary text-muted-foreground"),children:m.status==="confirmed"?"Onaylı":m.status})]})]})},m.id))})]})}const IDe={all:"Tüm Zamanlar",this_year:"Bu Yıl",last_year:"Geçen Yıl",this_month:"Bu Ay",last_month:"Geçen Ay",this_week:"Bu Hafta",last_week:"Geçen Hafta"};function LDe(e){const t=new Date,r=t.getFullYear(),n=t.getMonth(),i=t.getDay(),a=t.getDate();switch(e){case"all":return{start:null,end:null};case"this_year":return{start:new Date(r,0,1),end:t};case"last_year":return{start:new Date(r-1,0,1),end:new Date(r-1,11,31,23,59,59)};case"this_month":return{start:new Date(r,n,1),end:t};case"last_month":return{start:new Date(r,n-1,1),end:new Date(r,n,0,23,59,59)};case"this_week":{const o=i===0?6:i-1;return{start:new Date(r,n,a-o),end:t}}case"last_week":{const o=i===0?6:i-1,s=new Date(r,n,a-o),c=new Date(s);c.setDate(c.getDate()-7);const u=new Date(s);return u.setDate(u.getDate()-1),u.setHours(23,59,59),{start:c,end:u}}}}function zDe({courses:e,categories:t}){var h;const[r,n]=w.useState("all"),[i,a]=w.useState([]),[o,s]=w.useState([]),[c,u]=w.useState(!0);w.useEffect(()=>{T(this,null,function*(){u(!0);const[m,g]=yield Promise.all([Q.from("user_purchases").select("course_id, created_at"),Q.from("reservations").select("course_id, deposit_amount, created_at")]);a(m.data||[]),s(g.data||[]),u(!1)})},[]);const f=w.useMemo(()=>{const{start:p,end:m}=LDe(r),g=U=>p?U.filter(F=>{const O=new Date(F.created_at);return O>=p&&(!m||O<=m)}):U,v=g(i),x=g(o),b={};for(const U of v){b[U.course_id]||(b[U.course_id]={purchases:0,revenue:0}),b[U.course_id].purchases+=1;const F=e.find(O=>O.id===U.course_id);if(F){const O=t.find(A=>A.id===F.category_id),P=(O==null?void 0:O.payment_type)||"one_time";P==="subscription"?b[U.course_id].revenue+=(O==null?void 0:O.subscription_monthly_price)||0:P==="free"||(b[U.course_id].revenue+=F.price||0)}}for(const U of x)b[U.course_id]||(b[U.course_id]={purchases:0,revenue:0}),b[U.course_id].purchases+=1,b[U.course_id].revenue+=U.deposit_amount||0;const y=Object.values(b).reduce((U,F)=>U+F.revenue,0),j=v.length+x.length;let k="",_=0,S=0;for(const[U,F]of Object.entries(b))F.revenue>S&&(k=U,_=F.purchases,S=F.revenue);const E=e.find(U=>U.id===k),C={};for(const[U,F]of Object.entries(b)){const O=e.find(A=>A.id===U),P=(O==null?void 0:O.category_id)||"unknown";C[P]||(C[P]={sales:0,revenue:0}),C[P].sales+=F.purchases,C[P].revenue+=F.revenue}let R="",M=0;for(const[U,F]of Object.entries(C))F.revenue>M&&(R=U,M=F.revenue);const L=t.find(U=>U.id===R),H=e.map(U=>{const F=b[U.id]||{purchases:0,revenue:0},O=t.find(P=>P.id===U.category_id);return{id:U.id,title:U.title,categoryName:(O==null?void 0:O.name)||"-",paymentType:(O==null?void 0:O.payment_type)||"one_time",sales:F.purchases,revenue:F.revenue}}).sort((U,F)=>F.revenue-U.revenue);return{totalRevenue:y,totalSales:j,topCourse:E,topCourseSales:_,topCourseRevenue:S,topCategory:L,topCategoryRevenue:M,courseBreakdown:H,categoryRevenue:C}},[i,o,e,t,r]),d=p=>{switch(p){case"subscription":return"Abonelik";case"deposit":return"Ön Ödeme";case"free":return"Ücretsiz";default:return"Tek Seferlik"}};return l.jsxs("div",{className:"space-y-8",children:[l.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[l.jsx(Bi,{size:16,className:"text-muted-foreground"}),l.jsx("span",{className:"text-sm text-muted-foreground font-medium",children:"Dönem:"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(IDe).map(([p,m])=>l.jsx("button",{onClick:()=>n(p),className:"px-3 py-1.5 rounded-full text-xs font-medium transition-all ".concat(r===p?"bg-primary text-primary-foreground":"bg-secondary text-muted-foreground hover:bg-secondary/80"),children:m},p))})]}),c?l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Yükleniyor..."}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[l.jsxs("div",{className:"p-5 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:l.jsx(Dv,{size:20,className:"text-primary"})}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Toplam Gelir"})]}),l.jsxs("p",{className:"text-2xl font-heading font-bold text-foreground",children:["₺",f.totalRevenue.toLocaleString("tr-TR")]})]}),l.jsxs("div",{className:"p-5 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:l.jsx(R7,{size:20,className:"text-primary"})}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Toplam Satış"})]}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:f.totalSales})]}),l.jsxs("div",{className:"p-5 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:l.jsx(pS,{size:20,className:"text-primary"})}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Toplam Eğitim"})]}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:e.length})]}),l.jsxs("div",{className:"p-5 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:l.jsx(bS,{size:20,className:"text-primary"})}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"Kategoriler"})]}),l.jsx("p",{className:"text-2xl font-heading font-bold text-foreground",children:t.length})]})]}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"p-6 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(M7,{size:18,className:"text-primary"}),l.jsx("h3",{className:"font-heading font-semibold text-foreground",children:"En Başarılı Eğitim"})]}),f.topCourse?l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-foreground text-lg",children:f.topCourse.title}),l.jsxs("div",{className:"flex gap-4 mt-2 text-sm text-muted-foreground",children:[l.jsxs("span",{children:[f.topCourseSales," satış"]}),l.jsxs("span",{className:"font-medium text-primary",children:["₺",f.topCourseRevenue.toLocaleString("tr-TR")]})]})]}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"Henüz satış verisi yok."})]}),l.jsxs("div",{className:"p-6 rounded-2xl bg-card border border-border",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(c7,{size:18,className:"text-primary"}),l.jsx("h3",{className:"font-heading font-semibold text-foreground",children:"En Başarılı Kategori"})]}),f.topCategory?l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-foreground text-lg",children:f.topCategory.name}),l.jsxs("div",{className:"flex gap-4 mt-2 text-sm text-muted-foreground",children:[l.jsxs("span",{children:[((h=f.categoryRevenue[f.topCategory.id])==null?void 0:h.sales)||0," satış"]}),l.jsxs("span",{className:"font-medium text-primary",children:["₺",f.topCategoryRevenue.toLocaleString("tr-TR")]})]})]}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"Henüz satış verisi yok."})]})]}),l.jsxs("div",{className:"rounded-2xl bg-card border border-border overflow-hidden",children:[l.jsx("div",{className:"p-5 border-b border-border",children:l.jsx("h3",{className:"font-heading font-semibold text-foreground",children:"Eğitim Bazında Performans"})}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[l.jsx("th",{className:"text-left px-5 py-3 font-medium text-muted-foreground",children:"Eğitim"}),l.jsx("th",{className:"text-left px-5 py-3 font-medium text-muted-foreground",children:"Kategori"}),l.jsx("th",{className:"text-left px-5 py-3 font-medium text-muted-foreground",children:"Ödeme Tipi"}),l.jsx("th",{className:"text-right px-5 py-3 font-medium text-muted-foreground",children:"Satış"}),l.jsx("th",{className:"text-right px-5 py-3 font-medium text-muted-foreground",children:"Gelir"})]})}),l.jsxs("tbody",{children:[f.courseBreakdown.map(p=>l.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-secondary/30 transition-colors",children:[l.jsx("td",{className:"px-5 py-3 font-medium text-foreground",children:p.title}),l.jsx("td",{className:"px-5 py-3 text-muted-foreground",children:p.categoryName}),l.jsx("td",{className:"px-5 py-3",children:l.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full font-medium ".concat(p.paymentType==="subscription"?"bg-primary/10 text-primary":p.paymentType==="free"?"bg-green-500/10 text-green-600":p.paymentType==="deposit"?"bg-amber-500/10 text-amber-600":"bg-secondary text-muted-foreground"),children:d(p.paymentType)})}),l.jsx("td",{className:"px-5 py-3 text-right text-foreground",children:p.sales}),l.jsxs("td",{className:"px-5 py-3 text-right font-medium text-foreground",children:["₺",p.revenue.toLocaleString("tr-TR")]})]},p.id)),f.courseBreakdown.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"px-5 py-8 text-center text-muted-foreground",children:"Henüz eğitim bulunmuyor."})})]})]})})]}),l.jsxs("div",{className:"rounded-2xl bg-card border border-border overflow-hidden",children:[l.jsx("div",{className:"p-5 border-b border-border",children:l.jsx("h3",{className:"font-heading font-semibold text-foreground",children:"Kategori Bazında Performans"})}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[l.jsx("th",{className:"text-left px-5 py-3 font-medium text-muted-foreground",children:"Kategori"}),l.jsx("th",{className:"text-left px-5 py-3 font-medium text-muted-foreground",children:"Ödeme Tipi"}),l.jsx("th",{className:"text-right px-5 py-3 font-medium text-muted-foreground",children:"Eğitim Sayısı"}),l.jsx("th",{className:"text-right px-5 py-3 font-medium text-muted-foreground",children:"Satış"}),l.jsx("th",{className:"text-right px-5 py-3 font-medium text-muted-foreground",children:"Gelir"})]})}),l.jsx("tbody",{children:t.map(p=>{const m=e.filter(v=>v.category_id===p.id),g=f.categoryRevenue[p.id]||{sales:0,revenue:0};return l.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-secondary/30 transition-colors",children:[l.jsx("td",{className:"px-5 py-3 font-medium text-foreground",children:p.name}),l.jsx("td",{className:"px-5 py-3",children:l.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full font-medium ".concat(p.payment_type==="subscription"?"bg-primary/10 text-primary":p.payment_type==="free"?"bg-green-500/10 text-green-600":p.payment_type==="deposit"?"bg-amber-500/10 text-amber-600":"bg-secondary text-muted-foreground"),children:d(p.payment_type)})}),l.jsx("td",{className:"px-5 py-3 text-right text-foreground",children:m.length}),l.jsx("td",{className:"px-5 py-3 text-right text-foreground",children:g.sales}),l.jsxs("td",{className:"px-5 py-3 text-right font-medium text-foreground",children:["₺",g.revenue.toLocaleString("tr-TR")]})]},p.id)})})]})})]})]})]})}const nD=[{value:"TRY",label:"₺ TRY",symbol:"₺"},{value:"USD",label:"$ USD",symbol:"$"},{value:"EUR",label:"€ EUR",symbol:"€"},{value:"GBP",label:"£ GBP",symbol:"£"}];function BDe(){const[e,t]=w.useState([]),[r,n]=w.useState(!0),[i,a]=w.useState(!1),[o,s]=w.useState(""),[c,u]=w.useState("TRY"),[f,d]=w.useState(""),[h,p]=w.useState(null),m=()=>T(this,null,function*(){n(!0);const{data:j,error:k}=yield Q.from("payment_links").select("*").order("created_at",{ascending:!1});k?ee.error("Ödeme bağlantıları yüklenirken hata oluştu"):t(j||[]),n(!1)});w.useEffect(()=>{m()},[]);const g=()=>T(this,null,function*(){if(!o||parseFloat(o)<=0){ee.error("Geçerli bir tutar girin");return}a(!0);try{const{data:j,error:k}=yield Q.functions.invoke("create-payment-link",{body:{amount:o,currency:c,description:f}});if(k)throw k;if(j!=null&&j.error)throw new Error(j.error);j!=null&&j.url&&(yield navigator.clipboard.writeText(j.url),ee.success("Ödeme bağlantısı oluşturuldu ve kopyalandı!")),s(""),d(""),m()}catch(j){ee.error("Hata: "+(j.message||"Bilinmeyen hata"))}a(!1)}),v=j=>T(this,null,function*(){yield navigator.clipboard.writeText(j),ee.success("Bağlantı kopyalandı!")}),x=j=>T(this,null,function*(){p(j);try{const{data:k,error:_}=yield Q.functions.invoke("verify-payment-link",{body:{paymentLinkId:j}});if(_)throw _;(k==null?void 0:k.status)==="paid"?(ee.success("Ödeme onaylandı!"),m()):ee.info("Ödeme henüz tamamlanmadı")}catch(k){ee.error("Durum kontrol edilirken hata oluştu")}p(null)}),b=j=>{var k;return((k=nD.find(_=>_.value===j))==null?void 0:k.symbol)||j},y=j=>j==="paid"?l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-1 rounded-full bg-green-500/10 text-green-600",children:[l.jsx(Kn,{size:12})," Ödendi"]}):l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-1 rounded-full bg-yellow-500/10 text-yellow-600",children:[l.jsx(Ta,{size:12})," Bekliyor"]});return l.jsxs("div",{className:"space-y-8",children:[l.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6",children:[l.jsxs("h3",{className:"text-lg font-semibold text-foreground mb-4 flex items-center gap-2",children:[l.jsx(Xo,{size:20})," Yeni Ödeme Bağlantısı Oluştur"]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Para Birimi"}),l.jsx("select",{value:c,onChange:j=>u(j.target.value),className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm",children:nD.map(j=>l.jsx("option",{value:j.value,children:j.label},j.value))})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Tutar"}),l.jsx("input",{type:"number",min:"0",step:"0.01",value:o,onChange:j=>s(j.target.value),placeholder:"0.00",className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Açıklama (opsiyonel)"}),l.jsx("input",{type:"text",value:f,onChange:j=>d(j.target.value),placeholder:"Ödeme açıklaması",className:"w-full px-3 py-2 rounded-lg border border-border bg-background text-foreground text-sm"})]}),l.jsx("div",{className:"flex items-end",children:l.jsxs("button",{onClick:g,disabled:i||!o,className:"w-full px-4 py-2 rounded-lg bg-primary text-primary-foreground font-medium text-sm hover:opacity-90 transition-opacity disabled:opacity-50 flex items-center justify-center gap-2",children:[i?l.jsx(yc,{size:16,className:"animate-spin"}):l.jsx(n1,{size:16}),i?"Oluşturuluyor...":"Oluştur ve Kopyala"]})})]})]}),l.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsxs("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[l.jsx(n1,{size:20})," Ödeme Bağlantıları"]}),l.jsxs("button",{onClick:m,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1",children:[l.jsx(yc,{size:14})," Yenile"]})]}),r?l.jsx("p",{className:"text-muted-foreground text-sm",children:"Yükleniyor..."}):e.length===0?l.jsx("p",{className:"text-muted-foreground text-sm",children:"Henüz ödeme bağlantısı oluşturulmadı."}):l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-border text-left",children:[l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"Tarih"}),l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"Açıklama"}),l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"Tutar"}),l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"Durum"}),l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"Ödeyen"}),l.jsx("th",{className:"pb-3 font-medium text-muted-foreground",children:"İşlemler"})]})}),l.jsx("tbody",{children:e.map(j=>l.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[l.jsx("td",{className:"py-3 text-foreground",children:new Date(j.created_at).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}),l.jsx("td",{className:"py-3 text-foreground",children:j.description||l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsxs("td",{className:"py-3 font-medium text-foreground",children:[b(j.currency),j.amount]}),l.jsx("td",{className:"py-3",children:y(j.status)}),l.jsx("td",{className:"py-3",children:j.status==="paid"?l.jsxs("div",{children:[l.jsx("p",{className:"text-foreground",children:j.paid_by_name||"—"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:j.paid_by_email||""}),j.paid_at&&l.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(j.paid_at).toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})})]}):l.jsx("span",{className:"text-muted-foreground",children:"—"})}),l.jsx("td",{className:"py-3",children:l.jsxs("div",{className:"flex items-center gap-2",children:[j.stripe_payment_link_url&&j.status!=="paid"&&l.jsxs("button",{onClick:()=>v(j.stripe_payment_link_url),className:"flex items-center gap-1 text-xs px-2 py-1 rounded-lg hover:bg-secondary transition-colors text-muted-foreground",title:"Bağlantıyı kopyala",children:[l.jsx(mS,{size:14})," Kopyala"]}),j.status!=="paid"&&l.jsxs("button",{onClick:()=>x(j.id),disabled:h===j.id,className:"flex items-center gap-1 text-xs px-2 py-1 rounded-lg hover:bg-secondary transition-colors text-muted-foreground",title:"Ödeme durumunu kontrol et",children:[l.jsx(yc,{size:14,className:h===j.id?"animate-spin":""}),"Kontrol Et"]})]})})]},j.id))})]})})]})]})}const iD={title:"",excerpt:"",content:"",cover_image:"",author:"İpek Kabidan",published:!1,meta_title:"",meta_description:"",related_course_id:""};function UDe(e){return e.toLowerCase().replace(/ğ/g,"g").replace(/ü/g,"u").replace(/ş/g,"s").replace(/ı/g,"i").replace(/ö/g,"o").replace(/ç/g,"c").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function FDe(){const{data:e=[]}=xE({adminMode:!0}),{data:t=[]}=dl(),r=MS(),[n,i]=w.useState("list"),[a,o]=w.useState(null),[s,c]=w.useState(N({},iD)),[u,f]=w.useState(!1),[d,h]=w.useState(null),[p,m]=w.useState(null),g=w.useRef(null),v=()=>{c(N({},iD)),o(null),h(null)},x=S=>{o(S),c({title:S.title,excerpt:S.excerpt||"",content:S.content,cover_image:S.cover_image||"",author:S.author||"İpek Kabidan",published:S.published,meta_title:S.meta_title||"",meta_description:S.meta_description||"",related_course_id:S.related_course_id||""}),h(null),i("form")},b=S=>{var R;const E=(R=S.target.files)==null?void 0:R[0];if(!E)return;const C=new FileReader;C.onload=()=>m(C.result),C.readAsDataURL(E),S.target.value=""},y=S=>{h(S),c(E=>I(N({},E),{cover_image:URL.createObjectURL(S)})),m(null)},j=S=>T(this,null,function*(){if(S.preventDefault(),!s.title.trim()||!s.content.trim()){ee.error("Başlık ve içerik zorunludur.");return}f(!0);try{let E=a?a.slug:UDe(s.title);if(!a){const M=E;let L=0;for(;;){const{data:H}=yield Q.from("blog_posts").select("id").eq("slug",E).limit(1);if(!H||H.length===0)break;L+=1,E="".concat(M,"-").concat(L+1)}}let C=s.cover_image.trim();if(d){const M=d.name.split(".").pop()||"jpg",L="blog-".concat(E,"-").concat(Date.now(),".").concat(M),{error:H}=yield Q.storage.from("course-covers").upload(L,d);if(H)throw H;const{data:U}=Q.storage.from("course-covers").getPublicUrl(L);C=U.publicUrl}else C.startsWith("blob:")&&(C=(a==null?void 0:a.cover_image)||"");const R={title:s.title.trim(),excerpt:s.excerpt.trim()||null,content:s.content,cover_image:C||null,author:s.author.trim()||"İpek Kabidan",published:s.published,meta_title:s.meta_title.trim()||null,meta_description:s.meta_description.trim()||null,related_course_id:s.related_course_id||null,updated_at:new Date().toISOString()};if(a){const{error:M}=yield Q.from("blog_posts").update(R).eq("id",a.id);if(M)throw M;ee.success("Yazı güncellendi.")}else{const{error:M}=yield Q.from("blog_posts").insert(I(N({},R),{slug:E}));if(M)throw M;ee.success("Yazı oluşturuldu.")}r.invalidateQueries({queryKey:["blog-posts"]}),v(),i("list")}catch(E){ee.error("Hata: "+(E.message||"Bilinmeyen hata"))}f(!1)}),k=S=>T(this,null,function*(){if(!confirm("Bu yazıyı silmek istediğinize emin misiniz?"))return;const{error:E}=yield Q.from("blog_posts").delete().eq("id",S);E?ee.error("Silinemedi."):(ee.success("Yazı silindi."),r.invalidateQueries({queryKey:["blog-posts"]}))}),_=(S,E)=>T(this,null,function*(){const{error:C}=yield Q.from("blog_posts").update({published:!E}).eq("id",S);C?ee.error("İşlem başarısız."):(ee.success(E?"Yazı taslağa alındı.":"Yazı yayınlandı."),r.invalidateQueries({queryKey:["blog-posts"]}))});return n==="form"?l.jsxs("div",{className:"max-w-2xl",children:[l.jsxs("button",{onClick:()=>{v(),i("list")},className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-4 transition-colors",children:[l.jsx(Ys,{size:16})," Blog Yazılarına Dön"]}),l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:a?"Yazıyı Düzenle":"Yeni Blog Yazısı"}),l.jsxs("form",{onSubmit:j,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Başlık *"}),l.jsx("input",{type:"text",value:s.title,onChange:S=>c(I(N({},s),{title:S.target.value})),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Blog yazısı başlığı"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Özet"}),l.jsx("textarea",{value:s.excerpt,onChange:S=>c(I(N({},s),{excerpt:S.target.value})),rows:2,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none",placeholder:"Kısa özet (listeleme sayfasında görünür)"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"İçerik * (HTML destekli)"}),l.jsxs("p",{className:"text-xs text-muted-foreground mb-2",children:["HTML etiketleri kullanabilirsiniz: ",l.jsx("code",{children:"<h2>"}),", ",l.jsx("code",{children:"<h3>"}),", ",l.jsx("code",{children:"<p>"}),", ",l.jsx("code",{children:"<ul>"}),"/",l.jsx("code",{children:"<li>"}),", ",l.jsx("code",{children:'<a href="...">'}),", ",l.jsx("code",{children:"<strong>"}),", ",l.jsx("code",{children:"<em>"}),", ",l.jsx("code",{children:'<img src="...">'}),". SEO için başlıkları ",l.jsx("strong",{children:"h2"})," ve ",l.jsx("strong",{children:"h3"})," ile yazın (h1 zaten yazı başlığıdır)."]}),l.jsx("textarea",{value:s.content,onChange:S=>c(I(N({},s),{content:S.target.value})),rows:14,required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 resize-y",placeholder:"<h2>Giriş başlığı</h2>\n<p>İlk paragraf...</p>\n<h3>Alt başlık</h3>\n<ul>\n <li>Madde 1</li>\n</ul>"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kapak Görseli (4:3)"}),l.jsx("input",{ref:g,type:"file",accept:"image/*",onChange:b,className:"hidden"}),s.cover_image?l.jsxs("div",{className:"relative inline-block",children:[l.jsx("img",{src:s.cover_image,alt:"Kapak",className:"w-64 aspect-[4/3] object-cover rounded-xl border border-border"}),l.jsxs("div",{className:"flex gap-2 mt-2",children:[l.jsxs("button",{type:"button",onClick:()=>{var S;return(S=g.current)==null?void 0:S.click()},className:"text-xs px-3 py-1.5 rounded-full bg-secondary hover:bg-secondary/80 transition-colors flex items-center gap-1.5",children:[l.jsx(o1,{size:14})," Değiştir"]}),l.jsxs("button",{type:"button",onClick:()=>{h(null),c(I(N({},s),{cover_image:""}))},className:"text-xs px-3 py-1.5 rounded-full hover:bg-destructive/10 text-destructive transition-colors flex items-center gap-1.5",children:[l.jsx(yn,{size:14})," Kaldır"]})]})]}):l.jsxs("button",{type:"button",onClick:()=>{var S;return(S=g.current)==null?void 0:S.click()},className:"w-full py-8 rounded-xl border-2 border-dashed border-border hover:border-primary/50 hover:bg-secondary/30 transition-colors flex flex-col items-center gap-2 text-muted-foreground",children:[l.jsx(o1,{size:20}),l.jsx("span",{className:"text-sm",children:"Görsel yükle (kırpma 4:3)"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Yazar"}),l.jsx("input",{type:"text",value:s.author,onChange:S=>c(I(N({},s),{author:S.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"İpek Kabidan"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"İlgili Eğitim"}),l.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Yazının altında müşteriyi yönlendirmek istediğiniz eğitimi seçin. Boş bırakılırsa CTA bloğu gösterilmez."}),l.jsxs("select",{value:s.related_course_id,onChange:S=>c(I(N({},s),{related_course_id:S.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",children:[l.jsx("option",{value:"",children:"— Yok —"}),t.filter(S=>S.published).map(S=>l.jsx("option",{value:S.id,children:S.title},S.id))]})]}),l.jsxs("div",{className:"border-t border-border pt-5 space-y-4",children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"SEO Ayarları"}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Meta Başlık"}),l.jsx("input",{type:"text",value:s.meta_title,onChange:S=>c(I(N({},s),{meta_title:S.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Boş bırakılırsa yazı başlığı kullanılır",maxLength:70}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[s.meta_title.length,"/70 karakter"]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Meta Açıklama"}),l.jsx("textarea",{value:s.meta_description,onChange:S=>c(I(N({},s),{meta_description:S.target.value})),rows:2,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none",placeholder:"Boş bırakılırsa özet kullanılır",maxLength:160}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[s.meta_description.length,"/160 karakter"]})]})]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:s.published,onChange:S=>c(I(N({},s),{published:S.target.checked})),className:"rounded border-border"})," Yayınla"]}),l.jsx("button",{type:"submit",disabled:u,className:"btn-primary",children:u?"Kaydediliyor...":a?"Değişiklikleri Kaydet":"Yazıyı Oluştur"})]})]}),p&&l.jsx(hv,{imageSrc:p,aspect:4/3,onCropComplete:y,onCancel:()=>m(null)})]}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("h2",{className:"heading-card text-foreground",children:"Blog Yazıları"}),l.jsxs("button",{onClick:()=>{v(),i("form")},className:"flex items-center gap-2 btn-primary text-sm",children:[l.jsx(Xo,{size:16})," Yeni Yazı"]})]}),l.jsxs("div",{className:"space-y-3",children:[e.map(S=>l.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl bg-card border border-border",children:[S.cover_image&&l.jsx("img",{src:S.cover_image,alt:S.title,className:"w-16 h-16 rounded-lg object-cover"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium text-foreground truncate",children:S.title}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[l.jsx("span",{className:"text-xs text-muted-foreground",children:S.author}),l.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(S.created_at).toLocaleDateString("tr-TR")})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>x(S),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors text-muted-foreground",children:[l.jsx(Iv,{size:14})," Düzenle"]}),l.jsx("button",{onClick:()=>_(S.id,S.published),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors",children:S.published?l.jsxs(l.Fragment,{children:[l.jsx(Tu,{size:14,className:"text-primary"})," Yayında"]}):l.jsxs(l.Fragment,{children:[l.jsx(gS,{size:14,className:"text-muted-foreground"})," Taslak"]})}),l.jsx("button",{onClick:()=>k(S.id),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})]},S.id)),e.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz blog yazısı oluşturulmamış."})]})]})}const KDe="https://xvdpcfxfzrgppoefeptu.supabase.co/functions/v1/sitemap",HDe="https://mindsoulacademy.life/sitemap.xml";function VDe(){const[e,t]=w.useState(""),[r,n]=w.useState(!1),[i,a]=w.useState(!1),[o,s]=w.useState(null),c=()=>T(this,null,function*(){n(!0),a(!1);try{const d=yield fetch(KDe,{cache:"no-store"});if(!d.ok)throw new Error("HTTP ".concat(d.status));const h=yield d.text();t(h);const p=h.match(/<url>/g);s(p?p.length:0),ee.success("Sitemap yüklendi. Aşağıdan kopyalayabilirsiniz.")}catch(d){ee.error("Sitemap alınamadı: ".concat(d.message))}finally{n(!1)}}),u=()=>T(this,null,function*(){if(e){try{if(navigator.clipboard&&window.isSecureContext){yield navigator.clipboard.writeText(e),a(!0),ee.success("XML panoya kopyalandı!"),setTimeout(()=>a(!1),2500);return}}catch(d){}try{const d=document.createElement("textarea");d.value=e,d.setAttribute("readonly",""),d.style.position="fixed",d.style.top="0",d.style.left="0",d.style.opacity="0",document.body.appendChild(d),d.focus(),d.select();const h=document.execCommand("copy");if(document.body.removeChild(d),!h)throw new Error("execCommand returned false");a(!0),ee.success("XML panoya kopyalandı!"),setTimeout(()=>a(!1),2500)}catch(d){ee.error("Otomatik kopyalama başarısız. Aşağıdaki XML kutusundan manuel olarak seçip kopyalayın (Ctrl/Cmd+A, Ctrl/Cmd+C).")}}}),f=d=>{const h=document.createRange();h.selectNodeContents(d.currentTarget);const p=window.getSelection();p==null||p.removeAllRanges(),p==null||p.addRange(h)};return l.jsxs("div",{className:"space-y-6 max-w-4xl",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"heading-card text-foreground mb-2",children:"Sitemap Yönetimi"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Yeni blog yazısı veya eğitim eklediğinizde sitemap'i güncellemek için bu aracı kullanın. Aşağıdaki butona tıklayarak en güncel sitemap'i çekin, kopyalayın ve Lovable sohbetine yapıştırarak ",l.jsx("code",{className:"px-1 py-0.5 rounded bg-muted text-xs",children:"public/sitemap.xml"})," dosyasını güncelletin."]})]}),l.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-heading text-base font-semibold text-foreground",children:"Güncel sitemap'i çek"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Veritabanındaki tüm yayınlanmış sayfaları içerir."})]}),l.jsxs("button",{onClick:c,disabled:r,className:"btn-primary inline-flex items-center gap-2 whitespace-nowrap",children:[l.jsx(yc,{size:16,className:r?"animate-spin":""}),r?"Yükleniyor...":"Sitemap'i Yükle"]})]}),o!==null&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(Kn,{size:14,className:"text-primary"}),l.jsxs("span",{children:[l.jsx("strong",{className:"text-foreground",children:o})," URL bulundu"]})]}),e&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[l.jsxs("button",{onClick:u,className:"btn-primary inline-flex items-center gap-2 flex-1 sm:flex-none",children:[i?l.jsx(Kn,{size:16}):l.jsx(mS,{size:16}),i?"Kopyalandı!":"XML'i Panoya Kopyala"]}),l.jsxs("a",{href:HDe,target:"_blank",rel:"noopener noreferrer",className:"btn-outline inline-flex items-center gap-2",children:[l.jsx(Rz,{size:16}),"Yayındaki sitemap'i aç"]})]}),l.jsxs("div",{className:"rounded-xl border border-border bg-secondary/30 overflow-hidden",children:[l.jsxs("div",{className:"px-4 py-2 border-b border-border bg-secondary/50 text-xs font-medium text-muted-foreground flex items-center justify-between",children:[l.jsx("span",{children:"XML Önizleme"}),l.jsx("span",{className:"text-[10px]",children:"İçeriğe tıklayıp tümünü seçebilirsiniz"})]}),l.jsx("pre",{onClick:f,className:"p-4 text-xs text-foreground/80 overflow-auto max-h-96 font-mono cursor-text select-all",children:e})]})]})]})]})}var RK="AlertDialog",[WDe,BIe]=La(RK,[T5]),Va=T5(),$K=e=>{const i=e,{__scopeAlertDialog:t}=i,r=Z(i,["__scopeAlertDialog"]),n=Va(t);return l.jsx(V5,I(N(N({},n),r),{modal:!0}))};$K.displayName=RK;var qDe="AlertDialogTrigger",GDe=w.forwardRef((e,t)=>{const a=e,{__scopeAlertDialog:r}=a,n=Z(a,["__scopeAlertDialog"]),i=Va(r);return l.jsx(gse,I(N(N({},i),n),{ref:t}))});GDe.displayName=qDe;var YDe="AlertDialogPortal",MK=e=>{const i=e,{__scopeAlertDialog:t}=i,r=Z(i,["__scopeAlertDialog"]),n=Va(t);return l.jsx(W5,N(N({},n),r))};MK.displayName=YDe;var XDe="AlertDialogOverlay",DK=w.forwardRef((e,t)=>{const a=e,{__scopeAlertDialog:r}=a,n=Z(a,["__scopeAlertDialog"]),i=Va(r);return l.jsx(OE,I(N(N({},i),n),{ref:t}))});DK.displayName=XDe;var Tc="AlertDialogContent",[JDe,QDe]=WDe(Tc),ZDe=nz("AlertDialogContent"),IK=w.forwardRef((e,t)=>{const u=e,{__scopeAlertDialog:r,children:n}=u,i=Z(u,["__scopeAlertDialog","children"]),a=Va(r),o=w.useRef(null),s=ir(t,o),c=w.useRef(null);return l.jsx(fse,{contentName:Tc,titleName:LK,docsSlug:"alert-dialog",children:l.jsx(JDe,{scope:r,cancelRef:c,children:l.jsxs(RE,I(N(N({role:"alertdialog"},a),i),{ref:s,onOpenAutoFocus:ot(i.onOpenAutoFocus,f=>{var d;f.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[l.jsx(ZDe,{children:n}),l.jsx(tIe,{contentRef:o})]}))})})});IK.displayName=Tc;var LK="AlertDialogTitle",zK=w.forwardRef((e,t)=>{const a=e,{__scopeAlertDialog:r}=a,n=Z(a,["__scopeAlertDialog"]),i=Va(r);return l.jsx($E,I(N(N({},i),n),{ref:t}))});zK.displayName=LK;var BK="AlertDialogDescription",UK=w.forwardRef((e,t)=>{const a=e,{__scopeAlertDialog:r}=a,n=Z(a,["__scopeAlertDialog"]),i=Va(r);return l.jsx(ME,I(N(N({},i),n),{ref:t}))});UK.displayName=BK;var eIe="AlertDialogAction",FK=w.forwardRef((e,t)=>{const a=e,{__scopeAlertDialog:r}=a,n=Z(a,["__scopeAlertDialog"]),i=Va(r);return l.jsx(DE,I(N(N({},i),n),{ref:t}))});FK.displayName=eIe;var KK="AlertDialogCancel",HK=w.forwardRef((e,t)=>{const s=e,{__scopeAlertDialog:r}=s,n=Z(s,["__scopeAlertDialog"]),{cancelRef:i}=QDe(KK,r),a=Va(r),o=ir(t,i);return l.jsx(DE,I(N(N({},a),n),{ref:o}))});HK.displayName=KK;var tIe=({contentRef:e})=>{const t="`".concat(Tc,"` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the `").concat(Tc,"` by passing a `").concat(BK,"` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, 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 `").concat(Tc,"`. 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.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog");return w.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},rIe=$K,nIe=MK,VK=DK,WK=IK,qK=FK,GK=HK,YK=zK,XK=UK;const oC=Tz("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),oj=w.forwardRef((o,a)=>{var s=o,{className:e,variant:t,size:r,asChild:n=!1}=s,i=Z(s,["className","variant","size","asChild"]);const c=n?f9:"button";return l.jsx(c,N({className:Et(oC({variant:t,size:r,className:e})),ref:a},i))});oj.displayName="Button";const aD=rIe,iIe=nIe,JK=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(VK,I(N({className:Et("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e)},t),{ref:r}))});JK.displayName=VK.displayName;const sj=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsxs(iIe,{children:[l.jsx(JK,{}),l.jsx(WK,N({ref:r,className:Et("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e)},t))]})});sj.displayName=WK.displayName;const lj=r=>{var n=r,{className:e}=n,t=Z(n,["className"]);return l.jsx("div",N({className:Et("flex flex-col space-y-2 text-center sm:text-left",e)},t))};lj.displayName="AlertDialogHeader";const cj=r=>{var n=r,{className:e}=n,t=Z(n,["className"]);return l.jsx("div",N({className:Et("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};cj.displayName="AlertDialogFooter";const uj=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(YK,N({ref:r,className:Et("text-lg font-semibold",e)},t))});uj.displayName=YK.displayName;const dj=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(XK,N({ref:r,className:Et("text-sm text-muted-foreground",e)},t))});dj.displayName=XK.displayName;const fj=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(qK,N({ref:r,className:Et(oC(),e)},t))});fj.displayName=qK.displayName;const hj=w.forwardRef((n,r)=>{var i=n,{className:e}=i,t=Z(i,["className"]);return l.jsx(GK,N({ref:r,className:Et(oC({variant:"outline"}),"mt-2 sm:mt-0",e)},t))});hj.displayName=GK.displayName;const oD={title:"",description:"",price:"",deposit_amount:"",category:"",featured:!1,published:!1,course_type:"online_course",instructor:"Mind Soul Academy",event_date:"",event_end_date:"",start_time:"",end_time:"",capacity:"",zoom_link:"",zoom_meeting_id:"",zoom_password:"",has_replay:!1,replay_days:"",replay_video_url:"",venue_name:"",address:"",city:"",maps_link:"",participant_notes:"",what_to_bring:"",accommodation_info:"",subscription_monthly_price:"",subscription_yearly_price:""},aIe={online_course:"Online Eğitim",live_online:"Canlı Online Eğitim",face_to_face:"Yüz Yüze Eğitim",camp:"Kamp"},oIe=[{value:"online_course",label:"Online Eğitim"},{value:"live_online",label:"Canlı Online Eğitim"},{value:"face_to_face",label:"Yüz Yüze Eğitim"}];function sIe(){const{user:e,loading:t,isAdmin:r}=Ua(),{data:n=[]}=dl({adminMode:!0}),{data:i=[]}=sp(),a=MS(),[o,s]=w.useState("overview"),[c,u]=w.useState([]),[f,d]=w.useState(!1),[h,p]=w.useState([]),[m,g]=w.useState(!1),[v,x]=w.useState(!1),[b,y]=w.useState(null),[j,k]=w.useState(null),[_,S]=w.useState(N({},oD)),[E,C]=w.useState([]),[R,M]=w.useState(null),[L,H]=w.useState(null),[U,F]=w.useState(null),[O,P]=w.useState(!1),[A,D]=w.useState(null),[B,z]=w.useState([]),K=()=>T(this,null,function*(){d(!0);try{const{data:W,error:fe}=yield Q.functions.invoke("admin-actions",{body:{action:"get_users"}});if(fe)throw fe;u(W||[])}catch(W){ee.error("Kullanıcılar yüklenirken hata oluştu.")}d(!1)}),Y=W=>T(this,null,function*(){try{const{error:fe}=yield Q.functions.invoke("admin-actions",{body:{action:"confirm_user",userId:W}});if(fe)throw fe;ee.success("Kullanıcı hesabı onaylandı!"),K()}catch(fe){ee.error("Onaylama sırasında hata oluştu.")}}),[G,re]=w.useState(null),[le,me]=w.useState(!1),Ke=W=>T(this,null,function*(){me(!0);try{const{data:fe,error:Oe}=yield Q.functions.invoke("admin-actions",{body:{action:"delete_user",userId:W}});if(Oe)throw Oe;if(fe!=null&&fe.error)throw new Error(fe.error);ee.success("Kullanıcı başarıyla silindi."),K()}catch(fe){ee.error("Silme sırasında hata: "+(fe.message||"Bilinmeyen hata"))}me(!1),re(null)});w.useEffect(()=>{o==="users"&&r&&K()},[o,r]);const te=()=>T(this,null,function*(){g(!0);const{data:W}=yield Q.from("contact_messages").select("*").order("created_at",{ascending:!1});p(W||[]),g(!1)}),ie=(W,fe)=>T(this,null,function*(){yield Q.from("contact_messages").update({is_read:!fe}).eq("id",W),te()}),we=W=>T(this,null,function*(){confirm("Bu mesajı silmek istediğinize emin misiniz?")&&(yield Q.from("contact_messages").delete().eq("id",W),ee.success("Mesaj silindi."),te())});w.useEffect(()=>{o==="messages"&&r&&te()},[o,r]),w.useEffect(()=>{i.length>0&&!_.category&&S(W=>I(N({},W),{category:i[0].id}))},[i]);const[J,Pe]=w.useState(!1);if(w.useEffect(()=>{!t&&e&&!r&&!J&&(Pe(!0),Q.auth.refreshSession().then(({error:W})=>{W?Pe(!1):setTimeout(()=>Pe(!1),2e3)}))},[t,e,r,J]),t||J)return l.jsx("div",{className:"min-h-screen pt-20 flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."})});if(!e)return l.jsx(US,{to:"/giris"});if(!r)return l.jsxs("main",{className:"pt-20 min-h-screen flex items-center justify-center",children:[l.jsx(ct,{title:"Admin Paneli",description:"Mind Soul Academy admin paneli.",canonical:"/admin",noIndex:!0}),l.jsxs("div",{className:"text-center",children:[l.jsx(Iz,{size:48,className:"mx-auto text-muted-foreground mb-4"}),l.jsx("h1",{className:"heading-card text-foreground mb-2",children:"Erişim Reddedildi"}),l.jsx("p",{className:"text-muted-foreground",children:"Bu sayfaya erişim yetkiniz bulunmamaktadır."}),l.jsx("button",{onClick:()=>T(this,null,function*(){yield Q.auth.refreshSession(),window.location.reload()}),className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",children:"Tekrar Dene"})]})]});const je=W=>W.toLowerCase().replace(/ğ/g,"g").replace(/ü/g,"u").replace(/ş/g,"s").replace(/ı/g,"i").replace(/ö/g,"o").replace(/ç/g,"c").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,""),De=W=>{var Oe;const fe=(Oe=W.target.files)==null?void 0:Oe[0];fe&&F(URL.createObjectURL(fe)),W.target.value=""},Re=W=>{y(W),k(URL.createObjectURL(W)),F(null)},q=()=>{F(null)},oe=()=>{var W;S(I(N({},oD),{category:((W=i[0])==null?void 0:W.id)||""})),C([]),y(null),k(null),M(null),F(null),z([])},ke=W=>{(_.course_type==="online_course"&&E.length>0||_.course_type==="live_online"&&(_.zoom_link||_.event_date)||_.course_type==="face_to_face"&&(_.venue_name||_.event_date)||_.course_type==="camp"&&(_.venue_name||_.event_date))&&W!==_.course_type?(D(W),P(!0)):S(Oe=>I(N({},Oe),{course_type:W}))},Ie=()=>{A&&(S(W=>I(N({},W),{course_type:A,event_date:"",event_end_date:"",start_time:"",end_time:"",capacity:"",zoom_link:"",zoom_meeting_id:"",zoom_password:"",has_replay:!1,replay_days:"",replay_video_url:"",venue_name:"",address:"",city:"",maps_link:"",participant_notes:"",what_to_bring:"",accommodation_info:""})),A!=="online_course"&&C([])),P(!1),D(null)},ae=W=>T(this,null,function*(){var fe,Oe,Me,nn;if(M(W),S({title:W.title,description:W.short_description||"",price:String(W.price),deposit_amount:String(W.deposit_amount||""),category:W.category_id||((fe=i[0])==null?void 0:fe.id)||"",featured:(Oe=W.featured)!=null?Oe:!1,published:(Me=W.published)!=null?Me:!1,course_type:W.course_type||"online_course",instructor:W.instructor||"Mind Soul Academy",event_date:W.event_date||"",event_end_date:W.event_end_date||"",start_time:W.start_time||"",end_time:W.end_time||"",capacity:W.capacity?String(W.capacity):"",zoom_link:W.zoom_link||"",zoom_meeting_id:W.zoom_meeting_id||"",zoom_password:W.zoom_password||"",has_replay:(nn=W.has_replay)!=null?nn:!1,replay_days:W.replay_days?String(W.replay_days):"",replay_video_url:W.replay_video_url||"",venue_name:W.venue_name||"",address:W.address||"",city:W.city||"",maps_link:W.maps_link||"",participant_notes:W.participant_notes||"",what_to_bring:W.what_to_bring||"",accommodation_info:W.accommodation_info||"",subscription_monthly_price:W.subscription_monthly_price?String(W.subscription_monthly_price):"",subscription_yearly_price:W.subscription_yearly_price?String(W.subscription_yearly_price):""}),k(W.cover_image||null),y(null),C(W.lessons.map(mt=>({id:mt.id,title:mt.title,duration:mt.duration,audio_url:mt.audio_url,order:mt.order}))),W.course_type==="camp"){const{data:mt}=yield Q.from("camp_packages").select("*").eq("course_id",W.id).order("order",{ascending:!0});z((mt||[]).map(at=>({id:at.id,description:at.description,price:String(at.price),currency:at.currency,order:at.order,discounted_price:at.discounted_price?String(at.discounted_price):"",discount_end_date:at.discount_end_date||""})))}else z([]);s("edit")}),he=W=>T(this,null,function*(){W.preventDefault(),x(!0);try{const fe=R?R.slug:je(_.title);let Oe=(R==null?void 0:R.cover_image)||"";if(b){const mt=b.name.split(".").pop(),at="".concat(fe,"-").concat(Date.now(),".").concat(mt),{error:zt}=yield Q.storage.from("course-covers").upload(at,b);if(zt)throw zt;const{data:dt}=Q.storage.from("course-covers").getPublicUrl(at);Oe=dt.publicUrl}let Me=[];_.course_type==="online_course"&&(Me=yield k$e(E,fe,H));const nn={title:_.title,short_description:_.description,full_description:_.description,category_id:_.category||null,price:parseFloat(_.price)||0,deposit_amount:parseFloat(_.deposit_amount)||0,cover_image:Oe,featured:_.featured,published:_.published,instructor:_.instructor||"Mind Soul Academy",course_type:_.course_type,event_date:_.event_date||null,event_end_date:_.event_end_date||null,start_time:_.start_time||null,end_time:_.end_time||null,capacity:_.capacity?parseInt(_.capacity):null,zoom_link:_.course_type==="live_online"&&_.zoom_link||null,zoom_meeting_id:_.course_type==="live_online"&&_.zoom_meeting_id||null,zoom_password:_.course_type==="live_online"&&_.zoom_password||null,has_replay:_.course_type==="live_online"?_.has_replay:!1,replay_days:_.course_type==="live_online"&&_.has_replay&&parseInt(_.replay_days)||null,replay_video_url:_.course_type==="live_online"&&_.replay_video_url||null,venue_name:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.venue_name||null,address:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.address||null,city:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.city||null,maps_link:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.maps_link||null,participant_notes:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.participant_notes||null,what_to_bring:(_.course_type==="face_to_face"||_.course_type==="camp")&&_.what_to_bring||null,accommodation_info:_.course_type==="camp"&&_.accommodation_info||null,subscription_monthly_price:parseFloat(_.subscription_monthly_price)||0,subscription_yearly_price:parseFloat(_.subscription_yearly_price)||0};if(R){const{error:mt}=yield Q.from("courses").update(nn).eq("id",R.id);if(mt)throw mt;if(_.course_type==="online_course"){const at=Me.filter(tt=>tt.id).map(tt=>tt.id),dt=R.lessons.map(tt=>tt.id).filter(tt=>!at.includes(tt));dt.length>0&&(yield Q.from("lessons").delete().in("id",dt));for(const tt of Me)tt.id?yield Q.from("lessons").update({title:tt.title,duration:tt.duration,audio_url:tt.audio_url,order:tt.order}).eq("id",tt.id):yield Q.from("lessons").insert({course_id:R.id,title:tt.title,duration:tt.duration,audio_url:tt.audio_url,order:tt.order})}else yield Q.from("lessons").delete().eq("course_id",R.id);if(_.course_type==="camp"&&(yield Q.from("camp_packages").delete().eq("course_id",R.id),B.length>0)){const at=B.map((zt,dt)=>({course_id:R.id,description:zt.description,price:parseFloat(zt.price)||0,currency:zt.currency,order:dt,discounted_price:zt.discounted_price?parseFloat(zt.discounted_price):null,discount_end_date:zt.discount_end_date||null}));yield Q.from("camp_packages").insert(at)}ee.success("Eğitim başarıyla güncellendi!")}else{const{data:mt,error:at}=yield Q.from("courses").insert(I(N({},nn),{slug:fe})).select().single();if(at)throw at;if(_.course_type==="online_course"&&Me.length>0&&mt){const zt=Me.map(tt=>({course_id:mt.id,title:tt.title,duration:tt.duration,audio_url:tt.audio_url,order:tt.order})),{error:dt}=yield Q.from("lessons").insert(zt);if(dt)throw dt}if(_.course_type==="camp"&&B.length>0&&mt){const zt=B.map((dt,tt)=>({course_id:mt.id,description:dt.description,price:parseFloat(dt.price)||0,currency:dt.currency,order:tt,discounted_price:dt.discounted_price?parseFloat(dt.discounted_price):null,discount_end_date:dt.discount_end_date||null}));yield Q.from("camp_packages").insert(zt)}ee.success("Eğitim başarıyla oluşturuldu!")}oe(),a.invalidateQueries({queryKey:["courses"]}),s("courses")}catch(fe){ee.error("Hata: "+(fe.message||"Bilinmeyen hata"))}x(!1),H(null)}),ue=W=>T(this,null,function*(){if(confirm("Bu eğitimi silmek istediğinize emin misiniz?"))try{yield Q.from("lessons").delete().eq("course_id",W);const{error:fe}=yield Q.from("courses").delete().eq("id",W);if(fe)throw fe;ee.success("Eğitim silindi."),a.invalidateQueries({queryKey:["courses"]})}catch(fe){ee.error("Silme işlemi başarısız.")}}),Ae=(W,fe)=>T(this,null,function*(){try{const{error:Oe}=yield Q.from("courses").update({published:!fe}).eq("id",W);if(Oe)throw Oe;ee.success(fe?"Eğitim taslağa alındı.":"Eğitim yayınlandı."),a.invalidateQueries({queryKey:["courses"]})}catch(Oe){ee.error("İşlem başarısız.")}}),Ce=(W,fe)=>T(this,null,function*(){try{const{error:Oe}=yield Q.from("courses").update({purchase_enabled:!fe}).eq("id",W);if(Oe)throw Oe;ee.success(fe?"Satın alma devre dışı bırakıldı.":"Satın alma aktif edildi."),a.invalidateQueries({queryKey:["courses"]})}catch(Oe){ee.error("İşlem başarısız.")}}),Ye=[{id:"overview",label:"Genel Bakış",icon:g7},{id:"analytics",label:"Site Analytics",icon:a7},{id:"courses",label:"Eğitimler",icon:pS},{id:"categories",label:"Kategoriler",icon:bS},{id:"users",label:"Kullanıcılar",icon:Xs},{id:"messages",label:"Mesajlar",icon:b7},{id:"reservations",label:"Ön Kayıtlar",icon:Lz},{id:"camp-registrations",label:"Kamp Kayıtları",icon:Qd},{id:"course-registrations",label:"Eğitim Kayıtları",icon:Xs},{id:"payment-links",label:"Ödeme Bağlantıları",icon:n1},{id:"blog",label:"Blog",icon:$z},{id:"sitemap",label:"Sitemap",icon:v7}],Yt=o==="create"||o==="edit";return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Admin Paneli",description:"Mind Soul Academy admin paneli — eğitim ve kullanıcı yönetimi.",canonical:"/admin",noIndex:!0}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsxs(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[l.jsx("h1",{className:"heading-section text-foreground mb-2",children:"Admin Paneli"}),l.jsx("p",{className:"text-body text-muted-foreground mb-10",children:"Eğitimlerinizi ve kullanıcılarınızı yönetin."})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[l.jsx("aside",{className:"lg:w-64 lg:shrink-0",children:l.jsxs("nav",{className:"lg:sticky lg:top-24 rounded-2xl border border-border bg-card p-3 shadow-sm",children:[l.jsx("div",{className:"px-3 py-2 mb-2",children:l.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"Yönetim"})}),l.jsx("ul",{className:"flex lg:flex-col gap-1 overflow-x-auto lg:overflow-visible",children:Ye.map(W=>{const fe=o===W.id||W.id==="courses"&&(o==="edit"||o==="create");return l.jsx("li",{className:"lg:w-full shrink-0",children:l.jsxs("button",{onClick:()=>{oe(),s(W.id)},className:"w-full flex items-center gap-3 px-4 py-2.5 rounded-xl text-sm font-medium transition-all duration-200 whitespace-nowrap ".concat(fe?"bg-primary text-primary-foreground shadow-sm":"text-foreground/80 hover:bg-secondary hover:text-foreground"),children:[l.jsx(W.icon,{size:18,className:"shrink-0"}),l.jsx("span",{className:"lg:flex-1 lg:text-left",children:W.label})]})},W.id)})})]})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[o==="overview"&&l.jsx(zDe,{courses:n,categories:i}),o==="analytics"&&l.jsx(E2e,{}),o==="courses"&&l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"flex justify-end",children:l.jsxs("button",{onClick:()=>{oe(),s("create")},className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 transition-opacity",children:[l.jsx(Xo,{size:16})," Yeni Eğitim"]})}),n.filter(W=>W.course_type!=="camp").map(W=>{const fe=i.find(mt=>mt.id===W.category_id),Oe=(fe==null?void 0:fe.payment_type)||"one_time",Me=Oe==="one_time"?"Tek Seferlik":Oe==="subscription"?"Abonelik":Oe==="deposit"?"Ön Ödeme":Oe==="camp"?"Kamp":"Ücretsiz",nn=Oe==="subscription"?"₺".concat((fe==null?void 0:fe.subscription_monthly_price)||0,"/ay • ₺").concat((fe==null?void 0:fe.subscription_yearly_price)||0,"/yıl"):Oe==="free"?"Ücretsiz":"₺".concat(W.price);return l.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-xl bg-card border border-border",children:[l.jsx("img",{src:W.cover_image,alt:W.title,className:"w-16 h-16 rounded-lg object-cover"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium text-foreground truncate",children:W.title}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full font-medium ".concat(W.course_type==="live_online"?"bg-blue-500/10 text-blue-600":W.course_type==="face_to_face"?"bg-orange-500/10 text-orange-600":"bg-primary/10 text-primary"),children:aIe[W.course_type||"online_course"]}),W.course_type==="online_course"&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:[W.lessons.length," ders"]}),W.event_date&&l.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(W.event_date).toLocaleDateString("tr-TR")}),l.jsx("span",{className:"text-xs font-medium text-foreground",children:nn}),fe&&l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full bg-secondary text-muted-foreground",children:fe.name}),l.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded-full font-medium ".concat(Oe==="subscription"?"bg-primary/10 text-primary":Oe==="free"?"bg-green-500/10 text-green-600":"bg-secondary text-muted-foreground"),children:Me})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>ae(W),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors text-muted-foreground",children:[l.jsx(Iv,{size:14})," Düzenle"]}),l.jsx("button",{onClick:()=>Ae(W.id,W.published),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors",children:W.published?l.jsxs(l.Fragment,{children:[l.jsx(Tu,{size:14,className:"text-primary"})," Yayında"]}):l.jsxs(l.Fragment,{children:[l.jsx(gS,{size:14,className:"text-muted-foreground"})," Taslak"]})}),l.jsx("button",{onClick:()=>Ce(W.id,W.purchase_enabled!==!1),className:"flex items-center gap-1 text-xs px-3 py-1.5 rounded-full hover:bg-secondary transition-colors",title:"Satın alma durumu",children:W.purchase_enabled!==!1?l.jsxs("span",{className:"flex items-center gap-1 text-green-600",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-600"})," Satışta"]}):l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[l.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-muted-foreground"})," Yakında"]})}),l.jsx("button",{onClick:()=>ue(W.id),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})]},W.id)}),n.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz eğitim oluşturulmamış."})]}),Yt&&l.jsxs("div",{className:"max-w-2xl",children:[l.jsxs("button",{onClick:()=>{oe(),s("courses")},className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-4 transition-colors",children:[l.jsx(Ys,{size:16})," Eğitimlere Dön"]}),l.jsxs("div",{className:"p-8 rounded-2xl bg-card border border-border",children:[l.jsx("h2",{className:"heading-card text-foreground mb-6",children:o==="edit"?"Eğitimi Düzenle":"Yeni Eğitim Oluştur"}),l.jsxs("form",{onSubmit:he,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Eğitim Başlığı"}),l.jsx("input",{type:"text",value:_.title,onChange:W=>S(I(N({},_),{title:W.target.value})),required:!0,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"Eğitim başlığını giriniz"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Açıklama"}),l.jsx("textarea",{value:_.description,onChange:W=>S(I(N({},_),{description:W.target.value})),rows:4,className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 resize-none",placeholder:"Eğitim açıklamasını giriniz"})]}),l.jsx(SK,{value:_.instructor,onChange:W=>S(I(N({},_),{instructor:W}))}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Etkinlik Türü"}),l.jsx("select",{value:_.course_type,onChange:W=>ke(W.target.value),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",children:oIe.map(W=>l.jsx("option",{value:W.value,children:W.label},W.value))})]}),(()=>{const W=i.find(Me=>Me.id===_.category),fe=(W==null?void 0:W.payment_type)==="subscription",Oe=(W==null?void 0:W.payment_type)==="free";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{className:fe||Oe?"opacity-50 pointer-events-none":"",children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Fiyat (₺)"}),l.jsx("input",{type:"number",value:fe||Oe?"":_.price,onChange:Me=>S(I(N({},_),{price:Me.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:fe?"Abonelik fiyatı kategoriden alınır":Oe?"Ücretsiz":"299",disabled:fe||Oe}),fe&&l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Fiyat bilgisi kategori abonelik ayarlarından alınır"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kategori"}),l.jsx("select",{value:_.category,onChange:Me=>S(I(N({},_),{category:Me.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",children:i.map(Me=>l.jsxs("option",{value:Me.id,children:[Me.name," (",Me.payment_type==="one_time"?"Tek Seferlik":Me.payment_type==="subscription"?"Abonelik":Me.payment_type==="deposit"?"Ön Ödeme":"Ücretsiz",")"]},Me.id))})]})]}),(W==null?void 0:W.payment_type)==="deposit"&&l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Ön Ödeme Tutarı (₺)"}),l.jsx("input",{type:"number",value:_.deposit_amount,onChange:Me=>S(I(N({},_),{deposit_amount:Me.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"200"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Yüz yüze eğitim için yer ayırtma ön ödemesi"})]}),fe&&l.jsxs("div",{className:"p-4 rounded-xl bg-primary/5 border border-primary/20 space-y-4",children:[l.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Kurs Bazlı Abonelik Fiyatları"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Bu kurs için ayrı bir abonelik fiyatı belirleyebilirsiniz. Kullanıcı sadece bu kursa abone olabilir veya tüm kategoriye abone olabilir."}),l.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Aylık Fiyat (₺)"}),l.jsx("input",{type:"number",value:_.subscription_monthly_price,onChange:Me=>S(I(N({},_),{subscription_monthly_price:Me.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"49"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Yıllık Fiyat (₺)"}),l.jsx("input",{type:"number",value:_.subscription_yearly_price,onChange:Me=>S(I(N({},_),{subscription_yearly_price:Me.target.value})),className:"w-full px-4 py-3 rounded-xl border border-border bg-background text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-primary/20",placeholder:"399"})]})]})]})]})})(),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium text-foreground mb-2 block",children:"Kapak Görseli"}),j&&l.jsx("div",{className:"mb-3 rounded-xl overflow-hidden",children:l.jsx("img",{src:j,alt:"Kapak önizleme",className:"w-full aspect-video object-cover"})}),l.jsxs("label",{className:"flex items-center justify-center w-full px-4 py-6 rounded-xl border-2 border-dashed border-border bg-background text-muted-foreground text-sm cursor-pointer hover:border-primary/40 transition-colors",children:[l.jsx("input",{type:"file",accept:"image/*",onChange:De,className:"hidden"}),b?b.name:j?"Yeni görsel seçmek için tıklayın":"Görsel seçmek için tıklayın"]})]}),l.jsxs("div",{className:"border-t border-border pt-5",children:[_.course_type==="online_course"&&l.jsx(x$e,{lessons:E,onChange:C}),_.course_type==="live_online"&&l.jsx(_$e,{form:_,onChange:W=>S(fe=>N(N({},fe),W))}),_.course_type==="face_to_face"&&l.jsx(j$e,{form:_,onChange:W=>S(fe=>N(N({},fe),W))})]}),l.jsxs("div",{className:"flex items-center gap-6",children:[l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:_.featured,onChange:W=>S(I(N({},_),{featured:W.target.checked})),className:"rounded border-border"})," Öne Çıkan"]}),l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx("input",{type:"checkbox",checked:_.published,onChange:W=>S(I(N({},_),{published:W.target.checked})),className:"rounded border-border"})," Yayınla"]})]}),v&&L&&l.jsxs("div",{className:"space-y-2 p-4 rounded-xl bg-sage-light/30 border border-border",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Yükleniyor: ",L.lessonTitle," (",L.currentLesson,"/",L.totalLessons,")"]}),l.jsxs("span",{className:"font-medium text-foreground",children:[L.percent,"%"]})]}),l.jsx(PK,{value:L.percent,className:"h-2"}),l.jsx("button",{type:"button",onClick:()=>{b$e(),x(!1),H(null),ee.info("Yükleme iptal edildi.")},className:"mt-1 text-xs text-destructive font-medium hover:underline",children:"✕ Yüklemeyi İptal Et"})]}),l.jsx("button",{type:"submit",disabled:v,className:"btn-primary",children:v?L?"Ses dosyaları yükleniyor (".concat(L.currentLesson,"/").concat(L.totalLessons,")..."):"Kaydediliyor...":o==="edit"?"Değişiklikleri Kaydet":"Eğitimi Oluştur"})]})]})]}),o==="categories"&&l.jsx(MDe,{categories:i,courses:n,queryClient:a,generateSlug:je}),o==="users"&&l.jsxs("div",{children:[f?l.jsx("p",{className:"text-muted-foreground",children:"Kullanıcılar yükleniyor..."}):l.jsxs("div",{className:"space-y-3",children:[c.map(W=>l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4 p-4 rounded-xl bg-card border border-border",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium text-foreground truncate",children:W.full_name||"İsimsiz"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:W.email}),W.phone&&l.jsxs("p",{className:"text-xs text-muted-foreground",children:["📱 ",W.phone]}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Kayıt: ",new Date(W.created_at).toLocaleDateString("tr-TR")]})]}),l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[W.roles.includes("admin")&&l.jsx("span",{className:"px-2.5 py-1 rounded-full bg-primary/10 text-primary text-xs font-medium",children:"Admin"}),W.email_confirmed?l.jsxs("span",{className:"flex items-center gap-1 text-xs text-primary",children:[l.jsx(Kn,{size:14})," Onaylı"]}):l.jsx("button",{onClick:()=>Y(W.id),className:"px-3 py-1.5 rounded-full bg-primary text-primary-foreground text-xs font-medium hover:opacity-90 transition-opacity",children:"Onayla"}),!W.roles.includes("admin")&&l.jsx("button",{onClick:()=>re(W),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",title:"Kullanıcıyı Sil",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})]},W.id)),c.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz kayıtlı kullanıcı yok."})]}),l.jsx(aD,{open:!!G,onOpenChange:W=>!W&&re(null),children:l.jsxs(sj,{children:[l.jsxs(lj,{children:[l.jsx(uj,{children:"Kullanıcıyı Sil"}),l.jsxs(dj,{children:[l.jsx("strong",{children:(G==null?void 0:G.full_name)||(G==null?void 0:G.email)})," adlı kullanıcıyı silmek istediğinize emin misiniz? Bu işlem geri alınamaz. Kullanıcının tüm verileri (satın almalar, rezervasyonlar) kalıcı olarak silinecektir."]})]}),l.jsxs(cj,{children:[l.jsx(hj,{disabled:le,children:"İptal"}),l.jsx(fj,{onClick:()=>G&&Ke(G.id),disabled:le,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:le?"Siliniyor...":"Evet, Sil"})]})]})})]}),o==="messages"&&l.jsx("div",{children:m?l.jsx("p",{className:"text-muted-foreground",children:"Mesajlar yükleniyor..."}):l.jsxs("div",{className:"space-y-3",children:[h.map(W=>l.jsx("div",{className:"p-5 rounded-xl border transition-colors ".concat(W.is_read?"bg-card border-border":"bg-primary/5 border-primary/20"),children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[!W.is_read&&l.jsx("span",{className:"w-2 h-2 rounded-full bg-primary shrink-0"}),l.jsx("p",{className:"font-medium text-foreground truncate",children:W.name})]}),l.jsxs("p",{className:"text-xs text-muted-foreground mb-3",children:[W.email," • ",new Date(W.created_at).toLocaleString("tr-TR")]}),l.jsx("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:W.message})]}),l.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[l.jsx("button",{onClick:()=>ie(W.id,W.is_read),title:W.is_read?"Okunmadı olarak işaretle":"Okundu olarak işaretle",className:"p-2 hover:bg-secondary rounded-lg transition-colors text-muted-foreground",children:W.is_read?l.jsx(Yc,{size:16}):l.jsx(y7,{size:16})}),l.jsx("button",{onClick:()=>we(W.id),className:"p-2 hover:bg-destructive/10 rounded-lg transition-colors",children:l.jsx(pi,{size:16,className:"text-destructive"})})]})]})},W.id)),h.length===0&&l.jsx("p",{className:"text-muted-foreground text-center py-8",children:"Henüz mesaj yok."})]})}),o==="reservations"&&l.jsx(DDe,{courses:n,categories:i}),o==="camp-registrations"&&l.jsx(jDe,{courses:n,categories:i,queryClient:a,generateSlug:je}),o==="course-registrations"&&l.jsx(EDe,{courses:n}),o==="payment-links"&&l.jsx(BDe,{}),o==="blog"&&l.jsx(FDe,{}),o==="sitemap"&&l.jsx(VDe,{})]})]})]})}),U&&l.jsx(hv,{imageSrc:U,aspect:4/3,onCropComplete:Re,onCancel:q}),l.jsx(aD,{open:O,onOpenChange:P,children:l.jsxs(sj,{children:[l.jsxs(lj,{children:[l.jsx(uj,{children:"Etkinlik Türü Değişikliği"}),l.jsx(dj,{children:"Etkinlik türünü değiştirmek mevcut özel alanları sıfırlayacaktır. Devam etmek istediğinize emin misiniz?"})]}),l.jsxs(cj,{children:[l.jsx(hj,{onClick:()=>{P(!1),D(null)},children:"İptal"}),l.jsx(fj,{onClick:Ie,children:"Devam Et"})]})]})})]})}const sD="/assets/ipek-kabidan-DP0PlkXk.jpg",Nn={initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7}};function lIe(){return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"İpek Kabidan Kimdir?",description:"Meditasyon eğitmeni ve kişisel gelişim uzmanı İpek Kabidan hakkında detaylı bilgi. Mind Soul Academy'nin kurucusu.",canonical:"/ipek-kabidan",ogImage:sD}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(wn,{items:[{label:"Hakkımızda",href:"/hakkimizda"},{label:"İpek Kabidan"}]}),l.jsxs("div",{className:"grid lg:grid-cols-5 gap-12 items-center",children:[l.jsx(pe.div,I(N({className:"lg:col-span-2"},Nn),{children:l.jsx("div",{className:"rounded-3xl overflow-hidden border border-border shadow-lg",children:l.jsx("img",{src:sD,alt:"İpek Kabidan",className:"w-full aspect-[3/4] object-cover"})})})),l.jsxs(pe.div,I(N({className:"lg:col-span-3"},Nn),{transition:{duration:.7,delay:.2},children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Kurucu & Eğitmen"}),l.jsx("h1",{className:"heading-section text-foreground mb-6",children:"İpek Kabidan"}),l.jsxs("div",{className:"space-y-4 text-body text-muted-foreground leading-relaxed",children:[l.jsx("p",{children:"1981 Kıbrıs doğumlu, evli ve bir kız çocuk annesidir. 2003 yılında İşletme ve Ekonomi Fakültesinden mezun olmuştur."}),l.jsxs("p",{children:["2003–2015 yılları arasında sağlık, inşaat, otomotiv, yurt işletmeciliği, gıda ve beyaz eşya gibi sektörlerde hizmet vererek; ",l.jsx("strong",{className:"text-foreground",children:"Vestel, Renault, Hyundai, Homend, Karaca"})," ve ",l.jsx("strong",{className:"text-foreground",children:"Enza Home"})," gibi Türkiye ve dünya markalarının Kıbrıs distribütörü olan firmalarda üst düzey yönetici olarak çalışmıştır."]}),l.jsxs("p",{children:["2015 yılında ",l.jsx("strong",{className:"text-foreground",children:"Gamana Danışmanlık"})," şirketini kurarak bireysel ve kurumsal danışmanlık hizmetleri vermeye başlamıştır. Bireysel gelişim koçluğu hizmeti verirken, kurumsal alanda yapılanma desteği, iş geliştirme, kurumsal ortak dil oluşturma, eğitim organizasyonu, yönetici ve kariyer koçluğu ile yönetim danışmanlığı alanlarında hizmetlerini sürdürmektedir."]})]})]}))]})]})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(pe.div,I(N({},Nn),{children:l.jsx("h2",{className:"heading-section text-foreground mb-10 text-center",children:"Eğitim Geçmişi"})})),l.jsx(pe.div,I(N({},Nn),{transition:{duration:.7,delay:.15},children:l.jsx("div",{className:"grid md:grid-cols-2 gap-3 max-w-3xl mx-auto",children:["Klinik Psikoloji Yüksek Lisans","Beyin Antrenörlüğü","Koçluk Eğitimleri","Mindfulness Uygulayıcı Sertifika Programı","MBSR – Mindfulness Stres Azaltma Programı","MBCT – Mindfulness Temelli Bilişsel Terapi","Çocuk ve Ergenlerde Mindfulness","Evrimsel Nöro Psikoloji","Bireysel Terapide Mindfulness","Bilişsel Psikoterapi Teknikleri Eğitimi","NLP (Nöro Linguistik Programlama) Uygulayıcı Eğitimi","Nefes Koçluğu Uygulayıcı Eğitimi","Meditasyon Uygulayıcı Eğitimi","Hipnoterapi Uygulayıcı Eğitimi","Hipnotik Dil Kalıpları Eğitimi","İşletme ve Ekonomi – Bilgisayar Destekli Muhasebe Lisans Programı"].map((e,t)=>l.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl bg-card border border-border",children:[l.jsx("span",{className:"w-2 h-2 rounded-full bg-primary mt-2 shrink-0"}),l.jsx("span",{className:"text-sm text-foreground",children:e})]},t))})}))]})}),l.jsx("section",{className:"section-padding",children:l.jsx("div",{className:"container-narrow mx-auto",children:l.jsxs(pe.div,I(N({},Nn),{children:[l.jsx("h2",{className:"heading-section text-foreground mb-6 text-center",children:"Yönetim Kurulu Üyelikleri"}),l.jsxs("div",{className:"max-w-2xl mx-auto space-y-4 text-body text-muted-foreground leading-relaxed text-center",children:[l.jsxs("p",{children:["2017–2018 yılları arasında ",l.jsx("strong",{className:"text-foreground",children:"Kıbrıs Türk Kooperatif Merkez Bankası"})," Yönetim Kurulu üyeliği görevini yürütmüştür."]}),l.jsxs("p",{children:["2020 yılında ",l.jsx("strong",{className:"text-foreground",children:"Limasol Türk Kooperatif Bankası"})," Sosyal Sorumluluk Yönetim Kurulu üyesi olarak atanmıştır."]})]})]}))})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(pe.div,I(N({},Nn),{children:l.jsx("h2",{className:"heading-section text-foreground mb-10 text-center",children:"Gerçekleştirdiği Projeler"})})),l.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-4xl mx-auto",children:[{org:"KKTC Başbakanlık Uyuşturucu ile Mücadele Komisyonu",title:"Emotional Freedom",desc:"12-16 yaş kişisel gelişim atölyesi. İletişim becerileri, problem çözme ve duyguları dengede tutmaya dair çalışmalarla gençlerin geleceklerini yaratmaları hedeflenmiştir."},{org:"KKTC Ortopedik Özürlüler Derneği",title:"Derinliklerdeki Özgürlük",desc:'"Sevgi Her Engeli Aşar" sloganıyla özel gereksinimli bireylerin denizin derinliklerine dalış yapmasını sağlayan cesaret projesi.'},{org:"KKTC Talasemi Derneği",title:"İçimdeki Umut",desc:"Hayatın birçok penceresi olduğunu işaret eden farkındalık atölyesi. Dernek üyeleri ve aileleri için sunulmuştur."},{org:"KKTC Umut Derneği",title:"Hayalden Gerçeğe Yolculuk",desc:"Dar gelirli ailelerle çalışılarak hayal kurmadan geleceğin yaratılamayacağını anlatan sosyal sorumluluk projesi."},{org:"Sivil Toplum & Özel Sektör",title:"Zihnin Zincirleri",desc:"Lefkoşa'da yapılmış en büyük kişisel gelişim seminerlerinden biri olarak basında geniş yer bulmuştur."},{org:"Türkiye Petrol Ofisi",title:"Konu Sen",desc:"İş ve özel hayatta dengeyi konu alan kişisel gelişim semineri. Nefesle iş yaşamında rahatlama teknikleri uygulanmıştır."},{org:"Abdi İbrahim",title:"Yine Bir Nefes, Yeni Bir Nefes",desc:"Tedavi süreçlerinde nefesin önemini konu alan, Doğu ve Batı kaynaklı nefes teknikleri uygulamaları."}].map((e,t)=>l.jsxs(pe.div,I(N({},Nn),{transition:{duration:.5,delay:t*.05},className:"p-6 rounded-2xl bg-card border border-border",children:[l.jsx("p",{className:"text-xs text-primary font-medium uppercase tracking-wider mb-2",children:e.org}),l.jsxs("h3",{className:"font-heading text-lg font-semibold text-foreground mb-2",children:['"',e.title,'"']}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.desc})]}),t))})]})}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(pe.div,I(N({},Nn),{children:l.jsx("h2",{className:"heading-section text-foreground mb-10 text-center",children:"Yayınlanan Yazıları"})})),l.jsxs("div",{className:"grid md:grid-cols-2 gap-6 max-w-3xl mx-auto",children:[l.jsxs(pe.div,I(N({},Nn),{className:"p-6 rounded-2xl bg-card border border-border",children:[l.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground mb-2",children:"Londra Manşet Gazetesi"}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Londra'da yayınlanan ve orada yaşayan Türklere özel gazetede, kişisel gelişim içerikli makale ve yazılar yayınlanmaktadır."})]})),l.jsxs(pe.div,I(N({},Nn),{transition:{delay:.1},className:"p-6 rounded-2xl bg-card border border-border",children:[l.jsx("h3",{className:"font-heading text-lg font-semibold text-foreground mb-2",children:"En Moda Dergisi"}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Türkiye ve Kıbrıs'ta en çok okunan dergiler arasında yer alan dergide, yaşama dair farkındalık oluşturacak yazılar düzenli olarak yayınlanmaktadır."})]}))]})]})}),l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(pe.div,I(N({},Nn),{children:l.jsx("h2",{className:"heading-section text-foreground mb-10 text-center",children:"Ödüller"})})),l.jsx("div",{className:"grid sm:grid-cols-2 gap-4 max-w-3xl mx-auto",children:[{year:"2019",title:"Yılın Kurumsal İletişim Ödülü",org:"EN Moda Uluslararası Ödül Töreni"},{year:"2019–2023",title:"Yılın Onur Ödülü",org:"Umut Derneği"},{year:"2022",title:"Yılın Kişisel Gelişim Uzmanı Ödülü",org:"Altın Caretta Ödülleri"},{year:"2022",title:"Yılın Kurumsal Danışman ve Eğitmen Ödülü",org:"Çukurova Kadın Zirvesi"}].map((e,t)=>l.jsxs(pe.div,I(N({},Nn),{transition:{duration:.5,delay:t*.08},className:"p-6 rounded-2xl bg-card border border-border text-center",children:[l.jsx("span",{className:"text-xs font-medium text-primary",children:e.year}),l.jsx("h3",{className:"font-heading text-base font-semibold text-foreground mt-1 mb-1",children:e.title}),l.jsx("p",{className:"text-xs text-muted-foreground",children:e.org})]}),t))})]})})]})}function cIe(){const{slug:e}=BS(),{data:t=[],isLoading:r}=dl(),{data:n=[],isLoading:i}=sp(),a=n.find(s=>s.slug===e),o=t.filter(s=>s.published&&s.category_id===(a==null?void 0:a.id));return i||r?l.jsx("main",{className:"pt-20 min-h-screen flex items-center justify-center",children:l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."})}):a?l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"".concat(a.name," Eğitimleri"),description:"".concat(a.name," kategorisindeki tüm Mind Soul Academy eğitimlerini keşfedin."),canonical:"/kategori/".concat(e)}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsx(wn,{items:[{label:"Eğitimler",href:"/egitimler"},{label:a.name}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Kategori"}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:a.name}),l.jsxs("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:[a.name," kategorisindeki eğitimlerimizi keşfedin."]})]}),o.length>0?l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:o.map((s,c)=>l.jsx(tx,{course:s,index:c},s.id))}):l.jsx("p",{className:"text-center text-muted-foreground text-body py-16",children:"Bu kategoride henüz eğitim bulunmamaktadır."})]})})]}):l.jsx("main",{className:"pt-20 min-h-screen flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Kategori Bulunamadı"}),l.jsx(de,{to:"/egitimler",className:"text-primary hover:underline",children:"Tüm eğitimlere dön"})]})})}const uIe=()=>{const e=bi();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),l.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[l.jsx(ct,{title:"Sayfa Bulunamadı",description:"Aradığınız sayfa bulunamadı.",canonical:e.pathname,noIndex:!0}),l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),l.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Aradığınız sayfa bulunamadı"}),l.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Ana Sayfaya Dön"})]})]})};function dIe(){const[e]=Hv(),t=e.get("token"),[r,n]=w.useState("loading");return w.useEffect(()=>{if(!t){n("error");return}T(this,null,function*(){try{const{data:a,error:o}=yield Q.functions.invoke("verify-email",{body:{token:t}});o||!(a!=null&&a.success)?n("error"):n("success")}catch(a){n("error")}})},[t]),l.jsxs("main",{className:"pt-20 min-h-screen flex items-center justify-center",children:[l.jsx(ct,{title:"E-posta Doğrulama",description:"E-posta adresinizi doğrulayın.",canonical:"/dogrula",noIndex:!0}),l.jsxs(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center p-10 rounded-3xl bg-card border border-border max-w-md mx-4",children:[r==="loading"&&l.jsxs(l.Fragment,{children:[l.jsx(vS,{size:48,className:"text-primary mx-auto mb-4 animate-spin"}),l.jsx("h1",{className:"heading-card text-foreground mb-2",children:"Doğrulanıyor..."}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"E-posta adresiniz doğrulanıyor."})]}),r==="success"&&l.jsxs(l.Fragment,{children:[l.jsx(Kn,{size:48,className:"text-green-500 mx-auto mb-4"}),l.jsx("h1",{className:"heading-card text-foreground mb-2",children:"E-posta Doğrulandı!"}),l.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"E-posta adresiniz başarıyla doğrulandı."}),l.jsx(de,{to:"/panel",className:"btn-primary",children:"Panele Git"})]}),r==="error"&&l.jsxs(l.Fragment,{children:[l.jsx(Mv,{size:48,className:"text-destructive mx-auto mb-4"}),l.jsx("h1",{className:"heading-card text-foreground mb-2",children:"Doğrulama Başarısız"}),l.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Geçersiz veya süresi dolmuş bağlantı."}),l.jsx(de,{to:"/panel",className:"btn-primary",children:"Panele Git"})]})]})]})}function fIe(){const[e]=Hv(),t=e.get("token"),[r,n]=w.useState("loading");w.useEffect(()=>{if(!t){n("invalid");return}T(this,null,function*(){try{const u=yield(yield fetch("".concat("https://xvdpcfxfzrgppoefeptu.supabase.co","/functions/v1/handle-email-unsubscribe?token=").concat(t),{headers:{apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh2ZHBjZnhmenJncHBvZWZlcHR1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI4Mzk4OTcsImV4cCI6MjA4ODQxNTg5N30.OuejCEl5sFQl4fEpxSRhQVe2owlGnxO6wSTBImACiuU"}})).json();u.valid===!1&&u.reason==="already_unsubscribed"?n("already"):u.valid?n("valid"):n("invalid")}catch(o){n("invalid")}})},[t]);const i=()=>T(this,null,function*(){try{const{data:a}=yield Q.functions.invoke("handle-email-unsubscribe",{body:{token:t}});a!=null&&a.success?n("success"):(a==null?void 0:a.reason)==="already_unsubscribed"?n("already"):n("error")}catch(a){n("error")}});return l.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:[l.jsx(ct,{title:"Abonelikten Çık",description:"E-posta bildirimlerinden çıkış sayfası.",canonical:"/abonelikten-cik",noIndex:!0}),l.jsxs("div",{className:"max-w-md w-full bg-card rounded-2xl p-8 text-center border border-border",children:[l.jsx("h1",{className:"text-xl font-bold text-foreground mb-4",children:"E-posta Aboneliği"}),r==="loading"&&l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."}),r==="valid"&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-muted-foreground mb-6",children:"E-posta bildirimlerinden çıkmak istediğinize emin misiniz?"}),l.jsx("button",{onClick:i,className:"btn-primary w-full",children:"Abonelikten Çık"})]}),r==="already"&&l.jsx("p",{className:"text-muted-foreground",children:"Zaten abonelikten çıkmışsınız."}),r==="success"&&l.jsx("p",{className:"text-green-600 font-medium",children:"Başarıyla abonelikten çıktınız."}),r==="invalid"&&l.jsx("p",{className:"text-destructive",children:"Geçersiz veya süresi dolmuş bağlantı."}),r==="error"&&l.jsx("p",{className:"text-destructive",children:"Bir hata oluştu, lütfen tekrar deneyin."})]})]})}const hIe=()=>{const[e]=Hv(),t=e.get("payment_link_id"),[r,n]=w.useState("loading"),[i,a]=w.useState(null);w.useEffect(()=>{if(!t){n("error");return}T(Da,null,function*(){try{const{data:c,error:u}=yield Q.functions.invoke("verify-payment-link",{body:{paymentLinkId:t}});if(u)throw u;(c==null?void 0:c.status)==="paid"?(a(c.record),n("paid")):setTimeout(()=>T(Da,null,function*(){const{data:f}=yield Q.functions.invoke("verify-payment-link",{body:{paymentLinkId:t}});(f==null?void 0:f.status)==="paid"?(a(f.record),n("paid")):n("error")}),3e3)}catch(c){n("error")}})},[t]);const o={TRY:"₺",USD:"$",EUR:"€",GBP:"£"};return l.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-muted p-4",children:[l.jsx(ct,{title:"Ödeme Sonucu",description:"Ödeme durumu sayfası.",canonical:"/odeme-basarili",noIndex:!0}),l.jsxs("div",{className:"bg-card rounded-2xl shadow-lg p-8 max-w-md w-full text-center space-y-4",children:[r==="loading"&&l.jsxs(l.Fragment,{children:[l.jsx(vS,{className:"h-12 w-12 animate-spin text-primary mx-auto"}),l.jsx("h1",{className:"text-xl font-semibold",children:"Ödeme doğrulanıyor..."}),l.jsx("p",{className:"text-muted-foreground text-sm",children:"Lütfen bekleyin"})]}),r==="paid"&&l.jsxs(l.Fragment,{children:[l.jsx(Kn,{className:"h-16 w-16 text-green-500 mx-auto"}),l.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Ödeme Başarılı!"}),l.jsx("p",{className:"text-muted-foreground",children:"Ödemeniz başarıyla tamamlandı."}),i&&l.jsxs("div",{className:"bg-muted rounded-lg p-4 text-left space-y-2 text-sm",children:[i.description&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Açıklama:"}),l.jsx("span",{className:"font-medium",children:i.description})]}),l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Tutar:"}),l.jsxs("span",{className:"font-medium",children:[o[i.currency]||i.currency,i.amount]})]}),i.paid_by_name&&l.jsxs("div",{className:"flex justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Ad:"}),l.jsx("span",{className:"font-medium",children:i.paid_by_name})]})]}),l.jsx(oj,{asChild:!0,className:"w-full mt-4",children:l.jsx(de,{to:"/",children:"Ana Sayfaya Dön"})})]}),r==="error"&&l.jsxs(l.Fragment,{children:[l.jsx(Mv,{className:"h-16 w-16 text-destructive mx-auto"}),l.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Ödeme Başarısız Oldu"}),l.jsx("p",{className:"text-muted-foreground",children:"Ödemeniz tamamlanamadı. Yardım için bizimle iletişime geçebilirsiniz."}),l.jsxs("a",{href:"https://wa.me/905488432337?text=Merhaba%2C%20%C3%B6demem%20ba%C5%9Far%C4%B1s%C4%B1z%20oldu.%20Yard%C4%B1m%20alabilir%20miyim%3F",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full mt-4 py-3 px-6 rounded-md bg-[#25D366] text-white font-medium hover:bg-[#1da851] transition-colors",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),"WhatsApp ile Yardım Alın"]}),l.jsx(oj,{asChild:!0,variant:"outline",className:"w-full",children:l.jsx(de,{to:"/",children:"Ana Sayfaya Dön"})})]})]})]})};function pIe(){const{data:e=[],isLoading:t}=xE();return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Blog",description:"Meditasyon, farkındalık ve kişisel gelişim üzerine yazılar. Mind Soul Academy blog'da bilinçli yaşam için ipuçları ve rehberler.",canonical:"/blog"}),l.jsx("section",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsx(wn,{items:[{label:"Blog"}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},className:"text-center mb-16",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-4 block",children:"Blog"}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Yazılar & Rehberler"}),l.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:"Meditasyon, farkındalık ve kişisel gelişim üzerine yazılarımızı keşfedin."})]}),t?l.jsx("p",{className:"text-center text-muted-foreground py-16",children:"Yazılar yükleniyor..."}):e.length===0?l.jsx("p",{className:"text-center text-muted-foreground py-16",children:"Henüz yazı yayınlanmamış."}):l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map((r,n)=>l.jsx(pe.article,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:n*.1},children:l.jsxs(de,{to:"/blog/".concat(r.slug),className:"group block rounded-2xl overflow-hidden border border-border bg-card hover:shadow-lg transition-all duration-300",children:[r.cover_image&&l.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:l.jsx("img",{src:r.cover_image,alt:r.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mb-3",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Do,{size:12})," ",r.author]}),l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Pz,{size:12})," ",new Date(r.created_at).toLocaleDateString("tr-TR")]})]}),l.jsx("h2",{className:"font-heading text-lg font-semibold text-foreground mb-2 group-hover:text-primary transition-colors",children:r.title}),r.excerpt&&l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3",children:r.excerpt}),l.jsxs("span",{className:"inline-flex items-center gap-1 text-primary text-sm font-medium mt-4 group-hover:gap-2 transition-all",children:["Devamını Oku ",l.jsx(gc,{size:14})]})]})]})},r.id))}),l.jsxs("div",{className:"mt-16 p-8 rounded-2xl bg-secondary/30 text-center",children:[l.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground mb-4",children:"Eğitimlerimizi de Keşfedin"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Meditasyon ve kişisel gelişim alanında ses temelli eğitimlerimize göz atın."}),l.jsx(de,{to:"/egitimler",className:"btn-primary",children:"Eğitimlere Git"})]})]})})]})}function mIe(){var p,m;const{slug:e}=BS(),{data:t,isLoading:r}=Tae(e),n=(p=t==null?void 0:t.post)!=null?p:null,i=(m=t==null?void 0:t.redirectTo)!=null?m:null,{data:a=[]}=dl(),o=n!=null&&n.related_course_id?a.find(g=>g.id===n.related_course_id&&g.published):null,s=o?[]:a.filter(g=>g.featured&&g.published).slice(0,3);if(r)return l.jsxs("main",{className:"pt-20 section-padding text-center",children:[l.jsx(ct,{title:"Blog Yazısı",description:"Mind Soul Academy blog yazısı yükleniyor.",canonical:"/blog/".concat(e||"")}),l.jsx("p",{className:"text-muted-foreground",children:"Yükleniyor..."})]});if(!n&&i)return l.jsx(US,{to:"/blog/".concat(i),replace:!0});if(!n)return l.jsxs("main",{className:"pt-20 section-padding text-center",children:[l.jsx(ct,{title:"Yazı Bulunamadı",description:"Aradığınız blog yazısı bulunamadı.",canonical:"/blog/".concat(e||""),noIndex:!0}),l.jsx("h1",{className:"heading-section text-foreground mb-4",children:"Yazı Bulunamadı"}),l.jsx(de,{to:"/blog",className:"btn-primary",children:"Blog'a Dön"})]});const c=g=>g.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim(),u=n.meta_title||n.title,f=n.meta_description||n.excerpt||"".concat(n.title," - Mind Soul Academy blog yazısı."),d=c(f).slice(0,160),h={"@context":"https://schema.org","@type":"Article",headline:n.title,description:d,image:n.cover_image||void 0,author:{"@type":"Person",name:n.author},publisher:{"@type":"Organization",name:"Mind Soul Academy",logo:{"@type":"ImageObject",url:"https://mindsoulacademy.life/placeholder.svg"}},datePublished:n.created_at,dateModified:n.updated_at,mainEntityOfPage:"https://mindsoulacademy.life/blog/".concat(n.slug)};return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:u,description:d,canonical:"/blog/".concat(n.slug),ogImage:n.cover_image||void 0,schemaJson:h}),l.jsx("article",{className:"section-padding",children:l.jsxs("div",{className:"container-narrow mx-auto",children:[l.jsx(wn,{items:[{label:"Blog",href:"/blog"},{label:n.title}]}),l.jsxs(pe.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7},children:[n.cover_image&&l.jsx("div",{className:"rounded-2xl overflow-hidden mb-8 aspect-[4/3]",children:l.jsx("img",{src:n.cover_image,alt:n.title,className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-6",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Do,{size:14})," ",n.author]}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Pz,{size:14})," ",new Date(n.created_at).toLocaleDateString("tr-TR",{day:"numeric",month:"long",year:"numeric"})]})]}),l.jsx("h1",{className:"heading-section text-foreground mb-8",children:n.title}),l.jsx("div",{className:"prose prose-lg max-w-none text-foreground/90 leading-relaxed prose-headings:font-heading prose-headings:font-semibold prose-headings:text-foreground prose-h2:text-3xl md:prose-h2:text-4xl prose-h2:mt-12 prose-h2:mb-5 prose-h3:text-2xl md:prose-h3:text-3xl prose-h3:mt-10 prose-h3:mb-4 prose-h4:text-xl md:prose-h4:text-2xl prose-h4:mt-8 prose-h4:mb-3 prose-p:my-4 prose-a:text-primary prose-a:underline hover:prose-a:no-underline prose-strong:text-foreground prose-ul:my-4 prose-ol:my-4 prose-li:my-1 prose-img:rounded-xl prose-img:my-6",dangerouslySetInnerHTML:{__html:n.content}})]}),o&&l.jsx(pe.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mt-12",children:l.jsx("div",{className:"rounded-2xl overflow-hidden border border-border bg-card shadow-sm",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-0",children:[o.cover_image&&l.jsx("div",{className:"aspect-video md:aspect-auto md:h-full overflow-hidden bg-muted",children:l.jsx("img",{src:o.cover_image,alt:o.title,className:"w-full h-full object-cover"})}),l.jsxs("div",{className:"p-6 md:p-8 flex flex-col justify-center",children:[l.jsx("span",{className:"text-small text-primary font-medium tracking-wider uppercase mb-3",children:"Bu Yazıyla İlgili Eğitim"}),l.jsx("h2",{className:"font-heading text-xl md:text-2xl font-semibold text-foreground mb-3",children:o.title}),o.short_description&&l.jsx("div",{className:"text-sm text-muted-foreground mb-5 line-clamp-3 [&_a]:pointer-events-none [&_a]:text-inherit [&_a]:no-underline",dangerouslySetInnerHTML:{__html:o.short_description}}),l.jsxs(de,{to:"/egitim/".concat(o.slug),className:"btn-primary inline-flex items-center justify-center gap-2 self-start",children:["Eğitime Göz At ",l.jsx(gc,{size:16})]})]})]})})}),l.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:l.jsxs(de,{to:"/blog",className:"inline-flex items-center gap-1.5 text-primary font-medium text-sm hover:gap-2.5 transition-all",children:[l.jsx(Ys,{size:16})," Tüm Yazılar"]})})]})}),!o&&s.length>0&&l.jsx("section",{className:"section-padding bg-secondary/30",children:l.jsxs("div",{className:"container-wide mx-auto",children:[l.jsx("h2",{className:"heading-card text-foreground text-center mb-8",children:"Öne Çıkan Eğitimler"}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:s.map((g,v)=>l.jsx(tx,{course:g,index:v},g.id))}),l.jsx("div",{className:"text-center mt-8",children:l.jsx(de,{to:"/egitimler",className:"btn-outline",children:"Tüm Eğitimleri Gör"})})]})})]})}function gIe(){return l.jsxs("main",{className:"pt-20",children:[l.jsx(ct,{title:"Çocukla Kıbrıs Tatili | Ailelere Özel Deneyim",description:"Çocukla Kıbrıs tatili planlayan aileler için hem ebeveyn hem çocuk odaklı özel bir deneyim. Tatili daha anlamlı hale getiren bu süreci keşfedin.",canonical:"/cocukla-kibris-tatili",ogImage:"/images/cocukla-kibris-tatili-aile-deneyimi.webp",schemaJson:{"@context":"https://schema.org","@type":"Article",headline:"Çocukla Kıbrıs Tatili | Ailelere Özel Deneyim",description:"Çocukla Kıbrıs'ta sadece tatil değil, birlikte gelişim ve denge zamanı.",image:"https://mindsoulacademy.life/images/cocukla-kibris-tatili-aile-deneyimi.webp",publisher:{"@type":"Organization",name:"Mind Soul Academy",url:"https://mindsoulacademy.life"}}}),l.jsx("article",{className:"section-padding",children:l.jsxs("div",{className:"container-wide mx-auto max-w-4xl",children:[l.jsx(wn,{items:[{label:"Çocukla Kıbrıs Tatili"}]}),l.jsxs("div",{className:"w-full rounded-2xl overflow-hidden mb-10",children:[l.jsx("img",{src:"/images/cocukla-kibris-tatili-aile-deneyimi.webp",alt:"çocukla kıbrıs tatili sırasında ailelerin birlikte kaliteli zaman geçirdiği bi mola deneyimi",title:"Çocukla Kıbrıs Tatili | Bi' Mola Aile Deneyimi",className:"w-full h-auto object-cover",loading:"eager"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Kıbrıs'ta çocuklar ve ebeveynler için ayrı programlarla planlanan Bi' Mola, ailece dengeli ve anlamlı bir tatil deneyimi sunar."})]}),l.jsxs(pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"prose prose-lg max-w-none text-foreground",children:[l.jsx("h1",{className:"heading-section text-foreground mb-6",children:"Çocukla Kıbrıs Tatili"}),l.jsxs("p",{children:[l.jsx("strong",{children:"Çocukla Kıbrıs tatili"})," planlayan aileler için bu yaz, klasik otel konaklamalarının ötesine geçen özel bir deneyim sizi bekliyor."," ",l.jsx(de,{to:"/egitim/bi-mola",className:"text-primary hover:underline",children:"Bi' Mola programı"})," ile Kıbrıs'ta gerçekleşen bu program, hem ebeveynlerin kendilerine alan açabildiği hem de çocukların gelişim odaklı bir süreçten geçtiği dengeli bir tatil modeli sunar. Böylece sadece dinlenmek değil, aynı zamanda ailece verimli ve anlamlı bir zaman geçirmek mümkün hale gelir."]}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocukla Kıbrıs tatili planlarken en büyük ihtiyaç nedir?"}),l.jsxs("p",{children:["Aileler için tatil planı çoğu zaman bir denge arayışıdır. Ebeveynler dinlenmek isterken çocukların enerjisi, ihtiyaçları ve gelişimi göz önünde bulundurulmalıdır. Bu nedenle ",l.jsx("strong",{children:"çocukla Kıbrıs tatili"})," arayışında olanlar için en önemli kriter, hem ebeveynin hem çocuğun aynı anda memnun olabileceği bir yapı bulmaktır."]}),l.jsx("p",{className:"italic text-muted-foreground",children:"Gerçek bir tatil, sadece konaklama değil; herkesin kendi ihtiyacına alan bulabildiği bir deneyimdir."}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Bi' Mola ile çocukla Kıbrıs tatili nasıl farklı bir deneyime dönüşür?"}),l.jsxs("p",{children:[l.jsx(de,{to:"/egitim/bi-mola-gunubirlik",className:"text-primary hover:underline",children:"Bi' Mola yetişkin programı"}),", klasik tatil anlayışının ötesine geçerek ailelere iki ayrı ama dengeli bir program sunar. Yetişkinler kendilerine odaklanabilecekleri bir süreç yaşarken, çocuklar da gelişimlerini destekleyen özel bir programın içinde yer alır."]}),l.jsx("p",{children:'Bu sayede ebeveynler "çocuğum ne yapıyor?" kaygısı yaşamadan kendilerine zaman ayırabilir. Aynı zamanda çocuklar da sadece vakit geçiren değil, öğrenen ve gelişen bir sürecin içinde olur.'}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocuklar için hazırlanan program tatili nasıl daha değerli hale getirir?"}),l.jsxs("p",{children:["Çocuklara özel olarak hazırlanan gelişim kampı, onların zihinsel ve fiziksel becerilerini destekleyen bir yapı sunar. Eğlence ve öğrenme birlikte ilerler. Detaylı içerik için"," ",l.jsx(de,{to:"/egitim/bi-mola-gunubirlik-cocuk-6-14-yas",className:"text-primary hover:underline",children:"çocuk programını inceleyebilirsiniz"}),"."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-6",children:[l.jsx("li",{children:"Dikkat ve odak geliştiren zihin çalışmaları"}),l.jsx("li",{children:"Hafıza egzersizleri"}),l.jsx("li",{children:"Yoga ve spor aktiviteleri"}),l.jsx("li",{children:"Masal ve hikâye dinletileri"}),l.jsx("li",{children:"Ritim terapisi"}),l.jsx("li",{children:"Oyun temelli gelişim etkinlikleri"})]}),l.jsx("p",{children:"Bu yapı sayesinde çocuklar tatilde sadece vakit geçirmez; aynı zamanda kendilerini geliştirir ve yeni deneyimler kazanır."}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocukla Kıbrıs tatili sırasında ebeveynler ne kazanır?"}),l.jsx("p",{children:"Birçok aile tatilde dinlenmek ister ancak çoğu zaman çocuk odaklı planlar nedeniyle kendilerine yeterince zaman ayıramaz. Bi' Mola, bu dengeyi doğru kurarak ebeveynlere de gerçek bir nefes alanı sunar."}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-6",children:[l.jsx("li",{children:"Zihinsel olarak yavaşlama fırsatı"}),l.jsx("li",{children:"Kendine odaklanma alanı"}),l.jsx("li",{children:"Günlük stres ve yoğunluktan uzaklaşma"}),l.jsx("li",{children:"Daha dengeli ve huzurlu bir tatil deneyimi"})]}),l.jsx("p",{children:"Bu sayede tatil, sadece çocuk için değil ebeveyn için de yenileyici bir sürece dönüşür."}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocukla Kıbrıs tatili kimler için ideal?"}),l.jsxs("p",{children:[l.jsx("strong",{children:"Çocukla Kıbrıs tatili"}),", özellikle hem kendine zaman ayırmak isteyen hem de çocuğunun gelişimini önemseyen aileler için idealdir. Aynı zamanda kalabalık ve yorucu tatil planlarından uzak, daha bilinçli ve dengeli bir deneyim arayanlar için de güçlü bir seçenektir."]}),l.jsx("p",{children:"İster tek çocukla, ister birden fazla çocukla katılım mümkündür. Program yapısı, her katılımcının kendi alanını bulabileceği şekilde planlanmıştır."}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocukla Kıbrıs tatili için program detayları"}),l.jsx("p",{children:"Bi' Mola kapsamında planlanan bu özel tatil deneyimi için temel bilgiler aşağıdaki gibidir:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-6",children:[l.jsx("li",{children:"Tarih: 5–7 Haziran"}),l.jsx("li",{children:"Lokasyon: Kıbrıs, Esentepe"}),l.jsx("li",{children:"Program: Yetişkin ve çocuklar için ayrı akışlar"}),l.jsx("li",{children:"Katılım: Ailece veya bireysel"}),l.jsx("li",{children:"Kontenjan: Sınırlı"})]}),l.jsxs("p",{children:["Programın yaklaşımını ve bu sürecin arkasındaki uzmanlığı daha yakından görmek için"," ",l.jsx(de,{to:"/ipek-kabidan",className:"text-primary hover:underline",children:"İpek Kabidan"})," sayfasını inceleyebilirsiniz."]}),l.jsx("h2",{className:"font-heading text-2xl font-semibold text-foreground mt-10 mb-4",children:"Çocukla Kıbrıs tatilini bu yaz daha anlamlı hale getirmek ister misiniz?"}),l.jsx("p",{children:"Bu yaz sadece dinlenmek değil, aynı zamanda kendinize ve çocuğunuza değer katmak istiyorsanız Bi' Mola sizin için güçlü bir seçenek olabilir. Hem ebeveyn hem çocuk için ayrı ayrı düşünülmüş bu yapı, tatili çok daha dengeli ve verimli hale getirir."}),l.jsxs("p",{children:["Katılım süreci ve detaylı bilgi için"," ",l.jsx(de,{to:"/iletisim",className:"text-primary hover:underline",children:"iletişim sayfasına"})," ulaşabilirsiniz."]})]})]})})]})}const yIe=()=>{const e={"@context":"https://schema.org","@type":"Article",headline:"İnziva Kampı Kıbrıs | Bi Mola Deneyimi",description:"Durmak, yavaşlamak ve yeniden bağ kurmak için Kıbrıs'ta özel bir inziva deneyimi.",image:"https://mindsoulacademy.life/images/inziva-kampi-kibris-farkindalik-deneyimi.webp",url:"https://mindsoulacademy.life/inziva-kampi-kibris",publisher:{"@type":"Organization",name:"Mind Soul Academy"}};return l.jsxs(l.Fragment,{children:[l.jsx(ct,{title:"İnziva Kampı Kıbrıs | Bi Mola Deneyimi",description:"İnziva kampı arayanlar için Kıbrıs'ta özel bir deneyim. Hem kendine alan aç hem çocuğunla birlikte katılabileceğin bu süreci keşfet.",canonical:"/inziva-kampi-kibris",ogImage:"/images/inziva-kampi-kibris-farkindalik-deneyimi.webp",schemaJson:e}),l.jsx("main",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[l.jsx(wn,{items:[{label:"Ana Sayfa",href:"/"},{label:"İnziva Kampı"}]}),l.jsxs("div",{className:"w-full rounded-2xl overflow-hidden mb-8 mt-6",children:[l.jsx("img",{src:"/images/inziva-kampi-kibris-farkindalik-deneyimi.webp",alt:"kıbrıs inziva kampında mindfulness ve farkındalık çalışmaları yapılan bi mola deneyimi",title:"İnziva Kampı Kıbrıs | Bi' Mola Farkındalık Deneyimi",className:"w-full h-auto object-cover",loading:"eager"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Bi' Mola inziva kampı, Kıbrıs'ın sakin atmosferinde zihinsel sadeleşme ve içsel denge kurma imkânı sunar."})]}),l.jsxs("article",{className:"prose prose-lg max-w-none",children:[l.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"İnziva Kampı"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx("strong",{children:"İnziva kampı"})," arayışında olanlar için bu yaz, yalnızca dinlenmek değil gerçekten kendine dönmek için özel olarak kurgulanmış bir deneyim sunuluyor."," ",l.jsx(de,{to:"/egitim/bi-mola",className:"text-primary underline hover:text-primary/80",children:"Bi' Mola programı"})," ","ile Kıbrıs'ta gerçekleşen bu kamp, zihinsel yoğunluğu azaltmak, içsel dengeyi yeniden kurmak ve hayatın temposuna bilinçli bir mola vermek isteyenler için tasarlandı. Üstelik bu deneyim, çocuklu katılımcılar için de özel olarak planlanan ayrı bir programla destekleniyor."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"İnziva kampı nedir ve neden ihtiyaç duyulur?"}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"İnziva kampı, kişinin günlük hayatın karmaşasından uzaklaşıp kendisiyle yeniden bağlantı kurabildiği özel bir alandır. Sürekli maruz kalınan bilgi akışı, stres ve sorumluluklar zamanla zihinsel yorgunluk yaratır. Bu noktada inziva, sadece fiziksel bir uzaklaşma değil; zihinsel bir sadeleşme süreci sunar."}),l.jsx("p",{className:"italic text-muted-foreground",children:"Gerçek bir inziva deneyimi, yalnızca dinlenmek değil; fark etmek, yavaşlamak ve yeniden dengelenmektir."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Bi' Mola inziva kampı nasıl bir deneyim sunar?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx(de,{to:"/egitim/bi-mola-gunubirlik",className:"text-primary underline hover:text-primary/80",children:"Bi' Mola yetişkin programı"}),", klasik inziva kamplarından farklı olarak hem bireysel hem de aile odaklı bir yapı sunar. Katılımcılar, Kıbrıs'ın sakin atmosferinde gerçekleşen bu deneyimde kendilerine alan açarken aynı zamanda güvenli ve destekleyici bir programın içinde yer alır."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Mindfulness ve farkındalık çalışmaları"}),l.jsx("li",{children:"Nefes pratikleri"}),l.jsx("li",{children:"Beden farkındalığı uygulamaları"}),l.jsx("li",{children:"Ses terapisi"}),l.jsx("li",{children:"İçsel denge ve farkındalık odaklı çalışmalar"})]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:'Bu süreçte amaç, zihni susturmak ve gerçekten "durabilmeyi" deneyimlemektir. Katılımcılar, sadece fiziksel olarak değil, zihinsel olarak da dinlendikleri bir alan bulurlar.'}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"İnziva kampı çocuklu katılımcılar için nasıl planlandı?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Bi' Mola'nın en güçlü yönlerinden biri, çocuklu katılımcılar için de özel bir çözüm sunmasıdır. Çocuklar için hazırlanan gelişim programı, onların hem eğlenmesini hem de zihinsel becerilerini geliştirmesini hedefler. Detaylı içerik için"," ",l.jsx(de,{to:"/egitim/bi-mola-gunubirlik-cocuk-6-14-yas",className:"text-primary underline hover:text-primary/80",children:"çocuk programını inceleyebilirsiniz"}),"."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Dikkat ve odak geliştiren çalışmalar"}),l.jsx("li",{children:"Hafıza egzersizleri"}),l.jsx("li",{children:"Yoga ve spor aktiviteleri"}),l.jsx("li",{children:"Masal dinletileri"}),l.jsx("li",{children:"Ritim terapisi"}),l.jsx("li",{children:"Oyun temelli gelişim çalışmaları"})]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bu yapı sayesinde ebeveynler kendi içsel süreçlerine odaklanabilirken, çocuklar da güvenli ve verimli bir ortamda zaman geçirir. Böylece hem bireysel hem ailece dengeli bir deneyim ortaya çıkar."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"İnziva kampı kimler için uygundur?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx("strong",{children:"İnziva kampı"}),", özellikle son dönemde zihinsel olarak yorulmuş, kendine zaman ayıramayan veya içsel olarak uzaklaşmış hisseden kişiler için güçlü bir fırsattır. Aynı zamanda çocuklarıyla birlikte kaliteli ama dengeli bir deneyim yaşamak isteyen aileler için de oldukça uygundur."]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bu programa katılmak için belirli bir deneyime sahip olmanız gerekmez. Önemli olan, kendinize alan açmaya istekli olmanızdır."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"İnziva kampı program detayları"}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bi' Mola kapsamında planlanan inziva kampı için temel bilgiler aşağıdaki gibidir:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Tarih: 5–7 Haziran"}),l.jsx("li",{children:"Lokasyon: Kıbrıs, Esentepe"}),l.jsx("li",{children:"Program: Yetişkin ve çocuklar için ayrı akışlar"}),l.jsx("li",{children:"Katılım: Bireysel veya çocukla birlikte"}),l.jsx("li",{children:"Kontenjan: Sınırlı"})]}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Programın yaklaşımı ve bu sürecin arkasındaki uzmanlığı daha yakından görmek için"," ",l.jsx(de,{to:"/ipek-kabidan",className:"text-primary underline hover:text-primary/80",children:"İpek Kabidan"})," ","sayfasını inceleyebilirsiniz."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"İnziva kampı ile bu yaz kendinize gerçekten bir mola verebilir misiniz?"}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bazen ihtiyacımız olan şey daha fazla yapmak değil, durmaktır. Bi' Mola, tam olarak bu ihtiyaca cevap veren bir inziva deneyimi sunar. Zihninizi sakinleştirebileceğiniz, bedeninizi dinleyebileceğiniz ve kendinizle yeniden bağlantı kurabileceğiniz bir alan oluşturur."}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Kontenjanın sınırlı olması nedeniyle erken iletişim önemlidir. Katılım süreci ve detaylı bilgi için"," ",l.jsx(de,{to:"/iletisim",className:"text-primary underline hover:text-primary/80",children:"iletişim sayfasına"})," ","ulaşabilirsiniz."]})]})]})})]})},vIe=()=>{const e={"@context":"https://schema.org","@type":"Article",headline:"Kıbrıs Etkinlik Önerisi | Bi Mola Deneyimi",description:"Kıbrıs'ta klasik etkinliklerden farklı, içsel ve aile odaklı bir deneyim.",image:"https://mindsoulacademy.life/images/kibris-etkinlik-aile-ve-farkindalik-programi.webp",url:"https://mindsoulacademy.life/kibris-etkinlik",publisher:{"@type":"Organization",name:"Mind Soul Academy"}};return l.jsxs(l.Fragment,{children:[l.jsx(ct,{title:"Kıbrıs Etkinlik Önerisi | Bi Mola Deneyimi",description:"Kıbrıs etkinlik arayanlar için ailece katılabileceğiniz özel bir deneyim. Hem kendinize hem çocuğunuza alan açan bu yaz planını keşfedin.",canonical:"/kibris-etkinlik",ogImage:"/images/kibris-etkinlik-aile-ve-farkindalik-programi.webp",schemaJson:e}),l.jsx("main",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[l.jsx(wn,{items:[{label:"Ana Sayfa",href:"/"},{label:"Kıbrıs Etkinlik"}]}),l.jsxs("div",{className:"w-full rounded-2xl overflow-hidden mb-8 mt-6",children:[l.jsx("img",{src:"/images/kibris-etkinlik-aile-ve-farkindalik-programi.webp",alt:"kıbrısta düzenlenen bi mola etkinliğinde yetişkin ve çocuklar için ayrı program deneyimi",title:"Kıbrıs Etkinlik Önerisi | Bi' Mola Deneyimi",className:"w-full h-auto object-cover",loading:"eager"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Bi' Mola etkinliği, Kıbrıs'ta hem yetişkinler hem çocuklar için ayrı planlanmış bütünsel bir deneyim sunar."})]}),l.jsxs("article",{className:"prose prose-lg max-w-none",children:[l.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Kıbrıs Etkinlik"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx("strong",{children:"Kıbrıs etkinlik"})," arayışında olanlar için bu yaz, klasik tatil planlarının ötesine geçen özel bir deneyim sizi bekliyor. Kıbrıs'ın doğal atmosferinde gerçekleşen"," ",l.jsx(de,{to:"/egitim/bi-mola",className:"text-primary underline hover:text-primary/80",children:"Bi' Mola buluşması"}),"; hem yetişkinler hem de çocuklar için ayrı ayrı planlanmış programlarıyla, tatil kavramını yeniden tanımlayan bütünsel bir etkinlik sunuyor. Bu deneyimde sadece gezmek değil, aynı zamanda yavaşlamak, fark etmek ve kendinize gerçekten alan açmak mümkün hale geliyor."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs'ta düzenlenen etkinlikler arasında Bi' Mola neden öne çıkıyor?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Kıbrıs'ta yaz aylarında birçok etkinlik düzenlenir; konserler, festivaller ve çeşitli organizasyonlar… Ancak Bi' Mola, bu etkinliklerden farklı olarak katılımcıya sadece dış dünyada değil, iç dünyasında da bir yolculuk sunar."," ",l.jsx("em",{children:"Bu yönüyle klasik bir etkinlikten çok daha fazlasıdır."})]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Yetişkinler için farkındalık ve içsel denge odaklı bir program sunulurken, çocuklar için de gelişimlerini destekleyen özel bir kamp hazırlanmıştır. Aynı yerde, aynı zamanda ama tamamen bağımsız ilerleyen bu iki yapı, aileler için benzersiz bir deneyim oluşturur."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs etkinlik deneyiminde yetişkinler için neler var?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx(de,{to:"/egitim/bi-mola-gunubirlik",className:"text-primary underline hover:text-primary/80",children:"Yetişkin programı"}),", zihinsel yoğunluğu azaltmayı ve bedensel farkındalığı artırmayı hedefler. Günlük hayatın hızından uzaklaşıp kendine dönmek isteyen katılımcılar için planlanan bu süreç, uygulama odaklı ve derin bir deneyim sunar."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Mindfulness ve farkındalık çalışmaları"}),l.jsx("li",{children:"Nefes pratikleri"}),l.jsx("li",{children:"Beden farkındalığı uygulamaları"}),l.jsx("li",{children:"Ses terapisi"}),l.jsx("li",{children:"İçsel denge odaklı çalışmalar"})]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bu etkinlikte amaç yalnızca dinlenmek değil; gerçekten durabildiğini, nefes alabildiğini ve zihinsel olarak sadeleşebildiğini deneyimlemektir."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs etkinlik planı çocuklar için nasıl bir fırsat sunuyor?"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Bi' Mola'nın en güçlü taraflarından biri, çocukların da bu sürecin aktif bir parçası olmasıdır. Çocuklara özel hazırlanan gelişim kampı, onların dikkat, odak ve hafıza becerilerini destekleyen bir yapı sunar. Detaylı içerik için"," ",l.jsx(de,{to:"/egitim/bi-mola-gunubirlik-cocuk-6-14-yas",className:"text-primary underline hover:text-primary/80",children:"çocuk programını inceleyebilirsiniz"}),"."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Dikkat ve odak geliştiren zihin egzersizleri"}),l.jsx("li",{children:"Hafıza çalışmaları"}),l.jsx("li",{children:"Yoga ve spor aktiviteleri"}),l.jsx("li",{children:"Masal dinletileri"}),l.jsx("li",{children:"Ritim terapisi"}),l.jsx("li",{children:"Oyun ve eğlence odaklı etkinlikler"})]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bu sayede ebeveynler kendi içsel süreçlerine odaklanırken, çocuklar da kendi gelişimlerine katkı sağlayan bir deneyimin içinde yer alır. Bu yapı, aileler için Kıbrıs'ta katılabilecek en dengeli etkinliklerden biri haline gelir."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs'ta ailece katılabileceğiniz etkinlik arıyorsanız bu deneyimi değerlendirebilirsiniz"}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:[l.jsx("strong",{children:"Kıbrıs etkinlik"})," seçenekleri arasında aile odaklı ve aynı zamanda bireysel alanı koruyan organizasyonlar oldukça sınırlıdır."," ",l.jsx(de,{to:"/egitim/bi-mola",className:"text-primary underline hover:text-primary/80",children:"Bi' Mola"}),", tam da bu ihtiyaca cevap veren bir yapı sunar."]}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"İster tek başınıza katılın, ister çocuğunuzla birlikte gelin; herkes kendi alanında ilerlerken aynı atmosferi paylaşır. Bu da hem bağ kurmayı hem de bireysel gelişimi aynı anda mümkün kılar."}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs etkinlik takvimi içinde Bi' Mola detayları"}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Bu özel etkinliğe katılmayı düşünenler için temel bilgiler aşağıdaki gibidir:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-foreground/90",children:[l.jsx("li",{children:"Tarih: 5–7 Haziran"}),l.jsx("li",{children:"Lokasyon: Kıbrıs, Esentepe"}),l.jsx("li",{children:"Program: Yetişkin ve çocuklar için ayrı akışlar"}),l.jsx("li",{children:"Katılım: Bireysel veya çocukla birlikte"}),l.jsx("li",{children:"Kontenjan: Sınırlı"})]}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Etkinliğin yaklaşımı ve programın arkasındaki bakış açısını daha yakından görmek için"," ",l.jsx(de,{to:"/ipek-kabidan",className:"text-primary underline hover:text-primary/80",children:"İpek Kabidan"})," ","sayfasını inceleyebilirsiniz."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Kıbrıs'ta bu yaz farklı bir etkinlik deneyimi yaşamak ister misiniz?"}),l.jsx("p",{className:"text-foreground/90 leading-relaxed",children:"Kimi zaman ihtiyaç duyulan şey yeni bir yer görmek değil, bulunduğun yerde kendini yeniden keşfetmektir. Bi' Mola, Kıbrıs'ta bu ihtiyaca cevap veren özel bir etkinlik olarak hem zihinsel hem duygusal anlamda yenilenme fırsatı sunar."}),l.jsxs("p",{className:"text-foreground/90 leading-relaxed",children:["Detaylı bilgi almak ve katılım sürecini öğrenmek için"," ",l.jsx(de,{to:"/iletisim",className:"text-primary underline hover:text-primary/80",children:"iletişim sayfasına"})," ","ulaşabilirsiniz."]})]})]})})]})},xIe={"@context":"https://schema.org","@type":"Article",headline:"Maldives Homes Kıbrıs Esentepe | Bi Mola Deneyimi",description:"Maldives Homes'ta sadece konaklama değil, dönüşüm odaklı bir deneyim.",image:"https://mindsoulacademy.life/images/maldives-homes-kibris-esentepe-bi-mola.webp",publisher:{"@type":"Organization",name:"Mind Soul Academy",url:"https://mindsoulacademy.life"},mainEntityOfPage:"https://mindsoulacademy.life/maldives-homes-kibris"};function bIe(){return l.jsxs(l.Fragment,{children:[l.jsx(ct,{title:"Maldives Homes Kıbrıs Esentepe | Bi Mola Deneyimi",description:"Maldives Homes Kıbrıs Esentepe'de hem kendin hem çocuğun için özel bir deneyim sunuyor. Ailece katılabileceğin bu yaz planı için detayları incele.",canonical:"/maldives-homes-kibris",ogImage:"/images/maldives-homes-kibris-esentepe-bi-mola.webp",schemaJson:xIe}),l.jsx("main",{className:"min-h-screen bg-background",children:l.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:[l.jsx(wn,{items:[{label:"Ana Sayfa",href:"/"},{label:"Maldives Homes Kıbrıs"}]}),l.jsxs("div",{className:"w-full rounded-2xl overflow-hidden mb-8 mt-4",children:[l.jsx("img",{src:"/images/maldives-homes-kibris-esentepe-bi-mola.webp",alt:"maldives homes kıbrıs esentepe lokasyonunda gerçekleşen bi mola deneyimi ve inziva programı",title:"Maldives Homes Kıbrıs Esentepe | Bi' Mola Deneyimi",className:"w-full h-auto object-cover",loading:"eager"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-2 italic",children:"Maldives Homes Esentepe, Bi' Mola deneyimi için sakin ve dengeli bir ortam sunarak programın etkisini güçlendirir."})]}),l.jsxs("article",{className:"prose prose-lg max-w-none",children:[l.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Maldives Homes"}),l.jsxs("p",{children:[l.jsx("strong",{children:"Maldives Homes"}),", Kıbrıs Esentepe'de bu yaz İpek Kabidan hanımın rehberliğinde planlanan"," ",l.jsx("a",{href:"/egitim/bi-mola",className:"text-primary hover:underline",children:"Bi' Mola deneyimine"})," ","ev sahipliği yaparak tatil, farkındalık ve ailece kaliteli zaman ihtiyacını bir araya getiren özel bir buluşma alanına dönüşüyor."," ",l.jsx("strong",{children:"Maldives Homes"})," lokasyonunda gerçekleşecek bu özel programda, yetişkinler için ayrı bir inziva akışı, çocuklar için ise ayrı bir gelişim kampı planlanıyor. Böylece aileler aynı yerde bulunurken herkes kendi ihtiyacına uygun, bağımsız ve özenle hazırlanmış bir deneyimin parçası olabiliyor."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes'ta Bi' Mola deneyimi nasıl bir alan sunuyor?"}),l.jsxs("p",{children:["Bi' Mola, sadece birkaç günlük bir konaklama planı değil; yoğun hayat temposunda kendine alan açmak isteyen yetişkinler ve çocukları için birlikte düşünülmüş özel bir deneyimdir. Kıbrıs'ın dingin atmosferiyle öne çıkan ",l.jsx("strong",{children:"Maldives Homes"}),", bu programın ruhuna uygun bir zemin sunarken katılımcılara hem fiziksel olarak dinlenebilecekleri hem de içsel olarak yavaşlayabilecekleri bir ortam hazırlar."]}),l.jsxs("p",{children:["Buradaki en önemli fark, aynı tarihte ve aynı lokasyonda iki ayrı programın yürütülmesidir. Yetişkinler kendi iç dünyalarına yönelirken çocuklar da gelişimlerini destekleyen özel bir akışla zaman geçirir. Bu yönüyle program, klasik bir tatil planından ayrılır;"," ",l.jsx("em",{children:"hem bireysel alanı hem aile bağını aynı çerçevede destekleyen özel bir yaz deneyimine dönüşür."})]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes'ta yetişkin programı nasıl ilerliyor?"}),l.jsxs("p",{children:[l.jsx("a",{href:"/egitim/bi-mola-gunubirlik",className:"text-primary hover:underline",children:"Yetişkin programı"}),", zihni sakinleştirmeye, bedeni dinlemeye ve iç dengeyi yeniden kurmaya odaklanır. Günlük yaşamın hızında ertelenen içsel ihtiyaçlara alan açmak isteyen katılımcılar için planlanan bu akış, uygulama odaklı ve bütünsel bir deneyim sunar."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-4",children:[l.jsx("li",{children:"Mindfulness ve farkındalık çalışmaları"}),l.jsx("li",{children:"Nefes pratikleri"}),l.jsx("li",{children:"Beden farkındalığı uygulamaları"}),l.jsx("li",{children:"Ses terapisi çalışmaları"}),l.jsx("li",{children:"Ruhsal asana ve içsel denge odaklı buluşmalar"})]}),l.jsxs("p",{children:["Bu programın temel amacı, katılımcının yalnızca dinlenmesi değil; gerçekten durabildiğini, nefes alabildiğini ve yaşamla bağını yeniden hissedebildiğini fark etmesidir."," ",l.jsx("strong",{children:"Maldives Homes"})," atmosferi de bu deneyimi daha derin ve daha etkili hale getiren önemli unsurlardan biridir."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes deneyiminde çocuklar için nasıl bir kamp planlanıyor?"}),l.jsxs("p",{children:["Bi' Mola'nın en özel taraflarından biri, çocuklu ailelerin ihtiyaçlarının da aynı özenle düşünülmüş olmasıdır. Çocuklara özel gelişim kampında, onların dikkat, odak ve hafıza becerilerini desteklemeyi hedefleyen çalışmalar; hareket, oyun ve üretimle zenginleştirilmiş bir program yapısı içinde sunulur. Detaylı içerik için"," ",l.jsx("a",{href:"/egitim/bi-mola-gunubirlik-cocuk-6-14-yas",className:"text-primary hover:underline",children:"çocuk programını inceleyebilirsiniz"}),"."]}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-4",children:[l.jsx("li",{children:"Dikkat ve odak gelişimini destekleyen zihin egzersizleri"}),l.jsx("li",{children:"Hafıza çalışmaları"}),l.jsx("li",{children:"Yoga ve spor etkinlikleri"}),l.jsx("li",{children:"Masal dinletileri"}),l.jsx("li",{children:"Ritim terapisi uygulamaları"}),l.jsx("li",{children:"Oyunlar ve çeşitli gelişim aktiviteleri"})]}),l.jsxs("p",{children:["Buradaki önemli nokta, çocuk programının yetişkin akışından tamamen bağımsız ilerlemesidir. Yani ebeveyn kendine alan açarken çocuğu da kendi yaşına, gelişimine ve ilgisine uygun biçimde hazırlanmış nitelikli bir programın içinde bulunur. Bu sayede aileler, ",l.jsx("strong",{children:"Maldives Homes"})," lokasyonunda aynı yerde ama herkesin kendi yolculuğuna saygı duyan özel bir deneyim yaşar."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes Kıbrıs Esentepe lokasyonu neden dikkat çekiyor?"}),l.jsxs("p",{children:[l.jsx("strong",{children:"Maldives Homes"})," isminin aratılıyor olması da gösteriyor ki burası yalnızca bir konaklama noktası olarak değil, özel deneyimler için tercih edilen dikkat çekici bir lokasyon olarak öne çıkıyor. Esentepe, Kıbrıs'ın daha sakin, nefes aldıran ve şehir gürültüsünden uzaklaşmaya yardımcı olan atmosferiyle böyle bir program için güçlü bir zemin oluşturur."]}),l.jsxs("p",{children:["Bi' Mola gibi hem içsel dengeyi hem ailece geçirilen zamanı önemseyen bir deneyim için lokasyon seçimi kritik bir detaydır. Katılımcı, yalnızca etkinlik akışına değil, bulunduğu çevrenin etkisine de ihtiyaç duyar. Bu nedenle"," ",l.jsx("strong",{children:"Maldives Homes Kıbrıs"}),", yazın yavaşlamak, nefes almak ve yenilenmek isteyenler için anlamlı bir buluşma noktası haline gelir."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes kimler için doğru bir tercih olabilir?"}),l.jsx("p",{children:"Bu program, yalnızca kısa bir kaçamak arayanlara değil; son dönemde kendini yorgun, dağılmış, zihinsel olarak kalabalık ya da içsel olarak uzak hisseden yetişkinlere hitap eder. Aynı zamanda çocuğuyla birlikte kaliteli bir yaz deneyimi yaşamak isteyen, fakat herkesin kendi ihtiyacına göre ayrışan bir düzen arayan aileler için de oldukça uygundur."}),l.jsxs("p",{children:["İster tek başınıza katılın, ister çocuğunuzla birlikte gelin; Bi' Mola, herkesin kendi alanında güçlenmesine imkân tanıyan bir çerçeve sunar. Program yaklaşımını ve bu yolculuğun arka planını daha yakından görmek isterseniz"," ",l.jsx("a",{href:"/ipek-kabidan",className:"text-primary hover:underline",children:"İpek Kabidan"})," ","sayfasını inceleyebilirsiniz."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes program tarihleri ve katılım detayları"}),l.jsx("p",{children:"Bi' Mola, sınırlı kontenjanla planlanan ve erken iletişimin önemli olduğu özel bir yaz organizasyonudur. Katılmayı düşünenler için temel bilgiler aşağıdaki gibidir:"}),l.jsxs("ul",{className:"list-disc pl-6 space-y-2 my-4",children:[l.jsx("li",{children:"Tarih: 5–7 Haziran"}),l.jsx("li",{children:"Lokasyon: Maldives Homes, Esentepe – Kıbrıs"}),l.jsx("li",{children:"Program yapısı: Aynı tarihte, aynı lokasyonda iki bağımsız program"}),l.jsx("li",{children:"Katılım seçeneği: Tek başına veya çocukla birlikte katılım"}),l.jsx("li",{children:"Kontenjan: Sınırlı"})]}),l.jsxs("p",{children:["Program detayları, katılım süreci ve erken rezervasyon hakkında bilgi almak için"," ",l.jsx("a",{href:"/iletisim",className:"text-primary hover:underline",children:"iletişim sayfası"})," ","üzerinden doğrudan ulaşabilirsiniz."]}),l.jsx("h2",{className:"text-2xl font-semibold text-foreground mt-10 mb-4",children:"Maldives Homes'ta bu yaz kendinize gerçekten bir mola verebilir misiniz?"}),l.jsx("p",{children:"Bazen ihtiyaç duyulan şey uzun bir kaçış değil; doğru yerde, doğru akışla, kısa ama etkisi güçlü bir duruştur. Bi' Mola tam da bu ihtiyaca cevap veren bir program olarak, yetişkinler için içsel dengeyi, çocuklar için ise gelişim odaklı bir süreci aynı çatı altında buluşturuyor."}),l.jsxs("p",{children:[l.jsx("strong",{children:"Maldives Homes"})," lokasyonunda gerçekleşecek bu özel buluşma, yazı sadece tatille değil; farkındalık, bağ kurma ve yenilenme duygusuyla hatırlamak isteyenler için güçlü bir seçenek sunuyor. Siz de detayları öğrenmek ve kontenjan durumunu netleştirmek için"," ",l.jsx("a",{href:"/iletisim",className:"text-primary hover:underline",children:"iletişim sayfasına"})," ","geçebilirsiniz."]})]})]})})]})}function wIe(){const[e,t]=w.useState(!1),n=bi().pathname.startsWith("/egitim/");return w.useEffect(()=>{const i=setTimeout(()=>t(!0),2e3),a=setTimeout(()=>t(!1),8e3);return()=>{clearTimeout(i),clearTimeout(a)}},[]),l.jsxs("div",{className:"fixed ".concat(n?"bottom-24 md:bottom-6":"bottom-6"," right-6 z-50 flex flex-col items-end gap-2"),children:[e&&l.jsxs("div",{className:"relative bg-white text-foreground text-sm px-4 py-2.5 rounded-xl shadow-lg animate-fade-in flex items-center gap-2 max-w-[220px]",children:[l.jsx("span",{children:"Yardım için bize ulaşın 👋"}),l.jsx("button",{onClick:()=>t(!1),className:"text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Kapat",children:l.jsx(yn,{size:14})}),l.jsx("div",{className:"absolute -bottom-1.5 right-6 w-3 h-3 bg-white rotate-45 shadow-sm"})]}),l.jsx("a",{href:"https://wa.me/905338629433",target:"_blank",rel:"noopener noreferrer",className:"w-14 h-14 bg-[#25D366] hover:bg-[#1ebe57] text-white rounded-full flex items-center justify-center shadow-lg hover:shadow-xl transition-all hover:scale-110","aria-label":"WhatsApp ile iletişime geç",children:l.jsx(xS,{size:28,fill:"white",stroke:"white"})})]})}const lD="msa_session_id",cD="msa_session_country";function kIe(){var e,t;try{let r=sessionStorage.getItem(lD);return r||(r=(t=(e=crypto.randomUUID)==null?void 0:e.call(crypto))!=null?t:"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),sessionStorage.setItem(lD,r)),r}catch(r){return"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2))}}function _Ie(){const e=navigator.userAgent||"";return/Tablet|iPad/i.test(e)?"tablet":/Mobi|Android|iPhone|iPod/i.test(e)?"mobile":"desktop"}function jIe(){return T(this,null,function*(){try{const e=sessionStorage.getItem(cD);if(e)return e;const t=yield fetch("https://ipapi.co/country/");if(!t.ok)return null;const r=(yield t.text()).trim().slice(0,4);if(r&&/^[A-Z]{2}$/.test(r))return sessionStorage.setItem(cD,r),r}catch(e){}return null})}function SIe(){const e=bi(),t=w.useRef("");w.useEffect(()=>{const r=e.pathname+e.search;r!==t.current&&(t.current=r,!e.pathname.startsWith("/admin")&&T(this,null,function*(){const n=kIe(),i=document.referrer||null;let a=null;if(i)try{const s=new URL(i);s.hostname&&s.hostname!==window.location.hostname&&(a=s.hostname.replace(/^www\./,""))}catch(s){}const o=yield jIe();yield Q.from("page_views").insert({session_id:n,path:r,referrer:i,referrer_host:a,country:o,device:_Ie(),user_agent:navigator.userAgent.slice(0,500)})}))},[e.pathname,e.search])}const EIe=new rX;function NIe(){return SIe(),null}const CIe=()=>l.jsx(oX,{client:EIe,children:l.jsxs(IY,{children:[l.jsx(vq,{}),l.jsx(Xq,{}),l.jsx(pJ,{children:l.jsxs(mee,{children:[l.jsx(gae,{}),l.jsx(NIe,{}),l.jsx(pae,{}),l.jsx(yae,{}),l.jsxs(oJ,{children:[l.jsx(wt,{path:"/",element:l.jsx(Zae,{})}),l.jsx(wt,{path:"/egitimler",element:l.jsx(toe,{})}),l.jsx(wt,{path:"/egitim/:slug",element:l.jsx(jse,{})}),l.jsx(wt,{path:"/kategori/:slug",element:l.jsx(cIe,{})}),l.jsx(wt,{path:"/hakkimizda",element:l.jsx(Sse,{})}),l.jsx(wt,{path:"/ipek-kabidan",element:l.jsx(lIe,{})}),l.jsx(wt,{path:"/sss",element:l.jsx(Ese,{})}),l.jsx(wt,{path:"/iletisim",element:l.jsx(Nse,{})}),l.jsx(wt,{path:"/giris",element:l.jsx(Cse,{})}),l.jsx(wt,{path:"/kayit",element:l.jsx(Tse,{})}),l.jsx(wt,{path:"/sifremi-unuttum",element:l.jsx(Ase,{})}),l.jsx(wt,{path:"/sifre-sifirla",element:l.jsx(Pse,{})}),l.jsx(wt,{path:"/panel",element:l.jsx(Ose,{})}),l.jsx(wt,{path:"/admin",element:l.jsx(sIe,{})}),l.jsx(wt,{path:"/dogrula",element:l.jsx(dIe,{})}),l.jsx(wt,{path:"/unsubscribe",element:l.jsx(fIe,{})}),l.jsx(wt,{path:"/odeme-basarili",element:l.jsx(hIe,{})}),l.jsx(wt,{path:"/blog",element:l.jsx(pIe,{})}),l.jsx(wt,{path:"/blog/:slug",element:l.jsx(mIe,{})}),l.jsx(wt,{path:"/cocukla-kibris-tatili",element:l.jsx(gIe,{})}),l.jsx(wt,{path:"/inziva-kampi-kibris",element:l.jsx(yIe,{})}),l.jsx(wt,{path:"/kibris-etkinlik",element:l.jsx(vIe,{})}),l.jsx(wt,{path:"/maldives-homes-kibris",element:l.jsx(bIe,{})}),l.jsx(wt,{path:"*",element:l.jsx(uIe,{})})]}),l.jsx(mae,{}),l.jsx(wIe,{})]})})]})});WL(document.getElementById("root")).render(l.jsx(ZL,{children:l.jsx(CIe,{})}))});export default TIe();