From c33563f5b8e183e9f8c1be6dabcf1eb091ab2162 Mon Sep 17 00:00:00 2001 From: ManuelPalenzuelaDD <144776385+ManuelPalenzuelaDD@users.noreply.github.com> Date: Thu, 11 Jul 2024 07:18:29 +0000 Subject: Deploying to gh-pages from @ Baitinq/fs-tracer-frontend@2eccd5eb475b3b9f6080ce8d70189b5da2b531fb 🚀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/index-UMxFBXiZ.js | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 assets/index-UMxFBXiZ.js (limited to 'assets/index-UMxFBXiZ.js') diff --git a/assets/index-UMxFBXiZ.js b/assets/index-UMxFBXiZ.js new file mode 100644 index 0000000..b7e2c08 --- /dev/null +++ b/assets/index-UMxFBXiZ.js @@ -0,0 +1,85 @@ +var _R=Object.defineProperty;var ER=(e,t,n)=>t in e?_R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var j=(e,t,n)=>ER(e,typeof t!="symbol"?t+"":t,n);function SR(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(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 r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function CR(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var bw={exports:{}},Xd={},yw={exports:{}},ie={};/** + * @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 Cl=Symbol.for("react.element"),kR=Symbol.for("react.portal"),PR=Symbol.for("react.fragment"),TR=Symbol.for("react.strict_mode"),RR=Symbol.for("react.profiler"),MR=Symbol.for("react.provider"),FR=Symbol.for("react.context"),AR=Symbol.for("react.forward_ref"),OR=Symbol.for("react.suspense"),BR=Symbol.for("react.memo"),IR=Symbol.for("react.lazy"),G$=Symbol.iterator;function LR(e){return e===null||typeof e!="object"?null:(e=G$&&e[G$]||e["@@iterator"],typeof e=="function"?e:null)}var $w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xw=Object.assign,ww={};function Es(e,t,n){this.props=e,this.context=t,this.refs=ww,this.updater=n||$w}Es.prototype.isReactComponent={};Es.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")};Es.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dw(){}Dw.prototype=Es.prototype;function a3(e,t,n){this.props=e,this.context=t,this.refs=ww,this.updater=n||$w}var s3=a3.prototype=new Dw;s3.constructor=a3;xw(s3,Es.prototype);s3.isPureReactComponent=!0;var Z$=Array.isArray,_w=Object.prototype.hasOwnProperty,o3={current:null},Ew={key:!0,ref:!0,__self:!0,__source:!0};function Sw(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)_w.call(t,r)&&!Ew.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1>>1,Q=A[X];if(0>>1;Xi(lt,N))xei(W,lt)?(A[X]=W,A[xe]=N,X=xe):(A[X]=lt,A[$e]=N,X=$e);else if(xei(W,N))A[X]=W,A[xe]=N,X=xe;else break e}}return B}function i(A,B){var N=A.sortIndex-B.sortIndex;return N!==0?N:A.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(A){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=A)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function w(A){if(g=!1,$(A),!p)if(n(l)!==null)p=!0,O(D);else{var B=n(u);B!==null&&C(w,B.startTime-A)}}function D(A,B){p=!1,g&&(g=!1,v(x),x=-1),h=!0;var N=f;try{for($(B),d=n(l);d!==null&&(!(d.expirationTime>B)||A&&!E());){var X=d.callback;if(typeof X=="function"){d.callback=null,f=d.priorityLevel;var Q=X(d.expirationTime<=B);B=e.unstable_now(),typeof Q=="function"?d.callback=Q:d===n(l)&&r(l),$(B)}else r(l);d=n(l)}if(d!==null)var je=!0;else{var $e=n(u);$e!==null&&C(w,$e.startTime-B),je=!1}return je}finally{d=null,f=N,h=!1}}var S=!1,k=null,x=-1,T=5,P=-1;function E(){return!(e.unstable_now()-PA||125X?(A.sortIndex=N,t(u,A),n(l)===null&&A===n(u)&&(g?(v(x),x=-1):g=!0,C(w,N-X))):(A.sortIndex=Q,t(l,A),p||h||(p=!0,O(D))),A},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(A){var B=f;return function(){var N=f;f=B;try{return A.apply(this,arguments)}finally{f=N}}}})(Rw);Tw.exports=Rw;var ZR=Tw.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 XR=y,on=ZR;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_p=Object.prototype.hasOwnProperty,QR=/^[: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]*$/,Q$={},J$={};function JR(e){return _p.call(J$,e)?!0:_p.call(Q$,e)?!1:QR.test(e)?J$[e]=!0:(Q$[e]=!0,!1)}function eM(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tM(e,t,n,r){if(t===null||typeof t>"u"||eM(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gt[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gt[e]=new Ot(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){gt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var u3=/[\-:]([a-z])/g;function c3(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(u3,c3);gt[t]=new Ot(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(u3,c3);gt[t]=new Ot(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(u3,c3);gt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});gt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function d3(e,t,n,r){var i=gt.hasOwnProperty(t)?gt[t]:null;(i!==null?i.type!==0:r||!(2o||i[s]!==a[o]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{Xf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ao(e):""}function nM(e){switch(e.tag){case 5:return ao(e.type);case 16:return ao("Lazy");case 13:return ao("Suspense");case 19:return ao("SuspenseList");case 0:case 2:case 15:return e=Qf(e.type,!1),e;case 11:return e=Qf(e.type.render,!1),e;case 1:return e=Qf(e.type,!0),e;default:return""}}function kp(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 Oa:return"Fragment";case Aa:return"Portal";case Ep:return"Profiler";case f3:return"StrictMode";case Sp:return"Suspense";case Cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Aw:return(e.displayName||"Context")+".Consumer";case Fw:return(e._context.displayName||"Context")+".Provider";case h3:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p3:return t=e.displayName||null,t!==null?t:kp(e.type)||"Memo";case Ar:t=e._payload,e=e._init;try{return kp(e(t))}catch{}}return null}function rM(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 kp(t);case 8:return t===f3?"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 ai(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function iM(e){var t=Bw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kl(e){e._valueTracker||(e._valueTracker=iM(e))}function Iw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pp(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ai(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lw(e,t){t=t.checked,t!=null&&d3(e,"checked",t,!1)}function Tp(e,t){Lw(e,t);var n=ai(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Rp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Rp(e,t.type,ai(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Rp(e,t,n){(t!=="number"||pc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var so=Array.isArray;function Ga(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wo={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},aM=["Webkit","ms","Moz","O"];Object.keys(wo).forEach(function(e){aM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wo[t]=wo[e]})});function Vw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wo.hasOwnProperty(e)&&wo[e]?(""+t).trim():t+"px"}function Ww(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Vw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var sM=Ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ap(e,t){if(t){if(sM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Op(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 Bp=null;function m3(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ip=null,Za=null,Xa=null;function ax(e){if(e=Tl(e)){if(typeof Ip!="function")throw Error(L(280));var t=e.stateNode;t&&(t=nf(t),Ip(e.stateNode,e.type,t))}}function Uw(e){Za?Xa?Xa.push(e):Xa=[e]:Za=e}function Hw(){if(Za){var e=Za,t=Xa;if(Xa=Za=null,ax(e),t)for(e=0;e>>=0,e===0?32:31-(vM(e)/bM|0)|0}var ql=64,Gl=4194304;function oo(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 bc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=oo(o):(a&=s,a!==0&&(r=oo(a)))}else s=n&~i,s!==0?r=oo(s):a!==0&&(r=oo(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function kl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-On(t),e[t]=n}function wM(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=_o),px=" ",mx=!1;function dD(e,t){switch(e){case"keyup":return ZM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fD(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ba=!1;function QM(e,t){switch(e){case"compositionend":return fD(t);case"keypress":return t.which!==32?null:(mx=!0,px);case"textInput":return e=t.data,e===px&&mx?null:e;default:return null}}function JM(e,t){if(Ba)return e==="compositionend"||!D3&&dD(e,t)?(e=uD(),Yu=$3=zr=null,Ba=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yx(n)}}function gD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vD(){for(var e=window,t=pc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pc(e.document)}return t}function _3(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 lF(e){var t=vD(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gD(n.ownerDocument.documentElement,n)){if(r!==null&&_3(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=$x(n,a);var s=$x(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ia=null,Wp=null,So=null,Up=!1;function xx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Up||Ia==null||Ia!==pc(r)||(r=Ia,"selectionStart"in r&&_3(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),So&&qo(So,r)||(So=r,r=xc(Wp,"onSelect"),0ja||(e.current=Zp[ja],Zp[ja]=null,ja--)}function Ee(e,t){ja++,Zp[ja]=e.current,e.current=t}var si={},kt=hi(si),Yt=hi(!1),Zi=si;function fs(e,t){var n=e.type.contextTypes;if(!n)return si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qt(e){return e=e.childContextTypes,e!=null}function Dc(){Pe(Yt),Pe(kt)}function kx(e,t,n){if(kt.current!==si)throw Error(L(168));Ee(kt,t),Ee(Yt,n)}function SD(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,rM(e)||"Unknown",i));return Ne({},n,r)}function _c(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||si,Zi=kt.current,Ee(kt,e),Ee(Yt,Yt.current),!0}function Px(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=SD(e,t,Zi),r.__reactInternalMemoizedMergedChildContext=e,Pe(Yt),Pe(kt),Ee(kt,e)):Pe(Yt),Ee(Yt,n)}var lr=null,rf=!1,fh=!1;function CD(e){lr===null?lr=[e]:lr.push(e)}function $F(e){rf=!0,CD(e)}function pi(){if(!fh&&lr!==null){fh=!0;var e=0,t=ge;try{var n=lr;for(ge=1;e>=s,i-=s,dr=1<<32-On(t)+i|n<x?(T=k,k=null):T=k.sibling;var P=f(v,k,$[x],w);if(P===null){k===null&&(k=T);break}e&&k&&P.alternate===null&&t(v,k),m=a(P,m,x),S===null?D=P:S.sibling=P,S=P,k=T}if(x===$.length)return n(v,k),Ae&&Ci(v,x),D;if(k===null){for(;x<$.length;x++)k=d(v,$[x],w),k!==null&&(m=a(k,m,x),S===null?D=k:S.sibling=k,S=k);return Ae&&Ci(v,x),D}for(k=r(v,k);x<$.length;x++)T=h(k,v,x,$[x],w),T!==null&&(e&&T.alternate!==null&&k.delete(T.key===null?x:T.key),m=a(T,m,x),S===null?D=T:S.sibling=T,S=T);return e&&k.forEach(function(E){return t(v,E)}),Ae&&Ci(v,x),D}function g(v,m,$,w){var D=Os($);if(typeof D!="function")throw Error(L(150));if($=D.call($),$==null)throw Error(L(151));for(var S=D=null,k=m,x=m=0,T=null,P=$.next();k!==null&&!P.done;x++,P=$.next()){k.index>x?(T=k,k=null):T=k.sibling;var E=f(v,k,P.value,w);if(E===null){k===null&&(k=T);break}e&&k&&E.alternate===null&&t(v,k),m=a(E,m,x),S===null?D=E:S.sibling=E,S=E,k=T}if(P.done)return n(v,k),Ae&&Ci(v,x),D;if(k===null){for(;!P.done;x++,P=$.next())P=d(v,P.value,w),P!==null&&(m=a(P,m,x),S===null?D=P:S.sibling=P,S=P);return Ae&&Ci(v,x),D}for(k=r(v,k);!P.done;x++,P=$.next())P=h(k,v,x,P.value,w),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?x:P.key),m=a(P,m,x),S===null?D=P:S.sibling=P,S=P);return e&&k.forEach(function(F){return t(v,F)}),Ae&&Ci(v,x),D}function b(v,m,$,w){if(typeof $=="object"&&$!==null&&$.type===Oa&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case Hl:e:{for(var D=$.key,S=m;S!==null;){if(S.key===D){if(D=$.type,D===Oa){if(S.tag===7){n(v,S.sibling),m=i(S,$.props.children),m.return=v,v=m;break e}}else if(S.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Ar&&Mx(D)===S.type){n(v,S.sibling),m=i(S,$.props),m.ref=js(v,S,$),m.return=v,v=m;break e}n(v,S);break}else t(v,S);S=S.sibling}$.type===Oa?(m=Ki($.props.children,v.mode,w,$.key),m.return=v,v=m):(w=tc($.type,$.key,$.props,null,v.mode,w),w.ref=js(v,m,$),w.return=v,v=w)}return s(v);case Aa:e:{for(S=$.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===$.containerInfo&&m.stateNode.implementation===$.implementation){n(v,m.sibling),m=i(m,$.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=$h($,v.mode,w),m.return=v,v=m}return s(v);case Ar:return S=$._init,b(v,m,S($._payload),w)}if(so($))return p(v,m,$,w);if(Os($))return g(v,m,$,w);nu(v,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,m!==null&&m.tag===6?(n(v,m.sibling),m=i(m,$),m.return=v,v=m):(n(v,m),m=yh($,v.mode,w),m.return=v,v=m),s(v)):n(v,m)}return b}var ps=RD(!0),MD=RD(!1),Cc=hi(null),kc=null,Wa=null,k3=null;function P3(){k3=Wa=kc=null}function T3(e){var t=Cc.current;Pe(Cc),e._currentValue=t}function Jp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ja(e,t){kc=e,k3=Wa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kt=!0),e.firstContext=null)}function _n(e){var t=e._currentValue;if(k3!==e)if(e={context:e,memoizedValue:t,next:null},Wa===null){if(kc===null)throw Error(L(308));Wa=e,kc.dependencies={lanes:0,firstContext:e}}else Wa=Wa.next=e;return t}var Ni=null;function R3(e){Ni===null?Ni=[e]:Ni.push(e)}function FD(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,R3(t)):(n.next=i.next,i.next=n),t.interleaved=n,xr(e,r)}function xr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Or=!1;function M3(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function AD(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 br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ue&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,xr(e,n)}return i=r.interleaved,i===null?(t.next=t,R3(r)):(t.next=i.next,i.next=t),r.interleaved=t,xr(e,n)}function Gu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v3(e,n)}}function Fx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Pc(e,t,n,r){var i=e.updateQueue;Or=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,s===null?a=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==s&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=i.baseState;s=0,c=u=l=null,o=a;do{var f=o.lane,h=o.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,g=o;switch(f=t,h=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=Ne({},d,f);break e;case 2:Or=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ji|=s,e.lanes=s,e.memoizedState=d}}function Ax(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ph.transition;ph.transition={};try{e(!1),t()}finally{ge=n,ph.transition=r}}function XD(){return En().memoizedState}function _F(e,t,n){var r=ti(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},QD(e))JD(t,n);else if(n=FD(e,t,n,r),n!==null){var i=Mt();Bn(n,e,r,i),e_(n,t,r)}}function EF(e,t,n){var r=ti(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(QD(e))JD(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Ln(o,s)){var l=t.interleaved;l===null?(i.next=i,R3(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FD(e,t,i,r),n!==null&&(i=Mt(),Bn(n,e,r,i),e_(n,t,r))}}function QD(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function JD(e,t){Co=Rc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function e_(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,v3(e,n)}}var Mc={readContext:_n,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},SF={readContext:_n,useCallback:function(e,t){return Un().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:Bx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xu(4194308,4,KD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xu(4,2,e,t)},useMemo:function(e,t){var n=Un();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Un();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_F.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=Un();return e={current:e},t.memoizedState=e},useState:Ox,useDebugValue:j3,useDeferredValue:function(e){return Un().memoizedState=e},useTransition:function(){var e=Ox(!1),t=e[0];return e=DF.bind(null,e[1]),Un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Le,i=Un();if(Ae){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ft===null)throw Error(L(349));Qi&30||LD(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Bx(jD.bind(null,r,a,e),[e]),r.flags|=2048,nl(9,ND.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Un(),t=ft.identifierPrefix;if(Ae){var n=fr,r=dr;n=(r&~(1<<32-On(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Kn]=t,e[Xo]=r,c_(e,t,!1,!1),t.stateNode=e;e:{switch(s=Op(n,r),n){case"dialog":ke("cancel",e),ke("close",e),i=r;break;case"iframe":case"object":case"embed":ke("load",e),i=r;break;case"video":case"audio":for(i=0;ivs&&(t.flags|=128,r=!0,zs(a,!1),t.lanes=4194304)}else{if(!r)if(e=Tc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Ae)return xt(t),null}else 2*Ye()-a.renderingStartTime>vs&&n!==1073741824&&(t.flags|=128,r=!0,zs(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,n=Ie.current,Ee(Ie,r?n&1|2:n&1),t):(xt(t),null);case 22:case 23:return K3(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tn&1073741824&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function AF(e,t){switch(S3(t),t.tag){case 1:return qt(t.type)&&Dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ms(),Pe(Yt),Pe(kt),O3(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return A3(t),null;case 13:if(Pe(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Ie),null;case 4:return ms(),null;case 10:return T3(t.type._context),null;case 22:case 23:return K3(),null;case 24:return null;default:return null}}var iu=!1,Et=!1,OF=typeof WeakSet=="function"?WeakSet:Set,U=null;function Ua(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function lm(e,t,n){try{n()}catch(r){ze(e,t,r)}}var Yx=!1;function BF(e,t){if(Hp=yc,e=vD(),_3(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==a||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(o=s),f===a&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kp={focusedElem:e,selectionRange:n},yc=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,b=p.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Pn(t.type,g),b);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var $=t.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(w){ze(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return p=Yx,Yx=!1,p}function ko(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&lm(t,n,a)}i=i.next}while(i!==r)}}function of(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function um(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function h_(e){var t=e.alternate;t!==null&&(e.alternate=null,h_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kn],delete t[Xo],delete t[Gp],delete t[bF],delete t[yF])),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 p_(e){return e.tag===5||e.tag===3||e.tag===4}function qx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||p_(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 cm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wc));else if(r!==4&&(e=e.child,e!==null))for(cm(e,t,n),e=e.sibling;e!==null;)cm(e,t,n),e=e.sibling}function dm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dm(e,t,n),e=e.sibling;e!==null;)dm(e,t,n),e=e.sibling}var ht=null,Tn=!1;function kr(e,t,n){for(n=n.child;n!==null;)m_(e,t,n),n=n.sibling}function m_(e,t,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(Qd,n)}catch{}switch(n.tag){case 5:Et||Ua(n,t);case 6:var r=ht,i=Tn;ht=null,kr(e,t,n),ht=r,Tn=i,ht!==null&&(Tn?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(Tn?(e=ht,n=n.stateNode,e.nodeType===8?dh(e.parentNode,n):e.nodeType===1&&dh(e,n),Ko(e)):dh(ht,n.stateNode));break;case 4:r=ht,i=Tn,ht=n.stateNode.containerInfo,Tn=!0,kr(e,t,n),ht=r,Tn=i;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&lm(n,t,s),i=i.next}while(i!==r)}kr(e,t,n);break;case 1:if(!Et&&(Ua(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ze(n,t,o)}kr(e,t,n);break;case 21:kr(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,kr(e,t,n),Et=r):kr(e,t,n);break;default:kr(e,t,n)}}function Gx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OF),t.forEach(function(r){var i=HF.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Cn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*LF(r/1960))-r,10e?16:e,Vr===null)var r=!1;else{if(e=Vr,Vr=null,Oc=0,ue&6)throw Error(L(331));var i=ue;for(ue|=4,U=e.current;U!==null;){var a=U,s=a.child;if(U.flags&16){var o=a.deletions;if(o!==null){for(var l=0;lYe()-U3?Hi(e,0):W3|=n),Gt(e,t)}function D_(e,t){t===0&&(e.mode&1?(t=Gl,Gl<<=1,!(Gl&130023424)&&(Gl=4194304)):t=1);var n=Mt();e=xr(e,t),e!==null&&(kl(e,t,n),Gt(e,n))}function UF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),D_(e,n)}function HF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),D_(e,n)}var __;__=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yt.current)Kt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Kt=!1,MF(e,t,n);Kt=!!(e.flags&131072)}else Kt=!1,Ae&&t.flags&1048576&&kD(t,Sc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qu(e,t),e=t.pendingProps;var i=fs(t,kt.current);Ja(t,n),i=I3(null,t,r,e,i,n);var a=L3();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,qt(r)?(a=!0,_c(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,M3(t),i.updater=sf,t.stateNode=i,i._reactInternals=t,tm(t,r,e,n),t=im(null,t,r,!0,a,n)):(t.tag=0,Ae&&a&&E3(t),Tt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=YF(r),e=Pn(r,e),i){case 0:t=rm(null,t,r,e,n);break e;case 1:t=Ux(null,t,r,e,n);break e;case 11:t=Vx(null,t,r,e,n);break e;case 14:t=Wx(null,t,r,Pn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),rm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Ux(e,t,r,i,n);case 3:e:{if(o_(t),e===null)throw Error(L(387));r=t.pendingProps,a=t.memoizedState,i=a.element,AD(e,t),Pc(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=gs(Error(L(423)),t),t=Hx(e,t,r,n,i);break e}else if(r!==i){i=gs(Error(L(424)),t),t=Hx(e,t,r,n,i);break e}else for(rn=Qr(t.stateNode.containerInfo.firstChild),sn=t,Ae=!0,Mn=null,n=MD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hs(),r===i){t=wr(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return OD(t),e===null&&Qp(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,Yp(r,i)?s=null:a!==null&&Yp(r,a)&&(t.flags|=32),s_(e,t),Tt(e,t,s,n),t.child;case 6:return e===null&&Qp(t),null;case 13:return l_(e,t,n);case 4:return F3(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ps(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Vx(e,t,r,i,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ee(Cc,r._currentValue),r._currentValue=s,a!==null)if(Ln(a.value,s)){if(a.children===i.children&&!Yt.current){t=wr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=br(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Jp(a.return,n,t),o.lanes|=n;break}l=l.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(L(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Jp(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Tt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ja(t,n),i=_n(i),r=r(i),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,i=Pn(r,t.pendingProps),i=Pn(r.type,i),Wx(e,t,r,i,n);case 15:return i_(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Qu(e,t),t.tag=1,qt(r)?(e=!0,_c(t)):e=!1,Ja(t,n),t_(t,r,i),tm(t,r,i,n),im(null,t,r,!0,e,n);case 19:return u_(e,t,n);case 22:return a_(e,t,n)}throw Error(L(156,t.tag))};function E_(e,t){return Qw(e,t)}function KF(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(e,t,n,r){return new KF(e,t,n,r)}function q3(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YF(e){if(typeof e=="function")return q3(e)?1:0;if(e!=null){if(e=e.$$typeof,e===h3)return 11;if(e===p3)return 14}return 2}function ni(e,t){var n=e.alternate;return n===null?(n=$n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function tc(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")q3(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Oa:return Ki(n.children,i,a,t);case f3:s=8,i|=8;break;case Ep:return e=$n(12,n,t,i|2),e.elementType=Ep,e.lanes=a,e;case Sp:return e=$n(13,n,t,i),e.elementType=Sp,e.lanes=a,e;case Cp:return e=$n(19,n,t,i),e.elementType=Cp,e.lanes=a,e;case Ow:return uf(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fw:s=10;break e;case Aw:s=9;break e;case h3:s=11;break e;case p3:s=14;break e;case Ar:s=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=$n(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ki(e,t,n,r){return e=$n(7,e,r,t),e.lanes=n,e}function uf(e,t,n,r){return e=$n(22,e,r,t),e.elementType=Ow,e.lanes=n,e.stateNode={isHidden:!1},e}function yh(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function $h(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qF(e,t,n,r,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=eh(0),this.expirationTimes=eh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function G3(e,t,n,r,i,a,s,o,l){return e=new qF(e,t,n,o,l),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:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},M3(a),e}function GF(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P_)}catch(e){console.error(e)}}P_(),Pw.exports=un;var T_=Pw.exports;const uo=vw(T_);var r2=T_;Dp.createRoot=r2.createRoot,Dp.hydrateRoot=r2.hydrateRoot;/** + * @remix-run/router v1.17.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 il(){return il=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function R_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tA(){return Math.random().toString(36).substr(2,8)}function a2(e,t){return{usr:e.state,key:e.key,idx:t}}function gm(e,t,n,r){return n===void 0&&(n=null),il({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ks(t):t,{state:n,key:t&&t.key||r||tA()})}function M_(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ks(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function nA(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o=Wr.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(il({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){o=Wr.Pop;let b=c(),v=b==null?null:b-u;u=b,l&&l({action:o,location:g.location,delta:v})}function f(b,v){o=Wr.Push;let m=gm(g.location,b,v);u=c()+1;let $=a2(m,u),w=g.createHref(m);try{s.pushState($,"",w)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(w)}a&&l&&l({action:o,location:g.location,delta:1})}function h(b,v){o=Wr.Replace;let m=gm(g.location,b,v);u=c();let $=a2(m,u),w=g.createHref(m);s.replaceState($,"",w),a&&l&&l({action:o,location:g.location,delta:0})}function p(b){let v=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof b=="string"?b:M_(b);return m=m.replace(/ $/,"%20"),at(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let g={get action(){return o},get location(){return e(i,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(i2,d),l=b,()=>{i.removeEventListener(i2,d),l=null}},createHref(b){return t(i,b)},createURL:p,encodeLocation(b){let v=p(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(b){return s.go(b)}};return g}var s2;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(s2||(s2={}));function rA(e,t,n){return n===void 0&&(n="/"),iA(e,t,n,!1)}function iA(e,t,n,r){let i=typeof t=="string"?ks(t):t,a=O_(i.pathname||"/",n);if(a==null)return null;let s=F_(e);aA(s);let o=null;for(let l=0;o==null&&l{let l={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};l.relativePath.startsWith("/")&&(at(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Yi([r,l.relativePath]),c=n.concat(l);a.children&&a.children.length>0&&(at(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),F_(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:fA(u,a.index),routesMeta:c})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let l of A_(a.path))i(a,s,l)}),t}function A_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=A_(r.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),i&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function aA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hA(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sA=/^:[\w-]+$/,oA=3,lA=2,uA=1,cA=10,dA=-2,o2=e=>e==="*";function fA(e,t){let n=e.split("/"),r=n.length;return n.some(o2)&&(r+=dA),t&&(r+=lA),n.filter(i=>!o2(i)).reduce((i,a)=>i+(sA.test(a)?oA:a===""?uA:cA),r)}function hA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function pA(e,t,n){let{routesMeta:r}=e,i={},a="/",s=[];for(let o=0;o{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=o[d]||"";s=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=o[d];return h&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:s,pattern:e}}function mA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),R_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function gA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return R_(!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 O_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function vA(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ks(e):e;return{pathname:n?n.startsWith("/")?n:bA(n,t):t,search:DA(r),hash:_A(i)}}function bA(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xh(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function yA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $A(e,t){let n=yA(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xA(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=ks(e):(i=il({},e),at(!i.pathname||!i.pathname.includes("?"),xh("?","pathname","search",i)),at(!i.pathname||!i.pathname.includes("#"),xh("#","pathname","hash",i)),at(!i.search||!i.search.includes("#"),xh("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?t[d]:"/"}let l=vA(i,o),u=s&&s!=="/"&&s.endsWith("/"),c=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Yi=e=>e.join("/").replace(/\/\/+/g,"/"),wA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),DA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_A=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function EA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const B_=["post","put","patch","delete"];new Set(B_);const SA=["get",...B_];new Set(SA);/** + * React Router v6.24.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 al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),y.useCallback(function(u,c){if(c===void 0&&(c={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let d=xA(u,JSON.parse(s),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Yi([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,s,a,e])}function PA(e,t){return TA(e,t)}function TA(e,t,n,r){gf()||at(!1);let{navigator:i}=y.useContext(pf),{matches:a}=y.useContext(Ps),s=a[a.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=L_(),c;if(t){var d;let b=typeof t=="string"?ks(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||at(!1),c=b}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let p=rA(e,{pathname:h}),g=OA(p&&p.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:Yi([l,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Yi([l,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,n,r);return t&&g?y.createElement(mf.Provider,{value:{location:al({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Wr.Pop}},g):g}function RA(){let e=NA(),t=EA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const MA=y.createElement(RA,null);class FA extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Ps.Provider,{value:this.props.routeContext},y.createElement(I_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function AA(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(J3);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Ps.Provider,{value:t},r)}function OA(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let c=s.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);c>=0||at(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let h,p=!1,g=null,b=null;n&&(h=o&&d.route.id?o[d.route.id]:void 0,g=d.route.errorElement||MA,l&&(u<0&&f===0?(p=!0,b=null):u===f&&(p=!0,b=d.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,f+1)),m=()=>{let $;return h?$=g:p?$=b:d.route.Component?$=y.createElement(d.route.Component,null):d.route.element?$=d.route.element:$=c,y.createElement(AA,{match:d,routeContext:{outlet:c,matches:v,isDataRoute:n!=null},children:$})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?y.createElement(FA,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:m(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):m()},null)}var j_=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(j_||{}),Lc=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}(Lc||{});function BA(e){let t=y.useContext(J3);return t||at(!1),t}function IA(e){let t=y.useContext(CA);return t||at(!1),t}function LA(e){let t=y.useContext(Ps);return t||at(!1),t}function z_(e){let t=LA(),n=t.matches[t.matches.length-1];return n.route.id||at(!1),n.route.id}function NA(){var e;let t=y.useContext(I_),n=IA(Lc.UseRouteError),r=z_(Lc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function jA(){let{router:e}=BA(j_.UseNavigateStable),t=z_(Lc.UseNavigateStable),n=y.useRef(!1);return N_(()=>{n.current=!0}),y.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,al({fromRouteId:t},a)))},[e,t])}function Ra(e){at(!1)}function zA(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Wr.Pop,navigator:a,static:s=!1,future:o}=e;gf()&&at(!1);let l=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:l,navigator:a,static:s,future:al({v7_relativeSplatPath:!1},o)}),[l,o,a,s]);typeof r=="string"&&(r=ks(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,g=y.useMemo(()=>{let b=O_(c,l);return b==null?null:{location:{pathname:b,search:d,hash:f,state:h,key:p},navigationType:i}},[l,c,d,f,h,p,i]);return g==null?null:y.createElement(pf.Provider,{value:u},y.createElement(mf.Provider,{children:n,value:g}))}function VA(e){let{children:t,location:n}=e;return PA(vm(t),n)}new Promise(()=>{});function vm(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let a=[...t,i];if(r.type===y.Fragment){n.push.apply(n,vm(r.props.children,a));return}r.type!==Ra&&at(!1),!r.props.index||!r.props.children||at(!1);let s={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=vm(r.props.children,a)),n.push(s)}),n}/** + * React Router DOM v6.24.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 + */const WA="6";try{window.__reactRouterVersion=WA}catch{}const UA="startTransition",u2=WR[UA];function HA(e){let{basename:t,children:n,future:r,window:i}=e,a=y.useRef();a.current==null&&(a.current=eA({window:i,v5Compat:!0}));let s=a.current,[o,l]=y.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=y.useCallback(d=>{u&&u2?u2(()=>l(d)):l(d)},[l,u]);return y.useLayoutEffect(()=>s.listen(c),[s,c]),y.createElement(zA,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:s,future:r})}var c2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(c2||(c2={}));var d2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(d2||(d2={}));const KA="modulepreload",YA=function(e,t){return new URL(e,t).href},f2={},bs=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=YA(l,r),l in f2)return;f2[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let h=a.length-1;h>=0;h--){const p=a[h];if(p.href===l&&(!u||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":KA,u||(f.as="script",f.crossOrigin=""),f.href=l,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})},qA=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>bs(async()=>{const{default:r}=await Promise.resolve().then(()=>Ts);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class e$ extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class GA extends e${constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class ZA extends e${constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class XA extends e${constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var bm;(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"})(bm||(bm={}));var QA=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class JA{constructor(t,{headers:n={},customFetch:r,region:i=bm.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=qA(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return QA(this,void 0,void 0,function*(){try{const{headers:i,method:a,body:s}=n;let o={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let u;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",u=s):typeof s=="string"?(o["Content-Type"]="text/plain",u=s):typeof FormData<"u"&&s instanceof FormData?u=s:(o["Content-Type"]="application/json",u=JSON.stringify(s)));const c=yield this.fetch(`${this.url}/${t}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),i),body:u}).catch(p=>{throw new GA(p)}),d=c.headers.get("x-relay-error");if(d&&d==="true")throw new ZA(c);if(!c.ok)throw new XA(c);let f=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),h;return f==="application/json"?h=yield c.json():f==="application/octet-stream"?h=yield c.blob():f==="text/event-stream"?h=c:f==="multipart/form-data"?h=yield c.formData():h=yield c.text(),{data:h,error:null}}catch(i){return{data:null,error:i}}})}}var yn={},t$={},bf={},Ml={},yf={},$f={},eO=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},ys=eO();const tO=ys.fetch,V_=ys.fetch.bind(ys),W_=ys.Headers,nO=ys.Request,rO=ys.Response,Ts=Object.freeze(Object.defineProperty({__proto__:null,Headers:W_,Request:nO,Response:rO,default:V_,fetch:tO},Symbol.toStringTag,{value:"Module"})),iO=CR(Ts);var n$={};Object.defineProperty(n$,"__esModule",{value:!0});class aO extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}}n$.default=aO;var U_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($f,"__esModule",{value:!0});const sO=U_(iO),oO=U_(n$);let lO=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=sO.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{var s,o,l;let u=null,c=null,d=null,f=a.status,h=a.statusText;if(a.ok){if(this.method!=="HEAD"){const v=await a.text();v===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=v:c=JSON.parse(v))}const g=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),b=(o=a.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");g&&b&&b.length>1&&(d=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,d=null,f=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const g=await a.text();try{u=JSON.parse(g),Array.isArray(u)&&a.status===404&&(c=[],u=null,f=200,h="OK")}catch{a.status===404&&g===""?(f=204,h="No Content"):u={message:g}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,f=200,h="OK"),u&&this.shouldThrowOnError)throw new oO.default(u)}return{error:u,data:c,count:d,status:f,statusText:h}});return this.shouldThrowOnError||(i=i.catch(a=>{var s,o,l;return{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(o=a==null?void 0:a.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}};$f.default=lO;var uO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0});const cO=uO($f);let dO=class extends cO.default{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:a=i}={}){const s=a?`${a}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const a=typeof i>"u"?"offset":`${i}.offset`,s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${t}`),this.url.searchParams.set(s,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:i=!1,wal:a=!1,format:s="text"}={}){var o;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,a?"wal":null].filter(Boolean).join("|"),u=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${u}"; options=${l};`,s==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};yf.default=dO;var fO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ml,"__esModule",{value:!0});const hO=fO(yf);let pO=class extends hO.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:i}={}){let a="";i==="plain"?a="pl":i==="phrase"?a="ph":i==="websearch"&&(a="w");const s=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${a}fts${s}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Ml.default=pO;var mO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bf,"__esModule",{value:!0});const Ws=mO(Ml);let gO=class{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=n,this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new Ws.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const i="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),n&&a.push(`count=${n}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const s=t.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(s.length>0){const o=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new Ws.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:a=!0}={}){const s="POST",o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&o.push(this.headers.Prefer),i&&o.push(`count=${i}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const l=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new Ws.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),n&&i.push(`count=${n}`),this.headers.Prefer=i.join(","),new Ws.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Ws.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};bf.default=gO;var xf={},wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.version=void 0;wf.version="0.0.0-automated";Object.defineProperty(xf,"__esModule",{value:!0});xf.DEFAULT_HEADERS=void 0;const vO=wf;xf.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${vO.version}`};var H_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t$,"__esModule",{value:!0});const bO=H_(bf),yO=H_(Ml),$O=xf;let xO=class K_{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=Object.assign(Object.assign({},$O.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new bO.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new K_(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:a}={}){let s;const o=new URL(`${this.url}/rpc/${t}`);let l;r||i?(s=r?"HEAD":"GET",Object.entries(n).filter(([c,d])=>d!==void 0).map(([c,d])=>[c,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([c,d])=>{o.searchParams.append(c,d)})):(s="POST",l=n);const u=Object.assign({},this.headers);return a&&(u.Prefer=`count=${a}`),new yO.default({method:s,url:o,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};t$.default=xO;var Fl=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yn,"__esModule",{value:!0});yn.PostgrestBuilder=yn.PostgrestTransformBuilder=yn.PostgrestFilterBuilder=yn.PostgrestQueryBuilder=yn.PostgrestClient=void 0;const Y_=Fl(t$);yn.PostgrestClient=Y_.default;const q_=Fl(bf);yn.PostgrestQueryBuilder=q_.default;const G_=Fl(Ml);yn.PostgrestFilterBuilder=G_.default;const Z_=Fl(yf);yn.PostgrestTransformBuilder=Z_.default;const X_=Fl($f);yn.PostgrestBuilder=X_.default;var wO=yn.default={PostgrestClient:Y_.default,PostgrestQueryBuilder:q_.default,PostgrestFilterBuilder:G_.default,PostgrestTransformBuilder:Z_.default,PostgrestBuilder:X_.default};const{PostgrestClient:DO,PostgrestQueryBuilder:MG,PostgrestFilterBuilder:FG,PostgrestTransformBuilder:AG,PostgrestBuilder:OG}=wO,_O="2.10.2",EO={"X-Client-Info":`realtime-js/${_O}`},SO="1.0.0",Q_=1e4,CO=1e3;var ts;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ts||(ts={}));var Jt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Jt||(Jt={}));var Rn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Rn||(Rn={}));var ym;(function(e){e.websocket="websocket"})(ym||(ym={}));var Oi;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Oi||(Oi={}));class kO{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),a=n.getUint8(2);let s=this.HEADER_LENGTH+2;const o=r.decode(t.slice(s,s+i));s=s+i;const l=r.decode(t.slice(s,s+a));s=s+a;const u=JSON.parse(r.decode(t.slice(s,t.byteLength)));return{ref:null,topic:o,event:l,payload:u}}}class J_{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}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))}}var we;(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"})(we||(we={}));const h2=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((a,s)=>(a[s]=PO(s,e,t,i),a),{})},PO=(e,t,n,r)=>{const i=t.find(o=>o.name===e),a=i==null?void 0:i.type,s=n[e];return a&&!r.includes(a)?e8(a,s):$m(s)},e8=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return FO(t,n)}switch(e){case we.bool:return TO(t);case we.float4:case we.float8:case we.int2:case we.int4:case we.int8:case we.numeric:case we.oid:return RO(t);case we.json:case we.jsonb:return MO(t);case we.timestamp:return AO(t);case we.abstime:case we.date:case we.daterange:case we.int4range:case we.int8range:case we.money:case we.reltime:case we.text:case we.time:case we.timestamptz:case we.timetz:case we.tsrange:case we.tstzrange:return $m(t);default:return $m(t)}},$m=e=>e,TO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},RO=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},MO=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},FO=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const s=e.slice(1,n);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(o=>e8(t,o))}return e},AO=e=>typeof e=="string"?e.replace(" ","T"):e,t8=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class wh{constructor(t,n,r={},i=Q_){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,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()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var p2;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(p2||(p2={}));class Ro{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ro.syncState(this.state,i,a,s),this.pendingDiffs.forEach(l=>{this.state=Ro.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Ro.syncDiff(this.state,i,a,s),o())}),this.onJoin((i,a,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:s})}),this.onLeave((i,a,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const a=this.cloneDeep(t),s=this.transformState(n),o={},l={};return this.map(a,(u,c)=>{s[u]||(l[u]=c)}),this.map(s,(u,c)=>{const d=a[u];if(d){const f=c.map(b=>b.presence_ref),h=d.map(b=>b.presence_ref),p=c.filter(b=>h.indexOf(b.presence_ref)<0),g=d.filter(b=>f.indexOf(b.presence_ref)<0);p.length>0&&(o[u]=p),g.length>0&&(l[u]=g)}else o[u]=c}),this.syncDiff(a,{joins:o,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:a,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(a,(o,l)=>{var u;const c=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(l),c.length>0){const d=t[o].map(h=>h.presence_ref),f=c.filter(h=>d.indexOf(h.presence_ref)<0);t[o].unshift(...f)}r(o,c,l)}),this.map(s,(o,l)=>{let u=t[o];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[o]=u,i(o,u,l),u.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var m2;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(m2||(m2={}));var g2;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"})(g2||(g2={}));var v2;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(v2||(v2={}));class r${constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Jt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new wh(this,Rn.join,this.params,this.timeout),this.rejoinTimer=new J_(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Jt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Jt.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Rn.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new Ro(this),this.broadcastEndpointURL=t8(this.socket.endPoint)+"/api/broadcast"}subscribe(t,n=this.timeout){var r,i;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:s,private:o}}=this.params;this._onError(c=>t&&t("CHANNEL_ERROR",c)),this._onClose(()=>t&&t("CLOSED"));const l={},u={broadcast:a,presence:s,postgres_changes:(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&i!==void 0?i:[],private:o};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:c})=>{var d;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){t&&t("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,h=(d=f==null?void 0:f.length)!==null&&d!==void 0?d:0,p=[];for(let g=0;g{t&&t("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{t&&t("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:a,payload:s}=t,o={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s}]})};try{const l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=l.body)===null||i===void 0?void 0:i.cancel()),l.ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,o,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(s=this.params)===null||s===void 0?void 0:s.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Jt.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Rn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const i=new wh(this,Rn.leave,{},t);i.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}async _fetchWithTimeout(t,n,r){const i=new AbortController,a=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(a),s}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new wh(this,t,n,r);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,a;const s=t.toLocaleLowerCase(),{close:o,error:l,leave:u,join:c}=Rn;if(r&&[o,l,u,c].indexOf(s)>=0&&r!==this._joinRef())return;let f=this._onMessage(s,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var p,g,b;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((b=(g=h.filter)===null||g===void 0?void 0:g.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===s}).map(h=>h.callback(f,r)):(a=this.bindings[s])===null||a===void 0||a.filter(h=>{var p,g,b,v,m,$;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in h){const w=h.id,D=(p=h.filter)===null||p===void 0?void 0:p.event;return w&&((g=n.ids)===null||g===void 0?void 0:g.includes(w))&&(D==="*"||(D==null?void 0:D.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const w=(m=(v=h==null?void 0:h.filter)===null||v===void 0?void 0:v.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===(($=n==null?void 0:n.event)===null||$===void 0?void 0:$.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===s}).map(h=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:g,table:b,commit_timestamp:v,type:m,errors:$}=p;f=Object.assign(Object.assign({},{schema:g,table:b,commit_timestamp:v,eventType:m,new:{},old:{},errors:$}),this._getPayloadRecords(p))}h.callback(f,r)})}_isClosed(){return this.state===Jt.closed}_isJoined(){return this.state===Jt.joined}_isJoining(){return this.state===Jt.joining}_isLeaving(){return this.state===Jt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),a={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&r$.isEqual(i.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Rn.close,{},t)}_onError(t){this._on(Rn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Jt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=h2(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=h2(t.columns,t.old_record)),n}}const OO=()=>{},BO=typeof WebSocket<"u";class IO{constructor(t,n){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=EO,this.params={},this.timeout=Q_,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=OO,this.conn=null,this.sendBuffer=[],this.serializer=new kO,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let s;return a?s=a:typeof fetch>"u"?s=(...o)=>bs(async()=>{const{default:l}=await Promise.resolve().then(()=>Ts);return{default:l}},void 0,import.meta.url).then(({default:l})=>l(...o)):s=fetch,(...o)=>s(...o)},this.endPoint=`${t}/${ym.websocket}`,this.httpEndpoint=t8(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const i=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(a,s)=>s(JSON.stringify(a)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new J_(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(BO){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new LO(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),bs(async()=>{const{default:t}=await import("./browser-BS6uX-OD.js").then(n=>n.b);return{default:t}},[],import.meta.url).then(({default:t})=>{this.conn=new t(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case ts.connecting:return Oi.Connecting;case ts.open:return Oi.Open;case ts.closing:return Oi.Closing;default:return Oi.Closed}}isConnected(){return this.connectionState()===Oi.Open}channel(t,n={config:{}}){const r=new r$(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:i,ref:a}=t,s=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${n} ${r} (${a})`,i),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(t){this.accessToken=t,this.channels.forEach(n=>{t&&n.updateJoinPayload({access_token:t}),n.joinedOnce&&n._isJoined()&&n._push(Rn.access_token,{access_token:t})})}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",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))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:SO}))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:i,payload:a,ref:s}=n;(s&&s===this.pendingHeartbeatRef||i===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${i} ${s&&"("+s+")"||""}`,a),this.channels.filter(o=>o._isMember(r)).forEach(o=>o._trigger(i,a,s)),this.stateChangeCallbacks.message.forEach(o=>o(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Rn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(CO,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class LO{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=ts.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class i$ extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function _t(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class NO extends i${constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class b2 extends i${constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var jO=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const n8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>bs(async()=>{const{default:r}=await Promise.resolve().then(()=>Ts);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},zO=()=>jO(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield bs(()=>Promise.resolve().then(()=>Ts),void 0,import.meta.url)).Response:Response});var Rs=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const Dh=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),VO=(e,t)=>Rs(void 0,void 0,void 0,function*(){const n=yield zO();e instanceof n?e.json().then(r=>{t(new NO(Dh(r),e.status||500))}).catch(r=>{t(new b2(Dh(r),r))}):t(new b2(Dh(e),e))}),WO=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function Df(e,t,n,r,i,a){return Rs(this,void 0,void 0,function*(){return new Promise((s,o)=>{e(n,WO(t,r,i,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>VO(l,o))})})}function xm(e,t,n,r){return Rs(this,void 0,void 0,function*(){return Df(e,"GET",t,n,r)})}function Br(e,t,n,r,i){return Rs(this,void 0,void 0,function*(){return Df(e,"POST",t,r,i,n)})}function UO(e,t,n,r,i){return Rs(this,void 0,void 0,function*(){return Df(e,"PUT",t,r,i,n)})}function r8(e,t,n,r,i){return Rs(this,void 0,void 0,function*(){return Df(e,"DELETE",t,r,i,n)})}var dn=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const HO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},y2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class KO{constructor(t,n={},r,i){this.url=t,this.headers=n,this.bucketId=r,this.fetch=n8(i)}uploadOrUpdate(t,n,r,i){return dn(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},y2),i),o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)});typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.append("cacheControl",s.cacheControl)):(a=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType);const l=this._removeEmptyFolders(n),u=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:a,headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{})),d=yield c.json();return c.ok?{data:{path:l,id:d.Id,fullPath:d.Key},error:null}:{data:null,error:d}}catch(a){if(_t(a))return{data:null,error:a};throw a}})}upload(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return dn(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(t),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:y2.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:c}),f=yield d.json();return d.ok?{data:{path:a,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(_t(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return dn(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const a=yield Br(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new i$("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:o},error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}update(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:yield Br(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}copy(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:{path:(yield Br(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return dn(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),a=yield Br(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=yield Br(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}download(t,n){return dn(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),s=a?`?${a}`:"";try{const o=this._getFinalPath(t);return{data:yield(yield xm(this.fetch,`${this.url}/${i}/${o}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(_t(o))return{data:null,error:o};throw o}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],a=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";a!==""&&i.push(a);const o=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${u}`)}}}remove(t){return dn(this,void 0,void 0,function*(){try{return{data:yield r8(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}list(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},HO),n),{prefix:t||""});return{data:yield Br(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const YO="2.6.0",qO={"X-Client-Info":`storage-js/${YO}`};var $a=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class GO{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},qO),n),this.fetch=n8(r)}listBuckets(){return $a(this,void 0,void 0,function*(){try{return{data:yield xm(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(_t(t))return{data:null,error:t};throw t}})}getBucket(t){return $a(this,void 0,void 0,function*(){try{return{data:yield xm(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return $a(this,void 0,void 0,function*(){try{return{data:yield Br(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return $a(this,void 0,void 0,function*(){try{return{data:yield UO(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}emptyBucket(t){return $a(this,void 0,void 0,function*(){try{return{data:yield Br(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}deleteBucket(t){return $a(this,void 0,void 0,function*(){try{return{data:yield r8(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}}class ZO extends GO{constructor(t,n={},r){super(t,n,r)}from(t){return new KO(this.url,this.headers,t,this.fetch)}}const XO="2.44.3";let co="";typeof Deno<"u"?co="deno":typeof document<"u"?co="web":typeof navigator<"u"&&navigator.product==="ReactNative"?co="react-native":co="node";const QO={"X-Client-Info":`supabase-js-${co}/${XO}`},JO={headers:QO},eB={schema:"public"},tB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},nB={};var rB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const iB=e=>{let t;return e?t=e:typeof fetch>"u"?t=V_:t=fetch,(...n)=>t(...n)},aB=()=>typeof Headers>"u"?W_:Headers,sB=(e,t,n)=>{const r=iB(n),i=aB();return(a,s)=>rB(void 0,void 0,void 0,function*(){var o;const l=(o=yield t())!==null&&o!==void 0?o:e;let u=new i(s==null?void 0:s.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},s),{headers:u}))})};function oB(e){return e.replace(/\/$/,"")}function lB(e,t){const{db:n,auth:r,realtime:i,global:a}=e,{db:s,auth:o,realtime:l,global:u}=t;return{db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},u),a)}}const i8="2.64.2",uB="http://localhost:9999",cB="supabase.auth.token",dB={"X-Client-Info":`gotrue-js/${i8}`},$2=10,wm="X-Supabase-Api-Version",a8={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function fB(e){return Math.round(Date.now()/1e3)+e}function hB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const kn=()=>typeof document<"u",yi={tested:!1,writable:!1},Mo=()=>{if(!kn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(yi.tested)return yi.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),yi.tested=!0,yi.writable=!0}catch{yi.tested=!0,yi.writable=!1}return yi.writable};function _h(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const s8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>bs(async()=>{const{default:r}=await Promise.resolve().then(()=>Ts);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},pB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",o8=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},ou=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Eh=async(e,t)=>{await e.removeItem(t)};function mB(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,i,a,s,o,l,u,c=0;for(e=e.replace("-","+").replace("_","/");c>4,i=(o&15)<<4|l>>2,a=(l&3)<<6|u,n=n+String.fromCharCode(r),l!=64&&i!=0&&(n=n+String.fromCharCode(i)),u!=64&&a!=0&&(n=n+String.fromCharCode(a));return n}class _f{constructor(){this.promise=new _f.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}_f.promiseConstructor=Promise;function x2(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(mB(r))}async function gB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function vB(e,t){return new Promise((r,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await e(a);if(!t(a,null,s)){r(s);return}}catch(s){if(!t(a,s)){i(s);return}}})()})}function bB(e){return("0"+e.toString(16)).substr(-2)}function yB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let a=0;a<56;a++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,bB).join("")}async function $B(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}function xB(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function wB(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await $B(e);return xB(n)}async function xa(e,t,n=!1){const r=yB();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await o8(e,`${t}-code-verifier`,i);const a=await wB(r);return[a,r===a?"plain":"s256"]}const DB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function _B(e){const t=e.headers.get(wm);if(!t||!t.match(DB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class a$ extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function re(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class EB extends a${constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function SB(e){return re(e)&&e.name==="AuthApiError"}class l8 extends a${constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class da extends a${constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class $i extends da{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Sh extends da{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class lu extends da{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class uu extends da{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class w2 extends da{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Dm extends da{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Ch(e){return re(e)&&e.name==="AuthRetryableFetchError"}class D2 extends da{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var CB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);ie.msg||e.message||e.error_description||e.error||JSON.stringify(e),kB=[502,503,504];async function _2(e){var t;if(!pB(e))throw new Dm(Pi(e),0);if(kB.includes(e.status))throw new Dm(Pi(e),e.status);let n;try{n=await e.json()}catch(a){throw new l8(Pi(a),a)}let r;const i=_B(e);if(i&&i.getTime()>=a8["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new D2(Pi(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[])}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new D2(Pi(n),e.status,n.weak_password.reasons);throw new EB(Pi(n),e.status||500,r)}const PB=(e,t,n,r)=>{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(r),Object.assign(Object.assign({},i),n))};async function oe(e,t,n,r){var i;const a=Object.assign({},r==null?void 0:r.headers);a[wm]||(a[wm]=a8["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await TB(e,t,n+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function TB(e,t,n,r,i,a){const s=PB(t,r,i,a);let o;try{o=await e(n,Object.assign({},s))}catch(l){throw console.error(l),new Dm(Pi(l),0)}if(o.ok||await _2(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await _2(l)}}function Mr(e){var t;let n=null;AB(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=fB(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function E2(e){const t=Mr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function jr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function RB(e){return{data:e,error:null}}function MB(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,s=CB(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function FB(e){return e}function AB(e){return e.access_token&&e.refresh_token&&e.expires_in}var OB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&(h.forEach(p=>{const g=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(p.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(re(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:jr})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await oe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:jr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:jr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await oe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(re(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}}const IB={getItem:e=>Mo()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Mo()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Mo()&&globalThis.localStorage.removeItem(e)}};function S2(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function LB(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const wa={debug:!!(globalThis&&Mo()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class u8 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class NB extends u8{}async function jB(e,t,n){wa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),wa.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){wa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{wa.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw wa.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new NB(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(wa.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}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"),await n()}})}LB();const zB={url:uB,storageKey:cB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:dB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Us=30*1e3,C2=3;async function k2(e,t,n){return await n()}class sl{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=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,this.instanceID=sl.nextInstanceID,sl.nextInstanceID+=1,this.instanceID>0&&kn()&&console.warn("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.");const i=Object.assign(Object.assign({},zB),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new BB({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=s8(i.fetch),this.lock=i.lock||k2,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:kn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=jB:this.lock=k2,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)},this.persistSession?i.storage?this.storage=i.storage:Mo()?this.storage=IB:(this.memoryStorage={},this.storage=S2(this.memoryStorage)):(this.memoryStorage={},this.storage=S2(this.memoryStorage)),kn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${i8}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const t=kn()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",t),t||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(t);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:i,redirectType:a}=n;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return re(t)?{error:t}:{error:new l8("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{await this._removeSession();const a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Mr}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(t){var n,r,i;try{await this._removeSession();let a;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await xa(this.storage,this.storageKey)),a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:p},xform:Mr})}else if("phone"in t){const{phone:c,password:d,options:f}=t;a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Mr})}else throw new lu("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(t){try{await this._removeSession();let n;if("email"in t){const{email:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:E2})}else if("phone"in t){const{phone:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:E2})}else throw new lu("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Sh}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,a;return await this._removeSession(),await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await ou(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/"),{data:a,error:s}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Mr});return await Eh(this.storage,`${this.storageKey}-code-verifier`),s?{data:{user:null,session:null,redirectType:null},error:s}:!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Sh}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}async signInWithIdToken(t){await this._removeSession();try{const{options:n,provider:r,token:i,access_token:a,nonce:s}=t,o=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Mr}),{data:l,error:u}=o;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Sh}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,a,s;try{if(await this._removeSession(),"email"in t){const{email:o,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await xa(this.storage,this.storageKey));const{error:d}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:o,options:l}=t,{data:u,error:c}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new lu("You must provide either an email or phone number.")}catch(o){if(re(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var n,r;try{t.type!=="email_change"&&t.type!=="phone_change"&&await this._removeSession();let i,a;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Mr});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,u=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(re(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{await this._removeSession();let a=null,s=null;return this.flowType==="pkce"&&([a,s]=await xa(this.storage,this.storageKey)),await oe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((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:a,code_challenge_method:s}),headers:this.headers,xform:RB})}catch(a){if(re(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new $i;const{error:i}=await oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(re(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{t.type!="email_change"&&t.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:a}=t,{error:s}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in t){const{phone:r,type:i,options:a}=t,{data:s,error:o}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new lu("You must provide either an email or phone number and a type")}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await ou(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){const s=this.suppressGetSessionWarning;t=new Proxy(t,{get(l,u,c){return!s&&u==="user"&&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 many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(l,u,c)}})}return{data:{session:t},error:null}}const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:jr}):await this._useSession(async n=>{var r,i,a;const{data:s,error:o}=n;if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new $i}:await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:jr})})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new $i;const s=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await xa(this.storage,this.storageKey));const{data:u,error:c}=await oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:s.access_token,xform:jr});if(c)throw c;return s.user=u.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return x2(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new $i;const n=Date.now()/1e3;let r=n,i=!0,a=null;const s=x2(t.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{session:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)throw l;a={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(n){if(re(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:s,error:o}=n;if(o)throw o;t=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new $i;const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t){try{if(!kn())throw new uu("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new uu("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!t)throw new w2("Not a valid PKCE flow url.");const n=_h(window.location.href);if(t){if(!n.code)throw new w2("No code detected.");const{data:m,error:$}=await this._exchangeCodeForSession(n.code);if($)throw $;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:m.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new uu(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:i,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:u}=n;if(!a||!o||!s||!u)throw new uu("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(o);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=Us&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const p=f-d;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",p,f,c);const{data:g,error:b}=await this._getUser(a);if(b)throw b;const v={provider_token:r,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:f,refresh_token:s,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:n.type},error:null}}catch(n){if(re(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const t=_h(window.location.href);return!!(kn()&&(t.access_token||t.error_description))}async _isPKCEFlow(){const t=_h(window.location.href),n=await ou(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{error:a};const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=await this.admin.signOut(s,t);if(o&&!(SB(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await Eh(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(t){const n=hB(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:a},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((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),console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await xa(this.storage,this.storageKey,!0));try{return await oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(a){if(re(a))return{data:null,error:a};throw a}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async a=>{var s,o,l,u,c;const{data:d,error:f}=a;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await oe(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return kn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(re(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)throw s;return await oe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await vB(async i=>(i>0&&await gB(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Mr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&Ch(a)&&Date.now()+s-r{try{await o.callback(t,n)}catch(l){a.push(l)}});if(await Promise.all(s),a.length>0){for(let o=0;othis._autoRefreshTokenTick(),Us);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Us}ms, refresh threshold is ${C2} ticks`),i<=C2&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof u8)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!kn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=await xa(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);i.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:l}=await oe(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:t.friendlyName,factor_type:t.factorType,issuer:t.issuer},headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((i=o==null?void 0:o.totp)===null||i===void 0)&&i.qr_code&&(o.totp.qr_code=`data:image/svg+xml;utf-8,${o.totp.qr_code}`),{data:o,error:null})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{data:null,error:a};const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(a=>a.factor_type==="totp"&&a.status==="verified");return{data:{all:r,totp:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:a}=t;if(a)return{data:null,error:a};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(i.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}}sl.nextInstanceID=0;const VB=sl;class WB extends VB{constructor(t){super(t)}}var UB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class HB{constructor(t,n,r){var i,a,s;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const o=oB(t);this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,u={db:eB,realtime:nB,auth:Object.assign(Object.assign({},tB),{storageKey:l}),global:JO},c=lB(r??{},u);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=sB(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new DO(`${o}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new JA(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new ZO(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return UB(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,storageKey:a,flowType:s,debug:o},l,u){var c;const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new WB({url:this.authUrl,headers:Object.assign(Object.assign({},d),l),storageKey:a,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,flowType:s,debug:o,fetch:u,hasCustomAuthorizationHeader:(c="Authorization"in this.headers)!==null&&c!==void 0?c:!1})}_initRealtimeClient(t){return new IO(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const KB=(e,t,n)=>new HB(e,t,n);function ne(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Z={};ne(Z,"focus-ring",()=>_m,e=>_m=e);ne(Z,"i18nFontFamily",()=>Nc,e=>Nc=e);ne(Z,"is-active",()=>Em,e=>Em=e);ne(Z,"is-disabled",()=>Sm,e=>Sm=e);ne(Z,"is-focused",()=>Cm,e=>Cm=e);ne(Z,"is-hovered",()=>km,e=>km=e);ne(Z,"is-open",()=>Pm,e=>Pm=e);ne(Z,"is-placeholder",()=>Tm,e=>Tm=e);ne(Z,"is-selected",()=>Rm,e=>Rm=e);ne(Z,"spectrum-BaseButton",()=>oi,e=>oi=e);ne(Z,"spectrum-FocusRing-ring",()=>jc,e=>jc=e);ne(Z,"spectrum-FocusRing",()=>li,e=>li=e);ne(Z,"spectrum-ActionButton",()=>Mm,e=>Mm=e);ne(Z,"spectrum-ActionButton--emphasized",()=>Fm,e=>Fm=e);ne(Z,"spectrum-ActionButton--quiet",()=>Am,e=>Am=e);ne(Z,"spectrum-ActionButton--staticBlack",()=>Om,e=>Om=e);ne(Z,"spectrum-ActionButton--staticColor",()=>Bm,e=>Bm=e);ne(Z,"spectrum-ActionButton--staticWhite",()=>Im,e=>Im=e);ne(Z,"spectrum-ActionButton-hold",()=>Lm,e=>Lm=e);ne(Z,"spectrum-ActionButton-label",()=>Nm,e=>Nm=e);ne(Z,"spectrum-ActionGroup-itemIcon",()=>jm,e=>jm=e);ne(Z,"spectrum-Button",()=>zm,e=>zm=e);ne(Z,"spectrum-Button--iconOnly",()=>Vm,e=>Vm=e);ne(Z,"spectrum-Button--overBackground",()=>Wm,e=>Wm=e);ne(Z,"spectrum-Button--pending",()=>Um,e=>Um=e);ne(Z,"spectrum-Button-circleLoader",()=>Hm,e=>Hm=e);ne(Z,"spectrum-Button-label",()=>Km,e=>Km=e);ne(Z,"spectrum-ClearButton",()=>Ym,e=>Ym=e);ne(Z,"spectrum-ClearButton--overBackground",()=>qm,e=>qm=e);ne(Z,"spectrum-ClearButton--small",()=>Gm,e=>Gm=e);ne(Z,"spectrum-FieldButton",()=>Zm,e=>Zm=e);ne(Z,"spectrum-FieldButton--invalid",()=>Xm,e=>Xm=e);ne(Z,"spectrum-FocusRing--quiet",()=>zc,e=>zc=e);ne(Z,"spectrum-FieldButton--quiet",()=>Qm,e=>Qm=e);ne(Z,"spectrum-Icon",()=>Jm,e=>Jm=e);ne(Z,"spectrum-LogicButton",()=>eg,e=>eg=e);ne(Z,"spectrum-LogicButton--and",()=>tg,e=>tg=e);ne(Z,"spectrum-LogicButton--or",()=>ng,e=>ng=e);var _m,Nc,Em,Sm,Cm,km,Pm,Tm,Rm,oi,jc,li,Mm,Fm,Am,Om,Bm,Im,Lm,Nm,jm,zm,Vm,Wm,Um,Hm,Km,Ym,qm,Gm,Zm,Xm,zc,Qm,Jm,eg,tg,ng;_m="Dniwja_focus-ring";Nc="Dniwja_i18nFontFamily";Em="Dniwja_is-active";Sm="Dniwja_is-disabled";Cm="Dniwja_is-focused";km="Dniwja_is-hovered";Pm="Dniwja_is-open";Tm="Dniwja_is-placeholder";Rm="Dniwja_is-selected";oi=`Dniwja_spectrum-BaseButton ${Nc}`;jc="Dniwja_spectrum-FocusRing-ring";li=`Dniwja_spectrum-FocusRing ${jc}`;Mm=`Dniwja_spectrum-ActionButton ${oi} ${li}`;Fm="Dniwja_spectrum-ActionButton--emphasized";Am="Dniwja_spectrum-ActionButton--quiet";Om="Dniwja_spectrum-ActionButton--staticBlack";Bm="Dniwja_spectrum-ActionButton--staticColor";Im="Dniwja_spectrum-ActionButton--staticWhite";Lm="Dniwja_spectrum-ActionButton-hold";Nm="Dniwja_spectrum-ActionButton-label";jm="Dniwja_spectrum-ActionGroup-itemIcon";zm=`Dniwja_spectrum-Button ${oi} ${li}`;Vm="Dniwja_spectrum-Button--iconOnly";Wm="Dniwja_spectrum-Button--overBackground";Um="Dniwja_spectrum-Button--pending";Hm="Dniwja_spectrum-Button-circleLoader";Km="Dniwja_spectrum-Button-label";Ym=`Dniwja_spectrum-ClearButton ${oi} ${li}`;qm="Dniwja_spectrum-ClearButton--overBackground";Gm="Dniwja_spectrum-ClearButton--small";Zm=`Dniwja_spectrum-FieldButton ${oi} ${li}`;Xm="Dniwja_spectrum-FieldButton--invalid";zc="Dniwja_spectrum-FocusRing--quiet";Qm=`Dniwja_spectrum-FieldButton--quiet ${zc}`;Jm="Dniwja_spectrum-Icon";eg=`Dniwja_spectrum-LogicButton ${oi} ${li}`;tg="Dniwja_spectrum-LogicButton--and";ng="Dniwja_spectrum-LogicButton--or";function c8(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t to ensure consistent ids are generated between the client and server.");let n=GB(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function XB(e){let t=_.useId(),[n]=y.useState(fa()),r=n?"react-aria":`react-aria${Vc.prefix}`;return e||`${r}-${t}`}const QB=typeof _.useId=="function"?XB:ZB;function JB(){return!1}function eI(){return!0}function tI(e){return()=>{}}function fa(){return typeof _.useSyncExternalStore=="function"?_.useSyncExternalStore(tI,JB,eI):y.useContext(YB)}function rg(e){let t=typeof window<"u"&&typeof window.matchMedia=="function",[n,r]=y.useState(()=>t?window.matchMedia(e).matches:!1);return y.useEffect(()=>{if(!t)return;let a=window.matchMedia(e),s=o=>{r(o.matches)};return a.addListener(s),()=>{a.removeListener(s)}},[t,e]),fa()?!1:n}function Sf(e){return{UNSAFE_getDOMNode(){return e.current}}}function nI(e,t=e){return{...Sf(e),focus(){t.current&&t.current.focus()}}}function Nn(e){let t=y.useRef(null);return y.useImperativeHandle(e,()=>Sf(t)),t}function f8(e,t){let n=y.useRef(null);return y.useImperativeHandle(e,()=>nI(n,t)),n}function du(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}const s$=_.createContext(null);s$.displayName="BreakpointContext";function rI(e){let{children:t,matchedBreakpoints:n}=e;return _.createElement(s$.Provider,{value:{matchedBreakpoints:n}},t)}function iI(e){let t=Object.entries(e).sort(([,l],[,u])=>u-l),n=t.map(([,l])=>`(min-width: ${l}px)`),r=typeof window<"u"&&typeof window.matchMedia=="function",i=()=>{let l=[];for(let u in n){let c=n[u];window.matchMedia(c).matches&&l.push(t[u][0])}return l.push("base"),l},[a,s]=y.useState(()=>r?i():["base"]);return y.useEffect(()=>{if(!r)return;let l=()=>{const u=i();s(c=>c.length!==u.length||c.some((d,f)=>d!==u[f])?[...u]:c)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[r]),fa()?["base"]:a}function h8(){return y.useContext(s$)}const aI=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),sI=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function p8(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return aI.has(n.script)}let t=e.split("-")[0];return sI.has(t)}const oI=Symbol.for("react-aria.i18n.locale");function m8(){let e=typeof window<"u"&&window[oI]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:p8(e)?"rtl":"ltr"}}let ig=m8(),fo=new Set;function P2(){ig=m8();for(let e of fo)e(ig)}function g8(){let e=fa(),[t,n]=y.useState(ig);return y.useEffect(()=>(fo.size===0&&window.addEventListener("languagechange",P2),fo.add(n),()=>{fo.delete(n),fo.size===0&&window.removeEventListener("languagechange",P2)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const v8=_.createContext(null);function lI(e){let{locale:t,children:n}=e,r=g8(),i=_.useMemo(()=>t?{locale:t,direction:p8(t)?"rtl":"ltr"}:r,[r,t]);return _.createElement(v8.Provider,{value:i},n)}function Qe(){let e=g8();return y.useContext(v8)||e}const uI=Symbol.for("react-aria.i18n.locale"),cI=Symbol.for("react-aria.i18n.strings");let Da;class mi{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=dI(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[uI];if(Da===void 0){let i=window[cI];if(!i)return null;Da={};for(let a in i)Da[a]=new mi({[n]:i[a]},n)}let r=Da==null?void 0:Da[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function dI(e,t,n="en-US"){if(t[e])return t[e];let r=fI(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function fI(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const T2=new Map,R2=new Map;class b8{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,s=T2.get(a);s||(s=new Intl.PluralRules(this.locale,{type:r}),T2.set(a,s));let o=s.select(t);return i=n[o]||n.other,typeof i=="function"?i():i}number(t){let n=R2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),R2.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const M2=new WeakMap;function hI(e){let t=M2.get(e);return t||(t=new mi(e),M2.set(e,t)),t}function y8(e,t){return t&&mi.getGlobalDictionaryForPackage(t)||hI(e)}function Sn(e,t){let{locale:n}=Qe(),r=y8(e,t);return y.useMemo(()=>new b8(n,r),[n,r])}function ns(e,t){return e-t*Math.floor(e/t)}const $8=1721426;function zi(e,t,n,r){t=Al(e,t);let i=t-1,a=-2;return n<=2?a=0:Ur(t)&&(a=-1),$8-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Ur(e){return e%4===0&&(e%100!==0||e%400===0)}function Al(e,t){return e==="BC"?1-t:t}function Cf(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const pI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ft{fromJulianDay(t){let n=t,r=n-$8,i=Math.floor(r/146097),a=ns(r,146097),s=Math.floor(a/36524),o=ns(a,36524),l=Math.floor(o/1461),u=ns(o,1461),c=Math.floor(u/365),d=i*400+s*100+l*4+c+(s!==4&&c!==4?1:0),[f,h]=Cf(d),p=n-zi(f,h,1,1),g=2;n=0?e:t:e||t}function $s(e){e=Oe(e,new Ft);let t=Al(e.era,e.year);return E8(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function E8(e,t,n,r,i,a,s){let o=new Date;return o.setUTCHours(r,i,a,s),o.setUTCFullYear(e,t-1,n),o.getTime()}function sg(e,t){if(t==="UTC")return 0;if(e>0&&t===Pf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:s,second:o}=S8(e,t);return E8(n,r,i,a,s,o,0)-Math.floor(e/1e3)*1e3}const B2=new Map;function S8(e,t){let n=B2.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),B2.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const I2=864e5;function DI(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>_I(e,t,a))}function _I(e,t,n){let r=S8(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function cr(e,t,n="compatible"){let r=Xn(e);if(t==="UTC")return $s(r);if(t===Pf()&&n==="compatible"){r=Oe(r,new Ft);let l=new Date,u=Al(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=$s(r),a=sg(i-I2,t),s=sg(i+I2,t),o=DI(r,t,i-a,i-s);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function C8(e,t,n="compatible"){return new Date(cr(e,t,n))}function hr(e,t){let n=sg(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,s=r.getUTCDate(),o=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new ul(i,a,s,t,n,o,l,u,c)}function Zt(e){return new Je(e.calendar,e.era,e.year,e.month,e.day)}function Xn(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Uc(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function L2(e){return new Il(e.hour,e.minute,e.second,e.millisecond)}function Oe(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,na(r),r}function k8(e,t,n){if(e instanceof ul)return e.timeZone===t?e:SI(e,t);let r=cr(e,t,n);return hr(r,t)}function EI(e){let t=$s(e)-e.offset;return new Date(t)}function SI(e,t){let n=$s(e)-e.offset;return Oe(hr(n,t),e.calendar)}const Hs=36e5;function Tf(e,t){let n=e.copy(),r="hour"in n?M8(n,t):0;og(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,lg(n),P8(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,CI(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,s;let l=(a=(s=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(s,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function og(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function lg(e){for(;e.month<1;)og(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,og(e,1)}function CI(e){for(;e.day<1;)e.month--,lg(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,lg(e)}function P8(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function na(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),P8(e)}function u$(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function T8(e,t){return Tf(e,u$(t))}function c$(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),na(n),n}function ll(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),R8(n),n}function kI(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=fu(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=fu(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=fu(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=fu(e.hour,24),t}function R8(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function fu(e,t){let n=e%t;return n<0&&(n+=t),n}function M8(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,kI(e)}function F8(e,t){let n=e.copy();return M8(n,t),n}function PI(e,t){return F8(e,u$(t))}function d$(e,t,n,r){let i=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=pr(l,n,0,o.length-1,r==null?void 0:r.round),i.era=o[l],na(i);break}case"year":var a,s;!((a=(s=i.calendar).isInverseEra)===null||a===void 0)&&a.call(s,i)&&(n=-n),i.year=pr(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=pr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=pr(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),na(i),i}function f$(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=pr(a,n,s,o,r==null?void 0:r.round);break}case"minute":i.minute=pr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=pr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=pr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function pr(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function A8(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Tf(Xn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=cr(i,e.timeZone)}else n=$s(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=hr(n,e.timeZone);return Oe(r,e.calendar)}function TI(e,t){return A8(e,u$(t))}function RI(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let p=e.hour>=12;i=p?12:0,a=p?23:11}let s=Xn(e),o=Oe(ll(s,{hour:i}),new Ft),l=[cr(o,e.timeZone,"earlier"),cr(o,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===o.day)[0],u=Oe(ll(s,{hour:a}),new Ft),c=[cr(u,e.timeZone,"earlier"),cr(u,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===u.day).pop(),d=$s(e)-e.offset,f=Math.floor(d/Hs),h=d%Hs;return d=pr(f,n,Math.floor(l/Hs),Math.floor(c/Hs),r==null?void 0:r.round)*Hs+h,Oe(hr(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return f$(e,t,n,r);case"era":case"year":case"month":case"day":{let i=d$(Xn(e),t,n,r),a=cr(i,e.timeZone);return Oe(hr(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function MI(e,t,n){let r=Xn(e),i=ll(c$(r,t),t);if(i.compare(r)===0)return e;let a=cr(i,e.timeZone,n);return Oe(hr(a,e.timeZone),e.calendar)}function O8(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function B8(e){let t=Oe(e,new Ft);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function I8(e){return`${B8(e)}T${O8(e)}`}function FI(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function AI(e){return`${I8(e)}${FI(e.offset)}[${e.timeZone}]`}function OI(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bl(e,t,n){OI(e,t),t.set(e,n)}function h$(e){let t=typeof e[0]=="object"?e.shift():new Ft,n;if(typeof e[0]=="string")n=e.shift();else{let s=t.getEras();n=s[s.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var BI=new WeakMap;class Je{copy(){return this.era?new Je(this.calendar,this.era,this.year,this.month,this.day):new Je(this.calendar,this.year,this.month,this.day)}add(t){return Tf(this,t)}subtract(t){return T8(this,t)}set(t){return c$(this,t)}cycle(t,n,r){return d$(this,t,n,r)}toDate(t){return C8(this,t)}toString(){return B8(this)}compare(t){return D8(this,t)}constructor(...t){Bl(this,BI,{writable:!0,value:void 0});let[n,r,i,a,s]=h$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,na(this)}}var II=new WeakMap;class Il{copy(){return new Il(this.hour,this.minute,this.second,this.millisecond)}add(t){return F8(this,t)}subtract(t){return PI(this,t)}set(t){return ll(this,t)}cycle(t,n,r){return f$(this,t,n,r)}toString(){return O8(this)}compare(t){return _8(this,t)}constructor(t=0,n=0,r=0,i=0){Bl(this,II,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,R8(this)}}var LI=new WeakMap;class Uc{copy(){return this.era?new Uc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Uc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Tf(this,t)}subtract(t){return T8(this,t)}set(t){return c$(ll(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return d$(this,t,n,r);default:return f$(this,t,n,r)}}toDate(t,n){return C8(this,t,n)}toString(){return I8(this)}compare(t){let n=D8(this,t);return n===0?_8(this,Xn(t)):n}constructor(...t){Bl(this,LI,{writable:!0,value:void 0});let[n,r,i,a,s]=h$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,na(this)}}var NI=new WeakMap;class ul{copy(){return this.era?new ul(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ul(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return A8(this,t)}subtract(t){return TI(this,t)}set(t,n){return MI(this,t,n)}cycle(t,n,r){return RI(this,t,n,r)}toDate(){return EI(this)}toString(){return AI(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-k8(t,this.timeZone).toDate().getTime()}constructor(...t){Bl(this,NI,{writable:!0,value:void 0});let[n,r,i,a,s]=h$(t),o=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,na(this)}}const rs=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],jI=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],nc=[1867,1911,1925,1988,2018],Ir=["meiji","taisho","showa","heisei","reiwa"];function N2(e){const t=rs.findIndex(([n,r,i])=>e.year=0){let[,i,a]=rs[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return Ir}getYearsInEra(t){let n=Ir.indexOf(t.era),r=rs[n],i=rs[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month0?["minguo",t]:["before_minguo",1-t]}class WI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=Al(n.era,n.year),[i,a]=V2(r);return new Je(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(W2(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=V2(N8(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(W2(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Hc}constructor(...t){super(...t),this.identifier="roc"}}function W2(e){let[t,n]=Cf(N8(e));return new Je(t,n,e.month,e.day)}const U2=1948320,H2=[0,31,62,93,124,155,186,216,246,276,306,336];class UI{fromJulianDay(t){let n=t-U2,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,s=a<216?Math.floor(a/31):Math.floor((a-6)/30),o=a-H2[s]+1;return new Je(this,r,s+1,o)}toJulianDay(t){let n=U2-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=H2[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||ns(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Rh=78,K2=80;class HI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-Rh,i=t-zi(n.era,n.year,1,1),a;i=8&&(s+=(t.month-7)*30),s+=t.day-1,s)}getDaysInMonth(t){return t.month===1&&Ur(t.year+Rh)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Kc=1948440,Y2=1948439,pn=1300,_a=1600,KI=460322;function Yc(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function j8(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+Yc(t,r,1,1)))/29.5)+1),a=n-Yc(t,r,i,1)+1;return new Je(e,r,i,a)}function q2(e){return(14+11*e)%30<11}class p${fromJulianDay(t){return j8(this,Kc,t)}toJulianDay(t){return Yc(Kc,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&q2(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return q2(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class YI extends p${fromJulianDay(t){return j8(this,Y2,t)}toJulianDay(t){return Yc(Y2,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const qI="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let ug,is;function rc(e){return KI+is[e-pn]}function ho(e,t){let n=e-pn,r=1<<11-(t-1);return ug[n]&r?30:29}function G2(e,t){let n=rc(e);for(let r=1;ri)return super.fromJulianDay(t);{let a=pn-1,s=1,o=1;for(;o>0;){a++,o=n-rc(a)+1;let l=Z2(a);if(o===l){s=12;break}else if(ou;)o-=u,s++,u=ho(a,s);break}}return new Je(this,a,s,n-G2(a,s)+1)}}toJulianDay(t){return t.year_a?super.toJulianDay(t):Kc+G2(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year_a?super.getDaysInMonth(t):ho(t.year,t.month)}getDaysInYear(t){return t.year_a?super.getDaysInYear(t):Z2(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",ug||(ug=new Uint16Array(Uint8Array.from(atob(qI),t=>t.charCodeAt(0)).buffer)),!is){is=new Uint32Array(_a-pn+1);let t=0;for(let n=pn;n<=_a;n++){is[n-pn]=t;for(let r=1;r<=12;r++)t+=ho(n,r)}}}}const X2=347997,z8=1080,V8=24*z8,ZI=29,XI=12*z8+793,QI=ZI*V8+XI;function Bi(e){return ns(e*7+1,19)<7}function ic(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return ns(3*(r+1),7)<3&&(r+=1),r}function JI(e){let t=ic(e-1),n=ic(e);return ic(e+1)-n===356?2:n-t===382?1:0}function Fo(e){return ic(e)+JI(e)}function W8(e){return Fo(e+1)-Fo(e)}function eL(e){let t=W8(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function hu(e,t){if(t>=6&&!Bi(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=eL(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Bi(e)?30:0:30}class tL{fromJulianDay(t){let n=t-X2,r=n*V8/QI,i=Math.floor((19*r+234)/235)+1,a=Fo(i),s=Math.floor(n-a);for(;s<1;)i--,a=Fo(i),s=Math.floor(n-a);let o=1,l=0;for(;l6?t.month--:!Bi(n.year)&&Bi(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const cg=1723856,Q2=1824665,dg=5500;function qc(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function m$(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-qc(e,n,1,1))/30),i=t+1-qc(e,n,r,1);return[n,r,i]}function U8(e){return Math.floor(e%4/3)}function H8(e,t){return t%13!==0?30:U8(e)+5}class g${fromJulianDay(t){let[n,r,i]=m$(cg,t),a="AM";return n<=0&&(a="AA",n+=dg),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=dg),qc(cg,n,t.month,t.day)}getDaysInMonth(t){return H8(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+U8(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class nL extends g${fromJulianDay(t){let[n,r,i]=m$(cg,t);return n+=dg,new Je(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class rL extends g${fromJulianDay(t){let[n,r,i]=m$(Q2,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),qc(Q2,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),H8(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function K8(e){switch(e){case"buddhist":return new VI;case"ethiopic":return new g$;case"ethioaa":return new nL;case"coptic":return new rL;case"hebrew":return new tL;case"indian":return new HI;case"islamic-civil":return new p$;case"islamic-tbla":return new YI;case"islamic-umalqura":return new GI;case"japanese":return new zI;case"persian":return new UI;case"roc":return new WI;case"gregory":default:return new Ft}}let Mh=new Map;class ri{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return sL()&&(this.resolvedHourCycle||(this.resolvedHourCycle=oL(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=Y8(t,n),this.options=n}}const iL={true:{ja:"h11"},false:{}};function Y8(e,t={}){if(typeof t.hour12=="boolean"&&aL()){t={...t};let i=iL[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const he=typeof document<"u"?_.useLayoutEffect:()=>{};function pt(e){const t=y.useRef(null);return he(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function q8(e){let[t,n]=y.useState(e),r=y.useRef(null),i=pt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});he(()=>{r.current&&i()});let a=pt(s=>{r.current=s(t),i()});return[t,a]}let lL=!!(typeof window<"u"&&window.document&&window.document.createElement),Gc=new Map;function Qn(e){let[t,n]=y.useState(e),r=y.useRef(null),i=QB(t),a=y.useCallback(s=>{r.current=s},[]);return lL&&Gc.set(i,a),he(()=>{let s=i;return()=>{Gc.delete(s)}},[i]),y.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function uL(e,t){if(e===t)return e;let n=Gc.get(e);if(n)return n(t),t;let r=Gc.get(t);return r?(r(e),e):t}function Zc(e=[]){let t=Qn(),[n,r]=q8(t),i=y.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return he(i,[t,i,...e]),n}function cl(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ye=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Fn=e=>e&&"window"in e&&e.window===e?e:ye(e).defaultView||window;function de(...e){let t={...e[0]};for(let n=1;n=65&&i.charCodeAt(2)<=90?t[i]=cl(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=Ef(a,s):i==="id"&&a&&s?t.id=uL(a,s):t[i]=s!==void 0?s:a}}return t}function cL(...e){return e.length===1?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const dL=new Set(["id"]),fL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),hL=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),pL=/^(data-.*)$/;function Xt(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(dL.has(s)||n&&fL.has(s)||r&&hL.has(s)||i!=null&&i.has(s)||pL.test(s))&&(a[s]=e[s]);return a}function Hr(e){if(mL())e.focus({preventScroll:!0});else{let t=gL(e);e.focus(),vL(t)}}let pu=null;function mL(){if(pu==null){pu=!1;try{document.createElement("div").focus({get preventScroll(){return pu=!0,!0}})}catch{}}return pu}function gL(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function v$(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function xs(){return v$(/^Mac/i)}function bL(){return v$(/^iPhone/i)}function G8(){return v$(/^iPad/i)||xs()&&navigator.maxTouchPoints>1}function Mf(){return bL()||G8()}function Z8(){return Rf(/AppleWebKit/i)&&!yL()}function yL(){return Rf(/Chrome/i)}function X8(){return Rf(/Android/i)}function $L(){return Rf(/Firefox/i)}const xL=y.createContext({isNative:!0,open:_L,useHref:e=>e});function wL(e){let{children:t,navigate:n,useHref:r}=e,i=y.useMemo(()=>({isNative:!1,open:(a,s,o,l)=>{Q8(a,u=>{DL(u,s)?n(o,l):ra(u,s)})},useHref:r||(a=>a)}),[n,r]);return _.createElement(xL.Provider,{value:i},t)}function DL(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ra(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}=t;$L()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(xs()?a=!0:s=!0);let u=Z8()&&xs()&&!G8()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l,bubbles:!0,cancelable:!0});ra.isOpening=n,Hr(e),e.dispatchEvent(u),ra.isOpening=!1}ra.isOpening=!1;function Q8(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function _L(e,t){Q8(e,n=>ra(n,t))}let Ma=new Map,fg=new Set;function J2(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Ma.get(r.target);i||(i=new Set,Ma.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Ma.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Ma.delete(r.target)),Ma.size===0)){for(let a of fg)a();fg.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?J2():document.addEventListener("DOMContentLoaded",J2));function J8(e){requestAnimationFrame(()=>{Ma.size===0?e():fg.add(e)})}function e7(){let e=y.useRef(new Map),t=y.useCallback((i,a,s,o)=>{let l=o!=null&&o.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:a,eventTarget:i,fn:l,options:o}),i.addEventListener(a,s,o)},[]),n=y.useCallback((i,a,s,o)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;i.removeEventListener(a,u,o),e.current.delete(s)},[]),r=y.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ll(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Qn(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function EL(e){const t=y.useRef(null);return y.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function e5(e,t){const n=y.useRef(!0),r=y.useRef(null);y.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),y.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((i,a)=>!Object.is(i,r[a])))&&e(),r.current=t},t)}function SL(){return typeof window.ResizeObserver<"u"}function t7(e){const{ref:t,onResize:n}=e;y.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(SL()){const i=new window.ResizeObserver(a=>{a.length&&n()});return i.observe(r),()=>{r&&i.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function b$(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function hg(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Ff(e,t){let n=e;for(hg(n,t)&&(n=n.parentElement);n&&!hg(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function CL(e,t){const n=[];for(;e&&e!==document.documentElement;)hg(e,t)&&n.push(e),e=e.parentElement;return n}let mn=typeof document<"u"&&window.visualViewport;function n7(){let e=fa(),[t,n]=y.useState(()=>e?{width:0,height:0}:t5());return y.useEffect(()=>{let r=()=>{n(i=>{let a=t5();return a.width===i.width&&a.height===i.height?i:a})};return mn?mn.addEventListener("resize",r):window.addEventListener("resize",r),()=>{mn?mn.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function t5(){return{width:mn&&(mn==null?void 0:mn.width)||window.innerWidth,height:mn&&(mn==null?void 0:mn.height)||window.innerHeight}}let kL=0;const Oh=new Map;function y$(e){let[t,n]=y.useState();return he(()=>{if(!e)return;let r=Oh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${kL++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},Oh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Oh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function as(e,t,n,r){let i=pt(n),a=n==null;y.useEffect(()=>{if(a||!e.current)return;let s=e.current;return s.addEventListener(t,i,r),()=>{s.removeEventListener(t,i,r)}},[e,t,r,a,i])}function PL(e,t){let n=n5(e,t,"left"),r=n5(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),f=c+e.clientWidth,h=d+e.clientHeight;n<=s?s=n-parseInt(u,10):n+i>f&&(s+=n+i-f),r<=d?o=r-parseInt(l,10):r+a>h&&(o+=r+a-h),e.scrollLeft=s,e.scrollTop=o}function n5(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function r7(e,t){if(document.contains(e)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let l=CL(e);for(let u of l)PL(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:d}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function pg(e){return e.mozInputSource===0&&e.isTrusted?!0:X8()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function TL(e){return!X8()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function i7(e,t){let n=y.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function RL(e,t,n){let r=y.useRef(t),i=pt(()=>{n&&n(r.current)});y.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s==null||s.addEventListener("reset",i),()=>{s==null||s.removeEventListener("reset",i)}},[e,i])}function ia(e,t,n){let[r,i]=y.useState(e||t),a=y.useRef(e!==void 0),s=e!==void 0;y.useEffect(()=>{let u=a.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,l=y.useCallback((u,...c)=>{let d=(f,...h)=>{n&&(Object.is(o,f)||n(f,...h)),s||(o=f)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...p)=>{let g=u(s?o:h,...p);return d(g,...c),s?h:g})):(s||i(u),d(u,...c))},[s,o,n]);return[o,l]}function mg(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function xn(e){e=i7(e??{},ML);let{locale:t}=Qe();return y.useMemo(()=>new ri(t,e),[t,e])}function ML(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}let Bh=new Map,gg=!1;try{gg=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Xc=!1;try{Xc=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const a7={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class FL{format(t){let n="";if(!gg&&this.options.signDisplay!=null?n=OL(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Xc){var r;let{unit:i,unitDisplay:a="short",locale:s}=this.resolvedOptions();if(!i)return n;let o=(r=a7[i])===null||r===void 0?void 0:r[a];n+=o[s]||o.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!gg&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Xc&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=AL(t,n),this.options=n}}function AL(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Xc){var r;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=a7[s])===null||r===void 0)&&r[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((s,o)=>s[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),a=e.format(n),s=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(s,"+").replace("!!!",a)}else return e.format(n)}}const BL=new RegExp("^.*\\(.*\\).*$"),IL=["latn","arab","hanidec"];class s7{parse(t){return Ih(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Ih(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Ih(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const r5=new Map;function Ih(e,t,n){let r=i5(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of IL)if(i!==r.options.numberingSystem){let a=i5(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return r}function i5(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,a;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((a=this.options.maximumFractionDigits)!==null&&a!==void 0?a:0)+2,20)};return new s7(this.locale,s).parse(new FL(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&BL.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=mu(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=mu(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=mu(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=jL(t,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const a5=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),NL=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function jL(e,t,n,r){var i,a,s,o;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=NL.map(P=>l.formatToParts(P));var f;let h=(f=(i=u.find(P=>P.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&f!==void 0?f:"-",p=(a=c.find(P=>P.type==="plusSign"))===null||a===void 0?void 0:a.value;!p&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(p="+");let b=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(P=>P.type==="decimal"))===null||s===void 0?void 0:s.value,v=(o=u.find(P=>P.type==="group"))===null||o===void 0?void 0:o.value,m=u.filter(P=>!a5.has(P.type)).map(P=>s5(P.value)),$=d.flatMap(P=>P.filter(E=>!a5.has(E.type)).map(E=>s5(E.value))),w=[...new Set([...m,...$])].sort((P,E)=>E.length-P.length),D=w.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${w.join("|")}|[\\p{White_Space}]`,"gu"),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),k=new Map(S.map((P,E)=>[P,E])),x=new RegExp(`[${S.join("")}]`,"g");return{minusSign:h,plusSign:p,decimal:b,group:v,literals:D,numeral:x,index:P=>String(k.get(P))}}function mu(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function s5(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let Lh=new Map;function zL(e){let{locale:t}=Qe(),n=t+(e?Object.entries(e).sort((i,a)=>i[0]s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(0,s.length),s)===0),[t]),r=y.useCallback((a,s)=>s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(-s.length),s)===0),[t]),i=y.useCallback((a,s)=>{if(s.length===0)return!0;a=a.normalize("NFC"),s=s.normalize("NFC");let o=0,l=s.length;for(;o+l<=a.length;o++){let u=a.slice(o,o+l);if(t.compare(s,u)===0)return!0}return!1},[t]);return y.useMemo(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}const Af={margin:["margin",le],marginStart:[Vt("marginLeft","marginRight"),le],marginEnd:[Vt("marginRight","marginLeft"),le],marginTop:["marginTop",le],marginBottom:["marginBottom",le],marginX:[["marginLeft","marginRight"],le],marginY:[["marginTop","marginBottom"],le],width:["width",le],height:["height",le],minWidth:["minWidth",le],minHeight:["minHeight",le],maxWidth:["maxWidth",le],maxHeight:["maxHeight",le],isHidden:["display",YL],alignSelf:["alignSelf",tt],justifySelf:["justifySelf",tt],position:["position",jh],zIndex:["zIndex",jh],top:["top",le],bottom:["bottom",le],start:[Vt("left","right"),le],end:[Vt("right","left"),le],left:["left",le],right:["right",le],order:["order",jh],flex:["flex",qL],flexGrow:["flexGrow",tt],flexShrink:["flexShrink",tt],flexBasis:["flexBasis",tt],gridArea:["gridArea",tt],gridColumn:["gridColumn",tt],gridColumnEnd:["gridColumnEnd",tt],gridColumnStart:["gridColumnStart",tt],gridRow:["gridRow",tt],gridRowEnd:["gridRowEnd",tt],gridRowStart:["gridRowStart",tt]};({...Af,borderStartWidth:Vt("borderLeftWidth","borderRightWidth"),borderEndWidth:Vt("borderRightWidth","borderLeftWidth"),borderStartColor:Vt("borderLeftColor","borderRightColor"),borderEndColor:Vt("borderRightColor","borderLeftColor"),borderTopStartRadius:Vt("borderTopLeftRadius","borderTopRightRadius"),borderTopEndRadius:Vt("borderTopRightRadius","borderTopLeftRadius"),borderBottomStartRadius:Vt("borderBottomLeftRadius","borderBottomRightRadius"),borderBottomEndRadius:Vt("borderBottomRightRadius","borderBottomLeftRadius"),paddingStart:Vt("paddingLeft","paddingRight"),paddingEnd:Vt("paddingRight","paddingLeft")});const o5={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function Vt(e,t){return n=>n==="rtl"?t:e}const WL=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,UL=/^\s*\w+\(/,HL=/(static-)?size-\d+|single-line-(height|width)/g;function le(e){if(typeof e=="number")return e+"px";if(e)return WL.test(e)?e:UL.test(e)?e.replace(HL,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function Nh(e,t){return e=$$(e,t),le(e)}function o7(e,t="default",n=5){return n>5?`var(--spectrum-${e}, var(--spectrum-semantic-${e}-color-${t}))`:`var(--spectrum-legacy-color-${e}, var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t})))`}function KL(e,t=5){if(e)return`var(--spectrum-alias-background-color-${e}, ${o7(e,"background",t)})`}function Jn(e,t=5){if(e)return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${o7(e,"border",t)})`}function er(e){return e&&e!=="none"?`var(--spectrum-alias-border-size-${e})`:"0"}function tr(e){if(e)return`var(--spectrum-alias-border-radius-${e})`}function YL(e){return e?"none":void 0}function jh(e){return e}function qL(e){return typeof e=="boolean"?e?"1":void 0:""+e}function GL(e,t,n,r){let i={};for(let a in e){let s=t[a];if(!s||e[a]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(n));let u=$$(e[a],r),c=l(u,e.colorVersion);if(Array.isArray(o))for(let d of o)i[d]=c;else i[o]=c}for(let a in o5)i[a]&&(i[o5[a]]="solid",i.boxSizing="border-box");return i}function st(e,t=Af,n={}){let{UNSAFE_className:r,UNSAFE_style:i,...a}=e,s=h8(),{direction:o}=Qe(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=n,u=GL(e,t,o,l),c={...i,...u};a.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),a.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let d={style:c,className:r};return $$(e.isHidden,l)&&(d.hidden=!0),{styleProps:d}}function tt(e){return e}function $$(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let n=0;nObject.keys(t).concat(Object.keys(n)).reduce((a,s)=>({...a,[s]:de(t[s]||{},n[s]||{})}),{}),[t,n]);return _.createElement(Qc.Provider,{value:i},r)}function l7(e){let{children:t,...n}=e,r=t;return _.Children.toArray(t).length<=1&&typeof t=="function"&&(r=_.cloneElement(_.Children.only(t),n)),_.createElement(Qc.Provider,{value:{}},r)}function gu(e,t){let[n,r]=y.useState(!0);return he(()=>{r(!!(t.current&&t.current.querySelector(e)))},[r,e,t]),n}const ZL=700;function XL(){return fa()||typeof window>"u"?!1:window.screen.width<=ZL}let Ka="default",vg="",ac=new WeakMap;function l5(e){if(Mf()){if(Ka==="default"){const t=ye(e);vg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Ka="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ac.set(e,e.style.userSelect),e.style.userSelect="none")}function vu(e){if(Mf()){if(Ka!=="disabled")return;Ka="restoring",setTimeout(()=>{J8(()=>{if(Ka==="restoring"){const t=ye(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=vg||""),vg="",Ka="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ac.has(e)){let t=ac.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ac.delete(e)}}const dl=_.createContext({register:()=>{}});dl.displayName="PressResponderContext";function QL(e,t){return t.get?t.get.call(e):t.value}function u7(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function JL(e,t){var n=u7(e,t,"get");return QL(e,n)}function eN(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function u5(e,t,n){var r=u7(e,t,"set");return eN(e,r,n),n}function tN(e){let t=y.useContext(dl);if(t){let{register:n,...r}=t;e=de(r,e),n()}return b$(t,e.ref),e}var bu=new WeakMap;class yu{continuePropagation(){u5(this,bu,!1)}get shouldStopPropagation(){return JL(this,bu)}constructor(t,n,r){Bl(this,bu,{writable:!0,value:void 0}),u5(this,bu,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const c5=Symbol("linkClicked");function x$(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...f}=tN(e),[h,p]=y.useState(!1),g=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:v}=e7(),m=pt((x,T)=>{let P=g.current;if(s||P.didFirePressStart)return!1;let E=!0;if(P.isTriggeringEvent=!0,r){let F=new yu("pressstart",T,x);r(F),E=F.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,p(!0),E}),$=pt((x,T,P=!0)=>{let E=g.current;if(!E.didFirePressStart)return!1;E.ignoreClickAfterPress=!0,E.didFirePressStart=!1,E.isTriggeringEvent=!0;let F=!0;if(i){let R=new yu("pressend",T,x);i(R),F=R.shouldStopPropagation}if(n&&n(!1),p(!1),t&&P&&!s){let R=new yu("press",T,x);t(R),F&&(F=R.shouldStopPropagation)}return E.isTriggeringEvent=!1,F}),w=pt((x,T)=>{let P=g.current;if(s)return!1;if(a){P.isTriggeringEvent=!0;let E=new yu("pressup",T,x);return a(E),P.isTriggeringEvent=!1,E.shouldStopPropagation}return!0}),D=pt(x=>{let T=g.current;T.isPressed&&T.target&&(T.isOverTarget&&T.pointerType!=null&&$(nr(T.target,x),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,v(),c||vu(T.target))}),S=pt(x=>{u&&D(x)}),k=y.useMemo(()=>{let x=g.current,T={onKeyDown(E){if(zh(E.nativeEvent,E.currentTarget)&&E.currentTarget.contains(E.target)){var F;f5(E.target,E.key)&&E.preventDefault();let R=!0;if(!x.isPressed&&!E.repeat){x.target=E.currentTarget,x.isPressed=!0,R=m(E,"keyboard");let M=E.currentTarget,z=O=>{zh(O,M)&&!O.repeat&&M.contains(O.target)&&x.target&&w(nr(x.target,O),"keyboard")};b(ye(E.currentTarget),"keyup",cl(z,P),!0)}R&&E.stopPropagation(),E.metaKey&&xs()&&((F=x.metaKeyEvents)===null||F===void 0||F.set(E.key,E.nativeEvent))}else E.key==="Meta"&&(x.metaKeyEvents=new Map)},onClick(E){if(!(E&&!E.currentTarget.contains(E.target))&&E&&E.button===0&&!x.isTriggeringEvent&&!ra.isOpening){let F=!0;if(s&&E.preventDefault(),!x.ignoreClickAfterPress&&!x.ignoreEmulatedMouseEvents&&!x.isPressed&&(x.pointerType==="virtual"||pg(E.nativeEvent))){!s&&!l&&Hr(E.currentTarget);let R=m(E,"virtual"),M=w(E,"virtual"),z=$(E,"virtual");F=R&&M&&z}x.ignoreEmulatedMouseEvents=!1,x.ignoreClickAfterPress=!1,F&&E.stopPropagation()}}},P=E=>{var F;if(x.isPressed&&x.target&&zh(E,x.target)){var R;f5(E.target,E.key)&&E.preventDefault();let z=E.target;$(nr(x.target,E),"keyboard",x.target.contains(z)),v(),E.key!=="Enter"&&w$(x.target)&&x.target.contains(z)&&!E[c5]&&(E[c5]=!0,ra(x.target,E,!1)),x.isPressed=!1,(R=x.metaKeyEvents)===null||R===void 0||R.delete(E.key)}else if(E.key==="Meta"&&(!((F=x.metaKeyEvents)===null||F===void 0)&&F.size)){var M;let z=x.metaKeyEvents;x.metaKeyEvents=void 0;for(let O of z.values())(M=x.target)===null||M===void 0||M.dispatchEvent(new KeyboardEvent("keyup",O))}};if(typeof PointerEvent<"u"){T.onPointerDown=M=>{if(M.button!==0||!M.currentTarget.contains(M.target))return;if(TL(M.nativeEvent)){x.pointerType="virtual";return}Vh(M.currentTarget)&&M.preventDefault(),x.pointerType=M.pointerType;let z=!0;x.isPressed||(x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=M.pointerId,x.target=M.currentTarget,!s&&!l&&Hr(M.currentTarget),c||l5(x.target),z=m(M,x.pointerType),b(ye(M.currentTarget),"pointermove",E,!1),b(ye(M.currentTarget),"pointerup",F,!1),b(ye(M.currentTarget),"pointercancel",R,!1)),z&&M.stopPropagation()},T.onMouseDown=M=>{M.currentTarget.contains(M.target)&&M.button===0&&(Vh(M.currentTarget)&&M.preventDefault(),M.stopPropagation())},T.onPointerUp=M=>{!M.currentTarget.contains(M.target)||x.pointerType==="virtual"||M.button===0&&Ea(M,M.currentTarget)&&w(M,x.pointerType||M.pointerType)};let E=M=>{M.pointerId===x.activePointerId&&(x.target&&Ea(M,x.target)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,m(nr(x.target,M),x.pointerType)):x.target&&x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,$(nr(x.target,M),x.pointerType,!1),S(M)))},F=M=>{M.pointerId===x.activePointerId&&x.isPressed&&M.button===0&&x.target&&(Ea(M,x.target)&&x.pointerType!=null?$(nr(x.target,M),x.pointerType):x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,M),x.pointerType,!1),x.isPressed=!1,x.isOverTarget=!1,x.activePointerId=null,x.pointerType=null,v(),c||vu(x.target))},R=M=>{D(M)};T.onDragStart=M=>{M.currentTarget.contains(M.target)&&D(M)}}else{T.onMouseDown=R=>{if(R.button!==0||!R.currentTarget.contains(R.target))return;if(Vh(R.currentTarget)&&R.preventDefault(),x.ignoreEmulatedMouseEvents){R.stopPropagation();return}x.isPressed=!0,x.isOverTarget=!0,x.target=R.currentTarget,x.pointerType=pg(R.nativeEvent)?"virtual":"mouse",!s&&!l&&Hr(R.currentTarget),m(R,x.pointerType)&&R.stopPropagation(),b(ye(R.currentTarget),"mouseup",E,!1)},T.onMouseEnter=R=>{if(!R.currentTarget.contains(R.target))return;let M=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!0,M=m(R,x.pointerType)),M&&R.stopPropagation()},T.onMouseLeave=R=>{if(!R.currentTarget.contains(R.target))return;let M=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!1,M=$(R,x.pointerType,!1),S(R)),M&&R.stopPropagation()},T.onMouseUp=R=>{R.currentTarget.contains(R.target)&&!x.ignoreEmulatedMouseEvents&&R.button===0&&w(R,x.pointerType||"mouse")};let E=R=>{if(R.button===0){if(x.isPressed=!1,v(),x.ignoreEmulatedMouseEvents){x.ignoreEmulatedMouseEvents=!1;return}x.target&&Ea(R,x.target)&&x.pointerType!=null?$(nr(x.target,R),x.pointerType):x.target&&x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,R),x.pointerType,!1),x.isOverTarget=!1}};T.onTouchStart=R=>{if(!R.currentTarget.contains(R.target))return;let M=nN(R.nativeEvent);if(!M)return;x.activePointerId=M.identifier,x.ignoreEmulatedMouseEvents=!0,x.isOverTarget=!0,x.isPressed=!0,x.target=R.currentTarget,x.pointerType="touch",!s&&!l&&Hr(R.currentTarget),c||l5(x.target),m(R,x.pointerType)&&R.stopPropagation(),b(Fn(R.currentTarget),"scroll",F,!0)},T.onTouchMove=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let M=d5(R.nativeEvent,x.activePointerId),z=!0;M&&Ea(M,R.currentTarget)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,z=m(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,z=$(R,x.pointerType,!1),S(R)),z&&R.stopPropagation()},T.onTouchEnd=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let M=d5(R.nativeEvent,x.activePointerId),z=!0;M&&Ea(M,R.currentTarget)&&x.pointerType!=null?(w(R,x.pointerType),z=$(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(z=$(R,x.pointerType,!1)),z&&R.stopPropagation(),x.isPressed=!1,x.activePointerId=null,x.isOverTarget=!1,x.ignoreEmulatedMouseEvents=!0,x.target&&!c&&vu(x.target),v()},T.onTouchCancel=R=>{R.currentTarget.contains(R.target)&&(R.stopPropagation(),x.isPressed&&D(R))};let F=R=>{x.isPressed&&R.target.contains(x.target)&&D({currentTarget:x.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=R=>{R.currentTarget.contains(R.target)&&D(R)}}return T},[b,s,l,v,c,D,S,$,m,w]);return y.useEffect(()=>()=>{var x;c||vu((x=g.current.target)!==null&&x!==void 0?x:void 0)},[c]),{isPressed:o||h,pressProps:de(f,k)}}function w$(e){return e.tagName==="A"&&e.hasAttribute("href")}function zh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Fn(i).HTMLInputElement&&!c7(i,n)||i instanceof Fn(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&w$(i))&&n!=="Enter")}function nN(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function d5(e,t){const n=e.changedTouches;for(let r=0;rt.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ea(e,t){let n=t.getBoundingClientRect(),r=rN(e);return iN(n,r)}function Vh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function f5(e,t){return e instanceof HTMLInputElement?!c7(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!w$(e)}const aN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function c7(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":aN.has(e.type)}const sN=_.forwardRef(({children:e,...t},n)=>{let r=y.useRef(!1),i=y.useContext(dl);n=EL(n||(i==null?void 0:i.ref));let a=de(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return b$(i,n),y.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with component."),r.current=!0)},[]),_.createElement(dl.Provider,{value:a},e)});function oN({children:e}){let t=y.useMemo(()=>({register:()=>{}}),[]);return _.createElement(dl.Provider,{value:t},e)}class lN{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function d7(e){let t=y.useRef({isFocused:!1,observer:null});he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=pt(r=>{e==null||e(r)});return y.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new lN("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function f7(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=y.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),s=d7(a),o=y.useCallback(l=>{const u=ye(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let ha=null,bg=new Set,Ao=new Map,aa=!1,yg=!1;const uN={Tab:!0,Escape:!0};function Bf(e,t){for(let n of bg)n(e,t)}function cN(e){return!(e.metaKey||!xs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Jc(e){aa=!0,cN(e)&&(ha="keyboard",Bf("keyboard",e))}function bn(e){ha="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(aa=!0,Bf("pointer",e))}function h7(e){pg(e)&&(aa=!0,ha="virtual")}function p7(e){e.target===window||e.target===document||(!aa&&!yg&&(ha="virtual",Bf("virtual",e)),aa=!1,yg=!1)}function m7(){aa=!1,yg=!0}function $g(e){if(typeof window>"u"||Ao.get(Fn(e)))return;const t=Fn(e),n=ye(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){aa=!0,r.apply(this,arguments)},n.addEventListener("keydown",Jc,!0),n.addEventListener("keyup",Jc,!0),n.addEventListener("click",h7,!0),t.addEventListener("focus",p7,!0),t.addEventListener("blur",m7,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",bn,!0),n.addEventListener("pointermove",bn,!0),n.addEventListener("pointerup",bn,!0)):(n.addEventListener("mousedown",bn,!0),n.addEventListener("mousemove",bn,!0),n.addEventListener("mouseup",bn,!0)),t.addEventListener("beforeunload",()=>{g7(e)},{once:!0}),Ao.set(t,{focus:r})}const g7=(e,t)=>{const n=Fn(e),r=ye(e);t&&r.removeEventListener("DOMContentLoaded",t),Ao.has(n)&&(n.HTMLElement.prototype.focus=Ao.get(n).focus,r.removeEventListener("keydown",Jc,!0),r.removeEventListener("keyup",Jc,!0),r.removeEventListener("click",h7,!0),n.removeEventListener("focus",p7,!0),n.removeEventListener("blur",m7,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",bn,!0),r.removeEventListener("pointermove",bn,!0),r.removeEventListener("pointerup",bn,!0)):(r.removeEventListener("mousedown",bn,!0),r.removeEventListener("mousemove",bn,!0),r.removeEventListener("mouseup",bn,!0)),Ao.delete(n))};function dN(e){const t=ye(e);let n;return t.readyState!=="loading"?$g(e):(n=()=>{$g(e)},t.addEventListener("DOMContentLoaded",n)),()=>g7(e,n)}typeof document<"u"&&dN();function v7(){return ha!=="pointer"}function b7(){return ha}function fN(e){ha=e,Bf(e,null)}const hN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pN(e,t,n){var r;const i=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLElement:HTMLElement,o=typeof window<"u"?Fn(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!hN.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof a||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof o&&!uN[n.key])}function mN(e,t,n){$g(),y.useEffect(()=>{let r=(i,a)=>{pN(!!(n!=null&&n.isTextInput),i,a)&&e(v7())};return bg.add(r),()=>{bg.delete(r)}},t)}function Ms(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=y.useRef({isFocusWithin:!1}),s=y.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,a]),o=d7(s),l=y.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),a.current.isFocusWithin=!0,o(u))},[r,i,o]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let ed=!1,Wh=0;function xg(){ed=!0,setTimeout(()=>{ed=!1},50)}function h5(e){e.pointerType==="touch"&&xg()}function gN(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",h5):document.addEventListener("touchend",xg),Wh++,()=>{Wh--,!(Wh>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",h5):document.removeEventListener("touchend",xg))}}function If(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,s]=y.useState(!1),o=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(gN,[]);let{hoverProps:l,triggerHoverEnd:u}=y.useMemo(()=>{let c=(h,p)=>{if(o.pointerType=p,i||p==="touch"||o.isHovered||!h.currentTarget.contains(h.target))return;o.isHovered=!0;let g=h.currentTarget;o.target=g,t&&t({type:"hoverstart",target:g,pointerType:p}),n&&n(!0),s(!0)},d=(h,p)=>{if(o.pointerType="",o.target=null,p==="touch"||!o.isHovered)return;o.isHovered=!1;let g=h.currentTarget;r&&r({type:"hoverend",target:g,pointerType:p}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=h=>{ed&&h.pointerType==="mouse"||c(h,h.pointerType)},f.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}):(f.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=h=>{!o.ignoreEmulatedMouseEvents&&!ed&&c(h,"mouse"),o.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,r,i,o]);return y.useEffect(()=>{i&&u({currentTarget:o.target},o.pointerType)},[i]),{hoverProps:l,isHovered:a}}function vN(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=y.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=pt(l=>{n&&$u(l,t)&&(i&&i(l),a.current.isPointerDown=!0)}),o=pt(l=>{n&&n(l)});y.useEffect(()=>{let l=a.current;if(r)return;const u=t.current,c=ye(u);if(typeof PointerEvent<"u"){let d=f=>{l.isPointerDown&&$u(f,t)&&o(f),l.isPointerDown=!1};return c.addEventListener("pointerdown",s,!0),c.addEventListener("pointerup",d,!0),()=>{c.removeEventListener("pointerdown",s,!0),c.removeEventListener("pointerup",d,!0)}}else{let d=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&$u(h,t)&&o(h),l.isPointerDown=!1},f=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&$u(h,t)&&o(h),l.isPointerDown=!1};return c.addEventListener("mousedown",s,!0),c.addEventListener("mouseup",d,!0),c.addEventListener("touchstart",s,!0),c.addEventListener("touchend",f,!0),()=>{c.removeEventListener("mousedown",s,!0),c.removeEventListener("mouseup",d,!0),c.removeEventListener("touchstart",s,!0),c.removeEventListener("touchend",f,!0)}}},[t,r,s,o])}function $u(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function p5(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function bN(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:p5(e.onKeyDown),onKeyUp:p5(e.onKeyUp)}}}function td(e){const t=ye(e);if(b7()==="virtual"){let n=t.activeElement;J8(()=>{t.activeElement===n&&e.isConnected&&Hr(e)})}else Hr(e)}function yN(e){const t=Fn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:s,visibility:o}=a(e);i=s!=="none"&&o!=="hidden"&&o!=="collapse"}return i}function $N(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function y7(e,t){return e.nodeName!=="#comment"&&yN(e)&&$N(e,t)&&(!e.parentElement||y7(e.parentElement,e))}const m5=_.createContext(null);let _e=null;function xN(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=y.useRef(null),s=y.useRef(null),o=y.useRef([]),{parentNode:l}=y.useContext(m5)||{},u=y.useMemo(()=>new wg({scopeRef:o}),[o]);he(()=>{let f=l||Ge.root;if(Ge.getTreeNode(f.scopeRef)&&_e&&!rd(_e,f.scopeRef)){let h=Ge.getTreeNode(_e);h&&(f=h)}f.addChild(u),Ge.addNode(u)},[u,l]),he(()=>{let f=Ge.getTreeNode(o);f&&(f.contain=!!n)},[n]),he(()=>{var f;let h=(f=a.current)===null||f===void 0?void 0:f.nextSibling,p=[];for(;h&&h!==s.current;)p.push(h),h=h.nextSibling;o.current=p},[t]),kN(o,r,n),EN(o,n),TN(o,r,n),CN(o,i),y.useEffect(()=>{const f=ye(o.current?o.current[0]:void 0).activeElement;let h=null;if(St(f,o.current)){for(let p of Ge.traverse())p.scopeRef&&St(f,p.scopeRef.current)&&(h=p);h===Ge.getTreeNode(o)&&(_e=h.scopeRef)}},[o]),he(()=>()=>{var f,h,p;let g=(p=(h=Ge.getTreeNode(o))===null||h===void 0||(f=h.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===_e||rd(o,_e))&&(!g||Ge.getTreeNode(g))&&(_e=g),Ge.removeTreeNode(o)},[o]);let c=y.useMemo(()=>wN(o),[]),d=y.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return _.createElement(m5.Provider,{value:d},_.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,_.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function wN(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[0].previousElementSibling,u=Vi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.nextNode();return!d&&a&&(c.currentNode=l,d=c.nextNode()),d&&Ut(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Vi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.previousNode();return!d&&a&&(c.currentNode=l,d=c.previousNode()),d&&Ut(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Vi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[0].previousElementSibling;let o=s.nextNode();return o&&Ut(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Vi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[n.length-1].nextElementSibling;let o=s.previousNode();return o&&Ut(o,!0),o}}}const D$=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],DN=D$.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";D$.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const _N=D$.join(':not([hidden]):not([tabindex="-1"]),');function Vi(e){return e[0].parentElement}function po(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function EN(e,t){let n=y.useRef(),r=y.useRef();he(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const a=ye(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!po(e)||u.isComposing)return;let c=a.activeElement,d=e.current;if(!d||!St(c,d))return;let f=Vi(d),h=an(f,{tabbable:!0},d);if(!c)return;h.currentNode=c;let p=u.shiftKey?h.previousNode():h.nextNode();p||(h.currentNode=u.shiftKey?d[d.length-1].nextElementSibling:d[0].previousElementSibling,p=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),p&&Ut(p,!0)},o=u=>{(!_e||rd(_e,e))&&St(u.target,e.current)?(_e=e,n.current=u.target):po(e)&&!nd(u.target,e)?n.current?n.current.focus():_e&&_e.current&&id(_e.current):po(e)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(a.activeElement&&po(e)&&!nd(a.activeElement,e))if(_e=e,a.body.contains(u.target)){var c;n.current=u.target,(c=n.current)===null||c===void 0||c.focus()}else _e.current&&id(_e.current)})};return a.addEventListener("keydown",s,!1),a.addEventListener("focusin",o,!1),i==null||i.forEach(u=>u.addEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{a.removeEventListener("keydown",s,!1),a.removeEventListener("focusin",o,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[e,t]),he(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function $7(e){return nd(e)}function St(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function nd(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ge.traverse(Ge.getTreeNode(t)))if(n&&St(e,n.current))return!0;return!1}function SN(e){return nd(e,_e)}function rd(e,t){var n;let r=(n=Ge.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Ut(e,t=!1){if(e!=null&&!t)try{td(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function id(e,t=!0){let n=e[0].previousElementSibling,r=Vi(e),i=an(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();t&&!a&&(r=Vi(e),i=an(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),Ut(a)}function CN(e,t){const n=_.useRef(t);y.useEffect(()=>{if(n.current){_e=e;const r=ye(e.current?e.current[0]:void 0);!St(r.activeElement,_e.current)&&e.current&&id(e.current)}n.current=!1},[e])}function kN(e,t,n){he(()=>{if(t||n)return;let r=e.current;const i=ye(r?r[0]:void 0);let a=s=>{let o=s.target;St(o,e.current)?_e=e:$7(o)||(_e=null)};return i.addEventListener("focusin",a,!1),r==null||r.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),r==null||r.forEach(s=>s.removeEventListener("focusin",a,!1))}},[e,t,n])}function PN(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function TN(e,t,n){const r=y.useRef(typeof document<"u"?ye(e.current?e.current[0]:void 0).activeElement:null);he(()=>{let i=e.current;const a=ye(i?i[0]:void 0);if(!t||n)return;let s=()=>{(!_e||rd(_e,e))&&St(a.activeElement,e.current)&&(_e=e)};return a.addEventListener("focusin",s,!1),i==null||i.forEach(o=>o.addEventListener("focusin",s,!1)),()=>{a.removeEventListener("focusin",s,!1),i==null||i.forEach(o=>o.removeEventListener("focusin",s,!1))}},[e,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!po(e)||s.isComposing)return;let o=i.activeElement;if(!St(o,e.current))return;let l=Ge.getTreeNode(e);if(!l)return;let u=l.nodeToRestore,c=an(i.body,{tabbable:!0});c.currentNode=o;let d=s.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!d||!St(d,e.current))&&u){c.currentNode=u;do d=s.shiftKey?c.previousNode():c.nextNode();while(St(d,e.current));s.preventDefault(),s.stopPropagation(),d?Ut(d,!0):$7(u)?Ut(u,!0):o.blur()}};return n||i.addEventListener("keydown",a,!0),()=>{n||i.removeEventListener("keydown",a,!0)}},[e,t,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=Ge.getTreeNode(e);if(a){var s;return a.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let o=Ge.getTreeNode(e);if(!o)return;let l=o.nodeToRestore;if(t&&l&&(St(i.activeElement,e.current)||i.activeElement===i.body&&PN(e))){let u=Ge.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){Ut(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&Ge.getTreeNode(c.scopeRef)){id(c.scopeRef.current,!0);return}c=c.parent}}})}}}},[e,t])}function an(e,t,n){let r=t!=null&&t.tabbable?_N:DN,i=ye(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&y7(a)&&(!n||St(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Lf(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&s&&(u.currentNode=r,c=u.nextNode()),c&&Ut(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});if(r.contains(l))u.currentNode=l;else{let d=Uh(u);return d&&Ut(d,!0),d??null}let c=u.previousNode();if(!c&&s){u.currentNode=r;let d=Uh(u);if(!d)return null;c=d}return c&&Ut(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=an(r,{tabbable:i,accept:a}).nextNode();return o&&Ut(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=an(r,{tabbable:i,accept:a}),o=Uh(s);return o&&Ut(o,!0),o??null}}}function Uh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class _${get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new wg({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&St(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new _$;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new wg({scopeRef:null}),this.fastMap.set(null,this.root)}}class wg{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ge=new _$;function fl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=y.useRef({isFocused:!1,isFocusVisible:t||v7()}),[a,s]=y.useState(!1),[o,l]=y.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=y.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=y.useCallback(h=>{i.current.isFocused=h,s(h),u()},[u]);mN(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:d}=f7({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=Ms({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:o,focusProps:r?f:d}}function x7(e){let{children:t,focusClass:n,focusRingClass:r}=e,{isFocused:i,isFocusVisible:a,focusProps:s}=fl(e),o=_.Children.only(t);return _.cloneElement(o,de(o.props,{...s,className:Ef({[n||""]:i,[r||""]:a})}))}let RN=_.createContext(null);function MN(e){let t=y.useContext(RN)||{};b$(t,e);let{ref:n,...r}=t;return r}function FN(e,t){let{focusProps:n}=f7(e),{keyboardProps:r}=bN(e),i=de(n,r),a=MN(t),s=e.isDisabled?{}:a,o=y.useRef(e.autoFocus);return y.useEffect(()=>{o.current&&t.current&&td(t.current),o.current=!1},[t]),{focusableProps:de({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function AN(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Qn(t);let s=Qn(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=Ll({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:l}}function w7(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=AN(e),o=Zc([!!t,!!n,r,i]),l=Zc([!!t,!!n,r,i]);return s=de(s,{"aria-describedby":[o,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:l}}}function ON(e,t){e=ui(e,"text");let{children:n,...r}=e,{styleProps:i}=st(r),a=Nn(t);return _.createElement("span",{...Xt(r),...i,ref:a},n)}const BN=y.forwardRef(ON);function D7(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:o,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:f,target:h,rel:p,type:g="button"}=e,b;n==="button"?b={type:g,disabled:r}:b={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:f,target:n==="a"?h:void 0,type:n==="input"?g:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:v,isPressed:m}=x$({onPressStart:a,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:o,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:$}=FN(e,t);c&&($.tabIndex=r?-1:$.tabIndex);let w=de($,v,Xt(e,{labelable:!0}));return{isPressed:m,buttonProps:de(b,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:D=>{d&&(d(D),console.warn("onClick is deprecated, please use onPress"))}})}}var _7={};_7={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var E7={};E7={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var S7={};S7={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var C7={};C7={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var k7={};k7={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var P7={};P7={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var T7={};T7={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var R7={};R7={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var M7={};M7={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var F7={};F7={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var A7={};A7={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var O7={};O7={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var B7={};B7={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var I7={};I7={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var L7={};L7={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var N7={};N7={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var j7={};j7={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var z7={};z7={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var V7={};V7={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var W7={};W7={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var U7={};U7={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var H7={};H7={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var K7={};K7={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var Y7={};Y7={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var q7={};q7={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var G7={};G7={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var Z7={};Z7={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var X7={};X7={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var Q7={};Q7={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var J7={};J7={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var eE={};eE={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var tE={};tE={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var nE={};nE={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var rE={};rE={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var Nl={};Nl={"ar-AE":_7,"bg-BG":E7,"cs-CZ":S7,"da-DK":C7,"de-DE":k7,"el-GR":P7,"en-US":T7,"es-ES":R7,"et-EE":M7,"fi-FI":F7,"fr-FR":A7,"he-IL":O7,"hr-HR":B7,"hu-HU":I7,"it-IT":L7,"ja-JP":N7,"ko-KR":j7,"lt-LT":z7,"lv-LV":V7,"nb-NO":W7,"nl-NL":U7,"pl-PL":H7,"pt-BR":K7,"pt-PT":Y7,"ro-RO":q7,"ru-RU":G7,"sk-SK":Z7,"sl-SI":X7,"sr-SP":Q7,"sv-SE":J7,"tr-TR":eE,"uk-UA":tE,"zh-CN":nE,"zh-TW":rE};function iE(e){return e&&e.__esModule?e.default:e}const E$=new WeakMap;function hl(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function IN(e){let t=Sn(iE(Nl),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let i=xn({weekday:"long",month:"long",year:"numeric",day:"numeric",era:hl(n)||hl(r),timeZone:e.timeZone}),a="anchorDate"in e?e.anchorDate:null;return y.useMemo(()=>{if(!a&&n&&r)if(Ze(n,r)){let s=i.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:s})}else{let s=_g(i,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:s})}return""},[n,r,a,e.timeZone,t,i])}function Dg(e,t,n,r){let i=Sn(iE(Nl),"@react-aria/calendar"),a=hl(e)||hl(t),s=xn({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),o=xn({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return y.useMemo(()=>{if(Ze(e,ta(e))){if(Ze(t,Wc(e)))return s.format(e.toDate(n));if(Ze(t,Wc(t)))return r?_g(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))}return r?_g(o,i,e,t,n):o.formatRange(e.toDate(n),t.toDate(n))},[e,t,s,o,i,n,r])}function _g(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),s=-1;for(let u=0;us&&(l+=a[u].value);return t.format("dateRange",{startDate:o,endDate:l})}const aE=7e3;let Oo=null;function Eg(e,t="assertive",n=aE){Oo||(Oo=new NN),Oo.announce(e,t,n)}function LN(e){Oo&&Oo.clear(e)}class NN{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=aE){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function jN(e){return e&&e.__esModule?e.default:e}function zN(e,t){let n=Sn(jN(Nl),"@react-aria/calendar"),r=Xt(e),i=Dg(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=Dg(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);e5(()=>{t.isFocused||Eg(a)},[a]);let s=IN(t);e5(()=>{s&&Eg(s,"polite",4e3)},[s]);let o=Zc([!!e.errorMessage,e.isInvalid,e.validationState]);E$.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:o,selectedDateDescription:s});let[l,u]=y.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[d,f]=y.useState(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();h&&d&&(f(!1),t.setFocused(!0));let p=Ll({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:de(r,p,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:h,onFocusChange:f},errorMessageProps:{id:o},title:i}}function VN(e,t,n){let r=zN(e,t),i=y.useRef(!1),a=y.useRef(typeof window<"u"?window:null);return as(a,"pointerdown",o=>{i.current=o.width===0&&o.height===0}),as(a,"pointerup",o=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=o.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=o=>{n.current&&(!o.relatedTarget||!n.current.contains(o.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},as(n,"touchmove",o=>{t.isDragging&&o.preventDefault()},{passive:!1,capture:!0}),r}function WN(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:i}=Qe(),a=h=>{switch(h.key){case"Enter":case" ":h.preventDefault(),t.selectFocusedDate();break;case"PageUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousSection(h.shiftKey);break;case"PageDown":h.preventDefault(),h.stopPropagation(),t.focusNextSection(h.shiftKey);break;case"End":h.preventDefault(),h.stopPropagation(),t.focusSectionEnd();break;case"Home":h.preventDefault(),h.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":h.preventDefault(),h.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(h.preventDefault(),t.setAnchorDate(null));break}},s=Dg(n,r,t.timeZone,!0),{ariaLabel:o,ariaLabelledBy:l}=E$.get(t),u=Ll({"aria-label":[o,s].filter(Boolean).join(", "),"aria-labelledby":l}),c=xn({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=Qe(),f=y.useMemo(()=>{let h=ol(Ol(t.timeZone),d);return[...new Array(7).keys()].map(p=>{let b=h.add({days:p}).toDate(t.timeZone);return c.format(b)})},[d,t.timeZone,c]);return{gridProps:de(u,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:a,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f}}function UN(e){return e&&e.__esModule?e.default:e}function HN(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:s}=E$.get(t),o=Sn(UN(Nl),"@react-aria/calendar"),l=xn({weekday:"long",day:"numeric",month:"long",year:"numeric",era:hl(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r);i=i||t.isCellDisabled(r);let d=t.isCellUnavailable(r),f=!i&&!d,h=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&Ze(t.value,r));h&&(u=!0),r=i7(r,ag);let p=y.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),g=x8(r,t.timeZone),b=y.useMemo(()=>{let E="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Ze(r,t.value.start)||Ze(r,t.value.end))&&(E=s+", "),E+=l.format(p),g?E=o.format(u?"todayDateSelected":"todayDate",{date:E}):u&&(E=o.format("dateSelected",{date:E})),t.minValue&&Ze(r,t.minValue)?E+=", "+o.format("minimumDate"):t.maxValue&&Ze(r,t.maxValue)&&(E+=", "+o.format("maximumDate")),E},[l,p,o,u,g,r,t,s]),v="";"anchorDate"in t&&c&&!t.isReadOnly&&f&&(t.anchorDate?v=o.format("finishRangeSelectionPrompt"):v=o.format("startRangeSelectionPrompt"));let m=y$(v),$=y.useRef(!1),w=y.useRef(!1),D=y.useRef(null),{pressProps:S,isPressed:k}=x$({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(E){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(E.pointerType==="mouse"||E.pointerType==="touch")){if(t.highlightedRange&&!h){if(Ze(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}else if(Ze(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}}let F=()=>{t.setDragging(!0),D.current=null,t.selectDate(r),t.setFocusedDate(r),$.current=!0};E.pointerType==="touch"?D.current=setTimeout(F,200):F()}},onPressEnd(){w.current=!1,$.current=!1,clearTimeout(D.current),D.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(E){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(w.current)t.setAnchorDate(r);else if(t.anchorDate&&!$.current)t.selectDate(r),t.setFocusedDate(r);else if(E.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let F=r.add({days:1});t.isInvalid(F)&&(F=r.subtract({days:1})),t.isInvalid(F)||t.setFocusedDate(F)}else E.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),x=null;i||(x=Ze(r,t.focusedDate)?0:-1),y.useEffect(()=>{c&&n.current&&(Hr(n.current),b7()!=="pointer"&&document.activeElement===n.current&&r7(n.current,{containingElement:Ff(n.current)}))},[c,n]);let T=xn({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),P=y.useMemo(()=>T.formatToParts(p).find(E=>E.type==="day").value,[T,p]);return{cellProps:{role:"gridcell","aria-disabled":!f||null,"aria-selected":u||null,"aria-invalid":h||null},buttonProps:de(S,{onFocus(){i||t.setFocusedDate(r)},tabIndex:x,role:"button","aria-disabled":!f||null,"aria-label":b,"aria-invalid":h||null,"aria-describedby":[h?a:null,m["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(E){"highlightDate"in t&&(E.pointerType!=="touch"||t.isDragging)&&f&&t.highlightDate(r)},onPointerDown(E){"releasePointerCapture"in E.target&&E.target.releasePointerCapture(E.pointerId)},onContextMenu(E){E.preventDefault()}}),isPressed:k,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:P}}function KN(e,t,n){let{validationBehavior:r,focus:i}=e;he(()=>{if(r==="native"&&(n!=null&&n.current)){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(qN(n.current))}});let a=pt(()=>{t.resetValidation()}),s=pt(l=>{var u;t.displayValidation.isInvalid||t.commitValidation();let c=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&n&&c&&GN(c)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),fN("keyboard")}l.preventDefault()}),o=pt(()=>{t.commitValidation()});y.useEffect(()=>{let l=n==null?void 0:n.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",s),l.addEventListener("change",o),u==null||u.addEventListener("reset",a),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",o),u==null||u.removeEventListener("reset",a)}},[n,s,o,a,r])}function YN(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function qN(e){return{isInvalid:!e.validity.valid,validationDetails:YN(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function GN(e){for(let t=0;tg5(QN(s,i)),[s,i]);a!=null&&a.validationDetails.valid&&(a=null);let c=y.useContext(ZN),d=y.useMemo(()=>r?Array.isArray(r)?r.flatMap(P=>Sg(c[P])):Sg(c[r]):[],[c,r]),[f,h]=y.useState(c),[p,g]=y.useState(!1);c!==f&&(h(c),g(!1));let b=y.useMemo(()=>g5(p?[]:d),[p,d]),v=y.useRef(Ii),[m,$]=y.useState(Ii),w=y.useRef(Ii),D=()=>{if(!S)return;k(!1);let P=u||a||v.current;Hh(P,w.current)||(w.current=P,$(P))},[S,k]=y.useState(!1);return y.useEffect(D),{realtimeValidation:l||b||u||a||Ii,displayValidation:o==="native"?l||b||m:l||b||u||a||m,updateValidation(P){o==="aria"&&!Hh(m,P)?$(P):v.current=P},resetValidation(){let P=Ii;Hh(P,w.current)||(w.current=P,$(P)),o==="native"&&k(!1),g(!0)},commitValidation(){o==="native"&&k(!0),g(!0)}}}function Sg(e){return e?Array.isArray(e)?e:[e]:[]}function QN(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Sg(n)}return[]}function g5(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:sE}:null}function Hh(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function sd(...e){let t=new Set,n=!1,r={...Nf};for(let s of e){var i,a;for(let o of s.validationErrors)t.add(o);n||(n=s.isInvalid);for(let o in r)(i=r)[a=o]||(i[a]=s.validationDetails[o])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}const Ya={top:"top",bottom:"top",left:"left",right:"left"},od={top:"bottom",bottom:"top",left:"right",right:"left"},JN={top:"left",left:"top"},Cg={top:"height",left:"width"},lE={width:"totalWidth",height:"totalHeight"},xu={};let Lt=typeof document<"u"&&window.visualViewport;function v5(e){let t=0,n=0,r=0,i=0,a=0,s=0,o={},l=(Lt==null?void 0:Lt.scale)>1;if(e.tagName==="BODY"){let d=document.documentElement;r=d.clientWidth,i=d.clientHeight;var u;t=(u=Lt==null?void 0:Lt.width)!==null&&u!==void 0?u:r;var c;n=(c=Lt==null?void 0:Lt.height)!==null&&c!==void 0?c:i,o.top=d.scrollTop||e.scrollTop,o.left=d.scrollLeft||e.scrollLeft,Lt&&(a=Lt.offsetTop,s=Lt.offsetLeft)}else({width:t,height:n,top:a,left:s}=ss(e)),o.top=e.scrollTop,o.left=e.scrollLeft,r=t,i=n;return Z8()&&(e.tagName==="BODY"||e.tagName==="HTML")&&l&&(o.top=0,o.left=0,a=Lt.pageTop,s=Lt.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:o,top:a,left:s}}function ej(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function b5(e,t,n,r,i,a,s){let o=i.scroll[e],l=r[Cg[e]],u=r.scroll[Ya[e]]+a,c=l+r.scroll[Ya[e]]-a,d=t-o+s[e]-r[Ya[e]],f=t-o+n+s[e]-r[Ya[e]];return dc?Math.max(c-f,u-d):0}function tj(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function y5(e){if(xu[e])return xu[e];let[t,n]=e.split(" "),r=Ya[t]||"right",i=JN[r];Ya[n]||(n="center");let a=Cg[r],s=Cg[i];return xu[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:s},xu[e]}function Kh(e,t,n,r,i,a,s,o,l,u){let{placement:c,crossPlacement:d,axis:f,crossAxis:h,size:p,crossSize:g}=r,b={};b[h]=e[h],d==="center"?b[h]+=(e[g]-n[g])/2:d!==h&&(b[h]+=e[g]-n[g]),b[h]+=a;const v=e[h]-n[g]+l+u,m=e[h]+e[g]-l-u;if(b[h]=mg(b[h],v,m),c===f){const $=o?s[p]:t[lE[p]];b[od[f]]=Math.floor($-e[f]+i)}else b[f]=Math.floor(e[f]+e[p]+i);return b}function nj(e,t,n,r,i,a,s,o){const l=r?n.height:t[lE.height];let u=e.top!=null?n.top+e.top:n.top+(l-e.bottom-s),c=o!=="top"?Math.max(0,t.height+t.top+t.scroll.top-u-(i.top+i.bottom+a)):Math.max(0,u+s-(t.top+t.scroll.top)-(i.top+i.bottom+a));return Math.min(t.height-a*2,c)}function $5(e,t,n,r,i,a){let{placement:s,axis:o,size:l}=a;return s===o?Math.max(0,n[o]-e[o]-e.scroll[o]+t[o]-r[o]-r[od[o]]-i):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-n[o]-n[l]-r[o]-r[od[o]]-i)}function rj(e,t,n,r,i,a,s,o,l,u,c,d,f,h,p,g){let b=y5(e),{size:v,crossAxis:m,crossSize:$,placement:w,crossPlacement:D}=b,S=Kh(t,o,n,b,c,d,u,f,p,g),k=c,x=$5(o,u,t,i,a+c,b);if(s&&r[v]>x){let B=y5(`${od[w]} ${D}`),N=Kh(t,o,n,B,c,d,u,f,p,g);$5(o,u,t,i,a+c,B)>x&&(b=B,S=N,k=c)}let T="bottom";b.axis==="top"?b.placement==="top"?T="top":b.placement==="bottom"&&(T="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?T="bottom":b.crossPlacement==="bottom"&&(T="top"));let P=b5(m,S[m],n[$],o,l,a,u);S[m]+=P;let E=nj(S,o,u,f,i,a,n.height,T);h&&h{if(!n||r===null)return;let i=a=>{let s=a.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=r||uE.get(t.current);o&&o()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let Ke=typeof document<"u"&&window.visualViewport;function oj(e){let{direction:t}=Qe(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:a=i,placement:s="bottom",containerPadding:o=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:d=0,shouldUpdatePosition:f=!0,isOpen:h=!0,onClose:p,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,m]=y.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),$=[f,s,i.current,r.current,a.current,o,l,u,c,d,h,t,g,b,n],w=y.useRef(Ke==null?void 0:Ke.scale);y.useEffect(()=>{h&&(w.current=Ke==null?void 0:Ke.scale)},[h]);let D=y.useCallback(()=>{if(f===!1||!h||!i.current||!r.current||!a.current||!u||(Ke==null?void 0:Ke.scale)!==w.current)return;let x=i.current;if(!g&&i.current){var T;x.style.top="0px",x.style.bottom="";var P;x.style.maxHeight=((P=(T=window.visualViewport)===null||T===void 0?void 0:T.height)!==null&&P!==void 0?P:window.innerHeight)+"px"}let E=ij({placement:uj(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:a.current,padding:o,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:g,arrowSize:n,arrowBoundaryOffset:b});x.style.top="",x.style.bottom="",Object.keys(E.position).forEach(F=>x.style[F]=E.position[F]+"px"),x.style.maxHeight=E.maxHeight!=null?E.maxHeight+"px":void 0,m(E)},$);he(D,$),lj(D),t7({ref:i,onResize:D});let S=y.useRef(!1);he(()=>{let x,T=()=>{S.current=!0,clearTimeout(x),x=setTimeout(()=>{S.current=!1},500),D()},P=()=>{S.current&&T()};return Ke==null||Ke.addEventListener("resize",T),Ke==null||Ke.addEventListener("scroll",P),()=>{Ke==null||Ke.removeEventListener("resize",T),Ke==null||Ke.removeEventListener("scroll",P)}},[D]);let k=y.useCallback(()=>{S.current||p()},[p,S]);return sj({triggerRef:r,isOpen:h,onClose:p&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...v.position,maxHeight:v.maxHeight}},placement:v.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v.arrowOffsetLeft,top:v.arrowOffsetTop}},updatePosition:D}}function lj(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function uj(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const rr=[];function cE(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;y.useEffect(()=>(i&&rr.push(t),()=>{let p=rr.indexOf(t);p>=0&&rr.splice(p,1)}),[i,t]);let l=()=>{rr[rr.length-1]===t&&n&&n()},u=p=>{(!o||o(p.target))&&rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault())},c=p=>{(!o||o(p.target))&&(rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault()),l())},d=p=>{p.key==="Escape"&&!s&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};vN({ref:t,onInteractOutside:a&&i?c:null,onInteractOutsideStart:u});let{focusWithinProps:f}=Ms({isDisabled:!r,onBlurWithin:p=>{!p.relatedTarget||SN(p.relatedTarget)||(!o||o(p.relatedTarget))&&n()}}),h=p=>{p.target===p.currentTarget&&p.preventDefault()};return{overlayProps:{onKeyDown:d,...f},underlayProps:{onPointerDown:h}}}function cj(e,t,n){let{type:r}=e,{isOpen:i}=t;y.useEffect(()=>{n&&n.current&&uE.set(n.current,t.close)});let a;r==="menu"?a=!0:r==="listbox"&&(a="listbox");let s=Qn();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?s:null,onPress:t.toggle},overlayProps:{id:s}}}const Yh=typeof document<"u"&&window.visualViewport,dj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let wu=0,qh;function dE(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return wu++,wu===1&&(Mf()?qh=hj():qh=fj()),()=>{wu--,wu===0&&qh()}},[t])}function fj(){return cl(qa(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),qa(document.documentElement,"overflow","hidden"))}function hj(){let e,t,n=u=>{e=Ff(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=qa(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=u=>{let c=u.target;_5(c)&&c!==document.activeElement&&(u.preventDefault(),o(),c.style.transform="translateY(-2000px)",c.focus(),requestAnimationFrame(()=>{c.style.transform=""})),t&&t()},a=u=>{let c=u.target;_5(c)&&(o(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",Yh&&(Yh.height{D5(c)}):Yh.addEventListener("resize",()=>D5(c),{once:!0}))}))},s=null,o=()=>{if(s)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,d=window.pageYOffset;s=cl(Ks(window,"scroll",u),qa(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),qa(document.documentElement,"overflow","hidden"),qa(document.body,"marginTop",`-${d}px`),()=>{window.scrollTo(c,d)}),window.scrollTo(0,0)},l=cl(Ks(document,"touchstart",n,{passive:!1,capture:!0}),Ks(document,"touchmove",r,{passive:!1,capture:!0}),Ks(document,"touchend",i,{passive:!1,capture:!0}),Ks(document,"focus",a,!0));return()=>{t==null||t(),s==null||s(),l()}}function qa(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ks(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function D5(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Ff(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function _5(e){return e instanceof HTMLInputElement&&!dj.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const kg=_.createContext(null);function pj(e){let{children:t}=e,n=y.useContext(kg),[r,i]=y.useState(0),a=y.useMemo(()=>({parent:n,modalCount:r,addModal(){i(s=>s+1),n&&n.addModal()},removeModal(){i(s=>s-1),n&&n.removeModal()}}),[n,r]);return _.createElement(kg.Provider,{value:a},t)}function mj(){let e=y.useContext(kg);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}var fE={};fE={dismiss:"تجاهل"};var hE={};hE={dismiss:"Отхвърляне"};var pE={};pE={dismiss:"Odstranit"};var mE={};mE={dismiss:"Luk"};var gE={};gE={dismiss:"Schließen"};var vE={};vE={dismiss:"Απόρριψη"};var bE={};bE={dismiss:"Dismiss"};var yE={};yE={dismiss:"Descartar"};var $E={};$E={dismiss:"Lõpeta"};var xE={};xE={dismiss:"Hylkää"};var wE={};wE={dismiss:"Rejeter"};var DE={};DE={dismiss:"התעלם"};var _E={};_E={dismiss:"Odbaci"};var EE={};EE={dismiss:"Elutasítás"};var SE={};SE={dismiss:"Ignora"};var CE={};CE={dismiss:"閉じる"};var kE={};kE={dismiss:"무시"};var PE={};PE={dismiss:"Atmesti"};var TE={};TE={dismiss:"Nerādīt"};var RE={};RE={dismiss:"Lukk"};var ME={};ME={dismiss:"Negeren"};var FE={};FE={dismiss:"Zignoruj"};var AE={};AE={dismiss:"Descartar"};var OE={};OE={dismiss:"Dispensar"};var BE={};BE={dismiss:"Revocare"};var IE={};IE={dismiss:"Пропустить"};var LE={};LE={dismiss:"Zrušiť"};var NE={};NE={dismiss:"Opusti"};var jE={};jE={dismiss:"Odbaci"};var zE={};zE={dismiss:"Avvisa"};var VE={};VE={dismiss:"Kapat"};var WE={};WE={dismiss:"Скасувати"};var UE={};UE={dismiss:"取消"};var HE={};HE={dismiss:"關閉"};var KE={};KE={"ar-AE":fE,"bg-BG":hE,"cs-CZ":pE,"da-DK":mE,"de-DE":gE,"el-GR":vE,"en-US":bE,"es-ES":yE,"et-EE":$E,"fi-FI":xE,"fr-FR":wE,"he-IL":DE,"hr-HR":_E,"hu-HU":EE,"it-IT":SE,"ja-JP":CE,"ko-KR":kE,"lt-LT":PE,"lv-LV":TE,"nb-NO":RE,"nl-NL":ME,"pl-PL":FE,"pt-BR":AE,"pt-PT":OE,"ro-RO":BE,"ru-RU":IE,"sk-SK":LE,"sl-SI":NE,"sr-SP":jE,"sv-SE":zE,"tr-TR":VE,"uk-UA":WE,"zh-CN":UE,"zh-TW":HE};const E5={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function gj(e={}){let{style:t,isFocusable:n}=e,[r,i]=y.useState(!1),{focusWithinProps:a}=Ms({isDisabled:!n,onFocusWithinChange:o=>i(o)}),s=y.useMemo(()=>r?t:t?{...E5,...t}:E5,[r]);return{visuallyHiddenProps:{...a,style:s}}}function Pg(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:s}=gj(e);return _.createElement(n,de(a,s),t)}function vj(e){return e&&e.__esModule?e.default:e}function ld(e){let{onDismiss:t,...n}=e,r=Sn(vj(KE),"@react-aria/overlays"),i=Ll(n,r.format("dismiss")),a=()=>{t&&t()};return _.createElement(Pg,null,_.createElement("button",{...i,tabIndex:-1,onClick:a,style:{width:1,height:1}}))}let Ys=new WeakMap,fn=[];function YE(e,t=document.body){let n=new Set(e),r=new Set,i=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(f);let u=f=>{if(n.has(f)||r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&a(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)a(f),f=c.nextNode()}},a=l=>{var u;let c=(u=Ys.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Ys.set(l,c+1))};fn.length&&fn[fn.length-1].disconnect(),i(t);let s=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});s.observe(t,{childList:!0,subtree:!0});let o={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return fn.push(o),()=>{s.disconnect();for(let l of r){let u=Ys.get(l);u===1?(l.removeAttribute("aria-hidden"),Ys.delete(l)):Ys.set(l,u-1)}o===fn[fn.length-1]?(fn.pop(),fn.length&&fn[fn.length-1].observe()):fn.splice(fn.indexOf(o),1)}}function bj(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...o}=e,{overlayProps:l,underlayProps:u}=cE({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},r),{overlayProps:c,arrowProps:d,placement:f}=oj({...o,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:null});return dE({isDisabled:i||!t.isOpen}),he(()=>{if(t.isOpen&&!i&&r.current)return YE([r.current])},[i,t.isOpen,r]),{popoverProps:de(l,c),arrowProps:d,underlayProps:u,placement:f}}const yj=y.createContext({});function $j(){var e;return(e=y.useContext(yj))!==null&&e!==void 0?e:{}}const qE=_.createContext(null);function xj(e){let t=fa(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=y.useState(!1),s=y.useMemo(()=>({contain:i,setContain:a}),[i,a]),{getContainer:o}=$j();if(!e.portalContainer&&o&&(n=o()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=_.createElement(xN,{restoreFocus:!0,contain:i&&!r},l)),l=_.createElement(qE.Provider,{value:s},_.createElement(oN,null,l)),uo.createPortal(l,n)}function GE(){let e=y.useContext(qE),t=e==null?void 0:e.setContain;he(()=>{t==null||t(!0)},[t])}function ZE(e,t,n){let{overlayProps:r,underlayProps:i}=cE({...e,isOpen:t.isOpen,onClose:t.close},n);return dE({isDisabled:!t.isOpen}),GE(),y.useEffect(()=>{if(t.isOpen)return YE([n.current])},[t.isOpen,n]),{modalProps:de(r),underlayProps:i}}var XE={};XE={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var QE={};QE={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var JE={};JE={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var e9={};e9={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var t9={};t9={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var n9={};n9={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var r9={};r9={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var i9={};i9={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var a9={};a9={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var s9={};s9={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var o9={};o9={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var l9={};l9={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var u9={};u9={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var c9={};c9={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var d9={};d9={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var f9={};f9={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var h9={};h9={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var p9={};p9={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var m9={};m9={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var g9={};g9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var v9={};v9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var b9={};b9={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var y9={};y9={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var $9={};$9={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var x9={};x9={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var w9={};w9={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var D9={};D9={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var _9={};_9={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var E9={};E9={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var S9={};S9={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var C9={};C9={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var k9={};k9={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var P9={};P9={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var T9={};T9={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var jf={};jf={"ar-AE":XE,"bg-BG":QE,"cs-CZ":JE,"da-DK":e9,"de-DE":t9,"el-GR":n9,"en-US":r9,"es-ES":i9,"et-EE":a9,"fi-FI":s9,"fr-FR":o9,"he-IL":l9,"hr-HR":u9,"hu-HU":c9,"it-IT":d9,"ja-JP":f9,"ko-KR":h9,"lt-LT":p9,"lv-LV":m9,"nb-NO":g9,"nl-NL":v9,"pl-PL":b9,"pt-BR":y9,"pt-PT":$9,"ro-RO":x9,"ru-RU":w9,"sk-SK":D9,"sl-SI":_9,"sr-SP":E9,"sv-SE":S9,"tr-TR":C9,"uk-UA":k9,"zh-CN":P9,"zh-TW":T9};function R9(e,t,n){let{direction:r}=Qe(),i=y.useMemo(()=>Lf(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusNext():i.focusPrevious();break;case"ArrowRight":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusPrevious():i.focusNext();break}},s=()=>{var l;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=an(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let d;do d=c.lastChild(),d&&(u=d);while(d)}for(;u!=null&&u.hasAttribute("data-placeholder");){let d=c.previousNode();if(d&&d.hasAttribute("data-placeholder"))u=d;else break}u&&u.focus()},{pressProps:o}=x$({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&s()},onPress(l){l.pointerType!=="mouse"&&s()}});return de(o,{onKeyDown:a})}function wj(e){return e&&e.__esModule?e.default:e}const M9=new WeakMap,sc="__role_"+Date.now(),F9="__focusManager_"+Date.now();function A9(e,t,n){var r;let{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:o,fieldProps:l,descriptionProps:u,errorMessageProps:c}=w7({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),d=y.useRef(null),{focusWithinProps:f}=Ms({...e,onFocusWithin(P){var E;d.current=t.value,(E=e.onFocus)===null||E===void 0||E.call(e,P)},onBlurWithin:P=>{var E;t.confirmPlaceholder(),t.value!==d.current&&t.commitValidation(),(E=e.onBlur)===null||E===void 0||E.call(e,P)},onFocusWithinChange:e.onFocusChange}),h=Sn(wj(jf),"@react-aria/datepicker"),p=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",g=t.maxGranularity==="hour"?"time":"date",b=t.value?h.format(p,{[g]:t.formatValue({month:"long"})}):"",v=y$(b),m=e[sc]==="presentation"?l["aria-describedby"]:[v["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[F9],w=y.useMemo(()=>$||Lf(n),[$,n]),D=R9(t,n,e[sc]==="presentation");M9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[o.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:m,focusManager:w});let S=y.useRef(e.autoFocus),k;e[sc]==="presentation"?k={role:"presentation"}:k=de(l,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":m}),y.useEffect(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),RL(e.inputRef,t.value,t.setValue),KN({...e,focus(){w.focusFirst()}},t,e.inputRef);let x={type:"hidden",name:e.name,value:((r=t.value)===null||r===void 0?void 0:r.toString())||""};e.validationBehavior==="native"&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let T=Xt(e);return{labelProps:{...o,onClick:()=>{w.focusFirst()}},fieldProps:de(T,k,D,f,{onKeyDown(P){e.onKeyDown&&e.onKeyDown(P)},onKeyUp(P){e.onKeyUp&&e.onKeyUp(P)}}),inputProps:x,descriptionProps:u,errorMessageProps:c,isInvalid:i,validationErrors:a,validationDetails:s}}function Dj(e,t,n){var r;let i=A9(e,t,n);return i.inputProps.value=((r=t.timeValue)===null||r===void 0?void 0:r.toString())||"",i}function _j(e){return e&&e.__esModule?e.default:e}function O9(){let{locale:e}=Qe(),t=y8(_j(jf),"@react-aria/datepicker");return y.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new Ej(e,t)}},[e,t])}class Ej{of(t){return this.dictionary.getStringForLocale(t,this.locale)}constructor(t,n){this.locale=t,this.dictionary=n}}var B9={};B9={Empty:"فارغ"};var I9={};I9={Empty:"Изпразни"};var L9={};L9={Empty:"Prázdné"};var N9={};N9={Empty:"Tom"};var j9={};j9={Empty:"Leer"};var z9={};z9={Empty:"Άδειο"};var V9={};V9={Empty:"Empty"};var W9={};W9={Empty:"Vacío"};var U9={};U9={Empty:"Tühjenda"};var H9={};H9={Empty:"Tyhjä"};var K9={};K9={Empty:"Vide"};var Y9={};Y9={Empty:"ריק"};var q9={};q9={Empty:"Prazno"};var G9={};G9={Empty:"Üres"};var Z9={};Z9={Empty:"Vuoto"};var X9={};X9={Empty:"空"};var Q9={};Q9={Empty:"비어 있음"};var J9={};J9={Empty:"Tuščias"};var eS={};eS={Empty:"Tukšs"};var tS={};tS={Empty:"Tom"};var nS={};nS={Empty:"Leeg"};var rS={};rS={Empty:"Pusty"};var iS={};iS={Empty:"Vazio"};var aS={};aS={Empty:"Vazio"};var sS={};sS={Empty:"Gol"};var oS={};oS={Empty:"Не заполнено"};var lS={};lS={Empty:"Prázdne"};var uS={};uS={Empty:"Prazen"};var cS={};cS={Empty:"Prazno"};var dS={};dS={Empty:"Tomt"};var fS={};fS={Empty:"Boş"};var hS={};hS={Empty:"Пусто"};var pS={};pS={Empty:"空"};var mS={};mS={Empty:"空白"};var gS={};gS={"ar-AE":B9,"bg-BG":I9,"cs-CZ":L9,"da-DK":N9,"de-DE":j9,"el-GR":z9,"en-US":V9,"es-ES":W9,"et-EE":U9,"fi-FI":H9,"fr-FR":K9,"he-IL":Y9,"hr-HR":q9,"hu-HU":G9,"it-IT":Z9,"ja-JP":X9,"ko-KR":Q9,"lt-LT":J9,"lv-LV":eS,"nb-NO":tS,"nl-NL":nS,"pl-PL":rS,"pt-BR":iS,"pt-PT":aS,"ro-RO":sS,"ru-RU":oS,"sk-SK":lS,"sl-SI":uS,"sr-SP":cS,"sv-SE":dS,"tr-TR":fS,"uk-UA":hS,"zh-CN":pS,"zh-TW":mS};function Sj(e){return e&&e.__esModule?e.default:e}function Cj(e){const t=y.useRef();let{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:s,isReadOnly:o,isRequired:l,onIncrement:u,onIncrementPage:c,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:p}=e;const g=Sn(Sj(gS),"@react-aria/spinbutton"),b=()=>clearTimeout(t.current);y.useEffect(()=>()=>b(),[]);let v=E=>{if(!(E.ctrlKey||E.metaKey||E.shiftKey||E.altKey||o))switch(E.key){case"PageUp":if(c){E.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(E.preventDefault(),u==null||u());break;case"PageDown":if(f){E.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(E.preventDefault(),d==null||d());break;case"Home":h&&(E.preventDefault(),h==null||h());break;case"End":p&&(E.preventDefault(),p==null||p());break}},m=y.useRef(!1),$=()=>{m.current=!0},w=()=>{m.current=!1},D=r===""?g.format("Empty"):(r||`${n}`).replace("-","−");y.useEffect(()=>{m.current&&(LN("assertive"),Eg(D,"assertive"))},[D]);const S=pt(E=>{b(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n{b(),d==null||d(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&k(60)},E)});let x=E=>{E.preventDefault()},{addGlobalListener:T,removeAllGlobalListeners:P}=e7();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":D,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":o||void 0,"aria-required":l||void 0,onKeyDown:v,onFocus:$,onBlur:w},incrementButtonProps:{onPressStart:()=>{S(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w},decrementButtonProps:{onPressStart:()=>{k(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w}}}function kj(e,t,n){let r=y.useRef(""),{locale:i}=Qe(),a=O9(),{ariaLabel:s,ariaLabelledBy:o,ariaDescribedBy:l,focusManager:u}=M9.get(t),c=e.isPlaceholder?"":e.text,d=y.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),f=xn({month:"long",timeZone:d.timeZone}),h=xn({hour:"numeric",hour12:d.hour12,timeZone:d.timeZone});if(e.type==="month"&&!e.isPlaceholder){let C=f.format(t.dateValue);c=C!==c?`${c} – ${C}`:C}else e.type==="hour"&&!e.isPlaceholder&&(c=h.format(t.dateValue));let{spinButtonProps:p}=Cj({value:e.value,textValue:c,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current="",t.increment(e.type)},onDecrement:()=>{r.current="",t.decrement(e.type)},onIncrementPage:()=>{r.current="",t.incrementPage(e.type)},onDecrementPage:()=>{r.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{r.current="",t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current="",t.setSegment(e.type,e.minValue)}}),g=y.useMemo(()=>new s7(i,{maximumFractionDigits:0}),[i]),b=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let C=e.text.slice(0,-1),A=g.parse(C);C=A===0?"":C,C.length===0||A===0?t.clearSegment(e.type):t.setSegment(e.type,A),r.current=C}else e.type==="dayPeriod"&&t.clearSegment(e.type)},v=C=>{if(C.key==="a"&&(xs()?C.metaKey:C.ctrlKey)&&C.preventDefault(),!(C.ctrlKey||C.metaKey||C.shiftKey||C.altKey))switch(C.key){case"Backspace":case"Delete":C.preventDefault(),C.stopPropagation(),b();break}},{startsWith:m}=VL({sensitivity:"base"}),$=xn({hour:"numeric",hour12:!0}),w=y.useMemo(()=>{let C=new Date;return C.setHours(0),$.formatToParts(C).find(A=>A.type==="dayPeriod").value},[$]),D=y.useMemo(()=>{let C=new Date;return C.setHours(12),$.formatToParts(C).find(A=>A.type==="dayPeriod").value},[$]),S=xn({year:"numeric",era:"narrow",timeZone:"UTC"}),k=y.useMemo(()=>{if(e.type!=="era")return[];let C=Oe(new Je(1,1,1),t.calendar),A=t.calendar.getEras().map(N=>{let X=C.set({year:1,month:1,day:1,era:N}).toDate("UTC"),je=S.formatToParts(X).find($e=>$e.type==="era").value;return{era:N,formatted:je}}),B=Pj(A.map(N=>N.formatted));if(B)for(let N of A)N.formatted=N.formatted.slice(B);return A},[S,t.calendar,e.type]),x=C=>{if(t.isDisabled||t.isReadOnly)return;let A=r.current+C;switch(e.type){case"dayPeriod":if(m(w,C))t.setSegment("dayPeriod",0);else if(m(D,C))t.setSegment("dayPeriod",12);else break;u.focusNext();break;case"era":{let B=k.find(N=>m(N.formatted,C));B&&(t.setSegment("era",B.era),u.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!g.isValidPartialNumber(A))return;let B=g.parse(A),N=B,X=e.minValue===0;if(e.type==="hour"&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":B>11&&(N=g.parse(C));break;case"h12":X=!1,B>12&&(N=g.parse(C));break}e.value>=12&&B>1&&(B+=12)}else B>e.maxValue&&(N=g.parse(C));if(isNaN(B))return;let Q=N!==0||X;Q&&t.setSegment(e.type,N),+(B+"0")>e.maxValue||A.length>=String(e.maxValue).length?(r.current="",Q&&u.focusNext()):r.current=A;break}}},T=()=>{r.current="",r7(n.current,{containingElement:Ff(n.current)}),window.getSelection().collapse(n.current)},P=y.useRef("");as(n,"beforeinput",C=>{switch(C.preventDefault(),C.inputType){case"deleteContentBackward":case"deleteContentForward":g.isValidPartialNumber(e.text)&&!t.isReadOnly&&b();break;case"insertCompositionText":P.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:C.data!=null&&x(C.data);break}}),as(n,"input",C=>{let{inputType:A,data:B}=C;switch(A){case"insertCompositionText":n.current.textContent=P.current,(m(w,B)||m(D,B))&&x(B);break}}),he(()=>{let C=n.current;return()=>{document.activeElement===C&&(u.focusPrevious()||u.focusNext())}},[n,u]);let E=Mf()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},F=y.useMemo(()=>t.segments.find(C=>C.isEditable),[t.segments]);e!==F&&!t.isInvalid&&(l=void 0);let R=Qn(),M=!t.isDisabled&&!t.isReadOnly&&e.isEditable,z=e.type==="literal"?"":a.of(e.type),O=Ll({"aria-label":`${z}${s?`, ${s}`:""}${o?", ":""}`,"aria-labelledby":o});return e.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:de(p,O,{id:R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:M,suppressContentEditableWarning:M,spellCheck:M?"false":void 0,autoCapitalize:M?"off":void 0,autoCorrect:M?"off":void 0,[parseInt(_.version,10)>=17?"enterKeyHint":"enterkeyhint"]:M?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!M?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:v,onFocus:T,style:{caretColor:"transparent"},onPointerDown(C){C.stopPropagation()},onMouseDown(C){C.stopPropagation()}})}}function Pj(e){e.sort();let t=e[0],n=e[e.length-1];for(let r=0;rLf(n,{accept:M=>M.id!==w}),[n,w]),T={[F9]:x,[sc]:"presentation","aria-describedby":k,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},P=Xt(e),{focusWithinProps:E}=Ms({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),F=y.useRef(Ii),R=y.useRef(Ii);return{groupProps:de(P,S,c,v,E,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(M){t.isOpen||e.onKeyDown&&e.onKeyDown(M)},onKeyUp(M){t.isOpen||e.onKeyUp&&e.onKeyUp(M)}}),labelProps:{...u,onClick:()=>{x.focusFirst()}},buttonProps:{...v,id:w,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${w} ${h}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${w} ${h}`},startFieldProps:{...m,...T,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:M=>t.setDateTime("start",M),autoFocus:e.autoFocus,name:e.startName,[ad]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(M){F.current=M,t.updateValidation(sd(M,R.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...$,...T,value:(i=t.value)===null||i===void 0?void 0:i.end,onChange:M=>t.setDateTime("end",M),name:e.endName,[ad]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(M){R.current=M,t.updateValidation(sd(F.current,M))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:d,errorMessageProps:f,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:s,validationErrors:o,validationDetails:l}}function Mj(e,t){let{role:n="dialog"}=e,r=Zc();r=e["aria-label"]?void 0:r;let i=y.useRef(!1);return y.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){td(t.current);let a=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),td(t.current)),i.current=!1)},500);return()=>{clearTimeout(a)}}},[t]),GE(),{dialogProps:{...Xt(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:a=>{i.current&&a.stopPropagation()}},titleProps:{id:r}}}function os(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Tg(e,t,n,r,i){let a={};for(let o in t)a[o]=Math.floor(t[o]/2),a[o]>0&&t[o]%2===0&&a[o]--;let s=Wi(e,t,n).subtract(a);return pl(e,s,t,n,r,i)}function Wi(e,t,n,r,i){let a=e;return t.years?a=gI(e):t.months?a=ta(e):t.weeks&&(a=ol(e,n)),pl(e,a,t,n,r,i)}function Rg(e,t,n,r,i){let a={...t};t.days?a.days--:t.weeks?a.weeks--:t.months?a.months--:t.years&&a.years--;let s=Wi(e,t,n).subtract(a);return pl(e,s,t,n,r,i)}function pl(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=l$(t,Wi(Zt(i),n,r))),a&&e.compare(a)<=0&&(t=o$(t,Rg(Zt(a),n,r))),t}function Fr(e,t,n){return t&&(e=l$(e,Zt(t))),n&&(e=o$(e,Zt(n))),e}function vS(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function Fj(e){let t=y.useMemo(()=>new ri(e.locale),[e.locale]),n=y.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:s,maxValue:o,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible"}=e,d=y.useMemo(()=>i(n.calendar),[i,n.calendar]),[f,h]=ia(e.value,e.defaultValue,e.onChange),p=y.useMemo(()=>f?Oe(Zt(f),d):null,[f,d]),g=y.useMemo(()=>f&&"timeZone"in f?f.timeZone:n.timeZone,[f,n.timeZone]),b=y.useMemo(()=>e.focusedValue?Fr(Oe(Zt(e.focusedValue),d),s,o):void 0,[e.focusedValue,d,s,o]),v=y.useMemo(()=>Fr(e.defaultFocusedValue?Oe(Zt(e.defaultFocusedValue),d):p||Oe(Ol(g),d),s,o),[e.defaultFocusedValue,p,g,d,s,o]),[m,$]=ia(b,v,e.onFocusChange),[w,D]=y.useState(()=>{switch(l){case"start":return Wi(m,a,r,s,o);case"end":return Rg(m,a,r,s,o);case"center":default:return Tg(m,a,r,s,o)}}),[S,k]=y.useState(e.autoFocus||!1),x=y.useMemo(()=>{let C={...a};return C.days?C.days--:C.days=-1,w.add(C)},[w,a]),[T,P]=y.useState(d.identifier);if(d.identifier!==T){let C=Oe(m,d);D(Tg(C,a,r,s,o)),$(C),P(d.identifier)}os(m,s,o)?$(Fr(m,s,o)):m.compare(w)<0?D(Rg(m,a,r,s,o)):m.compare(x)>0&&D(Wi(m,a,r,s,o));function E(C){C=Fr(C,s,o),$(C)}function F(C){if(!e.isDisabled&&!e.isReadOnly){if(C===null){h(null);return}if(C=Fr(C,s,o),C=vS(C,w,u),!C)return;C=Oe(C,(f==null?void 0:f.calendar)||new Ft),f&&"hour"in f?h(f.set(C)):h(C)}}let R=y.useMemo(()=>p?u&&u(p)?!0:os(p,s,o):!1,[p,u,s,o]),M=e.isInvalid||e.validationState==="invalid"||R,z=M?"invalid":null,O=y.useMemo(()=>c==="visible"?a:Gh(a),[c,a]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:p,setValue:F,visibleRange:{start:w,end:x},minValue:s,maxValue:o,focusedDate:m,timeZone:g,validationState:z,isValueInvalid:M,setFocusedDate(C){E(C),k(!0)},focusNextDay(){E(m.add({days:1}))},focusPreviousDay(){E(m.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&E(m.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&E(m.subtract({weeks:1}))},focusNextPage(){let C=w.add(O);$(Fr(m.add(O),s,o)),D(Wi(pl(m,C,O,r,s,o),O,r))},focusPreviousPage(){let C=w.subtract(O);$(Fr(m.subtract(O),s,o)),D(Wi(pl(m,C,O,r,s,o),O,r))},focusSectionStart(){a.days?E(w):a.weeks?E(ol(m,r)):(a.months||a.years)&&E(ta(m))},focusSectionEnd(){a.days?E(x):a.weeks?E(yI(m,r)):(a.months||a.years)&&E(Wc(m))},focusNextSection(C){if(!C&&!a.days){E(m.add(Gh(a)));return}a.days?this.focusNextPage():a.weeks?E(m.add({months:1})):(a.months||a.years)&&E(m.add({years:1}))},focusPreviousSection(C){if(!C&&!a.days){E(m.subtract(Gh(a)));return}a.days?this.focusPreviousPage():a.weeks?E(m.subtract({months:1})):(a.months||a.years)&&E(m.subtract({years:1}))},selectFocusedDate(){F(m)},selectDate(C){F(C)},isFocused:S,setFocused:k,isInvalid(C){return os(C,s,o)},isSelected(C){return p!=null&&Ze(C,p)&&!this.isCellDisabled(C)&&!this.isCellUnavailable(C)},isCellFocused(C){return S&&m&&Ze(C,m)},isCellDisabled(C){return e.isDisabled||C.compare(w)<0||C.compare(x)>0||this.isInvalid(C,s,o)},isCellUnavailable(C){return e.isDateUnavailable&&e.isDateUnavailable(C)},isPreviousVisibleRangeInvalid(){let C=w.subtract({days:1});return Ze(C,w)||this.isInvalid(C,s,o)},isNextVisibleRangeInvalid(){let C=x.add({days:1});return Ze(C,x)||this.isInvalid(C,s,o)},getDatesInWeek(C,A=w){let B=A.add({weeks:C}),N=[];B=ol(B,r);let X=kf(B,r);for(let Q=0;Q0&&(p="start")}let g=y.useRef(null),[b,v]=y.useState(null),m=y.useMemo(()=>l$(o,b==null?void 0:b.start),[o,b]),$=y.useMemo(()=>o$(l,b==null?void 0:b.end),[l,b]),w=Fj({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:s,minValue:m,maxValue:$,selectionAlignment:p}),D=C=>{C&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(g.current={start:C5(C,w,-1),end:C5(C,w,1)},v(g.current)):(g.current=null,v(null))},[S,k]=y.useState(w.visibleRange);(!ag(w.visibleRange.start,S.start)||!ag(w.visibleRange.end,S.end))&&(D(f),k(w.visibleRange));let x=C=>{C?(h(C),D(C)):(h(null),D(null))},T=f?Zh(f,w.focusedDate):c&&Zh(c.start,c.end),P=C=>{if(!e.isReadOnly&&(C=Fr(C,m,$),C=vS(C,w.visibleRange.start,e.isDateUnavailable),!!C))if(!f)x(C);else{let A=Zh(f,C);d({start:S5(A.start,c==null?void 0:c.start),end:S5(A.end,c==null?void 0:c.end)}),x(null)}},[E,F]=y.useState(!1),{isDateUnavailable:R}=e,M=y.useMemo(()=>!c||f?!1:R&&(R(c.start)||R(c.end))?!0:os(c.start,o,l)||os(c.end,o,l),[R,c,f,o,l]),z=e.isInvalid||e.validationState==="invalid"||M;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:x,highlightedRange:T,validationState:z?"invalid":null,isValueInvalid:z,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(C){f&&w.setFocusedDate(C)},isSelected(C){return T&&C.compare(T.start)>=0&&C.compare(T.end)<=0&&!w.isCellDisabled(C)&&!w.isCellUnavailable(C)},isInvalid(C){var A,B;return w.isInvalid(C)||os(C,(A=g.current)===null||A===void 0?void 0:A.start,(B=g.current)===null||B===void 0?void 0:B.end)},isDragging:E,setDragging:F}}function Zh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Zt(e),end:Zt(t)})}function S5(e,t){return e=Oe(e,(t==null?void 0:t.calendar)||new Ft),t&&"hour"in t?t.set(e):e}function C5(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function bS(e){let[t,n]=ia(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=y.useCallback(()=>{n(!0)},[n]),i=y.useCallback(()=>{n(!1)},[n]),a=y.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var yS={};yS={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var $S={};$S={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var xS={};xS={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var wS={};wS={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var DS={};DS={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var _S={};_S={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var ES={};ES={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var SS={};SS={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var CS={};CS={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var kS={};kS={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var PS={};PS={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var TS={};TS={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var RS={};RS={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var MS={};MS={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var FS={};FS={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var AS={};AS={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var OS={};OS={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var BS={};BS={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var IS={};IS={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var LS={};LS={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var NS={};NS={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var jS={};jS={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var zS={};zS={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var VS={};VS={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var WS={};WS={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var US={};US={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var HS={};HS={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var KS={};KS={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var YS={};YS={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var qS={};qS={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var GS={};GS={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var ZS={};ZS={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var XS={};XS={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var QS={};QS={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var JS={};JS={"ar-AE":yS,"bg-BG":$S,"cs-CZ":xS,"da-DK":wS,"de-DE":DS,"el-GR":_S,"en-US":ES,"es-ES":SS,"et-EE":CS,"fi-FI":kS,"fr-FR":PS,"he-IL":TS,"hr-HR":RS,"hu-HU":MS,"it-IT":FS,"ja-JP":AS,"ko-KR":OS,"lt-LT":BS,"lv-LV":IS,"nb-NO":LS,"nl-NL":NS,"pl-PL":jS,"pt-BR":zS,"pt-PT":VS,"ro-RO":WS,"ru-RU":US,"sk-SK":HS,"sl-SI":KS,"sr-SP":YS,"sv-SE":qS,"tr-TR":GS,"uk-UA":ZS,"zh-CN":XS,"zh-TW":QS};function Oj(e){return e&&e.__esModule?e.default:e}const eC=new mi(Oj(JS));function tC(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function Mg(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,s=e!=null&&t!=null&&e.compare(t)<0,o=e!=null&&(r==null?void 0:r(e))||!1,l=a||s||o,u=[];if(l){let c=tC(),d=mi.getGlobalDictionaryForPackage("@react-stately/datepicker")||eC,f=new b8(c,d),h=new ri(c,ml({},i)),p=h.resolvedOptions().timeZone;s&&u.push(f.format("rangeUnderflow",{minValue:h.format(t.toDate(p))})),a&&u.push(f.format("rangeOverflow",{maxValue:h.format(n.toDate(p))})),o&&u.push(f.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:o,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:s,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function Bj(e,t,n,r,i){let a=Mg(e==null?void 0:e.start,t,n,r,i),s=Mg(e==null?void 0:e.end,t,n,r,i),o=sd(a,s);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let l=mi.getGlobalDictionaryForPackage("@react-stately/datepicker")||eC;o=sd(o,{isInvalid:!0,validationErrors:[l.getStringForLocale("rangeReversed",tC())],validationDetails:{...Nf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return o}const Ij={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},Lj={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function ml(e,t){e={...t.shouldForceLeadingZeros?Lj:Ij,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let s=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");s<0&&(s=0);let o=i.indexOf(r);if(o<0&&(o=2),s>o)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(s,o+1).reduce((c,d)=>(c[d]=e[d],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&s===0&&(l.era="short"),l}function Du(e){return e&&"hour"in e?e:new Il}function nC(e,t){if(e===null)return null;if(e)return Oe(e,t)}function qs(e,t,n,r){if(e)return nC(e,n);let i=Oe(w8(r).set({hour:0,minute:0,second:0,millisecond:0}),n);return t==="year"||t==="month"||t==="day"?Zt(i):r?i:Xn(i)}function rC(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=y.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let s=e?n:i[1];return[t,s]}const Nj=new mi({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function jj(e,t,n){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?Nj.getStringForLocale(e,n):"––"}const _u={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},k5={year:5,month:2,day:7,hour:2,minute:15,second:15},zj={dayperiod:"dayPeriod"};function iC(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i,isReadOnly:a,isRequired:s,minValue:o,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue,[d,f]=rC(c,e.granularity),h=f||"UTC";if(c&&!(d in c))throw new Error("Invalid granularity "+d+" for value "+c.toString());let p=y.useMemo(()=>new ri(t),[t]),g=y.useMemo(()=>n(p.resolvedOptions().calendar),[n,p]),[b,v]=ia(e.value,e.defaultValue,e.onChange),m=y.useMemo(()=>nC(b,g),[b,g]),[$,w]=y.useState(()=>qs(e.placeholderValue,d,g,f)),D=m||$,S=g.identifier==="gregory"&&D.era==="BC",k=y.useMemo(()=>{var W;return{granularity:d,maxGranularity:(W=e.maxGranularity)!==null&&W!==void 0?W:"year",timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,S]),x=y.useMemo(()=>ml({},k),[k]),T=y.useMemo(()=>new ri(t,x),[t,x]),P=y.useMemo(()=>T.resolvedOptions(),[T]),E=y.useMemo(()=>T.formatToParts(new Date).filter(W=>_u[W.type]).reduce((W,Ce)=>(W[Ce.type]=!0,W),{}),[T]),[F,R]=y.useState(()=>e.value||e.defaultValue?{...E}:{}),M=y.useRef(),z=y.useRef(g.identifier);y.useEffect(()=>{g.identifier!==z.current&&(z.current=g.identifier,w(W=>Object.keys(F).length>0?Oe(W,g):qs(e.placeholderValue,d,g,f)))},[g,d,F,f,e.placeholderValue]),b&&Object.keys(F).length=Object.keys(E).length?m:$,C=W=>{if(e.isDisabled||e.isReadOnly)return;let Ce=Object.keys(F),et=Object.keys(E);W==null?(v(null),w(qs(e.placeholderValue,d,g,f)),R({})):Ce.length>=et.length||Ce.length===et.length-1&&E.dayPeriod&&!F.dayPeriod&&M.current!=="dayPeriod"?(W=Oe(W,(c==null?void 0:c.calendar)||new Ft),v(W)):w(W),M.current=null},A=y.useMemo(()=>O.toDate(h),[O,h]),B=y.useMemo(()=>T.formatToParts(A).map(W=>{let Ce=_u[W.type];W.type==="era"&&g.getEras().length===1&&(Ce=!1);let et=_u[W.type]&&!F[W.type],yt=_u[W.type]?jj(W.type,W.value,t):null;return{type:zj[W.type]||W.type,text:et?yt:W.value,...Vj(O,W.type,P),isPlaceholder:et,placeholder:yt,isEditable:Ce}}),[A,F,T,P,O,g,t]);E.era&&F.year&&!F.era?(F.era=!0,R({...F})):!E.era&&F.era&&(delete F.era,R({...F}));let N=W=>{F[W]=!0,W==="year"&&E.era&&(F.era=!0),R({...F})},X=(W,Ce)=>{if(F[W])C(Wj(O,W,Ce,P));else{N(W);let et=Object.keys(F),yt=Object.keys(E);(et.length>=yt.length||et.length===yt.length-1&&E.dayPeriod&&!F.dayPeriod)&&C(O)}},Q=y.useMemo(()=>Mg(b,o,l,u,k),[b,o,l,u,k]),je=oE({...e,value:b,builtinValidation:Q}),$e=je.displayValidation.isInvalid,lt=e.validationState||($e?"invalid":null);var xe;return{...je,value:m,dateValue:A,calendar:g,setValue:C,segments:B,dateFormatter:T,validationState:lt,isInvalid:$e,granularity:d,maxGranularity:(xe=e.maxGranularity)!==null&&xe!==void 0?xe:"year",isDisabled:i,isReadOnly:a,isRequired:s,increment(W){X(W,1)},decrement(W){X(W,-1)},incrementPage(W){X(W,k5[W]||1)},decrementPage(W){X(W,-(k5[W]||1))},setSegment(W,Ce){N(W),C(Uj(O,W,Ce,P))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let W=Object.keys(F),Ce=Object.keys(E);W.length===Ce.length-1&&E.dayPeriod&&!F.dayPeriod&&(F={...E},R(F),C(O.copy()))},clearSegment(W){delete F[W],M.current=W,R({...F});let Ce=qs(e.placeholderValue,d,g,f),et=O;if(W==="dayPeriod"&&"hour"in O&&"hour"in Ce){let yt=O.hour>=12,ut=Ce.hour>=12;yt&&!ut?et=O.set({hour:O.hour-12}):!yt&&ut&&(et=O.set({hour:O.hour+12}))}else W in O&&(et=O.set({[W]:Ce[W]}));v(null),C(et)},formatValue(W){if(!m)return"";let Ce=ml(W,k);return new ri(t,Ce).format(A)}}}function Vj(e,t,n){switch(t){case"era":{let r=e.calendar.getEras();return{value:r.indexOf(e.era),minValue:0,maxValue:r.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:vI(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:bI(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(n.hour12){let r=e.hour>=12;return{value:e.hour,minValue:r?12:0,maxValue:r?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}function Wj(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:t==="year"})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return e.set({hour:a?i-12:i+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:t!=="hour",hourCycle:r.hour12?12:24})}}function Uj(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return n>=12===a?e:e.set({hour:a?i-12:i+12})}case"hour":if(r.hour12){let a=e.hour>=12;!a&&n===12&&(n=0),a&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}}function Hj(e){var t,n;let r=bS(e),[i,a]=ia(e.value,e.defaultValue||null,e.onChange),[s,o]=y.useState(()=>i||{start:null,end:null});i==null&&s.start&&s.end&&(s={start:null,end:null},o(s));let l=i||s,u=O=>{o(O||{start:null,end:null}),O!=null&&O.start&&O.end?a(O):a(null)},c=(l==null?void 0:l.start)||(l==null?void 0:l.end)||e.placeholderValue,[d,f]=rC(c,e.granularity),h=d==="hour"||d==="minute"||d==="second";var p;let g=(p=e.shouldCloseOnSelect)!==null&&p!==void 0?p:!0,[b,v]=y.useState(null),[m,$]=y.useState(null);l&&l.start&&l.end&&(b=l,"hour"in l.start&&(m=l));let w=(O,C)=>{u({start:"timeZone"in C.start?C.start.set(Zt(O.start)):Xn(O.start,C.start),end:"timeZone"in C.end?C.end.set(Zt(O.end)):Xn(O.end,C.end)}),v(null),$(null),R.commitValidation()},D=O=>{let C=typeof g=="function"?g():g;h?C||O.start&&O.end&&(m!=null&&m.start)&&(m!=null&&m.end)?w(O,{start:(m==null?void 0:m.start)||Du(e.placeholderValue),end:(m==null?void 0:m.end)||Du(e.placeholderValue)}):v(O):O.start&&O.end?(u(O),R.commitValidation()):v(O),C&&r.setOpen(!1)},S=O=>{b!=null&&b.start&&(b!=null&&b.end)&&O.start&&O.end?w(b,O):$(O)},k=(l==null||(t=l.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&l.start.era==="BC"||(l==null||(n=l.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&l.end.era==="BC",x=y.useMemo(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:k}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,k]),{minValue:T,maxValue:P,isDateUnavailable:E}=e,F=y.useMemo(()=>Bj(l,T,P,E,x),[l,T,P,E,x]),R=oE({...e,value:i,name:y.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:F}),M=R.displayValidation.isInvalid,z=e.validationState||(M?"invalid":null);return{...R,value:l,setValue:u,dateRange:b,timeRange:m,granularity:d,hasTime:h,setDate(O,C){D({...b,[O]:C})},setTime(O,C){S({...m,[O]:C})},setDateTime(O,C){u({...l,[O]:C})},setDateRange:D,setTimeRange:S,...r,setOpen(O){!O&&!(l!=null&&l.start&&(l!=null&&l.end))&&(b!=null&&b.start)&&(b!=null&&b.end)&&h&&w(b,{start:(m==null?void 0:m.start)||Du(e.placeholderValue),end:(m==null?void 0:m.end)||Du(e.placeholderValue)}),r.setOpen(O)},validationState:z,isInvalid:M,formatValue(O,C){if(!l||!l.start||!l.end)return null;let A="timeZone"in l.start?l.start.timeZone:void 0,B=e.granularity||(l.start&&"minute"in l.start?"minute":"day"),N="timeZone"in l.end?l.end.timeZone:void 0,X=e.granularity||(l.end&&"minute"in l.end?"minute":"day"),Q=ml(C,{granularity:B,timeZone:A,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:l.start.calendar.identifier==="gregory"&&l.start.era==="BC"||l.end.calendar.identifier==="gregory"&&l.end.era==="BC"}),je=l.start.toDate(A||"UTC"),$e=l.end.toDate(N||"UTC"),lt=new ri(O,Q),xe;if(A===N&&B===X&&l.start.compare(l.end)!==0){try{let W=lt.formatRangeToParts(je,$e),Ce=-1;for(let ut=0;utCe&&(yt+=W[ut].value);return{start:et,end:yt}}catch{}xe=lt}else{let W=ml(C,{granularity:X,timeZone:N,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});xe=new ri(O,W)}return{start:lt.format(je),end:xe.format($e)}}}}function Kj(e){let{placeholderValue:t=new Il,minValue:n,maxValue:r,granularity:i,validate:a}=e,[s,o]=ia(e.value,e.defaultValue,e.onChange),l=s||t,u=l&&"day"in l?l:void 0,c=e.defaultValue&&"timeZone"in e.defaultValue?e.defaultValue.timeZone:void 0,d=y.useMemo(()=>{let m=l&&"timeZone"in l?l.timeZone:void 0;return(m||c)&&t?k8(Gs(t),m||c):Gs(t)},[t,l,c]),f=y.useMemo(()=>Gs(n,u),[n,u]),h=y.useMemo(()=>Gs(r,u),[r,u]),p=y.useMemo(()=>s&&"day"in s?L2(s):s,[s]),g=y.useMemo(()=>s==null?null:Gs(s),[s]);return{...iC({...e,value:g,defaultValue:void 0,minValue:f,maxValue:h,onChange:m=>{o(u||c?m:m&&L2(m))},granularity:i||"minute",maxGranularity:"hour",placeholderValue:d,createCalendar:()=>new Ft,validate:y.useCallback(()=>a==null?void 0:a(s),[a,s])}),timeValue:p}}function Gs(e,t=Ol(Pf())){return e?"day"in e?e:Xn(t,e):null}const S$=_.createContext(null);S$.displayName="ProviderContext";function Fs(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var pa={};Fs(pa,"focus-ring",()=>Fg,e=>Fg=e);Fs(pa,"i18nFontFamily",()=>Ag,e=>Ag=e);Fs(pa,"spectrum",()=>Og,e=>Og=e);Fs(pa,"spectrum-FocusRing-ring",()=>ud,e=>ud=e);Fs(pa,"spectrum-FocusRing",()=>Bg,e=>Bg=e);Fs(pa,"spectrum-FocusRing--quiet",()=>Ig,e=>Ig=e);var Fg,Ag,Og,ud,Bg,Ig;Fg="JuTe6q_focus-ring";Ag="JuTe6q_i18nFontFamily";Og="JuTe6q_spectrum";ud="JuTe6q_spectrum-FocusRing-ring";Bg=`JuTe6q_spectrum-FocusRing ${ud}`;Ig="JuTe6q_spectrum-FocusRing--quiet";function gi(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var _r={};gi(_r,"focus-ring",()=>Lg,e=>Lg=e);gi(_r,"i18nFontFamily",()=>cd,e=>cd=e);gi(_r,"spectrum",()=>Ng,e=>Ng=e);gi(_r,"spectrum-Body",()=>jg,e=>jg=e);gi(_r,"spectrum-Body--italic",()=>zg,e=>zg=e);gi(_r,"spectrum-FocusRing-ring",()=>dd,e=>dd=e);gi(_r,"spectrum-FocusRing",()=>Vg,e=>Vg=e);gi(_r,"spectrum-FocusRing--quiet",()=>Wg,e=>Wg=e);var Lg,cd,Ng,jg,zg,dd,Vg,Wg;Lg="_5QszkG_focus-ring";cd="_5QszkG_i18nFontFamily";Ng=`_5QszkG_spectrum ${cd}`;jg="_5QszkG_spectrum-Body";zg="_5QszkG_spectrum-Body--italic";dd="_5QszkG_spectrum-FocusRing-ring";Vg=`_5QszkG_spectrum-FocusRing ${dd}`;Wg="_5QszkG_spectrum-FocusRing--quiet";function Yj(e,t){let n=rg("(prefers-color-scheme: dark)"),r=rg("(prefers-color-scheme: light)");return e.dark&&n?"dark":e.light&&r?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function qj(e){return rg("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var aC={};aC=JSON.parse('{"name":"@react-spectrum/provider","version":"3.9.6","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.11.0","@react-aria/overlays":"^3.22.0","@react-aria/utils":"^3.24.0","@react-spectrum/utils":"^3.11.6","@react-types/provider":"^3.8.0","@react-types/shared":"^3.23.0","@swc/helpers":"^0.5.0","clsx":"^2.0.0"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');function P5(e){return e&&e.__esModule?e.default:e}const Gj={S:640,M:768,L:1024,XL:1280,XXL:1536};function Zj(e,t){let n=ma(),r=n&&n.colorScheme,i=n&&n.breakpoints,{theme:a=n&&n.theme,defaultColorScheme:s}=e;if(!a)throw new Error("theme not found, the parent provider must have a theme provided");let o=Yj(a,s),l=qj(a),{locale:u}=Qe(),c=!!a[r],{colorScheme:d=c?r:o,scale:f=n?n.scale:l,locale:h=n?u:null,breakpoints:p=n?i:Gj,children:g,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D,router:S,...k}=e,x={version:aC.version,theme:a,breakpoints:p,colorScheme:d,scale:f,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D},T=iI(p),P={};Object.entries(x).forEach(([z,O])=>O!==void 0&&(P[z]=O));let E=Object.assign({},n,P),F=g,R=Xt(k),{styleProps:M}=st(k,void 0,{matchedBreakpoints:T});return(!n||e.locale||a!==n.theme||d!==n.colorScheme||f!==n.scale||Object.keys(R).length>0||k.UNSAFE_className||Object.keys(M.style).length>0)&&(F=_.createElement(Xj,{...e,UNSAFE_style:{isolation:n?void 0:"isolate",...M.style},ref:t},F)),S&&(F=_.createElement(wL,S,F)),_.createElement(S$.Provider,{value:E},_.createElement(lI,{locale:h},_.createElement(rI,{matchedBreakpoints:T},_.createElement(pj,null,F))))}let sC=_.forwardRef(Zj);const Xj=_.forwardRef(function(t,n){let{children:r,...i}=t,{locale:a,direction:s}=Qe(),{theme:o,colorScheme:l,scale:u}=ma(),{modalProviderProps:c}=mj(),{styleProps:d}=st(i),f=Nn(n),h=Object.keys(o[l])[0],p=Object.keys(o[u])[0],g=Ef(d.className,P5(pa).spectrum,P5(_r).spectrum,Object.values(o[l]),Object.values(o[u]),o.global?Object.values(o.global):null,{"react-spectrum-provider":cu,spectrum:cu,[h]:cu,[p]:cu});var b,v;let m={...d.style,colorScheme:(v=(b=t.colorScheme)!==null&&b!==void 0?b:l)!==null&&v!==void 0?v:Object.keys(o).filter(w=>w==="light"||w==="dark").join(" ")},$=y.useRef(!1);return y.useEffect(()=>{if(s&&f.current){let w=f.current.parentElement.closest("[dir]"),D=w&&w.getAttribute("dir");D&&D!==s&&!$.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),$.current=!0)}},[s,f,$]),_.createElement("div",{...Xt(i),...d,...c,className:g,style:m,lang:a,dir:s,ref:f},r)});function ma(){return y.useContext(S$)}function jl(e){let t=ma();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}var oC={};Object.defineProperty(oC,"__esModule",{value:!0});var Qj=oC.CornerTriangle=lC,Xh=Jj(y);function Jj(e){return e&&e.__esModule?e:{default:e}}function Ug(){return Ug=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function lC(e){var t=e.scale,n=t===void 0?"M":t,r=ez(e,["scale"]);return Xh.default.createElement("svg",Ug({},r,r),n==="L"&&Xh.default.createElement("path",{d:"M5.74.01a.25.25 0 0 0-.177.073l-5.48 5.48a.25.25 0 0 0 .177.427h5.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}),n==="M"&&Xh.default.createElement("path",{d:"M4.74.01a.25.25 0 0 0-.177.073l-4.48 4.48a.25.25 0 0 0 .177.427h4.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}))}lC.displayName="CornerTriangle";function G(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Y={};G(Y,"spectrum--large",()=>Hg,e=>Hg=e);G(Y,"spectrum--medium",()=>Kg,e=>Kg=e);G(Y,"spectrum-Icon",()=>Yg,e=>Yg=e);G(Y,"spectrum-Icon--sizeL",()=>qg,e=>qg=e);G(Y,"spectrum-Icon--sizeM",()=>Gg,e=>Gg=e);G(Y,"spectrum-Icon--sizeS",()=>Zg,e=>Zg=e);G(Y,"spectrum-Icon--sizeXL",()=>Xg,e=>Xg=e);G(Y,"spectrum-Icon--sizeXS",()=>Qg,e=>Qg=e);G(Y,"spectrum-Icon--sizeXXL",()=>Jg,e=>Jg=e);G(Y,"spectrum-Icon--sizeXXS",()=>e0,e=>e0=e);G(Y,"spectrum-UIIcon",()=>t0,e=>t0=e);G(Y,"spectrum-UIIcon--large",()=>n0,e=>n0=e);G(Y,"spectrum-UIIcon--medium",()=>r0,e=>r0=e);G(Y,"spectrum-UIIcon-AlertMedium",()=>i0,e=>i0=e);G(Y,"spectrum-UIIcon-AlertSmall",()=>a0,e=>a0=e);G(Y,"spectrum-UIIcon-ArrowDownSmall",()=>s0,e=>s0=e);G(Y,"spectrum-UIIcon-ArrowLeftMedium",()=>o0,e=>o0=e);G(Y,"spectrum-UIIcon-Asterisk",()=>l0,e=>l0=e);G(Y,"spectrum-UIIcon-CheckmarkMedium",()=>u0,e=>u0=e);G(Y,"spectrum-UIIcon-CheckmarkSmall",()=>c0,e=>c0=e);G(Y,"spectrum-UIIcon-ChevronDownMedium",()=>d0,e=>d0=e);G(Y,"spectrum-UIIcon-ChevronDownSmall",()=>f0,e=>f0=e);G(Y,"spectrum-UIIcon-ChevronLeftLarge",()=>h0,e=>h0=e);G(Y,"spectrum-UIIcon-ChevronLeftMedium",()=>p0,e=>p0=e);G(Y,"spectrum-UIIcon-ChevronRightLarge",()=>m0,e=>m0=e);G(Y,"spectrum-UIIcon-ChevronRightMedium",()=>g0,e=>g0=e);G(Y,"spectrum-UIIcon-ChevronRightSmall",()=>v0,e=>v0=e);G(Y,"spectrum-UIIcon-ChevronUpSmall",()=>b0,e=>b0=e);G(Y,"spectrum-UIIcon-CornerTriangle",()=>y0,e=>y0=e);G(Y,"spectrum-UIIcon-CrossLarge",()=>$0,e=>$0=e);G(Y,"spectrum-UIIcon-CrossMedium",()=>x0,e=>x0=e);G(Y,"spectrum-UIIcon-CrossSmall",()=>w0,e=>w0=e);G(Y,"spectrum-UIIcon-DashSmall",()=>D0,e=>D0=e);G(Y,"spectrum-UIIcon-DoubleGripper",()=>_0,e=>_0=e);G(Y,"spectrum-UIIcon-FolderBreadcrumb",()=>E0,e=>E0=e);G(Y,"spectrum-UIIcon-HelpMedium",()=>S0,e=>S0=e);G(Y,"spectrum-UIIcon-HelpSmall",()=>C0,e=>C0=e);G(Y,"spectrum-UIIcon-InfoMedium",()=>k0,e=>k0=e);G(Y,"spectrum-UIIcon-InfoSmall",()=>P0,e=>P0=e);G(Y,"spectrum-UIIcon-ListGripper",()=>T0,e=>T0=e);G(Y,"spectrum-UIIcon-Magnifier",()=>R0,e=>R0=e);G(Y,"spectrum-UIIcon-SkipLeft",()=>M0,e=>M0=e);G(Y,"spectrum-UIIcon-SkipRight",()=>F0,e=>F0=e);G(Y,"spectrum-UIIcon-Star",()=>A0,e=>A0=e);G(Y,"spectrum-UIIcon-StarOutline",()=>O0,e=>O0=e);G(Y,"spectrum-UIIcon-SuccessMedium",()=>B0,e=>B0=e);G(Y,"spectrum-UIIcon-SuccessSmall",()=>I0,e=>I0=e);G(Y,"spectrum-UIIcon-TripleGripper",()=>L0,e=>L0=e);var Hg,Kg,Yg,qg,Gg,Zg,Xg,Qg,Jg,e0,t0,n0,r0,i0,a0,s0,o0,l0,u0,c0,d0,f0,h0,p0,m0,g0,v0,b0,y0,$0,x0,w0,D0,_0,E0,S0,C0,k0,P0,T0,R0,M0,F0,A0,O0,B0,I0,L0;Hg="yxBNXG_spectrum--large";Kg="yxBNXG_spectrum--medium";Yg="yxBNXG_spectrum-Icon";qg="yxBNXG_spectrum-Icon--sizeL";Gg="yxBNXG_spectrum-Icon--sizeM";Zg="yxBNXG_spectrum-Icon--sizeS";Xg="yxBNXG_spectrum-Icon--sizeXL";Qg="yxBNXG_spectrum-Icon--sizeXS";Jg="yxBNXG_spectrum-Icon--sizeXXL";e0="yxBNXG_spectrum-Icon--sizeXXS";t0="yxBNXG_spectrum-UIIcon";n0="yxBNXG_spectrum-UIIcon--large";r0="yxBNXG_spectrum-UIIcon--medium";i0="yxBNXG_spectrum-UIIcon-AlertMedium";a0="yxBNXG_spectrum-UIIcon-AlertSmall";s0="yxBNXG_spectrum-UIIcon-ArrowDownSmall";o0="yxBNXG_spectrum-UIIcon-ArrowLeftMedium";l0="yxBNXG_spectrum-UIIcon-Asterisk";u0="yxBNXG_spectrum-UIIcon-CheckmarkMedium";c0="yxBNXG_spectrum-UIIcon-CheckmarkSmall";d0="yxBNXG_spectrum-UIIcon-ChevronDownMedium";f0="yxBNXG_spectrum-UIIcon-ChevronDownSmall";h0="yxBNXG_spectrum-UIIcon-ChevronLeftLarge";p0="yxBNXG_spectrum-UIIcon-ChevronLeftMedium";m0="yxBNXG_spectrum-UIIcon-ChevronRightLarge";g0="yxBNXG_spectrum-UIIcon-ChevronRightMedium";v0="yxBNXG_spectrum-UIIcon-ChevronRightSmall";b0="yxBNXG_spectrum-UIIcon-ChevronUpSmall";y0="yxBNXG_spectrum-UIIcon-CornerTriangle";$0="yxBNXG_spectrum-UIIcon-CrossLarge";x0="yxBNXG_spectrum-UIIcon-CrossMedium";w0="yxBNXG_spectrum-UIIcon-CrossSmall";D0="yxBNXG_spectrum-UIIcon-DashSmall";_0="yxBNXG_spectrum-UIIcon-DoubleGripper";E0="yxBNXG_spectrum-UIIcon-FolderBreadcrumb";S0="yxBNXG_spectrum-UIIcon-HelpMedium";C0="yxBNXG_spectrum-UIIcon-HelpSmall";k0="yxBNXG_spectrum-UIIcon-InfoMedium";P0="yxBNXG_spectrum-UIIcon-InfoSmall";T0="yxBNXG_spectrum-UIIcon-ListGripper";R0="yxBNXG_spectrum-UIIcon-Magnifier";M0="yxBNXG_spectrum-UIIcon-SkipLeft";F0="yxBNXG_spectrum-UIIcon-SkipRight";A0="yxBNXG_spectrum-UIIcon-Star";O0="yxBNXG_spectrum-UIIcon-StarOutline";B0="yxBNXG_spectrum-UIIcon-SuccessMedium";I0="yxBNXG_spectrum-UIIcon-SuccessSmall";L0="yxBNXG_spectrum-UIIcon-TripleGripper";function nz(e){return e&&e.__esModule?e.default:e}function rz(e){return`var(--spectrum-semantic-${e}-color-icon)`}const iz={...Af,color:["color",rz]};function az(e){e=ui(e,"icon");let{children:t,size:n,"aria-label":r,"aria-hidden":i,...a}=e,{styleProps:s}=st(a,iz),o=ma(),l="M";o!==null&&(l=o.scale==="large"?"L":"M"),i||(i=void 0);let u=n||l;return _.cloneElement(t,{...Xt(a),...s,focusable:"false","aria-label":r,"aria-hidden":r?i||void 0:!0,role:"img",className:V(nz(Y),t.props.className,"spectrum-Icon",`spectrum-Icon--size${u}`,s.className)})}function sz(e){return e&&e.__esModule?e.default:e}function ga(e){e=ui(e,"icon");let{children:t,"aria-label":n,"aria-hidden":r,...i}=e,{styleProps:a}=st(i),s=ma(),o="M";return s!==null&&(o=s.scale==="large"?"L":"M"),r||(r=void 0),_.cloneElement(t,{...Xt(i),...a,scale:o,focusable:"false","aria-label":n,"aria-hidden":n?r||void 0:!0,role:"img",className:V(sz(Y),t.props.className,"spectrum-Icon",{[`spectrum-UIIcon-${t.type.displayName}`]:t.type.displayName},a.className)})}function oz(e){return _.createElement(ga,e,_.createElement(Qj,null))}function Zs(e){return e&&e.__esModule?e.default:e}function lz(e,t){e=jl(e),e=ui(e,"actionButton");let n=ui({UNSAFE_className:V(Zs(Z),"spectrum-ActionButton-label")},"text"),{isQuiet:r,isDisabled:i,staticColor:a,children:s,autoFocus:o,holdAffordance:l,hideButtonText:u,...c}=e,d=f8(t),{buttonProps:f,isPressed:h}=D7(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:i}),{styleProps:b}=st(c),v=_.Children.toArray(e.children).every(m=>!_.isValidElement(m));return _.createElement(x7,{focusRingClass:V(Zs(Z),"focus-ring"),autoFocus:o},_.createElement("button",{...b,...de(f,p),ref:d,className:V(Zs(Z),"spectrum-ActionButton",{"spectrum-ActionButton--quiet":r,"spectrum-ActionButton--staticColor":!!a,"spectrum-ActionButton--staticWhite":a==="white","spectrum-ActionButton--staticBlack":a==="black","is-active":h,"is-disabled":i,"is-hovered":g},b.className)},l&&_.createElement(oz,{UNSAFE_className:V(Zs(Z),"spectrum-ActionButton-hold")}),_.createElement(l7,null,_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Zs(Z),"spectrum-Icon",{"spectrum-ActionGroup-itemIcon":u})},text:{...n}}},typeof s=="string"||v?_.createElement(BN,null,s):s))))}let N0=_.forwardRef(lz);function Qh(e){return e&&e.__esModule?e.default:e}function uz(e,t){e=ui(e,"button");let{isQuiet:n,isDisabled:r,validationState:i,isInvalid:a,children:s,autoFocus:o,isActive:l,focusRingClass:u,...c}=e,d=f8(t),{buttonProps:f,isPressed:h}=D7(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:r}),{styleProps:b}=st(c);return _.createElement(x7,{focusRingClass:V(Qh(Z),"focus-ring",u),autoFocus:o},_.createElement("button",{...de(f,p),ref:d,className:V(Qh(Z),"spectrum-FieldButton",{"spectrum-FieldButton--quiet":n,"is-active":l||h,"is-disabled":r,"spectrum-FieldButton--invalid":a||i==="invalid","is-hovered":g},b.className)},_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Qh(Z),"spectrum-Icon")}}},s)))}let cz=_.forwardRef(uz);function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}function z0(e,t){return z0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},z0(e,t)}function fz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,z0(e,t)}const T5={disabled:!1},uC=_.createContext(null);var hz=function(t){return t.scrollTop},mo="unmounted",Ti="exited",Ri="entering",Fa="entered",V0="exiting",Er=function(e){fz(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?o?(l=Ti,a.appearStatus=Ri):l=Fa:r.unmountOnExit||r.mountOnEnter?l=mo:l=Ti,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===mo?{status:Ti}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Ri&&s!==Fa&&(a=Ri):(s===Ri||s===Fa)&&(a=V0)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Ri){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:uo.findDOMNode(this);s&&hz(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ti&&this.setState({status:mo})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,l=this.props.nodeRef?[o]:[uo.findDOMNode(this),o],u=l[0],c=l[1],d=this.getTimeouts(),f=o?d.appear:d.enter;if(!i&&!s||T5.disabled){this.safeSetState({status:Fa},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Ri},function(){a.props.onEntering(u,c),a.onTransitionEnd(f,function(){a.safeSetState({status:Fa},function(){a.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:uo.findDOMNode(this);if(!a||T5.disabled){this.safeSetState({status:Ti},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:V0},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ti},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:uo.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===mo)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=dz(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(uC.Provider,{value:null},typeof s=="function"?s(i,o):_.cloneElement(_.Children.only(s),o))},t}(_.Component);Er.contextType=uC;Er.propTypes={};function Sa(){}Er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sa,onEntering:Sa,onEntered:Sa,onExit:Sa,onExiting:Sa,onExited:Sa};Er.UNMOUNTED=mo;Er.EXITED=Ti;Er.ENTERING=Ri;Er.ENTERED=Fa;Er.EXITING=V0;const pz={entering:!1,entered:!0};function mz(e){return _.createElement(Er,{timeout:{enter:0,exit:350},...e},t=>_.Children.map(e.children,n=>n&&_.cloneElement(n,{isOpen:!!pz[t]})))}function gz(e,t){let{children:n,isOpen:r,disableFocusManagement:i,container:a,onEnter:s,onEntering:o,onEntered:l,onExit:u,onExiting:c,onExited:d,nodeRef:f}=e,[h,p]=y.useState(!r),g=y.useCallback(()=>{p(!1),l&&l()},[l]),b=y.useCallback(()=>{p(!0),d&&d()},[d]);return r||!h?_.createElement(xj,{portalContainer:a,disableFocusManagement:i,isExiting:!r},_.createElement(sC,{ref:t,UNSAFE_style:{background:"transparent",isolation:"isolate"},isDisabled:!1},_.createElement(mz,{in:r,appear:!0,onExit:u,onExiting:c,onExited:b,onEnter:s,onEntering:o,onEntered:g,nodeRef:f},n))):null}let C$=_.forwardRef(gz);function Sr(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ln={};Sr(ln,"react-spectrum-Modal",()=>W0,e=>W0=e);Sr(ln,"react-spectrum-Modal-wrapper",()=>U0,e=>U0=e);Sr(ln,"react-spectrum-Popover",()=>H0,e=>H0=e);Sr(ln,"react-spectrum-Tray",()=>K0,e=>K0=e);Sr(ln,"spectrum-Dialog-content",()=>Y0,e=>Y0=e);Sr(ln,"spectrum-Modal",()=>q0,e=>q0=e);Sr(ln,"spectrum-Modal-wrapper",()=>G0,e=>G0=e);Sr(ln,"spectrum-Popover",()=>Z0,e=>Z0=e);Sr(ln,"spectrum-Tray",()=>X0,e=>X0=e);var W0,U0,H0,K0,Y0,q0,G0,Z0,X0;W0="OhnpTq_react-spectrum-Modal";U0="OhnpTq_react-spectrum-Modal-wrapper";H0="OhnpTq_react-spectrum-Popover";K0="OhnpTq_react-spectrum-Tray";Y0="OhnpTq_spectrum-Dialog-content";q0="OhnpTq_spectrum-Modal";G0="OhnpTq_spectrum-Modal-wrapper";Z0="OhnpTq_spectrum-Popover";X0="OhnpTq_spectrum-Tray";function Fe(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var be={};Fe(be,"focus-ring",()=>Q0,e=>Q0=e);Fe(be,"i18nFontFamily",()=>J0,e=>J0=e);Fe(be,"spectrum-overlay--open",()=>fd,e=>fd=e);Fe(be,"is-open",()=>ev,e=>ev=e);Fe(be,"spectrum-overlay--bottom--open",()=>hd,e=>hd=e);Fe(be,"is-open--bottom",()=>tv,e=>tv=e);Fe(be,"spectrum-overlay--left--open",()=>pd,e=>pd=e);Fe(be,"is-open--left",()=>nv,e=>nv=e);Fe(be,"spectrum-overlay--right--open",()=>md,e=>md=e);Fe(be,"is-open--right",()=>rv,e=>rv=e);Fe(be,"spectrum-overlay--top--open",()=>gd,e=>gd=e);Fe(be,"is-open--top",()=>iv,e=>iv=e);Fe(be,"spectrum-FocusRing-ring",()=>vd,e=>vd=e);Fe(be,"spectrum-FocusRing",()=>av,e=>av=e);Fe(be,"spectrum-FocusRing--quiet",()=>sv,e=>sv=e);Fe(be,"spectrum-overlay",()=>bd,e=>bd=e);Fe(be,"spectrum-Popover",()=>ov,e=>ov=e);Fe(be,"spectrum-Popover--bottom",()=>lv,e=>lv=e);Fe(be,"spectrum-Popover--dialog",()=>uv,e=>uv=e);Fe(be,"spectrum-Popover--left",()=>cv,e=>cv=e);Fe(be,"spectrum-Popover--right",()=>dv,e=>dv=e);Fe(be,"spectrum-Popover--top",()=>fv,e=>fv=e);Fe(be,"spectrum-Popover--withTip",()=>hv,e=>hv=e);Fe(be,"spectrum-Popover-tip",()=>pv,e=>pv=e);Fe(be,"spectrum-Popover-tip-triangle",()=>mv,e=>mv=e);var Q0,J0,fd,ev,hd,tv,pd,nv,md,rv,gd,iv,vd,av,sv,bd,ov,lv,uv,cv,dv,fv,hv,pv,mv;Q0="cH0MeW_focus-ring";J0="cH0MeW_i18nFontFamily";fd="cH0MeW_spectrum-overlay--open";ev=`cH0MeW_is-open ${fd}`;hd="cH0MeW_spectrum-overlay--bottom--open";tv=`cH0MeW_is-open--bottom ${hd}`;pd="cH0MeW_spectrum-overlay--left--open";nv=`cH0MeW_is-open--left ${pd}`;md="cH0MeW_spectrum-overlay--right--open";rv=`cH0MeW_is-open--right ${md}`;gd="cH0MeW_spectrum-overlay--top--open";iv=`cH0MeW_is-open--top ${gd}`;vd="cH0MeW_spectrum-FocusRing-ring";av=`cH0MeW_spectrum-FocusRing ${vd}`;sv="cH0MeW_spectrum-FocusRing--quiet";bd="cH0MeW_spectrum-overlay";ov=`cH0MeW_spectrum-Popover ${bd}`;lv="cH0MeW_spectrum-Popover--bottom";uv="cH0MeW_spectrum-Popover--dialog";cv="cH0MeW_spectrum-Popover--left";dv="cH0MeW_spectrum-Popover--right";fv="cH0MeW_spectrum-Popover--top";hv="cH0MeW_spectrum-Popover--withTip";pv="cH0MeW_spectrum-Popover-tip";mv="cH0MeW_spectrum-Popover-tip-triangle";function Qt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Bt={};Qt(Bt,"focus-ring",()=>gv,e=>gv=e);Qt(Bt,"i18nFontFamily",()=>vv,e=>vv=e);Qt(Bt,"spectrum-overlay--open",()=>yd,e=>yd=e);Qt(Bt,"is-open",()=>bv,e=>bv=e);Qt(Bt,"spectrum-FocusRing-ring",()=>$d,e=>$d=e);Qt(Bt,"spectrum-FocusRing",()=>yv,e=>yv=e);Qt(Bt,"spectrum-FocusRing--quiet",()=>$v,e=>$v=e);Qt(Bt,"spectrum-overlay",()=>xd,e=>xd=e);Qt(Bt,"spectrum-Underlay",()=>xv,e=>xv=e);Qt(Bt,"spectrum-Underlay--transparent",()=>wv,e=>wv=e);Qt(Bt,"spectrum-overlay--bottom--open",()=>Dv,e=>Dv=e);Qt(Bt,"spectrum-overlay--left--open",()=>_v,e=>_v=e);Qt(Bt,"spectrum-overlay--right--open",()=>Ev,e=>Ev=e);Qt(Bt,"spectrum-overlay--top--open",()=>Sv,e=>Sv=e);var gv,vv,yd,bv,$d,yv,$v,xd,xv,wv,Dv,_v,Ev,Sv;gv="F-oYUa_focus-ring";vv="F-oYUa_i18nFontFamily";yd="F-oYUa_spectrum-overlay--open";bv=`F-oYUa_is-open ${yd}`;$d="F-oYUa_spectrum-FocusRing-ring";yv=`F-oYUa_spectrum-FocusRing ${$d}`;$v="F-oYUa_spectrum-FocusRing--quiet";xd="F-oYUa_spectrum-overlay";xv=`F-oYUa_spectrum-Underlay ${xd}`;wv="F-oYUa_spectrum-Underlay--transparent";Dv="F-oYUa_spectrum-overlay--bottom--open";_v="F-oYUa_spectrum-overlay--left--open";Ev="F-oYUa_spectrum-overlay--right--open";Sv="F-oYUa_spectrum-overlay--top--open";function vz(e){return e&&e.__esModule?e.default:e}function k$({isOpen:e,isTransparent:t,...n}){return _.createElement("div",{"data-testid":"underlay",...n,className:V(vz(Bt),"spectrum-Underlay",{"is-open":e,"spectrum-Underlay--transparent":t})})}function wd(e){return e&&e.__esModule?e.default:e}let bz={left:"right",right:"right",top:"bottom",bottom:"bottom"};function yz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(C$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement($z,{ref:a,...e,wrapperRef:s},n))}const $z=y.forwardRef((e,t)=>{let{children:n,isOpen:r,hideArrow:i,isNonModal:a,enableBothDismissButtons:s,state:o,wrapperRef:l,onDismissButtonPress:u=()=>o.close()}=e,{styleProps:c}=st(e),{size:d,borderWidth:f,arrowRef:h}=wz();const p=xz(t);let g=f*Math.SQRT2,b=d+g,v=b*2,{popoverProps:m,arrowProps:$,underlayProps:w,placement:D}=bj({...e,popoverRef:t,maxHeight:null,arrowSize:i?0:v,arrowBoundaryOffset:p},o),{focusWithinProps:S}=Ms(e);return _.createElement("div",{ref:l},!a&&_.createElement(k$,{isTransparent:!0,...de(w),isOpen:r}),_.createElement("div",{...c,...de(m,S),style:{...c.style,...m.style},ref:t,className:V(wd(be),"spectrum-Popover",`spectrum-Popover--${D}`,{"spectrum-Popover--withTip":!i,"is-open":r,[`is-open--${D}`]:r},V(wd(ln),"spectrum-Popover","react-spectrum-Popover"),c.className),role:"presentation","data-testid":"popover"},(!a||s)&&_.createElement(ld,{onDismiss:u}),n,i?null:_.createElement(Dz,{arrowProps:$,isLandscape:bz[D]==="bottom",arrowRef:h,primary:b,secondary:v,borderDiagonal:g}),_.createElement(ld,{onDismiss:u})))});function xz(e){let[t,n]=y.useState(0);return he(()=>{if(e.current){let r=window.getComputedStyle(e.current).borderRadius;r!==""&&n(parseInt(r,10))}},[e]),t}function wz(){let[e,t]=y.useState(20),[n,r]=y.useState(1),i=y.useRef(null);return he(()=>{if(i.current){let a=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-size");a!==""&&t(parseInt(a,10)/2);let s=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-borderWidth");s!==""&&r(parseInt(s,10))}},[]),{size:e,borderWidth:n,arrowRef:i}}function Dz(e){let{primary:t,secondary:n,isLandscape:r,arrowProps:i,borderDiagonal:a,arrowRef:s}=e,o=a/2,l=0,u=t-o,c=o,d=n/2,f=n-o,h=r?["M",c,l,"L",d,u,"L",f,l]:["M",l,c,"L",u,d,"L",l,f];return _.createElement("svg",{xmlns:"http://www.w3.org/svg/2000",width:Math.ceil(r?n:t),height:Math.ceil(r?t:n),className:V(wd(be),"spectrum-Popover-tip"),ref:s,...i},_.createElement("path",{className:V(wd(be),"spectrum-Popover-tip-triangle"),d:h.join(" ")}))}let _z=y.forwardRef(yz);function bt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ot={};bt(ot,"focus-ring",()=>Cv,e=>Cv=e);bt(ot,"i18nFontFamily",()=>kv,e=>kv=e);bt(ot,"spectrum-overlay--open",()=>Dd,e=>Dd=e);bt(ot,"is-open",()=>Pv,e=>Pv=e);bt(ot,"spectrum-FocusRing-ring",()=>_d,e=>_d=e);bt(ot,"spectrum-FocusRing",()=>Tv,e=>Tv=e);bt(ot,"spectrum-FocusRing--quiet",()=>Rv,e=>Rv=e);bt(ot,"spectrum-overlay",()=>Ed,e=>Ed=e);bt(ot,"spectrum-Modal",()=>Mv,e=>Mv=e);bt(ot,"spectrum-Modal--fullscreen",()=>Fv,e=>Fv=e);bt(ot,"spectrum-Modal--fullscreenTakeover",()=>Av,e=>Av=e);bt(ot,"spectrum-Modal--responsive",()=>Ov,e=>Ov=e);bt(ot,"spectrum-Modal-wrapper",()=>Bv,e=>Bv=e);bt(ot,"spectrum-overlay--bottom--open",()=>Iv,e=>Iv=e);bt(ot,"spectrum-overlay--left--open",()=>Lv,e=>Lv=e);bt(ot,"spectrum-overlay--right--open",()=>Nv,e=>Nv=e);bt(ot,"spectrum-overlay--top--open",()=>jv,e=>jv=e);var Cv,kv,Dd,Pv,_d,Tv,Rv,Ed,Mv,Fv,Av,Ov,Bv,Iv,Lv,Nv,jv;Cv="_0YML2q_focus-ring";kv="_0YML2q_i18nFontFamily";Dd="_0YML2q_spectrum-overlay--open";Pv=`_0YML2q_is-open ${Dd}`;_d="_0YML2q_spectrum-FocusRing-ring";Tv=`_0YML2q_spectrum-FocusRing ${_d}`;Rv="_0YML2q_spectrum-FocusRing--quiet";Ed="_0YML2q_spectrum-overlay";Mv=`_0YML2q_spectrum-Modal ${Ed}`;Fv="_0YML2q_spectrum-Modal--fullscreen";Av="_0YML2q_spectrum-Modal--fullscreenTakeover";Ov="_0YML2q_spectrum-Modal--responsive";Bv="_0YML2q_spectrum-Modal-wrapper";Iv="_0YML2q_spectrum-overlay--bottom--open";Lv="_0YML2q_spectrum-overlay--left--open";Nv="_0YML2q_spectrum-overlay--right--open";jv="_0YML2q_spectrum-overlay--top--open";function Eu(e){return e&&e.__esModule?e.default:e}function Ez(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(C$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Cz,{...e,wrapperRef:s,ref:a},n))}let Sz={fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"},Cz=y.forwardRef(function(e,t){let{type:n,children:r,state:i,isOpen:a,wrapperRef:s}=e,o=Sz[n],{styleProps:l}=st(e),{modalProps:u,underlayProps:c}=ZE(e,i,t),d=V(Eu(ot),"spectrum-Modal-wrapper",V(Eu(ln),"spectrum-Modal-wrapper","react-spectrum-Modal-wrapper")),f=V(Eu(ot),"spectrum-Modal",{"is-open":a},V(Eu(ln),"spectrum-Modal","react-spectrum-Modal"),{[`spectrum-Modal--${o}`]:o},l.className),p={"--spectrum-visual-viewport-height":n7().height+"px"};return _.createElement("div",{ref:s},_.createElement(k$,{...c,isOpen:a}),_.createElement("div",{className:d,style:p},_.createElement("div",{...l,...u,ref:t,className:f,"data-testid":"modal"},r)))}),kz=y.forwardRef(Ez);function It(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var vt={};It(vt,"focus-ring",()=>zv,e=>zv=e);It(vt,"i18nFontFamily",()=>Vv,e=>Vv=e);It(vt,"spectrum-overlay--open",()=>Sd,e=>Sd=e);It(vt,"is-open",()=>Wv,e=>Wv=e);It(vt,"spectrum-FocusRing-ring",()=>Cd,e=>Cd=e);It(vt,"spectrum-FocusRing",()=>Uv,e=>Uv=e);It(vt,"spectrum-FocusRing--quiet",()=>Hv,e=>Hv=e);It(vt,"spectrum-overlay",()=>kd,e=>kd=e);It(vt,"spectrum-Tray",()=>Kv,e=>Kv=e);It(vt,"spectrum-Tray--fixedHeight",()=>Yv,e=>Yv=e);It(vt,"spectrum-Tray-wrapper",()=>qv,e=>qv=e);It(vt,"spectrum-overlay--bottom--open",()=>Gv,e=>Gv=e);It(vt,"spectrum-overlay--left--open",()=>Zv,e=>Zv=e);It(vt,"spectrum-overlay--right--open",()=>Xv,e=>Xv=e);It(vt,"spectrum-overlay--top--open",()=>Qv,e=>Qv=e);var zv,Vv,Sd,Wv,Cd,Uv,Hv,kd,Kv,Yv,qv,Gv,Zv,Xv,Qv;zv="UuxJvG_focus-ring";Vv="UuxJvG_i18nFontFamily";Sd="UuxJvG_spectrum-overlay--open";Wv=`UuxJvG_is-open ${Sd}`;Cd="UuxJvG_spectrum-FocusRing-ring";Uv=`UuxJvG_spectrum-FocusRing ${Cd}`;Hv="UuxJvG_spectrum-FocusRing--quiet";kd="UuxJvG_spectrum-overlay";Kv=`UuxJvG_spectrum-Tray ${kd}`;Yv="UuxJvG_spectrum-Tray--fixedHeight";qv="UuxJvG_spectrum-Tray-wrapper";Gv="UuxJvG_spectrum-overlay--bottom--open";Zv="UuxJvG_spectrum-overlay--left--open";Xv="UuxJvG_spectrum-overlay--right--open";Qv="UuxJvG_spectrum-overlay--top--open";function Jh(e){return e&&e.__esModule?e.default:e}function Pz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(C$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Tz,{...e,wrapperRef:s,ref:a},n))}let Tz=y.forwardRef(function(e,t){let{children:n,isOpen:r,isFixedHeight:i,state:a,wrapperRef:s}=e,{styleProps:o}=st(e),{modalProps:l,underlayProps:u}=ZE({...e,isDismissable:!0},a,t),d={"--spectrum-visual-viewport-height":n7().height+"px"},f=V(Jh(vt),"spectrum-Tray-wrapper"),h=V(Jh(vt),"spectrum-Tray",{"is-open":r,"spectrum-Tray--fixedHeight":i},V(Jh(ln),"spectrum-Tray","react-spectrum-Tray"),o.className);return _.createElement("div",{ref:s},_.createElement(k$,{...u,isOpen:r}),_.createElement("div",{className:f,style:d},_.createElement("div",{...o,...l,className:h,ref:t,"data-testid":"tray"},_.createElement(ld,{onDismiss:a.close}),n,_.createElement(ld,{onDismiss:a.close}))))}),Rz=y.forwardRef(Pz);var cC={};Object.defineProperty(cC,"__esModule",{value:!0});var Mz=cC.CheckmarkMedium=dC,ep=Fz(y);function Fz(e){return e&&e.__esModule?e:{default:e}}function Jv(){return Jv=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function dC(e){var t=e.scale,n=t===void 0?"M":t,r=Az(e,["scale"]);return ep.default.createElement("svg",Jv({},r,r),n==="L"&&ep.default.createElement("path",{d:"M6 14a1 1 0 0 1-.789-.385l-4-5a1 1 0 1 1 1.577-1.23L6 11.376l7.213-8.99a1 1 0 1 1 1.576 1.23l-8 10a1 1 0 0 1-.789.384z"}),n==="M"&&ep.default.createElement("path",{d:"M4.5 10a1.022 1.022 0 0 1-.799-.384l-2.488-3a1 1 0 0 1 1.576-1.233L4.5 7.376l4.712-5.991a1 1 0 1 1 1.576 1.23l-5.51 7A.978.978 0 0 1 4.5 10z"}))}dC.displayName="CheckmarkMedium";function Bz(e){return _.createElement(ga,e,_.createElement(Mz,null))}const Iz={...Af,autoFlow:["gridAutoFlow",tt],autoColumns:["gridAutoColumns",Pd],autoRows:["gridAutoRows",Pd],areas:["gridTemplateAreas",Nz],columns:["gridTemplateColumns",R5],rows:["gridTemplateRows",R5],gap:["gap",le],rowGap:["rowGap",le],columnGap:["columnGap",le],justifyItems:["justifyItems",tt],justifyContent:["justifyContent",tt],alignItems:["alignItems",tt],alignContent:["alignContent",tt]};function Lz(e,t){let{children:n,...r}=e,{styleProps:i}=st(r,Iz);i.style.display="grid";let a=Nn(t);return _.createElement("div",{...Xt(r),...i,ref:a},n)}function Nz(e){return e.map(t=>`"${t}"`).join(` +`)}function Pd(e){return/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(e)?e:le(e)}function R5(e){return Array.isArray(e)?e.map(Pd).join(" "):Pd(e)}const jz=y.forwardRef(Lz);function P$(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var zf={};P$(zf,"flex",()=>e1,e=>e1=e);P$(zf,"flex-container",()=>t1,e=>t1=e);P$(zf,"flex-gap",()=>n1,e=>n1=e);var e1,t1,n1;e1="NW91UW_flex";t1="NW91UW_flex-container";n1="NW91UW_flex-gap";function zz(e){return e&&e.__esModule?e.default:e}const Vz={direction:["flexDirection",tt],wrap:["flexWrap",Uz],justifyContent:["justifyContent",tp],alignItems:["alignItems",tp],alignContent:["alignContent",tp]};function Wz(e,t){let{children:n,...r}=e,i=h8(),a=(i==null?void 0:i.matchedBreakpoints)||["base"],{styleProps:s}=st(r),{styleProps:o}=st(r,Vz),l=Nn(t),u={...s.style,...o.style};return e.gap!=null&&(u.gap=Nh(e.gap,a)),e.columnGap!=null&&(u.columnGap=Nh(e.columnGap,a)),e.rowGap!=null&&(u.rowGap=Nh(e.rowGap,a)),_.createElement("div",{...Xt(r),className:V(zz(zf),"flex",s.className),style:u,ref:l},n)}function tp(e){return e==="start"?"flex-start":e==="end"?"flex-end":e}function Uz(e){return typeof e=="boolean"?e?"wrap":"nowrap":e}const fC=y.forwardRef(Wz);var hC={};Object.defineProperty(hC,"__esModule",{value:!0});var Hz=hC.CrossLarge=pC,np=Kz(y);function Kz(e){return e&&e.__esModule?e:{default:e}}function r1(){return r1=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function pC(e){var t=e.scale,n=t===void 0?"M":t,r=Yz(e,["scale"]);return np.default.createElement("svg",r1({},r,r),n==="L"&&np.default.createElement("path",{d:"M15.697 14.283L9.414 8l6.283-6.283A1 1 0 1 0 14.283.303L8 6.586 1.717.303A1 1 0 1 0 .303 1.717L6.586 8 .303 14.283a1 1 0 1 0 1.414 1.414L8 9.414l6.283 6.283a1 1 0 1 0 1.414-1.414z"}),n==="M"&&np.default.createElement("path",{d:"M11.697 10.283L7.414 6l4.283-4.283A1 1 0 1 0 10.283.303L6 4.586 1.717.303A1 1 0 1 0 .303 1.717L4.586 6 .303 10.283a1 1 0 1 0 1.414 1.414L6 7.414l4.283 4.283a1 1 0 1 0 1.414-1.414z"}))}pC.displayName="CrossLarge";function Gz(e){return _.createElement(ga,e,_.createElement(Hz,null))}function se(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var q={};se(q,"focus-ring",()=>i1,e=>i1=e);se(q,"i18nFontFamily",()=>a1,e=>a1=e);se(q,"is-disabled",()=>s1,e=>s1=e);se(q,"is-focused",()=>o1,e=>o1=e);se(q,"is-hovered",()=>l1,e=>l1=e);se(q,"is-invalid",()=>u1,e=>u1=e);se(q,"is-outsideMonth",()=>c1,e=>c1=e);se(q,"is-pressed",()=>d1,e=>d1=e);se(q,"is-range-end",()=>f1,e=>f1=e);se(q,"is-range-selection",()=>h1,e=>h1=e);se(q,"is-range-start",()=>p1,e=>p1=e);se(q,"is-selected",()=>m1,e=>m1=e);se(q,"is-selection-end",()=>g1,e=>g1=e);se(q,"is-selection-start",()=>v1,e=>v1=e);se(q,"is-today",()=>b1,e=>b1=e);se(q,"is-unavailable",()=>y1,e=>y1=e);se(q,"next",()=>$1,e=>$1=e);se(q,"prev",()=>x1,e=>x1=e);se(q,"spectrum-Calendar",()=>w1,e=>w1=e);se(q,"spectrum-Calendar--padded",()=>D1,e=>D1=e);se(q,"spectrum-Calendar-body",()=>_1,e=>_1=e);se(q,"spectrum-Calendar-date",()=>E1,e=>E1=e);se(q,"spectrum-Calendar-dateText",()=>S1,e=>S1=e);se(q,"spectrum-Calendar-dayOfWeek",()=>C1,e=>C1=e);se(q,"spectrum-Calendar-header",()=>k1,e=>k1=e);se(q,"spectrum-Calendar-monthHeader",()=>P1,e=>P1=e);se(q,"spectrum-Calendar-months",()=>T1,e=>T1=e);se(q,"spectrum-Calendar-nextMonth",()=>R1,e=>R1=e);se(q,"spectrum-Calendar-prevMonth",()=>M1,e=>M1=e);se(q,"spectrum-Calendar-table",()=>F1,e=>F1=e);se(q,"spectrum-Calendar-tableCell",()=>A1,e=>A1=e);se(q,"spectrum-Calendar-title",()=>O1,e=>O1=e);se(q,"spectrum-FocusRing-ring",()=>Td,e=>Td=e);se(q,"spectrum-FocusRing",()=>B1,e=>B1=e);se(q,"spectrum-FocusRing--quiet",()=>I1,e=>I1=e);se(q,"title",()=>L1,e=>L1=e);var i1,a1,s1,o1,l1,u1,c1,d1,f1,h1,p1,m1,g1,v1,b1,y1,$1,x1,w1,D1,_1,E1,S1,C1,k1,P1,T1,R1,M1,F1,A1,O1,Td,B1,I1,L1;i1="EuwYBq_focus-ring";a1="EuwYBq_i18nFontFamily";s1="EuwYBq_is-disabled";o1="EuwYBq_is-focused";l1="EuwYBq_is-hovered";u1="EuwYBq_is-invalid";c1="EuwYBq_is-outsideMonth";d1="EuwYBq_is-pressed";f1="EuwYBq_is-range-end";h1="EuwYBq_is-range-selection";p1="EuwYBq_is-range-start";m1="EuwYBq_is-selected";g1="EuwYBq_is-selection-end";v1="EuwYBq_is-selection-start";b1="EuwYBq_is-today";y1="EuwYBq_is-unavailable";$1="EuwYBq_next";x1="EuwYBq_prev";w1="EuwYBq_spectrum-Calendar";D1="EuwYBq_spectrum-Calendar--padded";_1="EuwYBq_spectrum-Calendar-body";E1="EuwYBq_spectrum-Calendar-date";S1="EuwYBq_spectrum-Calendar-dateText";C1="EuwYBq_spectrum-Calendar-dayOfWeek";k1="EuwYBq_spectrum-Calendar-header";P1="EuwYBq_spectrum-Calendar-monthHeader";T1="EuwYBq_spectrum-Calendar-months";R1="EuwYBq_spectrum-Calendar-nextMonth";M1="EuwYBq_spectrum-Calendar-prevMonth";F1="EuwYBq_spectrum-Calendar-table";A1="EuwYBq_spectrum-Calendar-tableCell";O1="EuwYBq_spectrum-Calendar-title";Td="EuwYBq_spectrum-FocusRing-ring";B1=`EuwYBq_spectrum-FocusRing ${Td}`;I1="EuwYBq_spectrum-FocusRing--quiet";L1="EuwYBq_title";function rp(e){return e&&e.__esModule?e.default:e}function Zz({state:e,currentMonth:t,...n}){let r=y.useRef(),{cellProps:i,buttonProps:a,isPressed:s,isSelected:o,isDisabled:l,isFocused:u,isInvalid:c,formattedDate:d}=HN({...n,isDisabled:!F2(n.date,t)},e,r),f=e.isCellUnavailable(n.date)&&!l,h=!l&&!c&&e.isCellUnavailable(n.date.add({days:1})),p=!l&&!c&&e.isCellUnavailable(n.date.subtract({days:1})),g="highlightedRange"in e&&e.highlightedRange,b=o&&g&&Ze(n.date,g.start),v=o&&g&&Ze(n.date,g.end),{locale:m}=Qe(),$=kf(n.date,m),w=o&&(p||$===0||n.date.day===1),D=o&&(h||$===6||n.date.day===t.calendar.getDaysInMonth(t)),{focusProps:S,isFocusVisible:k}=fl(),{hoverProps:x,isHovered:T}=If({isDisabled:l||f||e.isReadOnly});return _.createElement("td",{...i,className:V(rp(q),"spectrum-Calendar-tableCell")},_.createElement("span",{...de(a,x,S),ref:r,className:V(rp(q),"spectrum-Calendar-date",{"is-today":x8(n.date,e.timeZone),"is-selected":o,"is-focused":u&&k,"is-disabled":l&&!c,"is-unavailable":f||c&&l,"is-outsideMonth":!F2(n.date,t),"is-range-start":w,"is-range-end":D,"is-range-selection":o&&"highlightedRange"in e,"is-selection-start":b,"is-selection-end":v,"is-hovered":T,"is-pressed":s&&!e.isReadOnly,"is-invalid":c})},_.createElement("span",{className:V(rp(q),"spectrum-Calendar-dateText")},_.createElement("span",null,d))))}function ip(e){return e&&e.__esModule?e.default:e}function Xz(e){let{state:t,startDate:n}=e,{gridProps:r,headerProps:i,weekDays:a}=WN({...e,endDate:Wc(n)},t),{locale:s}=Qe(),o=wI(n,s);return _.createElement("table",{...r,className:V(ip(q),"spectrum-Calendar-body","spectrum-Calendar-table")},_.createElement("thead",i,_.createElement("tr",null,a.map((l,u)=>_.createElement("th",{key:u,className:V(ip(q),"spectrum-Calendar-tableCell")},_.createElement("span",{className:V(ip(q),"spectrum-Calendar-dayOfWeek")},l))))),_.createElement("tbody",null,[...new Array(o).keys()].map(l=>_.createElement("tr",{key:l},t.getDatesInWeek(l,n).map((u,c)=>u?_.createElement(Zz,{key:c,state:t,date:u,currentMonth:n}):_.createElement("td",{key:c}))))))}var mC={};mC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"التاريخ",other:"التواريخ"})} المحدد/المحددة غير متوفرة.`};var gC={};gC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Избраната дата не е налична",other:"Избраните дати не са налични"})}.`};var vC={};vC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Vybrané datum není",other:"Vybraná data nejsou"})} k dispozici.`};var bC={};bC={invalidSelection:(e,t)=>`Valgte ${t.plural(e.selectedCount,{one:"dato",other:"datoer"})} ikke ledige.`};var yC={};yC={invalidSelection:(e,t)=>`Ausgewählte(s) ${t.plural(e.selectedCount,{one:"Datum",other:"Daten"})} nicht verfügbar.`};var $C={};$C={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη",other:"Οι επιλεγμένες ημερομηνίες δεν είναι διαθέσιμες"})}.`};var xC={};xC={invalidSelection:(e,t)=>`Selected ${t.plural(e.selectedCount,{one:"date",other:"dates"})} unavailable.`};var wC={};wC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"La fecha seleccionada no está disponible",other:"Las fechas seleccionadas no están disponibles"})}.`};var DC={};DC={invalidSelection:(e,t)=>`Valitud ${t.plural(e.selectedCount,{one:"kuupäev",other:"kuupäevad"})} pole saadaval.`};var _C={};_C={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Valittu päivämäärä ei ole",other:"Valitut päivämäärät eivät ole"})} saatavilla.`};var EC={};EC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"La date sélectionnée est indisponible",other:"Les dates sélectionnées sont indisponibles"})}.`};var SC={};SC={invalidSelection:(e,t)=>`נבחר ${t.plural(e.selectedCount,{one:"תאריך",other:"תאריכים"})} אינו זמין.`};var CC={};CC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Odabrani datum nije dostupan",other:"Odabrani datumi nisu dostupni"})}.`};var kC={};kC={invalidSelection:(e,t)=>`A kijelölt ${t.plural(e.selectedCount,{one:"dátum nem érhető el",other:"dátumok nem érhetőek el"})}.`};var PC={};PC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data selezionata non disponibile",other:"Date selezionate non disponibili"})}.`};var TC={};TC={invalidSelection:(e,t)=>`選択した${t.plural(e.selectedCount,{one:"日付",other:"日付"})}は使用できません。`};var RC={};RC={invalidSelection:(e,t)=>`선택한 ${t.plural(e.selectedCount,{one:"일자를",other:"일자를"})} 사용할 수 없습니다.`};var MC={};MC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Datos",other:"Datų"})} pasirinkimas negalimas.`};var FC={};FC={invalidSelection:(e,t)=>`Atlasītais(-ie) ${t.plural(e.selectedCount,{one:"date",other:"dates"})} nav pieejams(-i).`};var AC={};AC={invalidSelection:(e,t)=>`Valgt(e) ${t.plural(e.selectedCount,{one:"dato",other:"datoer"})} er utilgjengelig.`};var OC={};OC={invalidSelection:(e,t)=>`Geselecteerde ${t.plural(e.selectedCount,{one:"datum",other:"datums"})} niet beschikbaar.`};var BC={};BC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Wybrana data jest niedostępna",other:"Wybrane daty są niedostępne"})}.`};var IC={};IC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data",other:"Datas"})} selecionada(s) indisponível(is).`};var LC={};LC={invalidSelection:(e,t)=>`A(s) ${t.plural(e.selectedCount,{one:"data",other:"datas"})} selecionada(s) não está(ão) disponível/disponível(eis).`};var NC={};NC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data selectată nu este disponibilă",other:"Datele selectate nu sunt disponibile"})}.`};var jC={};jC={invalidSelection:(e,t)=>`Выбранные ${t.plural(e.selectedCount,{one:"дата",other:"даты"})} недоступны.`};var zC={};zC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Vybratý dátum",other:"Vybraté dátumy"})}: nedostupné.`};var VC={};VC={invalidSelection:(e,t)=>`Izbrano ${t.plural(e.selectedCount,{one:"date",other:"dates"})} ni na voljo.`};var WC={};WC={invalidSelection:(e,t)=>`Izabrani ${t.plural(e.selectedCount,{one:"date",other:"dates"})} nije dostupan.`};var UC={};UC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Valt datum är inte tillgängligt.",other:"Valda datum är inte tillgängliga."})}`};var HC={};HC={invalidSelection:(e,t)=>`Seçilen ${t.plural(e.selectedCount,{one:"tarih",other:"tarihler"})} müsait değil.`};var KC={};KC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Вибрана дата недоступна",other:"Вибрані дати недоступні"})}.`};var YC={};YC={invalidSelection:(e,t)=>`选定的 ${t.plural(e.selectedCount,{one:"个日期",other:"个日期"})} 不可用。`};var qC={};qC={invalidSelection:(e,t)=>`所選的${t.plural(e.selectedCount,{one:"日期",other:"日期"})}無法使用。`};var GC={};GC={"ar-AE":mC,"bg-BG":gC,"cs-CZ":vC,"da-DK":bC,"de-DE":yC,"el-GR":$C,"en-US":xC,"es-ES":wC,"et-EE":DC,"fi-FI":_C,"fr-FR":EC,"he-IL":SC,"hr-HR":CC,"hu-HU":kC,"it-IT":PC,"ja-JP":TC,"ko-KR":RC,"lt-LT":MC,"lv-LV":FC,"nb-NO":AC,"nl-NL":OC,"pl-PL":BC,"pt-BR":IC,"pt-PT":LC,"ro-RO":NC,"ru-RU":jC,"sk-SK":zC,"sl-SI":VC,"sr-SP":WC,"sv-SE":UC,"tr-TR":HC,"uk-UA":KC,"zh-CN":YC,"zh-TW":qC};var ZC={};Object.defineProperty(ZC,"__esModule",{value:!0});var Qz=ZC.ChevronLeftLarge=XC,ap=Jz(y);function Jz(e){return e&&e.__esModule?e:{default:e}}function N1(){return N1=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function XC(e){var t=e.scale,n=t===void 0?"M":t,r=eV(e,["scale"]);return ap.default.createElement("svg",N1({},r,r),n==="L"&&ap.default.createElement("path",{d:"M12.109 17.853l-8.066-7.849 8.066-7.84a1.243 1.243 0 0 0 .381-.894 1.24 1.24 0 0 0-2.12-.894L1.379 9.108a1.246 1.246 0 0 0 .003 1.79l8.99 8.744a1.247 1.247 0 1 0 1.738-1.789z"}),n==="M"&&ap.default.createElement("path",{d:"M9.605 13.843L3.55 8l6.056-5.84A1.248 1.248 0 1 0 7.876.363L.882 7.1a1.243 1.243 0 0 0 .003 1.797l6.988 6.742a1.248 1.248 0 1 0 1.732-1.796z"}))}XC.displayName="ChevronLeftLarge";function M5(e){return _.createElement(ga,e,_.createElement(Qz,null))}var QC={};Object.defineProperty(QC,"__esModule",{value:!0});var nV=QC.ChevronRightLarge=JC,sp=rV(y);function rV(e){return e&&e.__esModule?e:{default:e}}function j1(){return j1=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function JC(e){var t=e.scale,n=t===void 0?"M":t,r=iV(e,["scale"]);return sp.default.createElement("svg",j1({},r,r),n==="L"&&sp.default.createElement("path",{d:"M15 10.004a1.243 1.243 0 0 0-.38-.894L5.631.364a1.249 1.249 0 1 0-1.741 1.79l8.066 7.85-8.069 7.847a1.249 1.249 0 0 0 1.741 1.79l8.992-8.74a1.246 1.246 0 0 0 .379-.897z"}),n==="M"&&sp.default.createElement("path",{d:"M11.5 8a1.241 1.241 0 0 0-.386-.897L4.128.36a1.248 1.248 0 1 0-1.733 1.797L8.45 8l-6.058 5.84a1.248 1.248 0 1 0 1.733 1.797L11.117 8.9A1.245 1.245 0 0 0 11.5 8z"}))}JC.displayName="ChevronRightLarge";function F5(e){return _.createElement(ga,e,_.createElement(nV,null))}function jn(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Rt={};jn(Rt,"focus-ring",()=>z1,e=>z1=e);jn(Rt,"i18nFontFamily",()=>V1,e=>V1=e);jn(Rt,"is-disabled",()=>W1,e=>W1=e);jn(Rt,"spectrum-FocusRing-ring",()=>Rd,e=>Rd=e);jn(Rt,"spectrum-FocusRing",()=>U1,e=>U1=e);jn(Rt,"spectrum-FocusRing--quiet",()=>H1,e=>H1=e);jn(Rt,"spectrum-HelpText",()=>K1,e=>K1=e);jn(Rt,"spectrum-HelpText--negative",()=>Y1,e=>Y1=e);jn(Rt,"spectrum-HelpText--neutral",()=>q1,e=>q1=e);jn(Rt,"spectrum-HelpText-text",()=>G1,e=>G1=e);jn(Rt,"spectrum-HelpText-validationIcon",()=>Z1,e=>Z1=e);var z1,V1,W1,Rd,U1,H1,K1,Y1,q1,G1,Z1;z1="a1Qy2q_focus-ring";V1="a1Qy2q_i18nFontFamily";W1="a1Qy2q_is-disabled";Rd="a1Qy2q_spectrum-FocusRing-ring";U1=`a1Qy2q_spectrum-FocusRing ${Rd}`;H1="a1Qy2q_spectrum-FocusRing--quiet";K1="a1Qy2q_spectrum-HelpText";Y1="a1Qy2q_spectrum-HelpText--negative";q1="a1Qy2q_spectrum-HelpText--neutral";G1="a1Qy2q_spectrum-HelpText-text";Z1="a1Qy2q_spectrum-HelpText-validationIcon";var ek={};Object.defineProperty(ek,"__esModule",{value:!0});var tk=ek.AlertMedium=nk,op=sV(y);function sV(e){return e&&e.__esModule?e:{default:e}}function X1(){return X1=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function nk(e){var t=e.scale,n=t===void 0?"M":t,r=oV(e,["scale"]);return op.default.createElement("svg",X1({},r,r),n==="L"&&op.default.createElement("path",{d:"M10.563 2.206l-9.249 16.55a.5.5 0 0 0 .436.744h18.5a.5.5 0 0 0 .436-.744l-9.251-16.55a.5.5 0 0 0-.872 0zm1.436 15.044a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25zm0-3.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-6a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25z"}),n==="M"&&op.default.createElement("path",{d:"M8.564 1.289L.2 16.256A.5.5 0 0 0 .636 17h16.728a.5.5 0 0 0 .436-.744L9.436 1.289a.5.5 0 0 0-.872 0zM10 14.75a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25zm0-3a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-6a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25z"}))}nk.displayName="AlertMedium";const rk=e=>_.createElement("svg",j0({viewBox:"0 0 18 18"},e),_.createElement("path",{d:"M9 10.5a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v4.5a1 1 0 0 1-1 1Zm0 1.25A1.25 1.25 0 1 0 10.25 13 1.25 1.25 0 0 0 9 11.75Zm8.497 3.589a3.49 3.49 0 0 0 .079-3.474L12 1.815a3.385 3.385 0 0 0-5.994-.007L.416 11.88a3.485 3.485 0 0 0 .089 3.459A3.375 3.375 0 0 0 3.416 17h11.169a3.375 3.375 0 0 0 2.912-1.661ZM10.244 2.77l5.575 10.05a1.497 1.497 0 0 1-.037 1.489 1.374 1.374 0 0 1-1.197.69H3.416a1.374 1.374 0 0 1-1.197-.69 1.493 1.493 0 0 1-.046-1.474l5.593-10.08a1.386 1.386 0 0 1 2.478.015Z"}));rk.displayName=tk.displayName;function ik(e){var t;let n=ma();return _.createElement(ga,e,n!=null&&(t=n.theme)!=null&&(t=t.global)!=null&&t.express?_.createElement(rk,null):_.createElement(tk,null))}function Su(e){return e&&e.__esModule?e.default:e}function uV(e,t){let{description:n,errorMessage:r,validationState:i,isInvalid:a,isDisabled:s,showErrorIcon:o,descriptionProps:l,errorMessageProps:u}=e,c=Nn(t),d=r&&(a||i==="invalid"),{styleProps:f}=st(e);return _.createElement("div",{...f,className:V(Su(Rt),"spectrum-HelpText",`spectrum-HelpText--${d?"negative":"neutral"}`,{"is-disabled":s},f.className),ref:c},d?_.createElement(_.Fragment,null,o&&_.createElement(ik,{UNSAFE_className:V(Su(Rt),"spectrum-HelpText-validationIcon")}),_.createElement("div",{...u,className:V(Su(Rt),"spectrum-HelpText-text")},r)):_.createElement("div",{...l,className:V(Su(Rt),"spectrum-HelpText-text")},n))}const ak=_.forwardRef(uV);var sk={};sk={"(optional)":"(اختياري)","(required)":"(مطلوب)"};var ok={};ok={"(optional)":"(незадължително)","(required)":"(задължително)"};var lk={};lk={"(optional)":"(volitelně)","(required)":"(požadováno)"};var uk={};uk={"(optional)":"(valgfrit)","(required)":"(obligatorisk)"};var ck={};ck={"(optional)":"(optional)","(required)":"(erforderlich)"};var dk={};dk={"(optional)":"(προαιρετικό)","(required)":"(απαιτείται)"};var fk={};fk={"(required)":"(required)","(optional)":"(optional)"};var hk={};hk={"(optional)":"(opcional)","(required)":"(obligatorio)"};var pk={};pk={"(optional)":"(valikuline)","(required)":"(nõutav)"};var mk={};mk={"(optional)":"(valinnainen)","(required)":"(pakollinen)"};var gk={};gk={"(optional)":"(facultatif)","(required)":"(requis)"};var vk={};vk={"(optional)":"(אופציונלי)","(required)":"(נדרש)"};var bk={};bk={"(optional)":"(opcionalno)","(required)":"(obvezno)"};var yk={};yk={"(optional)":"(opcionális)","(required)":"(kötelező)"};var $k={};$k={"(optional)":"(facoltativo)","(required)":"(obbligatorio)"};var xk={};xk={"(optional)":"(オプション)","(required)":"(必須)"};var wk={};wk={"(optional)":"(선택 사항)","(required)":"(필수 사항)"};var Dk={};Dk={"(optional)":"(pasirenkama)","(required)":"(privaloma)"};var _k={};_k={"(optional)":"(neobligāti)","(required)":"(obligāti)"};var Ek={};Ek={"(optional)":"(valgfritt)","(required)":"(obligatorisk)"};var Sk={};Sk={"(optional)":"(optioneel)","(required)":"(vereist)"};var Ck={};Ck={"(optional)":"(opcjonalne)","(required)":"(wymagane)"};var kk={};kk={"(optional)":"(opcional)","(required)":"(obrigatório)"};var Pk={};Pk={"(optional)":"(opcional)","(required)":"(obrigatório)"};var Tk={};Tk={"(optional)":"(opţional)","(required)":"(obligatoriu)"};var Rk={};Rk={"(optional)":"(дополнительно)","(required)":"(обязательно)"};var Mk={};Mk={"(optional)":"(nepovinné)","(required)":"(povinné)"};var Fk={};Fk={"(optional)":"(opcijsko)","(required)":"(obvezno)"};var Ak={};Ak={"(optional)":"(opciono)","(required)":"(obavezno)"};var Ok={};Ok={"(optional)":"(valfritt)","(required)":"(krävs)"};var Bk={};Bk={"(optional)":"(isteğe bağlı)","(required)":"(gerekli)"};var Ik={};Ik={"(optional)":"(необов’язково)","(required)":"(обов’язково)"};var Lk={};Lk={"(optional)":"(可选)","(required)":"(必填)"};var Nk={};Nk={"(optional)":"(選填)","(required)":"(必填)"};var jk={};jk={"ar-AE":sk,"bg-BG":ok,"cs-CZ":lk,"da-DK":uk,"de-DE":ck,"el-GR":dk,"en-US":fk,"es-ES":hk,"et-EE":pk,"fi-FI":mk,"fr-FR":gk,"he-IL":vk,"hr-HR":bk,"hu-HU":yk,"it-IT":$k,"ja-JP":xk,"ko-KR":wk,"lt-LT":Dk,"lv-LV":_k,"nb-NO":Ek,"nl-NL":Sk,"pl-PL":Ck,"pt-BR":kk,"pt-PT":Pk,"ro-RO":Tk,"ru-RU":Rk,"sk-SK":Mk,"sl-SI":Fk,"sr-SP":Ak,"sv-SE":Ok,"tr-TR":Bk,"uk-UA":Ik,"zh-CN":Lk,"zh-TW":Nk};function ve(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var te={};ve(te,"contextualHelp",()=>Q1,e=>Q1=e);ve(te,"field",()=>J1,e=>J1=e);ve(te,"focus-ring",()=>e4,e=>e4=e);ve(te,"helpText",()=>t4,e=>t4=e);ve(te,"i18nFontFamily",()=>n4,e=>n4=e);ve(te,"is-disabled",()=>r4,e=>r4=e);ve(te,"label",()=>i4,e=>i4=e);ve(te,"spectrum-Field",()=>a4,e=>a4=e);ve(te,"spectrum-Field--alignEnd",()=>s4,e=>s4=e);ve(te,"spectrum-Field--hasContextualHelp",()=>o4,e=>o4=e);ve(te,"spectrum-Field--positionSide",()=>l4,e=>l4=e);ve(te,"spectrum-Field--positionTop",()=>u4,e=>u4=e);ve(te,"spectrum-Field-contextualHelp",()=>c4,e=>c4=e);ve(te,"spectrum-Field-field",()=>d4,e=>d4=e);ve(te,"spectrum-Field-labelCell",()=>f4,e=>f4=e);ve(te,"spectrum-Field-labelWrapper",()=>h4,e=>h4=e);ve(te,"spectrum-Field-wrapper",()=>p4,e=>p4=e);ve(te,"spectrum-FieldLabel",()=>m4,e=>m4=e);ve(te,"spectrum-FieldLabel--alignEnd",()=>g4,e=>g4=e);ve(te,"spectrum-FieldLabel--positionSide",()=>v4,e=>v4=e);ve(te,"spectrum-FieldLabel-requiredIcon",()=>b4,e=>b4=e);ve(te,"spectrum-FocusRing-ring",()=>Md,e=>Md=e);ve(te,"spectrum-FocusRing",()=>y4,e=>y4=e);ve(te,"spectrum-FocusRing--quiet",()=>$4,e=>$4=e);ve(te,"spectrum-Form",()=>x4,e=>x4=e);ve(te,"spectrum-Form--positionSide",()=>w4,e=>w4=e);ve(te,"spectrum-Form--positionTop",()=>D4,e=>D4=e);ve(te,"spectrum-Form-itemLabel",()=>_4,e=>_4=e);ve(te,"spectrum-LabeledValue",()=>E4,e=>E4=e);var Q1,J1,e4,t4,n4,r4,i4,a4,s4,o4,l4,u4,c4,d4,f4,h4,p4,m4,g4,v4,b4,Md,y4,$4,x4,w4,D4,_4,E4;Q1="A-HlBa_contextualHelp";J1="A-HlBa_field";e4="A-HlBa_focus-ring";t4="A-HlBa_helpText";n4="A-HlBa_i18nFontFamily";r4="A-HlBa_is-disabled";i4="A-HlBa_label";a4="A-HlBa_spectrum-Field";s4="A-HlBa_spectrum-Field--alignEnd";o4="A-HlBa_spectrum-Field--hasContextualHelp";l4="A-HlBa_spectrum-Field--positionSide";u4="A-HlBa_spectrum-Field--positionTop";c4="A-HlBa_spectrum-Field-contextualHelp";d4="A-HlBa_spectrum-Field-field";f4="A-HlBa_spectrum-Field-labelCell";h4="A-HlBa_spectrum-Field-labelWrapper";p4="A-HlBa_spectrum-Field-wrapper";m4="A-HlBa_spectrum-FieldLabel";g4="A-HlBa_spectrum-FieldLabel--alignEnd";v4="A-HlBa_spectrum-FieldLabel--positionSide";b4="A-HlBa_spectrum-FieldLabel-requiredIcon";Md="A-HlBa_spectrum-FocusRing-ring";y4=`A-HlBa_spectrum-FocusRing ${Md}`;$4="A-HlBa_spectrum-FocusRing--quiet";x4="A-HlBa_spectrum-Form";w4="A-HlBa_spectrum-Form--positionSide";D4="A-HlBa_spectrum-Form--positionTop";_4="A-HlBa_spectrum-Form-itemLabel";E4="A-HlBa_spectrum-LabeledValue";var zk={};Object.defineProperty(zk,"__esModule",{value:!0});var cV=zk.Asterisk=Vk,lp=dV(y);function dV(e){return e&&e.__esModule?e:{default:e}}function S4(){return S4=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function Vk(e){var t=e.scale,n=t===void 0?"M":t,r=fV(e,["scale"]);return lp.default.createElement("svg",S4({},r,r),n==="L"&&lp.default.createElement("path",{d:"M7.867 7.872c.061.062.103.145 0 .228l-1.283.827c-.104.061-.145.02-.186-.083L4.804 6.07l-2.09 2.297c-.021.042-.083.083-.145 0l-.994-1.035c-.103-.062-.082-.124 0-.186l2.36-1.966-2.691-1.014c-.042 0-.104-.083-.062-.186l.703-1.41a.11.11 0 0 1 .187-.04L4.43 4.06l.145-3.02A.109.109 0 0 1 4.7.917l1.718.227c.104 0 .124.042.104.145l-.808 2.96 2.734-.828c.061-.042.124-.042.165.082l.27 1.532c.02.103 0 .145-.084.145l-2.856.227z"}),n==="M"&&lp.default.createElement("path",{d:"M6.573 6.558c.056.055.092.13 0 .204l-1.148.74c-.093.056-.13.02-.167-.073L3.832 4.947l-1.87 2.055c-.02.037-.075.074-.13 0l-.889-.926c-.092-.055-.074-.111 0-.167l2.111-1.76-2.408-.906c-.037 0-.092-.074-.055-.167l.63-1.259a.097.097 0 0 1 .166-.036l2.111 1.37.13-2.704a.097.097 0 0 1 .111-.11L5.277.54c.092 0 .11.037.092.13l-.722 2.647 2.444-.74c.056-.038.111-.038.148.073l.241 1.37c.019.093 0 .13-.074.13l-2.556.204z"}))}Vk.displayName="Asterisk";function pV(e){return _.createElement(ga,e,_.createElement(cV,null))}function up(e){return e&&e.__esModule?e.default:e}function mV(e,t){e=jl(e);let{children:n,labelPosition:r="top",labelAlign:i=r==="side"?"start":null,isRequired:a,necessityIndicator:s=a!=null?"icon":null,includeNecessityIndicatorInAccessibilityName:o=!1,htmlFor:l,for:u,elementType:c="label",onClick:d,...f}=e,h=Nn(t),{styleProps:p}=st(f),g=Sn(up(jk),"@react-spectrum/label"),b=a?g.format("(required)"):g.format("(optional)"),v=_.createElement(pV,{UNSAFE_className:V(up(te),"spectrum-FieldLabel-requiredIcon"),"aria-label":o?g.format("(required)"):void 0}),m=V(up(te),"spectrum-FieldLabel",{"spectrum-FieldLabel--positionSide":r==="side","spectrum-FieldLabel--alignEnd":i==="end"},p.className);return _.createElement(c,{...Xt(f),...p,onClick:d,ref:h,className:m,htmlFor:c==="label"?u||l:void 0},n,(s==="label"||s==="icon"&&a)&&" ​",s==="label"&&_.createElement("span",{"aria-hidden":o?void 0:a},b),s==="icon"&&a&&v)}let gV=_.forwardRef(mV),vV=_.createContext(null);function T$(e){let t=y.useContext(vV);return t?{...t,...e}:e}function xi(e){return e&&e.__esModule?e.default:e}function bV(e,t){let n=T$(e),r=n!==e;e=n;let{label:i,labelPosition:a="top",labelAlign:s,isRequired:o,necessityIndicator:l,includeNecessityIndicatorInAccessibilityName:u,validationState:c,isInvalid:d,description:f,errorMessage:h=N=>N.validationErrors.join(" "),validationErrors:p,validationDetails:g,isDisabled:b,showErrorIcon:v,contextualHelp:m,children:$,labelProps:w={},descriptionProps:D={},errorMessageProps:S={},elementType:k,wrapperClassName:x,wrapperProps:T={},...P}=e,{styleProps:E}=st(P),F=null;typeof h=="function"?F=d!=null&&p!=null&&g!=null?h({isInvalid:d,validationErrors:p,validationDetails:g}):null:F=h;let R=!!f||F&&(d||c==="invalid"),M=Qn(),z=Qn();i&&m&&!w.id&&(w.id=z);let O=V(xi(te),"spectrum-Field",{"spectrum-Field--positionTop":a==="top","spectrum-Field--positionSide":a==="side","spectrum-Field--alignEnd":s==="end","spectrum-Field--hasContextualHelp":!!e.contextualHelp},E.className,x);$=_.cloneElement($,de($.props,{className:V(xi(te),"spectrum-Field-field")}));let C=()=>_.createElement(ak,{descriptionProps:D,errorMessageProps:S,description:f,errorMessage:F,validationState:c,isInvalid:d,isDisabled:b,showErrorIcon:v,gridArea:xi(te).helpText}),A=()=>a==="side"?_.createElement(fC,{direction:"column",UNSAFE_className:V(xi(te),"spectrum-Field-wrapper")},$,R&&C()):_.createElement(_.Fragment,null,$,R&&C()),B=_.createElement(_.Fragment,null,i&&_.createElement(gV,{...w,labelPosition:a,labelAlign:s,isRequired:o,necessityIndicator:l,includeNecessityIndicatorInAccessibilityName:u,elementType:k},i),i&&m&&_.createElement(Of,{slots:{actionButton:{UNSAFE_className:V(xi(te),"spectrum-Field-contextualHelp"),id:M,"aria-labelledby":w!=null&&w.id?`${w.id} ${M}`:void 0}}},m));return r&&a==="side"&&i&&m&&(B=_.createElement("div",{className:V(xi(te),"spectrum-Field-labelCell")},_.createElement("div",{className:V(xi(te),"spectrum-Field-labelWrapper")},B))),_.createElement("div",{...E,...T,ref:t,className:O},B,A())}let Wk=_.forwardRef(bV);function Pr(e){return e&&e.__esModule?e.default:e}function yV(e){let{state:t,calendarProps:n,nextButtonProps:r,prevButtonProps:i,errorMessageProps:a,calendarRef:s,visibleMonths:o=1}=e,{styleProps:l}=st(e),u=Sn(Pr(GC),"@react-spectrum/calendar"),{direction:c}=Qe(),d=t.visibleRange.start,f=xn({month:"long",year:"numeric",era:d.calendar.identifier==="gregory"&&d.era==="BC"?"short":void 0,calendar:d.calendar.identifier,timeZone:t.timeZone}),h=[],p=[];for(let g=0;gt.focusNextPage(),tabIndex:-1})),t.isValueInvalid&&_.createElement(ak,{showErrorIcon:!0,errorMessage:e.errorMessage||u.format("invalidSelection",{selectedCount:"highlightedRange"in t?2:1}),errorMessageProps:a,isInvalid:!0,UNSAFE_className:"spectrum-Calendar-helpText"}))}function $V(e,t){e=jl(e);let{visibleMonths:n=1}=e;n=Math.max(n,1);let r=y.useMemo(()=>({months:n}),[n]),{locale:i}=Qe(),a=Aj({...e,locale:i,visibleDuration:r,createCalendar:K8}),s=y.useRef();y.useImperativeHandle(t,()=>({...Sf(s),focus(){a.setFocused(!0)}}));let{calendarProps:o,prevButtonProps:l,nextButtonProps:u,errorMessageProps:c}=VN(e,a,s);return _.createElement(yV,{...e,visibleMonths:n,state:a,calendarRef:s,calendarProps:o,prevButtonProps:l,nextButtonProps:u,errorMessageProps:c})}const xV=_.forwardRef($V),Uk=_.createContext(null);var Hk={};Hk={alert:"تنبيه",dismiss:"تجاهل"};var Kk={};Kk={alert:"Сигнал",dismiss:"Отхвърляне"};var Yk={};Yk={alert:"Výstraha",dismiss:"Odstranit"};var qk={};qk={alert:"Advarsel",dismiss:"Luk"};var Gk={};Gk={alert:"Warnhinweis",dismiss:"Schließen"};var Zk={};Zk={alert:"Ειδοποίηση",dismiss:"Απόρριψη"};var Xk={};Xk={dismiss:"Dismiss",alert:"Alert"};var Qk={};Qk={alert:"Alerta",dismiss:"Descartar"};var Jk={};Jk={alert:"Teade",dismiss:"Lõpeta"};var eP={};eP={alert:"Hälytys",dismiss:"Hylkää"};var tP={};tP={alert:"Alerte",dismiss:"Rejeter"};var nP={};nP={alert:"התראה",dismiss:"התעלם"};var rP={};rP={alert:"Upozorenje",dismiss:"Odbaci"};var iP={};iP={alert:"Figyelmeztetés",dismiss:"Elutasítás"};var aP={};aP={alert:"Avviso",dismiss:"Ignora"};var sP={};sP={alert:"アラート",dismiss:"閉じる"};var oP={};oP={alert:"경고",dismiss:"무시"};var lP={};lP={alert:"Įspėjimas",dismiss:"Atmesti"};var uP={};uP={alert:"Brīdinājums",dismiss:"Nerādīt"};var cP={};cP={alert:"Varsel",dismiss:"Lukk"};var dP={};dP={alert:"Melding",dismiss:"Negeren"};var fP={};fP={alert:"Ostrzeżenie",dismiss:"Zignoruj"};var hP={};hP={alert:"Alerta",dismiss:"Descartar"};var pP={};pP={alert:"Alerta",dismiss:"Dispensar"};var mP={};mP={alert:"Alertă",dismiss:"Revocare"};var gP={};gP={alert:"Предупреждение",dismiss:"Пропустить"};var vP={};vP={alert:"Upozornenie",dismiss:"Zrušiť"};var bP={};bP={alert:"Opozorilo",dismiss:"Opusti"};var yP={};yP={alert:"Upozorenje",dismiss:"Odbaci"};var $P={};$P={alert:"Varning",dismiss:"Avvisa"};var xP={};xP={alert:"Uyarı",dismiss:"Kapat"};var wP={};wP={alert:"Сигнал тривоги",dismiss:"Скасувати"};var DP={};DP={alert:"警报",dismiss:"取消"};var _P={};_P={alert:"警示",dismiss:"關閉"};var EP={};EP={"ar-AE":Hk,"bg-BG":Kk,"cs-CZ":Yk,"da-DK":qk,"de-DE":Gk,"el-GR":Zk,"en-US":Xk,"es-ES":Qk,"et-EE":Jk,"fi-FI":eP,"fr-FR":tP,"he-IL":nP,"hr-HR":rP,"hu-HU":iP,"it-IT":aP,"ja-JP":sP,"ko-KR":oP,"lt-LT":lP,"lv-LV":uP,"nb-NO":cP,"nl-NL":dP,"pl-PL":fP,"pt-BR":hP,"pt-PT":pP,"ro-RO":mP,"ru-RU":gP,"sk-SK":vP,"sl-SI":bP,"sr-SP":yP,"sv-SE":$P,"tr-TR":xP,"uk-UA":wP,"zh-CN":DP,"zh-TW":_P};function K(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var H={};K(H,"buttonGroup",()=>C4,e=>C4=e);K(H,"buttonGroup-end",()=>k4,e=>k4=e);K(H,"closeButton",()=>P4,e=>P4=e);K(H,"content",()=>T4,e=>T4=e);K(H,"divider",()=>R4,e=>R4=e);K(H,"focus-ring",()=>M4,e=>M4=e);K(H,"footer",()=>F4,e=>F4=e);K(H,"footer-start",()=>A4,e=>A4=e);K(H,"header",()=>O4,e=>O4=e);K(H,"header-end",()=>B4,e=>B4=e);K(H,"header-start",()=>I4,e=>I4=e);K(H,"heading",()=>L4,e=>L4=e);K(H,"heading-start",()=>N4,e=>N4=e);K(H,"hero",()=>j4,e=>j4=e);K(H,"i18nFontFamily",()=>z4,e=>z4=e);K(H,"spectrum-Button",()=>V4,e=>V4=e);K(H,"spectrum-Dialog",()=>W4,e=>W4=e);K(H,"spectrum-Dialog--dismissable",()=>U4,e=>U4=e);K(H,"spectrum-Dialog--error",()=>H4,e=>H4=e);K(H,"spectrum-Dialog--fullscreen",()=>K4,e=>K4=e);K(H,"spectrum-Dialog--fullscreenTakeover",()=>Y4,e=>Y4=e);K(H,"spectrum-Dialog--large",()=>q4,e=>q4=e);K(H,"spectrum-Dialog--medium",()=>G4,e=>G4=e);K(H,"spectrum-Dialog--noDivider",()=>Z4,e=>Z4=e);K(H,"spectrum-Dialog--small",()=>X4,e=>X4=e);K(H,"spectrum-Dialog--warning",()=>Q4,e=>Q4=e);K(H,"spectrum-Dialog-buttonGroup",()=>J4,e=>J4=e);K(H,"spectrum-Dialog-buttonGroup--noFooter",()=>eb,e=>eb=e);K(H,"spectrum-Dialog-closeButton",()=>tb,e=>tb=e);K(H,"spectrum-Dialog-content",()=>nb,e=>nb=e);K(H,"spectrum-Dialog-divider",()=>rb,e=>rb=e);K(H,"spectrum-Dialog-footer",()=>ib,e=>ib=e);K(H,"spectrum-Dialog-grid",()=>ab,e=>ab=e);K(H,"spectrum-Dialog-header",()=>sb,e=>sb=e);K(H,"spectrum-Dialog-header--noTypeIcon",()=>ob,e=>ob=e);K(H,"spectrum-Dialog-heading",()=>lb,e=>lb=e);K(H,"spectrum-Dialog-heading--noHeader",()=>ub,e=>ub=e);K(H,"spectrum-Dialog-heading--noTypeIcon",()=>cb,e=>cb=e);K(H,"spectrum-Dialog-hero",()=>db,e=>db=e);K(H,"spectrum-Dialog-typeIcon",()=>fb,e=>fb=e);K(H,"spectrum-FocusRing-ring",()=>Fd,e=>Fd=e);K(H,"spectrum-FocusRing",()=>hb,e=>hb=e);K(H,"spectrum-FocusRing--quiet",()=>pb,e=>pb=e);K(H,"spectrum-overlay",()=>mb,e=>mb=e);K(H,"spectrum-overlay--bottom--open",()=>gb,e=>gb=e);K(H,"spectrum-overlay--left--open",()=>vb,e=>vb=e);K(H,"spectrum-overlay--open",()=>bb,e=>bb=e);K(H,"spectrum-overlay--right--open",()=>yb,e=>yb=e);K(H,"spectrum-overlay--top--open",()=>$b,e=>$b=e);K(H,"typeIcon",()=>xb,e=>xb=e);K(H,"typeIcon-end",()=>wb,e=>wb=e);var C4,k4,P4,T4,R4,M4,F4,A4,O4,B4,I4,L4,N4,j4,z4,V4,W4,U4,H4,K4,Y4,q4,G4,Z4,X4,Q4,J4,eb,tb,nb,rb,ib,ab,sb,ob,lb,ub,cb,db,fb,Fd,hb,pb,mb,gb,vb,bb,yb,$b,xb,wb;C4="h_OVWW_buttonGroup";k4="h_OVWW_buttonGroup-end";P4="h_OVWW_closeButton";T4="h_OVWW_content";R4="h_OVWW_divider";M4="h_OVWW_focus-ring";F4="h_OVWW_footer";A4="h_OVWW_footer-start";O4="h_OVWW_header";B4="h_OVWW_header-end";I4="h_OVWW_header-start";L4="h_OVWW_heading";N4="h_OVWW_heading-start";j4="h_OVWW_hero";z4="h_OVWW_i18nFontFamily";V4="h_OVWW_spectrum-Button";W4="h_OVWW_spectrum-Dialog";U4="h_OVWW_spectrum-Dialog--dismissable";H4="h_OVWW_spectrum-Dialog--error";K4="h_OVWW_spectrum-Dialog--fullscreen";Y4="h_OVWW_spectrum-Dialog--fullscreenTakeover";q4="h_OVWW_spectrum-Dialog--large";G4="h_OVWW_spectrum-Dialog--medium";Z4="h_OVWW_spectrum-Dialog--noDivider";X4="h_OVWW_spectrum-Dialog--small";Q4="h_OVWW_spectrum-Dialog--warning";J4="h_OVWW_spectrum-Dialog-buttonGroup";eb="h_OVWW_spectrum-Dialog-buttonGroup--noFooter";tb="h_OVWW_spectrum-Dialog-closeButton";nb="h_OVWW_spectrum-Dialog-content";rb="h_OVWW_spectrum-Dialog-divider";ib="h_OVWW_spectrum-Dialog-footer";ab="h_OVWW_spectrum-Dialog-grid";sb="h_OVWW_spectrum-Dialog-header";ob="h_OVWW_spectrum-Dialog-header--noTypeIcon";lb="h_OVWW_spectrum-Dialog-heading";ub="h_OVWW_spectrum-Dialog-heading--noHeader";cb="h_OVWW_spectrum-Dialog-heading--noTypeIcon";db="h_OVWW_spectrum-Dialog-hero";fb="h_OVWW_spectrum-Dialog-typeIcon";Fd="h_OVWW_spectrum-FocusRing-ring";hb=`h_OVWW_spectrum-FocusRing ${Fd}`;pb="h_OVWW_spectrum-FocusRing--quiet";mb="h_OVWW_spectrum-overlay";gb="h_OVWW_spectrum-overlay--bottom--open";vb="h_OVWW_spectrum-overlay--left--open";bb="h_OVWW_spectrum-overlay--open";yb="h_OVWW_spectrum-overlay--right--open";$b="h_OVWW_spectrum-overlay--top--open";xb="h_OVWW_typeIcon";wb="h_OVWW_typeIcon-end";function wt(e){return e&&e.__esModule?e.default:e}let A5={S:"small",M:"medium",L:"large",fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"};function wV(e,t){e=ui(e,"dialog");let{type:n="modal",...r}=y.useContext(Uk)||{},{children:i,isDismissable:a=r.isDismissable,onDismiss:s=r.onClose,size:o,...l}=e,u=Sn(wt(EP),"@react-spectrum/dialog"),{styleProps:c}=st(l);o=n==="popover"?o||"S":o||"L";let d=Nn(t),f=y.useRef(null),h=A5[n]||A5[o],{dialogProps:p,titleProps:g}=Mj(de(r,e),d),b=gu(`.${wt(H)["spectrum-Dialog-header"]}`,du(f)),v=gu(`.${wt(H)["spectrum-Dialog-heading"]}`,du(f)),m=gu(`.${wt(H)["spectrum-Dialog-footer"]}`,du(f)),$=gu(`.${wt(H)["spectrum-Dialog-typeIcon"]}`,du(f)),w=y.useMemo(()=>({hero:{UNSAFE_className:wt(H)["spectrum-Dialog-hero"]},heading:{UNSAFE_className:V(wt(H),"spectrum-Dialog-heading",{"spectrum-Dialog-heading--noHeader":!b,"spectrum-Dialog-heading--noTypeIcon":!$}),level:2,...g},header:{UNSAFE_className:V(wt(H),"spectrum-Dialog-header",{"spectrum-Dialog-header--noHeading":!v,"spectrum-Dialog-header--noTypeIcon":!$})},typeIcon:{UNSAFE_className:wt(H)["spectrum-Dialog-typeIcon"]},divider:{UNSAFE_className:wt(H)["spectrum-Dialog-divider"],size:"M"},content:{UNSAFE_className:wt(H)["spectrum-Dialog-content"]},footer:{UNSAFE_className:wt(H)["spectrum-Dialog-footer"]},buttonGroup:{UNSAFE_className:V(wt(H),"spectrum-Dialog-buttonGroup",{"spectrum-Dialog-buttonGroup--noFooter":!m}),align:"end"}}),[m,b,g]);return _.createElement("section",{...c,...p,className:V(wt(H),"spectrum-Dialog",{[`spectrum-Dialog--${h}`]:h,"spectrum-Dialog--dismissable":a},c.className),ref:d},_.createElement(jz,{ref:f,UNSAFE_className:wt(H)["spectrum-Dialog-grid"]},_.createElement(Of,{slots:w},i),a&&_.createElement(N0,{UNSAFE_className:wt(H)["spectrum-Dialog-closeButton"],isQuiet:!0,"aria-label":u.format("dismiss"),onPress:s},_.createElement(Gz,null))))}let DV=_.forwardRef(wV);function _V(e,t){e=ui(e,"content");let{children:n,...r}=e,{styleProps:i}=st(r),a=Nn(t);return _.createElement("section",{...Xt(r),...i,ref:a},_.createElement(l7,null,n))}const EV=y.forwardRef(_V);function Db(e){let{children:t,type:n="modal",mobileType:r=n==="popover"?"modal":n,hideArrow:i,targetRef:a,isDismissable:s,isKeyboardDismissDisabled:o,...l}=e;if(!Array.isArray(t)||t.length>2)throw new Error("DialogTrigger must have exactly 2 children");let[u,c]=t;XL()&&(n!=="modal"&&r==="modal"&&(s=!0),n=r);let f=bS(e),h=y.useRef(!1);y.useEffect(()=>{h.current=f.isOpen},[f.isOpen]);let p=y.useRef(!1),g=()=>p.current=!0,b=()=>p.current=!1;if(y.useEffect(()=>()=>{(h.current||p.current)&&n!=="popover"&&n!=="tray"&&console.warn("A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.")},[]),n==="popover")return _.createElement(CV,{...l,state:f,targetRef:a,trigger:u,content:c,isKeyboardDismissDisabled:o,hideArrow:i});let v=()=>{switch(n){case"fullscreen":case"fullscreenTakeover":case"modal":return _.createElement(kz,{state:f,isDismissable:n==="modal"?s:!1,type:n,isKeyboardDismissDisabled:o,onExiting:g,onExited:b},typeof c=="function"?c(f.close):c);case"tray":return _.createElement(Rz,{state:f,isKeyboardDismissDisabled:o},typeof c=="function"?c(f.close):c)}};return _.createElement(SP,{type:n,state:f,isDismissable:s,trigger:u,overlay:v()})}Db.getCollectionNode=function*(e){let[t]=_.Children.toArray(e.children),[,n]=e.children;yield{element:t,wrapper:r=>_.createElement(Db,{key:r.key,...e},r,n)}};let SV=Db;function CV({state:e,targetRef:t,trigger:n,content:r,hideArrow:i,...a}){let s=y.useRef(null),{triggerProps:o,overlayProps:l}=cj({type:"dialog"},e,s),u={...o,ref:t?void 0:s},c=_.createElement(_z,{...a,hideArrow:i,triggerRef:t||s,state:e},typeof r=="function"?r(e.close):r);return _.createElement(SP,{type:"popover",state:e,triggerProps:u,dialogProps:l,trigger:n,overlay:c})}function SP({type:e,state:t,isDismissable:n,dialogProps:r={},triggerProps:i={},overlay:a,trigger:s}){let o={type:e,onClose:t.close,isDismissable:n,...r};return _.createElement(y.Fragment,null,_.createElement(sN,{...i,onPress:t.toggle,isPressed:t.isOpen&&e!=="modal"&&e!=="fullscreen"&&e!=="fullscreenTakeover"},s),_.createElement(Uk.Provider,{value:o},a))}function Ue(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ee={};Ue(ee,"is-invalid",()=>_b,e=>_b=e);Ue(ee,"is-placeholder",()=>Eb,e=>Eb=e);Ue(ee,"is-read-only",()=>Sb,e=>Sb=e);Ue(ee,"react-spectrum-DateField",()=>Cb,e=>Cb=e);Ue(ee,"react-spectrum-DateField-Input",()=>kb,e=>kb=e);Ue(ee,"react-spectrum-DatePicker-cell",()=>Pb,e=>Pb=e);Ue(ee,"react-spectrum-DatePicker-placeholder",()=>Tb,e=>Tb=e);Ue(ee,"react-spectrum-Datepicker-calendar",()=>Rb,e=>Rb=e);Ue(ee,"react-spectrum-Datepicker-dialog",()=>Mb,e=>Mb=e);Ue(ee,"react-spectrum-Datepicker-dialogContent",()=>Fb,e=>Fb=e);Ue(ee,"react-spectrum-Datepicker-endField",()=>Ab,e=>Ab=e);Ue(ee,"react-spectrum-Datepicker-field",()=>Ob,e=>Ob=e);Ue(ee,"react-spectrum-Datepicker-fieldWrapper",()=>Bb,e=>Bb=e);Ue(ee,"react-spectrum-Datepicker-input",()=>Ib,e=>Ib=e);Ue(ee,"react-spectrum-Datepicker-inputContents",()=>Lb,e=>Lb=e);Ue(ee,"react-spectrum-Datepicker-literal",()=>Nb,e=>Nb=e);Ue(ee,"react-spectrum-Datepicker-rangeDash",()=>jb,e=>jb=e);Ue(ee,"react-spectrum-Datepicker-segments",()=>zb,e=>zb=e);Ue(ee,"react-spectrum-Datepicker-startField",()=>Vb,e=>Vb=e);Ue(ee,"react-spectrum-Datepicker-timeFields",()=>Wb,e=>Wb=e);Ue(ee,"react-spectrum-TimeField",()=>Ub,e=>Ub=e);Ue(ee,"react-spectrum-TimeField-fieldWrapper",()=>Hb,e=>Hb=e);var _b,Eb,Sb,Cb,kb,Pb,Tb,Rb,Mb,Fb,Ab,Ob,Bb,Ib,Lb,Nb,jb,zb,Vb,Wb,Ub,Hb;_b="_2n04KW_is-invalid";Eb="_2n04KW_is-placeholder";Sb="_2n04KW_is-read-only";Cb="_2n04KW_react-spectrum-DateField";kb="_2n04KW_react-spectrum-DateField-Input";Pb="_2n04KW_react-spectrum-DatePicker-cell";Tb="_2n04KW_react-spectrum-DatePicker-placeholder";Rb="_2n04KW_react-spectrum-Datepicker-calendar";Mb="_2n04KW_react-spectrum-Datepicker-dialog";Fb="_2n04KW_react-spectrum-Datepicker-dialogContent";Ab="_2n04KW_react-spectrum-Datepicker-endField";Ob="_2n04KW_react-spectrum-Datepicker-field";Bb="_2n04KW_react-spectrum-Datepicker-fieldWrapper";Ib="_2n04KW_react-spectrum-Datepicker-input";Lb="_2n04KW_react-spectrum-Datepicker-inputContents";Nb="_2n04KW_react-spectrum-Datepicker-literal";jb="_2n04KW_react-spectrum-Datepicker-rangeDash";zb="_2n04KW_react-spectrum-Datepicker-segments";Vb="_2n04KW_react-spectrum-Datepicker-startField";Wb="_2n04KW_react-spectrum-Datepicker-timeFields";Ub="_2n04KW_react-spectrum-TimeField";Hb="_2n04KW_react-spectrum-TimeField-fieldWrapper";function Kb(e){return e&&e.__esModule?e.default:e}function CP({segment:e,state:t,...n}){switch(e.type){case"literal":return _.createElement(kV,{segment:e});default:return _.createElement(PV,{segment:e,state:t,...n})}}function kV({segment:e}){return _.createElement("span",{"aria-hidden":"true",className:V(Kb(ee),"react-spectrum-Datepicker-literal"),"data-testid":e.type==="literal"?void 0:e.type},e.text)}function PV({segment:e,state:t}){let n=y.useRef(),{segmentProps:r}=kj(e,t,n);return _.createElement("div",{...r,ref:n,className:V(Kb(ee),"react-spectrum-DatePicker-cell",{"is-placeholder":e.isPlaceholder,"is-read-only":!e.isEditable}),style:{...r.style,minWidth:e.maxValue!=null?String(e.maxValue).length+"ch":null},"data-testid":e.type},_.createElement("span",{"aria-hidden":"true",className:V(Kb(ee),"react-spectrum-DatePicker-placeholder")},e.placeholder),e.isPlaceholder?"":e.text)}function TV(e){return e&&e.__esModule?e.default:e}function O5(e){let{isDisabled:t,isReadOnly:n,isRequired:r,inputClassName:i}=e,a=y.useRef(),{locale:s}=Qe(),o=iC({...e,locale:s,createCalendar:K8}),l=y.useRef(),{fieldProps:u,inputProps:c}=A9({...e,inputRef:l},o,a);return _.createElement("div",{...u,"data-testid":e["data-testid"],className:V(TV(ee),"react-spectrum-Datepicker-segments",i),ref:a},o.segments.map((d,f)=>_.createElement(CP,{key:f,segment:d,state:o,isDisabled:t,isReadOnly:n,isRequired:r})),_.createElement("input",{...c,ref:l}))}function He(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Re={};He(Re,"focus-ring",()=>Yb,e=>Yb=e);He(Re,"i18nFontFamily",()=>Ad,e=>Ad=e);He(Re,"is-disabled",()=>qb,e=>qb=e);He(Re,"is-focused",()=>Gb,e=>Gb=e);He(Re,"is-hovered",()=>Zb,e=>Zb=e);He(Re,"is-placeholder",()=>Xb,e=>Xb=e);He(Re,"spectrum-FocusRing-ring",()=>Od,e=>Od=e);He(Re,"spectrum-FocusRing",()=>Bd,e=>Bd=e);He(Re,"spectrum-FocusRing--quiet",()=>Id,e=>Id=e);He(Re,"spectrum-Textfield",()=>Qb,e=>Qb=e);He(Re,"spectrum-Textfield--invalid",()=>Jb,e=>Jb=e);He(Re,"spectrum-Textfield--loadable",()=>ey,e=>ey=e);He(Re,"spectrum-Textfield--multiline",()=>ty,e=>ty=e);He(Re,"spectrum-Textfield--quiet",()=>ny,e=>ny=e);He(Re,"spectrum-Textfield--valid",()=>ry,e=>ry=e);He(Re,"spectrum-Textfield-circleLoader",()=>iy,e=>iy=e);He(Re,"spectrum-Textfield-icon",()=>ay,e=>ay=e);He(Re,"spectrum-Textfield-input",()=>sy,e=>sy=e);He(Re,"spectrum-Textfield-inputIcon",()=>oy,e=>oy=e);He(Re,"spectrum-Textfield-validationIcon",()=>ly,e=>ly=e);He(Re,"spectrum-Textfield-wrapper",()=>uy,e=>uy=e);He(Re,"spectrum-Textfield-wrapper--quiet",()=>cy,e=>cy=e);var Yb,Ad,qb,Gb,Zb,Xb,Od,Bd,Id,Qb,Jb,ey,ty,ny,ry,iy,ay,sy,oy,ly,uy,cy;Yb="YO3Nla_focus-ring";Ad="YO3Nla_i18nFontFamily";qb="YO3Nla_is-disabled";Gb="YO3Nla_is-focused";Zb="YO3Nla_is-hovered";Xb="YO3Nla_is-placeholder";Od="YO3Nla_spectrum-FocusRing-ring";Bd=`YO3Nla_spectrum-FocusRing ${Od}`;Id="YO3Nla_spectrum-FocusRing--quiet";Qb=`YO3Nla_spectrum-Textfield ${Bd}`;Jb="YO3Nla_spectrum-Textfield--invalid";ey="YO3Nla_spectrum-Textfield--loadable";ty="YO3Nla_spectrum-Textfield--multiline";ny=`YO3Nla_spectrum-Textfield--quiet ${Id}`;ry="YO3Nla_spectrum-Textfield--valid";iy="YO3Nla_spectrum-Textfield-circleLoader";ay="YO3Nla_spectrum-Textfield-icon";sy=`YO3Nla_spectrum-Textfield-input ${Ad}`;oy="YO3Nla_spectrum-Textfield-inputIcon";ly="YO3Nla_spectrum-Textfield-validationIcon";uy="YO3Nla_spectrum-Textfield-wrapper";cy="YO3Nla_spectrum-Textfield-wrapper--quiet";function wi(e){return e&&e.__esModule?e.default:e}function RV(e,t){let n=y.useRef(null),{isDisabled:r,isQuiet:i,inputClassName:a,validationState:s,children:o,fieldProps:l,className:u,style:c,disableFocusRing:d}=e,[f,h]=q8(!1),p=y.useCallback(()=>h(function*(k){if(n.current){if(k){if(n.current.scrollWidth>n.current.offsetWidth){let x=n.current.parentElement.offsetWidth;yield!1,n.current.parentElement.offsetWidth!==x&&(yield!0)}}else if(n.current.offsetWidth>=n.current.scrollWidth){let x=n.current.parentElement.offsetWidth;yield!0,n.current.parentElement.offsetWidth===x&&(yield!1)}}}),[n,h]);he(p,[p]),t7({ref:n,onResize:p}),as(y.useRef(typeof window<"u"?window:null),"resize",p);let{focusProps:g,isFocusVisible:b,isFocused:v}=fl({isTextInput:!0,within:!0}),m=s==="invalid"&&!r,$=V(wi(Re),"spectrum-Textfield",{"spectrum-Textfield--invalid":m,"spectrum-Textfield--valid":s==="valid"&&!r,"spectrum-Textfield--quiet":i,"focus-ring":b&&!d},V(wi(ee),"react-spectrum-Datepicker-field"),u),w=V(wi(Re),"spectrum-Textfield-input",{"is-disabled":r,"is-focused":v},V(wi(ee),"react-spectrum-DateField-Input"),f&&V(wi(ee),"react-spectrum-Datepicker-input"),a),D=V(wi(Re),"spectrum-Textfield-validationIcon"),S=null;return s==="invalid"&&!r?S=_.createElement(ik,{"data-testid":"invalid-icon",UNSAFE_className:D}):s==="valid"&&!r&&(S=_.createElement(Bz,{"data-testid":"valid-icon",UNSAFE_className:D})),_.createElement("div",{role:"presentation",...de(l,g),className:$,style:c},_.createElement("div",{role:"presentation",className:w},_.createElement("div",{role:"presentation",className:V(wi(ee),"react-spectrum-Datepicker-inputContents"),ref:cL(t,n)},o)),S)}const kP=_.forwardRef(RV);var PP={};PP={endTime:"وقت الانتهاء",startTime:"وقت البدء",time:"الوقت"};var TP={};TP={endTime:"Краен час",startTime:"Начален час",time:"Време"};var RP={};RP={endTime:"Konečný čas",startTime:"Počáteční čas",time:"Čas"};var MP={};MP={endTime:"Sluttidspunkt",startTime:"Starttidspunkt",time:"Klokkeslæt"};var FP={};FP={endTime:"Endzeit",startTime:"Startzeit",time:"Uhrzeit"};var AP={};AP={endTime:"Χρόνος λήξης",startTime:"Ώρα έναρξης",time:"Χρόνος"};var OP={};OP={time:"Time",startTime:"Start time",endTime:"End time"};var BP={};BP={endTime:"Hora de finalización",startTime:"Hora de inicio",time:"Hora"};var IP={};IP={endTime:"Lõpuaeg",startTime:"Algusaeg",time:"Aeg"};var LP={};LP={endTime:"Päättymisaika",startTime:"Alkamisaika",time:"Aika"};var NP={};NP={endTime:"Heure de fin",startTime:"Heure de début",time:"Heure"};var jP={};jP={endTime:"שעת סיום",startTime:"שעת התחלה",time:"זמן"};var zP={};zP={endTime:"Vrijeme završetka",startTime:"Vrijeme početka",time:"Vrijeme"};var VP={};VP={endTime:"Befejezés ideje",startTime:"Kezdés ideje",time:"Idő"};var WP={};WP={endTime:"Ora di fine",startTime:"Ora di inizio",time:"Ora"};var UP={};UP={endTime:"終了時刻",startTime:"開始時刻",time:"時刻"};var HP={};HP={endTime:"종료 시간",startTime:"시작 시간",time:"시간"};var KP={};KP={endTime:"Pabaigos laikas",startTime:"Pradžios laikas",time:"Laikas"};var YP={};YP={endTime:"Beigu laiks",startTime:"Sākuma laiks",time:"Laiks"};var qP={};qP={endTime:"Sluttid",startTime:"Starttid",time:"Tid"};var GP={};GP={endTime:"Eindtijd",startTime:"Starttijd",time:"Tijd"};var ZP={};ZP={endTime:"Godzina końcowa",startTime:"Godzina początkowa",time:"Godzina"};var XP={};XP={endTime:"Hora final",startTime:"Hora inicial",time:"Hora"};var QP={};QP={endTime:"Terminar tempo",startTime:"Iniciar tempo",time:"Tempo"};var JP={};JP={endTime:"Ora de sfârșit",startTime:"Ora de început",time:"Ora"};var eT={};eT={endTime:"Время окончания",startTime:"Время начала",time:"Время"};var tT={};tT={endTime:"Čas ukončenia",startTime:"Čas začiatku",time:"Čas"};var nT={};nT={endTime:"Končni čas",startTime:"Začetni čas",time:"Čas"};var rT={};rT={endTime:"Završno vreme",startTime:"Početno vreme",time:"Vreme"};var iT={};iT={endTime:"Sluttid",startTime:"Starttid",time:"Tid"};var aT={};aT={endTime:"Bitiş saati",startTime:"Başlangıç saati",time:"Saat"};var sT={};sT={endTime:"Час завершення",startTime:"Час початку",time:"Час"};var oT={};oT={endTime:"结束时间",startTime:"开始时间",time:"时间"};var lT={};lT={endTime:"結束時間",startTime:"開始時間",time:"時間"};var uT={};uT={"ar-AE":PP,"bg-BG":TP,"cs-CZ":RP,"da-DK":MP,"de-DE":FP,"el-GR":AP,"en-US":OP,"es-ES":BP,"et-EE":IP,"fi-FI":LP,"fr-FR":NP,"he-IL":jP,"hr-HR":zP,"hu-HU":VP,"it-IT":WP,"ja-JP":UP,"ko-KR":HP,"lt-LT":KP,"lv-LV":YP,"nb-NO":qP,"nl-NL":GP,"pl-PL":ZP,"pt-BR":XP,"pt-PT":QP,"ro-RO":JP,"ru-RU":eT,"sk-SK":tT,"sl-SI":nT,"sr-SP":rT,"sv-SE":iT,"tr-TR":aT,"uk-UA":sT,"zh-CN":oT,"zh-TW":lT};function Se(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var fe={};Se(fe,"focus-ring",()=>dy,e=>dy=e);Se(fe,"i18nFontFamily",()=>fy,e=>fy=e);Se(fe,"is-disabled",()=>hy,e=>hy=e);Se(fe,"is-focused",()=>py,e=>py=e);Se(fe,"is-hovered",()=>my,e=>my=e);Se(fe,"is-selected",()=>gy,e=>gy=e);Se(fe,"spectrum-Datepicker--datetimeRange",()=>vy,e=>vy=e);Se(fe,"spectrum-Datepicker--range",()=>by,e=>by=e);Se(fe,"spectrum-Datepicker--rangeDash",()=>yy,e=>yy=e);Se(fe,"spectrum-Datepicker-endField",()=>$y,e=>$y=e);Se(fe,"spectrum-Datepicker-focusRing",()=>xy,e=>xy=e);Se(fe,"spectrum-Datepicker-startField",()=>wy,e=>wy=e);Se(fe,"spectrum-FieldButton",()=>Dy,e=>Dy=e);Se(fe,"spectrum-FieldButton--invalid",()=>_y,e=>_y=e);Se(fe,"spectrum-FocusRing-ring",()=>Ld,e=>Ld=e);Se(fe,"spectrum-FocusRing",()=>Nd,e=>Nd=e);Se(fe,"spectrum-FocusRing--quiet",()=>jd,e=>jd=e);Se(fe,"spectrum-InputGroup",()=>Ey,e=>Ey=e);Se(fe,"spectrum-InputGroup--invalid",()=>Sy,e=>Sy=e);Se(fe,"spectrum-InputGroup--quiet",()=>Cy,e=>Cy=e);Se(fe,"spectrum-InputGroup-field",()=>ky,e=>ky=e);Se(fe,"spectrum-InputGroup-icon",()=>Py,e=>Py=e);Se(fe,"spectrum-InputGroup-input",()=>Ty,e=>Ty=e);Se(fe,"spectrum-InputGroup-input-circleLoader",()=>Ry,e=>Ry=e);Se(fe,"spectrum-InputGroup-input-validationIcon",()=>My,e=>My=e);Se(fe,"spectrum-InputGroup-popover--quiet",()=>Fy,e=>Fy=e);var dy,fy,hy,py,my,gy,vy,by,yy,$y,xy,wy,Dy,_y,Ld,Nd,jd,Ey,Sy,Cy,ky,Py,Ty,Ry,My,Fy;dy="ZTA2ya_focus-ring";fy="ZTA2ya_i18nFontFamily";hy="ZTA2ya_is-disabled";py="ZTA2ya_is-focused";my="ZTA2ya_is-hovered";gy="ZTA2ya_is-selected";vy="ZTA2ya_spectrum-Datepicker--datetimeRange";by="ZTA2ya_spectrum-Datepicker--range";yy="ZTA2ya_spectrum-Datepicker--rangeDash";$y="ZTA2ya_spectrum-Datepicker-endField";xy="ZTA2ya_spectrum-Datepicker-focusRing";wy="ZTA2ya_spectrum-Datepicker-startField";Dy="ZTA2ya_spectrum-FieldButton";_y="ZTA2ya_spectrum-FieldButton--invalid";Ld="ZTA2ya_spectrum-FocusRing-ring";Nd=`ZTA2ya_spectrum-FocusRing ${Ld}`;jd="ZTA2ya_spectrum-FocusRing--quiet";Ey=`ZTA2ya_spectrum-InputGroup ${Nd}`;Sy="ZTA2ya_spectrum-InputGroup--invalid";Cy=`ZTA2ya_spectrum-InputGroup--quiet ${jd}`;ky="ZTA2ya_spectrum-InputGroup-field";Py="ZTA2ya_spectrum-InputGroup-icon";Ty="ZTA2ya_spectrum-InputGroup-input";Ry="ZTA2ya_spectrum-InputGroup-input-circleLoader";My="ZTA2ya_spectrum-InputGroup-input-validationIcon";Fy="ZTA2ya_spectrum-InputGroup-popover--quiet";function MV(e){let t=xn({dateStyle:"short"}),n=O9();return y.useMemo(()=>e.description?e.description:e.showFormatHelpText?t.formatToParts(new Date).map(r=>r.type==="literal"?r.value:n.of(r.type)).join(" "):"",[e.description,e.showFormatHelpText,t,n])}function FV(e){let{scale:t}=ma(),[n,r]=y.useState(B5(t));return he(()=>{let i=()=>r(B5(t));return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[t]),Math.max(1,Math.min(n,e,3))}function B5(e){if(typeof window>"u")return 1;let t=e==="large"?336:280,n=e==="large"?30:24,r=e==="large"?32:48;return Math.floor((window.innerWidth-r*2)/(t+n))}function cT(e){let t=y.useRef();return y.useImperativeHandle(e,()=>({...Sf(t),focus(){Lf(t).focusFirst({tabbable:!0})}})),t}function I5(e){return e&&e.__esModule?e.default:e}function AV(e,t){e=jl(e),e=T$(e);let{autoFocus:n,isDisabled:r,isReadOnly:i,isRequired:a,isQuiet:s}=e,o=cT(t),{locale:l}=Qe(),u=Kj({...e,locale:l}),c=y.useRef(null),d=y.useRef(null),{labelProps:f,fieldProps:h,inputProps:p,descriptionProps:g,errorMessageProps:b,isInvalid:v,validationErrors:m,validationDetails:$}=Dj({...e,inputRef:d},u,c),w=u.validationState||(v?"invalid":null);return _.createElement(Wk,{...e,ref:o,elementType:"span",labelProps:f,descriptionProps:g,errorMessageProps:b,validationState:w,isInvalid:v,validationErrors:m,validationDetails:$,wrapperClassName:V(I5(ee),"react-spectrum-TimeField-fieldWrapper")},_.createElement(kP,{ref:c,fieldProps:h,isDisabled:r,isQuiet:s,autoFocus:n,validationState:w,className:V(I5(ee),"react-spectrum-TimeField")},u.segments.map((D,S)=>_.createElement(CP,{key:S,segment:D,state:u,isDisabled:r,isReadOnly:i,isRequired:a})),_.createElement("input",{...p,ref:d})))}const L5=_.forwardRef(AV);var dT={};Object.defineProperty(dT,"__esModule",{value:!0});var OV=dT.A4uCalendar=IV,Nt=BV(y);function BV(e){return e&&e.__esModule?e:{default:e}}function zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t!h.hasTime}),{labelProps:p,groupProps:g,buttonProps:b,dialogProps:v,startFieldProps:m,endFieldProps:$,descriptionProps:w,errorMessageProps:D,calendarProps:S,isInvalid:k,validationErrors:x,validationDetails:T}=Rj(e,h,f),{isOpen:P,setOpen:E}=h,{direction:F}=Qe(),R=cT(t),M=Sn(zt(uT),"@react-spectrum/datepicker"),{isFocused:z,isFocusVisible:O,focusProps:C}=fl({within:!0,isTextInput:!0,autoFocus:s}),{isFocused:A,focusProps:B}=fl({within:!1,isTextInput:!1,autoFocus:s}),N=V(zt(fe),"spectrum-InputGroup",{"spectrum-InputGroup--quiet":i,"spectrum-InputGroup--invalid":k&&!a,"is-disabled":a,"is-hovered":d,"is-focused":z,"focus-ring":O&&!A}),X=V(zt(fe),"spectrum-InputGroup-input",{"is-disabled":a,"is-invalid":k&&!a}),Q=MV(e);Q&&!e.description&&(w.id=null);let je=o,$e=je&&"hour"in je?je:null,lt=e.minValue&&"hour"in e.minValue?e.minValue:null,xe=e.maxValue&&"hour"in e.maxValue?e.maxValue:null,W=h.granularity==="hour"||h.granularity==="minute"||h.granularity==="second"?h.granularity:null,Ce=!!W,et=FV(l),yt=h.validationState||(k?"invalid":null);return _.createElement(Wk,{...e,ref:R,elementType:"span",description:Q,labelProps:p,descriptionProps:w,errorMessageProps:D,validationState:yt,isInvalid:k,validationErrors:x,validationDetails:T,wrapperClassName:V(zt(ee),"react-spectrum-Datepicker-fieldWrapper")},_.createElement("div",{...de(g,c,C),className:N,ref:f},_.createElement(kP,{isDisabled:a,isQuiet:i,validationState:yt,className:V(zt(fe),"spectrum-InputGroup-field"),inputClassName:X,disableFocusRing:!0},_.createElement(O5,{...m,"data-testid":"start-date",isQuiet:e.isQuiet,inputClassName:V(zt(ee),"react-spectrum-Datepicker-startField")}),_.createElement(jV,null),_.createElement(O5,{...$,"data-testid":"end-date",isQuiet:e.isQuiet,inputClassName:V(zt(fe),"spectrum-Datepicker-endField",V(zt(ee),"react-spectrum-Datepicker-endField"))})),_.createElement(SV,{type:"popover",mobileType:"tray",placement:F==="rtl"?"bottom right":"bottom left",targetRef:f,hideArrow:!0,isOpen:P,onOpenChange:E,shouldFlip:e.shouldFlip},_.createElement(cz,{...de(b,B),UNSAFE_className:V(zt(fe),"spectrum-FieldButton"),isQuiet:i,validationState:yt},_.createElement(LV,null)),_.createElement(DV,{UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-dialog"),...v},_.createElement(EV,null,_.createElement("div",{className:V(zt(ee),"react-spectrum-Datepicker-dialogContent")},_.createElement(xV,{...S,visibleMonths:et,pageBehavior:u,UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-calendar",{"is-invalid":yt==="invalid"})}),Ce&&_.createElement(fC,{gap:"size-100",marginTop:"size-100",UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-timeFields")},_.createElement(L5,{label:M.format("startTime"),value:((n=h.timeRange)===null||n===void 0?void 0:n.start)||null,onChange:ut=>h.setTime("start",ut),placeholderValue:$e,granularity:W,minValue:lt,maxValue:xe,hourCycle:e.hourCycle,hideTimeZone:e.hideTimeZone,flex:!0}),_.createElement(L5,{label:M.format("endTime"),value:((r=h.timeRange)===null||r===void 0?void 0:r.end)||null,onChange:ut=>h.setTime("end",ut),placeholderValue:$e,granularity:W,minValue:lt,maxValue:xe,hourCycle:e.hourCycle,hideTimeZone:e.hideTimeZone,flex:!0}))))))))}function jV(){return _.createElement("div",{"aria-hidden":"true","data-testid":"date-range-dash",className:V(zt(ee),"react-spectrum-Datepicker-rangeDash")})}const zV=_.forwardRef(NV);function VV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var fT={};VV(fT,"spectrum--darkest",()=>Ay,e=>Ay=e);var Ay;Ay="gP7gvq_spectrum--darkest";function va(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var vi={};va(vi,"spectrum",()=>Oy,e=>Oy=e);va(vi,"spectrum--dark",()=>By,e=>By=e);va(vi,"spectrum--darkest",()=>Iy,e=>Iy=e);va(vi,"spectrum--large",()=>Ly,e=>Ly=e);va(vi,"spectrum--light",()=>Ny,e=>Ny=e);va(vi,"spectrum--lightest",()=>jy,e=>jy=e);va(vi,"spectrum--medium",()=>zy,e=>zy=e);var Oy,By,Iy,Ly,Ny,jy,zy;Oy="zA6MfG_spectrum";By="zA6MfG_spectrum--dark";Iy="zA6MfG_spectrum--darkest";Ly="zA6MfG_spectrum--large";Ny="zA6MfG_spectrum--light";jy="zA6MfG_spectrum--lightest";zy="zA6MfG_spectrum--medium";function WV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var hT={};WV(hT,"spectrum--large",()=>Vy,e=>Vy=e);var Vy;Vy="HAZavG_spectrum--large";function UV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var pT={};UV(pT,"spectrum--light",()=>Wy,e=>Wy=e);var Wy;Wy="PFjRbG_spectrum--light";function HV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var mT={};HV(mT,"spectrum--medium",()=>Uy,e=>Uy=e);var Uy;Uy="xSyFOq_spectrum--medium";function Xs(e){return e&&e.__esModule?e.default:e}let KV={global:Xs(vi),light:Xs(pT),dark:Xs(fT),medium:Xs(mT),large:Xs(hT)};function Ca(e){let t="flex items-center w-full p-3 leading-tight transition-all rounded-lg outline-none text-start hover:bg-blue-500";return e.name===e.currentPage&&(t+=" border-2 border-black"),I.jsxs("div",{role:"button",className:t,children:[I.jsx("div",{className:"grid mr-4 place-items-center",children:I.jsx("i",{className:e.icon})}),I.jsx("a",{href:e.href,children:e.name})]})}function gT(e){return I.jsxs("div",{className:"relative flex h-full w-full max-w-[20rem] flex-col rounded-xl bg-white bg-clip-border text-gray-700 shadow-xl shadow-blue-gray-900/5",children:[I.jsx("div",{className:"p-4 mb-2",children:I.jsx("h5",{className:"block font-sans text-xl antialiased font-semibold leading-snug tracking-normal text-blue-gray-900",children:I.jsx("a",{href:"/",children:"fs-tracer"})})}),I.jsxs("nav",{className:"flex min-w-[240px] flex-col gap-1 font-sans text-base font-normal text-blue-gray-700",children:[I.jsx(Ca,{name:"Home",icon:"fa-solid fa-house",href:"/",currentPage:e.currentPage}),I.jsx(Ca,{name:"Recent files",icon:"fa-solid fa-folder",href:"/recent",currentPage:e.currentPage}),I.jsx(Ca,{name:"Search",icon:"fa-solid fa-magnifying-glass",href:"/search",currentPage:e.currentPage}),I.jsx(Ca,{name:"Monitoring",icon:"fa-solid fa-chart-column",href:"/monitoring",currentPage:e.currentPage}),I.jsx(Ca,{name:"Setup",icon:"fa-solid fa-gear",href:"/setup",currentPage:e.currentPage}),I.jsx(Ca,{name:"Logout",icon:"fa-solid fa-right-from-bracket",href:"/logout",currentPage:e.currentPage})]})]})}/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function zl(e){return e+.5|0}const Kr=(e,t,n)=>Math.max(Math.min(e,n),t);function go(e){return Kr(zl(e*2.55),0,255)}function ii(e){return Kr(zl(e*255),0,255)}function ur(e){return Kr(zl(e/2.55)/100,0,1)}function N5(e){return Kr(zl(e*100),0,100)}const hn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Hy=[..."0123456789ABCDEF"],YV=e=>Hy[e&15],qV=e=>Hy[(e&240)>>4]+Hy[e&15],Cu=e=>(e&240)>>4===(e&15),GV=e=>Cu(e.r)&&Cu(e.g)&&Cu(e.b)&&Cu(e.a);function ZV(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&hn[e[1]]*17,g:255&hn[e[2]]*17,b:255&hn[e[3]]*17,a:t===5?hn[e[4]]*17:255}:(t===7||t===9)&&(n={r:hn[e[1]]<<4|hn[e[2]],g:hn[e[3]]<<4|hn[e[4]],b:hn[e[5]]<<4|hn[e[6]],a:t===9?hn[e[7]]<<4|hn[e[8]]:255})),n}const XV=(e,t)=>e<255?t(e):"";function QV(e){var t=GV(e)?YV:qV;return e?"#"+t(e.r)+t(e.g)+t(e.b)+XV(e.a,t):void 0}const JV=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function vT(e,t,n){const r=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function eW(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function tW(e,t,n){const r=vT(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function nW(e,t,n,r,i){return e===i?(t-n)/r+(t.5?c/(2-a-s):c/(a+s),l=nW(n,r,i,c,a),l=l*60+.5),[l|0,u||0,o]}function M$(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ii)}function F$(e,t,n){return M$(vT,e,t,n)}function rW(e,t,n){return M$(tW,e,t,n)}function iW(e,t,n){return M$(eW,e,t,n)}function bT(e){return(e%360+360)%360}function aW(e){const t=JV.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?go(+t[5]):ii(+t[5]));const i=bT(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=rW(i,a,s):t[1]==="hsv"?r=iW(i,a,s):r=F$(i,a,s),{r:r[0],g:r[1],b:r[2],a:n}}function sW(e,t){var n=R$(e);n[0]=bT(n[0]+t),n=F$(n),e.r=n[0],e.g=n[1],e.b=n[2]}function oW(e){if(!e)return;const t=R$(e),n=t[0],r=N5(t[1]),i=N5(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${ur(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const j5={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},z5={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function lW(){const e={},t=Object.keys(z5),n=Object.keys(j5);let r,i,a,s,o;for(r=0;r>16&255,a>>8&255,a&255]}return e}let ku;function uW(e){ku||(ku=lW(),ku.transparent=[0,0,0,0]);const t=ku[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const cW=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function dW(e){const t=cW.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?go(s):Kr(s*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?go(r):Kr(r,0,255)),i=255&(t[4]?go(i):Kr(i,0,255)),a=255&(t[6]?go(a):Kr(a,0,255)),{r,g:i,b:a,a:n}}}function fW(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ur(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const cp=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ka=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function hW(e,t,n){const r=ka(ur(e.r)),i=ka(ur(e.g)),a=ka(ur(e.b));return{r:ii(cp(r+n*(ka(ur(t.r))-r))),g:ii(cp(i+n*(ka(ur(t.g))-i))),b:ii(cp(a+n*(ka(ur(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Pu(e,t,n){if(e){let r=R$(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=F$(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function yT(e,t){return e&&Object.assign(t||{},e)}function V5(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ii(e[3]))):(t=yT(e,{r:0,g:0,b:0,a:1}),t.a=ii(t.a)),t}function pW(e){return e.charAt(0)==="r"?dW(e):aW(e)}class gl{constructor(t){if(t instanceof gl)return t;const n=typeof t;let r;n==="object"?r=V5(t):n==="string"&&(r=ZV(t)||uW(t)||pW(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=yT(this._rgb);return t&&(t.a=ur(t.a)),t}set rgb(t){this._rgb=V5(t)}rgbString(){return this._valid?fW(this._rgb):void 0}hexString(){return this._valid?QV(this._rgb):void 0}hslString(){return this._valid?oW(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,l=r.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-u,r.r=255&u*r.r+a*i.r+.5,r.g=255&u*r.g+a*i.g+.5,r.b=255&u*r.b+a*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=hW(this._rgb,t._rgb,n)),this}clone(){return new gl(this.rgb)}alpha(t){return this._rgb.a=ii(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=zl(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Pu(this._rgb,2,t),this}darken(t){return Pu(this._rgb,2,-t),this}saturate(t){return Pu(this._rgb,1,t),this}desaturate(t){return Pu(this._rgb,1,-t),this}rotate(t){return sW(this._rgb,t),this}}/*! + * Chart.js v4.4.3 + * https://www.chartjs.org + * (c) 2024 Chart.js Contributors + * Released under the MIT License + */function ir(){}const mW=(()=>{let e=0;return()=>e++})();function ce(e){return e===null||typeof e>"u"}function Be(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ae(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ve(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function en(e,t){return Ve(e)?e:t}function J(e,t){return typeof e>"u"?t:e}const gW=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,$T=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function De(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function me(e,t,n,r){let i,a,s;if(Be(e))for(a=e.length,i=0;ie,x:e=>e.x,y:e=>e.y};function yW(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function $W(e){const t=yW(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ci(e,t){return(W5[t]||(W5[t]=$W(t)))(e)}function A$(e){return e.charAt(0).toUpperCase()+e.slice(1)}const bl=e=>typeof e<"u",di=e=>typeof e=="function",U5=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function xW(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Me=Math.PI,Te=2*Me,wW=Te+Me,Ud=Number.POSITIVE_INFINITY,DW=Me/180,qe=Me/2,Di=Me/4,H5=Me*2/3,Yr=Math.log10,Zn=Math.sign;function Io(e,t,n){return Math.abs(e-t)i-a).pop(),t}function ws(e){return!isNaN(parseFloat(e))&&isFinite(e)}function EW(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function wT(e,t,n){let r,i,a;for(r=0,i=e.length;rl&&u=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function B$(e,t,n){n=n||(s=>e[s]1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}const gr=(e,t,n,r)=>B$(e,n,r?i=>{const a=e[i][t];return ae[i][t]B$(e,n,r=>e[r][t]>=n);function PW(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+A$(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=i.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function q5(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(_T.forEach(a=>{delete e[a]}),delete e._chartjs)}function ET(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ST=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function CT(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,ST.call(window,()=>{r=!1,e.apply(t,n)}))}}function RW(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const I$=e=>e==="start"?"left":e==="end"?"right":"center",Dt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,MW=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function kT(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:s,_parsed:o}=e,l=s.axis,{min:u,max:c,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=dt(Math.min(gr(o,l,u).lo,n?r:gr(t,l,s.getPixelForValue(u)).lo),0,r-1)),f?a=dt(Math.max(gr(o,s.axis,c,!0).hi+1,n?0:gr(t,l,s.getPixelForValue(c),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function PT(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const Tu=e=>e===0||e===1,G5=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Te/n)),Z5=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Te/n)+1,Lo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*qe)+1,easeOutSine:e=>Math.sin(e*qe),easeInOutSine:e=>-.5*(Math.cos(Me*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Tu(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Tu(e)?e:G5(e,.075,.3),easeOutElastic:e=>Tu(e)?e:Z5(e,.075,.3),easeInOutElastic(e){return Tu(e)?e:e<.5?.5*G5(e*2,.1125,.45):.5+.5*Z5(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Lo.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Lo.easeInBounce(e*2)*.5:Lo.easeOutBounce(e*2-1)*.5+.5};function L$(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function X5(e){return L$(e)?e:new gl(e)}function dp(e){return L$(e)?e:new gl(e).saturate(.5).darken(.1).hexString()}const FW=["x","y","borderWidth","radius","tension"],AW=["color","borderColor","backgroundColor"];function OW(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:AW},numbers:{type:"number",properties:FW}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function BW(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Q5=new Map;function IW(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Q5.get(n);return r||(r=new Intl.NumberFormat(e,t),Q5.set(n,r)),r}function Vl(e,t,n){return IW(t,n).format(e)}const TT={values(e){return Be(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),a=LW(e,n)}const s=Yr(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),Vl(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Yr(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?TT.numeric.call(this,e,t,n):""}};function LW(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Vf={formatters:TT};function NW(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const sa=Object.create(null),Yy=Object.create(null);function No(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>dp(i.backgroundColor),this.hoverBorderColor=(r,i)=>dp(i.borderColor),this.hoverColor=(r,i)=>dp(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return fp(this,t,n)}get(t){return No(this,t)}describe(t,n){return fp(Yy,t,n)}override(t,n){return fp(sa,t,n)}route(t,n,r,i){const a=No(this,t),s=No(this,r),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],u=s[i];return ae(l)?Object.assign({},u,l):J(l,u)},set(l){this[o]=l}}})}apply(t){t.forEach(n=>n(this))}}var We=new jW({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[OW,BW,NW]);function zW(e){return!e||ce(e.size)||ce(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Hd(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function VW(e,t,n,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const o=n.length;let l,u,c,d,f;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function vr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&a.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,HW(e,a),l=0;l+e||0;function N$(e,t){const n={},r=ae(t),i=r?Object.keys(t):t,a=ae(e)?r?s=>J(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=XW(a(s));return n}function MT(e){return N$(e,{top:"y",right:"x",bottom:"y",left:"x"})}function qi(e){return N$(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Pt(e){const t=MT(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function it(e,t){e=e||{},t=t||We.font;let n=J(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=J(e.style,t.style);r&&!(""+r).match(GW)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:J(e.family,t.family),lineHeight:ZW(J(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:J(e.weight,t.weight),string:""};return i.string=zW(i),i}function vo(e,t,n,r){let i,a,s;for(i=0,a=e.length;in&&o===0?0:o+l;return{min:s(r,-Math.abs(a)),max:s(i,a)}}function bi(e,t){return Object.assign(Object.create(e),t)}function j$(e,t=[""],n,r,i=()=>e[0]){const a=n||e;typeof r>"u"&&(r=BT("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:o=>j$([o,...e],t,a,r)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete e[0][l],!0},get(o,l){return AT(o,l,()=>sU(l,t,e,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,l){return t6(o).includes(l)},ownKeys(o){return t6(o)},set(o,l,u){const c=o._storage||(o._storage=i());return o[l]=c[l]=u,delete o._keys,!0}})}function Ds(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:FT(e,r),setContext:a=>Ds(e,a,n,r),override:a=>Ds(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return AT(a,s,()=>eU(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function FT(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:di(n)?n:()=>n,isIndexable:di(r)?r:()=>r}}const JW=(e,t)=>e?e+A$(t):t,z$=(e,t)=>ae(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function AT(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function eU(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=e;let o=r[t];return di(o)&&s.isScriptable(t)&&(o=tU(t,o,e,n)),Be(o)&&o.length&&(o=nU(t,o,e,s.isIndexable)),z$(t,o)&&(o=Ds(o,i,a&&a[t],s)),o}function tU(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||r);return o.delete(e),z$(e,l)&&(l=V$(i._scopes,i,e,l)),l}function nU(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&r(e))return t[a.index%t.length];if(ae(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=V$(u,i,e,c);t.push(Ds(d,a,s&&s[e],o))}}return t}function OT(e,t,n){return di(e)?e(t,n):e}const rU=(e,t)=>e===!0?t:typeof e=="string"?ci(t,e):void 0;function iU(e,t,n,r,i){for(const a of t){const s=rU(n,a);if(s){e.add(s);const o=OT(s._fallback,n,i);if(typeof o<"u"&&o!==n&&o!==r)return o}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function V$(e,t,n,r){const i=t._rootScopes,a=OT(t._fallback,n,r),s=[...e,...i],o=new Set;o.add(r);let l=e6(o,s,n,a||n,r);return l===null||typeof a<"u"&&a!==n&&(l=e6(o,s,a,l,r),l===null)?!1:j$(Array.from(o),[""],i,a,()=>aU(t,n,r))}function e6(e,t,n,r,i){for(;n;)n=iU(e,t,n,r,i);return n}function aU(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Be(i)&&ae(n)?n:i||{}}function sU(e,t,n,r){let i;for(const a of t)if(i=BT(JW(a,e),n),typeof i<"u")return z$(e,i)?V$(n,r,e,i):i}function BT(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function t6(e){let t=e._keys;return t||(t=e._keys=oU(e._scopes)),t}function oU(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function IT(e,t,n,r){const{iScale:i}=e,{key:a="r"}=this._parsing,s=new Array(r);let o,l,u,c;for(o=0,l=r;ote==="x"?"y":"x";function uU(e,t,n,r){const i=e.skip?t:e,a=t,s=n.skip?t:n,o=Ky(a,i),l=Ky(s,a);let u=o/(o+l),c=l/(o+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;return{previous:{x:a.x-d*(s.x-i.x),y:a.y-d*(s.y-i.y)},next:{x:a.x+f*(s.x-i.x),y:a.y+f*(s.y-i.y)}}}function cU(e,t,n){const r=e.length;let i,a,s,o,l,u=_s(e,0);for(let c=0;c!u.skip)),t.cubicInterpolationMode==="monotone")fU(e,i);else{let u=r?e[e.length-1]:e[0];for(a=0,s=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);function mU(e,t){return Hf(e).getPropertyValue(t)}const gU=["top","right","bottom","left"];function Gi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=gU[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const vU=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function bU(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let s=!1,o,l;if(vU(i,a,e.target))o=i,l=a;else{const u=t.getBoundingClientRect();o=r.clientX-u.left,l=r.clientY-u.top,s=!0}return{x:o,y:l,box:s}}function Mi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Hf(n),a=i.boxSizing==="border-box",s=Gi(i,"padding"),o=Gi(i,"border","width"),{x:l,y:u,box:c}=bU(e,n),d=s.left+(c&&o.left),f=s.top+(c&&o.top);let{width:h,height:p}=t;return a&&(h-=s.width+o.width,p-=s.height+o.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/p*n.height/r)}}function yU(e,t,n){let r,i;if(t===void 0||n===void 0){const a=e&&U$(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=Hf(a),l=Gi(o,"border","width"),u=Gi(o,"padding");t=s.width-u.width-l.width,n=s.height-u.height-l.height,r=Kd(o.maxWidth,a,"clientWidth"),i=Kd(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||Ud,maxHeight:i||Ud}}const Mu=e=>Math.round(e*10)/10;function $U(e,t,n,r){const i=Hf(e),a=Gi(i,"margin"),s=Kd(i.maxWidth,e,"clientWidth")||Ud,o=Kd(i.maxHeight,e,"clientHeight")||Ud,l=yU(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=Gi(i,"border","width"),h=Gi(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-a.width),c=Math.max(0,r?u/r:c-a.height),u=Mu(Math.min(u,s,l.maxWidth)),c=Mu(Math.min(c,o,l.maxHeight)),u&&!c&&(c=Mu(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Mu(Math.floor(c*r))),{width:u,height:c}}function n6(e,t,n){const r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==a?(e.currentDevicePixelRatio=r,s.height=i,s.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const xU=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};W$()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function r6(e,t){const n=mU(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Fi(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function wU(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function DU(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=Fi(e,i,n),o=Fi(i,a,n),l=Fi(a,t,n),u=Fi(s,o,n),c=Fi(o,l,n);return Fi(u,c,n)}const _U=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},EU=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ls(e,t,n){return e?_U(t,n):EU()}function NT(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function jT(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function zT(e){return e==="angle"?{between:yl,compare:SW,normalize:nn}:{between:mr,compare:(t,n)=>t-n,normalize:t=>t}}function i6({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function SU(e,t,n){const{property:r,start:i,end:a}=n,{between:s,normalize:o}=zT(r),l=t.length;let{start:u,end:c,loop:d}=e,f,h;if(d){for(u+=l,c+=l,f=0,h=l;fl(i,$,v)&&o(i,$)!==0,D=()=>o(a,v)===0||l(a,$,v),S=()=>g||w(),k=()=>!g||D();for(let x=c,T=c;x<=d;++x)m=t[x%s],!m.skip&&(v=u(m[r]),v!==$&&(g=l(v,i,a),b===null&&S()&&(b=o(v,i)===0?x:T),b!==null&&k()&&(p.push(i6({start:b,end:x,loop:f,count:s,style:h})),b=null),T=x,$=v));return b!==null&&p.push(i6({start:b,end:d,loop:f,count:s,style:h})),p}function WT(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function kU(e,t,n,r){const i=e.length,a=[];let s=t,o=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?o.skip||(r=!1,a.push({start:t%i,end:(l-1)%i,loop:r}),t=s=u.stop?l:null):(s=l,o.skip&&(t=l)),o=u}return s!==null&&a.push({start:t%i,end:s%i,loop:r}),a}function PU(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:s,end:o}=CU(n,i,a,r);if(r===!0)return a6(e,[{start:s,end:o,loop:a}],n,t);const l=oo({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ST.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ar=new MU;const o6="transparent",FU={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=X5(e||o6),i=r.valid&&X5(t||o6);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class AU{constructor(t,n,r,i){const a=n[r];i=vo([t.to,i,a,t.from]);const s=vo([t.from,a,i]);this._active=!0,this._fn=t.fn||FU[t.type||typeof s],this._easing=Lo[t.easing]||Lo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=vo([t.to,n,i,t.from]),this._from=vo([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const a=t[i];if(!ae(a))return;const s={};for(const o of n)s[o]=a[o];(Be(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,n){const r=n.options,i=BU(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&OU(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const u=s[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let d=a[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,o);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}a[u]=d=new AU(f,t,u,c),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return ar.add(this._chart,r),!0}}function OU(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&a<0)return i.index}return null}function f6(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,u=s.axis,c=jU(a,s,r),d=t.length;let f;for(let h=0;hn[r].axis===t).shift()}function WU(e,t){return bi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function UU(e,t,n){return bi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Qs(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const pp=e=>e==="reset"||e==="none",h6=(e,t)=>t?e:Object.assign({},e),HU=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:HT(n,!0),values:null};class In{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=c6(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Qs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,p)=>d==="x"?f:d==="r"?p:h,a=n.xAxisID=J(r.xAxisID,hp(t,"x")),s=n.yAxisID=J(r.yAxisID,hp(t,"y")),o=n.rAxisID=J(r.rAxisID,hp(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,a,s,o),c=n.vAxisID=i(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&q5(this._data,this),t._stacked&&Qs(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ae(n)){const i=this._cachedMeta;this._data=NU(n,i)}else if(r!==n){if(r){q5(r,this);const i=this._cachedMeta;Qs(i),i._parsed=[]}n&&Object.isExtensible(n)&&TW(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=c6(n.vScale,n),n.stack!==r.stack&&(i=!0,Qs(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&f6(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let l=t===0&&n===i.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{Be(i[t])?f=this.parseArrayData(r,i,t,n):ae(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[o]===null||u&&d[o]g||d=0;--f)if(!p()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=n.length;i=0&&tthis.getContext(r,i,n),g=u.resolveNamedOptions(f,h,p,d);return g.$shared&&(g.$shared=l,a[s]=Object.freeze(h6(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new UT(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||pp(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:s}}updateElement(t,n,r,i){pp(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!pp(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];const i=r.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a{for(u.length+=n,o=u.length-1;o>=s;o--)u[o]=u[o-n]};for(l(a),o=t;oi-a))}return e._cache.$bar}function YU(e){const t=e.iScale,n=KU(t,e.type);let r=t._length,i,a,s,o;const l=()=>{s===32767||s===-32768||(bl(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=n.length;i0?i[e-1]:null,o=eMath.abs(o)&&(l=o,u=s),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:s,max:o}}function KT(e,t,n,r){return Be(e)?ZU(e,t,n,r):t[n.axis]=n.parse(e,r),t}function p6(e,t,n,r){const i=e.iScale,a=e.vScale,s=i.getLabels(),o=i===a,l=[];let u,c,d,f;for(u=n,c=n+r;u=n?1:-1)}function QU(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),a=r.options.stacked,s=[],o=l=>{const u=l.controller.getParsed(n),c=u&&u[l.vScale.axis];if(ce(c)||isNaN(c))return!0};for(const l of i)if(!(n!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),u=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(u?", "+u:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(n,i),c=s.axis,d=o.axis;for(let f=n;fyl($,o,l,!0)?1:Math.max(w,w*n,D,D*n),p=($,w,D)=>yl($,o,l,!0)?-1:Math.min(w,w*n,D,D*n),g=h(0,u,d),b=h(qe,c,f),v=p(Me,u,d),m=p(Me+qe,c,f);r=(g-v)/2,i=(b-m)/2,a=-(g+v)/2,s=-(b+m)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}class Ui extends In{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(ae(r[t])){const{key:l="value"}=this._parsing;a=u=>+ci(r[u],l)}let s,o;for(s=t,o=t+n;s0&&!isNaN(t)?Te*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Vl(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,s,o,l;if(!t){for(i=0,a=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),j(Ui,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class jo extends In{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=kT(n,i,s);this._drawStart=o,this._drawCount=l,PT(n)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:u},t),this.updateElements(i,o,l,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=s.axis,h=o.axis,{spanGaps:p,segment:g}=this.options,b=ws(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",m=n+r,$=t.length;let w=n>0&&this.getParsed(n-1);for(let D=0;D<$;++D){const S=t[D],k=v?S:{};if(D=m){k.skip=!0;continue}const x=this.getParsed(D),T=ce(x[h]),P=k[f]=s.getPixelForValue(x[f],D),E=k[h]=a||T?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,x,l):x[h],D);k.skip=isNaN(P)||isNaN(E)||T,k.stop=D>0&&Math.abs(x[f]-w[f])>b,g&&(k.parsed=x,k.raw=u.data[D]),d&&(k.options=c||this.resolveDataElementOptions(D,S.active?"active":i)),v||this.updateElement(S,D,k,i),w=x}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}j(jo,"id","line"),j(jo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),j(jo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class us extends In{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Vl(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,n,r,i){return IT.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(an.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,r,i){const a=i==="reset",s=this.chart,l=s.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,d=u.yCenter,f=u.getIndexAngle(0)-.5*Me;let h=f,p;const g=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?An(this.resolveDataElementOptions(t,n).angle||r):0}}j(us,"id","polarArea"),j(us,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),j(us,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Gy extends Ui{}j(Gy,"id","pie"),j(Gy,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class uc extends In{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return IT.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let o=n;o0&&this.getParsed(n-1);for(let w=n;w0&&Math.abs(S[h]-$[h])>v,b&&(k.parsed=S,k.raw=u.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,D.active?"active":i)),m||this.updateElement(D,w,k,i),$=S}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}j(cc,"id","scatter"),j(cc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),j(cc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var rH=Object.freeze({__proto__:null,BarController:oc,BubbleController:lc,DoughnutController:Ui,LineController:jo,PieController:Gy,PolarAreaController:us,RadarController:uc,ScatterController:cc});function Ei(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class H${constructor(t){j(this,"options");this.options=t||{}}static override(t){Object.assign(H$.prototype,t)}init(){}formats(){return Ei()}parse(){return Ei()}format(){return Ei()}add(){return Ei()}diff(){return Ei()}startOf(){return Ei()}endOf(){return Ei()}}var iH={_date:H$};function aH(e,t,n,r){const{controller:i,data:a,_sorted:s}=e,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?kW:gr;if(r){if(i._sharedOptions){const u=a[0],c=typeof u.getRange=="function"&&u.getRange(t);if(c){const d=l(a,t,n-c),f=l(a,t,n+c);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function Wl(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o{l[s](t[n],i)&&(a.push({element:l,datasetIndex:u,index:c}),o=o||l.inRange(t.x,t.y,i))}),r&&!o?[]:a}var uH={evaluateInteractionItems:Wl,modes:{index(e,t,n,r){const i=Mi(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?gp(e,i,a,r,s):vp(e,i,a,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=o[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=Mi(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?gp(e,i,a,r,s):vp(e,i,a,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,u=e.getDatasetMeta(l).data;o=[];for(let c=0;cn.pos===t)}function b6(e,t){return e.filter(n=>YT.indexOf(n.pos)===-1&&n.box.axis===t)}function eo(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function cH(e){const t=[];let n,r,i,a,s,o;for(n=0,r=(e||[]).length;nu.box.fullSize),!0),r=eo(Js(t,"left"),!0),i=eo(Js(t,"right")),a=eo(Js(t,"top"),!0),s=eo(Js(t,"bottom")),o=b6(t,"x"),l=b6(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:Js(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function y6(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function qT(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function pH(e,t,n,r){const{pos:i,box:a}=n,s=e.maxPadding;if(!ae(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[i]+=n.size}a.getPadding&&qT(s,a.getPadding());const o=Math.max(0,t.outerWidth-y6(s,e,"left","right")),l=Math.max(0,t.outerHeight-y6(s,e,"top","bottom")),u=o!==e.w,c=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function mH(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function gH(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],n[s])}),a}return r(e?["left","right"]:["top","bottom"])}function bo(e,t,n,r){const i=[];let a,s,o,l,u,c;for(a=0,s=e.length,u=0;a{typeof g.beforeLayout=="function"&&g.beforeLayout()});const c=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/c,hBoxMaxHeight:s/2}),f=Object.assign({},i);qT(f,Pt(r));const h=Object.assign({maxPadding:f,w:a,h:s,x:i.left,y:i.top},i),p=fH(l.concat(u),d);bo(o.fullSize,h,d,p),bo(l,h,d,p),bo(u,h,d,p)&&bo(l,h,d,p),mH(h),$6(o.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,$6(o.rightAndBottom,h,d,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},me(o.chartArea,g=>{const b=g.box;Object.assign(b,e.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class GT{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class vH extends GT{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const dc="$chartjs",bH={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},x6=e=>e===null||e==="";function yH(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[dc]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",x6(i)){const a=r6(e,"width");a!==void 0&&(e.width=a)}if(x6(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=r6(e,"height");a!==void 0&&(e.height=a)}return e}const ZT=xU?{passive:!0}:!1;function $H(e,t,n){e&&e.addEventListener(t,n,ZT)}function xH(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ZT)}function wH(e,t){const n=bH[e.type]||e.type,{x:r,y:i}=Mi(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Yd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function DH(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Yd(o.addedNodes,r),s=s&&!Yd(o.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function _H(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||Yd(o.removedNodes,r),s=s&&!Yd(o.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xl=new Map;let w6=0;function XT(){const e=window.devicePixelRatio;e!==w6&&(w6=e,xl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function EH(e,t){xl.size||window.addEventListener("resize",XT),xl.set(e,t)}function SH(e){xl.delete(e),xl.size||window.removeEventListener("resize",XT)}function CH(e,t,n){const r=e.canvas,i=r&&U$(r);if(!i)return;const a=CT((o,l)=>{const u=i.clientWidth;n(o,l),u{const l=o[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||a(u,c)});return s.observe(i),EH(e,a),s}function bp(e,t,n){n&&n.disconnect(),t==="resize"&&SH(e)}function kH(e,t,n){const r=e.canvas,i=CT(a=>{e.ctx!==null&&n(wH(a,e))},e);return $H(r,t,i),i}class PH extends GT{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(yH(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[dc])return!1;const r=n[dc].initial;["height","width"].forEach(a=>{const s=r[a];ce(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[dc],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:DH,detach:_H,resize:CH}[n]||kH;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:bp,detach:bp,resize:bp}[n]||xH)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return $U(t,n,r,i)}isAttached(t){const n=t&&U$(t);return!!(n&&n.isConnected)}}function TH(e){return!W$()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?vH:PH}var Wu;let Cr=(Wu=class{constructor(){j(this,"x");j(this,"y");j(this,"active",!1);j(this,"options");j(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ws(this.x)&&ws(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}},j(Wu,"defaults",{}),j(Wu,"defaultRoutes"),Wu);function RH(e,t){const n=e.options.ticks,r=MH(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?AH(t):[],s=a.length,o=a[0],l=a[s-1],u=[];if(s>i)return OH(t,u,a,s/i),u;const c=FH(a,t,i);if(s>0){let d,f;const h=s>1?Math.round((l-o)/(s-1)):null;for(Au(t,u,c,ce(h)?0:o-h,o),d=0,f=s-1;di)return l}return Math.max(i,1)}function AH(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,D6=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,_6=(e,t)=>Math.min(t||e,e);function E6(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;as+o)))return l}function NH(e,t){me(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;ar?r:n,r=i&&n>r?n:r,{min:en(n,en(r,n)),max:en(r,en(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){De(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=QW(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=dt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:h/(r-1),d+6>o&&(o=h/(r-(t.offset?.5:1)),l=this.maxHeight-to(t.grid)-n.padding-S6(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),s=O$(Math.min(Math.asin(dt((c.highest.height+6)/o,-1,1)),Math.asin(dt(l/u,-1,1))-Math.asin(dt(f/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){De(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){De(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=S6(i,n.options.font);if(o?(t.width=this.maxWidth,t.height=to(a)+l):(t.height=this.maxHeight,t.width=to(a)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,p=An(this.labelRotation),g=Math.cos(p),b=Math.sin(p);if(o){const v=r.mirror?0:b*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:g*d.width+b*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(u,c,b,g)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):a==="start"?h=n.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;a==="start"?(c=0,d=t.height):a==="end"&&(c=n.height,d=0),this.paddingTop=c+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){De(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:s[T]||0,height:o[T]||0});return{first:x(0),last:x(n-1),widest:x(S),highest:x(k),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return CW(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&to*i?o/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=to(a),h=[],p=o.setContext(this.getContext()),g=p.display?p.width:0,b=g/2,v=function(O){return _i(r,O,g)};let m,$,w,D,S,k,x,T,P,E,F,R;if(s==="top")m=v(this.bottom),k=this.bottom-f,T=m-b,E=v(t.top)+b,R=t.bottom;else if(s==="bottom")m=v(this.top),E=t.top,R=v(t.bottom)-b,k=m+b,T=this.top+f;else if(s==="left")m=v(this.right),S=this.right-f,x=m-b,P=v(t.left)+b,F=t.right;else if(s==="right")m=v(this.left),P=t.left,F=v(t.right)-b,S=m+b,x=this.left+f;else if(n==="x"){if(s==="center")m=v((t.top+t.bottom)/2+.5);else if(ae(s)){const O=Object.keys(s)[0],C=s[O];m=v(this.chart.scales[O].getPixelForValue(C))}E=t.top,R=t.bottom,k=m+b,T=k+f}else if(n==="y"){if(s==="center")m=v((t.left+t.right)/2);else if(ae(s)){const O=Object.keys(s)[0],C=s[O];m=v(this.chart.scales[O].getPixelForValue(C))}S=m-b,x=S-f,P=t.left,F=t.right}const M=J(i.ticks.maxTicksLimit,d),z=Math.max(1,Math.ceil(d/M));for($=0;$0&&(xe-=$e/2);break}X={left:xe,top:lt,width:$e+Q.width,height:je+Q.height,color:z.backdropColor}}b.push({label:w,font:T,textOffset:F,options:{rotation:g,color:C,strokeColor:A,strokeWidth:B,textAlign:N,textBaseline:R,translation:[D,S],backdrop:X}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-An(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let u,c;return n==="left"?i?(c=this.right+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-o,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+o,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(a=0,s=i.length;a{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");We.route(a,i,l,o)})}function KH(e){return"id"in e&&"defaults"in e}class YH{constructor(){this.controllers=new Ou(In,"datasets",!0),this.elements=new Ou(Cr,"elements"),this.plugins=new Ou(Object,"plugins"),this.scales=new Ou(ba,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):me(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,r){const i=A$(t);De(r["before"+i],[],r),n[t](r),De(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;na.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function GH(e){const t={},n=[],r=Object.keys(Hn.plugins.items);for(let a=0;a1&&C6(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function k6(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function nK(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return k6(e,"x",n[0])||k6(e,"y",n[0])}return{}}function rK(e,t){const n=sa[e.type]||{scales:{}},r=t.scales||{},i=Zy(e.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!ae(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Xy(s,o,nK(s,e),We.scales[o.type]),u=eK(l,i),c=n.scales||{};a[s]=Bo(Object.create(null),[{axis:l},o,c[l],c[u]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||Zy(o,t),c=(sa[o]||{}).scales||{};Object.keys(c).forEach(d=>{const f=JH(d,l),h=s[f+"AxisID"]||f;a[h]=a[h]||Object.create(null),Bo(a[h],[{axis:f},r[h],c[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Bo(o,[We.scales[o.type],We.scale])}),a}function QT(e){const t=e.options||(e.options={});t.plugins=J(t.plugins,{}),t.scales=rK(e,t)}function JT(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function iK(e){return e=e||{},e.data=JT(e.data),QT(e),e}const P6=new Map,eR=new Set;function Bu(e,t){let n=P6.get(e);return n||(n=t(),P6.set(e,n),eR.add(n)),n}const no=(e,t,n)=>{const r=ci(t,n);r!==void 0&&e.add(r)};class aK{constructor(t){this._config=iK(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=JT(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),QT(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bu(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Bu(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Bu(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Bu(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(n);if(o)return o;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>no(l,t,d))),c.forEach(d=>no(l,i,d)),c.forEach(d=>no(l,sa[a]||{},d)),c.forEach(d=>no(l,We,d)),c.forEach(d=>no(l,Yy,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),eR.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,sa[n]||{},We.datasets[n]||{},{type:n},We,Yy]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=T6(this._resolverCache,t,i);let l=s;if(oK(s,n)){a.$shared=!1,r=di(r)?r():r;const u=this.createResolver(t,r,o);l=Ds(s,r,u)}for(const u of n)a[u]=l[u];return a}createResolver(t,n,r=[""],i){const{resolver:a}=T6(this._resolverCache,t,r);return ae(n)?Ds(a,n,void 0,i):a}}function T6(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:j$(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const sK=e=>ae(e)&&Object.getOwnPropertyNames(e).some(t=>di(e[t]));function oK(e,t){const{isScriptable:n,isIndexable:r}=FT(e);for(const i of t){const a=n(i),s=r(i),o=(s||a)&&e[i];if(a&&(di(o)||sK(o))||s&&Be(o))return!0}return!1}var lK="4.4.3";const uK=["top","bottom","left","right","chartArea"];function R6(e,t){return e==="top"||e==="bottom"||uK.indexOf(e)===-1&&t==="x"}function M6(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function F6(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),De(n&&n.onComplete,[e],t)}function cK(e){const t=e.chart,n=t.options.animation;De(n&&n.onProgress,[e],t)}function tR(e){return W$()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const fc={},A6=e=>{const t=tR(e);return Object.values(fc).filter(n=>n.canvas===t).pop()};function dK(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const s=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=s)}}}function fK(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Iu(e,t,n){return e.options.clip?e[n]:t[n]}function hK(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Iu(n,t,"left"),right:Iu(n,t,"right"),top:Iu(r,t,"top"),bottom:Iu(r,t,"bottom")}:t}var Rr;let As=(Rr=class{static register(...t){Hn.add(...t),O6()}static unregister(...t){Hn.remove(...t),O6()}constructor(t,n){const r=this.config=new aK(n),i=tR(t),a=A6(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||TH(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,u=l&&l.height,c=l&&l.width;if(this.id=mW(),this.ctx=o,this.canvas=l,this.width=c,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new qH,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=RW(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],fc[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ar.listen(this,"complete",F6),ar.listen(this,"progress",cK),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return ce(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Hn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():n6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return J5(this.canvas,this.ctx),this}stop(){return ar.stop(this),this}resize(t,n){ar.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,n6(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),De(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};me(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=Xy(s,o),u=l==="r",c=l==="x";return{options:o,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),me(a,s=>{const o=s.options,l=o.id,u=Xy(l,o),c=J(o.type,s.dtype);(o.position===void 0||R6(o.position,u)!==R6(s.dposition))&&(o.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Hn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),me(i,(s,o)=>{s||delete r[o]}),me(r,s=>{Ct.configure(this,s,s.options),Ct.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,c=this.data.datasets.length;u{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(M6("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){me(this.scales,t=>{Ct.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!U5(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const s=r==="_removeElements"?-a:a;dK(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ct.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],me(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,a=hK(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Wf(n,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&Uf(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return vr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=uH.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=bi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);bl(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ar.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};me(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){me(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},me(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,s,o,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=t.length;o{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!Vd(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),s=a(n,t),o=r?t:a(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,s=n,o=this._getActiveElements(t,i,r,s),l=xW(t),u=fK(t,this._lastEvent,r,l);r&&(this._lastEvent=null,De(a.onHover,[t,o,this],this),l&&De(a.onClick,[t,o,this],this));const c=!Vd(o,i);return(c||n)&&(this._active=o,this._updateHoverStyles(o,i,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},j(Rr,"defaults",We),j(Rr,"instances",fc),j(Rr,"overrides",sa),j(Rr,"registry",Hn),j(Rr,"version",lK),j(Rr,"getChart",A6),Rr);function O6(){return me(As.instances,e=>e._plugins.invalidate())}function pK(e,t,n){const{startAngle:r,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=t;let u=i/o;e.beginPath(),e.arc(a,s,o,r-u,n+u),l>i?(u=i/l,e.arc(a,s,l,n+u,r-u,!0)):e.arc(a,s,i,n+qe,r-qe),e.closePath(),e.clip()}function mK(e){return N$(e,["outerStart","outerEnd","innerStart","innerEnd"])}function gK(e,t,n,r){const i=mK(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,r*t/2),o=l=>{const u=(n-Math.min(a,l))*r/2;return dt(l,0,Math.min(a,u))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:dt(i.innerStart,0,s),innerEnd:dt(i.innerEnd,0,s)}}function Pa(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function qd(e,t,n,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:u,innerRadius:c}=t,d=Math.max(t.outerRadius+r+n-u,0),f=c>0?c+r+n+u:0;let h=0;const p=i-l;if(r){const z=c>0?c-r:0,O=d>0?d-r:0,C=(z+O)/2,A=C!==0?p*C/(C+r):p;h=(p-A)/2}const g=Math.max(.001,p*d-n/Me)/d,b=(p-g)/2,v=l+b+h,m=i-b-h,{outerStart:$,outerEnd:w,innerStart:D,innerEnd:S}=gK(t,f,d,m-v),k=d-$,x=d-w,T=v+$/k,P=m-w/x,E=f+D,F=f+S,R=v+D/E,M=m-S/F;if(e.beginPath(),a){const z=(T+P)/2;if(e.arc(s,o,d,T,z),e.arc(s,o,d,z,P),w>0){const B=Pa(x,P,s,o);e.arc(B.x,B.y,w,P,m+qe)}const O=Pa(F,m,s,o);if(e.lineTo(O.x,O.y),S>0){const B=Pa(F,M,s,o);e.arc(B.x,B.y,S,m+qe,M+Math.PI)}const C=(m-S/f+(v+D/f))/2;if(e.arc(s,o,f,m-S/f,C,!0),e.arc(s,o,f,C,v+D/f,!0),D>0){const B=Pa(E,R,s,o);e.arc(B.x,B.y,D,R+Math.PI,v-qe)}const A=Pa(k,v,s,o);if(e.lineTo(A.x,A.y),$>0){const B=Pa(k,T,s,o);e.arc(B.x,B.y,$,v-qe,T)}}else{e.moveTo(s,o);const z=Math.cos(T)*d+s,O=Math.sin(T)*d+o;e.lineTo(z,O);const C=Math.cos(P)*d+s,A=Math.sin(P)*d+o;e.lineTo(C,A)}e.closePath()}function vK(e,t,n,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){qd(e,t,n,r,l,i);for(let u=0;u=Te||yl(s,l,u),b=mr(o,c+h,d+h);return g&&b}getCenterPoint(n){const{x:r,y:i,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,d=(a+s)/2,f=(o+l+c+u)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Te?Math.floor(i/Te):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const u=1-Math.sin(Math.min(Me,i||0)),c=a*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,vK(n,this,c,s,o),bK(n,this,c,s,o),n.restore()}}j(yo,"id","arc"),j(yo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),j(yo,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(yo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function nR(e,t,n=t){e.lineCap=J(n.borderCapStyle,t.borderCapStyle),e.setLineDash(J(n.borderDash,t.borderDash)),e.lineDashOffset=J(n.borderDashOffset,t.borderDashOffset),e.lineJoin=J(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=J(n.borderWidth,t.borderWidth),e.strokeStyle=J(n.borderColor,t.borderColor)}function yK(e,t,n){e.lineTo(n.x,n.y)}function $K(e){return e.stepped?WW:e.tension||e.cubicInterpolationMode==="monotone"?UW:yK}function rR(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:s,end:o}=t,l=Math.max(i,s),u=Math.min(a,o),c=io&&a>o;return{count:r,start:l,loop:t.loop,ilen:u(s+(u?o-w:w))%a,$=()=>{g!==b&&(e.lineTo(c,b),e.lineTo(c,g),e.lineTo(c,v))};for(l&&(h=i[m(0)],e.moveTo(h.x,h.y)),f=0;f<=o;++f){if(h=i[m(f)],h.skip)continue;const w=h.x,D=h.y,S=w|0;S===p?(Db&&(b=D),c=(d*c+w)/++d):($(),e.lineTo(w,D),p=S,d=0,g=b=D),v=D}$()}function Qy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?wK:xK}function DK(e){return e.stepped?wU:e.tension||e.cubicInterpolationMode==="monotone"?DU:Fi}function _K(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),nR(e,t.options),e.stroke(i)}function EK(e,t,n,r){const{segments:i,options:a}=t,s=Qy(t);for(const o of i)nR(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const SK=typeof Path2D=="function";function CK(e,t,n,r){SK&&!t.options.segment?_K(e,t,n,r):EK(e,t,n,r)}class Yn extends Cr{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;pU(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=PU(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,s=WT(this,{property:n,start:i,end:i});if(!s.length)return;const o=[],l=DK(r);let u,c;for(u=0,c=s.length;ut!=="borderDash"&&t!=="fill"});function B6(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function aR(e){return Jy[e%Jy.length]}function sR(e){return I6[e%I6.length]}function AK(e,t){return e.borderColor=aR(t),e.backgroundColor=sR(t),++t}function OK(e,t){return e.backgroundColor=e.data.map(()=>aR(t++)),t}function BK(e,t){return e.backgroundColor=e.data.map(()=>sR(t++)),t}function IK(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Ui?t=OK(n,t):i instanceof us?t=BK(n,t):i&&(t=AK(n,t))}}function L6(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function LK(e){return e&&(e.borderColor||e.backgroundColor)}var NK={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:a}=i;if(!n.forceOverride&&(L6(r)||LK(i)||a&&L6(a)))return;const s=IK(e);r.forEach(s)}};function jK(e,t,n,r,i){const a=i.samples||r;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const u=t+n-1;let c=t,d,f,h,p,g;for(s[l++]=e[c],d=0;dh&&(h=p,f=e[m],g=m);s[l++]=f,c=g}return s[l++]=e[u],s}function zK(e,t,n,r){let i=0,a=0,s,o,l,u,c,d,f,h,p,g;const b=[],v=t+n-1,m=e[t].x,w=e[v].x-m;for(s=t;sg&&(g=u,f=s),i=(a*i+o.x)/++a;else{const S=s-1;if(!ce(d)&&!ce(f)){const k=Math.min(d,f),x=Math.max(d,f);k!==h&&k!==S&&b.push({...e[k],x:i}),x!==h&&x!==S&&b.push({...e[x],x:i})}s>0&&S!==h&&b.push(e[S]),b.push(o),c=D,a=0,p=g=u,d=f=h=s}}return b}function oR(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function N6(e){e.data.datasets.forEach(t=>{oR(t)})}function VK(e,t){const n=t.length;let r=0,i;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:u}=a.getUserBounds();return l&&(r=dt(gr(t,a.axis,s).lo,0,n-1)),u?i=dt(gr(t,a.axis,o).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var WK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){N6(e);return}const r=e.width;e.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:o}=i,l=e.getDatasetMeta(a),u=s||i.data;if(vo([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=e.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||e.options.parsing)return;let{start:d,count:f}=VK(l,u);const h=n.threshold||4*r;if(f<=h){oR(i);return}ce(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(n.algorithm){case"lttb":p=jK(u,d,f,r,n);break;case"min-max":p=zK(u,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=p})},destroy(e){N6(e)}};function UK(e,t,n){const r=e.segments,i=e.points,a=t.points,s=[];for(const o of r){let{start:l,end:u}=o;u=K$(l,u,i);const c=e3(n,i[l],i[u],o.loop);if(!t.segments){s.push({source:o,target:c,start:i[l],end:i[u]});continue}const d=WT(t,c);for(const f of d){const h=e3(n,a[f.start],a[f.end],f.loop),p=VT(o,i,h);for(const g of p)s.push({source:g,target:f,start:{[n]:j6(c,h,"start",Math.max)},end:{[n]:j6(c,h,"end",Math.min)}})}}return s}function e3(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e==="angle"&&(i=nn(i),a=nn(a)),{property:e,start:i,end:a}}function HK(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=K$(s,o,i);const l=i[s],u=i[o];r!==null?(a.push({x:l.x,y:r}),a.push({x:u.x,y:r})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:u.y}))}),a}function K$(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function j6(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function lR(e,t){let n=[],r=!1;return Be(e)?(r=!0,n=e):n=HK(e,t),n.length?new Yn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function z6(e){return e&&e.fill!==!1}function KK(e,t,n){let i=e[t].fill;const a=[t];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!Ve(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function YK(e,t,n){const r=XK(e);if(ae(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Ve(i)&&Math.floor(i)===i?qK(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function qK(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function GK(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ae(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ZK(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ae(e)?r=e.value:r=t.getBaseValue(),r}function XK(e){const t=e.options,n=t.fill;let r=J(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function QK(e){const{scale:t,index:n,line:r}=e,i=[],a=r.segments,s=r.points,o=JK(t,n);o.push(lR({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&xp(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;z6(a)&&xp(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!z6(r)||n.drawTime!=="beforeDatasetDraw"||xp(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const H6=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},cY=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class K6 extends Cr{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=De(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=it(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=H6(r,a);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(s,a,o,l)+10):(c=this.maxHeight,u=this._fitCols(s,i,o,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((p,g)=>{const b=r+n/2+a.measureText(p.text).width;(g===0||u[u.length-1]+b+2*o>s)&&(d+=c,u[u.length-(g>0?0:1)]=0,h+=c,f++),l[g]={left:0,top:h,row:f,width:b,height:i},u[u.length-1]+=b+o}),d}_fitCols(t,n,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=s-t;let d=o,f=0,h=0,p=0,g=0;return this.legendItems.forEach((b,v)=>{const{itemWidth:m,itemHeight:$}=dY(r,n,a,b,i);v>0&&h+$+2*o>c&&(d+=f+o,u.push({width:f,height:h}),p+=f+o,g++,f=h=0),l[v]={left:p,top:h,col:g,width:m,height:$},f=Math.max(f,m),h+=$+o}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,s=ls(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Dt(r,this.left+i,this.right-this.lineWidths[o]);for(const u of n)o!==u.row&&(o=u.row,l=Dt(r,this.left+i,this.right-this.lineWidths[o])),u.top+=this.top+t+i,u.left=s.leftForLtr(s.x(l),u.width),l+=u.width+i}else{let o=0,l=Dt(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const u of n)u.col!==o&&(o=u.col,l=Dt(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),u.top=l,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Wf(t,this),this._draw(),Uf(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=We.color,l=ls(t.rtl,this.left,this.width),u=it(s.font),{padding:c}=s,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:p,boxHeight:g,itemHeight:b}=H6(s,d),v=function(S,k,x){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;i.save();const T=J(x.lineWidth,1);if(i.fillStyle=J(x.fillStyle,o),i.lineCap=J(x.lineCap,"butt"),i.lineDashOffset=J(x.lineDashOffset,0),i.lineJoin=J(x.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=J(x.strokeStyle,o),i.setLineDash(J(x.lineDash,[])),s.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:T},E=l.xPlus(S,p/2),F=k+f;RT(i,P,E,F,s.pointStyleWidth&&p)}else{const P=k+Math.max((d-g)/2,0),E=l.leftForLtr(S,p),F=qi(x.borderRadius);i.beginPath(),Object.values(F).some(R=>R!==0)?$l(i,{x:E,y:P,w:p,h:g,radius:F}):i.rect(E,P,p,g),i.fill(),T!==0&&i.stroke()}i.restore()},m=function(S,k,x){oa(i,x.text,S,k+b/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},$=this.isHorizontal(),w=this._computeTitleHeight();$?h={x:Dt(a,this.left+c,this.right-r[0]),y:this.top+c+w,line:0}:h={x:this.left+c,y:Dt(a,this.top+w+c,this.bottom-n[0].height),line:0},NT(this.ctx,t.textDirection);const D=b+c;this.legendItems.forEach((S,k)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;const x=i.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),P=p+f+x;let E=h.x,F=h.y;l.setWidth(this.width),$?k>0&&E+P+c>this.right&&(F=h.y+=D,h.line++,E=h.x=Dt(a,this.left+c,this.right-r[h.line])):k>0&&F+D>this.bottom&&(E=h.x=E+n[h.line].width+c,h.line++,F=h.y=Dt(a,this.top+w+c,this.bottom-n[h.line].height));const R=l.x(E);if(v(R,F,S),E=MW(T,E+p+f,$?E+P:this.right,t.rtl),m(l.x(E),F,S),$)h.x+=P+c;else if(typeof S.text!="string"){const M=u.lineHeight;h.y+=cR(S,M)+c}else h.y+=D}),jT(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=it(n.font),i=Pt(n.padding);if(!n.display)return;const a=ls(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Dt(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);c=u+Dt(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const h=Dt(o,d,d+f);s.textAlign=a.textAlign(I$(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,oa(s,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=it(t.font),r=Pt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,a;if(mr(t,this.left,this.right)&&mr(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;ra.length>s.length?a:s)),t+n.size/2+r.measureText(i).width}function hY(e,t,n){let r=e;return typeof t.text!="string"&&(r=cR(t,n)),r}function cR(e,t){const n=e.text?e.text.length:0;return t*n}function pY(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var mY={id:"legend",_element:K6,start(e,t,n){const r=e.legend=new K6({ctx:e.ctx,options:n,chart:e});Ct.configure(e,r,n),Ct.addBox(e,r)},stop(e){Ct.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Ct.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Pt(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(o||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Y$ extends Cr{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Be(r.text)?r.text.length:1;this._padding=Pt(r.padding);const a=i*it(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:a,options:s}=this,o=s.align;let l=0,u,c,d;return this.isHorizontal()?(c=Dt(o,r,a),d=n+t,u=a-r):(s.position==="left"?(c=r+t,d=Dt(o,i,n),l=Me*-.5):(c=a-t,d=Dt(o,n,i),l=Me*.5),u=i-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=it(n.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:u}=this._drawArgs(a);oa(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:I$(n.align),textBaseline:"middle",translation:[s,o]})}}function gY(e,t){const n=new Y$({ctx:e.ctx,options:t,chart:e});Ct.configure(e,n,t),Ct.addBox(e,n),e.titleBlock=n}var vY={id:"title",_element:Y$,start(e,t,n){gY(e,n)},stop(e){const t=e.titleBlock;Ct.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Ct.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Lu=new WeakMap;var bY={id:"subtitle",start(e,t,n){const r=new Y$({ctx:e.ctx,options:n,chart:e});Ct.configure(e,r,n),Ct.addBox(e,r),Lu.set(e,r)},stop(e){Ct.removeBox(e,Lu.get(e)),Lu.delete(e)},beforeUpdate(e,t,n){const r=Lu.get(e);Ct.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const $o={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;to+l)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a-1?e.split(` +`):e}function yY(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:e,label:s,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Y6(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=it(t.bodyFont),u=it(t.titleFont),c=it(t.footerFont),d=a.length,f=i.length,h=r.length,p=Pt(t.padding);let g=p.height,b=0,v=r.reduce((w,D)=>w+D.before.length+D.lines.length+D.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;g+=h*w+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let m=0;const $=function(w){b=Math.max(b,n.measureText(w).width+m)};return n.save(),n.font=u.string,me(e.title,$),n.font=l.string,me(e.beforeBody.concat(e.afterBody),$),m=t.displayColors?s+2+t.boxPadding:0,me(r,w=>{me(w.before,$),me(w.lines,$),me(w.after,$)}),m=0,n.font=c.string,me(e.footer,$),n.restore(),b+=p.width,{width:b,height:g}}function $Y(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function xY(e,t,n,r){const{x:i,width:a}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+a+s>t.width||e==="right"&&i-a-s<0)return!0}function wY(e,t,n,r){const{x:i,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let u="center";return r==="center"?u=i<=(o+l)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),xY(u,e,t,n)&&(u="center"),u}function q6(e,t,n){const r=n.yAlign||t.yAlign||$Y(e,n);return{xAlign:n.xAlign||t.xAlign||wY(e,t,n,r),yAlign:r}}function DY(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function _Y(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function G6(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,u=i+a,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=qi(s);let p=DY(t,o);const g=_Y(t,l,u);return l==="center"?o==="left"?p+=u:o==="right"&&(p-=u):o==="left"?p-=Math.max(c,f)+i:o==="right"&&(p+=Math.max(d,h)+i),{x:dt(p,0,r.width-t.width),y:dt(g,0,r.height-t.height)}}function Nu(e,t,n){const r=Pt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Z6(e){return Wn([],sr(e))}function EY(e,t,n){return bi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function X6(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const dR={beforeTitle:ir,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?dR[t].call(n,r):i}class t3 extends Cr{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new UT(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=EY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=jt(r,"beforeTitle",this,t),a=jt(r,"title",this,t),s=jt(r,"afterTitle",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}getBeforeBody(t,n){return Z6(jt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return me(t,a=>{const s={before:[],lines:[],after:[]},o=X6(r,a);Wn(s.before,sr(jt(o,"beforeLabel",this,a))),Wn(s.lines,jt(o,"label",this,a)),Wn(s.after,sr(jt(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,n){return Z6(jt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=jt(r,"beforeFooter",this,t),a=jt(r,"footer",this,t),s=jt(r,"afterFooter",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,u;for(l=0,u=n.length;lt.filter(c,d,f,r))),t.itemSort&&(o=o.sort((c,d)=>t.itemSort(c,d,r))),me(o,c=>{const d=X6(t.callbacks,c);i.push(jt(d,"labelColor",this,c)),a.push(jt(d,"labelPointStyle",this,c)),s.push(jt(d,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=$o[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=Y6(this,r),u=Object.assign({},o,l),c=q6(this.chart,r,u),d=G6(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=qi(o),{x:f,y:h}=t,{width:p,height:g}=n;let b,v,m,$,w,D;return a==="center"?(w=h+g/2,i==="left"?(b=f,v=b-s,$=w+s,D=w-s):(b=f+p,v=b+s,$=w-s,D=w+s),m=b):(i==="left"?v=f+Math.max(l,c)+s:i==="right"?v=f+p-Math.max(u,d)-s:v=this.caretX,a==="top"?($=h,w=$-s,b=v-s,m=v+s):($=h+g,w=$+s,b=v+s,m=v-s),D=$),{x1:b,x2:v,x3:m,y1:$,y2:w,y3:D}}drawTitle(t,n,r){const i=this.title,a=i.length;let s,o,l;if(a){const u=ls(r.rtl,this.x,this.width);for(t.x=Nu(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",s=it(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lm!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,$l(t,{x:g,y:p,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),$l(t,{x:b,y:p+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,p,u,l),t.strokeRect(g,p,u,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=it(r.bodyFont);let f=d.lineHeight,h=0;const p=ls(r.rtl,this.x,this.width),g=function(x){n.fillText(x,p.x(t.x+h),t.y+f/2),t.y+=f+a},b=p.textAlign(s);let v,m,$,w,D,S,k;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=Nu(this,b,r),n.fillStyle=r.bodyColor,me(this.beforeBody,g),h=o&&b!=="right"?s==="center"?u/2+c:u+2+c:0,w=0,S=i.length;w0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=$o[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Y6(this,t),l=Object.assign({},s,this._size),u=q6(n,t,l),c=G6(t,l,u,n);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Pt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),NT(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),jT(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),a=!Vd(r,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,r),o=this._positionChanged(s,t),l=n||!Vd(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,s=$o[a.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}j(t3,"positioners",$o);var q$={id:"tooltip",_element:t3,positioners:$o,afterInit(e,t,n){n&&(e.tooltip=new t3({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:dR},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},SY=Object.freeze({__proto__:null,Colors:NK,Decimation:WK,Filler:uY,Legend:mY,SubTitle:bY,Title:vY,Tooltip:q$});const CY=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function kY(e,t,n,r){const i=e.indexOf(t);if(i===-1)return CY(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const PY=(e,t)=>e===null?null:dt(Math.round(e),0,t);function Q6(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}j(wl,"id","category"),j(wl,"defaults",{ticks:{callback:Q6}});function TY(e,t){const n=[],{bounds:i,step:a,min:s,max:o,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=a||1,p=c-1,{min:g,max:b}=t,v=!ce(s),m=!ce(o),$=!ce(u),w=(b-g)/(d+1);let D=K5((b-g)/p/h)*h,S,k,x,T;if(D<1e-14&&!v&&!m)return[{value:g},{value:b}];T=Math.ceil(b/D)-Math.floor(g/D),T>p&&(D=K5(T*D/p/h)*h),ce(l)||(S=Math.pow(10,l),D=Math.ceil(D*S)/S),i==="ticks"?(k=Math.floor(g/D)*D,x=Math.ceil(b/D)*D):(k=g,x=b),v&&m&&a&&EW((o-s)/a,D/1e3)?(T=Math.round(Math.min((o-s)/D,c)),D=(o-s)/T,k=s,x=o):$?(k=v?s:k,x=m?o:x,T=u-1,D=(x-k)/T):(T=(x-k)/D,Io(T,Math.round(T),D/1e3)?T=Math.round(T):T=Math.ceil(T));const P=Math.max(Y5(D),Y5(k));S=Math.pow(10,ce(l)?P:l),k=Math.round(k*S)/S,x=Math.round(x*S)/S;let E=0;for(v&&(f&&k!==s?(n.push({value:s}),ko)break;n.push({value:F})}return m&&f&&x!==o?n.length&&Io(n[n.length-1].value,o,J6(o,w,e))?n[n.length-1].value=o:n.push({value:o}):(!m||x===o)&&n.push({value:x}),n}function J6(e,t,{horizontal:n,minRotation:r}){const i=An(r),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class Gd extends ba{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ce(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=n?i:l,o=l=>a=r?a:l;if(t){const l=Zn(i),u=Zn(a);l<0&&u<0?o(0):l>0&&u>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=TY(i,a);return t.bounds==="ticks"&&wT(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Vl(t,this.chart.options.locale,this.options.ticks.format)}}class Dl extends Gd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?t:0,this.max=Ve(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=An(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}j(Dl,"id","linear"),j(Dl,"defaults",{ticks:{callback:Vf.formatters.numeric}});const _l=e=>Math.floor(Yr(e)),Si=(e,t)=>Math.pow(10,_l(e)+t);function ew(e){return e/Math.pow(10,_l(e))===1}function tw(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function RY(e,t){const n=t-e;let r=_l(n);for(;tw(e,t,r)>10;)r++;for(;tw(e,t,r)<10;)r--;return Math.min(r,_l(e))}function MY(e,{min:t,max:n}){t=en(e.min,t);const r=[],i=_l(t);let a=RY(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,u=Math.round((t-l)*s)/s,c=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((u-c)/Math.pow(10,a)),f=en(e.min,Math.round((l+c+d*Math.pow(10,a))*s)/s);for(;f=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+c+d*Math.pow(10,a))*s)/s;const h=en(e.max,f);return r.push({value:h,major:ew(h),significand:d}),r}class n3 extends ba{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Gd.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Ve(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?Math.max(0,t):null,this.max=Ve(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ve(this._userMin)&&(this.min=t===Si(this.min,0)?Si(this.min,-1):Si(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=n?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Si(r,-1)),s(Si(i,1)))),r<=0&&a(Si(i,-1)),i<=0&&s(Si(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=MY(n,this);return t.bounds==="ticks"&&wT(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Vl(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Yr(t),this._valueRange=Yr(this.max)-Yr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Yr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}j(n3,"id","logarithmic"),j(n3,"defaults",{ticks:{callback:Vf.formatters.logarithmic,major:{enabled:!0}}});function r3(e){const t=e.ticks;if(t.display&&e.display){const n=Pt(t.backdropPadding);return J(t.font&&t.font.size,We.font.size)+n.height}return 0}function FY(e,t,n){return n=Be(n)?n:[n],{w:VW(e,t.string,n),h:n.length*t.lineHeight}}function nw(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function AY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Me/a:0;for(let l=0;lt.r&&(o=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function BY(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,r+i+s,a),u=Math.round(O$(nn(l.angle+qe))),c=zY(l.y,o.h,u),d=NY(u),f=jY(l.x,o.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+o.w,bottom:c+o.h}}function IY(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:a}=e;return!(vr({x:n,y:r},t)||vr({x:n,y:a},t)||vr({x:i,y:r},t)||vr({x:i,y:a},t))}function LY(e,t,n){const r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:r3(a)/2,additionalAngle:s?Me/i:0};let u;for(let c=0;c270||n<90)&&(e-=t),e}function VY(e,t,n){const{left:r,top:i,right:a,bottom:s}=n,{backdropColor:o}=t;if(!ce(o)){const l=qi(t.borderRadius),u=Pt(t.backdropPadding);e.fillStyle=o;const c=r-u.left,d=i-u.top,f=a-r+u.width,h=s-i+u.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),$l(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function WY(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const a=e._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(e.getPointLabelContext(i));VY(n,s,a);const o=it(s.font),{x:l,y:u,textAlign:c}=a;oa(n,e._pointLabels[i],l,u+o.lineHeight/2,o,{color:s.color,textAlign:c,textBaseline:"middle"})}}function fR(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Te);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s{const i=De(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?AY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Te/(this._pointLabels.length||1),r=this.options.startAngle||0;return nn(t*n+An(r))}getDistanceFromCenterForValue(t){if(ce(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ce(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),p=a.setContext(f);UY(this,h,l,s,p)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const c=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=it(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,s=t.measureText(o.label).width,t.fillStyle=u.backdropColor;const d=Pt(u.backdropPadding);t.fillRect(-s/2-d.left,-a-c.size/2-d.top,s+d.width,c.size+d.height)}oa(t,o.label,0,-a,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}j(xo,"id","radialLinear"),j(xo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),j(xo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),j(xo,"descriptors",{angleLines:{_fallback:"grid"}});const Kf={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ht=Object.keys(Kf);function rw(e,t){return e-t}function iw(e,t){if(ce(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Ve(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(ws(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function aw(e,t,n,r){const i=Ht.length;for(let a=Ht.indexOf(e);a=Ht.indexOf(n);a--){const s=Ht[a];if(Kf[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Ht[n?Ht.indexOf(n):0]}function YY(e){for(let t=Ht.indexOf(e)+1,n=Ht.length;t=t?n[r]:n[i];e[a]=!0}}function qY(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=n[o],l>=0&&(t[l].major=!0);return t}function ow(e,t,n){const r=[],i={},a=t.length;let s,o;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=dt(n,0,s),r=dt(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||aw(a.minUnit,n,r,this._getLabelCapacity(n)),o=J(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,u=ws(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const a=this.options,s=a.ticks.callback;if(s)return De(s,[t,n,r],this);const o=a.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&o[l],d=u&&o[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=gr(e,"pos",t)),{pos:a,time:o}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=gr(e,"time",t)),{time:a,pos:o}=e[r],{time:s,pos:l}=e[i]);const u=s-a;return u?o+(l-o)*(t-a)/u:o}class i3 extends El{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ju(n,this.min),this._tableRange=ju(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let s,o,l,u,c;for(s=0,o=t.length;s=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=i.length;si-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ju(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ju(this._table,r*this._tableRange+this._minPos,!0)}}j(i3,"id","timeseries"),j(i3,"defaults",El.defaults);var GY=Object.freeze({__proto__:null,CategoryScale:wl,LinearScale:Dl,LogarithmicScale:n3,RadialLinearScale:xo,TimeScale:El,TimeSeriesScale:i3});const ZY=[rH,FK,SY,GY];As.register(...ZY);function zn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function la(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const hR=6048e5,XY=864e5;let QY={};function Yf(){return QY}function Sl(e,t){var o,l,u,c;const n=Yf(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=zn(e),a=i.getDay(),s=(a=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function lw(e){const t=zn(e);return t.setHours(0,0,0,0),t}function uw(e){const t=zn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function JY(e,t){const n=lw(e),r=lw(t),i=+n-uw(n),a=+r-uw(r);return Math.round((i-a)/XY)}function eq(e){const t=pR(e),n=la(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zd(n)}function tq(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function nq(e){if(!tq(e)&&typeof e!="number")return!1;const t=zn(e);return!isNaN(Number(t))}function rq(e){const t=zn(e),n=la(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const iq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},aq=(e,t,n)=>{let r;const i=iq[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uq={date:wp({formats:sq,defaultWidth:"full"}),time:wp({formats:oq,defaultWidth:"full"}),dateTime:wp({formats:lq,defaultWidth:"full"})},cq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dq=(e,t,n,r)=>cq[e];function ro(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const fq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bq=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yq={ordinalNumber:bq,era:ro({values:fq,defaultWidth:"wide"}),quarter:ro({values:hq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ro({values:pq,defaultWidth:"wide"}),day:ro({values:mq,defaultWidth:"wide"}),dayPeriod:ro({values:gq,defaultWidth:"wide",formattingValues:vq,defaultFormattingWidth:"wide"})};function io(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?xq(o,d=>d.test(s)):$q(o,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function $q(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function xq(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const Dq=/^(\d+)(th|st|nd|rd)?/i,_q=/\d+/i,Eq={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Sq={any:[/^b/i,/^(a|c)/i]},Cq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kq={any:[/1/i,/2/i,/3/i,/4/i]},Pq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Mq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Aq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Oq={ordinalNumber:wq({matchPattern:Dq,parsePattern:_q,valueCallback:e=>parseInt(e,10)}),era:io({matchPatterns:Eq,defaultMatchWidth:"wide",parsePatterns:Sq,defaultParseWidth:"any"}),quarter:io({matchPatterns:Cq,defaultMatchWidth:"wide",parsePatterns:kq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:io({matchPatterns:Pq,defaultMatchWidth:"wide",parsePatterns:Tq,defaultParseWidth:"any"}),day:io({matchPatterns:Rq,defaultMatchWidth:"wide",parsePatterns:Mq,defaultParseWidth:"any"}),dayPeriod:io({matchPatterns:Fq,defaultMatchWidth:"any",parsePatterns:Aq,defaultParseWidth:"any"})},Bq={code:"en-US",formatDistance:aq,formatLong:uq,formatRelative:dq,localize:yq,match:Oq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Iq(e){const t=zn(e);return JY(t,rq(t))+1}function Lq(e){const t=zn(e),n=+Zd(t)-+eq(t);return Math.round(n/hR)+1}function mR(e,t){var c,d,f,h;const n=zn(e),r=n.getFullYear(),i=Yf(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=la(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const o=Sl(s,t),l=la(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Sl(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Nq(e,t){var o,l,u,c;const n=Yf(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=mR(e,t),a=la(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Sl(a,t)}function jq(e,t){const n=zn(e),r=+Sl(n,t)-+Nq(n,t);return Math.round(r/hR)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return pe(i,t.length)}},Ta={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Tr.y(e,t)},Y:function(e,t,n,r){const i=mR(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return pe(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):pe(a,t.length)},R:function(e,t){const n=pR(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=jq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):pe(i,t.length)},I:function(e,t,n){const r=Lq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Tr.d(e,t)},D:function(e,t,n){const r=Iq(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return pe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ta.noon:r===0?i=Ta.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ta.evening:r>=12?i=Ta.afternoon:r>=4?i=Ta.morning:i=Ta.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Tr.s(e,t)},S:function(e,t){return Tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return fw(r);case"XXXX":case"XX":return Ai(r);case"XXXXX":case"XXX":default:return Ai(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return fw(r);case"xxxx":case"xx":return Ai(r);case"xxxxx":case"xxx":default:return Ai(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+dw(r,":");case"OOOO":default:return"GMT"+Ai(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+dw(r,":");case"zzzz":default:return"GMT"+Ai(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return pe(r,t.length)}};function dw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+pe(a,2)}function fw(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):Ai(e,t)}function Ai(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=pe(Math.trunc(r/60),2),a=pe(r%60,2);return n+i+t+a}const hw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},gR=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},zq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return hw(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",hw(r,t)).replace("{{time}}",gR(i,t))},Vq={p:gR,P:zq},Wq=/^D+$/,Uq=/^Y+$/,Hq=["D","DD","YY","YYYY"];function Kq(e){return Wq.test(e)}function Yq(e){return Uq.test(e)}function qq(e,t,n){const r=Gq(e,t,n);if(console.warn(r),Hq.includes(e))throw new RangeError(r)}function Gq(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Zq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qq=/^'([^]*?)'?$/,Jq=/''/g,eG=/[a-zA-Z]/;function tG(e,t,n){var c,d,f,h;const r=Yf(),i=r.locale??Bq,a=r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,o=zn(e);if(!nq(o))throw new RangeError("Invalid time value");let l=t.match(Xq).map(p=>{const g=p[0];if(g==="p"||g==="P"){const b=Vq[g];return b(p,i.formatLong)}return p}).join("").match(Zq).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const g=p[0];if(g==="'")return{isToken:!1,value:nG(p)};if(cw[g])return{isToken:!0,value:p};if(g.match(eG))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const g=p.value;(Yq(g)||Kq(g))&&qq(g,t,String(e));const b=cw[g[0]];return b(o,g,i.localize,u)}).join("")}function nG(e){const t=e.match(Qq);return t?t[1].replace(Jq,"'"):e}const vR="label";function pw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function rG(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bR(e,t){e.labels=t}function yR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vR;const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(s=>s[n]===i[n]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function iG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vR;const n={labels:[],datasets:[]};return bR(n,e.labels),yR(n,e.datasets,t),n}function aG(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:s,data:o,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=y.useRef(null),p=y.useRef(),g=()=>{h.current&&(p.current=new As(h.current,{type:s,data:iG(o,a),options:l&&{...l},plugins:u}),pw(t,p.current))},b=()=>{pw(t,null),p.current&&(p.current.destroy(),p.current=null)};return y.useEffect(()=>{!i&&p.current&&l&&rG(p.current,l)},[i,l]),y.useEffect(()=>{!i&&p.current&&bR(p.current.config.data,o.labels)},[i,o.labels]),y.useEffect(()=>{!i&&p.current&&o.datasets&&yR(p.current.config.data,o.datasets,a)},[i,o.datasets]),y.useEffect(()=>{p.current&&(i?(b(),setTimeout(g)):p.current.update(d))},[i,l,o.labels,o.datasets,d]),y.useEffect(()=>{p.current&&(b(),setTimeout(g))},[s]),y.useEffect(()=>(g(),()=>b()),[]),_.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:r},f),c)}const sG=y.forwardRef(aG);function $R(e,t){return As.register(t),y.forwardRef((n,r)=>_.createElement(sG,Object.assign({},n,{ref:r,type:e})))}const oG=$R("line",jo),lG=$R("polarArea",us);function xR(){return I.jsx(I.Fragment,{children:I.jsx("div",{className:"block bg-white-500 border border-gray-200 rounded-lg shadow",children:I.jsx("div",{children:"No data"})})})}As.register(wl,Dl,cs,Yn,q$);function uG(e){const t={responsive:!0,scales:{x:{grid:{display:!1}},y:{min:0,ticks:{stepSize:1,callback:function(i,a,s){return i+"wps"}},grid:{display:!1}}}},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const o=12,{data:l}=await e.supabase.from("file").select("timestamp").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log(l),l.length===0)return;const u=new Date(s),d=(+new Date(a)-+u)/o;let f=Array(o).fill(""),h=Array(o).fill(0);for(let p=0;p{const m=new Date(v.timestamp);return m>=g&&m0?I.jsx(oG,{data:n,options:t}):I.jsx(xR,{})]})}function cG(e){return I.jsx(I.Fragment,{children:I.jsx(zV,{"aria-label":"timeframe",value:e.timeframe,onChange:e.setTimeframe})})}function zu(e,t){var n=e.length*t;if(e.length===0)throw new Error("quantile requires at least one data point.");if(t<0||t>1)throw new Error("quantiles must be between 0 and 1");return t===1?e[e.length-1]:t===0?e[0]:n%1!==0?e[Math.ceil(n)-1]:e.length%2===0?(e[n-1]+e[n])/2:e[n]}As.register(wl,Dl,cs,Yn,q$);function dG(e){const t={responsive:!0},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const{data:o}=await e.supabase.from("file").select("contents").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log("RAWDATA",o),o.length===0)return;let l=o.map(h=>h.contents.length).sort((h,p)=>h-p);console.log("TOP LENGTHS",l);let u=zu(l,.25),c=zu(l,.5),d=zu(l,.75),f=zu(l,1);console.log("p25: ",u),console.log("p50: ",c),console.log("p75: ",d),console.log("p100: ",f),r({labels:["p25","p50","p75","p100"],datasets:[{data:[u,c,d,f]}]})})()},[e.timeframe]),console.log("length: aaa",n.datasets.length),I.jsxs("div",{className:"flex-grow flex-1",children:[I.jsx("p",{className:"text-center",children:e.name}),n.datasets.length>0?I.jsx(lG,{data:n,options:t}):I.jsx(xR,{})]})}function fG(e){const t=vf(),[n,r]=y.useState([]);y.useEffect(()=>{e.session||t("/login")},[e.session]);const i=y.useCallback(async()=>{const{data:a,error:s}=await e.supabase.from("file").select();if(s){console.error(s);return}r(a.map(o=>o))},[e.supabase]);return y.useEffect(()=>{i()},[]),I.jsx(I.Fragment,{children:I.jsxs("div",{className:"flex h-screen",children:[I.jsx(gT,{currentPage:"Home"}),I.jsx("main",{className:"overflow-y-auto flex flex-col flex-1 mx-5",children:I.jsxs("div",{className:"flex flex-col w-full gap-7 flex-grow",children:[I.jsx("div",{className:"flex flex-row gap-7 flex-grow",children:I.jsx("div",{className:"ml-auto mt-2",children:I.jsx(cG,{timeframe:e.timeframe,setTimeframe:e.setTimeframe})})}),I.jsxs("div",{className:"flex flex-row gap-7 flex-grow",children:[I.jsxs("div",{className:"w-1/2 flex flex-col",children:[I.jsx("p",{className:"text-center",children:"Active hosts"}),I.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:I.jsxs("ol",{children:[I.jsx("li",{children:"Host 1"}),I.jsx("li",{children:"Host 2"})]})})]}),I.jsx("div",{className:"w-1/2 ml-auto",children:I.jsx(uG,{name:"File writes per second",supabase:e.supabase,timeframe:e.timeframe})})]}),I.jsxs("div",{className:"flex flex-row gap-7 mb-5 flex-grow",children:[I.jsx("div",{className:"w-1/2 mr-auto",children:I.jsx(dG,{name:"File writes size percentiles",supabase:e.supabase,timeframe:e.timeframe})}),I.jsxs("div",{className:"w-1/2 flex flex-col",children:[I.jsx("p",{className:"text-center",children:"Most edited files"}),I.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:I.jsxs("ol",{children:[I.jsx("li",{children:"File 1"}),I.jsx("li",{children:"File 2"})]})})]})]})]})})]})})}function hG(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,a]=y.useState(!1),s=y.useRef(n);s.current=n;const o=y.useRef(r);return o.current=r,y.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=t,l.onload=()=>{var u;a(!0),(u=s.current)===null||u===void 0||u.call(s)},l.onerror=()=>{var u;a(!1),(u=o.current)===null||u===void 0||u.call(o)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[t]),i}const wR=y.createContext(null);function pG({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const a=hG({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),s=y.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return _.createElement(wR.Provider,{value:s},i)}function mG(){const e=y.useContext(wR);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function gG(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const vG={large:40,medium:32,small:20};function bG({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:i="standard",theme:a="outline",size:s="large",text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f,containerProps:h,...p}){const g=y.useRef(null),{clientId:b,scriptLoadedSuccessfully:v}=mG(),m=y.useRef(e);m.current=e;const $=y.useRef(t);$.current=t;const w=y.useRef(r);return w.current=r,y.useEffect(()=>{var D,S,k,x,T,P,E,F,R;if(v)return(k=(S=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||S===void 0?void 0:S.id)===null||k===void 0||k.initialize({client_id:b,callback:M=>{var z;if(!(M!=null&&M.credential))return(z=$.current)===null||z===void 0?void 0:z.call($);const{credential:O,select_by:C}=M;m.current({credential:O,clientId:gG(M),select_by:C})},...p}),(P=(T=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||T===void 0?void 0:T.id)===null||P===void 0||P.renderButton(g.current,{type:i,theme:a,size:s,text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f}),n&&((R=(F=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||F===void 0?void 0:F.id)===null||R===void 0||R.prompt(w.current)),()=>{var M,z,O;n&&((O=(z=(M=window==null?void 0:window.google)===null||M===void 0?void 0:M.accounts)===null||z===void 0?void 0:z.id)===null||O===void 0||O.cancel())}},[b,v,n,i,a,s,o,l,u,c,d]),_.createElement("div",{...h,ref:g,style:{height:vG[s],...h==null?void 0:h.style}})}function yG(e){const t=vf();return y.useEffect(()=>{e.supabase.auth.getSession().then(({data:{session:r}})=>{e.setSession(r),console.log("LOGIN SESSION",r)});const{data:{subscription:n}}=e.supabase.auth.onAuthStateChange((r,i)=>{e.setSession(i),console.log("SESSION CHANGE",i)});return()=>n.unsubscribe()},[e.supabase]),y.useEffect(()=>{e.session&&t("/")},[e.session]),I.jsx(I.Fragment,{children:I.jsx("div",{className:"flex flex-col items-center h-screen w-screen",children:I.jsxs("div",{className:"flex flex-row items-center gap-x-8 m-auto",children:[I.jsx("div",{children:I.jsx("h1",{className:"text-4xl text-bold font-sans antialiased text-blue-700 tracking-wide",children:"fs-tracer"})}),I.jsx("div",{className:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700",children:I.jsxs("div",{className:"mx-7 my-5",children:[I.jsx("h5",{className:"mb-2 text-2xl font-bold font-sans antialiased text-gray-900",children:"Hello!"}),I.jsxs("div",{className:"flex flex-row items-center gap-2",children:[I.jsx("span",{className:"font-normal text-gray-700 dark:text-gray-400",children:"Continue with"}),I.jsx("span",{children:I.jsx(pG,{clientId:"952965459060-nrnrsdoq22mf646vfa72hk410pvdda5q.apps.googleusercontent.com",children:I.jsx(bG,{onSuccess:async n=>{await e.supabase.auth.signInWithIdToken({provider:"google",token:n.credential})},onError:()=>{console.log("Login Failed")},width:7777,size:"large",type:"icon"})})})]})]})})]})})})}function $G(e){const t=vf();return y.useEffect(()=>{(async()=>{await e.supabase.auth.signOut()})(),t("/login")},[e.session]),I.jsx(I.Fragment,{})}function xG(e){const t=vf(),n=20,[r,i]=y.useState([]),[a,s]=y.useState(0);y.useEffect(()=>{e.session||t("/login")},[e.session]);const o=y.useCallback(async()=>{console.log("FETCHIN FILES, pagination: ",a);const{data:l,error:u}=await e.supabase.from("file").select().range(a,a+n-1);if(u){console.error(u);return}console.log("RAW FILES: ",l),i(l.map(c=>c)),console.log("FETCHED FILES")},[e.supabase,a]);return y.useEffect(()=>{console.log("Aaa"),o()},[a]),I.jsx(I.Fragment,{children:I.jsxs("div",{className:"flex h-screen",children:[I.jsx(gT,{currentPage:"Recent"}),I.jsxs("main",{className:"flex-1 overflow-y-auto my-4",children:[I.jsx("div",{className:"flex flex-col items-center",children:I.jsx("div",{className:"flex flex-col gap-2",children:r.map(l=>I.jsx("div",{role:"button",onClick:()=>console.log("clocked file"),children:I.jsxs("p",{className:"underline",children:["file: ",l.absolute_path]})},l.id))})}),I.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[I.jsx("button",{className:"ml-7 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+-n),children:"prev"}),I.jsx("button",{className:"mr-7 ml-auto bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+n),children:"next"})]})]})]})})}function DR(e,t){window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:t}))}const mw=(e,t)=>{const n=JSON.stringify(t);window.localStorage.setItem(e,n),DR(e,n)},wG=e=>{window.localStorage.removeItem(e),DR(e,null)},gw=e=>window.localStorage.getItem(e),DG=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),_G=()=>{throw Error("useLocalStorage is a client-only hook")};function EG(e,t){const n=()=>gw(e),r=y.useSyncExternalStore(DG,n,_G),i=y.useCallback(a=>{try{const s=typeof a=="function"?a(JSON.parse(r)):a;s==null?wG(e):mw(e,s)}catch(s){console.warn(s)}},[e,r]);return y.useEffect(()=>{gw(e)===null&&typeof t<"u"&&mw(e,t)},[e,t]),[r?JSON.parse(r):t,i]}const Vu=KB("https://slpoocycjgqsuoedhkbn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNscG9vY3ljamdxc3VvZWRoa2JuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUyMDU0MjUsImV4cCI6MjAzMDc4MTQyNX0.xZYRTRN65rlms1Hb96IBAQvw3EGtMzUxlGPP5TVey34");function SG(){const[e,t]=EG("session",null),n=Ol(Pf()),[r,i]=y.useState({start:n.subtract({days:7}),end:n});return I.jsx(I.Fragment,{children:I.jsx(sC,{theme:KV,children:I.jsx(HA,{basename:"/fs-tracer-frontend",children:I.jsxs(VA,{children:[I.jsx(Ra,{index:!0,element:I.jsx(fG,{supabase:Vu,session:e,timeframe:r,setTimeframe:i})}),I.jsx(Ra,{path:"/recent",element:I.jsx(xG,{supabase:Vu,session:e,timeframe:r,setTimeframe:i})}),I.jsx(Ra,{path:"/login",element:I.jsx(yG,{supabase:Vu,session:e,setSession:t,timeframe:r,setTimeframe:i})}),I.jsx(Ra,{path:"/logout",element:I.jsx($G,{supabase:Vu,session:e,setSession:t,timeframe:r,setTimeframe:i})}),I.jsx(Ra,{path:"*",element:I.jsx("p",{children:"notfound"})})]})})})})}Dp.createRoot(document.getElementById("root")).render(I.jsx(_.StrictMode,{children:I.jsx(SG,{})}));export{vw as g}; -- cgit 1.4.1