(function(ie){typeof define=="function"&&define.amd?define(ie):ie()})(function(){"use strict";var a8=Object.defineProperty,l8=Object.defineProperties;var u8=Object.getOwnPropertyDescriptors;var Ku=Object.getOwnPropertySymbols;var J_=Object.prototype.hasOwnProperty,e$=Object.prototype.propertyIsEnumerable;var fm=(ie,te)=>(te=Symbol[ie])?te:Symbol.for("Symbol."+ie),c8=ie=>{throw TypeError(ie)},pm=Math.pow,hm=(ie,te,pe)=>te in ie?a8(ie,te,{enumerable:!0,configurable:!0,writable:!0,value:pe}):ie[te]=pe,$=(ie,te)=>{for(var pe in te||(te={}))J_.call(te,pe)&&hm(ie,pe,te[pe]);if(Ku)for(var pe of Ku(te))e$.call(te,pe)&&hm(ie,pe,te[pe]);return ie},N=(ie,te)=>l8(ie,u8(te));var ne=(ie,te)=>{var pe={};for(var Le in ie)J_.call(ie,Le)&&te.indexOf(Le)<0&&(pe[Le]=ie[Le]);if(ie!=null&&Ku)for(var Le of Ku(ie))te.indexOf(Le)<0&&e$.call(ie,Le)&&(pe[Le]=ie[Le]);return pe};var q=(ie,te,pe)=>hm(ie,typeof te!="symbol"?te+"":te,pe);var d8=function(ie,te){this[0]=ie,this[1]=te};var ds=ie=>{var te=ie[fm("asyncIterator")],pe=!1,Le,Z={};return te==null?(te=ie[fm("iterator")](),Le=it=>Z[it]=xi=>te[it](xi)):(te=te.call(ie),Le=it=>Z[it]=xi=>{if(pe){if(pe=!1,it==="throw")throw xi;return xi}return pe=!0,{done:!1,value:new d8(new Promise(Hu=>{var ea=te[it](xi);ea instanceof Object||c8("Object expected"),Hu(ea)}),1)}}),Z[fm("iterator")]=()=>Z,Le("next"),"throw"in te?Le("throw"):Z.throw=it=>{throw it},"return"in te&&Le("return"),Z};var Nu,yi;function ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var te={exports:{}},pe={},Le={exports:{}},Z={};/** * @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 it=Symbol.for("react.element"),xi=Symbol.for("react.portal"),Hu=Symbol.for("react.fragment"),ea=Symbol.for("react.strict_mode"),t$=Symbol.for("react.profiler"),n$=Symbol.for("react.provider"),i$=Symbol.for("react.context"),r$=Symbol.for("react.forward_ref"),s$=Symbol.for("react.suspense"),o$=Symbol.for("react.memo"),a$=Symbol.for("react.lazy"),mm=Symbol.iterator;function l$(t){return t===null||typeof t!="object"?null:(t=mm&&t[mm]||t["@@iterator"],typeof t=="function"?t:null)}var gm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vm=Object.assign,ym={};function or(t,e,n){this.props=t,this.context=e,this.refs=ym,this.updater=n||gm}or.prototype.isReactComponent={},or.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")},or.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function bm(){}bm.prototype=or.prototype;function Wu(t,e,n){this.props=t,this.context=e,this.refs=ym,this.updater=n||gm}var Uu=Wu.prototype=new bm;Uu.constructor=Wu,vm(Uu,or.prototype),Uu.isPureReactComponent=!0;var xm=Array.isArray,wm=Object.prototype.hasOwnProperty,Yu={current:null},Sm={key:!0,ref:!0,__self:!0,__source:!0};function Pm(t,e,n){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)wm.call(e,i)&&!Sm.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1>>1,j=F[I];if(0>>1;Ir(ee,K))Gr(He,ee)?(F[I]=He,F[G]=K,I=G):(F[I]=ee,F[H]=K,I=H);else if(Gr(He,K))F[I]=He,F[G]=K,I=G;else break e}}return z}function r(F,z){var K=F.sortIndex-z.sortIndex;return K!==0?K:F.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(F){for(var z=n(u);z!==null;){if(z.callback===null)i(u);else if(z.startTime<=F)i(u),z.sortIndex=z.expirationTime,e(l,z);else break;z=n(u)}}function S(F){if(v=!1,y(F),!g)if(n(l)!==null)g=!0,T(P);else{var z=n(u);z!==null&&L(S,z.startTime-F)}}function P(F,z){g=!1,v&&(v=!1,p(E),E=-1),h=!0;var K=f;try{for(y(z),d=n(l);d!==null&&(!(d.expirationTime>z)||F&&!R());){var I=d.callback;if(typeof I=="function"){d.callback=null,f=d.priorityLevel;var j=I(d.expirationTime<=z);z=t.unstable_now(),typeof j=="function"?d.callback=j:d===n(l)&&i(l),y(z)}else i(l);d=n(l)}if(d!==null)var Q=!0;else{var H=n(u);H!==null&&L(S,H.startTime-z),Q=!1}return Q}finally{d=null,f=K,h=!1}}var C=!1,M=null,E=-1,w=5,_=-1;function R(){return!(t.unstable_now()-_F||125I?(F.sortIndex=K,e(u,F),n(l)===null&&F===n(u)&&(v?(p(E),E=-1):v=!0,L(S,K-I))):(F.sortIndex=j,e(l,F),g||h||(g=!0,T(P))),F},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(F){var z=f;return function(){var K=f;f=z;try{return F.apply(this,arguments)}finally{f=K}}}})(Em),Cm.exports=Em;var b$=Cm.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 x$=x,vt=b$;function B(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;ne}return!1}function Je(t,e,n,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ve[t]=new Je(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ve[e]=new Je(e,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ve[t]=new Je(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ve[t]=new Je(t,2,!1,t,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(t){Ve[t]=new Je(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){Ve[t]=new Je(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){Ve[t]=new Je(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){Ve[t]=new Je(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){Ve[t]=new Je(t,5,!1,t.toLowerCase(),null,!1,!1)});var Zu=/[\-:]([a-z])/g;function Ju(t){return t[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(t){var e=t.replace(Zu,Ju);Ve[e]=new Je(e,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Zu,Ju);Ve[e]=new Je(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Zu,Ju);Ve[e]=new Je(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){Ve[t]=new Je(t,1,!1,t.toLowerCase(),null,!1,!1)}),Ve.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){Ve[t]=new Je(t,1,!1,t.toLowerCase(),null,!0,!0)});function ec(t,e,n,i){var r=Ve.hasOwnProperty(e)?Ve[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` `+r[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{lc=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ps(t):""}function $$(t){switch(t.tag){case 5:return ps(t.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return t=uc(t.type,!1),t;case 11:return t=uc(t.type.render,!1),t;case 1:return t=uc(t.type,!0),t;default:return""}}function cc(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ur:return"Fragment";case lr:return"Portal";case nc:return"Profiler";case tc:return"StrictMode";case rc:return"Suspense";case sc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Rm:return(t.displayName||"Context")+".Consumer";case Am:return(t._context.displayName||"Context")+".Provider";case ic:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case oc:return e=t.displayName||null,e!==null?e:cc(t.type)||"Memo";case In:e=t._payload,t=t._init;try{return cc(t(e))}catch(n){}}return null}function k$(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cc(e);case 8:return e===tc?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function On(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Om(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function T$(t){var e=Om(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function sa(t){t._valueTracker||(t._valueTracker=T$(t))}function Vm(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Om(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function oa(t){if(t=t||(typeof document!="undefined"?document:void 0),typeof t=="undefined")return null;try{return t.activeElement||t.body}catch(e){return t.body}}function dc(t,e){var n=e.checked;return xe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:t._wrapperState.initialChecked})}function Nm(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=On(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function zm(t,e){e=e.checked,e!=null&&ec(t,"checked",e,!1)}function fc(t,e){zm(t,e);var n=On(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?hc(t,e.type,n):e.hasOwnProperty("defaultValue")&&hc(t,e.type,On(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function jm(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function hc(t,e,n){(e!=="number"||oa(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ms=Array.isArray;function cr(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=aa.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function gs(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var vs={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},C$=["Webkit","ms","Moz","O"];Object.keys(vs).forEach(function(t){C$.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),vs[e]=vs[t]})});function Ym(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||vs.hasOwnProperty(t)&&vs[t]?(""+e).trim():e+"px"}function Gm(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Ym(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var E$=xe({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 gc(t,e){if(e){if(E$[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(B(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(B(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(B(61))}if(e.style!=null&&typeof e.style!="object")throw Error(B(62))}}function vc(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 yc=null;function bc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var xc=null,dr=null,fr=null;function Xm(t){if(t=Ns(t)){if(typeof xc!="function")throw Error(B(280));var e=t.stateNode;e&&(e=Ma(e),xc(t.stateNode,t.type,e))}}function qm(t){dr?fr?fr.push(t):fr=[t]:dr=t}function Qm(){if(dr){var t=dr,e=fr;if(fr=dr=null,Xm(t),e)for(t=0;t>>=0,t===0?32:31-(z$(t)/j$|0)|0}var fa=64,ha=4194304;function ws(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function pa(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=ws(a):(s&=o,s!==0&&(i=ws(s)))}else o=n&~r,o!==0?i=ws(o):s!==0&&(i=ws(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0n;n++)e.push(t);return e}function Ss(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-zt(e),t[e]=n}function W$(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0=Ms),$g=" ",kg=!1;function Tg(t,e){switch(t){case"keyup":return bk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var mr=!1;function wk(t,e){switch(t){case"compositionend":return Cg(e);case"keypress":return e.which!==32?null:(kg=!0,$g);case"textInput":return t=e.data,t===$g&&kg?null:t;default:return null}}function Sk(t,e){if(mr)return t==="compositionend"||!Vc&&Tg(t,e)?(t=bg(),ba=Lc=Bn=null,mr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fg(n)}}function Og(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Og(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Vg(){for(var t=window,e=oa();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch(i){n=!1}if(n)t=e.contentWindow;else break;e=oa(t.document)}return e}function jc(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Dk(t){var e=Vg(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Og(n.ownerDocument.documentElement,n)){if(i!==null&&jc(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=Ig(n,s);var o=Ig(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gr=null,Bc=null,Rs=null,Kc=!1;function Ng(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kc||gr==null||gr!==oa(i)||(i=gr,"selectionStart"in i&&jc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Rs&&As(Rs,i)||(Rs=i,i=Ta(Bc,"onSelect"),0wr||(t.current=td[wr],td[wr]=null,wr--)}function he(t,e){wr++,td[wr]=t.current,t.current=e}var Un={},We=Wn(Un),rt=Wn(!1),_i=Un;function Sr(t,e){var n=t.type.contextTypes;if(!n)return Un;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function st(t){return t=t.childContextTypes,t!=null}function Da(){ge(rt),ge(We)}function ev(t,e,n){if(We.current!==Un)throw Error(B(168));he(We,e),he(rt,n)}function tv(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(B(108,k$(t)||"Unknown",r));return xe({},n,i)}function La(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Un,_i=We.current,he(We,t),he(rt,rt.current),!0}function nv(t,e,n){var i=t.stateNode;if(!i)throw Error(B(169));n?(t=tv(t,e,_i),i.__reactInternalMemoizedMergedChildContext=t,ge(rt),ge(We),he(We,t)):ge(rt),he(rt,n)}var pn=null,Aa=!1,nd=!1;function iv(t){pn===null?pn=[t]:pn.push(t)}function Kk(t){Aa=!0,iv(t)}function Yn(){if(!nd&&pn!==null){nd=!0;var t=0,e=de;try{var n=pn;for(de=1;t>=o,r-=o,mn=1<<32-zt(e)+r|n<E?(w=M,M=null):w=M.sibling;var _=f(p,M,y[E],S);if(_===null){M===null&&(M=w);break}t&&M&&_.alternate===null&&e(p,M),m=s(_,m,E),C===null?P=_:C.sibling=_,C=_,M=w}if(E===y.length)return n(p,M),ye&&ki(p,E),P;if(M===null){for(;EE?(w=M,M=null):w=M.sibling;var R=f(p,M,_.value,S);if(R===null){M===null&&(M=w);break}t&&M&&R.alternate===null&&e(p,M),m=s(R,m,E),C===null?P=R:C.sibling=R,C=R,M=w}if(_.done)return n(p,M),ye&&ki(p,E),P;if(M===null){for(;!_.done;E++,_=y.next())_=d(p,_.value,S),_!==null&&(m=s(_,m,E),C===null?P=_:C.sibling=_,C=_);return ye&&ki(p,E),P}for(M=i(p,M);!_.done;E++,_=y.next())_=h(M,p,E,_.value,S),_!==null&&(t&&_.alternate!==null&&M.delete(_.key===null?E:_.key),m=s(_,m,E),C===null?P=_:C.sibling=_,C=_);return t&&M.forEach(function(k){return e(p,k)}),ye&&ki(p,E),P}function b(p,m,y,S){if(typeof y=="object"&&y!==null&&y.type===ur&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ra:e:{for(var P=y.key,C=m;C!==null;){if(C.key===P){if(P=y.type,P===ur){if(C.tag===7){n(p,C.sibling),m=r(C,y.props.children),m.return=p,p=m;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===In&&uv(P)===C.type){n(p,C.sibling),m=r(C,y.props),m.ref=zs(p,C,y),m.return=p,p=m;break e}n(p,C);break}else e(p,C);C=C.sibling}y.type===ur?(m=Ri(y.props.children,p.mode,S,y.key),m.return=p,p=m):(S=al(y.type,y.key,y.props,null,p.mode,S),S.ref=zs(p,m,y),S.return=p,p=S)}return o(p);case lr:e:{for(C=y.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(p,m.sibling),m=r(m,y.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else e(p,m);m=m.sibling}m=Jd(y,p.mode,S),m.return=p,p=m}return o(p);case In:return C=y._init,b(p,m,C(y._payload),S)}if(ms(y))return g(p,m,y,S);if(hs(y))return v(p,m,y,S);Oa(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(p,m.sibling),m=r(m,y),m.return=p,p=m):(n(p,m),m=Zd(y,p.mode,S),m.return=p,p=m),o(p)):n(p,m)}return b}var kr=cv(!0),dv=cv(!1),Va=Wn(null),Na=null,Tr=null,ld=null;function ud(){ld=Tr=Na=null}function cd(t){var e=Va.current;ge(Va),t._currentValue=e}function dd(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Cr(t,e){Na=t,ld=Tr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ot=!0),t.firstContext=null)}function Ct(t){var e=t._currentValue;if(ld!==t)if(t={context:t,memoizedValue:e,next:null},Tr===null){if(Na===null)throw Error(B(308));Tr=t,Na.dependencies={lanes:0,firstContext:t}}else Tr=Tr.next=t;return e}var Ti=null;function fd(t){Ti===null?Ti=[t]:Ti.push(t)}function fv(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,fd(e)):(n.next=r.next,r.next=n),e.interleaved=n,vn(t,i)}function vn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Gn=!1;function hd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hv(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function yn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Xn(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,re&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,vn(t,n)}return r=i.interleaved,r===null?(e.next=e,fd(i)):(e.next=r.next,r.next=e),i.interleaved=e,vn(t,n)}function za(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Tc(t,n)}}function pv(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function ja(t,e,n,i){var r=t.updateQueue;Gn=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=r.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((i&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,v=a;switch(f=e,h=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=xe({},d,f);break e;case 2:Gn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=r.effects,f===null?r.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(!0);if(c===null&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);Mi|=o,t.lanes=o,t.memoizedState=d}}function mv(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var i=yd.transition;yd.transition={};try{t(!1),e()}finally{de=n,yd.transition=i}}function Rv(){return Et().memoizedState}function Yk(t,e,n){var i=Jn(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Fv(t))Iv(e,n);else if(n=fv(t,e,n,i),n!==null){var r=tt();Ut(n,t,i,r),Ov(n,e,i)}}function Gk(t,e,n){var i=Jn(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fv(t))Iv(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,jt(a,o)){var l=e.interleaved;l===null?(r.next=r,fd(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch(u){}finally{}n=fv(t,e,r,i),n!==null&&(r=tt(),Ut(n,t,i,r),Ov(n,e,i))}}function Fv(t){var e=t.alternate;return t===Se||e!==null&&e===Se}function Iv(t,e){Hs=Ha=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ov(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Tc(t,n)}}var Ya={readContext:Ct,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},Xk={readContext:Ct,useCallback:function(t,e){return Jt().memoizedState=[t,e===void 0?null:e],t},useContext:Ct,useEffect:kv,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Wa(4194308,4,Ev.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Wa(4194308,4,t,e)},useInsertionEffect:function(t,e){return Wa(4,2,t,e)},useMemo:function(t,e){var n=Jt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=Jt();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=Yk.bind(null,Se,t),[i.memoizedState,t]},useRef:function(t){var e=Jt();return t={current:t},e.memoizedState=t},useState:_v,useDebugValue:$d,useDeferredValue:function(t){return Jt().memoizedState=t},useTransition:function(){var t=_v(!1),e=t[0];return t=Uk.bind(null,t[1]),Jt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=Se,r=Jt();if(ye){if(n===void 0)throw Error(B(407));n=n()}else{if(n=e(),Re===null)throw Error(B(349));Ei&30||bv(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,kv(wv.bind(null,i,s,t),[t]),i.flags|=2048,Ys(9,xv.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=Jt(),e=Re.identifierPrefix;if(ye){var n=gn,i=mn;n=(i&~(1<<32-zt(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Ws++,0<\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=o.createElement(n,{is:i.is}):(t=o.createElement(n),n==="select"&&(o=t,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):t=o.createElementNS(t,n),t[Qt]=e,t[Vs]=i,iy(t,e,!1,!1),e.stateNode=t;e:{switch(o=vc(n,i),n){case"dialog":me("cancel",t),me("close",t),r=i;break;case"iframe":case"object":case"embed":me("load",t),r=i;break;case"video":case"audio":for(r=0;rAr&&(e.flags|=128,i=!0,Gs(s,!1),e.lanes=4194304)}else{if(!i)if(t=Ba(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Gs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ye)return Ye(e),null}else 2*ke()-s.renderingStartTime>Ar&&n!==1073741824&&(e.flags|=128,i=!0,Gs(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ke(),e.sibling=null,n=we.current,he(we,i?n&1|2:n&1),e):(Ye(e),null);case 22:case 23:return Xd(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?wt&1073741824&&(Ye(e),e.subtreeFlags&6&&(e.flags|=8192)):Ye(e),null;case 24:return null;case 25:return null}throw Error(B(156,e.tag))}function iT(t,e){switch(rd(e),e.tag){case 1:return st(e.type)&&Da(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Er(),ge(rt),ge(We),vd(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return md(e),null;case 13:if(ge(we),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(B(340));$r()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ge(we),null;case 4:return Er(),null;case 10:return cd(e.type._context),null;case 22:case 23:return Xd(),null;case 24:return null;default:return null}}var Qa=!1,Ge=!1,rT=typeof WeakSet=="function"?WeakSet:Set,U=null;function Dr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){_e(t,e,i)}else n.current=null}function Od(t,e,n){try{n()}catch(i){_e(t,e,i)}}var oy=!1;function sT(t,e){if(Xc=va,t=Vg(),jc(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch(S){n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===r&&(a=o),f===s&&++c===i&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(qc={focusedElem:t,selectionRange:n},va=!1,U=e;U!==null;)if(e=U,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,U=t;else for(;U!==null;){e=U;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,b=g.memoizedState,p=e.stateNode,m=p.getSnapshotBeforeUpdate(e.elementType===e.type?v:Kt(e.type,v),b);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=e.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(S){_e(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,U=t;break}U=e.return}return g=oy,oy=!1,g}function Xs(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&Od(e,n,s)}r=r.next}while(r!==i)}}function Za(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function Vd(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ay(t){var e=t.alternate;e!==null&&(t.alternate=null,ay(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Qt],delete e[Vs],delete e[ed],delete e[jk],delete e[Bk])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ly(t){return t.tag===5||t.tag===3||t.tag===4}function uy(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ly(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Nd(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Ea));else if(i!==4&&(t=t.child,t!==null))for(Nd(t,e,n),t=t.sibling;t!==null;)Nd(t,e,n),t=t.sibling}function zd(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(zd(t,e,n),t=t.sibling;t!==null;)zd(t,e,n),t=t.sibling}var Ne=null,Ht=!1;function qn(t,e,n){for(n=n.child;n!==null;)cy(t,e,n),n=n.sibling}function cy(t,e,n){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(da,n)}catch(a){}switch(n.tag){case 5:Ge||Dr(n,e);case 6:var i=Ne,r=Ht;Ne=null,qn(t,e,n),Ne=i,Ht=r,Ne!==null&&(Ht?(t=Ne,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ne.removeChild(n.stateNode));break;case 18:Ne!==null&&(Ht?(t=Ne,n=n.stateNode,t.nodeType===8?Jc(t.parentNode,n):t.nodeType===1&&Jc(t,n),Ts(t)):Jc(Ne,n.stateNode));break;case 4:i=Ne,r=Ht,Ne=n.stateNode.containerInfo,Ht=!0,qn(t,e,n),Ne=i,Ht=r;break;case 0:case 11:case 14:case 15:if(!Ge&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Od(n,e,o),r=r.next}while(r!==i)}qn(t,e,n);break;case 1:if(!Ge&&(Dr(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){_e(n,e,a)}qn(t,e,n);break;case 21:qn(t,e,n);break;case 22:n.mode&1?(Ge=(i=Ge)||n.memoizedState!==null,qn(t,e,n),Ge=i):qn(t,e,n);break;default:qn(t,e,n)}}function dy(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new rT),e.forEach(function(i){var r=pT.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Wt(t,e){var n=e.deletions;if(n!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=ke()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*aT(i/1960))-i,10t?16:t,Zn===null)var i=!1;else{if(t=Zn,Zn=null,il=0,re&6)throw Error(B(331));var r=re;for(re|=4,U=t.current;U!==null;){var s=U,o=s.child;if(U.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lke()-Kd?Li(t,0):Bd|=n),lt(t,e)}function _y(t,e){e===0&&(t.mode&1?(e=ha,ha<<=1,!(ha&130023424)&&(ha=4194304)):e=1);var n=tt();t=vn(t,e),t!==null&&(Ss(t,e,n),lt(t,n))}function hT(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),_y(t,n)}function pT(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(B(314))}i!==null&&i.delete(e),_y(t,n)}var $y;$y=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||rt.current)ot=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ot=!1,tT(t,e,n);ot=!!(t.flags&131072)}else ot=!1,ye&&e.flags&1048576&&rv(e,Fa,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;qa(t,e),t=e.pendingProps;var r=Sr(e,We.current);Cr(e,n),r=xd(null,e,i,t,r,n);var s=wd();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,st(i)?(s=!0,La(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,hd(e),r.updater=Ga,e.stateNode=r,r._reactInternals=e,Td(e,i,t,n),e=Dd(null,e,i,!0,s,n)):(e.tag=0,ye&&s&&id(e),et(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(qa(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=gT(i),t=Kt(i,t),r){case 0:e=Md(null,e,i,t,n);break e;case 1:e=Qv(null,e,i,t,n);break e;case 11:e=Uv(null,e,i,t,n);break e;case 14:e=Yv(null,e,i,Kt(i.type,t),n);break e}throw Error(B(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),Md(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),Qv(t,e,i,r,n);case 3:e:{if(Zv(e),t===null)throw Error(B(387));i=e.pendingProps,s=e.memoizedState,r=s.element,hv(t,e),ja(e,i,null,n);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Mr(Error(B(423)),e),e=Jv(t,e,i,n,r);break e}else if(i!==r){r=Mr(Error(B(424)),e),e=Jv(t,e,i,n,r);break e}else for(xt=Hn(e.stateNode.containerInfo.firstChild),bt=e,ye=!0,Bt=null,n=dv(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),i===r){e=bn(t,e,n);break e}et(t,e,i,n)}e=e.child}return e;case 5:return gv(e),t===null&&od(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,Qc(i,r)?o=null:s!==null&&Qc(i,s)&&(e.flags|=32),qv(t,e),et(t,e,o,n),e.child;case 6:return t===null&&od(e),null;case 13:return ey(t,e,n);case 4:return pd(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=kr(e,null,i,n):et(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),Uv(t,e,i,r,n);case 7:return et(t,e,e.pendingProps,n),e.child;case 8:return et(t,e,e.pendingProps.children,n),e.child;case 12:return et(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,he(Va,i._currentValue),i._currentValue=o,s!==null)if(jt(s.value,o)){if(s.children===r.children&&!rt.current){e=bn(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=yn(-1,n&-n),l.tag=2;var u=s.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}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),dd(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),dd(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}et(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Cr(e,n),r=Ct(r),i=i(r),e.flags|=1,et(t,e,i,n),e.child;case 14:return i=e.type,r=Kt(i,e.pendingProps),r=Kt(i.type,r),Yv(t,e,i,r,n);case 15:return Gv(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),qa(t,e),e.tag=1,st(i)?(t=!0,La(e)):t=!1,Cr(e,n),Nv(e,i,r),Td(e,i,r,n),Dd(null,e,i,!0,t,n);case 19:return ny(t,e,n);case 22:return Xv(t,e,n)}throw Error(B(156,e.tag))};function ky(t,e){return sg(t,e)}function mT(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(t,e,n,i){return new mT(t,e,n,i)}function Qd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function gT(t){if(typeof t=="function")return Qd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ic)return 11;if(t===oc)return 14}return 2}function ti(t,e){var n=t.alternate;return n===null?(n=Dt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function al(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")Qd(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ur:return Ri(n.children,r,s,e);case tc:o=8,r|=8;break;case nc:return t=Dt(12,n,e,r|2),t.elementType=nc,t.lanes=s,t;case rc:return t=Dt(13,n,e,r),t.elementType=rc,t.lanes=s,t;case sc:return t=Dt(19,n,e,r),t.elementType=sc,t.lanes=s,t;case Fm:return ll(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Am:o=10;break e;case Rm:o=9;break e;case ic:o=11;break e;case oc:o=14;break e;case In:o=16,i=null;break e}throw Error(B(130,t==null?t:typeof t,""))}return e=Dt(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function Ri(t,e,n,i){return t=Dt(7,t,i,e),t.lanes=n,t}function ll(t,e,n,i){return t=Dt(22,t,i,e),t.elementType=Fm,t.lanes=n,t.stateNode={isHidden:!1},t}function Zd(t,e,n){return t=Dt(6,t,null,e),t.lanes=n,t}function Jd(t,e,n){return e=Dt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function vT(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kc(0),this.expirationTimes=kc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kc(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function ef(t,e,n,i,r,s,o,a,l){return t=new vT(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Dt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hd(s),t}function yT(t,e,n){var i=3{var l;const i=Ry[n]||"left",r=new Intl.NumberFormat(e,{style:"decimal",maximumFractionDigits:0}).format(t<0?0:t),a=((l=new Intl.NumberFormat(e,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(t).find(u=>u.type==="currency"))==null?void 0:l.value)||"";return A.jsxs("span",{children:[i==="left"&&a&&A.jsxs("span",{children:[n==="AUD"?"AU$":a," "]}),A.jsx("span",{children:r}),i==="right"&&a&&A.jsx("span",{children:a})]})},PT=({value:t,locale:e="US",currency:n="USD"})=>{var l;const i=Ry[n]||"left",r=new Intl.NumberFormat(e,{style:"decimal",maximumFractionDigits:0}).format(t<0?0:t),a=((l=new Intl.NumberFormat(e,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(t).find(u=>u.type==="currency"))==null?void 0:l.value)||"";return A.jsxs("span",{className:"flex items-start justify-center text-center",children:[i==="left"&&a&&A.jsx("span",{className:"flex-start items-start text-display-5 sm:text-display-3 mr-2",children:n==="AUD"?"AU$":a}),A.jsx("span",{children:r}),i==="right"&&a&&A.jsx("span",{className:"flex-start",children:a})]})};function _T(t){if(typeof Proxy=="undefined")return t;const e=new Map,n=(...i)=>t(...i);return new Proxy(n,{get:(i,r)=>r==="create"?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}function gl(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const of=t=>Array.isArray(t);function Fy(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function af(t,e,n,i){if(typeof e=="function"){const[r,s]=Iy(i);e=e(n!==void 0?n:t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=Iy(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function vl(t,e,n){const i=t.getProps();return af(i,e,n!==void 0?n:i.custom,t)}const lf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uf=["initial",...lf],to=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fi=new Set(to),wn=t=>t*1e3,Sn=t=>t/1e3,$T={type:"spring",stiffness:500,damping:25,restSpeed:10},kT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),TT={type:"keyframes",duration:.8},CT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ET=(t,{keyframes:e})=>e.length>2?TT:Fi.has(t)?t.startsWith("scale")?kT(e[1]):$T:CT;function cf(t,e){return t?t[e]||t.default||t:void 0}const MT={skipAnimations:!1,useManualTiming:!1},DT=t=>t!==null;function yl(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(DT),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const je=t=>t;function LT(t){let e=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,d=!1)=>{const h=d&&i?e:n;return c&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,i){r=!0;return}i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(u))}};return l}const bl=["read","resolveKeyframes","update","preRender","render","postRender"],AT=40;function Oy(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=bl.reduce((p,m)=>(p[m]=LT(s),p),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=o,h=()=>{const p=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(p-r.timestamp,AT),1),r.timestamp=p,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),c.process(r),d.process(r),f.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(h))},g=()=>{n=!0,i=!0,r.isProcessing||t(h)};return{schedule:bl.reduce((p,m)=>{const y=o[m];return p[m]=(S,P=!1,C=!1)=>(n||g(),y.schedule(S,P,C)),p},{}),cancel:p=>{for(let m=0;m(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,RT=1e-7,FT=12;function IT(t,e,n,i,r){let s,o,a=0;do o=e+(n-e)/2,s=Vy(o,i,r)-t,s>0?n=o:e=o;while(Math.abs(s)>RT&&++aIT(s,0,1,t,n);return s=>s===0||s===1?s:Vy(r(s),e,i)}const Ny=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zy=t=>e=>1-t(1-e),jy=no(.33,1.53,.69,.99),ff=zy(jy),By=Ny(ff),Ky=t=>(t*=2)<1?.5*ff(t):.5*(2-Math.pow(2,-10*(t-1))),hf=t=>1-Math.sin(Math.acos(t)),Hy=zy(hf),Wy=Ny(hf),Uy=t=>/^0[^.\s]+$/u.test(t);function OT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Uy(t):!0}let VT=je,pf=je;const Yy=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Gy=t=>e=>typeof e=="string"&&e.startsWith(t),Xy=Gy("--"),NT=Gy("var(--"),mf=t=>NT(t)?zT.test(t.split("/*")[0].trim()):!1,zT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BT(t){const e=jT.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n!=null?n:i}`,r]}function qy(t,e,n=1){const[i,r]=BT(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return Yy(o)?parseFloat(o):o}return mf(r)?qy(r,e,n+1):r}const ni=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},io=N($({},Fr),{transform:t=>ni(0,1,t)}),xl=N($({},Fr),{default:1}),ro=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ii=ro("deg"),nn=ro("%"),X=ro("px"),KT=ro("vh"),HT=ro("vw"),Qy=N($({},nn),{parse:t=>nn.parse(t)/100,transform:t=>nn.transform(t*100)}),WT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Zy=t=>t===Fr||t===X,Jy=(t,e)=>parseFloat(t.split(", ")[e]),e0=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Jy(r[1],e);{const s=i.match(/^matrix\((.+)\)$/u);return s?Jy(s[1],t):0}},UT=new Set(["x","y","z"]),YT=to.filter(t=>!UT.has(t));function GT(t){const e=[];return YT.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Ir={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:e0(4,13),y:e0(5,14)};Ir.translateX=Ir.x,Ir.translateY=Ir.y;const t0=t=>e=>e.test(t),n0=[Fr,X,nn,ii,HT,KT,{test:t=>t==="auto",parse:t=>t}],i0=t=>n0.find(t0(t)),Ii=new Set;let gf=!1,vf=!1;function r0(){if(vf){const t=Array.from(Ii).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=GT(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,o])=>{var a;(a=i.getValue(s))===null||a===void 0||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}vf=!1,gf=!1,Ii.forEach(t=>t.complete()),Ii.clear()}function s0(){Ii.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vf=!0)})}function XT(){s0(),r0()}class yf{constructor(e,n,i,r,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ii.add(this),gf||(gf=!0,se.read(s0),se.resolveKeyframes(r0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;for(let s=0;sMath.round(t*1e5)/1e5,bf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qT(t){return t==null}const QT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xf=(t,e)=>n=>!!(typeof n=="string"&&QT.test(n)&&n.startsWith(t)||e&&!qT(n)&&Object.prototype.hasOwnProperty.call(n,e)),o0=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,s,o,a]=i.match(bf);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ZT=t=>ni(0,255,t),wf=N($({},Fr),{transform:t=>Math.round(ZT(t))}),Oi={test:xf("rgb","red"),parse:o0("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+wf.transform(t)+", "+wf.transform(e)+", "+wf.transform(n)+", "+so(io.transform(i))+")"};function JT(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Sf={test:xf("#"),parse:JT,transform:Oi.transform},Or={test:xf("hsl","hue"),parse:o0("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+nn.transform(so(e))+", "+nn.transform(so(n))+", "+so(io.transform(i))+")"},Xe={test:t=>Oi.test(t)||Sf.test(t)||Or.test(t),parse:t=>Oi.test(t)?Oi.parse(t):Or.test(t)?Or.parse(t):Sf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Oi.transform(t):Or.transform(t)},eC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tC(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(bf))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(eC))===null||n===void 0?void 0:n.length)||0)>0}const a0="number",l0="color",nC="var",iC="var(",u0="${}",rC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function oo(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(rC,l=>(Xe.test(l)?(i.color.push(s),r.push(l0),n.push(Xe.parse(l))):l.startsWith(iC)?(i.var.push(s),r.push(nC),n.push(l)):(i.number.push(s),r.push(a0),n.push(parseFloat(l))),++s,u0)).split(u0);return{values:n,split:a,indexes:i,types:r}}function c0(t){return oo(t).values}function d0(t){const{split:e,types:n}=oo(t),i=e.length;return r=>{let s="";for(let o=0;otypeof t=="number"?0:t;function oC(t){const e=c0(t);return d0(t)(e.map(sC))}const ri={test:tC,parse:c0,createTransformer:d0,getAnimatableNone:oC},aC=new Set(["brightness","contrast","saturate","opacity"]);function lC(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(bf)||[];if(!i)return t;const r=n.replace(i,"");let s=aC.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const uC=/\b([a-z-]*)\(.*?\)/gu,Pf=N($({},ri),{getAnimatableNone:t=>{const e=t.match(uC);return e?e.map(lC).join(" "):t}}),cC={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},dC={rotate:ii,rotateX:ii,rotateY:ii,rotateZ:ii,scale:xl,scaleX:xl,scaleY:xl,scaleZ:xl,skew:ii,skewX:ii,skewY:ii,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:io,originX:Qy,originY:Qy,originZ:X},f0=N($({},Fr),{transform:Math.round}),_f=N($($({},cC),dC),{zIndex:f0,size:X,fillOpacity:io,strokeOpacity:io,numOctaves:f0}),fC=N($({},_f),{color:Xe,backgroundColor:Xe,outlineColor:Xe,fill:Xe,stroke:Xe,borderColor:Xe,borderTopColor:Xe,borderRightColor:Xe,borderBottomColor:Xe,borderLeftColor:Xe,filter:Pf,WebkitFilter:Pf}),$f=t=>fC[t];function h0(t,e){let n=$f(t);return n!==Pf&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const hC=new Set(["auto","none","0"]);function pC(t,e,n){let i=0,r;for(;i{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function kf(t){return typeof t=="function"}let wl;function mC(){wl=void 0}const rn={now:()=>(wl===void 0&&rn.set(Fe.isProcessing||MT.useManualTiming?Fe.timestamp:performance.now()),wl),set:t=>{wl=t,queueMicrotask(mC)}},m0=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ri.test(t)||t==="0")&&!t.startsWith("url("));function gC(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nyC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&XT(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=rn.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!vC(e,i,r,s))if(o)this.options.duration=0;else{l==null||l(yl(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved=$({keyframes:e,finalKeyframe:n},c),this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Tf(t,e){return e?t*(1e3/e):0}const bC=5;function v0(t,e,n){const i=Math.max(e-bC,0);return Tf(n-t(i),e-i)}const Cf=.001,xC=.01,wC=10,SC=.05,PC=1;function _C({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,s,o=1-e;o=ni(SC,PC,o),t=ni(xC,wC,Sn(t)),o<1?(r=u=>{const c=u*o,d=c*t,f=c-n,h=Ef(u,o),g=Math.exp(-d);return Cf-f/h*g},s=u=>{const d=u*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*t,g=Math.exp(-d),v=Ef(Math.pow(u,2),o);return(-r(u)+Cf>0?-1:1)*((f-h)*g)/v}):(r=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-Cf+c*d},s=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=kC(r,s,a);if(t=wn(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:t}}}const $C=12;function kC(t,e,n){let i=n;for(let r=1;r<$C;r++)i=i-t(i)/e(i);return i}function Ef(t,e){return t*Math.sqrt(1-e*e)}const TC=["duration","bounce"],CC=["stiffness","damping","mass"];function y0(t,e){return e.some(n=>t[n]!==void 0)}function EC(t){let e=$({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!y0(t,CC)&&y0(t,TC)){const n=_C(t);e=N($($({},e),n),{mass:1}),e.isResolvedFromDuration=!0}return e}function b0(r){var s=r,{keyframes:t,restDelta:e,restSpeed:n}=s,i=ne(s,["keyframes","restDelta","restSpeed"]);const o=t[0],a=t[t.length-1],l={done:!1,value:o},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:g}=EC(N($({},i),{velocity:-Sn(i.velocity||0)})),v=h||0,b=c/(2*Math.sqrt(u*d)),p=a-o,m=Sn(Math.sqrt(u/d)),y=Math.abs(p)<5;n||(n=y?.01:2),e||(e=y?.005:.5);let S;if(b<1){const P=Ef(m,b);S=C=>{const M=Math.exp(-b*m*C);return a-M*((v+b*m*p)/P*Math.sin(P*C)+p*Math.cos(P*C))}}else if(b===1)S=P=>a-Math.exp(-m*P)*(p+(v+m*p)*P);else{const P=m*Math.sqrt(b*b-1);S=C=>{const M=Math.exp(-b*m*C),E=Math.min(P*C,300);return a-M*((v+b*m*p)*Math.sinh(E)+P*p*Math.cosh(E))/P}}return{calculatedDuration:g&&f||null,next:P=>{const C=S(P);if(g)l.done=P>=f;else{let M=0;b<1&&(M=P===0?wn(v):v0(S,P,C));const E=Math.abs(M)<=n,w=Math.abs(a-C)<=e;l.done=E&&w}return l.value=l.done?a:C,l}}}function x0({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=E=>a!==void 0&&El,g=E=>a===void 0?l:l===void 0||Math.abs(a-E)-v*Math.exp(-E/i),y=E=>p+m(E),S=E=>{const w=m(E),_=y(E);f.done=Math.abs(w)<=u,f.value=f.done?p:_};let P,C;const M=E=>{h(f.value)&&(P=E,C=b0({keyframes:[f.value,g(f.value)],velocity:v0(y,E,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:E=>{let w=!1;return!C&&P===void 0&&(w=!0,S(E),M(E)),P!==void 0&&E>=P?C.next(E-P):(!w&&S(E),f)}}}const MC=no(.42,0,1,1),DC=no(0,0,.58,1),w0=no(.42,0,.58,1),LC=t=>Array.isArray(t)&&typeof t[0]!="number",Mf=t=>Array.isArray(t)&&typeof t[0]=="number",S0={linear:je,easeIn:MC,easeInOut:w0,easeOut:DC,circIn:hf,circInOut:Wy,circOut:Hy,backIn:ff,backInOut:By,backOut:jy,anticipate:Ky},P0=t=>{if(Mf(t)){pf(t.length===4);const[e,n,i,r]=t;return no(e,n,i,r)}else if(typeof t=="string")return pf(S0[t]!==void 0),S0[t];return t},AC=(t,e)=>n=>e(t(n)),Pn=(...t)=>t.reduce(AC),Vi=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},Pe=(t,e,n)=>t+(e-t)*n;function Df(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function RC({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,s=0,o=0;if(!e)r=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=Df(l,a,t+1/3),s=Df(l,a,t),o=Df(l,a,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function Sl(t,e){return n=>n>0?e:t}const Lf=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},FC=[Sf,Oi,Or],IC=t=>FC.find(e=>e.test(t));function _0(t){const e=IC(t);if(!e)return!1;let n=e.parse(t);return e===Or&&(n=RC(n)),n}const $0=(t,e)=>{const n=_0(t),i=_0(e);if(!n||!i)return Sl(t,e);const r=$({},n);return s=>(r.red=Lf(n.red,i.red,s),r.green=Lf(n.green,i.green,s),r.blue=Lf(n.blue,i.blue,s),r.alpha=Pe(n.alpha,i.alpha,s),Oi.transform(r))},Af=new Set(["none","hidden"]);function OC(t,e){return Af.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function VC(t,e){return n=>Pe(t,e,n)}function Rf(t){return typeof t=="number"?VC:typeof t=="string"?mf(t)?Sl:Xe.test(t)?$0:jC:Array.isArray(t)?k0:typeof t=="object"?Xe.test(t)?$0:NC:Sl}function k0(t,e){const n=[...t],i=n.length,r=t.map((s,o)=>Rf(s)(s,e[o]));return s=>{for(let o=0;o{for(const s in i)n[s]=i[s](r);return n}}function zC(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s{const n=ri.createTransformer(e),i=oo(t),r=oo(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Af.has(t)&&!r.values.length||Af.has(e)&&!i.values.length?OC(t,e):Pn(k0(zC(i,r),r.values),n):Sl(t,e)};function T0(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Pe(t,e,n):Rf(t)(t,e)}function BC(t,e,n){const i=[],r=n||T0,s=t.length-1;for(let o=0;oe[0];if(s===2&&t[0]===t[1])return()=>e[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=BC(e,i,r),a=o.length,l=u=>{let c=0;if(a>1)for(;cl(ni(t[0],t[s-1],u)):l}function KC(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Vi(0,e,i);t.push(Pe(n,1,r))}}function E0(t){const e=[0];return KC(e,t.length-1),e}function HC(t,e){return t.map(n=>n*e)}function WC(t,e){return t.map(()=>e||w0).splice(0,t.length-1)}function Pl({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=LC(i)?i.map(P0):P0(i),s={done:!1,value:e[0]},o=HC(n&&n.length===e.length?n:E0(e),t),a=C0(o,e,{ease:Array.isArray(r)?r:WC(e,r)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const M0=2e4;function UC(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e=M0?1/0:e}const YC=t=>{const e=({timestamp:n})=>t(n);return{start:()=>se.update(e,!0),stop:()=>tn(e),now:()=>Fe.isProcessing?Fe.timestamp:rn.now()}},GC={decay:x0,inertia:x0,tween:Pl,keyframes:Pl,spring:b0},XC=t=>t/100;class Ff extends g0{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:i,element:r,keyframes:s}=this.options,o=(r==null?void 0:r.KeyframeResolver)||yf,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,i,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=this.options,a=kf(n)?n:GC[n]||Pl;let l,u;a!==Pl&&typeof e[0]!="number"&&(l=Pn(XC,T0(e[0],e[1])),e=[0,100]);const c=a(N($({},this.options),{keyframes:e}));s==="mirror"&&(u=a(N($({},this.options),{keyframes:[...e].reverse(),velocity:-o}))),c.calculatedDuration===null&&(c.calculatedDuration=UC(c));const{calculatedDuration:d}=c,f=d+r,h=f*(i+1)-r;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:i}=this;if(!i){const{keyframes:E}=this.options;return{done:!0,value:E[E.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=i;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:g,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),m=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,S=s;if(h){const E=Math.min(this.currentTime,c)/d;let w=Math.floor(E),_=E%1;!_&&E>=1&&(_=1),_===1&&w--,w=Math.min(w,h+1),!!(w%2)&&(g==="reverse"?(_=1-_,v&&(_-=v/d)):g==="mirror"&&(S=o)),y=ni(0,1,_)*d}const P=m?{done:!1,value:l[0]}:S.next(y);a&&(P.value=a(P.value));let{done:C}=P;!m&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&r!==void 0&&(P.value=yl(l,this.options,r)),b&&b(P.value),M&&this.finish(),P}get duration(){const{resolved:e}=this;return e?Sn(e.calculatedDuration):0}get time(){return Sn(this.currentTime)}set time(e){e=wn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Sn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=YC,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=i!=null?i:this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const qC=new Set(["opacity","clipPath","filter","transform"]),QC=10,ZC=(t,e)=>{let n="";const i=Math.max(Math.round(e/QC),2);for(let r=0;r(e===void 0&&(e=t()),e)}const JC={linearEasing:void 0};function eE(t,e){const n=If(t);return()=>{var i;return(i=JC[e])!==null&&i!==void 0?i:n()}}const _l=eE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");function D0(t){return!!(typeof t=="function"&&_l()||!t||typeof t=="string"&&(t in Of||_l())||Mf(t)||Array.isArray(t)&&t.every(D0))}const ao=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Of={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ao([0,.65,.55,1]),circOut:ao([.55,0,1,.45]),backIn:ao([.31,.01,.66,-.59]),backOut:ao([.33,1.53,.69,.99])};function L0(t,e){if(t)return typeof t=="function"&&_l()?ZC(t,e):Mf(t)?ao(t):Array.isArray(t)?t.map(n=>L0(n,e)||Of.easeOut):Of[t]}function tE(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=L0(a,r);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function A0(t,e){t.timeline=e,t.onfinish=null}const nE=If(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$l=10,iE=2e4;function rE(t){return kf(t.type)||t.type==="spring"||!D0(t.ease)}function sE(t,e){const n=new Ff(N($({},e),{keyframes:t,repeat:0,delay:0,isGenerator:!0}));let i={done:!1,value:t[0]};const r=[];let s=0;for(;!i.done&&sthis.onKeyframesResolved(o,a),n,i,r),this.resolver.scheduleResolve()}initPlayback(e,n){var i;let{duration:r=300,times:s,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((i=l.owner)===null||i===void 0)&&i.current))return!1;if(typeof o=="string"&&_l()&&oE(o)&&(o=R0[o]),rE(this.options)){const f=this.options,{onComplete:h,onUpdate:g,motionValue:v,element:b}=f,p=ne(f,["onComplete","onUpdate","motionValue","element"]),m=sE(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),r=m.duration,s=m.times,o=m.ease,a="keyframes"}const d=tE(l.owner.current,u,e,N($({},this.options),{duration:r,times:s,ease:o}));return d.startTime=c!=null?c:this.calcStartTime(),this.pendingTimeline?(A0(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;l.set(yl(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:s,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Sn(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Sn(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=wn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return je;const{animation:i}=n;A0(i,e)}return je}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:i,duration:r,type:s,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const u=this.options,{motionValue:c,onUpdate:d,onComplete:f,element:h}=u,g=ne(u,["motionValue","onUpdate","onComplete","element"]),v=new Ff(N($({},g),{keyframes:i,duration:r,type:s,ease:o,times:a,isGenerator:!0})),b=wn(this.time);c.setWithVelocity(v.sample(b-$l).value,v.sample(b).value,$l)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:o,type:a}=e;return nE()&&i&&qC.has(i)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}}const I0=If(()=>window.ScrollTimeline!==void 0);class aE{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;iI0()&&r.attachTimeline?r.attachTimeline(e):n(r));return()=>{i.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function lE(d){var f=d,{when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u}=f,c=ne(f,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(c).length}const Vf=(t,e,n,i={},r,s)=>o=>{const a=cf(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-wn(l);let c=N($({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity()},a),{delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r});lE(a)||(c=$($({},c),ET(t,c))),c.duration&&(c.duration=wn(c.duration)),c.repeatDelay&&(c.repeatDelay=wn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!s&&e.get()!==void 0){const f=yl(c.keyframes,a);if(f!==void 0)return se.update(()=>{c.onUpdate(f),c.onComplete()}),new aE([])}return!s&&F0.supports(c)?new F0(c):new Ff(c)},uE=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),cE=t=>of(t)?t[t.length-1]||0:t;function Nf(t,e){t.indexOf(e)===-1&&t.push(e)}function zf(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class jf{constructor(){this.subscriptions=[]}add(e){return Nf(this.subscriptions,e),()=>zf(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let s=0;s!isNaN(parseFloat(t));class fE{constructor(e,n={}){this.version="11.11.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=rn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=rn.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new jf);const i=this.events[e].add(n);return e==="change"?()=>{i(),se.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=rn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>O0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,O0);return Tf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _n(t,e){return new fE(t,e)}function hE(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,_n(n))}function pE(t,e){let o=vl(t,e)||{},{transitionEnd:i={},transition:r={}}=o,s=ne(o,["transitionEnd","transition"]);s=$($({},s),i);for(const a in s){const l=cE(s[a]);hE(t,a,l)}}const Bf=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),V0="data-"+Bf("framerAppearId");function N0(t){return t.props[V0]}const qe=t=>!!(t&&t.getVelocity);function mE(t){return!!(qe(t)&&t.add)}function Kf(t,e){const n=t.getValue("willChange");if(mE(n))return n.add(e)}function gE({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function z0(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var s;let d=e,{transition:o=t.getDefaultTransition(),transitionEnd:a}=d,l=ne(d,["transition","transitionEnd"]);i&&(o=i);const u=[],c=r&&t.animationState&&t.animationState.getState()[r];for(const f in l){const h=t.getValue(f,(s=t.latestValues[f])!==null&&s!==void 0?s:null),g=l[f];if(g===void 0||c&&gE(c,f))continue;const v=$({delay:n},cf(o||{},f));let b=!1;if(window.MotionHandoffAnimation){const m=N0(t);if(m){const y=window.MotionHandoffAnimation(m,f,se);y!==null&&(v.startTime=y,b=!0)}}Kf(t,f),h.start(Vf(f,h,g,t.shouldReduceMotion&&Fi.has(f)?{type:!1}:v,t,b));const p=h.animation;p&&u.push(p)}return a&&Promise.all(u).then(()=>{se.update(()=>{a&&pE(t,a)})}),u}function Hf(t,e,n={}){var i;const r=vl(t,e,n.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(z0(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return vE(t,e,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function vE(t,e,n=0,i=0,r=1,s){const o=[],a=(t.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(t.variantChildren).sort(yE).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Hf(u,e,N($({},s),{delay:n+l(c)})).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function yE(t,e){return t.sortNodePosition(e)}function bE(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>Hf(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=Hf(t,e,n);else{const r=typeof e=="function"?vl(t,e,n.custom):e;i=Promise.all(z0(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const xE=uf.length;function j0(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?j0(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:i})=>bE(t,n,i)))}function _E(t){let e=PE(t),n=B0(),i=!0;const r=l=>(u,c)=>{var d;const f=vl(t,c,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const h=f,{transition:g,transitionEnd:v}=h,b=ne(h,["transition","transitionEnd"]);u=$($($({},u),b),v)}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,c=j0(t.parent)||{},d=[],f=new Set;let h={},g=1/0;for(let b=0;bg&&S,w=!1;const _=Array.isArray(y)?y:[y];let R=_.reduce(r(p),{});P===!1&&(R={});const{prevResolvedValues:k={}}=m,O=$($({},k),R),D=L=>{E=!0,f.has(L)&&(w=!0,f.delete(L)),m.needsAnimating[L]=!0;const F=t.getValue(L);F&&(F.liveStyle=!1)};for(const L in O){const F=R[L],z=k[L];if(h.hasOwnProperty(L))continue;let K=!1;of(F)&&of(z)?K=!Fy(F,z):K=F!==z,K?F!=null?D(L):f.add(L):F!==void 0&&f.has(L)?D(L):m.protectedKeys[L]=!0}m.prevProp=y,m.prevResolvedValues=R,m.isActive&&(h=$($({},h),R)),i&&t.blockInitialAnimation&&(E=!1),E&&(!(C&&M)||w)&&d.push(..._.map(L=>({animation:L,options:{type:p}})))}if(f.size){const b={};f.forEach(p=>{const m=t.getBaseTarget(p),y=t.getValue(p);y&&(y.liveStyle=!0),b[p]=m!=null?m:null}),d.push({animation:b})}let v=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(v=!1),i=!1,v?e(d):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const d=o(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=B0(),i=!0}}}function $E(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Fy(e,t):!1}function Ni(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function B0(){return{animate:Ni(!0),whileInView:Ni(),whileHover:Ni(),whileTap:Ni(),whileDrag:Ni(),whileFocus:Ni(),exit:Ni()}}class si{constructor(e){this.isMounted=!1,this.node=e}update(){}}class kE extends si{constructor(e){super(e),e.animationState||(e.animationState=_E(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();gl(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let TE=0;class CE extends si{constructor(){super(...arguments),this.id=TE++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const EE={animation:{Feature:kE},exit:{Feature:CE}},K0=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function kl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const ME=t=>e=>K0(e)&&t(e,kl(e));function $n(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function kn(t,e,n,i){return $n(t,e,ME(n),i)}const H0=(t,e)=>Math.abs(t-e);function DE(t,e){const n=H0(t.x,e.x),i=H0(t.y,e.y);return Math.sqrt(pm(n,2)+pm(i,2))}class W0{constructor(e,n,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Uf(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=DE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:g}=d,{timestamp:v}=Fe;this.history.push(N($({},g),{timestamp:v}));const{onStart:b,onMove:p}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Wf(f,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Uf(d.type==="pointercancel"?this.lastMoveEventInfo:Wf(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,b),g&&g(d,b)},!K0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const o=kl(e),a=Wf(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Fe;this.history=[N($({},l),{timestamp:u})];const{onSessionStart:c}=n;c&&c(e,Uf(a,this.history)),this.removeListeners=Pn(kn(this.contextWindow,"pointermove",this.handlePointerMove),kn(this.contextWindow,"pointerup",this.handlePointerUp),kn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),tn(this.updatePoint)}}function Wf(t,e){return e?{point:e(t.point)}:t}function U0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Uf({point:t},e){return{point:t,delta:U0(t,Y0(e)),offset:U0(t,LE(e)),velocity:AE(e,.1)}}function LE(t){return t[0]}function Y0(t){return t[t.length-1]}function AE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Y0(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>wn(e)));)n--;if(!i)return{x:0,y:0};const s=Sn(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function G0(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const X0=G0("dragHorizontal"),q0=G0("dragVertical");function Q0(t){let e=!1;if(t==="y")e=q0();else if(t==="x")e=X0();else{const n=X0(),i=q0();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function Z0(){const t=Q0(!0);return t?(t(),!1):!0}function Vr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const J0=1e-4,RE=1-J0,FE=1+J0,eb=.01,IE=0-eb,OE=0+eb;function St(t){return t.max-t.min}function VE(t,e,n){return Math.abs(t-e)<=n}function tb(t,e,n,i=.5){t.origin=i,t.originPoint=Pe(e.min,e.max,t.origin),t.scale=St(n)/St(e),t.translate=Pe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=RE&&t.scale<=FE||isNaN(t.scale))&&(t.scale=1),(t.translate>=IE&&t.translate<=OE||isNaN(t.translate))&&(t.translate=0)}function lo(t,e,n,i){tb(t.x,e.x,n.x,i?i.originX:void 0),tb(t.y,e.y,n.y,i?i.originY:void 0)}function nb(t,e,n){t.min=n.min+e.min,t.max=t.min+St(e)}function NE(t,e,n){nb(t.x,e.x,n.x),nb(t.y,e.y,n.y)}function ib(t,e,n){t.min=e.min-n.min,t.max=t.min+St(e)}function uo(t,e,n){ib(t.x,e.x,n.x),ib(t.y,e.y,n.y)}function zE(t,{min:e,max:n},i){return e!==void 0&&tn&&(t=i?Pe(n,t,i.max):Math.min(t,n)),t}function rb(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function jE(t,{top:e,left:n,bottom:i,right:r}){return{x:rb(t.x,n,r),y:rb(t.y,e,i)}}function sb(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.mini?n=Vi(e.min,e.max-i,t.min):i>r&&(n=Vi(t.min,t.max-r,e.min)),ni(0,1,n)}function HE(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Yf=.35;function WE(t=Yf){return t===!1?t=0:t===!0&&(t=Yf),{x:ob(t,"left","right"),y:ob(t,"top","bottom")}}function ob(t,e,n){return{min:ab(t,e),max:ab(t,n)}}function ab(t,e){return typeof t=="number"?t:t[e]||0}const lb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nr=()=>({x:lb(),y:lb()}),ub=()=>({min:0,max:0}),Te=()=>({x:ub(),y:ub()});function Lt(t){return[t("x"),t("y")]}function cb({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function UE({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function YE(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Gf(t){return t===void 0||t===1}function Xf({scale:t,scaleX:e,scaleY:n}){return!Gf(t)||!Gf(e)||!Gf(n)}function zi(t){return Xf(t)||db(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function db(t){return fb(t.x)||fb(t.y)}function fb(t){return t&&t!=="0%"}function Tl(t,e,n){const i=t-n,r=e*i;return n+r}function hb(t,e,n,i,r){return r!==void 0&&(t=Tl(t,r,i)),Tl(t,n,i)+e}function qf(t,e=0,n=1,i,r){t.min=hb(t.min,e,n,i,r),t.max=hb(t.max,e,n,i,r)}function pb(t,{x:e,y:n}){qf(t.x,e.translate,e.scale,e.originPoint),qf(t.y,n.translate,n.scale,n.originPoint)}const mb=.999999999999,gb=1.0000000000001;function GE(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;amb&&(e.x=1),e.ymb&&(e.y=1)}function zr(t,e){t.min=t.min+e,t.max=t.max+e}function vb(t,e,n,i,r=.5){const s=Pe(t.min,t.max,r);qf(t,e,n,s,i)}function jr(t,e){vb(t.x,e.x,e.scaleX,e.scale,e.originX),vb(t.y,e.y,e.scaleY,e.scale,e.originY)}function yb(t,e){return cb(YE(t.getBoundingClientRect(),e))}function XE(t,e,n){const i=yb(t,n),{scroll:r}=e;return r&&(zr(i.x,r.offset.x),zr(i.y,r.offset.y)),i}const bb=({current:t})=>t?t.ownerDocument.defaultView:null,qE=new WeakMap;class QE{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Te(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kl(c,"page").point)},s=(c,d)=>{const{drag:f,dragPropagation:h,onDragStart:g}=this.getProps();if(f&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Q0(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lt(b=>{let p=this.getAxisMotionValue(b).get()||0;if(nn.test(p)){const{projection:m}=this.visualElement;if(m&&m.layout){const y=m.layout.layoutBox[b];y&&(p=St(y)*(parseFloat(p)/100))}}this.originPoint[b]=p}),g&&se.postRender(()=>g(c,d)),Kf(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:g,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=ZE(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),v&&v(c,d)},a=(c,d)=>this.stop(c,d),l=()=>Lt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new W0(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:bb(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&se.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!Cl(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=zE(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&Vr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=jE(r.layoutBox,n):this.constraints=!1,this.elastic=WE(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Lt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=HE(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Vr(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=XE(i,r.root,this.visualElement.getTransformPagePoint());let o=BE(r.layout.layoutBox,s);if(n){const a=n(UE(o));this.hasMutatedConstraints=!!a,a&&(o=cb(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Lt(c=>{if(!Cl(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=r?200:1e6,h=r?40:1e7,g=$($({type:"inertia",velocity:i?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},s),d);return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return Kf(this.visualElement,e),i.start(Vf(e,i,0,n,this.visualElement,!1))}stopAnimation(){Lt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Lt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Lt(n=>{const{drag:i}=this.getProps();if(!Cl(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];s.set(e[n]-Pe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Vr(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Lt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=KE({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Lt(o=>{if(!Cl(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Pe(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;qE.set(this.visualElement,this);const e=this.visualElement.current,n=kn(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Vr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),se.read(i);const o=$n(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Lt(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Yf,dragMomentum:a=!0}=e;return N($({},e),{drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a})}}function Cl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ZE(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class JE extends si{constructor(e){super(e),this.removeGroupControls=je,this.removeListeners=je,this.controls=new QE(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||je}unmount(){this.removeGroupControls(),this.removeListeners()}}const xb=t=>(e,n)=>{t&&se.postRender(()=>t(e,n))};class e2 extends si{constructor(){super(...arguments),this.removePointerDownListener=je}onPointerDown(e){this.session=new W0(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bb(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:xb(e),onStart:xb(n),onMove:i,onEnd:(s,o)=>{delete this.session,r&&se.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=kn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Qf=x.createContext(null);function t2(){const t=x.useContext(Qf);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=x.useId();x.useEffect(()=>i(r),[]);const s=x.useCallback(()=>n&&n(r),[r,n]);return!e&&n?[!1,s]:[!0]}const wb=x.createContext({}),Sb=x.createContext({}),El={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pb(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const co={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(X.test(t))t=parseFloat(t);else return t;const n=Pb(t,e.target.x),i=Pb(t,e.target.y);return`${n}% ${i}%`}},n2={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=ri.parse(t);if(r.length>5)return i;const s=ri.createTransformer(t),o=typeof r[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const u=Pe(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),s(r)}},Ml={};function i2(t){Object.assign(Ml,t)}const{schedule:Zf,cancel:p8}=Oy(queueMicrotask,!1);class r2 extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;i2(s2),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions(N($({},s.options),{onExitComplete:()=>this.safeToRemove()}))),El.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||se.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Zf.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function _b(t){const[e,n]=t2(),i=x.useContext(wb);return A.jsx(r2,N($({},t),{layoutGroup:i,switchLayoutGroup:x.useContext(Sb),isPresent:e,safeToRemove:n}))}const s2={borderRadius:N($({},co),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:co,borderTopRightRadius:co,borderBottomLeftRadius:co,borderBottomRightRadius:co,boxShadow:n2},$b=["TopLeft","TopRight","BottomLeft","BottomRight"],o2=$b.length,kb=t=>typeof t=="string"?parseFloat(t):t,Tb=t=>typeof t=="number"||X.test(t);function a2(t,e,n,i,r,s){r?(t.opacity=Pe(0,n.opacity!==void 0?n.opacity:1,l2(i)),t.opacityExit=Pe(e.opacity!==void 0?e.opacity:1,0,u2(i))):s&&(t.opacity=Pe(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let o=0;oie?1:n(Vi(t,e,i))}function Mb(t,e){t.min=e.min,t.max=e.max}function At(t,e){Mb(t.x,e.x),Mb(t.y,e.y)}function Db(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Lb(t,e,n,i,r){return t-=e,t=Tl(t,1/n,i),r!==void 0&&(t=Tl(t,1/r,i)),t}function c2(t,e=0,n=1,i=.5,r,s=t,o=t){if(nn.test(e)&&(e=parseFloat(e),e=Pe(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Pe(s.min,s.max,i);t===s&&(a-=e),t.min=Lb(t.min,e,n,a,r),t.max=Lb(t.max,e,n,a,r)}function Ab(t,e,[n,i,r],s,o){c2(t,e[n],e[i],e[r],e.scale,s,o)}const d2=["x","scaleX","originX"],f2=["y","scaleY","originY"];function Rb(t,e,n,i){Ab(t.x,e,d2,n?n.x:void 0,i?i.x:void 0),Ab(t.y,e,f2,n?n.y:void 0,i?i.y:void 0)}function Fb(t){return t.translate===0&&t.scale===1}function Ib(t){return Fb(t.x)&&Fb(t.y)}function Ob(t,e){return t.min===e.min&&t.max===e.max}function h2(t,e){return Ob(t.x,e.x)&&Ob(t.y,e.y)}function Vb(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Nb(t,e){return Vb(t.x,e.x)&&Vb(t.y,e.y)}function zb(t){return St(t.x)/St(t.y)}function jb(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class p2{constructor(){this.members=[]}add(e){Nf(this.members,e),e.scheduleRender()}remove(e){if(zf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function m2(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),g&&(i+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const g2=(t,e)=>t.depth-e.depth;class v2{constructor(){this.children=[],this.isDirty=!1}add(e){Nf(this.children,e),this.isDirty=!0}remove(e){zf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(g2),this.isDirty=!1,this.children.forEach(e)}}function Dl(t){const e=qe(t)?t.get():t;return uE(e)?e.toValue():e}function y2(t,e){const n=rn.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(tn(i),t(s-e))};return se.read(i,!0),()=>tn(i)}function b2(t){return t instanceof SVGElement&&t.tagName!=="svg"}function x2(t,e,n){const i=qe(t)?t:_n(t);return i.start(Vf("",i,e,n)),i.animation}const ji={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},fo=typeof window!="undefined"&&window.MotionDebug!==void 0,Jf=["","X","Y","Z"],w2={visibility:"hidden"},Bb=1e3;let S2=0;function eh(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Kb(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=N0(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(r||s))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Kb(i)}function Hb({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=S2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,fo&&(ji.totalNodes=ji.resolvedTargetDeltas=ji.recalculatedProjection=0),this.nodes.forEach($2),this.nodes.forEach(M2),this.nodes.forEach(D2),this.nodes.forEach(k2),fo&&window.MotionDebug.record(ji)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=y2(f,250),El.hasAnimatedSinceResize&&(El.hasAnimatedSinceResize=!1,this.nodes.forEach(Ub))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||I2,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=c.getProps(),m=!this.targetLayout||!Nb(this.targetLayout,g)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const S=N($({},cf(v,"layout")),{onPlay:b,onComplete:p});(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Ub(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,tn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(L2),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Kb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const P=S/1e3;Yb(d.x,o.x,P),Yb(d.y,o.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(uo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),R2(this.relativeTarget,this.relativeTargetOrigin,f,P),y&&h2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Te()),At(y,this.relativeTarget)),v&&(this.animationValues=c,a2(c,u,this.latestValues,P,m,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(tn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{El.hasAnimatedSinceResize=!0,this.currentAnimation=x2(0,Bb,N($({},o),{onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Zb(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Te();const d=St(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=St(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}At(a,l),jr(a,c),lo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new p2),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&eh("z",o,u,this.animationValues);for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Wb),this.root.sharedNodes.clear()}}}function P2(t){t.updateLayout()}function _2(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;s==="size"?Lt(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=St(f);f.min=i[d].min,f.max=f.min+h}):Zb(s,n.layoutBox,i)&&Lt(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=St(i[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=Nr();lo(a,i,n.layoutBox);const l=Nr();o?lo(l,t.applyTransform(r,!0),n.measuredBox):lo(l,i,n.layoutBox);const u=!Ib(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const g=Te();uo(g,n.layoutBox,f.layoutBox);const v=Te();uo(v,i,h.layoutBox),Nb(g,v)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=g,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function $2(t){fo&&ji.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function k2(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function T2(t){t.clearSnapshot()}function Wb(t){t.clearMeasurements()}function C2(t){t.isLayoutDirty=!1}function E2(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ub(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function M2(t){t.resolveTargetDelta()}function D2(t){t.calcProjection()}function L2(t){t.resetSkewAndRotation()}function A2(t){t.removeLeadSnapshot()}function Yb(t,e,n){t.translate=Pe(e.translate,0,n),t.scale=Pe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Gb(t,e,n,i){t.min=Pe(e.min,n.min,i),t.max=Pe(e.max,n.max,i)}function R2(t,e,n,i){Gb(t.x,e.x,n.x,i),Gb(t.y,e.y,n.y,i)}function F2(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const I2={duration:.45,ease:[.4,0,.1,1]},Xb=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),qb=Xb("applewebkit/")&&!Xb("chrome/")?Math.round:je;function Qb(t){t.min=qb(t.min),t.max=qb(t.max)}function O2(t){Qb(t.x),Qb(t.y)}function Zb(t,e,n){return t==="position"||t==="preserve-aspect"&&!VE(zb(e),zb(n),.2)}function V2(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const N2=Hb({attachResizeListener:(t,e)=>$n(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),th={current:void 0},Jb=Hb({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!th.current){const t=new N2({});t.mount(window),t.setOptions({layoutScroll:!0}),th.current=t}return th.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),z2={pan:{Feature:e2},drag:{Feature:JE,ProjectionNode:Jb,MeasureLayout:_b}};function ex(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd",r=(s,o)=>{if(s.pointerType==="touch"||Z0())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[i];l&&se.postRender(()=>l(s,o))};return kn(t.current,n,r,{passive:!t.getProps()[i]})}class j2 extends si{mount(){this.unmount=Pn(ex(this.node,!0),ex(this.node,!1))}unmount(){}}class B2 extends si{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(n){e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pn($n(this.node.current,"focus",()=>this.onFocus()),$n(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const tx=(t,e)=>e?t===e?!0:tx(t,e.parentElement):!1;function nh(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,kl(n))}class K2 extends si{constructor(){super(...arguments),this.removeStartListeners=je,this.removeEndListeners=je,this.removeAccessibleListeners=je,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),s=kn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!tx(this.node.current,a.target)?c:u;f&&se.update(()=>f(a,l))},{passive:!(i.onTap||i.onPointerUp)}),o=kn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Pn(s,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||nh("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&se.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=$n(this.node.current,"keyup",o),nh("down",(a,l)=>{this.startPress(a,l)})},n=$n(this.node.current,"keydown",e),i=()=>{this.isPressing&&nh("cancel",(s,o)=>this.cancelPress(s,o))},r=$n(this.node.current,"blur",i);this.removeAccessibleListeners=Pn(n,r)}}startPress(e,n){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&se.postRender(()=>i(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Z0()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&se.postRender(()=>i(e,n))}mount(){const e=this.node.getProps(),n=kn(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=$n(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Pn(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const ih=new WeakMap,rh=new WeakMap,H2=t=>{const e=ih.get(t.target);e&&e(t)},W2=t=>{t.forEach(H2)};function U2(n){var i=n,{root:t}=i,e=ne(i,["root"]);const r=t||document;rh.has(r)||rh.set(r,{});const s=rh.get(r),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(W2,$({root:t},e))),s[o]}function Y2(t,e,n){const i=U2(e);return ih.set(t,n),i.observe(t),()=>{ih.delete(t),i.unobserve(t)}}const G2={some:0,all:1};class X2 extends si{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:G2[r]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return Y2(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(q2(e,n))&&this.startObserver()}unmount(){}}function q2({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Q2={inView:{Feature:X2},tap:{Feature:K2},focus:{Feature:B2},hover:{Feature:j2}},Z2={layout:{ProjectionNode:Jb,MeasureLayout:_b}},nx=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ll=x.createContext({}),sh=typeof window!="undefined",ix=sh?x.useLayoutEffect:x.useEffect,rx=x.createContext({strict:!1});function J2(t,e,n,i,r){var s,o;const{visualElement:a}=x.useContext(Ll),l=x.useContext(rx),u=x.useContext(Qf),c=x.useContext(nx).reducedMotion,d=x.useRef();i=i||l.renderer,!d.current&&i&&(d.current=i(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,h=x.useContext(Sb);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&eM(d.current,n,r,h),x.useInsertionEffect(()=>{f&&f.update(n,u)});const g=n[V0],v=x.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return ix(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Zf.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),x.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,g)}),v.current=!1))}),f}function eM(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:sx(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Vr(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}function sx(t){if(t)return t.options.allowProjection!==!1?t.projection:sx(t.parent)}function tM(t,e,n){return x.useCallback(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):Vr(n)&&(n.current=i))},[e])}function Al(t){return gl(t.animate)||uf.some(e=>eo(t[e]))}function ox(t){return!!(Al(t)||t.variants)}function nM(t,e){if(Al(t)){const{initial:n,animate:i}=t;return{initial:n===!1||eo(n)?n:void 0,animate:eo(i)?i:void 0}}return t.inherit!==!1?e:{}}function iM(t){const{initial:e,animate:n}=nM(t,x.useContext(Ll));return x.useMemo(()=>({initial:e,animate:n}),[ax(e),ax(n)])}function ax(t){return Array.isArray(t)?t.join(" "):t}const lx={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Br={};for(const t in lx)Br[t]={isEnabled:e=>lx[t].some(n=>!!e[n])};function rM(t){for(const e in t)Br[e]=$($({},Br[e]),t[e])}const sM=Symbol.for("motionComponentSymbol");function oM({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&rM(t);function s(a,l){let u;const c=N($($({},x.useContext(nx)),a),{layoutId:aM(a)}),{isStatic:d}=c,f=iM(a),h=i(a,d);if(!d&&sh){lM();const g=uM(c);u=g.MeasureLayout,f.visualElement=J2(r,h,c,e,g.ProjectionNode)}return A.jsxs(Ll.Provider,{value:f,children:[u&&f.visualElement?A.jsx(u,$({visualElement:f.visualElement},c)):null,n(r,a,tM(h,f.visualElement,l),h,d,f.visualElement)]})}const o=x.forwardRef(s);return o[sM]=r,o}function aM({layoutId:t}){const e=x.useContext(wb).id;return e&&t!==void 0?e+"-"+t:t}function lM(t,e){x.useContext(rx).strict}function uM(t){const{drag:e,layout:n}=Br;if(!e&&!n)return{};const i=$($({},e),n);return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const cM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function oh(t){return typeof t!="string"||t.includes("-")?!1:!!(cM.indexOf(t)>-1||/[A-Z]/u.test(t))}function ux(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const s in n)t.style.setProperty(s,n[s])}const cx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dx(t,e,n,i){ux(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(cx.has(r)?r:Bf(r),e.attrs[r])}function fx(t,{layout:e,layoutId:n}){return Fi.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ml[t]||t==="opacity")}function ah(t,e,n){var i;const{style:r}=t,s={};for(const o in r)(qe(r[o])||e.style&&qe(e.style[o])||fx(o,t)||((i=n==null?void 0:n.getValue(o))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(s[o]=r[o]);return s}function hx(t,e,n){const i=ah(t,e,n);for(const r in t)if(qe(t[r])||qe(e[r])){const s=to.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}function px(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}function dM({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,s){const o={latestValues:fM(i,r,s,t),renderState:e()};return n&&(o.mount=a=>n(i,a,o)),o}const mx=t=>(e,n)=>{const i=x.useContext(Ll),r=x.useContext(Qf),s=()=>dM(t,e,i,r);return n?s():px(s)};function fM(t,e,n,i){const r={},s=i(t,{});for(const h in s)r[h]=Dl(s[h]);let{initial:o,animate:a}=t;const l=Al(t),u=ox(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!gl(d)){const h=Array.isArray(d)?d:[d];for(let g=0;g({style:{},transform:{},transformOrigin:{},vars:{}}),gx=()=>N($({},lh()),{attrs:{}}),vx=(t,e)=>e&&typeof t=="number"?e.transform(t):t,hM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pM=to.length;function mM(t,e,n){let i="",r=!0;for(let s=0;stypeof t=="string"&&t.toLowerCase()==="svg",xM={useVisualState:mx({scrapeMotionValuesFromProps:hx,createRenderState:gx,onMount:(t,e,{renderState:n,latestValues:i})=>{se.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch(r){n.dimensions={x:0,y:0,width:0,height:0}}}),se.render(()=>{ch(n,i,dh(e.tagName),t.transformTemplate),dx(e,n)})}})},wM={useVisualState:mx({scrapeMotionValuesFromProps:ah,createRenderState:lh})};function bx(t,e,n){for(const i in e)!qe(e[i])&&!fx(i,n)&&(t[i]=e[i])}function SM({transformTemplate:t},e){return x.useMemo(()=>{const n=lh();return uh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function PM(t,e){const n=t.style||{},i={};return bx(i,n,t),Object.assign(i,SM(t,e)),i}function _M(t,e){const n={},i=PM(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const $M=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rl(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||$M.has(t)}let xx=t=>!Rl(t);function kM(t){t&&(xx=e=>e.startsWith("on")?!Rl(e):t(e))}try{kM(require("@emotion/is-prop-valid").default)}catch(t){}function TM(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(xx(r)||n===!0&&Rl(r)||!e&&!Rl(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function CM(t,e,n,i){const r=x.useMemo(()=>{const s=gx();return ch(s,e,dh(i),t.transformTemplate),N($({},s.attrs),{style:$({},s.style)})},[e]);if(t.style){const s={};bx(s,t.style,t),r.style=$($({},s),r.style)}return r}function EM(t=!1){return(n,i,r,{latestValues:s},o)=>{const l=(oh(n)?CM:_M)(i,s,o,n),u=TM(i,typeof n=="string",t),c=n!==x.Fragment?N($($({},u),l),{ref:r}):{},{children:d}=i,f=x.useMemo(()=>qe(d)?d.get():d,[d]);return x.createElement(n,N($({},c),{children:f}))}}function MM(t,e){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const s=oh(i)?xM:wM,o=N($({},s),{preloadedFeatures:t,useRender:EM(r),createVisualElement:e,Component:i});return oM(o)}}const fh={current:null},wx={current:!1};function DM(){if(wx.current=!0,!!sh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fh.current=t.matches;t.addListener(e),e()}else fh.current=!1}function LM(t,e,n){for(const i in e){const r=e[i],s=n[i];if(qe(r))t.addValue(i,r);else if(qe(s))t.addValue(i,_n(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=t.getStaticValue(i);t.addValue(i,_n(o!==void 0?o:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Sx=new WeakMap,AM=[...n0,Xe,ri],RM=t=>AM.find(t0(t)),Px=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class FM{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=rn.now();this.renderScheduledAtthis.bindToMotionValue(i,n)),wx.current||DM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Sx.delete(this.current),this.projection&&this.projection.unmount(),tn(this.notifyUpdate),tn(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=Fi.has(e),r=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&se.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Br){const n=Br[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;in.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=_n(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Yy(r)||Uy(r))?r=parseFloat(r):!RM(r)&&ri.test(n)&&(r=h0(e,n)),this.setBaseTarget(e,qe(r)?r.get():r)),qe(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const o=af(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(r=o[e])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!qe(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new jf),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class _x extends FM{constructor(){super(...arguments),this.KeyframeResolver=p0}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}}function IM(t){return window.getComputedStyle(t)}class OM extends _x{constructor(){super(...arguments),this.type="html",this.renderInstance=ux}readValueFromInstance(e,n){if(Fi.has(n)){const i=$f(n);return i&&i.default||0}else{const i=IM(e),r=(Xy(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return yb(e,n)}build(e,n,i){uh(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return ah(e,n,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;qe(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class VM extends _x{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Te}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Fi.has(n)){const i=$f(n);return i&&i.default||0}return n=cx.has(n)?n:Bf(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return hx(e,n,i)}build(e,n,i){ch(e,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,i,r){dx(e,n,i,r)}mount(e){this.isSVGTag=dh(e.tagName),super.mount(e)}}const NM=(t,e)=>oh(t)?new VM(e):new OM(e,{allowProjection:t!==x.Fragment}),zM=MM($($($($({},EE),Q2),z2),Z2),NM),hh=_T(zM);function jM(t,e,n){x.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function BM(t,e,n){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Fl=new WeakMap;let oi;function KM(t,e){if(e){const{inlineSize:n,blockSize:i}=e[0];return{width:n,height:i}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function HM({target:t,contentRect:e,borderBoxSize:n}){var i;(i=Fl.get(t))===null||i===void 0||i.forEach(r=>{r({target:t,contentSize:e,get size(){return KM(t,n)}})})}function WM(t){t.forEach(HM)}function UM(){typeof ResizeObserver!="undefined"&&(oi=new ResizeObserver(WM))}function YM(t,e){oi||UM();const n=BM(t);return n.forEach(i=>{let r=Fl.get(i);r||(r=new Set,Fl.set(i,r)),r.add(e),oi==null||oi.observe(i)}),()=>{n.forEach(i=>{const r=Fl.get(i);r==null||r.delete(e),r!=null&&r.size||oi==null||oi.unobserve(i)})}}const Il=new Set;let ho;function GM(){ho=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Il.forEach(n=>n(e))},window.addEventListener("resize",ho)}function XM(t){return Il.add(t),ho||GM(),()=>{Il.delete(t),!Il.size&&ho&&(ho=void 0)}}function qM(t,e){return typeof t=="function"?XM(t):YM(t,e)}const QM=50,$x=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ZM=()=>({time:0,x:$x(),y:$x()}),JM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kx(t,e,n,i){const r=n[e],{length:s,position:o}=JM[e],a=r.current,l=n.time;r.current=t[`scroll${o}`],r.scrollLength=t[`scroll${s}`]-t[`client${s}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=Vi(0,r.scrollLength,r.current);const u=i-l;r.velocity=u>QM?0:Tf(r.current-a,u)}function eD(t,e,n){kx(t,"x",e,n),kx(t,"y",e,n),e.time=n}function tD(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if(i.tagName==="svg"){const r=i.getBoundingClientRect();i=i.parentElement;const s=i.getBoundingClientRect();n.x+=r.left-s.left,n.y+=r.top-s.top}else if(i instanceof SVGGraphicsElement){const{x:r,y:s}=i.getBBox();n.x+=r,n.y+=s;let o=null,a=i.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=i.parentNode;i=o}else break;return n}const nD={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ph={start:0,center:.5,end:1};function Tx(t,e,n=0){let i=0;if(t in ph&&(t=ph[t]),typeof t=="string"){const r=parseFloat(t);t.endsWith("px")?i=r:t.endsWith("%")?t=r/100:t.endsWith("vw")?i=r/100*document.documentElement.clientWidth:t.endsWith("vh")?i=r/100*document.documentElement.clientHeight:t=r}return typeof t=="number"&&(i=e*t),n+i}const iD=[0,0];function rD(t,e,n,i){let r=Array.isArray(t)?t:iD,s=0,o=0;return typeof t=="number"?r=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?r=t.split(" "):r=[t,ph[t]?t:"0"]),s=Tx(r[0],n,i),o=Tx(r[1],e),s-o}const sD={x:0,y:0};function oD(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function aD(t,e,n){const{offset:i=nD.All}=n,{target:r=t,axis:s="y"}=n,o=s==="y"?"height":"width",a=r!==t?tD(r,t):sD,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:oD(r),u={width:t.clientWidth,height:t.clientHeight};e[s].offset.length=0;let c=!e[s].interpolate;const d=i.length;for(let f=0;flD(t,i.target,n),update:r=>{eD(t,n,r),(i.offset||i.target)&&aD(t,n,i)},notify:()=>e(n)}}const po=new WeakMap,Cx=new WeakMap,mh=new WeakMap,Ex=t=>t===document.documentElement?window:t;function gh(t,i={}){var r=i,{container:e=document.documentElement}=r,n=ne(r,["container"]);let s=mh.get(e);s||(s=new Set,mh.set(e,s));const o=ZM(),a=uD(e,t,o,n);if(s.add(a),!po.has(e)){const u=()=>{for(const g of s)g.measure()},c=()=>{for(const g of s)g.update(Fe.timestamp)},d=()=>{for(const g of s)g.notify()},f=()=>{se.read(u,!1,!0),se.read(c,!1,!0),se.update(d,!1,!0)};po.set(e,f);const h=Ex(e);window.addEventListener("resize",f,{passive:!0}),e!==document.documentElement&&Cx.set(e,qM(e,f)),h.addEventListener("scroll",f,{passive:!0})}const l=po.get(e);return se.read(l,!1,!0),()=>{var u;tn(l);const c=mh.get(e);if(!c||(c.delete(a),c.size))return;const d=po.get(e);po.delete(e),d&&(Ex(e).removeEventListener("scroll",d),(u=Cx.get(e))===null||u===void 0||u(),window.removeEventListener("resize",d))}}function Mx(t,e){let n;const i=()=>{const{currentTime:r}=e,o=(r===null?0:r.value)/100;n!==o&&t(o),n=o};return se.update(i,!0),()=>tn(i)}function cD({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},r=gh(s=>{i.value=s[n].progress*100},{container:e,axis:n});return{currentTime:i,cancel:r}}const vh=new Map;function Dx({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),vh.has(e)||vh.set(e,{});const i=vh.get(e);return i[n]||(i[n]=I0()?new ScrollTimeline({source:e,axis:n}):cD({source:e,axis:n})),i[n]}function dD(t){return t.length===2}function Lx(t){return t&&(t.target||t.offset)}function fD(t,e){return dD(t)||Lx(e)?gh(n=>{t(n[e.axis].progress,n)},e):Mx(t,Dx(e))}function hD(t,e){if(Lx(e))return t.pause(),gh(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=Dx(e);return t.attachTimeline(n,i=>(i.pause(),Mx(r=>{i.time=i.duration*r},n)))}}function pD(t,i={}){var r=i,{axis:e="y"}=r,n=ne(r,["axis"]);const s=$({axis:e},n);return typeof t=="function"?fD(t,s):hD(t,s)}function Ax(t,e){VT(!!(!e||e.current))}const mD=()=>({scrollX:_n(0),scrollY:_n(0),scrollXProgress:_n(0),scrollYProgress:_n(0)});function gD(r={}){var s=r,{container:t,target:e,layoutEffect:n=!0}=s,i=ne(s,["container","target","layoutEffect"]);const o=px(mD);return(n?ix:x.useEffect)(()=>(Ax("target",e),Ax("container",t),pD((l,{x:u,y:c})=>{o.scrollX.set(u.current),o.scrollXProgress.set(u.progress),o.scrollY.set(c.current),o.scrollYProgress.set(c.progress)},N($({},i),{container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}))),[t,e,JSON.stringify(i.offset)]),o}const Y={oblroi_locale:"en-US",oblroi_currency:"USD",oblroi_headerEyebrow:"Agentforce",oblroi_header:"ROI Calculator",oblroi_headerBottom:"Measure Service Agent's value for your business.",oblroi_formHeadline:"Tell us about your business.",oblroi_formField1Label:"Number of customer service employees",oblroi_formField1Info:"Total number of employees in a customer service role",oblroi_formField2Label:"Average annual cost per employee",oblroi_formField2Info:"What is the average total of salary and benefits per person?",oblroi_formField3Label:"% of support conversations shifted to Agentforce over 3 years",oblroi_formField3Info:"In the last three years, what percentage of customer conversations were transferred to a service rep? Include only cases that escalated to a live rep (phone, chat, or other).",oblroi_formField4Label:"Conversations handled by each rep on an average day",oblroi_formField4Info:"Estimate how many customer conversations each employee has on an average day.",oblroi_resultsHeadline:"With an Agentforce Service Agent handling 50% of conversations, you could save",oblroi_resultsDescription:"3-year total net savings",oblroi_resultsTableHeader1:"Year",oblroi_resultsTableHeader2:"Agent-related cost*",oblroi_resultsTableHeader3:"Agentforce cost",oblroi_resultsTableHeader4:"Your savings",oblroi_resultsTableAnnualCost:"Potential annual cost without Agentforce",oblroi_cta1Label:"Request a deeper dive",oblroi_cta2Label:"Learn more about Agentforce",oblroi_legalDisclaimer_1:"*Includes human costs and licensing costs for customer service agents.",oblroi_legalDisclaimer_2:"Transition to Salesforce Agentforce assumed to happen over three years. Implementation costs not included. All calculations above done in US dollars.",oblroi_legalDisclaimer_3:"The results of this tool are provided for illustrative purposes only to help you consider Agentforce as a business solution and should not be relied upon. Actual results may vary and are not a guarantee or commitment regarding any potential or actual financial results or other benefits you may achieve. Individual results depend on factors including but not limited to implementation practices, user adoption, configurations, business practices, market conditions, and external economic factors.",oblroi_chart_intro:"Costs and savings over 3 years",oblroi_chart_human_cost:"human cost",oblroi_chart_agentforce_cost:"cost for Agentforce and",oblroi_chart_net_savings:"Net Savings",oblroi_chart_year_0:"Year 0",oblroi_chart_year_1:"Year 1",oblroi_chart_year_2:"Year 2",oblroi_chart_year_3:"Year 3",oblroi_chart_total:"Total",oblroi_chart_in:"in",oblroi_service_agent_handling:"With Agentforce Service Agent handling",oblroi_conversations:"% of conversations, you will save",oblroi_over_years:"over 3 years total net savings.",oblroi_error_service_employees:"Customer service employees is required",oblroi_error_cost_per_employee:"Cost per employee is required",oblroi_error_conversations_handled:"Conversations handled is required",oblroi_resultsHeadline_part1:"With Agentforce Service Agent handling",oblroi_resultsHeadline_part2:"% of conversations, you will save"};function vD({yearlyData:t,currentCurrency:e,currentRegion:n}){const[i,r]=x.useState(!1),[s,o]=x.useState(!0),a=x.useRef(null),{scrollXProgress:l}=gD({container:a});return jM(l,"change",u=>{u>0&&r(!0),u===0&&r(!1),o(u!==1)}),A.jsxs("div",{className:"relative",children:[A.jsx(hh.div,{initial:{opacity:0},animate:{opacity:i?1:0},className:"scroll-fader absolute left-0 top-0 z-10 h-full w-[20px] bg-gradient-to-r from-[#ffffff] to-[#ffffff]/0 sm:visible md:visible lg:hidden xl:hidden"}),A.jsx(hh.section,{ref:a,layoutScroll:!0,className:"simpletable--blade relative overflow-x-auto",children:A.jsx("div",{className:"simpletable__table table",style:{padding:0},children:A.jsxs("table",{className:"table-auto border-collapse text-left",children:[A.jsx("thead",{children:A.jsxs("tr",{children:[A.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader1}),A.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader2}),A.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader3}),A.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader4})]})}),A.jsx("tbody",{children:t.map(u=>A.jsxs("tr",{role:"row",className:"last:bg-[#F1F3FB]",children:[A.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.year}),A.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.serviceRepCost!==void 0&&A.jsx(sf,{value:u.serviceRepCost,currency:e,locale:n})}),A.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.cost!==void 0&&A.jsx(sf,{value:u.cost,currency:e,locale:n})}),A.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.savings!==void 0&&A.jsx(sf,{value:u.savings,currency:e,locale:n})})]},u.year))})]})})}),A.jsx(hh.div,{initial:{opacity:0},animate:{opacity:s?1:0},className:"scroll-fader absolute right-0 top-0 z-10 h-full w-[20px] bg-gradient-to-l from-[#ffffff] to-[#ffffff]/0 sm:visible md:visible lg:hidden xl:hidden"})]})}class yh{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new yh(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=n}}class yD{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let i=n.get(e),r=(i==null?void 0:i.firstChildKey)!=null?n.get(i.firstChildKey):null;for(;r;)yield r,r=r.nextKey!=null?n.get(r.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var i;return(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,i=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!i}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Rx{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode;let i=n;for(;i;)i.index++,i=i.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=e.nextSibling;for(;n;)n.index--,n=n.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class mo extends Rx{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof mo?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,n,i,r;let s=this.ownerDocument.getMutableNode(this);s.index=this.index,s.level=this.level,s.parentKey=this.parentNode instanceof mo?this.parentNode.node.key:null;var o;s.prevKey=(o=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&o!==void 0?o:null;var a;s.nextKey=(a=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&a!==void 0?a:null,s.hasChildNodes=!!this.firstChild;var l;s.firstChildKey=(l=(i=this.firstChild)===null||i===void 0?void 0:i.node.key)!==null&&l!==void 0?l:null;var u;s.lastChildKey=(u=(r=this.lastChild)===null||r===void 0?void 0:r.node.key)!==null&&u!==void 0?u:null}setProps(e,n,i,r){let s=this.ownerDocument.getMutableNode(this),c=e,{value:o,textValue:a,id:l}=c,u=ne(c,["value","textValue","id"]);if(u.ref=n,s.props=u,s.rendered=i,s.render=r,s.value=o,s.textValue=a||(typeof u.children=="string"?u.children:"")||e["aria-label"]||"",l!=null&&l!==s.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");s.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new yh(e,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class bD extends Rx{get isConnected(){return this.isMounted}createElement(e){return new mo(e,this)}getMutableNode(e){let n=e.node;return this.mutatedNodes.has(e)||(n=e.node.clone(),this.mutatedNodes.add(e),e.node=n),this.markDirty(e),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let n=this.getMutableCollection();if(!n.getItem(e.node.key)){n.addNode(e.node);for(let i of e)this.addNode(i)}this.markDirty(e)}removeNode(e){for(let i of e)this.removeNode(i);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let s of this.dirtyNodes)s instanceof mo&&s.isConnected&&s.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,n;let s=this.getMutableCollection();for(let o of this.mutatedNodes)o.isConnected&&s.addNode(o.node);var i,r;s.commit((i=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&i!==void 0?i:null,(r=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&r!==void 0?r:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function Fx(t){let{children:e,items:n,idScope:i,addIdAndValue:r,dependencies:s=[]}=t,o=x.useMemo(()=>new WeakMap,s);return x.useMemo(()=>{if(n&&typeof e=="function"){let u=[];for(let c of n){let d=o.get(c);if(!d){d=e(c);var a,l;let f=(l=(a=d.props.id)!==null&&a!==void 0?a:c.key)!==null&&l!==void 0?l:c.id;if(f==null)throw new Error("Could not determine key for item");i&&(f=i+":"+f),d=x.cloneElement(d,r?{key:f,id:f,value:c}:{key:f}),o.set(c,d)}u.push(d)}return u}else if(typeof e!="function")return e},[e,n,o,i,r])}const Ol={prefix:String(Math.round(Math.random()*1e10)),current:0},Ix=W.createContext(Ol),xD=W.createContext(!1);let wD=!!(typeof window!="undefined"&&window.document&&window.document.createElement),bh=new WeakMap;function SD(t=!1){let e=x.useContext(Ix),n=x.useRef(null);if(n.current===null&&!t){var i,r;let s=(r=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||r===void 0||(i=r.ReactCurrentOwner)===null||i===void 0?void 0:i.current;if(s){let o=bh.get(s);o==null?bh.set(s,{id:e.current,state:s.memoizedState}):s.memoizedState!==o.state&&(e.current=o.id,bh.delete(s))}n.current=++e.current}return n.current}function PD(t){let e=x.useContext(Ix);e===Ol&&!wD&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=SD(!!t),i=`react-aria${e.prefix}`;return t||`${i}-${n}`}function _D(t){let e=W.useId(),[n]=x.useState(go()),i=n?"react-aria":`react-aria${Ol.prefix}`;return t||`${i}-${e}`}const $D=typeof W.useId=="function"?_D:PD;function kD(){return!1}function TD(){return!0}function CD(t){return()=>{}}function go(){return typeof W.useSyncExternalStore=="function"?W.useSyncExternalStore(CD,kD,TD):x.useContext(xD)}if(typeof HTMLTemplateElement!="undefined"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const xh=x.createContext(!1),ED=typeof DocumentFragment!="undefined"?new DocumentFragment:null;function MD(t){let e=x.useContext(xh),n=go();if(e)return W.createElement(W.Fragment,null,t.children);let i=W.createElement(xh.Provider,{value:!0},t.children);return n?W.createElement("template",{"data-react-aria-hidden":!0},i):ml.createPortal(i,ED)}function wh(t){let e=(n,i)=>x.useContext(xh)?null:t(n,i);return e.displayName=t.displayName||t.name,x.forwardRef(e)}const Yt=typeof document!="undefined"?W.useLayoutEffect:()=>{};function Ie(t){const e=x.useRef(null);return Yt(()=>{e.current=t},[t]),x.useCallback((...n)=>{const i=e.current;return i==null?void 0:i(...n)},[])}function DD(t){let[e,n]=x.useState(t),i=x.useRef(null),r=Ie(()=>{if(!i.current)return;let o=i.current.next();if(o.done){i.current=null;return}e===o.value?r():n(o.value)});Yt(()=>{i.current&&r()});let s=Ie(o=>{i.current=o(e),r()});return[e,s]}let LD=!!(typeof window!="undefined"&&window.document&&window.document.createElement),ai=new Map;function li(t){let[e,n]=x.useState(t),i=x.useRef(null),r=$D(e),s=x.useCallback(o=>{i.current=o},[]);return LD&&(ai.has(r)&&!ai.get(r).includes(s)?ai.set(r,[...ai.get(r),s]):ai.set(r,[s])),Yt(()=>{let o=r;return()=>{ai.delete(o)}},[r]),x.useEffect(()=>{let o=i.current;o&&(i.current=null,n(o))}),r}function AD(t,e){if(t===e)return t;let n=ai.get(t);if(n)return n.forEach(r=>r(e)),e;let i=ai.get(e);return i?(i.forEach(r=>r(t)),t):e}function Ox(t=[]){let e=li(),[n,i]=DD(e),r=x.useCallback(()=>{i(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,i]);return Yt(r,[e,r,...t]),n}function Sh(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const ut=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},Rt=t=>t&&"window"in t&&t.window===t?t:ut(t).defaultView||window;function Vx(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e=65&&r.charCodeAt(2)<=90?e[r]=Sh(s,o):(r==="className"||r==="UNSAFE_className")&&typeof s=="string"&&typeof o=="string"?e[r]=RD(s,o):r==="id"&&s&&o?e.id=AD(s,o):e[r]=o!==void 0?o:s}}return e}function FD(...t){return t.length===1&&t[0]?t[0]:e=>{for(let n of t)typeof n=="function"?n(e):n!=null&&(n.current=e)}}const ID=new Set(["id"]),OD=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),VD=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ND=/^(data-.*)$/;function Gt(t,e={}){let{labelable:n,isLink:i,propNames:r}=e,s={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(ID.has(o)||n&&OD.has(o)||i&&VD.has(o)||r!=null&&r.has(o)||ND.test(o))&&(s[o]=t[o]);return s}function sn(t){if(zD())t.focus({preventScroll:!0});else{let e=jD(t);t.focus(),BD(e)}}let Vl=null;function zD(){if(Vl==null){Vl=!1;try{document.createElement("div").focus({get preventScroll(){return Vl=!0,!0}})}catch(t){}}return Vl}function jD(t){let e=t.parentNode,n=[],i=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==i;)(e.offsetHeightt.test(n.brand)))||t.test(window.navigator.userAgent)}function Ph(t){var e;return typeof window!="undefined"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function Tn(t){let e=null;return()=>(e==null&&(e=t()),e)}const Bi=Tn(function(){return Ph(/^Mac/i)}),Nx=Tn(function(){return Ph(/^iPhone/i)}),zx=Tn(function(){return Ph(/^iPad/i)||Bi()&&navigator.maxTouchPoints>1}),zl=Tn(function(){return Nx()||zx()}),KD=Tn(function(){return Bi()||zl()}),HD=Tn(function(){return Nl(/AppleWebKit/i)&&!WD()}),WD=Tn(function(){return Nl(/Chrome/i)}),_h=Tn(function(){return Nl(/Android/i)}),UD=Tn(function(){return Nl(/Firefox/i)}),YD=x.createContext({isNative:!0,open:qD,useHref:t=>t});function jl(){return x.useContext(YD)}function GD(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Ki(t,e,n=!0){var i,r;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=e;UD()&&(!((r=window.event)===null||r===void 0||(i=r.type)===null||i===void 0)&&i.startsWith("key"))&&t.target==="_blank"&&(Bi()?s=!0:o=!0);let u=HD()&&Bi()&&!zx()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});Ki.isOpening=n,sn(t),t.dispatchEvent(u),Ki.isOpening=!1}Ki.isOpening=!1;function XD(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function qD(t,e){XD(t,n=>Ki(n,e))}function jx(t){let e=jl();var n;const i=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?i:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let Kr=new Map,$h=new Set;function Bx(){if(typeof window=="undefined")return;function t(i){return"propertyName"in i}let e=i=>{if(!t(i)||!i.target)return;let r=Kr.get(i.target);r||(r=new Set,Kr.set(i.target,r),i.target.addEventListener("transitioncancel",n,{once:!0})),r.add(i.propertyName)},n=i=>{if(!t(i)||!i.target)return;let r=Kr.get(i.target);if(r&&(r.delete(i.propertyName),r.size===0&&(i.target.removeEventListener("transitioncancel",n),Kr.delete(i.target)),Kr.size===0)){for(let s of $h)s();$h.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document!="undefined"&&(document.readyState!=="loading"?Bx():document.addEventListener("DOMContentLoaded",Bx));function Kx(t){requestAnimationFrame(()=>{Kr.size===0?t():$h.add(t)})}function Hr(){let t=x.useRef(new Map),e=x.useCallback((r,s,o,a)=>{let l=a!=null&&a.once?(...u)=>{t.current.delete(o),o(...u)}:o;t.current.set(o,{type:s,eventTarget:r,fn:l,options:a}),r.addEventListener(s,o,a)},[]),n=x.useCallback((r,s,o,a)=>{var l;let u=((l=t.current.get(o))===null||l===void 0?void 0:l.fn)||o;r.removeEventListener(s,u,a),t.current.delete(o)},[]),i=x.useCallback(()=>{t.current.forEach((r,s)=>{n(r.eventTarget,r.type,s,r.options)})},[n]);return x.useEffect(()=>i,[i]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:i}}function kh(t,e){let{id:n,"aria-label":i,"aria-labelledby":r}=t;return n=li(n),r&&i?r=[...new Set([n,...r.trim().split(/\s+/)])].join(" "):r&&(r=r.trim().split(/\s+/).join(" ")),!i&&!r&&e&&(i=e),{id:n,"aria-label":i,"aria-labelledby":r}}function Bl(t){const e=x.useRef(null);return x.useMemo(()=>({get current(){return e.current},set current(n){e.current=n,typeof t=="function"?t(n):t&&(t.current=n)}}),[t])}function Hx(t,e){Yt(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function QD(t,e){let n=window.getComputedStyle(t),i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return i&&e&&(i=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),i}function ZD(t,e){const n=[];for(;t&&t!==document.documentElement;)QD(t,e)&&n.push(t),t=t.parentElement;return n}let JD=0;const Th=new Map;function e4(t){let[e,n]=x.useState();return Yt(()=>{if(!t)return;let i=Th.get(t);if(i)n(i.element.id);else{let r=`react-aria-description-${JD++}`;n(r);let s=document.createElement("div");s.id=r,s.style.display="none",s.textContent=t,document.body.appendChild(s),i={refCount:0,element:s},Th.set(t,i)}return i.refCount++,()=>{i&&--i.refCount===0&&(i.element.remove(),Th.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function Ch(t,e,n,i){let r=Ie(n),s=n==null;x.useEffect(()=>{if(s||!t.current)return;let o=t.current;return o.addEventListener(e,r,i),()=>{o.removeEventListener(e,r,i)}},[t,e,i,s,r])}function Wx(t,e){let n=Ux(t,e,"left"),i=Ux(t,e,"top"),r=e.offsetWidth,s=e.offsetHeight,o=t.scrollLeft,a=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(t),c=t.scrollLeft+parseInt(u,10),d=t.scrollTop+parseInt(l,10),f=c+t.clientWidth,h=d+t.clientHeight;n<=o?o=n-parseInt(u,10):n+r>f&&(o+=n+r-f),i<=d?a=i-parseInt(l,10):i+s>h&&(a+=i+s-h),t.scrollLeft=o,t.scrollTop=a}function Ux(t,e,n){const i=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;e.offsetParent&&(r+=e[i],e.offsetParent!==t);){if(e.offsetParent.contains(t)){r-=t[i];break}e=e.offsetParent}return r}function Yx(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let l=ZD(t);for(let u of l)Wx(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:c,top:d}=t.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var i,r,s;e==null||(r=e.containingElement)===null||r===void 0||(i=r.scrollIntoView)===null||i===void 0||i.call(r,{block:"center",inline:"center"}),(s=t.scrollIntoView)===null||s===void 0||s.call(t,{block:"nearest"})}}}}function Eh(t){return t.mozInputSource===0&&t.isTrusted?!0:_h()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function t4(t){return!_h()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Mh(t,e,n){let i=x.useRef(e),r=Ie(()=>{n&&n(i.current)});x.useEffect(()=>{var s;let o=t==null||(s=t.current)===null||s===void 0?void 0:s.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[t,r])}function vo(t,e,n){let[i,r]=x.useState(t||e),s=x.useRef(t!==void 0),o=t!==void 0;x.useEffect(()=>{let u=s.current;u!==o&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),s.current=o},[o]);let a=o?t:i,l=x.useCallback((u,...c)=>{let d=(f,...h)=>{n&&(Object.is(a,f)||n(f,...h)),o||(a=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"),r((h,...g)=>{let v=u(o?a:h,...g);return d(v,...c),o?h:v})):(o||r(u),d(u,...c))},[o,a,n]);return[a,l]}function Wr(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function Kl(t,e){let n=t,i=e.toString(),r=i.indexOf("."),s=r>=0?i.length-r:0;if(s>0){let o=Math.pow(10,s);n=Math.round(n*o)/o}return n}function ct(t,e,n,i){e=Number(e),n=Number(n);let r=(t-(isNaN(e)?0:e))%i,s=Kl(Math.abs(r)*2>=i?t+Math.sign(r)*(i-Math.abs(r)):t-r,i);return isNaN(e)?!isNaN(n)&&s>n&&(s=Math.floor(Kl(n/i,i))*i):sn&&(s=e+Math.floor(Kl((n-e)/i,i))*i),s=Kl(s,i),s}var Gx={exports:{}},Xx={};/** * @license React * use-sync-external-store-shim.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 Ur=x;function n4(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var i4=typeof Object.is=="function"?Object.is:n4,r4=Ur.useState,s4=Ur.useEffect,o4=Ur.useLayoutEffect,a4=Ur.useDebugValue;function l4(t,e){var n=e(),i=r4({inst:{value:n,getSnapshot:e}}),r=i[0].inst,s=i[1];return o4(function(){r.value=n,r.getSnapshot=e,Dh(r)&&s({inst:r})},[t,n,e]),s4(function(){return Dh(r)&&s({inst:r}),t(function(){Dh(r)&&s({inst:r})})},[t]),a4(n),n}function Dh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!i4(t,n)}catch(i){return!0}}function u4(t,e){return e()}var c4=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?u4:l4;Xx.useSyncExternalStore=Ur.useSyncExternalStore!==void 0?Ur.useSyncExternalStore:c4,Gx.exports=Xx;var d4=Gx.exports;const qx=x.createContext(!1),yo=x.createContext(null);function f4(t){if(x.useContext(yo))return t.content;let{collection:n,document:i}=g4(t.createCollection);return W.createElement(W.Fragment,null,W.createElement(MD,null,W.createElement(yo.Provider,{value:i},t.content)),W.createElement(h4,{render:t.children,collection:n}))}function h4({collection:t,render:e}){return e(t)}function p4(t,e,n){let i=go(),r=x.useRef(i);r.current=i;let s=x.useCallback(()=>r.current?n():e(),[e,n]);return d4.useSyncExternalStore(t,s)}const m4=typeof W.useSyncExternalStore=="function"?W.useSyncExternalStore:p4;function g4(t){let[e]=x.useState(()=>new bD((t==null?void 0:t())||new yD)),n=x.useCallback(o=>e.subscribe(o),[e]),i=x.useCallback(()=>{let o=e.getCollection();return e.isSSR&&e.resetAfterSSR(),o},[e]),r=x.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),s=m4(n,i,r);return Yt(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:s,document:e}}const Lh=x.createContext(null);function v4(t,e,n,i,r,s){let o=x.useCallback(l=>{l==null||l.setProps(e,n,i,s)},[e,n,i,s]),a=x.useContext(Lh);if(a){let l=a.ownerDocument.nodesByProps.get(e);return l||(l=a.ownerDocument.createElement(t),l.setProps(e,n,i,s),a.appendChild(l),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,l)),r?W.createElement(Lh.Provider,{value:l},r):null}return W.createElement(t,{ref:o},r)}function y4(t,e){let n=({node:r})=>e(r.props,r.props.ref,r),i=x.forwardRef((r,s)=>{if(!x.useContext(qx)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(r,s)}return v4(t,r,s,"children"in r?r.children:null,null,a=>W.createElement(n,{node:a}))});return i.displayName=e.name,i}function b4(t){return Fx(N($({},t),{addIdAndValue:!0}))}const Qx=x.createContext(null);function x4(t){let e=x.useContext(Qx),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),i=t.idScope||(e==null?void 0:e.idScope),r=b4(N($({},t),{idScope:i,dependencies:n}));return x.useContext(yo)&&(r=W.createElement(w4,null,r)),e=x.useMemo(()=>({dependencies:n,idScope:i}),[i,...n]),W.createElement(Qx.Provider,{value:e},r)}function w4({children:t}){let e=x.useContext(yo),n=x.useMemo(()=>W.createElement(yo.Provider,{value:null},W.createElement(qx.Provider,{value:!0},t)),[t]);return go()?W.createElement(Lh.Provider,{value:e},n):ml.createPortal(n,e)}const S4={CollectionRoot({collection:t,renderDropIndicator:e}){return Zx(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Zx(t,e,n)}};function Zx(t,e,n){return Fx({items:e?t.getChildren(e.key):t,dependencies:[n],children(i){var r;let s=i.render(i);if(!n||i.type!=="item")return s;let o=i.key,a=t.getKeyAfter(o);return W.createElement(W.Fragment,null,n({type:"item",key:o,dropPosition:"before"}),s,(a==null||((r=t.getItem(a))===null||r===void 0?void 0:r.type)!=="item")&&n({type:"item",key:o,dropPosition:"after"}))}})}const P4=x.createContext(S4);function _4(t){return x.useMemo(()=>t!=null?new Set([t]):null,[t])}const Jx=Symbol("default");function bo({values:t,children:e}){for(let[n,i]of t)e=W.createElement(n.Provider,{value:i},e);return e}function Pt(t){let{className:e,style:n,children:i,defaultClassName:r,defaultChildren:s,defaultStyle:o,values:a}=t;return x.useMemo(()=>{let l,u,c;return typeof e=="function"?l=e(N($({},a),{defaultClassName:r})):l=e,typeof n=="function"?u=n(N($({},a),{defaultStyle:o||{}})):u=n,typeof i=="function"?c=i(N($({},a),{defaultChildren:s})):i==null?c=s:c=i,{className:l!=null?l:r,style:u||o?$($({},o),u):void 0,children:c!=null?c:s,"data-rac":""}},[e,n,i,r,s,o,a])}function Hl(t,e){let n=x.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!e&&!n.slots[Jx])throw new Error(`A slot prop is required. Valid slot names are ${i}.`);let r=e||Jx;if(!n.slots[r])throw new Error(`Invalid slot "${e}". Valid slot names are ${i}.`);return n.slots[r]}return n}function on(t,e,n){let l=Hl(n,t.slot)||{},{ref:r}=l,s=ne(l,["ref"]),o=Bl(x.useMemo(()=>FD(e,r),[e,r])),a=ae(s,t);return"style"in s&&s.style&&"style"in t&&t.style&&(typeof s.style=="function"||typeof t.style=="function"?a.style=u=>{let c=typeof s.style=="function"?s.style(u):s.style,d=$($({},u.defaultStyle),c),f=typeof t.style=="function"?t.style(N($({},u),{defaultStyle:d})):t.style;return $($({},d),f)}:a.style=$($({},s.style),t.style)),[a,o]}function Ah(){let[t,e]=x.useState(!0),n=x.useRef(!1),i=x.useCallback(r=>{n.current=!0,e(!!r)},[]);return Yt(()=>{n.current||e(!1)},[]),[i,t]}function $4(t){const e=/^(data-.*)$/;let n={};for(const i in t)e.test(i)||(n[i]=t[i]);return n}let Yr="default",Rh="",Wl=new WeakMap;function Fh(t){if(zl()){if(Yr==="default"){const e=ut(t);Rh=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Yr="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(Wl.set(t,t.style.userSelect),t.style.userSelect="none")}function xo(t){if(zl()){if(Yr!=="disabled")return;Yr="restoring",setTimeout(()=>{Kx(()=>{if(Yr==="restoring"){const e=ut(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Rh||""),Rh="",Yr="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Wl.has(t)){let e=Wl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Wl.delete(t)}}const e1=W.createContext({register:()=>{}});e1.displayName="PressResponderContext";function k4(t,e){return e.get?e.get.call(t):e.value}function t1(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function T4(t,e){var n=t1(t,e,"get");return k4(t,n)}function C4(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E4(t,e,n){C4(t,e),e.set(t,n)}function M4(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function n1(t,e,n){var i=t1(t,e,"set");return M4(t,i,n),n}function D4(t){let e=x.useContext(e1);if(e){let n=e,{register:i}=n,r=ne(n,["register"]);t=ae(r,t),i()}return Hx(e,t.ref),t}var Ul=new WeakMap;class Yl{continuePropagation(){n1(this,Ul,!1)}get shouldStopPropagation(){return T4(this,Ul)}constructor(e,n,i,r){E4(this,Ul,{writable:!0,value:void 0}),n1(this,Ul,!0);var s;let o=(s=r==null?void 0:r.target)!==null&&s!==void 0?s:i.currentTarget;const a=o==null?void 0:o.getBoundingClientRect();let l,u=0,c,d=null;i.clientX!=null&&i.clientY!=null&&(c=i.clientX,d=i.clientY),a&&(c!=null&&d!=null?(l=c-a.left,u=d-a.top):(l=a.width/2,u=a.height/2)),this.type=e,this.pointerType=n,this.target=i.currentTarget,this.shiftKey=i.shiftKey,this.metaKey=i.metaKey,this.ctrlKey=i.ctrlKey,this.altKey=i.altKey,this.x=l,this.y=u}}const i1=Symbol("linkClicked");function Ih(t){let E=D4(t),{onPress:e,onPressChange:n,onPressStart:i,onPressEnd:r,onPressUp:s,isDisabled:o,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d}=E,f=ne(E,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref"]),[h,g]=x.useState(!1),v=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:p}=Hr(),m=Ie((w,_)=>{let R=v.current;if(o||R.didFirePressStart)return!1;let k=!0;if(R.isTriggeringEvent=!0,i){let O=new Yl("pressstart",_,w);i(O),k=O.shouldStopPropagation}return n&&n(!0),R.isTriggeringEvent=!1,R.didFirePressStart=!0,g(!0),k}),y=Ie((w,_,R=!0)=>{let k=v.current;if(!k.didFirePressStart)return!1;k.ignoreClickAfterPress=!0,k.didFirePressStart=!1,k.isTriggeringEvent=!0;let O=!0;if(r){let D=new Yl("pressend",_,w);r(D),O=D.shouldStopPropagation}if(n&&n(!1),g(!1),e&&R&&!o){let D=new Yl("press",_,w);e(D),O&&(O=D.shouldStopPropagation)}return k.isTriggeringEvent=!1,O}),S=Ie((w,_)=>{let R=v.current;if(o)return!1;if(s){R.isTriggeringEvent=!0;let k=new Yl("pressup",_,w);return s(k),R.isTriggeringEvent=!1,k.shouldStopPropagation}return!0}),P=Ie(w=>{let _=v.current;_.isPressed&&_.target&&(_.isOverTarget&&_.pointerType!=null&&y(Cn(_.target,w),_.pointerType,!1),_.isPressed=!1,_.isOverTarget=!1,_.activePointerId=null,_.pointerType=null,p(),c||xo(_.target))}),C=Ie(w=>{u&&P(w)}),M=x.useMemo(()=>{let w=v.current,_={onKeyDown(k){if(Vh(k.nativeEvent,k.currentTarget)&&k.currentTarget.contains(k.target)){var O;o1(k.target,k.key)&&k.preventDefault();let D=!0;if(!w.isPressed&&!k.repeat){w.target=k.currentTarget,w.isPressed=!0,D=m(k,"keyboard");let V=k.currentTarget,T=L=>{Vh(L,V)&&!L.repeat&&V.contains(L.target)&&w.target&&S(Cn(w.target,L),"keyboard")};b(ut(k.currentTarget),"keyup",Sh(T,R),!0)}D&&k.stopPropagation(),k.metaKey&&Bi()&&((O=w.metaKeyEvents)===null||O===void 0||O.set(k.key,k.nativeEvent))}else k.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick(k){if(!(k&&!k.currentTarget.contains(k.target))&&k&&k.button===0&&!w.isTriggeringEvent&&!Ki.isOpening){let O=!0;if(o&&k.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Eh(k.nativeEvent))){!o&&!l&&sn(k.currentTarget);let D=m(k,"virtual"),V=S(k,"virtual"),T=y(k,"virtual");O=D&&V&&T}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,O&&k.stopPropagation()}}},R=k=>{var O;if(w.isPressed&&w.target&&Vh(k,w.target)){var D;o1(k.target,k.key)&&k.preventDefault();let T=k.target;y(Cn(w.target,k),"keyboard",w.target.contains(T)),p(),k.key!=="Enter"&&Oh(w.target)&&w.target.contains(T)&&!k[i1]&&(k[i1]=!0,Ki(w.target,k,!1)),w.isPressed=!1,(D=w.metaKeyEvents)===null||D===void 0||D.delete(k.key)}else if(k.key==="Meta"&&(!((O=w.metaKeyEvents)===null||O===void 0)&&O.size)){var V;let T=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let L of T.values())(V=w.target)===null||V===void 0||V.dispatchEvent(new KeyboardEvent("keyup",L))}};if(typeof PointerEvent!="undefined"){_.onPointerDown=T=>{if(T.button!==0||!T.currentTarget.contains(T.target))return;if(t4(T.nativeEvent)){w.pointerType="virtual";return}Nh(T.currentTarget)&&T.preventDefault(),w.pointerType=T.pointerType;let L=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=T.pointerId,w.target=T.currentTarget,!o&&!l&&sn(T.currentTarget),c||Fh(w.target),L=m(T,w.pointerType),b(ut(T.currentTarget),"pointermove",k,!1),b(ut(T.currentTarget),"pointerup",O,!1),b(ut(T.currentTarget),"pointercancel",V,!1)),L&&T.stopPropagation()},_.onMouseDown=T=>{T.currentTarget.contains(T.target)&&T.button===0&&(Nh(T.currentTarget)&&T.preventDefault(),T.stopPropagation())},_.onPointerUp=T=>{!T.currentTarget.contains(T.target)||w.pointerType==="virtual"||T.button===0&&Gr(T,T.currentTarget)&&S(T,w.pointerType||T.pointerType)};let k=T=>{T.pointerId===w.activePointerId&&(w.target&&Gr(T,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,m(Cn(w.target,T),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,y(Cn(w.target,T),w.pointerType,!1),C(T)))},O=T=>{T.pointerId===w.activePointerId&&w.isPressed&&T.button===0&&w.target&&(Gr(T,w.target)&&w.pointerType!=null?y(Cn(w.target,T),w.pointerType):w.isOverTarget&&w.pointerType!=null&&y(Cn(w.target,T),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,p(),c||xo(w.target),"ontouchend"in w.target&&T.pointerType!=="mouse"&&b(w.target,"touchend",D,{once:!0}))},D=T=>{s1(T.currentTarget)&&T.preventDefault()},V=T=>{P(T)};_.onDragStart=T=>{T.currentTarget.contains(T.target)&&P(T)}}else{_.onMouseDown=D=>{if(D.button!==0||!D.currentTarget.contains(D.target))return;if(Nh(D.currentTarget)&&D.preventDefault(),w.ignoreEmulatedMouseEvents){D.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=D.currentTarget,w.pointerType=Eh(D.nativeEvent)?"virtual":"mouse",!o&&!l&&sn(D.currentTarget),m(D,w.pointerType)&&D.stopPropagation(),b(ut(D.currentTarget),"mouseup",k,!1)},_.onMouseEnter=D=>{if(!D.currentTarget.contains(D.target))return;let V=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,V=m(D,w.pointerType)),V&&D.stopPropagation()},_.onMouseLeave=D=>{if(!D.currentTarget.contains(D.target))return;let V=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,V=y(D,w.pointerType,!1),C(D)),V&&D.stopPropagation()},_.onMouseUp=D=>{D.currentTarget.contains(D.target)&&!w.ignoreEmulatedMouseEvents&&D.button===0&&S(D,w.pointerType||"mouse")};let k=D=>{if(D.button===0){if(w.isPressed=!1,p(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Gr(D,w.target)&&w.pointerType!=null?y(Cn(w.target,D),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&y(Cn(w.target,D),w.pointerType,!1),w.isOverTarget=!1}};_.onTouchStart=D=>{if(!D.currentTarget.contains(D.target))return;let V=L4(D.nativeEvent);if(!V)return;w.activePointerId=V.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=D.currentTarget,w.pointerType="touch",!o&&!l&&sn(D.currentTarget),c||Fh(w.target),m(ui(w.target,D),w.pointerType)&&D.stopPropagation(),b(Rt(D.currentTarget),"scroll",O,!0)},_.onTouchMove=D=>{if(!D.currentTarget.contains(D.target))return;if(!w.isPressed){D.stopPropagation();return}let V=r1(D.nativeEvent,w.activePointerId),T=!0;V&&Gr(V,D.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,T=m(ui(w.target,D),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,T=y(ui(w.target,D),w.pointerType,!1),C(ui(w.target,D))),T&&D.stopPropagation()},_.onTouchEnd=D=>{if(!D.currentTarget.contains(D.target))return;if(!w.isPressed){D.stopPropagation();return}let V=r1(D.nativeEvent,w.activePointerId),T=!0;V&&Gr(V,D.currentTarget)&&w.pointerType!=null?(S(ui(w.target,D),w.pointerType),T=y(ui(w.target,D),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(T=y(ui(w.target,D),w.pointerType,!1)),T&&D.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!c&&xo(w.target),p()},_.onTouchCancel=D=>{D.currentTarget.contains(D.target)&&(D.stopPropagation(),w.isPressed&&P(ui(w.target,D)))};let O=D=>{w.isPressed&&D.target.contains(w.target)&&P({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};_.onDragStart=D=>{D.currentTarget.contains(D.target)&&P(D)}}return _},[b,o,l,p,c,P,C,y,m,S]);return x.useEffect(()=>()=>{var w;c||xo((w=v.current.target)!==null&&w!==void 0?w:void 0)},[c]),{isPressed:a||h,pressProps:ae(f,M)}}function Oh(t){return t.tagName==="A"&&t.hasAttribute("href")}function Vh(t,e){const{key:n,code:i}=t,r=e,s=r.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||i==="Space")&&!(r instanceof Rt(r).HTMLInputElement&&!a1(r,n)||r instanceof Rt(r).HTMLTextAreaElement||r.isContentEditable)&&!((s==="link"||!s&&Oh(r))&&n!=="Enter")}function L4(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function r1(t,e){const n=t.changedTouches;for(let i=0;ie.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Gr(t,e){let n=e.getBoundingClientRect(),i=A4(t);return R4(n,i)}function Nh(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function s1(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Oh(t)}function o1(t,e){return t instanceof HTMLInputElement?!a1(t,e):s1(t)}const F4=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function a1(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":F4.has(t.type)}class I4{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,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=e}}function l1(t){let e=x.useRef({isFocused:!1,observer:null});Yt(()=>{const i=e.current;return()=>{i.observer&&(i.observer.disconnect(),i.observer=null)}},[]);let n=Ie(i=>{t==null||t(i)});return x.useCallback(i=>{if(i.target instanceof HTMLButtonElement||i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLSelectElement){e.current.isFocused=!0;let r=i.target,s=o=>{e.current.isFocused=!1,r.disabled&&n(new I4("blur",o)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};r.addEventListener("focusout",s,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&r.disabled){var o;(o=e.current.observer)===null||o===void 0||o.disconnect();let a=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function zh(t){let{isDisabled:e,onFocus:n,onBlur:i,onFocusChange:r}=t;const s=x.useCallback(l=>{if(l.target===l.currentTarget)return i&&i(l),r&&r(!1),!0},[i,r]),o=l1(s),a=x.useCallback(l=>{const u=ut(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),r&&r(!0),o(l))},[r,n,o]);return{focusProps:{onFocus:!e&&(n||r||i)?a:void 0,onBlur:!e&&(i||r)?s:void 0}}}let Hi=null,jh=new Set,wo=new Map,Wi=!1,Bh=!1;const O4={Tab:!0,Escape:!0};function Gl(t,e){for(let n of jh)n(t,e)}function V4(t){return!(t.metaKey||!Bi()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Xl(t){Wi=!0,V4(t)&&(Hi="keyboard",Gl("keyboard",t))}function Ft(t){Hi="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Wi=!0,Gl("pointer",t))}function u1(t){Eh(t)&&(Wi=!0,Hi="virtual")}function c1(t){t.target===window||t.target===document||(!Wi&&!Bh&&(Hi="virtual",Gl("virtual",t)),Wi=!1,Bh=!1)}function d1(){Wi=!1,Bh=!0}function Kh(t){if(typeof window=="undefined"||wo.get(Rt(t)))return;const e=Rt(t),n=ut(t);let i=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Wi=!0,i.apply(this,arguments)},n.addEventListener("keydown",Xl,!0),n.addEventListener("keyup",Xl,!0),n.addEventListener("click",u1,!0),e.addEventListener("focus",c1,!0),e.addEventListener("blur",d1,!1),typeof PointerEvent!="undefined"?(n.addEventListener("pointerdown",Ft,!0),n.addEventListener("pointermove",Ft,!0),n.addEventListener("pointerup",Ft,!0)):(n.addEventListener("mousedown",Ft,!0),n.addEventListener("mousemove",Ft,!0),n.addEventListener("mouseup",Ft,!0)),e.addEventListener("beforeunload",()=>{f1(t)},{once:!0}),wo.set(e,{focus:i})}const f1=(t,e)=>{const n=Rt(t),i=ut(t);e&&i.removeEventListener("DOMContentLoaded",e),wo.has(n)&&(n.HTMLElement.prototype.focus=wo.get(n).focus,i.removeEventListener("keydown",Xl,!0),i.removeEventListener("keyup",Xl,!0),i.removeEventListener("click",u1,!0),n.removeEventListener("focus",c1,!0),n.removeEventListener("blur",d1,!1),typeof PointerEvent!="undefined"?(i.removeEventListener("pointerdown",Ft,!0),i.removeEventListener("pointermove",Ft,!0),i.removeEventListener("pointerup",Ft,!0)):(i.removeEventListener("mousedown",Ft,!0),i.removeEventListener("mousemove",Ft,!0),i.removeEventListener("mouseup",Ft,!0)),wo.delete(n))};function N4(t){const e=ut(t);let n;return e.readyState!=="loading"?Kh(t):(n=()=>{Kh(t)},e.addEventListener("DOMContentLoaded",n)),()=>f1(t,n)}typeof document!="undefined"&&N4();function h1(){return Hi!=="pointer"}function Hh(){return Hi}function p1(t){Hi=t,Gl(t,null)}const z4=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function j4(t,e,n){var i;const r=typeof window!="undefined"?Rt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window!="undefined"?Rt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window!="undefined"?Rt(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window!="undefined"?Rt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof r&&!z4.has(n==null||(i=n.target)===null||i===void 0?void 0:i.type)||(n==null?void 0:n.target)instanceof s||(n==null?void 0:n.target)instanceof o&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof a&&!O4[n.key])}function B4(t,e,n){Kh(),x.useEffect(()=>{let i=(r,s)=>{j4(!!(n!=null&&n.isTextInput),r,s)&&t(h1())};return jh.add(i),()=>{jh.delete(i)}},e)}function Wh(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:i,onFocusWithinChange:r}=t,s=x.useRef({isFocusWithin:!1}),o=x.useCallback(u=>{s.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(u),r&&r(!1))},[n,r,s]),a=l1(o),l=x.useCallback(u=>{!s.current.isFocusWithin&&document.activeElement===u.target&&(i&&i(u),r&&r(!0),s.current.isFocusWithin=!0,a(u))},[i,r,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}let ql=!1,Uh=0;function Yh(){ql=!0,setTimeout(()=>{ql=!1},50)}function m1(t){t.pointerType==="touch"&&Yh()}function K4(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",m1):document.addEventListener("touchend",Yh),Uh++,()=>{Uh--,!(Uh>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",m1):document.removeEventListener("touchend",Yh))}}function Xr(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:i,isDisabled:r}=t,[s,o]=x.useState(!1),a=x.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;x.useEffect(K4,[]);let{hoverProps:l,triggerHoverEnd:u}=x.useMemo(()=>{let c=(h,g)=>{if(a.pointerType=g,r||g==="touch"||a.isHovered||!h.currentTarget.contains(h.target))return;a.isHovered=!0;let v=h.currentTarget;a.target=v,e&&e({type:"hoverstart",target:v,pointerType:g}),n&&n(!0),o(!0)},d=(h,g)=>{if(a.pointerType="",a.target=null,g==="touch"||!a.isHovered)return;a.isHovered=!1;let v=h.currentTarget;i&&i({type:"hoverend",target:v,pointerType:g}),n&&n(!1),o(!1)},f={};return typeof PointerEvent!="undefined"?(f.onPointerEnter=h=>{ql&&h.pointerType==="mouse"||c(h,h.pointerType)},f.onPointerLeave=h=>{!r&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=h=>{!a.ignoreEmulatedMouseEvents&&!ql&&c(h,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=h=>{!r&&h.currentTarget.contains(h.target)&&d(h,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[e,n,i,r,a]);return x.useEffect(()=>{r&&u({currentTarget:a.target},a.pointerType)},[r]),{hoverProps:l,isHovered:s}}function g1(t){if(!t)return;let e=!0;return n=>{let i=N($({},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(){e=!1}});t(i),e&&n.stopPropagation()}}function v1(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:g1(t.onKeyDown),onKeyUp:g1(t.onKeyUp)}}}function y1(t){let{onMoveStart:e,onMove:n,onMoveEnd:i}=t,r=x.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:s,removeGlobalListener:o}=Hr(),a=Ie((c,d,f,h)=>{f===0&&h===0||(r.current.didMove||(r.current.didMove=!0,e==null||e({type:"movestart",pointerType:d,shiftKey:c.shiftKey,metaKey:c.metaKey,ctrlKey:c.ctrlKey,altKey:c.altKey})),n==null||n({type:"move",pointerType:d,deltaX:f,deltaY:h,shiftKey:c.shiftKey,metaKey:c.metaKey,ctrlKey:c.ctrlKey,altKey:c.altKey}))}),l=Ie((c,d)=>{xo(),r.current.didMove&&(i==null||i({type:"moveend",pointerType:d,shiftKey:c.shiftKey,metaKey:c.metaKey,ctrlKey:c.ctrlKey,altKey:c.altKey}))});return{moveProps:x.useMemo(()=>{let c={},d=()=>{Fh(),r.current.didMove=!1};if(typeof PointerEvent=="undefined"){let h=p=>{if(p.button===0){var m,y,S,P;a(p,"mouse",p.pageX-((S=(m=r.current.lastPosition)===null||m===void 0?void 0:m.pageX)!==null&&S!==void 0?S:0),p.pageY-((P=(y=r.current.lastPosition)===null||y===void 0?void 0:y.pageY)!==null&&P!==void 0?P:0)),r.current.lastPosition={pageX:p.pageX,pageY:p.pageY}}},g=p=>{p.button===0&&(l(p,"mouse"),o(window,"mousemove",h,!1),o(window,"mouseup",g,!1))};c.onMouseDown=p=>{p.button===0&&(d(),p.stopPropagation(),p.preventDefault(),r.current.lastPosition={pageX:p.pageX,pageY:p.pageY},s(window,"mousemove",h,!1),s(window,"mouseup",g,!1))};let v=p=>{let m=[...p.changedTouches].findIndex(({identifier:M})=>M===r.current.id);if(m>=0){var y,S;let{pageX:M,pageY:E}=p.changedTouches[m];var P,C;a(p,"touch",M-((P=(y=r.current.lastPosition)===null||y===void 0?void 0:y.pageX)!==null&&P!==void 0?P:0),E-((C=(S=r.current.lastPosition)===null||S===void 0?void 0:S.pageY)!==null&&C!==void 0?C:0)),r.current.lastPosition={pageX:M,pageY:E}}},b=p=>{[...p.changedTouches].findIndex(({identifier:y})=>y===r.current.id)>=0&&(l(p,"touch"),r.current.id=null,o(window,"touchmove",v),o(window,"touchend",b),o(window,"touchcancel",b))};c.onTouchStart=p=>{if(p.changedTouches.length===0||r.current.id!=null)return;let{pageX:m,pageY:y,identifier:S}=p.changedTouches[0];d(),p.stopPropagation(),p.preventDefault(),r.current.lastPosition={pageX:m,pageY:y},r.current.id=S,s(window,"touchmove",v,!1),s(window,"touchend",b,!1),s(window,"touchcancel",b,!1)}}else{let h=v=>{if(v.pointerId===r.current.id){var b,p;let S=v.pointerType||"mouse";var m,y;a(v,S,v.pageX-((m=(b=r.current.lastPosition)===null||b===void 0?void 0:b.pageX)!==null&&m!==void 0?m:0),v.pageY-((y=(p=r.current.lastPosition)===null||p===void 0?void 0:p.pageY)!==null&&y!==void 0?y:0)),r.current.lastPosition={pageX:v.pageX,pageY:v.pageY}}},g=v=>{if(v.pointerId===r.current.id){let b=v.pointerType||"mouse";l(v,b),r.current.id=null,o(window,"pointermove",h,!1),o(window,"pointerup",g,!1),o(window,"pointercancel",g,!1)}};c.onPointerDown=v=>{v.button===0&&r.current.id==null&&(d(),v.stopPropagation(),v.preventDefault(),r.current.lastPosition={pageX:v.pageX,pageY:v.pageY},r.current.id=v.pointerId,s(window,"pointermove",h,!1),s(window,"pointerup",g,!1),s(window,"pointercancel",g,!1))}}let f=(h,g,v)=>{d(),a(h,"keyboard",g,v),l(h,"keyboard")};return c.onKeyDown=h=>{switch(h.key){case"Left":case"ArrowLeft":h.preventDefault(),h.stopPropagation(),f(h,-1,0);break;case"Right":case"ArrowRight":h.preventDefault(),h.stopPropagation(),f(h,1,0);break;case"Up":case"ArrowUp":h.preventDefault(),h.stopPropagation(),f(h,0,-1);break;case"Down":case"ArrowDown":h.preventDefault(),h.stopPropagation(),f(h,0,1);break}},c},[r,s,o,a,l])}}function H4(t,e){let{onScroll:n,isDisabled:i}=t,r=x.useCallback(s=>{s.ctrlKey||(s.preventDefault(),s.stopPropagation(),n&&n({deltaX:s.deltaX,deltaY:s.deltaY}))},[n]);Ch(e,"wheel",i?void 0:r)}const W4=500;function U4(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:i,onLongPress:r,threshold:s=W4,accessibilityDescription:o}=t;const a=x.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=Hr(),{pressProps:c}=Ih({isDisabled:e,onPressStart(f){if(f.continuePropagation(),(f.pointerType==="mouse"||f.pointerType==="touch")&&(n&&n(N($({},f),{type:"longpressstart"})),a.current=setTimeout(()=>{f.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),r&&r(N($({},f),{type:"longpress"})),a.current=void 0},s),f.pointerType==="touch")){let h=g=>{g.preventDefault()};l(f.target,"contextmenu",h,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(f.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd(f){a.current&&clearTimeout(a.current),i&&(f.pointerType==="mouse"||f.pointerType==="touch")&&i(N($({},f),{type:"longpressend"}))}}),d=e4(r&&!e?o:void 0);return{longPressProps:ae(c,d)}}function Ql(t){const e=ut(t);if(Hh()==="virtual"){let n=e.activeElement;Kx(()=>{e.activeElement===n&&t.isConnected&&sn(t)})}else sn(t)}function Y4(t){const e=Rt(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:i}=t.style,r=n!=="none"&&i!=="hidden"&&i!=="collapse";if(r){const{getComputedStyle:s}=t.ownerDocument.defaultView;let{display:o,visibility:a}=s(t);r=o!=="none"&&a!=="hidden"&&a!=="collapse"}return r}function G4(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function b1(t,e){return t.nodeName!=="#comment"&&Y4(t)&&G4(t,e)&&(!t.parentElement||b1(t.parentElement,t))}const Gh=["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]"],X4=Gh.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Gh.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const q4=Gh.join(':not([hidden]):not([tabindex="-1"]),');function x1(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function w1(t,e,n){let i=e!=null&&e.tabbable?q4:X4,r=ut(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(i)&&b1(s)&&(!n||x1(s,n))&&(!(e!=null&&e.accept)||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(r.currentNode=e.from),r}class Xh{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,i){let r=this.fastMap.get(n!=null?n:null);if(!r)return;let s=new S1({scopeRef:e});r.addChild(s),s.parent=r,this.fastMap.set(e,s),i&&(s.nodeToRestore=i)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let i=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&x1(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let r=n.children;i&&(i.removeChild(n),r.size>0&&r.forEach(s=>i&&i.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*ds(this.traverse(n))}clone(){var e;let n=new Xh;var i;for(let r of this.traverse())n.addTreeNode(r.scopeRef,(i=(e=r.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&i!==void 0?i:null,r.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new S1({scopeRef:null}),this.fastMap.set(null,this.root)}}class S1{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new Xh;function Ui(t={}){let{autoFocus:e=!1,isTextInput:n,within:i}=t,r=x.useRef({isFocused:!1,isFocusVisible:e||h1()}),[s,o]=x.useState(!1),[a,l]=x.useState(()=>r.current.isFocused&&r.current.isFocusVisible),u=x.useCallback(()=>l(r.current.isFocused&&r.current.isFocusVisible),[]),c=x.useCallback(h=>{r.current.isFocused=h,o(h),u()},[u]);B4(h=>{r.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:d}=zh({isDisabled:i,onFocusChange:c}),{focusWithinProps:f}=Wh({isDisabled:!i,onFocusWithinChange:c});return{isFocused:s,isFocusVisible:a,focusProps:i?f:d}}let Q4=W.createContext(null);function Z4(t){let e=x.useContext(Q4)||{};Hx(e,t);let r=e,{ref:n}=r;return ne(r,["ref"])}function qh(t,e){let{focusProps:n}=zh(t),{keyboardProps:i}=v1(t),r=ae(n,i),s=Z4(e),o=t.isDisabled?{}:s,a=x.useRef(t.autoFocus);return x.useEffect(()=>{a.current&&e.current&&Ql(e.current),a.current=!1},[e]),{focusableProps:ae(N($({},r),{tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0}),o)}}function J4(t,e){let n=e==null?void 0:e.isDisabled,[i,r]=x.useState(!1);return Yt(()=>{if(t!=null&&t.current&&!n){let s=()=>{if(t.current){let a=w1(t.current,{tabbable:!0});r(!!a.nextNode())}};s();let o=new MutationObserver(s);return o.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{o.disconnect()}}}),n?!1:i}function e5(t,e){let p=t,{elementType:n="a",onPress:i,onPressStart:r,onPressEnd:s,onClick:o,isDisabled:a}=p,l=ne(p,["elementType","onPress","onPressStart","onPressEnd","onClick","isDisabled"]),u={};n!=="a"&&(u={role:"link",tabIndex:a?void 0:0});let{focusableProps:c}=qh(t,e),{pressProps:d,isPressed:f}=Ih({onPress:i,onPressStart:r,onPressEnd:s,isDisabled:a,ref:e}),h=Gt(l,{labelable:!0}),g=ae(c,d),v=jl(),b=jx(t);return{isPressed:f,linkProps:ae(h,b,N($($({},g),u),{"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:m=>{var y;(y=d.onClick)===null||y===void 0||y.call(d,m),o&&(o(m),console.warn("onClick is deprecated, please use onPress")),!v.isNative&&m.currentTarget instanceof HTMLAnchorElement&&m.currentTarget.href&&!m.isDefaultPrevented()&&GD(m.currentTarget,m)&&t.href&&(m.preventDefault(),v.open(m.currentTarget,m,t.href,t.routerOptions))}}))}}const t5=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),n5=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function i5(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),i=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(i)return i.direction==="rtl";if(n.script)return t5.has(n.script)}let e=t.split("-")[0];return n5.has(e)}const r5=Symbol.for("react-aria.i18n.locale");function P1(){let t=typeof window!="undefined"&&window[r5]||typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch(e){t="en-US"}return{locale:t,direction:i5(t)?"rtl":"ltr"}}let Qh=P1(),So=new Set;function _1(){Qh=P1();for(let t of So)t(Qh)}function s5(){let t=go(),[e,n]=x.useState(Qh);return x.useEffect(()=>(So.size===0&&window.addEventListener("languagechange",_1),So.add(n),()=>{So.delete(n),So.size===0&&window.removeEventListener("languagechange",_1)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const o5=W.createContext(null);function Yi(){let t=s5();return x.useContext(o5)||t}const a5=Symbol.for("react-aria.i18n.locale"),l5=Symbol.for("react-aria.i18n.strings");let qr;class Zl{getStringForLocale(e,n){let r=this.getStringsForLocale(n)[e];if(!r)throw new Error(`Could not find intl message ${e} in ${n} locale`);return r}getStringsForLocale(e){let n=this.strings[e];return n||(n=u5(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window=="undefined")return null;let n=window[a5];if(qr===void 0){let r=window[l5];if(!r)return null;qr={};for(let s in r)qr[s]=new Zl({[n]:r[s]},n)}let i=qr==null?void 0:qr[e];if(!i)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return i}constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,i])=>i)),this.defaultLocale=n}}function u5(t,e,n="en-US"){if(e[t])return e[t];let i=c5(t);if(e[i])return e[i];for(let r in e)if(r.startsWith(i+"-"))return e[r];return e[n]}function c5(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const $1=new Map,k1=new Map;class d5{format(e,n){let i=this.strings.getStringForLocale(e,this.locale);return typeof i=="function"?i(n,this):i}plural(e,n,i="cardinal"){let r=n["="+e];if(r)return typeof r=="function"?r():r;let s=this.locale+":"+i,o=$1.get(s);o||(o=new Intl.PluralRules(this.locale,{type:i}),$1.set(s,o));let a=o.select(e);return r=n[a]||n.other,typeof r=="function"?r():r}number(e){let n=k1.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),k1.set(this.locale,n)),n.format(e)}select(e,n){let i=e[n]||e.other;return typeof i=="function"?i():i}constructor(e,n){this.locale=e,this.strings=n}}const T1=new WeakMap;function f5(t){let e=T1.get(t);return e||(e=new Zl(t),T1.set(t,e)),e}function h5(t,e){return e&&Zl.getGlobalDictionaryForPackage(e)||f5(t)}function C1(t,e){let{locale:n}=Yi(),i=h5(t,e);return x.useMemo(()=>new d5(n,i),[n,i])}let Zh=new Map,Jh=!1;try{Jh=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(t){}let Jl=!1;try{Jl=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(t){}const E1={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class eu{format(e){let n="";if(!Jh&&this.options.signDisplay!=null?n=m5(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!Jl){var i;let{unit:r,unitDisplay:s="short",locale:o}=this.resolvedOptions();if(!r)return n;let a=(i=E1[r])===null||i===void 0?void 0:i[s];n+=a[o]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n= start date");let i=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(n);return[...i.map(s=>N($({},s),{source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(s=>N($({},s),{source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Jh&&this.options.signDisplay!=null&&(e=N($({},e),{signDisplay:this.options.signDisplay})),!Jl&&this.options.style==="unit"&&(e=N($({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,n={}){this.numberFormatter=p5(e,n),this.options=n}}function p5(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!Jl){var i;let{unit:o,unitDisplay:a="short"}=e;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=E1[o])===null||i===void 0)&&i[a]))throw new Error(`Unsupported unit ${o} with unitDisplay = ${a}`);e=N($({},e),{style:"decimal"})}let r=t+(e?Object.entries(e).sort((o,a)=>o[0]0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=t.format(-n),s=t.format(n),o=r.replace(s,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),r.replace(s,"!!!").replace(o,"+").replace("!!!",s)}else return t.format(n)}}const g5=new RegExp("^.*\\(.*\\).*$"),v5=["latn","arab","hanidec"];class M1{parse(e){return ep(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,i){return ep(this.locale,this.options,e).isValidPartialNumber(e,n,i)}getNumberingSystem(e){return ep(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}const D1=new Map;function ep(t,e,n){let i=L1(t,e);if(!t.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of v5)if(r!==i.options.numberingSystem){let s=L1(t+(t.includes("-u-")?"-nu-":"-u-nu-")+r,e);if(s.isValidPartialNumber(n))return s}}return i}function L1(t,e){let n=t+(e?Object.entries(e).sort((r,s)=>r[0]-1&&(n=`-${n}`)}let i=n?+n:NaN;if(isNaN(i))return NaN;if(this.options.style==="percent"){var r,s;let o=N($({},this.options),{style:"decimal",minimumFractionDigits:Math.min(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)+2,20),maximumFractionDigits:Math.min(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2,20)});return new M1(this.locale,o).parse(new eu(this.locale,o).format(i))}return this.options.currencySign==="accounting"&&g5.test(e)&&(i=-1*i),i}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=tu(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=tu(e,"."," ")),e}isValidPartialNumber(e,n=-1/0,i=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&i>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=tu(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,n={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=x5(e,this.formatter,this.options,n);var i,r;this.options.style==="percent"&&(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)>18||((r=this.options.maximumFractionDigits)!==null&&r!==void 0?r:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const A1=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),b5=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function x5(t,e,n,i){var r,s,o,a;let l=new Intl.NumberFormat(t,N($({},n),{minimumSignificantDigits:1,maximumSignificantDigits:21})),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=b5.map(_=>l.formatToParts(_));var f;let h=(f=(r=u.find(_=>_.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&f!==void 0?f:"-",g=(s=c.find(_=>_.type==="plusSign"))===null||s===void 0?void 0:s.value;!g&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(g="+");let b=(o=new Intl.NumberFormat(t,N($({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(_=>_.type==="decimal"))===null||o===void 0?void 0:o.value,p=(a=u.find(_=>_.type==="group"))===null||a===void 0?void 0:a.value,m=u.filter(_=>!A1.has(_.type)).map(_=>R1(_.value)),y=d.flatMap(_=>_.filter(R=>!A1.has(R.type)).map(R=>R1(R.value))),S=[...new Set([...m,...y])].sort((_,R)=>R.length-_.length),P=S.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${S.join("|")}|[\\p{White_Space}]`,"gu"),C=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),M=new Map(C.map((_,R)=>[_,R])),E=new RegExp(`[${C.join("")}]`,"g");return{minusSign:h,plusSign:g,decimal:b,group:p,literals:P,numeral:E,index:_=>String(M.get(_))}}function tu(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function R1(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tp(t={}){let{locale:e}=Yi();return x.useMemo(()=>new eu(e,t),[e,t])}const F1=7e3;let It=null;function w5(t,e="assertive",n=F1){It?It.announce(t,e,n):(It=new P5,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest!="undefined")?It.announce(t,e,n):setTimeout(()=>{It!=null&&It.isAttached()&&(It==null||It.announce(t,e,n))},100))}function S5(t){It&&It.clear(t)}class P5{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",i=F1){var r,s;if(!this.node)return;let o=document.createElement("div");typeof e=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,n==="assertive"?(r=this.assertiveLog)===null||r===void 0||r.appendChild(o):(s=this.politeLog)===null||s===void 0||s.appendChild(o),e!==""&&setTimeout(()=>{o.remove()},i)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document!="undefined"&&(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 _5(t,e,n){let{validationBehavior:i,focus:r}=t;Yt(()=>{if(i==="native"&&(n!=null&&n.current)){let l=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(k5(n.current))}});let s=Ie(()=>{e.resetValidation()}),o=Ie(l=>{var u;e.displayValidation.isInvalid||e.commitValidation();let c=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&n&&c&&T5(c)===n.current){var d;r?r():(d=n.current)===null||d===void 0||d.focus(),p1("keyboard")}l.preventDefault()}),a=Ie(()=>{e.commitValidation()});x.useEffect(()=>{let l=n==null?void 0:n.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",o),l.addEventListener("change",a),u==null||u.addEventListener("reset",s),()=>{l.removeEventListener("invalid",o),l.removeEventListener("change",a),u==null||u.removeEventListener("reset",s)}},[n,o,a,s,i])}function $5(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function k5(t){return{isInvalid:!t.validity.valid,validationDetails:$5(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function T5(t){for(let e=0;eN1(M5(o,r)),[o,r]);s!=null&&s.validationDetails.valid&&(s=null);let c=x.useContext(C5),d=x.useMemo(()=>i?Array.isArray(i)?i.flatMap(_=>ip(c[_])):ip(c[i]):[],[c,i]),[f,h]=x.useState(c),[g,v]=x.useState(!1);c!==f&&(h(c),v(!1));let b=x.useMemo(()=>N1(g?[]:d),[g,d]),p=x.useRef(Po),[m,y]=x.useState(Po),S=x.useRef(Po),P=()=>{if(!C)return;M(!1);let _=u||s||p.current;rp(_,S.current)||(S.current=_,y(_))},[C,M]=x.useState(!1);return x.useEffect(P),{realtimeValidation:l||b||u||s||Po,displayValidation:a==="native"?l||b||m:l||b||u||s||m,updateValidation(_){a==="aria"&&!rp(m,_)?y(_):p.current=_},resetValidation(){let _=Po;rp(_,S.current)||(S.current=_,y(_)),a==="native"&&M(!1),v(!0)},commitValidation(){a==="native"&&M(!0),v(!0)}}}function ip(t){return t?Array.isArray(t)?t:[t]:[]}function M5(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return ip(n)}return[]}function N1(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:O1}:null}function rp(t,e){return t===e?!0:t&&e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,i)=>n===e.validationErrors[i])&&Object.entries(t.validationDetails).every(([n,i])=>e.validationDetails[n]===i)}function sp(t){let{id:e,label:n,"aria-labelledby":i,"aria-label":r,labelElementType:s="label"}=t;e=li(e);let o=li(),a={};n?(i=i?`${o} ${i}`:o,a={id:o,htmlFor:s==="label"?e:void 0}):!i&&!r&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=kh({id:e,"aria-label":r,"aria-labelledby":i});return{labelProps:a,fieldProps:l}}function D5(t){let{description:e,errorMessage:n,isInvalid:i,validationState:r}=t,{labelProps:s,fieldProps:o}=sp(t),a=Ox([!!e,!!n,i,r]),l=Ox([!!e,!!n,i,r]);return o=ae(o,{"aria-describedby":[a,l,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:o,descriptionProps:{id:a},errorMessageProps:{id:l}}}const L5=0,A5=100,R5=1;function F5(t){const{isDisabled:e=!1,minValue:n=L5,maxValue:i=A5,numberFormatter:r,step:s=R5,orientation:o="horizontal"}=t;let a=x.useMemo(()=>{let I=(i-n)/10;return I=ct(I,0,I+s,s),Math.max(I,s)},[s,i,n]),l=x.useCallback(I=>I==null?void 0:I.map((j,Q)=>{let H=Q===0?n:j[Q-1],ee=Q===I.length-1?i:j[Q+1];return ct(j,H,ee,s)}),[n,i,s]),u=x.useMemo(()=>l(j1(t.value)),[t.value]),c=x.useMemo(()=>{var I;return l((I=j1(t.defaultValue))!==null&&I!==void 0?I:[n])},[t.defaultValue,n]),d=B1(t.value,t.defaultValue,t.onChange),f=B1(t.value,t.defaultValue,t.onChangeEnd);const[h,g]=vo(u,c,d),[v,b]=x.useState(new Array(h.length).fill(!1)),p=x.useRef(new Array(h.length).fill(!0)),[m,y]=x.useState(void 0),S=x.useRef(h),P=x.useRef(v);let C=I=>{S.current=I,g(I)},M=I=>{P.current=I,b(I)};function E(I){return(I-n)/(i-n)}function w(I){return I===0?n:h[I-1]}function _(I){return I===h.length-1?i:h[I+1]}function R(I){return p.current[I]}function k(I,j){p.current[I]=j}function O(I,j){if(e||!R(I))return;const Q=w(I),H=_(I);j=ct(j,Q,H,s);let ee=z1(S.current,I,j);C(ee)}function D(I,j){if(e||!R(I))return;j&&(S.current=h);const Q=P.current[I];P.current=z1(P.current,I,j),M(P.current),f&&Q&&!P.current.some(Boolean)&&f(S.current)}function V(I){return r.format(I)}function T(I,j){O(I,F(j))}function L(I){return Math.round((I-n)/s)*s+n}function F(I){const j=I*(i-n)+n;return Wr(L(j),n,i)}function z(I,j=1){let Q=Math.max(j,s);O(I,ct(h[I]+Q,n,i,s))}function K(I,j=1){let Q=Math.max(j,s);O(I,ct(h[I]-Q,n,i,s))}return{values:h,getThumbValue:I=>h[I],setThumbValue:O,setThumbPercent:T,isThumbDragging:I=>v[I],setThumbDragging:D,focusedThumb:m,setFocusedThumb:y,getThumbPercent:I=>E(h[I]),getValuePercent:E,getThumbValueLabel:I=>V(h[I]),getFormattedValue:V,getThumbMinValue:w,getThumbMaxValue:_,getPercentValue:F,isThumbEditable:R,setThumbEditable:k,incrementThumb:z,decrementThumb:K,step:s,pageSize:a,orientation:o,isDisabled:e}}function z1(t,e,n){return t[e]===n?t:[...t.slice(0,e),n,...t.slice(e+1)]}function j1(t){if(t!=null)return Array.isArray(t)?t:[t]}function B1(t,e,n){return i=>{typeof t=="number"||typeof e=="number"?n==null||n(i[0]):n==null||n(i)}}function I5(t){let{minValue:e,maxValue:n,step:i,formatOptions:r,value:s,defaultValue:o=NaN,onChange:a,locale:l,isDisabled:u,isReadOnly:c}=t;s===null&&(s=NaN),s!==void 0&&!isNaN(s)&&(i!==void 0&&!isNaN(i)?s=ct(s,e,n,i):s=Wr(s,e,n)),isNaN(o)||(i!==void 0&&!isNaN(i)?o=ct(o,e,n,i):o=Wr(o,e,n));let[d,f]=vo(s,isNaN(o)?NaN:o,a),[h,g]=x.useState(()=>isNaN(d)?"":new eu(l,r).format(d)),v=x.useMemo(()=>new M1(l,r),[l,r]),b=x.useMemo(()=>v.getNumberingSystem(h),[v,h]),p=x.useMemo(()=>new eu(l,N($({},r),{numberingSystem:b})),[l,r,b]),m=x.useMemo(()=>p.resolvedOptions(),[p]),y=x.useCallback(j=>isNaN(j)||j===null?"":p.format(j),[p]),S=V1(N($({},t),{value:d})),P=i!==void 0&&!isNaN(i)?i:1;m.style==="percent"&&(i===void 0||isNaN(i))&&(P=.01);let[C,M]=x.useState(d),[E,w]=x.useState(l),[_,R]=x.useState(r);(!Object.is(d,C)||l!==E||r!==_)&&(g(y(d)),M(d),w(l),R(r));let k=x.useMemo(()=>v.parse(h),[v,h]),O=()=>{if(!h.length){f(NaN),g(s===void 0?"":y(d));return}if(isNaN(k)){g(y(d));return}let j;i===void 0||isNaN(i)?j=Wr(k,e,n):j=ct(k,e,n,i),j=v.parse(y(j)),f(j),g(y(s===void 0?j:d))},D=(j,Q=0)=>{let H=k;if(isNaN(H)){let ee=isNaN(Q)?0:Q;return ct(ee,e,n,P)}else{let ee=ct(H,e,n,P);return j==="+"&&ee>H||j==="-"&&ee{let j=D("+",e);j===d&&g(y(j)),f(j),S.commitValidation()},T=()=>{let j=D("-",n);j===d&&g(y(j)),f(j),S.commitValidation()},L=()=>{n!=null&&(f(ct(n,e,n,P)),S.commitValidation())},F=()=>{e!=null&&(f(e),S.commitValidation())},z=x.useMemo(()=>!u&&!c&&(isNaN(k)||n===void 0||isNaN(n)||ct(k,e,n,P)>k||op("+",k,P)<=n),[u,c,e,n,P,k]),K=x.useMemo(()=>!u&&!c&&(isNaN(k)||e===void 0||isNaN(e)||ct(k,e,n,P)=e),[u,c,e,n,P,k]),I=j=>v.isValidPartialNumber(j,e,n);return N($({},S),{validate:I,increment:V,incrementToMax:L,decrement:T,decrementToMin:F,canIncrement:z,canDecrement:K,minValue:e,maxValue:n,numberValue:k,setNumberValue:f,setInputValue:g,inputValue:h,commit:O})}function op(t,e,n){let i=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const r=e.toString().split("."),s=n.toString().split("."),o=r[1]&&r[1].length||0,a=s[1]&&s[1].length||0,l=Math.pow(10,Math.max(o,a));e=Math.round(e*l),n=Math.round(n*l),i=t==="+"?e+n:e-n,i/=l}return i}const K1={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 O5(t={}){let{style:e,isFocusable:n}=t,[i,r]=x.useState(!1),{focusWithinProps:s}=Wh({isDisabled:!n,onFocusWithinChange:a=>r(a)}),o=x.useMemo(()=>i?e:e?$($({},K1),e):K1,[i]);return{visuallyHiddenProps:N($({},s),{style:o})}}function V5(t){let a=t,{children:e,elementType:n="div",isFocusable:i,style:r}=a,s=ne(a,["children","elementType","isFocusable","style"]),{visuallyHiddenProps:o}=O5(t);return W.createElement(n,ae(s,o),e)}const ap=new WeakMap;function lp(t,e){let n=ap.get(t);if(!n)throw new Error("Unknown slider state");return`${n.id}-${e}`}function N5(t,e,n){let{labelProps:i,fieldProps:r}=sp(t),s=t.orientation==="vertical";var o;ap.set(e,{id:(o=i.id)!==null&&o!==void 0?o:r.id,"aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]});let{direction:a}=Yi(),{addGlobalListener:l,removeGlobalListener:u}=Hr();const c=x.useRef(null),d=a==="rtl",f=x.useRef(null),{moveProps:h}=y1({onMoveStart(){f.current=null},onMove({deltaX:p,deltaY:m}){let{height:y,width:S}=n.current.getBoundingClientRect(),P=s?y:S;f.current==null&&(f.current=e.getThumbPercent(c.current)*P);let C=s?m:p;if((s||d)&&(C=-C),f.current+=C,c.current!=null&&n.current){const M=Wr(f.current/P,0,1);e.setThumbPercent(c.current,M)}},onMoveEnd(){c.current!=null&&(e.setThumbDragging(c.current,!1),c.current=null)}});let g=x.useRef(void 0),v=(p,m,y,S)=>{if(n.current&&!t.isDisabled&&e.values.every((P,C)=>!e.isThumbDragging(C))){let{height:P,width:C,top:M,left:E}=n.current.getBoundingClientRect(),w=s?P:C,O=((s?S:y)-(s?M:E))/w;(a==="rtl"||s)&&(O=1-O);let D=e.getPercentValue(O),V,T=e.values.findIndex(L=>D-L<0);if(T===0)V=T;else if(T===-1)V=e.values.length-1;else{let L=e.values[T-1],F=e.values[T];Math.abs(L-D)=0&&e.isThumbEditable(V)?(p.preventDefault(),c.current=V,e.setFocusedThumb(V),g.current=m,e.setThumbDragging(c.current,!0),e.setThumbValue(V,D),l(window,"mouseup",b,!1),l(window,"touchend",b,!1),l(window,"pointerup",b,!1)):c.current=null}},b=p=>{var m,y;((y=p.pointerId)!==null&&y!==void 0?y:(m=p.changedTouches)===null||m===void 0?void 0:m[0].identifier)===g.current&&(c.current!=null&&(e.setThumbDragging(c.current,!1),c.current=null),u(window,"mouseup",b,!1),u(window,"touchend",b,!1),u(window,"pointerup",b,!1))};return"htmlFor"in i&&i.htmlFor&&(delete i.htmlFor,i.onClick=()=>{var p;(p=document.getElementById(lp(e,0)))===null||p===void 0||p.focus(),p1("keyboard")}),{labelProps:i,groupProps:$({role:"group"},r),trackProps:ae({onMouseDown(p){p.button!==0||p.altKey||p.ctrlKey||p.metaKey||v(p,void 0,p.clientX,p.clientY)},onPointerDown(p){p.pointerType==="mouse"&&(p.button!==0||p.altKey||p.ctrlKey||p.metaKey)||v(p,p.pointerId,p.clientX,p.clientY)},onTouchStart(p){v(p,p.changedTouches[0].identifier,p.changedTouches[0].clientX,p.changedTouches[0].clientY)},style:{position:"relative",touchAction:"none"}},h),outputProps:{htmlFor:e.values.map((p,m)=>lp(e,m)).join(" "),"aria-live":"off"}}}function z5(t,e){let{index:n=0,isRequired:i,validationState:r,isInvalid:s,trackRef:o,inputRef:a,orientation:l=e.orientation,name:u}=t,c=t.isDisabled||e.isDisabled,d=l==="vertical",{direction:f}=Yi(),{addGlobalListener:h,removeGlobalListener:g}=Hr(),v=ap.get(e);var b;const{labelProps:p,fieldProps:m}=sp(N($({},t),{id:lp(e,n),"aria-labelledby":`${v.id} ${(b=t["aria-labelledby"])!==null&&b!==void 0?b:""}`.trim()})),y=e.values[n],S=x.useCallback(()=>{a.current&&sn(a.current)},[a]),P=e.focusedThumb===n;x.useEffect(()=>{P&&S()},[P,S]);let C=f==="rtl",M=x.useRef(null),{keyboardProps:E}=v1({onKeyDown(T){let{getThumbMaxValue:L,getThumbMinValue:F,decrementThumb:z,incrementThumb:K,setThumbValue:I,setThumbDragging:j,pageSize:Q}=e;if(!/^(PageUp|PageDown|Home|End)$/.test(T.key)){T.continuePropagation();return}switch(T.preventDefault(),j(n,!0),T.key){case"PageUp":K(n,Q);break;case"PageDown":z(n,Q);break;case"Home":I(n,F(n));break;case"End":I(n,L(n));break}j(n,!1)}}),{moveProps:w}=y1({onMoveStart(){M.current=null,e.setThumbDragging(n,!0)},onMove({deltaX:T,deltaY:L,pointerType:F,shiftKey:z}){const{getThumbPercent:K,setThumbPercent:I,decrementThumb:j,incrementThumb:Q,step:H,pageSize:ee}=e;let{width:G,height:He}=o.current.getBoundingClientRect(),ir=d?He:G;if(M.current==null&&(M.current=K(n)*ir),F==="keyboard")T>0&&C||T<0&&!C||L>0?j(n,z?ee:H):Q(n,z?ee:H);else{let rr=d?L:T;(d||C)&&(rr=-rr),M.current+=rr,I(n,Wr(M.current/ir,0,1))}},onMoveEnd(){e.setThumbDragging(n,!1)}});e.setThumbEditable(n,!c);const{focusableProps:_}=qh(ae(t,{onFocus:()=>e.setFocusedThumb(n),onBlur:()=>e.setFocusedThumb(void 0)}),a);let R=x.useRef(void 0),k=T=>{S(),R.current=T,e.setThumbDragging(n,!0),h(window,"mouseup",O,!1),h(window,"touchend",O,!1),h(window,"pointerup",O,!1)},O=T=>{var L,F;((F=T.pointerId)!==null&&F!==void 0?F:(L=T.changedTouches)===null||L===void 0?void 0:L[0].identifier)===R.current&&(S(),e.setThumbDragging(n,!1),g(window,"mouseup",O,!1),g(window,"touchend",O,!1),g(window,"pointerup",O,!1))},D=e.getThumbPercent(n);(d||f==="rtl")&&(D=1-D);let V=c?{}:ae(E,w,{onMouseDown:T=>{T.button!==0||T.altKey||T.ctrlKey||T.metaKey||k()},onPointerDown:T=>{T.button!==0||T.altKey||T.ctrlKey||T.metaKey||k(T.pointerId)},onTouchStart:T=>{k(T.changedTouches[0].identifier)}});return Mh(a,y,T=>{e.setThumbValue(n,T)}),{inputProps:ae(_,m,{type:"range",tabIndex:c?void 0:0,min:e.getThumbMinValue(n),max:e.getThumbMaxValue(n),step:e.step,value:y,name:u,disabled:c,"aria-orientation":l,"aria-valuetext":e.getThumbValueLabel(n),"aria-required":i||void 0,"aria-invalid":s||r==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-describedby":[v["aria-describedby"],t["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[v["aria-details"],t["aria-details"]].filter(Boolean).join(" "),onChange:T=>{e.setThumbValue(n,parseFloat(T.target.value))}}),thumbProps:N($({},V),{style:{position:"absolute",[d?"top":"left"]:`${D*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}}),labelProps:p,isDragging:e.isThumbDragging(n),isDisabled:c,isFocused:P}}function j5(t,e){let{inputElementType:n="input",isDisabled:i=!1,isRequired:r=!1,isReadOnly:s=!1,type:o="text",validationBehavior:a="aria"}=t,[l,u]=vo(t.value,t.defaultValue||"",t.onChange),{focusableProps:c}=qh(t,e),d=V1(N($({},t),{value:l})),{isInvalid:f,validationErrors:h,validationDetails:g}=d.displayValidation,{labelProps:v,fieldProps:b,descriptionProps:p,errorMessageProps:m}=D5(N($({},t),{isInvalid:f,errorMessage:t.errorMessage||h})),y=Gt(t,{labelable:!0});const S={type:o,pattern:t.pattern};return Mh(e,l,u),_5(t,d,e),x.useEffect(()=>{if(e.current instanceof Rt(e.current).HTMLTextAreaElement){let P=e.current;Object.defineProperty(P,"defaultValue",{get:()=>P.value,set:()=>{},configurable:!0})}},[e]),{labelProps:v,inputProps:ae(y,n==="input"?S:void 0,$($({disabled:i,readOnly:s,required:r&&a==="native","aria-required":r&&a==="aria"||void 0,"aria-invalid":f||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],value:l,onChange:P=>u(P.target.value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,placeholder:t.placeholder,inputMode:t.inputMode,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput},c),b)),descriptionProps:p,errorMessageProps:m,isInvalid:f,validationErrors:h,validationDetails:g}}function H1(){return typeof window!="undefined"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function B5(t,e,n){let i=Ie(f=>{let h=n.current,g;switch(f.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":g=h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteContentForward":g=h.selectionEnd===h.selectionStart?h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd+1):h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteContentBackward":g=h.selectionEnd===h.selectionStart?h.value.slice(0,h.selectionStart-1)+h.value.slice(h.selectionStart):h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":g=h.value.slice(h.selectionStart);break;default:f.data!=null&&(g=h.value.slice(0,h.selectionStart)+f.data+h.value.slice(h.selectionEnd));break}(g==null||!e.validate(g))&&f.preventDefault()});x.useEffect(()=>{if(!H1())return;let f=n.current;return f.addEventListener("beforeinput",i,!1),()=>{f.removeEventListener("beforeinput",i,!1)}},[n,i]);let r=H1()?null:f=>{let h=f.target.value.slice(0,f.target.selectionStart)+f.data+f.target.value.slice(f.target.selectionEnd);e.validate(h)||f.preventDefault()},d=j5(t,n),{labelProps:s,inputProps:o,descriptionProps:a,errorMessageProps:l}=d,u=ne(d,["labelProps","inputProps","descriptionProps","errorMessageProps"]),c=x.useRef(null);return $({inputProps:ae(o,{onBeforeInput:r,onCompositionStart(){let{value:f,selectionStart:h,selectionEnd:g}=n.current;c.current={value:f,selectionStart:h,selectionEnd:g}},onCompositionEnd(){if(!e.validate(n.current.value)){let{value:f,selectionStart:h,selectionEnd:g}=c.current;n.current.value=f,n.current.setSelectionRange(h,g),e.setInputValue(f)}}}),labelProps:s,descriptionProps:a,errorMessageProps:l},u)}var W1={};W1={Empty:"فارغ"};var U1={};U1={Empty:"Изпразни"};var Y1={};Y1={Empty:"Prázdné"};var G1={};G1={Empty:"Tom"};var X1={};X1={Empty:"Leer"};var q1={};q1={Empty:"Άδειο"};var Q1={};Q1={Empty:"Empty"};var Z1={};Z1={Empty:"Vacío"};var J1={};J1={Empty:"Tühjenda"};var ew={};ew={Empty:"Tyhjä"};var tw={};tw={Empty:"Vide"};var nw={};nw={Empty:"ריק"};var iw={};iw={Empty:"Prazno"};var rw={};rw={Empty:"Üres"};var sw={};sw={Empty:"Vuoto"};var ow={};ow={Empty:"空"};var aw={};aw={Empty:"비어 있음"};var lw={};lw={Empty:"Tuščias"};var uw={};uw={Empty:"Tukšs"};var cw={};cw={Empty:"Tom"};var dw={};dw={Empty:"Leeg"};var fw={};fw={Empty:"Pusty"};var hw={};hw={Empty:"Vazio"};var pw={};pw={Empty:"Vazio"};var mw={};mw={Empty:"Gol"};var gw={};gw={Empty:"Не заполнено"};var vw={};vw={Empty:"Prázdne"};var yw={};yw={Empty:"Prazen"};var bw={};bw={Empty:"Prazno"};var xw={};xw={Empty:"Tomt"};var ww={};ww={Empty:"Boş"};var Sw={};Sw={Empty:"Пусто"};var Pw={};Pw={Empty:"空"};var _w={};_w={Empty:"空白"};var $w={};$w={"ar-AE":W1,"bg-BG":U1,"cs-CZ":Y1,"da-DK":G1,"de-DE":X1,"el-GR":q1,"en-US":Q1,"es-ES":Z1,"et-EE":J1,"fi-FI":ew,"fr-FR":tw,"he-IL":nw,"hr-HR":iw,"hu-HU":rw,"it-IT":sw,"ja-JP":ow,"ko-KR":aw,"lt-LT":lw,"lv-LV":uw,"nb-NO":cw,"nl-NL":dw,"pl-PL":fw,"pt-BR":hw,"pt-PT":pw,"ro-RO":mw,"ru-RU":gw,"sk-SK":vw,"sl-SI":yw,"sr-SP":bw,"sv-SE":xw,"tr-TR":ww,"uk-UA":Sw,"zh-CN":Pw,"zh-TW":_w};function K5(t){return t&&t.__esModule?t.default:t}function H5(t){const e=x.useRef(void 0);let{value:n,textValue:i,minValue:r,maxValue:s,isDisabled:o,isReadOnly:a,isRequired:l,onIncrement:u,onIncrementPage:c,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:g}=t;const v=C1(K5($w),"@react-aria/spinbutton"),b=()=>clearTimeout(e.current);x.useEffect(()=>()=>b(),[]);let p=R=>{if(!(R.ctrlKey||R.metaKey||R.shiftKey||R.altKey||a))switch(R.key){case"PageUp":if(c){R.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(R.preventDefault(),u==null||u());break;case"PageDown":if(f){R.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(R.preventDefault(),d==null||d());break;case"Home":h&&(R.preventDefault(),h==null||h());break;case"End":g&&(R.preventDefault(),g==null||g());break}},m=x.useRef(!1),y=()=>{m.current=!0},S=()=>{m.current=!1},P=i===""?v.format("Empty"):(i||`${n}`).replace("-","−");x.useEffect(()=>{m.current&&(S5("assertive"),w5(P,"assertive"))},[P]);const C=Ie(R=>{b(),u==null||u(),e.current=window.setTimeout(()=>{(s===void 0||isNaN(s)||n===void 0||isNaN(n)||n{b(),d==null||d(),e.current=window.setTimeout(()=>{(r===void 0||isNaN(r)||n===void 0||isNaN(n)||n>r)&&M(60)},R)});let E=R=>{R.preventDefault()},{addGlobalListener:w,removeAllGlobalListeners:_}=Hr();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":P,"aria-valuemin":r,"aria-valuemax":s,"aria-disabled":o||void 0,"aria-readonly":a||void 0,"aria-required":l||void 0,onKeyDown:p,onFocus:y,onBlur:S},incrementButtonProps:{onPressStart:()=>{C(400),w(window,"contextmenu",E)},onPressEnd:()=>{b(),_()},onFocus:y,onBlur:S},decrementButtonProps:{onPressStart:()=>{M(400),w(window,"contextmenu",E)},onPressEnd:()=>{b(),_()},onFocus:y,onBlur:S}}}var kw={};kw={decrease:t=>`خفض ${t.fieldLabel}`,increase:t=>`زيادة ${t.fieldLabel}`,numberField:"حقل رقمي"};var Tw={};Tw={decrease:t=>`Намаляване ${t.fieldLabel}`,increase:t=>`Усилване ${t.fieldLabel}`,numberField:"Номер на полето"};var Cw={};Cw={decrease:t=>`Snížit ${t.fieldLabel}`,increase:t=>`Zvýšit ${t.fieldLabel}`,numberField:"Číselné pole"};var Ew={};Ew={decrease:t=>`Reducer ${t.fieldLabel}`,increase:t=>`Øg ${t.fieldLabel}`,numberField:"Talfelt"};var Mw={};Mw={decrease:t=>`${t.fieldLabel} verringern`,increase:t=>`${t.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var Dw={};Dw={decrease:t=>`Μείωση ${t.fieldLabel}`,increase:t=>`Αύξηση ${t.fieldLabel}`,numberField:"Πεδίο αριθμού"};var Lw={};Lw={decrease:t=>`Decrease ${t.fieldLabel}`,increase:t=>`Increase ${t.fieldLabel}`,numberField:"Number field"};var Aw={};Aw={decrease:t=>`Reducir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo de número"};var Rw={};Rw={decrease:t=>`Vähenda ${t.fieldLabel}`,increase:t=>`Suurenda ${t.fieldLabel}`,numberField:"Numbri väli"};var Fw={};Fw={decrease:t=>`Vähennä ${t.fieldLabel}`,increase:t=>`Lisää ${t.fieldLabel}`,numberField:"Numerokenttä"};var Iw={};Iw={decrease:t=>`Diminuer ${t.fieldLabel}`,increase:t=>`Augmenter ${t.fieldLabel}`,numberField:"Champ de nombre"};var Ow={};Ow={decrease:t=>`הקטן ${t.fieldLabel}`,increase:t=>`הגדל ${t.fieldLabel}`,numberField:"שדה מספר"};var Vw={};Vw={decrease:t=>`Smanji ${t.fieldLabel}`,increase:t=>`Povećaj ${t.fieldLabel}`,numberField:"Polje broja"};var Nw={};Nw={decrease:t=>`${t.fieldLabel} csökkentése`,increase:t=>`${t.fieldLabel} növelése`,numberField:"Számmező"};var zw={};zw={decrease:t=>`Riduci ${t.fieldLabel}`,increase:t=>`Aumenta ${t.fieldLabel}`,numberField:"Campo numero"};var jw={};jw={decrease:t=>`${t.fieldLabel}を縮小`,increase:t=>`${t.fieldLabel}を拡大`,numberField:"数値フィールド"};var Bw={};Bw={decrease:t=>`${t.fieldLabel} 감소`,increase:t=>`${t.fieldLabel} 증가`,numberField:"번호 필드"};var Kw={};Kw={decrease:t=>`Sumažinti ${t.fieldLabel}`,increase:t=>`Padidinti ${t.fieldLabel}`,numberField:"Numerio laukas"};var Hw={};Hw={decrease:t=>`Samazināšana ${t.fieldLabel}`,increase:t=>`Palielināšana ${t.fieldLabel}`,numberField:"Skaitļu lauks"};var Ww={};Ww={decrease:t=>`Reduser ${t.fieldLabel}`,increase:t=>`Øk ${t.fieldLabel}`,numberField:"Tallfelt"};var Uw={};Uw={decrease:t=>`${t.fieldLabel} verlagen`,increase:t=>`${t.fieldLabel} verhogen`,numberField:"Getalveld"};var Yw={};Yw={decrease:t=>`Zmniejsz ${t.fieldLabel}`,increase:t=>`Zwiększ ${t.fieldLabel}`,numberField:"Pole numeru"};var Gw={};Gw={decrease:t=>`Diminuir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo de número"};var Xw={};Xw={decrease:t=>`Diminuir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo numérico"};var qw={};qw={decrease:t=>`Scădere ${t.fieldLabel}`,increase:t=>`Creștere ${t.fieldLabel}`,numberField:"Câmp numeric"};var Qw={};Qw={decrease:t=>`Уменьшение ${t.fieldLabel}`,increase:t=>`Увеличение ${t.fieldLabel}`,numberField:"Числовое поле"};var Zw={};Zw={decrease:t=>`Znížiť ${t.fieldLabel}`,increase:t=>`Zvýšiť ${t.fieldLabel}`,numberField:"Číselné pole"};var Jw={};Jw={decrease:t=>`Upadati ${t.fieldLabel}`,increase:t=>`Povečajte ${t.fieldLabel}`,numberField:"Številčno polje"};var eS={};eS={decrease:t=>`Smanji ${t.fieldLabel}`,increase:t=>`Povećaj ${t.fieldLabel}`,numberField:"Polje broja"};var tS={};tS={decrease:t=>`Minska ${t.fieldLabel}`,increase:t=>`Öka ${t.fieldLabel}`,numberField:"Nummerfält"};var nS={};nS={decrease:t=>`${t.fieldLabel} azalt`,increase:t=>`${t.fieldLabel} arttır`,numberField:"Sayı alanı"};var iS={};iS={decrease:t=>`Зменшити ${t.fieldLabel}`,increase:t=>`Збільшити ${t.fieldLabel}`,numberField:"Поле номера"};var rS={};rS={decrease:t=>`降低 ${t.fieldLabel}`,increase:t=>`提高 ${t.fieldLabel}`,numberField:"数字字段"};var sS={};sS={decrease:t=>`縮小 ${t.fieldLabel}`,increase:t=>`放大 ${t.fieldLabel}`,numberField:"數字欄位"};var oS={};oS={"ar-AE":kw,"bg-BG":Tw,"cs-CZ":Cw,"da-DK":Ew,"de-DE":Mw,"el-GR":Dw,"en-US":Lw,"es-ES":Aw,"et-EE":Rw,"fi-FI":Fw,"fr-FR":Iw,"he-IL":Ow,"hr-HR":Vw,"hu-HU":Nw,"it-IT":zw,"ja-JP":jw,"ko-KR":Bw,"lt-LT":Kw,"lv-LV":Hw,"nb-NO":Ww,"nl-NL":Uw,"pl-PL":Yw,"pt-BR":Gw,"pt-PT":Xw,"ro-RO":qw,"ru-RU":Qw,"sk-SK":Zw,"sl-SI":Jw,"sr-SP":eS,"sv-SE":tS,"tr-TR":nS,"uk-UA":iS,"zh-CN":rS,"zh-TW":sS};function W5(t){return t&&t.__esModule?t.default:t}function U5(t,e,n){let Z_=t,{id:i,decrementAriaLabel:r,incrementAriaLabel:s,isDisabled:o,isReadOnly:a,isRequired:l,minValue:u,maxValue:c,autoFocus:d,label:f,formatOptions:h,onBlur:g=()=>{},onFocus:v,onFocusChange:b,onKeyDown:p,onKeyUp:m,description:y,errorMessage:S,isWheelDisabled:P}=Z_,C=ne(Z_,["id","decrementAriaLabel","incrementAriaLabel","isDisabled","isReadOnly","isRequired","minValue","maxValue","autoFocus","label","formatOptions","onBlur","onFocus","onFocusChange","onKeyDown","onKeyUp","description","errorMessage","isWheelDisabled"]),{increment:M,incrementToMax:E,decrement:w,decrementToMin:_,numberValue:R,inputValue:k,commit:O,commitValidation:D}=e;const V=C1(W5(oS),"@react-aria/numberfield");let T=li(i),{focusProps:L}=zh({onBlur(){O()}}),F=tp(h),z=x.useMemo(()=>F.resolvedOptions(),[F]),K=tp(N($({},h),{currencySign:void 0})),I=x.useMemo(()=>isNaN(R)?"":K.format(R),[K,R]),{spinButtonProps:j,incrementButtonProps:Q,decrementButtonProps:H}=H5({isDisabled:o,isReadOnly:a,isRequired:l,maxValue:c,minValue:u,onIncrement:M,onIncrementToMax:E,onDecrement:w,onDecrementToMin:_,value:R,textValue:I}),[ee,G]=x.useState(!1),{focusWithinProps:He}=Wh({isDisabled:o,onFocusWithinChange:G}),ir=x.useCallback($t=>{Math.abs($t.deltaY)<=Math.abs($t.deltaX)||($t.deltaY>0?M():$t.deltaY<0&&w())},[w,M]);H4({onScroll:ir,isDisabled:P||o||a||!ee},n);var zu;let ju=((zu=z.maximumFractionDigits)!==null&&zu!==void 0?zu:0)>0,cs=e.minValue===void 0||isNaN(e.minValue)||e.minValue<0,bi="numeric";Nx()?cs?bi="text":ju&&(bi="decimal"):_h()&&(cs?bi="numeric":ju&&(bi="decimal"));let Bu=$t=>{e.validate($t)&&e.setInputValue($t)},Zo=Gt(t),Jo=x.useCallback($t=>{$t.key==="Enter"?(O(),D()):$t.continuePropagation()},[O,D]),{isInvalid:U_,validationErrors:e8,validationDetails:t8}=e.displayValidation,{labelProps:Y_,inputProps:n8,descriptionProps:i8,errorMessageProps:r8}=B5(N($($({},C),Zo),{name:void 0,label:f,autoFocus:d,isDisabled:o,isReadOnly:a,isRequired:l,validate:void 0,[np]:e,value:k,defaultValue:void 0,autoComplete:"off","aria-label":t["aria-label"]||void 0,"aria-labelledby":t["aria-labelledby"]||void 0,id:T,type:"text",inputMode:bi,onChange:Bu,onBlur:g,onFocus:v,onFocusChange:b,onKeyDown:x.useMemo(()=>Sh(Jo,p),[Jo,p]),onKeyUp:m,description:y,errorMessage:S}),e,n);Mh(n,e.numberValue,e.setNumberValue);let G_=ae(j,L,n8,{role:null,"aria-roledescription":zl()?null:V.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});t.validationBehavior==="native"&&(G_["aria-required"]=void 0);let X_=$t=>{var dm;document.activeElement!==n.current&&($t.pointerType==="mouse"?(dm=n.current)===null||dm===void 0||dm.focus():$t.target.focus())},cm=t["aria-label"]||(typeof t.label=="string"?t.label:""),sr;cm||(sr=t.label!=null?Y_.id:t["aria-labelledby"]);let q_=li(),Q_=li(),s8=ae(Q,{"aria-label":s||V.format("increase",{fieldLabel:cm}).trim(),id:sr&&!s?q_:null,"aria-labelledby":sr&&!s?`${q_} ${sr}`:null,"aria-controls":T,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!e.canIncrement,onPressStart:X_}),o8=ae(H,{"aria-label":r||V.format("decrease",{fieldLabel:cm}).trim(),id:sr&&!r?Q_:null,"aria-labelledby":sr&&!r?`${Q_} ${sr}`:null,"aria-controls":T,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!e.canDecrement,onPressStart:X_});return{groupProps:N($({},He),{role:"group","aria-disabled":o,"aria-invalid":U_?"true":void 0}),labelProps:Y_,inputProps:G_,incrementButtonProps:s8,decrementButtonProps:o8,errorMessageProps:r8,descriptionProps:i8,isInvalid:U_,validationErrors:e8,validationDetails:t8}}function up(t){return KD()?t.altKey:t.ctrlKey}function Qr(t){return Bi()?t.metaKey:t.ctrlKey}const Y5=1e3;function G5(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:i}=t,r=x.useRef({search:"",timeout:null}).current,s=o=>{let a=X5(o.key);if(!a||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))return;a===" "&&r.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),r.search+=a;let l=e.getKeyForSearch(r.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(r.search)),l!=null&&(n.setFocusedKey(l),i&&i(l)),clearTimeout(r.timeout),r.timeout=setTimeout(()=>{r.search=""},Y5)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:null}}}function X5(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function q5(t){let{selectionManager:e,keyboardDelegate:n,ref:i,autoFocus:r=!1,shouldFocusWrap:s=!1,disallowEmptySelection:o=!1,disallowSelectAll:a=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:c,allowsTabNavigation:d=!1,isVirtualized:f,scrollRef:h=i,linkBehavior:g="action"}=t,{direction:v}=Yi(),b=jl(),p=_=>{if(_.altKey&&_.key==="Tab"&&_.preventDefault(),!i.current.contains(_.target))return;const R=(H,ee)=>{if(H!=null){if(e.isLink(H)&&g==="selection"&&l&&!up(_)){ml.flushSync(()=>{e.setFocusedKey(H,ee)});let G=h.current.querySelector(`[data-key="${CSS.escape(H.toString())}"]`),He=e.getItemProps(H);b.open(G,_,He.href,He.routerOptions);return}if(e.setFocusedKey(H,ee),e.isLink(H)&&g==="override")return;_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(H):l&&!up(_)&&e.replaceSelection(H)}};switch(_.key){case"ArrowDown":if(n.getKeyBelow){var k,O,D;let H=e.focusedKey!=null?(k=n.getKeyBelow)===null||k===void 0?void 0:k.call(n,e.focusedKey):(O=n.getFirstKey)===null||O===void 0?void 0:O.call(n);H==null&&s&&(H=(D=n.getFirstKey)===null||D===void 0?void 0:D.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),R(H))}break;case"ArrowUp":if(n.getKeyAbove){var V,T,L;let H=e.focusedKey!=null?(V=n.getKeyAbove)===null||V===void 0?void 0:V.call(n,e.focusedKey):(T=n.getLastKey)===null||T===void 0?void 0:T.call(n);H==null&&s&&(H=(L=n.getLastKey)===null||L===void 0?void 0:L.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),R(H))}break;case"ArrowLeft":if(n.getKeyLeftOf){var F,z,K;let H=(F=n.getKeyLeftOf)===null||F===void 0?void 0:F.call(n,e.focusedKey);H==null&&s&&(H=v==="rtl"?(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n,e.focusedKey):(K=n.getLastKey)===null||K===void 0?void 0:K.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),R(H,v==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var I,j,Q;let H=(I=n.getKeyRightOf)===null||I===void 0?void 0:I.call(n,e.focusedKey);H==null&&s&&(H=v==="rtl"?(j=n.getLastKey)===null||j===void 0?void 0:j.call(n,e.focusedKey):(Q=n.getFirstKey)===null||Q===void 0?void 0:Q.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),R(H,v==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){_.preventDefault();let H=n.getFirstKey(e.focusedKey,Qr(_));e.setFocusedKey(H),Qr(_)&&_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(H):l&&e.replaceSelection(H)}break;case"End":if(n.getLastKey){_.preventDefault();let H=n.getLastKey(e.focusedKey,Qr(_));e.setFocusedKey(H),Qr(_)&&_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(H):l&&e.replaceSelection(H)}break;case"PageDown":if(n.getKeyPageBelow){let H=n.getKeyPageBelow(e.focusedKey);H!=null&&(_.preventDefault(),R(H))}break;case"PageUp":if(n.getKeyPageAbove){let H=n.getKeyPageAbove(e.focusedKey);H!=null&&(_.preventDefault(),R(H))}break;case"a":Qr(_)&&e.selectionMode==="multiple"&&a!==!0&&(_.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(_.stopPropagation(),_.preventDefault(),e.clearSelection());break;case"Tab":if(!d){if(_.shiftKey)i.current.focus();else{let H=w1(i.current,{tabbable:!0}),ee,G;do G=H.lastChild(),G&&(ee=G);while(G);ee&&!ee.contains(document.activeElement)&&sn(ee)}break}}},m=x.useRef({top:0,left:0});Ch(h,"scroll",f?null:()=>{m.current={top:h.current.scrollTop,left:h.current.scrollLeft}});let y=_=>{if(e.isFocused){_.currentTarget.contains(_.target)||e.setFocused(!1);return}if(_.currentTarget.contains(_.target)){if(e.setFocused(!0),e.focusedKey==null){let O=V=>{V!=null&&(e.setFocusedKey(V),l&&e.replaceSelection(V))},D=_.relatedTarget;var R,k;D&&_.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING?O((R=e.lastSelectedKey)!==null&&R!==void 0?R:n.getLastKey()):O((k=e.firstSelectedKey)!==null&&k!==void 0?k:n.getFirstKey())}else f||(h.current.scrollTop=m.current.top,h.current.scrollLeft=m.current.left);if(e.focusedKey!=null){let O=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);O&&(O.contains(document.activeElement)||sn(O),Hh()==="keyboard"&&Yx(O,{containingElement:i.current}))}}},S=_=>{_.currentTarget.contains(_.relatedTarget)||e.setFocused(!1)};const P=x.useRef(r);x.useEffect(()=>{if(P.current){let _=null;r==="first"&&(_=n.getFirstKey()),r==="last"&&(_=n.getLastKey());let R=e.selectedKeys;if(R.size){for(let k of R)if(e.canSelectItem(k)){_=k;break}}e.setFocused(!0),e.setFocusedKey(_),_==null&&!c&&Ql(i.current)}},[]);let C=x.useRef(e.focusedKey);x.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==C.current||P.current)&&(h!=null&&h.current)){let _=Hh(),R=i.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!R)return;(_==="keyboard"||P.current)&&(Wx(h.current,R),_!=="virtual"&&Yx(R,{containingElement:i.current}))}!c&&e.isFocused&&e.focusedKey==null&&C.current!=null&&Ql(i.current),C.current=e.focusedKey,P.current=!1}),Ch(i,"react-aria-focus-scope-restore",_=>{_.preventDefault(),e.setFocused(!0)});let M={onKeyDown:p,onFocus:y,onBlur:S,onMouseDown(_){h.current===_.target&&_.preventDefault()}},{typeSelectProps:E}=G5({keyboardDelegate:n,selectionManager:e});u||(M=ae(E,M));let w;return c||(w=e.focusedKey==null?0:-1),{collectionProps:N($({},M),{tabIndex:w})}}function Q5(t){let{selectionManager:e,key:n,ref:i,shouldSelectOnPressUp:r,shouldUseVirtualFocus:s,focus:o,isDisabled:a,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:c="action"}=t,d=jl(),f=L=>{if(L.pointerType==="keyboard"&&up(L))e.toggleSelection(n);else{if(e.selectionMode==="none")return;if(e.isLink(n)){if(c==="selection"){let F=e.getItemProps(n);d.open(i.current,L,F.href,F.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(c==="override"||c==="none")return}e.selectionMode==="single"?e.isSelected(n)&&!e.disallowEmptySelection?e.toggleSelection(n):e.replaceSelection(n):L&&L.shiftKey?e.extendSelection(n):e.selectionBehavior==="toggle"||L&&(Qr(L)||L.pointerType==="touch"||L.pointerType==="virtual")?e.toggleSelection(n):e.replaceSelection(n)}};x.useEffect(()=>{n===e.focusedKey&&e.isFocused&&!s&&(o?o():document.activeElement!==i.current&&Ql(i.current))},[i,n,e.focusedKey,e.childFocusStrategy,e.isFocused,s]),a=a||e.isDisabled(n);let h={};!s&&!a?h={tabIndex:n===e.focusedKey?0:-1,onFocus(L){L.target===i.current&&e.setFocusedKey(n)}}:a&&(h.onMouseDown=L=>{L.preventDefault()});let g=e.isLink(n)&&c==="override",v=e.isLink(n)&&c!=="selection"&&c!=="none",b=!a&&e.canSelectItem(n)&&!g,p=(l||v)&&!a,m=p&&(e.selectionBehavior==="replace"?!b:!b||e.isEmpty),y=p&&b&&e.selectionBehavior==="replace",S=m||y,P=x.useRef(null),C=S&&b,M=x.useRef(!1),E=x.useRef(!1),w=L=>{if(l&&l(),v){let F=e.getItemProps(n);d.open(i.current,L,F.href,F.routerOptions)}},_={};r?(_.onPressStart=L=>{P.current=L.pointerType,M.current=C,L.pointerType==="keyboard"&&(!S||lS())&&f(L)},u?(_.onPressUp=m?null:L=>{L.pointerType!=="keyboard"&&b&&f(L)},_.onPress=m?w:null):_.onPress=L=>{if(m||y&&L.pointerType!=="mouse"){if(L.pointerType==="keyboard"&&!aS())return;w(L)}else L.pointerType!=="keyboard"&&b&&f(L)}):(_.onPressStart=L=>{P.current=L.pointerType,M.current=C,E.current=m,b&&(L.pointerType==="mouse"&&!m||L.pointerType==="keyboard"&&(!p||lS()))&&f(L)},_.onPress=L=>{(L.pointerType==="touch"||L.pointerType==="pen"||L.pointerType==="virtual"||L.pointerType==="keyboard"&&S&&aS()||L.pointerType==="mouse"&&E.current)&&(S?w(L):b&&f(L))}),h["data-key"]=n,_.preventFocusOnPress=s;let{pressProps:R,isPressed:k}=Ih(_),O=y?L=>{P.current==="mouse"&&(L.stopPropagation(),L.preventDefault(),w(L))}:void 0,{longPressProps:D}=U4({isDisabled:!C,onLongPress(L){L.pointerType==="touch"&&(f(L),e.setSelectionBehavior("toggle"))}}),V=L=>{P.current==="touch"&&M.current&&L.preventDefault()},T=e.isLink(n)?L=>{Ki.isOpening||L.preventDefault()}:void 0;return{itemProps:ae(h,b||m?R:{},C?D:{},{onDoubleClick:O,onDragStartCapture:V,onClick:T}),isPressed:k,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:a,allowsSelection:b,hasAction:S}}function aS(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function lS(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class Z5{build(e,n){return this.context=n,uS(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:i}=e;if(W.isValidElement(n)&&n.type===W.Fragment)yield*ds(this.iterateCollection({children:n.props.children,items:i}));else if(typeof n=="function"){if(!i)throw new Error("props.children was a function but props.items is missing");for(let r of e.items)yield*ds(this.getFullNode({value:r},{renderer:n}))}else{let r=[];W.Children.forEach(n,o=>{r.push(o)});let s=0;for(let o of r){let a=this.getFullNode({element:o,index:s},{});for(let l of a)s++,yield l}}}getKey(e,n,i,r){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${r}${n.key}`;let s=n.value;if(s!=null){var o;let a=(o=s.key)!==null&&o!==void 0?o:s.id;if(a==null)throw new Error("No key found for item");return a}return r?`${r}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,i,r){if(W.isValidElement(e.element)&&e.element.type===W.Fragment){let l=[];W.Children.forEach(e.element.props.children,c=>{l.push(c)});let u=e.index;for(const c of l)yield*ds(this.getFullNode({element:c,index:u++},n,i,r));return}let s=e.element;if(!s&&e.value&&n&&n.renderer){let l=this.cache.get(e.value);if(l&&(!l.shouldInvalidate||!l.shouldInvalidate(this.context))){l.index=e.index,l.parentKey=r?r.key:null,yield l;return}s=n.renderer(e.value)}if(W.isValidElement(s)){let l=s.type;if(typeof l!="function"&&typeof l.getCollectionNode!="function"){let f=typeof s.type=="function"?s.type.name:s.type;throw new Error(`Unknown element <${f}> in collection.`)}let u=l.getCollectionNode(s.props,this.context),c=e.index,d=u.next();for(;!d.done&&d.value;){let f=d.value;e.index=c;let h=f.key;h||(h=f.element?null:this.getKey(s,e,n,i));let v=[...this.getFullNode(N($({},f),{key:h,index:c,wrapper:J5(e.wrapper,f.wrapper)}),this.getChildState(n,f),i?`${i}${s.key}`:s.key,r)];for(let b of v){if(b.value=f.value||e.value,b.value&&this.cache.set(b.value,b),e.type&&b.type!==e.type)throw new Error(`Unsupported type <${cp(b.type)}> in <${cp(r.type)}>. Only <${cp(e.type)}> is supported.`);c++,yield b}d=u.next(v)}return}if(e.key==null)return;let o=this,a={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue,"aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes,childNodes:uS(function*(){if(!e.hasChildNodes)return;let l=0;for(let u of e.childNodes()){u.key!=null&&(u.key=`${a.key}${u.key}`),u.index=l;let c=o.getFullNode(u,o.getChildState(n,u),a.key,a);for(let d of c)l++,yield d}})};yield a}constructor(){this.cache=new WeakMap}}function uS(t){let e=[],n=null;return{*[Symbol.iterator](){for(let i of e)yield i;n||(n=t());for(let i of n)e.push(i),yield i}}}function J5(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function cp(t){return t[0].toUpperCase()+t.slice(1)}function e3(t,e,n){let i=x.useMemo(()=>new Z5,[]),{children:r,items:s,collection:o}=t;return x.useMemo(()=>{if(o)return o;let l=i.build({children:r,items:s},n);return e(l)},[i,r,s,o,n,e])}function t3(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function n3(t){return i3(t)}function i3(t,e){for(let n of t)return n}function dp(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let i=[...cS(t,e),e],r=[...cS(t,n),n],s=i.slice(0,r.length).findIndex((o,a)=>o!==r[a]);return s!==-1?(e=i[s],n=r[s],e.index-n.index):i.findIndex(o=>o===n)>=0?1:(r.findIndex(o=>o===e)>=0,-1)}function cS(t,e){let n=[];for(;(e==null?void 0:e.parentKey)!=null;)e=t.getItem(e.parentKey),n.unshift(e);return n}const dS=new WeakMap;function nu(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${dS.get(t)}-${n}-${e}`):""}function r3(t,e,n){let{key:i,isDisabled:r,shouldSelectOnPressUp:s}=t,{selectionManager:o,selectedKey:a}=e,l=i===a,u=r||e.isDisabled||e.selectionManager.isDisabled(i),{itemProps:c,isPressed:d}=Q5({selectionManager:o,key:i,ref:n,isDisabled:u,shouldSelectOnPressUp:s,linkBehavior:"selection"}),f=nu(e,i,"tab"),h=nu(e,i,"tabpanel"),{tabIndex:g}=c,v=e.collection.getItem(i),b=Gt(v==null?void 0:v.props,{labelable:!0});delete b.id;let p=jx(v==null?void 0:v.props);return{tabProps:ae(b,p,c,{id:f,"aria-selected":l,"aria-disabled":u||void 0,"aria-controls":l?h:void 0,tabIndex:u?void 0:g,role:"tab"}),isSelected:l,isDisabled:u,isPressed:d}}function s3(t,e,n){let i=J4(n)?void 0:0;var r;const s=nu(e,(r=t.id)!==null&&r!==void 0?r:e==null?void 0:e.selectedKey,"tabpanel"),o=kh(N($({},t),{id:s,"aria-labelledby":nu(e,e==null?void 0:e.selectedKey,"tab")}));return{tabPanelProps:ae(o,{tabIndex:i,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class o3{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var n,i;return this.disabledKeys.has(e)||!!(!((i=this.collection.getItem(e))===null||i===void 0||(n=i.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.isDisabled(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.isDisabled(e));return e}constructor(e,n,i,r=new Set){this.collection=e,this.flipDirection=n==="rtl"&&i==="horizontal",this.disabledKeys=r,this.tabDirection=i==="horizontal"}}function a3(t,e,n){let{orientation:i="horizontal",keyboardActivation:r="automatic"}=t,{collection:s,selectionManager:o,disabledKeys:a}=e,{direction:l}=Yi(),u=x.useMemo(()=>new o3(s,l,i,a),[s,a,i,l]),{collectionProps:c}=q5({ref:n,selectionManager:o,keyboardDelegate:u,selectOnFocus:r==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),d=li();dS.set(e,d);let f=kh(N($({},t),{id:d}));return{tabListProps:N($({},ae(c,f)),{role:"tablist","aria-orientation":i,tabIndex:void 0})}}const l3=x.createContext(null);function u3(t,e){[t,e]=on(t,e,l3);let n=t.href&&!t.isDisabled?"a":"span",{linkProps:i,isPressed:r}=e5(N($({},t),{elementType:n}),e),{hoverProps:s,isHovered:o}=Xr(t),{focusProps:a,isFocused:l,isFocusVisible:u}=Ui(),c=Pt(N($({},t),{defaultClassName:"react-aria-Link",values:{isCurrent:!!t["aria-current"],isDisabled:t.isDisabled||!1,isPressed:r,isHovered:o,isFocused:l,isFocusVisible:u}}));return W.createElement(n,N($({ref:e,slot:t.slot||void 0},ae(c,i,s,a)),{"data-focused":l||void 0,"data-hovered":o||void 0,"data-pressed":r||void 0,"data-focus-visible":u||void 0,"data-current":!!t["aria-current"]||void 0,"data-disabled":t.isDisabled||void 0}),c.children)}const c3=x.forwardRef(u3),iu=x.createContext({});function d3(t,e){[t,e]=on(t,e,iu);let r=t,{elementType:n="label"}=r,i=ne(r,["elementType"]);return W.createElement(n,N($({className:"react-aria-Label"},i),{ref:e}))}const fS=wh(d3),f3=x.createContext({}),hS=x.createContext({});function h3(t,e){[t,e]=on(t,e,hS);let r=t,{elementType:n="span"}=r,i=ne(r,["elementType"]);return W.createElement(n,N($({className:"react-aria-Text"},i),{ref:e}))}const p3=x.forwardRef(h3);class pS{*[Symbol.iterator](){yield*ds(this.iterable)}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var i;return n&&(i=n.prevKey)!==null&&i!==void 0?i:null}getKeyAfter(e){let n=this.keyMap.get(e);var i;return n&&(i=n.nextKey)!==null&&i!==void 0?i:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let a of o.childNodes)n(a)};for(let o of e)n(o);let i=null,r=0;for(let[o,a]of this.keyMap)i?(i.nextKey=o,a.prevKey=i.key):(this.firstKey=o,a.prevKey=void 0),a.type==="item"&&(a.index=r++),i=a,i.nextKey=void 0;var s;this.lastKey=(s=i==null?void 0:i.key)!==null&&s!==void 0?s:null}}class Xt extends Set{constructor(e,n,i){super(e),e instanceof Xt?(this.anchorKey=n!=null?n:e.anchorKey,this.currentKey=i!=null?i:e.currentKey):(this.anchorKey=n,this.currentKey=i)}}function m3(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function g3(t){let{selectionMode:e="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:i,selectionBehavior:r="toggle",disabledBehavior:s="all"}=t,o=x.useRef(!1),[,a]=x.useState(!1),l=x.useRef(null),u=x.useRef(null),[,c]=x.useState(null),d=x.useMemo(()=>mS(t.selectedKeys),[t.selectedKeys]),f=x.useMemo(()=>mS(t.defaultSelectedKeys,new Xt),[t.defaultSelectedKeys]),[h,g]=vo(d,f,t.onSelectionChange),v=x.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[b,p]=x.useState(r);r==="replace"&&b==="toggle"&&typeof h=="object"&&h.size===0&&p("replace");let m=x.useRef(r);return x.useEffect(()=>{r!==m.current&&(p(r),m.current=r)},[r]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:b,setSelectionBehavior:p,get isFocused(){return o.current},setFocused(y){o.current=y,a(y)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(y,S="first"){l.current=y,u.current=S,c(y)},selectedKeys:h,setSelectedKeys(y){(i||!m3(y,h))&&g(y)},disabledKeys:v,disabledBehavior:s}}function mS(t,e){return t?t==="all"?"all":new Xt(t):e}class v3{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return this.state.selectionMode==="none"?!1:(e=this.getKey(e),this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(i=>n.has(i)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let i=this.collection.getItem(n);(!e||i&&dp(this.collection,i,e)<0)&&(e=i)}return e==null?void 0:e.key}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let i=this.collection.getItem(n);(!e||i&&dp(this.collection,i,e)>0)&&(e=i)}return e==null?void 0:e.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}e=this.getKey(e);let n;if(this.state.selectedKeys==="all")n=new Xt([e],e,e);else{let s=this.state.selectedKeys;var i;let o=(i=s.anchorKey)!==null&&i!==void 0?i:e;n=new Xt(s,o,e);var r;for(let a of this.getKeyRange(o,(r=s.currentKey)!==null&&r!==void 0?r:e))n.delete(a);for(let a of this.getKeyRange(e,o))this.canSelectItem(a)&&n.add(a)}this.state.setSelectedKeys(n)}getKeyRange(e,n){let i=this.collection.getItem(e),r=this.collection.getItem(n);return i&&r?dp(this.collection,i,r)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var i;if(!((i=this.layoutDelegate)===null||i===void 0)&&i.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],s=e;for(;s!=null;){let o=this.collection.getItem(s);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&r.push(s),s===n)return r;s=this.collection.getKeyAfter(s)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}if(e=this.getKey(e),e==null)return;let n=new Xt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(e)?n.delete(e):this.canSelectItem(e)&&(n.add(e),n.anchorKey=e,n.currentKey=e),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none"||(e=this.getKey(e),e==null))return;let n=this.canSelectItem(e)?new Xt([e],e,e):new Xt;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Xt;for(let i of e)if(i=this.getKey(i),i!=null&&(n.add(i),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=i=>{for(;i!=null;){if(this.canSelectItem(i)){let r=this.collection.getItem(i);r.type==="item"&&e.push(i),r.hasChildNodes&&(this.allowsCellSelection||r.type!=="item")&&n(n3(t3(r,this.collection)).key)}i=this.collection.getKeyAfter(i)}};return n(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Xt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let i of e)if(!n.has(i))return!1;for(let i of n)if(!e.has(i))return!1;return!0}canSelectItem(e){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let i=this.collection.getItem(e);return!(!i||!(i==null||(n=i.props)===null||n===void 0)&&n.isDisabled||i.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,i;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((i=this.collection.getItem(e))===null||i===void 0||(n=i.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,i;return!!(!((i=this.collection.getItem(e))===null||i===void 0||(n=i.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}constructor(e,n,i){this.collection=e,this.state=n;var r;this.allowsCellSelection=(r=i==null?void 0:i.allowsCellSelection)!==null&&r!==void 0?r:!1,this._isSelectAll=null,this.layoutDelegate=(i==null?void 0:i.layoutDelegate)||null}}function y3(t){let{filter:e,layoutDelegate:n}=t,i=g3(t),r=x.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=x.useCallback(c=>e?new pS(e(c)):new pS(c),[e]),o=x.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=e3(t,s,o),l=x.useMemo(()=>new v3(a,i,{layoutDelegate:n}),[a,i,n]);const u=x.useRef(null);return x.useEffect(()=>{if(i.focusedKey!=null&&!a.getItem(i.focusedKey)&&u.current){const p=u.current.getItem(i.focusedKey),m=[...u.current.getKeys()].map(E=>{const w=u.current.getItem(E);return(w==null?void 0:w.type)==="item"?w:null}).filter(E=>E!==null),y=[...a.getKeys()].map(E=>{const w=a.getItem(E);return(w==null?void 0:w.type)==="item"?w:null}).filter(E=>E!==null);var c,d;const S=((c=m==null?void 0:m.length)!==null&&c!==void 0?c:0)-((d=y==null?void 0:y.length)!==null&&d!==void 0?d:0);var f,h,g;let P=Math.min(S>1?Math.max(((f=p==null?void 0:p.index)!==null&&f!==void 0?f:0)-S+1,0):(h=p==null?void 0:p.index)!==null&&h!==void 0?h:0,((g=y==null?void 0:y.length)!==null&&g!==void 0?g:0)-1),C=null,M=!1;for(;P>=0;){if(!l.isDisabled(y[P].key)){C=y[P];break}if(P((v=p==null?void 0:p.index)!==null&&v!==void 0?v:0)&&(P=(b=p==null?void 0:p.index)!==null&&b!==void 0?b:0),P--}}i.setFocusedKey(C?C.key:null)}u.current=a},[a,l,i,i.focusedKey]),{collection:a,disabledKeys:r,selectionManager:l}}function b3(t){var e;let[n,i]=vo(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),r=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:o,selectionManager:a}=y3(N($({},t),{selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:u=>{if(u==="all")return;var c;let d=(c=u.values().next().value)!==null&&c!==void 0?c:null;d===n&&t.onSelectionChange&&t.onSelectionChange(d),i(d)}})),l=n!=null?s.getItem(n):null;return{collection:s,disabledKeys:o,selectionManager:a,selectedKey:n,setSelectedKey:i,selectedItem:l}}function x3(t){var e;let n=b3(N($({},t),{suppressTextValueWarning:!0,defaultSelectedKey:(e=t.defaultSelectedKey)!==null&&e!==void 0?e:gS(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)})),{selectionManager:i,collection:r,selectedKey:s}=n,o=x.useRef(s);return x.useEffect(()=>{let a=s;(i.isEmpty||!r.getItem(a))&&(a=gS(r,n.disabledKeys),a!=null&&i.setSelectedKeys([a])),(a!=null&&i.focusedKey==null||!i.isFocused&&a!==o.current)&&i.setFocusedKey(a),o.current=a}),N($({},n),{isDisabled:t.isDisabled||!1})}function gS(t,e){let n=null;if(t){var i,r,s,o;for(n=t.getFirstKey();(e.has(n)||!((r=t.getItem(n))===null||r===void 0||(i=r.props)===null||i===void 0)&&i.isDisabled)&&n!==t.getLastKey();)n=t.getKeyAfter(n);(e.has(n)||!((o=t.getItem(n))===null||o===void 0||(s=o.props)===null||s===void 0)&&s.isDisabled)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}const fp=x.createContext(null);function w3(t,e){let n=x.useContext(fp);return n!=null&&n.isInvalid?W.createElement(P3,N($({},t),{ref:e})):null}const S3=x.forwardRef(w3),P3=x.forwardRef((t,e)=>{let n=x.useContext(fp),i=Gt(t),r=Pt(N($({},t),{defaultClassName:"react-aria-FieldError",defaultChildren:n.validationErrors.length===0?void 0:n.validationErrors.join(" "),values:n}));return r.children==null?null:W.createElement(p3,N($($({slot:"errorMessage"},i),r),{ref:e}))}),_3=x.createContext(null),vS=x.createContext({});let $3=t=>{let s=t,{onHoverStart:e,onHoverChange:n,onHoverEnd:i}=s;return ne(s,["onHoverStart","onHoverChange","onHoverEnd"])};function k3(t,e){[t,e]=on(t,e,vS);let{hoverProps:n,isHovered:i}=Xr(t),{isFocused:r,isFocusVisible:s,focusProps:o}=Ui({isTextInput:!0,autoFocus:t.autoFocus}),a=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",l=Pt(N($({},t),{values:{isHovered:i,isFocused:r,isFocusVisible:s,isDisabled:t.disabled||!1,isInvalid:a},defaultClassName:"react-aria-Input"}));return W.createElement("input",N($($({},ae($3(t),o,n)),l),{ref:e,"data-focused":r||void 0,"data-disabled":t.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":s||void 0,"data-invalid":a||void 0}))}const T3=wh(k3),C3=x.createContext(null),ru=x.createContext(null),hp=x.createContext(null),yS=x.createContext(null);function E3(t,e){[t,e]=on(t,e,C3);let n=x.useRef(null),i=tp(t.formatOptions),r=F5(N($({},t),{numberFormatter:i})),[s,o]=Ah(),{groupProps:a,trackProps:l,labelProps:u,outputProps:c}=N5(N($({},t),{label:o}),r,n),d=Pt(N($({},t),{values:{orientation:r.orientation,isDisabled:r.isDisabled,state:r},defaultClassName:"react-aria-Slider"})),f=Gt(t);return delete f.id,W.createElement(bo,{values:[[ru,r],[hp,N($({},l),{ref:n})],[yS,c],[iu,N($({},u),{ref:s})]]},W.createElement("div",N($($($({},f),a),d),{ref:e,slot:t.slot||void 0,"data-orientation":r.orientation,"data-disabled":r.isDisabled||void 0})))}const M3=x.forwardRef(E3);function D3(t,e){[t,e]=on(t,e,yS);let l=t,{children:n,style:i,className:r}=l,s=ne(l,["children","style","className"]),o=x.useContext(ru),a=Pt({className:r,style:i,children:n,defaultChildren:o.getThumbValueLabel(0),defaultClassName:"react-aria-SliderOutput",values:{orientation:o.orientation,isDisabled:o.isDisabled,state:o}});return W.createElement("output",N($($({},s),a),{ref:e,"data-orientation":o.orientation||void 0,"data-disabled":o.isDisabled||void 0}))}const L3=x.forwardRef(D3);function A3(t,e){[t,e]=on(t,e,hp);let n=x.useContext(ru),c=t,{onHoverStart:i,onHoverEnd:r,onHoverChange:s}=c,o=ne(c,["onHoverStart","onHoverEnd","onHoverChange"]),{hoverProps:a,isHovered:l}=Xr({onHoverStart:i,onHoverEnd:r,onHoverChange:s}),u=Pt(N($({},t),{defaultClassName:"react-aria-SliderTrack",values:{orientation:n.orientation,isDisabled:n.isDisabled,isHovered:l,state:n}}));return W.createElement("div",N($($({},ae(o,a)),u),{ref:e,"data-hovered":l||void 0,"data-orientation":n.orientation||void 0,"data-disabled":n.isDisabled||void 0}))}const R3=x.forwardRef(A3);function F3(t,e){let{inputRef:n=null}=t,i=x.useContext(ru),{ref:r}=Hl(hp),{index:s=0}=t,o=x.useRef(null),a=n||o,[l,u]=Ah(),{thumbProps:c,inputProps:d,labelProps:f,isDragging:h,isFocused:g,isDisabled:v}=z5(N($({},t),{index:s,trackRef:r,inputRef:a,label:u}),i),{focusProps:b,isFocusVisible:p}=Ui(),{hoverProps:m,isHovered:y}=Xr(t),S=Pt(N($({},t),{defaultClassName:"react-aria-SliderThumb",values:{state:i,isHovered:y,isDragging:h,isFocused:g,isFocusVisible:p,isDisabled:v}})),P=Gt(t);return delete P.id,W.createElement("div",N($($({},ae(P,c,m)),S),{ref:e,style:$($({},c.style),S.style),"data-hovered":y||void 0,"data-dragging":h||void 0,"data-focused":g||void 0,"data-focus-visible":p||void 0,"data-disabled":v||void 0}),W.createElement(V5,null,W.createElement("input",$({ref:a},ae(d,b)))),W.createElement(bo,{values:[[iu,N($({},f),{ref:l})]]},S.children))}const I3=x.forwardRef(F3),bS=x.createContext({});function O3(t,e){[t,e]=on(t,e,bS);let b=t,{isDisabled:n,isInvalid:i,onHoverStart:r,onHoverChange:s,onHoverEnd:o}=b,a=ne(b,["isDisabled","isInvalid","onHoverStart","onHoverChange","onHoverEnd"]),{hoverProps:l,isHovered:u}=Xr({onHoverStart:r,onHoverChange:s,onHoverEnd:o,isDisabled:n}),{isFocused:c,isFocusVisible:d,focusProps:f}=Ui({within:!0});n!=null||(n=!!t["aria-disabled"]&&t["aria-disabled"]!=="false"),i!=null||(i=!!t["aria-invalid"]&&t["aria-invalid"]!=="false");let h=Pt(N($({},t),{values:{isHovered:u,isFocusWithin:c,isFocusVisible:d,isDisabled:n,isInvalid:i},defaultClassName:"react-aria-Group"}));var g,v;return W.createElement("div",N($($({},ae(a,f,l)),h),{ref:e,role:(g=t.role)!==null&&g!==void 0?g:"group",slot:(v=t.slot)!==null&&v!==void 0?v:void 0,"data-focus-within":c||void 0,"data-hovered":u||void 0,"data-focus-visible":d||void 0,"data-disabled":n||void 0,"data-invalid":i||void 0}),h.children)}const V3=x.forwardRef(O3),N3=x.createContext(null),z3=x.createContext(null);function j3(t,e){[t,e]=on(t,e,N3);let{validationBehavior:n}=Hl(_3)||{};var i,r;let s=(r=(i=t.validationBehavior)!==null&&i!==void 0?i:n)!==null&&r!==void 0?r:"native",{locale:o}=Yi(),a=I5(N($({},t),{locale:o,validationBehavior:s})),l=x.useRef(null),[u,c]=Ah(),P=U5(N($({},$4(t)),{label:c,validationBehavior:s}),a,l),{labelProps:d,groupProps:f,inputProps:h,incrementButtonProps:g,decrementButtonProps:v,descriptionProps:b,errorMessageProps:p}=P,m=ne(P,["labelProps","groupProps","inputProps","incrementButtonProps","decrementButtonProps","descriptionProps","errorMessageProps"]),y=Pt(N($({},t),{values:{state:a,isDisabled:t.isDisabled||!1,isInvalid:m.isInvalid||!1},defaultClassName:"react-aria-NumberField"})),S=Gt(t);return delete S.id,W.createElement(bo,{values:[[z3,a],[bS,f],[vS,N($({},h),{ref:l})],[iu,N($({},d),{ref:u})],[f3,{slots:{increment:g,decrement:v}}],[hS,{slots:{description:b,errorMessage:p}}],[fp,m]]},W.createElement("div",N($($({},S),y),{ref:e,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":m.isInvalid||void 0})),t.name&&W.createElement("input",{type:"hidden",name:t.name,value:isNaN(a.numberValue)?"":a.numberValue}))}const B3=x.forwardRef(j3),su=x.createContext(null),Zr=x.createContext(null);function K3(t,e){[t,e]=on(t,e,su);let{children:n,orientation:i="horizontal"}=t;return n=x.useMemo(()=>typeof n=="function"?n({orientation:i,defaultChildren:null}):n,[n,i]),W.createElement(f4,{content:n},r=>W.createElement(H3,{props:t,collection:r,tabsRef:e}))}function H3({props:t,tabsRef:e,collection:n}){let{orientation:i="horizontal"}=t,r=x3(N($({},t),{collection:n,children:void 0})),{focusProps:s,isFocused:o,isFocusVisible:a}=Ui({within:!0}),l=x.useMemo(()=>({orientation:i,isFocusWithin:o,isFocusVisible:a}),[i,o,a]),u=Pt(N($({},t),{defaultClassName:"react-aria-Tabs",values:l}));return W.createElement("div",N($($($({},Gt(t)),s),u),{ref:e,slot:t.slot||void 0,"data-focused":o||void 0,"data-orientation":i,"data-focus-visible":a||void 0,"data-disabled":r.isDisabled||void 0}),W.createElement(bo,{values:[[su,t],[Zr,r]]},u.children))}const W3=x.forwardRef(K3);function U3(t,e){return x.useContext(Zr)?W.createElement(Y3,{props:t,forwardedRef:e}):W.createElement(x4,t)}function Y3({props:t,forwardedRef:e}){let n=x.useContext(Zr),{CollectionRoot:i}=x.useContext(P4),{orientation:r="horizontal",keyboardActivation:s="automatic"}=Hl(su),o=Bl(e),{tabListProps:a}=a3(N($({},t),{orientation:r,keyboardActivation:s}),n,o),l=Pt(N($({},t),{children:null,defaultClassName:"react-aria-TabList",values:{orientation:r,state:n}})),u=Gt(t);return delete u.id,W.createElement("div",N($(N($($({},u),a),{ref:o}),l),{"data-orientation":r||void 0}),W.createElement(i,{collection:n.collection,persistedKeys:_4(n.selectionManager.focusedKey)}))}const G3=x.forwardRef(U3),X3=y4("item",(t,e,n)=>{let i=x.useContext(Zr),r=Bl(e),{tabProps:s,isSelected:o,isDisabled:a,isPressed:l}=r3($({key:n.key},t),i,r),{focusProps:u,isFocused:c,isFocusVisible:d}=Ui(),{hoverProps:f,isHovered:h}=Xr({isDisabled:a,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),g=Pt(N($({},t),{id:void 0,defaultClassName:"react-aria-Tab",values:{isSelected:o,isDisabled:a,isFocused:c,isFocusVisible:d,isPressed:l,isHovered:h}})),v=n.props.href?"a":"div";return W.createElement(v,N($({},ae(s,u,f,g)),{ref:r,"data-selected":o||void 0,"data-disabled":a||void 0,"data-focused":c||void 0,"data-focus-visible":d||void 0,"data-pressed":l||void 0,"data-hovered":h||void 0}))});function q3(t,e){const n=x.useContext(Zr);let i=Bl(e),{tabPanelProps:r}=s3(t,n,i),{focusProps:s,isFocused:o,isFocusVisible:a}=Ui(),l=n.selectedKey===t.id,u=Pt(N($({},t),{defaultClassName:"react-aria-TabPanel",values:{isFocused:o,isFocusVisible:a,isInert:!l,state:n}}));if(!l&&!t.shouldForceMount)return null;let c=Gt(t);delete c.id;let d=l?ae(c,r,s,u):u;return W.createElement("div",N($({},d),{ref:i,"data-focused":o||void 0,"data-focus-visible":a||void 0,inert:l?void 0:"true","data-inert":l?void 0:"true"}),W.createElement(bo,{values:[[su,null],[Zr,null]]},u.children))}const Q3=wh(q3);function pp(s){var o=s,{label:t,description:e,errorMessage:n,info:i}=o,r=ne(o,["label","description","errorMessage","info"]);return A.jsx(B3,N($({},r),{children:A.jsxs("div",{className:"flex flex-col gap-2",children:[A.jsx(fS,{className:"font-sans text-sm font-bold leading-tight text-neutral-700",children:t}),A.jsx(V3,{children:A.jsx(T3,{id:t,className:"w-full rounded border border-[#747474] p-2 text-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})}),A.jsx(S3,{className:"font-sans text-sm leading-tight text-red-600",children:n})]})}))}function Z3({label:t,info:e,value:n,onChange:i,maxValue:r,prefix:s,suffix:o,step:a}){return A.jsx("div",{className:"flex justify-center",children:A.jsxs(M3,{value:n,onChange:l=>i(l),className:"w-full",maxValue:r!=null?r:100,step:a!=null?a:1,children:[A.jsx("div",{className:"flex font-sans text-sm font-bold leading-tight text-neutral-700",children:A.jsx(fS,{className:"flex-1",children:t})}),A.jsxs("div",{className:"mt-6 flex gap-4",children:[A.jsx(R3,{className:"relative flex h-7 w-full",children:({state:l})=>A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"slider-track absolute top-[50%] h-1 w-full translate-y-[-50%] rounded-full bg-[#929292]"}),A.jsx("div",{className:"text-right font-sans text-sm font-bold leading-tight text-[#5867E8]",style:{position:"absolute",left:l.getThumbPercent(0)*100+"%",bottom:"20px",transform:"translate(-50%, -50%)",touchAction:"none"},children:A.jsx(L3,{})}),A.jsx("div",{className:"absolute top-[50%] h-1 translate-y-[-50%] rounded-full bg-[#5867E8]",style:{width:l.getThumbPercent(0)*100+"%"}}),A.jsx(I3,{className:"top-[50%] h-7 w-7 cursor-grab rounded-full border border-2 border-solid border-[#5867E8] bg-white shadow-lg outline-none ring-blue-600 transition active:cursor-grabbing focus-visible:ring-2 dragging:bg-gray-200"})]})}),A.jsx("div",{className:"font-sans text-lg font-normal leading-7 tracking-tight text-neutral-900",children:"%"})]})]})})}function J3({children:t}){return A.jsx("div",{className:"flex w-full justify-center border-b",children:A.jsx(W3,{className:"w-full",children:t})})}function eL({children:t}){return A.jsx("div",{className:"flex justify-start border-b",children:A.jsx(G3,{"aria-label":"Results",className:"flex space-x-1",children:t})})}function xS(t){return A.jsx(X3,N($({},t),{className:({isSelected:e})=>`w-full cursor-pointer rounded-tl-lg rounded-tr-lg bg-white px-6 py-2 text-center font-display outline-none ring-[#0176D3] transition-colors focus-visible:ring-2 ${e?"border-b-4 border-[#0176D3] bg-white text-[#0176D3]":""} `}))}function wS(t){return A.jsx(Q3,N($({},t),{className:"mt-8 w-full rounded-2xl bg-white p-0 ring-[#0176D3] focus-visible:ring-2"}))}/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License */function _o(t){return t+.5|0}const ci=(t,e,n)=>Math.max(Math.min(t,n),e);function $o(t){return ci(_o(t*2.55),0,255)}function di(t){return ci(_o(t*255),0,255)}function En(t){return ci(_o(t/2.55)/100,0,1)}function SS(t){return ci(_o(t*100),0,100)}const Ot={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},mp=[..."0123456789ABCDEF"],tL=t=>mp[t&15],nL=t=>mp[(t&240)>>4]+mp[t&15],ou=t=>(t&240)>>4===(t&15),iL=t=>ou(t.r)&&ou(t.g)&&ou(t.b)&&ou(t.a);function rL(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ot[t[1]]*17,g:255&Ot[t[2]]*17,b:255&Ot[t[3]]*17,a:e===5?Ot[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ot[t[1]]<<4|Ot[t[2]],g:Ot[t[3]]<<4|Ot[t[4]],b:Ot[t[5]]<<4|Ot[t[6]],a:e===9?Ot[t[7]]<<4|Ot[t[8]]:255})),n}const sL=(t,e)=>t<255?e(t):"";function oL(t){var e=iL(t)?tL:nL;return t?"#"+e(t.r)+e(t.g)+e(t.b)+sL(t.a,e):void 0}const aL=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function PS(t,e,n){const i=e*Math.min(n,1-n),r=(s,o=(s+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function lL(t,e,n){const i=(r,s=(r+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function uL(t,e,n){const i=PS(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function cL(t,e,n,i,r){return t===r?(e-n)/i+(e.5?c/(2-s-o):c/(s+o),l=cL(n,i,r,c,s),l=l*60+.5),[l|0,u||0,a]}function vp(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(di)}function yp(t,e,n){return vp(PS,t,e,n)}function dL(t,e,n){return vp(uL,t,e,n)}function fL(t,e,n){return vp(lL,t,e,n)}function _S(t){return(t%360+360)%360}function hL(t){const e=aL.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?$o(+e[5]):di(+e[5]));const r=_S(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=dL(r,s,o):e[1]==="hsv"?i=fL(r,s,o):i=yp(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function pL(t,e){var n=gp(t);n[0]=_S(n[0]+e),n=yp(n),t.r=n[0],t.g=n[1],t.b=n[2]}function mL(t){if(!t)return;const e=gp(t),n=e[0],i=SS(e[1]),r=SS(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${En(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const $S={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"},kS={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 gL(){const t={},e=Object.keys(kS),n=Object.keys($S);let i,r,s,o,a;for(i=0;i>16&255,s>>8&255,s&255]}return t}let au;function vL(t){au||(au=gL(),au.transparent=[0,0,0,0]);const e=au[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const yL=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function bL(t){const e=yL.exec(t);let n=255,i,r,s;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?$o(o):ci(o*255,0,255)}return i=+e[1],r=+e[3],s=+e[5],i=255&(e[2]?$o(i):ci(i,0,255)),r=255&(e[4]?$o(r):ci(r,0,255)),s=255&(e[6]?$o(s):ci(s,0,255)),{r:i,g:r,b:s,a:n}}}function xL(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${En(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const bp=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Jr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function wL(t,e,n){const i=Jr(En(t.r)),r=Jr(En(t.g)),s=Jr(En(t.b));return{r:di(bp(i+n*(Jr(En(e.r))-i))),g:di(bp(r+n*(Jr(En(e.g))-r))),b:di(bp(s+n*(Jr(En(e.b))-s))),a:t.a+n*(e.a-t.a)}}function lu(t,e,n){if(t){let i=gp(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=yp(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function TS(t,e){return t&&Object.assign(e||{},t)}function CS(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=di(t[3]))):(e=TS(t,{r:0,g:0,b:0,a:1}),e.a=di(e.a)),e}function SL(t){return t.charAt(0)==="r"?bL(t):hL(t)}class ko{constructor(e){if(e instanceof ko)return e;const n=typeof e;let i;n==="object"?i=CS(e):n==="string"&&(i=rL(e)||vL(e)||SL(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=TS(this._rgb);return e&&(e.a=En(e.a)),e}set rgb(e){this._rgb=CS(e)}rgbString(){return this._valid?xL(this._rgb):void 0}hexString(){return this._valid?oL(this._rgb):void 0}hslString(){return this._valid?mL(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,r=e.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=i.a-r.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,i.r=255&u*i.r+s*r.r+.5,i.g=255&u*i.g+s*r.g+.5,i.b=255&u*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=wL(this._rgb,e._rgb,n)),this}clone(){return new ko(this.rgb)}alpha(e){return this._rgb.a=di(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=_o(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return lu(this._rgb,2,e),this}darken(e){return lu(this._rgb,2,-e),this}saturate(e){return lu(this._rgb,1,e),this}desaturate(e){return lu(this._rgb,1,-e),this}rotate(e){return pL(this._rgb,e),this}}/*! * Chart.js v4.4.6 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */function Mn(){}const PL=(()=>{let t=0;return()=>t++})();function ue(t){return t===null||typeof t=="undefined"}function Ee(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function oe(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Vt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function an(t,e){return Vt(t)?t:e}function le(t,e){return typeof t=="undefined"?e:t}const _L=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function fe(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ce(t,e,n,i){let r,s,o;if(Ee(t))for(s=t.length,r=0;rt,x:t=>t.x,y:t=>t.y};function TL(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function CL(t){const e=TL(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function es(t,e){return(MS[e]||(MS[e]=CL(e)))(t)}function xp(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Co=t=>typeof t!="undefined",fi=t=>typeof t=="function",DS=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function EL(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Oe=Math.PI,nt=2*Oe,du=Number.POSITIVE_INFINITY,ML=Oe/180,Be=Oe/2,Gi=Oe/4,LS=Oe*2/3,wp=Math.log10,hi=Math.sign;function fu(t,e,n){return Math.abs(t-e)r-s).pop(),e}function hu(t){return!isNaN(parseFloat(t))&&isFinite(t)}function LL(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function AL(t,e,n){let i,r,s;for(i=0,r=t.length;il&&u=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Sp(t,e,n){n=n||(o=>t[o]1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const Pp=(t,e,n,i)=>Sp(t,n,i?r=>{const s=t[r][e];return st[r][e]Sp(t,n,i=>t[i][e]>=n);function VL(t,e,n){let i=0,r=t.length;for(;ii&&t[r-1]>n;)r--;return i>0||r{const i="_onData"+xp(n),r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...s)}),o}})})}function VS(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);r!==-1&&i.splice(r,1),!(i.length>0)&&(OS.forEach(s=>{delete t[s]}),delete t._chartjs)}function NS(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const zS=function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame}();function jS(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,zS.call(window,()=>{i=!1,t.apply(e,n)}))}}function zL(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const _p=t=>t==="start"?"left":t==="end"?"right":"center",Qe=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,jL=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e,pu=t=>t===0||t===1,BS=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*nt/n)),KS=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*nt/n)+1,Eo={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Be)+1,easeOutSine:t=>Math.sin(t*Be),easeInOutSine:t=>-.5*(Math.cos(Oe*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>pu(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>pu(t)?t:BS(t,.075,.3),easeOutElastic:t=>pu(t)?t:KS(t,.075,.3),easeInOutElastic(t){return pu(t)?t:t<.5?.5*BS(t*2,.1125,.45):.5+.5*KS(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Eo.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Eo.easeInBounce(t*2)*.5:Eo.easeOutBounce(t*2-1)*.5+.5};function HS(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function WS(t){return HS(t)?t:new ko(t)}function $p(t){return HS(t)?t:new ko(t).saturate(.5).darken(.1).hexString()}const BL=["x","y","borderWidth","radius","tension"],KL=["color","borderColor","backgroundColor"];function HL(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:KL},numbers:{type:"number",properties:BL}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function WL(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const US=new Map;function UL(t,e){e=e||{};const n=t+JSON.stringify(e);let i=US.get(n);return i||(i=new Intl.NumberFormat(t,e),US.set(n,i)),i}function YS(t,e,n){return UL(e,n).format(t)}const GS={values(t){return Ee(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let r,s=t;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)&&(r="scientific"),s=YL(t,n)}const o=wp(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),YS(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(wp(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?GS.numeric.call(this,t,e,n):""}};function YL(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var XS={formatters:GS};function GL(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,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:XS.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Zi=Object.create(null),kp=Object.create(null);function Mo(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;ii.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=(i,r)=>$p(r.backgroundColor),this.hoverBorderColor=(i,r)=>$p(r.borderColor),this.hoverColor=(i,r)=>$p(r.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(e),this.apply(n)}set(e,n){return Tp(this,e,n)}get(e){return Mo(this,e)}describe(e,n){return Tp(kp,e,n)}override(e,n){return Tp(Zi,e,n)}route(e,n,i,r){const s=Mo(this,e),o=Mo(this,i),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[r];return oe(l)?Object.assign({},u,l):le(l,u)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var $e=new XL({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[HL,WL,GL]);function qL(t){return!t||ue(t.size)||ue(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function qS(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function Ji(t,e,n){const i=t.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function QS(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Cp(t,e,n,i){ZS(t,e,n,i,null)}function ZS(t,e,n,i,r){let s,o,a,l,u,c,d,f;const h=e.pointStyle,g=e.rotation,v=e.radius;let b=(g||0)*ML;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,i),t.rotate(b),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(v)||v<=0)){switch(t.beginPath(),h){default:r?t.ellipse(n,i,r/2,v,0,0,nt):t.arc(n,i,v,0,nt),t.closePath();break;case"triangle":c=r?r/2:v,t.moveTo(n+Math.sin(b)*c,i-Math.cos(b)*v),b+=LS,t.lineTo(n+Math.sin(b)*c,i-Math.cos(b)*v),b+=LS,t.lineTo(n+Math.sin(b)*c,i-Math.cos(b)*v),t.closePath();break;case"rectRounded":u=v*.516,l=v-u,o=Math.cos(b+Gi)*l,d=Math.cos(b+Gi)*(r?r/2-u:l),a=Math.sin(b+Gi)*l,f=Math.sin(b+Gi)*(r?r/2-u:l),t.arc(n-d,i-a,u,b-Oe,b-Be),t.arc(n+f,i-o,u,b-Be,b),t.arc(n+d,i+a,u,b,b+Be),t.arc(n-f,i+o,u,b+Be,b+Oe),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*v,c=r?r/2:l,t.rect(n-c,i-l,2*c,2*l);break}b+=Gi;case"rectRot":d=Math.cos(b)*(r?r/2:v),o=Math.cos(b)*v,a=Math.sin(b)*v,f=Math.sin(b)*(r?r/2:v),t.moveTo(n-d,i-a),t.lineTo(n+f,i-o),t.lineTo(n+d,i+a),t.lineTo(n-f,i+o),t.closePath();break;case"crossRot":b+=Gi;case"cross":d=Math.cos(b)*(r?r/2:v),o=Math.cos(b)*v,a=Math.sin(b)*v,f=Math.sin(b)*(r?r/2:v),t.moveTo(n-d,i-a),t.lineTo(n+d,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o);break;case"star":d=Math.cos(b)*(r?r/2:v),o=Math.cos(b)*v,a=Math.sin(b)*v,f=Math.sin(b)*(r?r/2:v),t.moveTo(n-d,i-a),t.lineTo(n+d,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o),b+=Gi,d=Math.cos(b)*(r?r/2:v),o=Math.cos(b)*v,a=Math.sin(b)*v,f=Math.sin(b)*(r?r/2:v),t.moveTo(n-d,i-a),t.lineTo(n+d,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o);break;case"line":o=r?r/2:Math.cos(b)*v,a=Math.sin(b)*v,t.moveTo(n-o,i-a),t.lineTo(n+o,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(b)*(r?r/2:v),i+Math.sin(b)*v);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Ep(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=r.string,QL(t,s),l=0;l+t||0;function Lp(t,e){const n={},i=oe(e),r=i?Object.keys(e):e,s=oe(t)?i?o=>le(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of r)n[o]=iA(s(o));return n}function JS(t){return Lp(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ts(t){return Lp(t,["topLeft","topRight","bottomLeft","bottomRight"])}function _t(t){const e=JS(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ke(t,e){t=t||{},e=e||$e.font;let n=le(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=le(t.style,e.style);i&&!(""+i).match(tA)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:le(t.family,e.family),lineHeight:nA(le(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:le(t.weight,e.weight),string:""};return r.string=qL(r),r}function be(t,e,n,i){let r,s,o;for(r=0,s=t.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function ns(t,e){return Object.assign(Object.create(t),e)}function Ap(t,e=[""],n,i,r=()=>t[0]){const s=n||t;typeof i=="undefined"&&(i=rP("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:i,_getTarget:r,override:a=>Ap([a,...t],e,s,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return tP(a,l,()=>fA(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return sP(a).includes(l)},ownKeys(a){return sP(a)},set(a,l,u){const c=a._storage||(a._storage=r());return a[l]=c[l]=u,delete a._keys,!0}})}function is(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:eP(t,i),setContext:s=>is(t,s,n,i),override:s=>is(t.override(s),e,n,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,a){return tP(s,o,()=>oA(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,a){return t[o]=a,delete s[o],!0}})}function eP(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:fi(n)?n:()=>n,isIndexable:fi(i)?i:()=>i}}const sA=(t,e)=>t?t+xp(e):e,Rp=(t,e)=>oe(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function tP(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function oA(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];return fi(a)&&o.isScriptable(e)&&(a=aA(e,a,t,n)),Ee(a)&&a.length&&(a=lA(e,a,t,o.isIndexable)),Rp(e,a)&&(a=is(a,r,s&&s[e],o)),a}function aA(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||i);return a.delete(t),Rp(t,l)&&(l=Fp(r._scopes,r,t,l)),l}function lA(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&i(t))return e[s.index%e.length];if(oe(e[0])){const l=e,u=r._scopes.filter(c=>c!==l);e=[];for(const c of l){const d=Fp(u,r,t,c);e.push(is(d,s,o&&o[t],a))}}return e}function nP(t,e,n){return fi(t)?t(e,n):t}const uA=(t,e)=>t===!0?e:typeof t=="string"?es(e,t):void 0;function cA(t,e,n,i,r){for(const s of e){const o=uA(n,s);if(o){t.add(o);const a=nP(o._fallback,n,r);if(typeof a!="undefined"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i!="undefined"&&n!==i)return null}return!1}function Fp(t,e,n,i){const r=e._rootScopes,s=nP(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=iP(a,o,n,s||n,i);return l===null||typeof s!="undefined"&&s!==n&&(l=iP(a,o,s,l,i),l===null)?!1:Ap(Array.from(a),[""],r,s,()=>dA(e,n,i))}function iP(t,e,n,i,r){for(;n;)n=cA(t,e,n,i,r);return n}function dA(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Ee(r)&&oe(n)?n:r||{}}function fA(t,e,n,i){let r;for(const s of e)if(r=rP(sA(s,t),n),typeof r!="undefined")return Rp(t,r)?Fp(n,i,t,r):r}function rP(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i!="undefined")return i}}function sP(t){let e=t._keys;return e||(e=t._keys=hA(t._scopes)),e}function hA(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))e.add(i);return Array.from(e)}function Ip(){return typeof window!="undefined"&&typeof document!="undefined"}function Op(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function gu(t,e,n){let i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[n])):i=t,i}const vu=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function pA(t,e){return vu(t).getPropertyValue(e)}const mA=["top","right","bottom","left"];function er(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=mA[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const gA=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function vA(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o=!1,a,l;if(gA(r,s,t.target))a=r,l=s;else{const u=e.getBoundingClientRect();a=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function tr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=vu(n),s=r.boxSizing==="border-box",o=er(r,"padding"),a=er(r,"border","width"),{x:l,y:u,box:c}=vA(t,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:g}=e;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/i),y:Math.round((u-f)/g*n.height/i)}}function yA(t,e,n){let i,r;if(e===void 0||n===void 0){const s=t&&Op(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const o=s.getBoundingClientRect(),a=vu(s),l=er(a,"border","width"),u=er(a,"padding");e=o.width-u.width-l.width,n=o.height-u.height-l.height,i=gu(a.maxWidth,s,"clientWidth"),r=gu(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:i||du,maxHeight:r||du}}const yu=t=>Math.round(t*10)/10;function bA(t,e,n,i){const r=vu(t),s=er(r,"margin"),o=gu(r.maxWidth,t,"clientWidth")||du,a=gu(r.maxHeight,t,"clientHeight")||du,l=yA(t,e,n);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const f=er(r,"border","width"),h=er(r,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-s.width),c=Math.max(0,i?u/i:c-s.height),u=yu(Math.min(u,o,l.maxWidth)),c=yu(Math.min(c,a,l.maxHeight)),u&&!c&&(c=yu(u/2)),(e!==void 0||n!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,u=yu(Math.floor(c*i))),{width:u,height:c}}function oP(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const xA=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ip()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function aP(t,e){const n=pA(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}const wA=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},SA=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function rs(t,e,n){return t?wA(e,n):SA()}function lP(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function uP(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}/*! * Chart.js v4.4.6 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License */class PA{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,r){const s=n.listeners[r],o=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=zS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const s=i.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,i,e,"progress")),s.length||(i.running=!1,this._notify(r,i,e,"complete"),i.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Dn=new PA;const cP="transparent",_A={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=WS(t||cP),r=i.valid&&WS(e||cP);return r&&r.valid?r.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class $A{constructor(e,n,i,r){const s=n[i];r=be([e.to,r,s,e.from]);const o=be([e.from,s,r]);this._active=!0,this._fn=e.fn||_A[e.type||typeof o],this._easing=Eo[e.easing]||Eo.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=be([e.to,n,r,e.from]),this._from=be([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let r=0;r{const s=e[r];if(!oe(s))return;const o={};for(const a of n)o[a]=s[a];(Ee(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,r=TA(e,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&kA(e.options.$animations,i).then(()=>{e.options=i},()=>{}),s}_createAnimations(e,n){const i=this._properties,r=[],s=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(e,n));continue}const c=n[u];let d=s[u];const f=i.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){e[u]=c;continue}s[u]=d=new $A(f,e,u,c),r.push(d)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Dn.add(this._chart,i),!0}}function kA(t,e){const n=[],i=Object.keys(e);for(let r=0;r0||!n&&s<0)return r.index}return null}function gP(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,u=o.axis,c=DA(s,o,i),d=e.length;let f;for(let h=0;hn[i].axis===e).shift()}function RA(t,e){return ns(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function FA(t,e,n){return ns(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Lo(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const r of e){const s=r._stacks;if(!s||s[i]===void 0||s[i][n]===void 0)return;delete s[i][n],s[i]._visualValues!==void 0&&s[i]._visualValues[n]!==void 0&&delete s[i]._visualValues[n]}}}const zp=t=>t==="reset"||t==="none",vP=(t,e)=>e?t:Object.assign({},t),IA=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:hP(n,!0),values:null};class Ao{constructor(e,n){this.chart=e,this._ctx=e.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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Vp(e.vScale,e),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(e){this.index!==e&&Lo(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=le(i.xAxisID,Np(e,"x")),o=n.yAxisID=le(i.yAxisID,Np(e,"y")),a=n.rAxisID=le(i.rAxisID,Np(e,"r")),l=n.indexAxis,u=n.iAxisID=r(l,s,o,a),c=n.vAxisID=r(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),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(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&VS(this._data,this),e._stacked&&Lo(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(oe(n)){const r=this._cachedMeta;this._data=MA(n,r)}else if(i!==n){if(i){VS(i,this);const r=this._cachedMeta;Lo(r),r._parsed=[]}n&&Object.isExtensible(n)&&NL(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const s=n._stacked;n._stacked=Vp(n.vScale,n),n.stack!==i.stack&&(r=!0,Lo(n),n.stack=i.stack),this._resyncElements(e),(r||s!==n._stacked)&&(gP(this,n._parsed),n._stacked=Vp(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,a=s.axis;let l=e===0&&n===r.length?!0:i._sorted,u=e>0&&i._parsed[e-1],c,d,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{Ee(r[e])?f=this.parseArrayData(i,r,e,n):oe(r[e])?f=this.parseObjectData(i,r,e,n):f=this.parsePrimitiveData(i,r,e,n);const h=()=>d[a]===null||u&&d[a]v||d=0;--f)if(!g()){this.updateRangeFromParsed(u,e,h,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let r,s,o;for(r=0,s=n.length;r=0&&ethis.getContext(i,r,n),v=u.resolveNamedOptions(f,h,g,d);return v.$shared&&(v.$shared=l,s[o]=Object.freeze(vP(v,l))),v}_resolveAnimations(e,n,i){const r=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(r.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(e,i,n))}const u=new dP(r,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||zp(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),r=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(n,s)||s!==r;return this.updateSharedOptions(s,n,i),{sharedOptions:s,includeOptions:o}}updateElement(e,n,i,r){zp(r)?Object.assign(e,i):this._resolveAnimations(n,r).update(e,i)}updateSharedOptions(e,n,i){e&&!zp(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,r){e.active=r;const s=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(e,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const r=i.length,s=n.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,e):s{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=e;ar-s))}return t._cache.$bar}function VA(t){const e=t.iScale,n=OA(e,t.type);let i=e._length,r,s,o,a;const l=()=>{o===32767||o===-32768||(Co(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(r=0,s=n.length;r0?r[t-1]:null,a=tMath.abs(a)&&(l=a,u=o),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:r,end:s,min:o,max:a}}function yP(t,e,n,i){return Ee(t)?jA(t,e,n,i):e[n.axis]=n.parse(t,i),e}function bP(t,e,n,i){const r=t.iScale,s=t.vScale,o=r.getLabels(),a=r===s,l=[];let u,c,d,f;for(u=n,c=n+i;u=n?1:-1)}function KA(t){let e,n,i,r,s;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.basec.controller.options.grouped),s=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],u=c=>{const d=c._parsed.find(h=>h[i.axis]===l),f=d&&d[c.vScale.axis];if(ue(f)||isNaN(f))return!0};for(const c of r)if(!(n!==void 0&&u(c))&&((s===!1||o.indexOf(c.stack)===-1||s===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const r=this._getStacks(e,i),s=n!==void 0?r.indexOf(n):-1;return s===-1?r.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,r=[];let s,o;for(s=0,o=n.data.length;s{l[o]&&l[o](e[n],r)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(e.x,e.y,r))}),i&&!a?[]:s}var ZA={evaluateInteractionItems:Ro,modes:{index(t,e,n,i){const r=tr(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Kp(t,r,s,i,o):Hp(t,r,s,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,i){const r=tr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Kp(t,r,s,i,o):Hp(t,r,s,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,u=t.getDatasetMeta(l).data;a=[];for(let c=0;cn.pos===e)}function _P(t,e){return t.filter(n=>PP.indexOf(n.pos)===-1&&n.box.axis===e)}function Io(t,e){return t.sort((n,i)=>{const r=e?i:n,s=e?n:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function JA(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;nu.box.fullSize),!0),i=Io(Fo(e,"left"),!0),r=Io(Fo(e,"right")),s=Io(Fo(e,"top"),!0),o=Io(Fo(e,"bottom")),a=_P(e,"x"),l=_P(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:Fo(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function $P(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function kP(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function i6(t,e,n,i){const{pos:r,box:s}=n,o=t.maxPadding;if(!oe(r)){n.size&&(t[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,t[r]+=n.size}s.getPadding&&kP(o,s.getPadding());const a=Math.max(0,e.outerWidth-$P(o,t,"left","right")),l=Math.max(0,e.outerHeight-$P(o,t,"top","bottom")),u=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function r6(t){const e=t.maxPadding;function n(i){const r=Math.max(e[i]-t[i],0);return t[i]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function s6(t,e){const n=e.maxPadding;function i(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(e[o],n[o])}),s}return i(t?["left","right"]:["top","bottom"])}function Oo(t,e,n,i){const r=[];let s,o,a,l,u,c;for(s=0,o=t.length,u=0;s{typeof v.beforeLayout=="function"&&v.beforeLayout()});const c=l.reduce((v,b)=>b.box.options&&b.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},r);kP(f,_t(i));const h=Object.assign({maxPadding:f,w:s,h:o,x:r.left,y:r.top},r),g=t6(l.concat(u),d);Oo(a.fullSize,h,d,g),Oo(l,h,d,g),Oo(u,h,d,g)&&Oo(l,h,d,g),r6(h),TP(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,TP(a.rightAndBottom,h,d,g),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},ce(a.chartArea,v=>{const b=v.box;Object.assign(b,t.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class CP{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,r){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(e){return!0}updateConfig(e){}}class o6 extends CP{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const wu="$chartjs",a6={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},EP=t=>t===null||t==="";function l6(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[wu]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",EP(r)){const s=aP(t,"width");s!==void 0&&(t.width=s)}if(EP(i))if(t.style.height==="")t.height=t.width/(e||2);else{const s=aP(t,"height");s!==void 0&&(t.height=s)}return t}const MP=xA?{passive:!0}:!1;function u6(t,e,n){t&&t.addEventListener(e,n,MP)}function c6(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,MP)}function d6(t,e){const n=a6[t.type]||t.type,{x:i,y:r}=tr(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Su(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function f6(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Su(a.addedNodes,i),o=o&&!Su(a.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function h6(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Su(a.removedNodes,i),o=o&&!Su(a.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Vo=new Map;let DP=0;function LP(){const t=window.devicePixelRatio;t!==DP&&(DP=t,Vo.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function p6(t,e){Vo.size||window.addEventListener("resize",LP),Vo.set(t,e)}function m6(t){Vo.delete(t),Vo.size||window.removeEventListener("resize",LP)}function g6(t,e,n){const i=t.canvas,r=i&&Op(i);if(!r)return;const s=jS((a,l)=>{const u=r.clientWidth;n(a,l),u{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(r),p6(t,s),o}function Wp(t,e,n){n&&n.disconnect(),e==="resize"&&m6(t)}function v6(t,e,n){const i=t.canvas,r=jS(s=>{t.ctx!==null&&n(d6(s,t))},t);return u6(i,e,r),r}class y6 extends CP{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(l6(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[wu])return!1;const i=n[wu].initial;["height","width"].forEach(s=>{const o=i[s];ue(o)?n.removeAttribute(s):n.setAttribute(s,o)});const r=i.style||{};return Object.keys(r).forEach(s=>{n.style[s]=r[s]}),n.width=n.width,delete n[wu],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),o={attach:f6,detach:h6,resize:g6}[n]||v6;r[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),r=i[n];if(!r)return;({attach:Wp,detach:Wp,resize:Wp}[n]||c6)(e,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,r){return bA(e,n,i,r)}isAttached(e){const n=e&&Op(e);return!!(n&&n.isConnected)}}function b6(t){return!Ip()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?o6:y6}let pi=(Nu=class{constructor(){q(this,"x");q(this,"y");q(this,"active",!1);q(this,"options");q(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return hu(this.x)&&hu(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const r={};return e.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}},q(Nu,"defaults",{}),q(Nu,"defaultRoutes"),Nu);function x6(t,e){const n=t.options.ticks,i=w6(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?P6(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>r)return _6(e,u,s,o/r),u;const c=S6(s,e,r);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(Pu(e,u,c,ue(h)?0:a-h,a),d=0,f=o-1;dr)return l}return Math.max(r,1)}function P6(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,AP=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,RP=(t,e)=>Math.min(e||t,t);function FP(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;so+a)))return l}function C6(t,e){ce(t,n=>{const i=n.gc,r=i.length/2;let s;if(r>e){for(s=0;si?i:n,i=r&&n>i?n:i,{min:an(n,an(i,n)),max:an(i,an(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){fe(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=rA(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=s||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=dt(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:h/(i-1),d+6>a&&(a=h/(i-(e.offset?.5:1)),l=this.maxHeight-No(e.grid)-n.padding-IP(e.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=RL(Math.min(Math.asin(dt((c.highest.height+6)/a,-1,1)),Math.asin(dt(l/u,-1,1))-Math.asin(dt(f/u,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){fe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=IP(r,n.options.font);if(a?(e.width=this.maxWidth,e.height=No(s)+l):(e.height=this.maxHeight,e.width=No(s)+l),i.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=i.padding*2,g=Xi(this.labelRotation),v=Math.cos(g),b=Math.sin(g);if(a){const p=i.mirror?0:b*d.width+v*f.height;e.height=Math.min(this.maxHeight,e.height+p+h)}else{const p=i.mirror?0:v*d.width+b*f.height;e.width=Math.min(this.maxWidth,e.width+p+h)}this._calculatePadding(u,c,b,v)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,r){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="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=r*e.width,h=i*n.height):(f=i*e.height,h=r*n.width):s==="start"?h=n.width:s==="end"?f=e.width:s!=="inner"&&(f=e.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=e.height/2;s==="start"?(c=0,d=e.height):s==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_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(){fe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n({width:o[w]||0,height:a[w]||0});return{first:E(0),last:E(n-1),widest:E(C),highest:E(M),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return IL(this._alignToPixels?Ji(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&ea*r?a/i:l/r:l*r0}_computeGridLineItems(e){const n=this.axis,i=this.chart,r=this.options,{grid:s,position:o,border:a}=r,l=s.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=No(s),h=[],g=a.setContext(this.getContext()),v=g.display?g.width:0,b=v/2,p=function(T){return Ji(i,T,v)};let m,y,S,P,C,M,E,w,_,R,k,O;if(o==="top")m=p(this.bottom),M=this.bottom-f,w=m-b,R=p(e.top)+b,O=e.bottom;else if(o==="bottom")m=p(this.top),R=e.top,O=p(e.bottom)-b,M=m+b,w=this.top+f;else if(o==="left")m=p(this.right),C=this.right-f,E=m-b,_=p(e.left)+b,k=e.right;else if(o==="right")m=p(this.left),_=e.left,k=p(e.right)-b,C=m+b,E=this.left+f;else if(n==="x"){if(o==="center")m=p((e.top+e.bottom)/2+.5);else if(oe(o)){const T=Object.keys(o)[0],L=o[T];m=p(this.chart.scales[T].getPixelForValue(L))}R=e.top,O=e.bottom,M=m+b,w=M+f}else if(n==="y"){if(o==="center")m=p((e.left+e.right)/2);else if(oe(o)){const T=Object.keys(o)[0],L=o[T];m=p(this.chart.scales[T].getPixelForValue(L))}C=m-b,E=C-f,_=e.left,k=e.right}const D=le(r.ticks.maxTicksLimit,d),V=Math.max(1,Math.ceil(d/D));for(y=0;y0&&(G-=H/2);break}I={left:G,top:ee,width:H+j.width,height:Q+j.height,color:V.backdropColor}}b.push({label:S,font:w,textOffset:k,options:{rotation:v,color:L,strokeColor:F,strokeWidth:z,textAlign:K,textBaseline:O,translation:[P,C],backdrop:I}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Xi(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=e+s,l=o.widest.width;let u,c;return n==="left"?r?(c=this.right+s,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?r?(c=this.left+s,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,i==="near"?u="left":i==="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 e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:r,width:s,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,r,s,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(s=>s.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(n.display)for(s=0,o=r.length;s{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let s,o;for(s=0,o=n.length;s{const i=n.split("."),r=i.pop(),s=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");$e.route(s,r,l,a)})}function F6(t){return"id"in t&&"defaults"in t}class I6{constructor(){this.controllers=new _u(Ao,"datasets",!0),this.elements=new _u(pi,"elements"),this.plugins=new _u(Object,"plugins"),this.scales=new _u(ss,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(r=>{const s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(e,s,r):ce(r,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const r=xp(e);fe(i["before"+r],[],i),n[e](i),fe(i["after"+r],[],i)}_getRegistryForType(e){for(let n=0;ns.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(n,i),e,"stop"),this._notify(r(i,n),e,"start")}}function V6(t){const e={},n=[],i=Object.keys(un.plugins.items);for(let s=0;s1&&OP(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function VP(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function W6(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return VP(t,"x",n[0])||VP(t,"y",n[0])}return{}}function U6(t,e){const n=Zi[t.type]||{scales:{}},i=e.scales||{},r=Up(t.type,e),s=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!oe(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Yp(o,a,W6(o,t),$e.scales[a.type]),u=K6(l,r),c=n.scales||{};s[o]=To(Object.create(null),[{axis:l},a,c[l],c[u]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||Up(a,e),c=(Zi[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=B6(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),To(s[h],[{axis:f},i[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];To(a,[$e.scales[a.type],$e.scale])}),s}function NP(t){const e=t.options||(t.options={});e.plugins=le(e.plugins,{}),e.scales=U6(t,e)}function zP(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Y6(t){return t=t||{},t.data=zP(t.data),NP(t),t}const jP=new Map,BP=new Set;function $u(t,e){let n=jP.get(t);return n||(n=e(),jP.set(t,n),BP.add(n)),n}const zo=(t,e,n)=>{const i=es(e,n);i!==void 0&&t.add(i)};class G6{constructor(e){this._config=Y6(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=zP(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),NP(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return $u(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return $u(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return $u(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return $u(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let r=i.get(e);return(!r||n)&&(r=new Map,i.set(e,r)),r}getOptionScopes(e,n,i){const{options:r,type:s}=this,o=this._cachedScopes(e,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(d=>zo(l,e,d))),c.forEach(d=>zo(l,r,d)),c.forEach(d=>zo(l,Zi[s]||{},d)),c.forEach(d=>zo(l,$e,d)),c.forEach(d=>zo(l,kp,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),BP.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Zi[n]||{},$e.datasets[n]||{},{type:n},$e,kp]}resolveNamedOptions(e,n,i,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=KP(this._resolverCache,e,r);let l=o;if(q6(o,n)){s.$shared=!1,i=fi(i)?i():i;const u=this.createResolver(e,i,a);l=is(o,i,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,i=[""],r){const{resolver:s}=KP(this._resolverCache,e,i);return oe(n)?is(s,n,void 0,r):s}}function KP(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let s=i.get(r);return s||(s={resolver:Ap(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,s)),s}const X6=t=>oe(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function q6(t,e){const{isScriptable:n,isIndexable:i}=eP(t);for(const r of e){const s=n(r),o=i(r),a=(o||s)&&t[r];if(s&&(fi(a)||X6(a))||o&&Ee(a))return!0}return!1}var Q6="4.4.6";const Z6=["top","bottom","left","right","chartArea"];function HP(t,e){return t==="top"||t==="bottom"||Z6.indexOf(t)===-1&&e==="x"}function WP(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function UP(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),fe(n&&n.onComplete,[t],e)}function J6(t){const e=t.chart,n=e.options.animation;fe(n&&n.onProgress,[t],e)}function YP(t){return Ip()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ku={},GP=t=>{const e=YP(t);return Object.values(ku).filter(n=>n.canvas===e).pop()};function eR(t,e,n){const i=Object.keys(t);for(const r of i){const s=+r;if(s>=e){const o=t[r];delete t[r],(n>0||s>e)&&(t[s+n]=o)}}}function tR(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function Tu(t,e,n){return t.options.clip?t[n]:e[n]}function nR(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Tu(n,e,"left"),right:Tu(n,e,"right"),top:Tu(i,e,"top"),bottom:Tu(i,e,"bottom")}:e}let Cu=(yi=class{static register(...e){un.add(...e),XP()}static unregister(...e){un.remove(...e),XP()}constructor(e,n){const i=this.config=new G6(n),r=YP(e),s=GP(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||b6(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=PL(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,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 O6,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zL(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],ku[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Dn.listen(this,"complete",UP),Dn.listen(this,"progress",J6),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:r,_aspectRatio:s}=this;return ue(e)?n&&s?s:r?i/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return un}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return QS(this.canvas,this.ctx),this}stop(){return Dn.stop(this),this}resize(e,n){Dn.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,n,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oP(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),fe(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ce(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,r=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=Yp(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),ce(s,o=>{const a=o.options,l=a.id,u=Yp(l,a),c=le(a.type,o.dtype);(a.position===void 0||HP(a.position,u)!==HP(o.dposition))&&(a.position=o.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===c)d=i[l];else{const f=un.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),ce(r,(o,a)=>{o||delete i[a]}),ce(i,o=>{Nt.configure(this,o,o.options),Nt.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((r,s)=>r.index-s.index),i>n){for(let r=n;rn.length&&delete this._stacks,e.forEach((i,r)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(WP("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ce(this.scales,e=>{Nt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!DS(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:s}of n){const o=i==="_removeElements"?-s:s;eR(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=s=>new Set(e.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),r=i(0);for(let s=1;ss.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Nt.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ce(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,r=!i.disabled,s=nR(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Mp(n,{left:i.left===!1?0:s.left-i.left,right:i.right===!1?this.width:s.right+i.right,top:i.top===!1?0:s.top-i.top,bottom:i.bottom===!1?this.height:s.bottom+i.bottom}),e.controller.draw(),r&&Dp(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Ep(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,r){const s=ZA.modes[n];return typeof s=="function"?s(this,e,i,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let r=i.filter(s=>s&&s._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=ns(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const r=i?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,r);Co(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(s,{visible:i}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Dn.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,s,o),e[s]=o},r=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};ce(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},r=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){ce(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ce(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const r=i?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=e.length;a{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!uu(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const r=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=s(n,e),a=i?e:s(e,n);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const s=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:r=[],options:s}=this,o=n,a=this._getActiveElements(e,r,i,o),l=EL(e),u=tR(e,this._lastEvent,i,l);i&&(this._lastEvent=null,fe(s.onHover,[e,a,this],this),l&&fe(s.onClick,[e,a,this],this));const c=!uu(a,r);return(c||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=u,c}_getActiveElements(e,n,i,r){if(e.type==="mouseout")return[];if(!i)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,r)}},q(yi,"defaults",$e),q(yi,"instances",ku),q(yi,"overrides",Zi),q(yi,"registry",un),q(yi,"version",Q6),q(yi,"getChart",GP),yi);function XP(){return ce(Cu.instances,t=>t._plugins.invalidate())}function iR(t,e,n){const{startAngle:i,pixelMargin:r,x:s,y:o,outerRadius:a,innerRadius:l}=e;let u=r/a;t.beginPath(),t.arc(s,o,a,i-u,n+u),l>r?(u=r/l,t.arc(s,o,l,n+u,i-u,!0)):t.arc(s,o,r,n+Be,i-Be),t.closePath(),t.clip()}function rR(t){return Lp(t,["outerStart","outerEnd","innerStart","innerEnd"])}function sR(t,e,n,i){const r=rR(t.options.borderRadius),s=(n-e)/2,o=Math.min(s,i*e/2),a=l=>{const u=(n-Math.min(s,l))*i/2;return dt(l,0,Math.min(s,u))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:dt(r.innerStart,0,o),innerEnd:dt(r.innerEnd,0,o)}}function os(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Eu(t,e,n,i,r,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=e,d=Math.max(e.outerRadius+i+n-u,0),f=c>0?c+i+n+u:0;let h=0;const g=r-l;if(i){const V=c>0?c-i:0,T=d>0?d-i:0,L=(V+T)/2,F=L!==0?g*L/(L+i):g;h=(g-F)/2}const v=Math.max(.001,g*d-n/Oe)/d,b=(g-v)/2,p=l+b+h,m=r-b-h,{outerStart:y,outerEnd:S,innerStart:P,innerEnd:C}=sR(e,f,d,m-p),M=d-y,E=d-S,w=p+y/M,_=m-S/E,R=f+P,k=f+C,O=p+P/R,D=m-C/k;if(t.beginPath(),s){const V=(w+_)/2;if(t.arc(o,a,d,w,V),t.arc(o,a,d,V,_),S>0){const z=os(E,_,o,a);t.arc(z.x,z.y,S,_,m+Be)}const T=os(k,m,o,a);if(t.lineTo(T.x,T.y),C>0){const z=os(k,D,o,a);t.arc(z.x,z.y,C,m+Be,D+Math.PI)}const L=(m-C/f+(p+P/f))/2;if(t.arc(o,a,f,m-C/f,L,!0),t.arc(o,a,f,L,p+P/f,!0),P>0){const z=os(R,O,o,a);t.arc(z.x,z.y,P,O+Math.PI,p-Be)}const F=os(M,p,o,a);if(t.lineTo(F.x,F.y),y>0){const z=os(M,w,o,a);t.arc(z.x,z.y,y,p-Be,w)}}else{t.moveTo(o,a);const V=Math.cos(w)*d+o,T=Math.sin(w)*d+a;t.lineTo(V,T);const L=Math.cos(_)*d+o,F=Math.sin(_)*d+a;t.lineTo(L,F)}t.closePath()}function oR(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){Eu(t,e,n,i,l,r);for(let u=0;u=nt||v,p=Qi(a,c+h,d+h);return b&&p}getCenterPoint(n){const{x:i,y:r,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,d=(s+o)/2,f=(a+l+c+u)/2;return{x:i+Math.cos(d)*f,y:r+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:r}=this,s=(i.offset||0)/4,o=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>nt?Math.floor(r/nt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const u=1-Math.sin(Math.min(Oe,r||0)),c=s*u;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,oR(n,this,c,o,a),aR(n,this,c,o,a),n.restore()}}q(jo,"id","arc"),q(jo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),q(jo,"defaultRoutes",{backgroundColor:"backgroundColor"}),q(jo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function qP(t,e,n,i){const r=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s){let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},hR=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class JP extends pi{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,i){this.maxWidth=e,this.maxHeight=n,this._margins=i,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 e=this.options.labels||{};let n=fe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,r)=>e.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,r=Ke(i.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ZP(i,s);let u,c;n.font=r.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,r,a,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,r){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=r+a;let d=e;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((g,v)=>{const b=i+n/2+s.measureText(g.text).width;(v===0||u[u.length-1]+b+2*a>o)&&(d+=c,u[u.length-(v>0?0:1)]=0,h+=c,f++),l[v]={left:0,top:h,row:f,width:b,height:r},u[u.length-1]+=b+a}),d}_fitCols(e,n,i,r){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-e;let d=a,f=0,h=0,g=0,v=0;return this.legendItems.forEach((b,p)=>{const{itemWidth:m,itemHeight:y}=pR(i,n,s,b,r);p>0&&h+y+2*a>c&&(d+=f+a,u.push({width:f,height:h}),g+=f+a,v++,f=h=0),l[p]={left:g,top:h,col:v,width:m,height:y},f=Math.max(f,m),h+=y+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:s}}=this,o=rs(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=Qe(i,this.left+r,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Qe(i,this.left+r,this.right-this.lineWidths[a])),u.top+=this.top+e+r,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+r}else{let a=0,l=Qe(i,this.top+e+r,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Qe(i,this.top+e+r,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+r,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Mp(e,this),this._draw(),Dp(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:r}=this,{align:s,labels:o}=e,a=$e.color,l=rs(e.rtl,this.left,this.width),u=Ke(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=u.string;const{boxWidth:g,boxHeight:v,itemHeight:b}=ZP(o,d),p=function(C,M,E){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;r.save();const w=le(E.lineWidth,1);if(r.fillStyle=le(E.fillStyle,a),r.lineCap=le(E.lineCap,"butt"),r.lineDashOffset=le(E.lineDashOffset,0),r.lineJoin=le(E.lineJoin,"miter"),r.lineWidth=w,r.strokeStyle=le(E.strokeStyle,a),r.setLineDash(le(E.lineDash,[])),o.usePointStyle){const _={radius:v*Math.SQRT2/2,pointStyle:E.pointStyle,rotation:E.rotation,borderWidth:w},R=l.xPlus(C,g/2),k=M+f;ZS(r,_,R,k,o.pointStyleWidth&&g)}else{const _=M+Math.max((d-v)/2,0),R=l.leftForLtr(C,g),k=ts(E.borderRadius);r.beginPath(),Object.values(k).some(O=>O!==0)?mu(r,{x:R,y:_,w:g,h:v,radius:k}):r.rect(R,_,g,v),r.fill(),w!==0&&r.stroke()}r.restore()},m=function(C,M,E){Do(r,E.text,C,M+b/2,u,{strikethrough:E.hidden,textAlign:l.textAlign(E.textAlign)})},y=this.isHorizontal(),S=this._computeTitleHeight();y?h={x:Qe(s,this.left+c,this.right-i[0]),y:this.top+c+S,line:0}:h={x:this.left+c,y:Qe(s,this.top+S+c,this.bottom-n[0].height),line:0},lP(this.ctx,e.textDirection);const P=b+c;this.legendItems.forEach((C,M)=>{r.strokeStyle=C.fontColor,r.fillStyle=C.fontColor;const E=r.measureText(C.text).width,w=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),_=g+f+E;let R=h.x,k=h.y;l.setWidth(this.width),y?M>0&&R+_+c>this.right&&(k=h.y+=P,h.line++,R=h.x=Qe(s,this.left+c,this.right-i[h.line])):M>0&&k+P>this.bottom&&(R=h.x=R+n[h.line].width+c,h.line++,k=h.y=Qe(s,this.top+S+c,this.bottom-n[h.line].height));const O=l.x(R);if(p(O,k,C),R=jL(w,R+g+f,y?R+_:this.right,e.rtl),m(l.x(R),k,C),y)h.x+=_+c;else if(typeof C.text!="string"){const D=u.lineHeight;h.y+=e_(C,D)+c}else h.y+=P}),uP(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=Ke(n.font),r=_t(n.padding);if(!n.display)return;const s=rs(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,u=r.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Qe(e.align,d,this.right-f);else{const g=this.columnSizes.reduce((v,b)=>Math.max(v,b.height),0);c=u+Qe(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const h=Qe(a,d,d+f);o.textAlign=s.textAlign(_p(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Do(o,n.text,h,c,i)}_computeTitleHeight(){const e=this.options.title,n=Ke(e.font),i=_t(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,r,s;if(Qi(e,this.left,this.right)&&Qi(n,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;is.length>o.length?s:o)),e+n.size/2+i.measureText(r).width}function gR(t,e,n){let i=t;return typeof e.text!="string"&&(i=e_(e,n)),i}function e_(t,e){const n=t.text?t.text.length:0;return e*n}function vR(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var yR={id:"legend",_element:JP,start(t,e,n){const i=t.legend=new JP({ctx:t.ctx,options:n,chart:t});Nt.configure(t,i,n),Nt.addBox(t,i)},stop(t){Nt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Nt.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=_t(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,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:i||u.pointStyle,rotation:u.rotation,textAlign:r||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class t_ extends pi{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const r=Ee(i.text)?i.text.length:1;this._padding=_t(i.padding);const s=r*Ke(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:r,right:s,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=Qe(a,i,s),d=n+e,u=s-i):(o.position==="left"?(c=i+e,d=Qe(a,r,n),l=Oe*-.5):(c=s-e,d=Qe(a,n,r),l=Oe*.5),u=r-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=Ke(n.font),s=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Do(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:u,textAlign:_p(n.align),textBaseline:"middle",translation:[o,a]})}}function bR(t,e){const n=new t_({ctx:t.ctx,options:e,chart:t});Nt.configure(t,n,e),Nt.addBox(t,n),t.titleBlock=n}var xR={id:"title",_element:t_,start(t,e,n){bR(t,n)},stop(t){const e=t.titleBlock;Nt.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Nt.configure(t,i,n),i.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 Ko={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,s=0;for(e=0,n=t.length;ea+l)/i.size,y:r/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=t.length;s-1?t.split(` `):t}function wR(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function n_(t,e){const n=t.chart.ctx,{body:i,footer:r,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=Ke(e.bodyFont),u=Ke(e.titleFont),c=Ke(e.footerFont),d=s.length,f=r.length,h=i.length,g=_t(e.padding);let v=g.height,b=0,p=i.reduce((S,P)=>S+P.before.length+P.lines.length+P.after.length,0);if(p+=t.beforeBody.length+t.afterBody.length,d&&(v+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),p){const S=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;v+=h*S+(p-h)*l.lineHeight+(p-1)*e.bodySpacing}f&&(v+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let m=0;const y=function(S){b=Math.max(b,n.measureText(S).width+m)};return n.save(),n.font=u.string,ce(t.title,y),n.font=l.string,ce(t.beforeBody.concat(t.afterBody),y),m=e.displayColors?o+2+e.boxPadding:0,ce(i,S=>{ce(S.before,y),ce(S.lines,y),ce(S.after,y)}),m=0,n.font=c.string,ce(t.footer,y),n.restore(),b+=g.width,{width:b,height:v}}function SR(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function PR(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&r+s+o>e.width||t==="right"&&r-s-o<0)return!0}function _R(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let u="center";return i==="center"?u=r<=(a+l)/2?"left":"right":r<=s/2?u="left":r>=o-s/2&&(u="right"),PR(u,t,e,n)&&(u="center"),u}function i_(t,e,n){const i=n.yAlign||e.yAlign||SR(t,n);return{xAlign:n.xAlign||e.xAlign||_R(t,e,n,i),yAlign:i}}function $R(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function kR(t,e,n){let{y:i,height:r}=t;return e==="top"?i+=n:e==="bottom"?i-=r+n:i-=r/2,i}function r_(t,e,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,u=r+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=ts(o);let g=$R(e,a);const v=kR(e,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+r:a==="right"&&(g+=Math.max(d,h)+r),{x:dt(g,0,i.width-e.width),y:dt(v,0,i.height-e.height)}}function Du(t,e,n){const i=_t(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function s_(t){return cn([],Ln(t))}function TR(t,e,n){return ns(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function o_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const a_={beforeTitle:Mn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex{const o={before:[],lines:[],after:[]},a=o_(i,s);cn(o.before,Ln(ft(a,"beforeLabel",this,s))),cn(o.lines,ft(a,"label",this,s)),cn(o.after,Ln(ft(a,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(e,n){return s_(ft(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,r=ft(i,"beforeFooter",this,e),s=ft(i,"footer",this,e),o=ft(i,"afterFooter",this,e);let a=[];return a=cn(a,Ln(r)),a=cn(a,Ln(s)),a=cn(a,Ln(o)),a}_createItems(e){const n=this._active,i=this.chart.data,r=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;le.filter(c,d,f,i))),e.itemSort&&(a=a.sort((c,d)=>e.itemSort(c,d,i))),ce(a,c=>{const d=o_(e.callbacks,c);r.push(ft(d,"labelColor",this,c)),s.push(ft(d,"labelPointStyle",this,c)),o.push(ft(d,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const a=Ko[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=n_(this,i),u=Object.assign({},a,l),c=i_(this.chart,i,u),d=r_(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,r){const s=this.getCaretPosition(e,i,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,i){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=ts(a),{x:f,y:h}=e,{width:g,height:v}=n;let b,p,m,y,S,P;return s==="center"?(S=h+v/2,r==="left"?(b=f,p=b-o,y=S+o,P=S-o):(b=f+g,p=b+o,y=S-o,P=S+o),m=b):(r==="left"?p=f+Math.max(l,c)+o:r==="right"?p=f+g-Math.max(u,d)-o:p=this.caretX,s==="top"?(y=h,S=y-o,b=p-o,m=p+o):(y=h+v,S=y+o,b=p+o,m=p-o),P=y),{x1:b,x2:p,x3:m,y1:y,y2:S,y3:P}}drawTitle(e,n,i){const r=this.title,s=r.length;let o,a,l;if(s){const u=rs(i.rtl,this.x,this.width);for(e.x=Du(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",o=Ke(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lm!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,mu(e,{x:v,y:g,w:u,h:l,radius:p}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),mu(e,{x:b,y:g+1,w:u-2,h:l-2,radius:p}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(v,g,u,l),e.strokeRect(v,g,u,l),e.fillStyle=o.backgroundColor,e.fillRect(b,g+1,u-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=i,d=Ke(i.bodyFont);let f=d.lineHeight,h=0;const g=rs(i.rtl,this.x,this.width),v=function(E){n.fillText(E,g.x(e.x+h),e.y+f/2),e.y+=f+s},b=g.textAlign(o);let p,m,y,S,P,C,M;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Du(this,b,i),n.fillStyle=i.bodyColor,ce(this.beforeBody,v),h=a&&b!=="right"?o==="center"?u/2+c:u+2+c:0,S=0,C=r.length;S0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){const o=Ko[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=n_(this,e),l=Object.assign({},o,this._size),u=i_(n,e,l),c=r_(e,l,u,n);(r._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=_t(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(s,e,r,n),lP(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),uP(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,r=e.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!uu(i,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(e,s,n,i),a=this._positionChanged(o,e),l=n||!uu(o,s)||a;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,r){const s=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:r,options:s}=this,o=Ko[s.position].call(this,e,n);return o!==!1&&(i!==o.x||r!==o.y)}}q(qp,"positioners",Ko);var CR={id:"tooltip",_element:qp,positioners:Ko,afterInit(t,e,n){n&&(t.tooltip=new qp({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",N($({},n),{cancelable:!0}))===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:a_},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const ER=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function MR(t,e,n,i){const r=t.indexOf(e);if(r===-1)return ER(t,e,n,i);const s=t.lastIndexOf(e);return r!==s?n:r}const DR=(t,e)=>t===null?null:dt(Math.round(t),0,e);function l_(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}q(Qp,"id","category"),q(Qp,"defaults",{ticks:{callback:l_}});function LR(t,e){const n=[],{bounds:r,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=t,h=s||1,g=c-1,{min:v,max:b}=e,p=!ue(o),m=!ue(a),y=!ue(u),S=(b-v)/(d+1);let P=AS((b-v)/g/h)*h,C,M,E,w;if(P<1e-14&&!p&&!m)return[{value:v},{value:b}];w=Math.ceil(b/P)-Math.floor(v/P),w>g&&(P=AS(w*P/g/h)*h),ue(l)||(C=Math.pow(10,l),P=Math.ceil(P*C)/C),r==="ticks"?(M=Math.floor(v/P)*P,E=Math.ceil(b/P)*P):(M=v,E=b),p&&m&&s&&LL((a-o)/s,P/1e3)?(w=Math.round(Math.min((a-o)/P,c)),P=(a-o)/w,M=o,E=a):y?(M=p?o:M,E=m?a:E,w=u-1,P=(E-M)/w):(w=(E-M)/P,fu(w,Math.round(w),P/1e3)?w=Math.round(w):w=Math.ceil(w));const _=Math.max(RS(P),RS(M));C=Math.pow(10,ue(l)?_:l),M=Math.round(M*C)/C,E=Math.round(E*C)/C;let R=0;for(p&&(f&&M!==o?(n.push({value:o}),Ma)break;n.push({value:k})}return m&&f&&E!==a?n.length&&fu(n[n.length-1].value,a,u_(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!m||E===a)&&n.push({value:E}),n}function u_(t,e,{horizontal:n,minRotation:i}){const r=Xi(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class AR extends ss{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ue(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:s}=this;const o=l=>r=n?r:l,a=l=>s=i?s:l;if(e){const l=hi(r),u=hi(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(r===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||o(r-l)}this.min=r,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=LR(r,s);return e.bounds==="ticks"&&AL(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-n)/Math.max(e.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return YS(e,this.chart.options.locale,this.options.ticks.format)}}class Zp extends AR{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Vt(e)?e:0,this.max=Vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=Xi(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}q(Zp,"id","linear"),q(Zp,"defaults",{ticks:{callback:XS.formatters.numeric}});const Lu={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(Lu);function c_(t,e){return t-e}function d_(t,e){if(ue(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:s}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Vt(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(hu(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function f_(t,e,n,i){const r=ht.length;for(let s=ht.indexOf(t);s=ht.indexOf(n);s--){const o=ht[s];if(Lu[o].common&&t._adapter.diff(r,i,o)>=e-1)return o}return ht[n?ht.indexOf(n):0]}function FR(t){for(let e=ht.indexOf(t)+1,n=ht.length;e=e?n[i]:n[r];t[s]=!0}}function IR(t,e,n,i){const r=t._adapter,s=+r.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function p_(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o+e.value))}initOffsets(e=[]){let n=0,i=0,r,s;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?i=s:i=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=dt(n,0,o),i=dt(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||f_(s.minUnit,n,i,this._getLabelCapacity(n)),a=le(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=hu(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,u?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f+v)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,r){const s=this.options,o=s.ticks.callback;if(o)return fe(o,[e,n,i],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=i[n],h=u&&d&&f&&f.major;return this._adapter.format(e,r||(h?d:c))}generateTickLabels(e){let n,i,r;for(n=0,i=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n=t[i].pos&&e<=t[r].pos&&({lo:i,hi:r}=Pp(t,"pos",e)),{pos:s,time:a}=t[i],{pos:o,time:l}=t[r]):(e>=t[i].time&&e<=t[r].time&&({lo:i,hi:r}=Pp(t,"time",e)),{time:s,pos:a}=t[i],{time:o,pos:l}=t[r]);const u=o-s;return u?a+(l-a)*(e-s)/u:a}class m_ extends Au{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Ru(n,this.min),this._tableRange=Ru(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,r=[],s=[];let o,a,l,u,c;for(o=0,a=e.length;o=n&&u<=i&&r.push(u);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=r.length;or-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Ru(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Ru(this._table,i*this._tableRange+this._minPos,!0)}}q(m_,"id","timeseries"),q(m_,"defaults",Au.defaults);const g_="label";function v_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function OR(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function y_(t,e){t.labels=e}function b_(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g_;const i=[];t.datasets=e.map(r=>{const s=t.datasets.find(o=>o[n]===r[n]);return!s||!r.data||i.includes(s)?$({},r):(i.push(s),Object.assign(s,r),s)})}function VR(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g_;const n={labels:[],datasets:[]};return y_(n,t.labels),b_(n,t.datasets,e),n}function NR(t,e){const p=t,{height:n=150,width:i=300,redraw:r=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:d}=p,f=ne(p,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]),h=x.useRef(null),g=x.useRef(),v=()=>{h.current&&(g.current=new Cu(h.current,{type:o,data:VR(a,s),options:l&&$({},l),plugins:u}),v_(e,g.current))},b=()=>{v_(e,null),g.current&&(g.current.destroy(),g.current=null)};return x.useEffect(()=>{!r&&g.current&&l&&OR(g.current,l)},[r,l]),x.useEffect(()=>{!r&&g.current&&y_(g.current.config.data,a.labels)},[r,a.labels]),x.useEffect(()=>{!r&&g.current&&a.datasets&&b_(g.current.config.data,a.datasets,s)},[r,a.datasets]),x.useEffect(()=>{g.current&&(r?(b(),setTimeout(v)):g.current.update(d))},[r,l,a.labels,a.datasets,d]),x.useEffect(()=>{g.current&&(b(),setTimeout(v))},[o]),x.useEffect(()=>(v(),()=>b()),[]),W.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:i},f),c)}const zR=x.forwardRef(NR);function jR(t,e){return Cu.register(e),x.forwardRef((n,i)=>W.createElement(zR,Object.assign({},n,{ref:i,type:t})))}const BR=jR("bar",bu);/*! * chartjs-plugin-datalabels v2.2.0 * https://chartjs-plugin-datalabels.netlify.app * (c) 2017-2022 chartjs-plugin-datalabels contributors * Released under the MIT license */var x_=function(){if(typeof window!="undefined"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Ho={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(` `)):Array.isArray(n)?t.push.apply(t,n):ue(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var i=[].concat(e),r=i.length,s=t.font,o=0,a;for(t.font=n.string,a=0;an.right&&(i|=S_),en.bottom&&(i|=P_),i}function WR(t,e){for(var n=t.x0,i=t.y0,r=t.x1,s=t.y1,o=Fu(n,i,e),a=Fu(r,s,e),l,u,c;!(!(o|a)||o&a);)l=o||a,l&__?(u=n+(r-n)*(e.top-i)/(s-i),c=e.top):l&P_?(u=n+(r-n)*(e.bottom-i)/(s-i),c=e.bottom):l&S_?(c=i+(s-i)*(e.right-n)/(r-n),u=e.right):l&w_&&(c=i+(s-i)*(e.left-n)/(r-n),u=e.left),l===o?(n=u,i=c,o=Fu(n,i,e)):(r=u,s=c,a=Fu(r,s,e));return{x0:n,x1:r,y0:i,y1:s}}function Iu(t,e){var n=e.anchor,i=t,r,s;return e.clamp&&(i=WR(i,e.area)),n==="start"?(r=i.x0,s=i.y0):n==="end"?(r=i.x1,s=i.y1):(r=(i.x0+i.x1)/2,s=(i.y0+i.y1)/2),KR(r,s,t.vx,t.vy,e.align)}var Ou={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,i=Math.cos(n),r=Math.sin(n),s=t.innerRadius,o=t.outerRadius;return Iu({x0:t.x+i*s,y0:t.y+r*s,x1:t.x+i*o,y1:t.y+r*o,vx:i,vy:r},e)},point:function(t,e){var n=Jp(t,e.origin),i=n.x*t.options.radius,r=n.y*t.options.radius;return Iu({x0:t.x-i,y0:t.y-r,x1:t.x+i,y1:t.y+r,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=Jp(t,e.origin),i=t.x,r=t.y,s=0,o=0;return t.horizontal?(i=Math.min(t.x,t.base),s=Math.abs(t.base-t.x)):(r=Math.min(t.y,t.base),o=Math.abs(t.base-t.y)),Iu({x0:i,y0:r+o,x1:i+s,y1:r,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=Jp(t,e.origin);return Iu({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},An=Ho.rasterize;function UR(t){var e=t.borderWidth||0,n=t.padding,i=t.size.height,r=t.size.width,s=-r/2,o=-i/2;return{frame:{x:s-n.left-e,y:o-n.top-e,w:r+n.width+e*2,h:i+n.height+e*2},text:{x:s,y:o,w:r,h:i}}}function YR(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var i=n.getBasePixel();return t.horizontal?{x:i,y:null}:{x:null,y:i}}function GR(t){return t instanceof jo?Ou.arc:t instanceof Mu?Ou.point:t instanceof Bo?Ou.bar:Ou.fallback}function XR(t,e,n,i,r,s){var o=Math.PI/2;if(s){var a=Math.min(s,r/2,i/2),l=e+a,u=n+a,c=e+i-a,d=n+r-a;t.moveTo(e,u),li.x+i.w+n*2||t.y>i.y+i.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),i=[Vu(e[0],e[1]),Vu(e[0],e[3])],r,s,o;for(this._rotation!==t._rotation&&i.push(Vu(n[0],n[1]),Vu(n[0],n[3])),r=0;r=0;--n)for(r=t[n].$layout,i=n-1;i>=0&&r._visible;--i)s=t[i].$layout,s._visible&&r._box.intersects(s._box)&&e(r,s);return t}function iF(t){var e,n,i,r,s,o,a;for(e=0,n=t.length;el.getProps([u],!0)[u]}),s=i.geometry(),o=C_(a,i.model(),s),r._box.update(o,s,i.rotation()));return nF(t,function(l,u){var c=l._hidable,d=u._hidable;c&&d||d?u._visible=!1:c&&(l._visible=!1)})}var Uo={prepare:function(t){var e=[],n,i,r,s,o;for(n=0,r=t.length;n=0;--n)if(i=t[n].$layout,i&&i._visible&&i._box.contains(e))return t[n];return null},draw:function(t,e){var n,i,r,s,o,a;for(n=0,i=e.length;n{const l=()=>{s(window.innerWidth)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[]);const o={labels:t.slice(0,4).map(l=>l.year),datasets:[{label:Y.oblroi_resultsTableHeader2,data:t.slice(0,4).map(l=>l.serviceRepCost),backgroundColor:"#F0F3FC"},{label:Y.oblroi_resultsTableHeader3,data:t.slice(0,4).map(l=>l.cost),backgroundColor:"#4864D2"},{label:Y.oblroi_resultsTableHeader4,data:t.slice(0,4).map(l=>l.savings),backgroundColor:"#C8D4F8"}]},a={indexAxis:"y",plugins:{title:{display:!1,text:"Stacked Bar Chart"},legend:{position:"bottom",labels:{color:"#000000",font:{size:12,family:"Salesforce Sans"}}},tooltip:{enabled:!1},datalabels:{display:!(r<768),color:"#3651C0",anchor:"middle",font:{weight:"bold",size:r<1024?10:16},align:"middle",formatter:(l,u)=>u.dataset.label===Y.oblroi_resultsTableHeader4&&l!==0?new Intl.NumberFormat(n,{style:"currency",currency:i,maximumFractionDigits:0}).format(l):null}},elements:{bar:{borderRadius:0,barPercentage:1}},responsive:!0,maintainAspectRatio:!1,scales:{x:{stacked:!0,grid:{display:!0,drawTicks:!0,color:"#fff",tickColor:"#D9D9D9"},title:{display:!0,text:Y.oblroi_resultsTableAnnualCost,color:"#333",align:"start",padding:{top:10,bottom:10},font:{size:12,family:"Salesforce Sans"}},suggestedMax:0},y:{stacked:!0,grid:{display:!1}}}};return A.jsx(BR,{data:o,options:a,"aria-label":e})}var M_=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,mt=t=>!t||typeof t!="object"||Object.keys(t).length===0,fF=(t,e)=>JSON.stringify(t)===JSON.stringify(e);function D_(t,e){t.forEach(function(n){Array.isArray(n)?D_(n,e):e.push(n)})}function L_(t){let e=[];return D_(t,e),e}var A_=(...t)=>L_(t).filter(Boolean),R_=(t,e)=>{let n={},i=Object.keys(t),r=Object.keys(e);for(let s of i)if(r.includes(s)){let o=t[s],a=e[s];typeof o=="object"&&typeof a=="object"?n[s]=R_(o,a):Array.isArray(o)||Array.isArray(a)?n[s]=A_(a,o):n[s]=a+" "+o}else n[s]=t[s];for(let s of r)i.includes(s)||(n[s]=e[s]);return n},F_=t=>!t||typeof t!="string"?t:t.replace(/\s+/g," ").trim();const tm="-",hF=t=>{const e=mF(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(tm);return a[0]===""&&a.length!==1&&a.shift(),I_(a,e)||pF(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},I_=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?I_(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(tm);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},O_=/^\[(.+)\]$/,pF=t=>{if(O_.test(t)){const e=O_.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},mF=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return vF(Object.entries(t.classGroups),n).forEach(([s,o])=>{nm(o,i,s,e)}),i},nm=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:V_(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(gF(r)){nm(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{nm(o,V_(e,s),n,i)})})},V_=(t,e)=>{let n=t;return e.split(tm).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},gF=t=>t.isThemeGetter,vF=(t,e)=>e?t.map(([n,i])=>{const r=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,r]}):t,yF=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return r(s,o),o},set(s,o){n.has(s)?n.set(s,o):r(s,o)}}},N_="!",bF=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,r=e[0],s=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let b=0;bc?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:o}):o},xF=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},wF=t=>$({cache:yF(t.cacheSize),parseClassName:bF(t)},hF(t)),SF=/\s+/,PF=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,s=[],o=t.trim().split(SF);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let g=!!h,v=i(g?f.substring(0,h):f);if(!v){if(!g){a=u+(a.length>0?" "+a:a);continue}if(v=i(f),!v){a=u+(a.length>0?" "+a:a);continue}g=!1}const b=xF(c).join(":"),p=d?b+N_:b,m=p+v;if(s.includes(m))continue;s.push(m);const y=r(v,g);for(let S=0;S0?" "+a:a)}return a};function _F(){let t=0,e,n,i="";for(;t{if(typeof t=="string")return t;let e,n="";for(let i=0;id(c),t());return n=wF(u),i=n.cache.get,r=n.cache.set,s=a,a(l)}function a(l){const u=i(l);if(u)return u;const c=PF(l,n);return r(l,c),c}return function(){return s(_F.apply(null,arguments))}}const ve=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},j_=/^\[(?:([a-z-]+):)?(.+)\]$/i,$F=/^\d+\/\d+$/,kF=new Set(["px","full","screen"]),TF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,EF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,MF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=t=>as(t)||kF.has(t)||$F.test(t),gi=t=>ls(t,"length",NF),as=t=>!!t&&!Number.isNaN(Number(t)),rm=t=>ls(t,"number",as),Yo=t=>!!t&&Number.isInteger(Number(t)),LF=t=>t.endsWith("%")&&as(t.slice(0,-1)),J=t=>j_.test(t),vi=t=>TF.test(t),AF=new Set(["length","size","percentage"]),RF=t=>ls(t,AF,B_),FF=t=>ls(t,"position",B_),IF=new Set(["image","url"]),OF=t=>ls(t,IF,jF),VF=t=>ls(t,"",zF),Go=()=>!0,ls=(t,e,n)=>{const i=j_.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},NF=t=>CF.test(t)&&!EF.test(t),B_=()=>!1,zF=t=>MF.test(t),jF=t=>DF.test(t),sm=()=>{const t=ve("colors"),e=ve("spacing"),n=ve("blur"),i=ve("brightness"),r=ve("borderColor"),s=ve("borderRadius"),o=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),u=ve("grayscale"),c=ve("hueRotate"),d=ve("invert"),f=ve("gap"),h=ve("gradientColorStops"),g=ve("gradientColorStopPositions"),v=ve("inset"),b=ve("margin"),p=ve("opacity"),m=ve("padding"),y=ve("saturate"),S=ve("scale"),P=ve("sepia"),C=ve("skew"),M=ve("space"),E=ve("translate"),w=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",J,e],k=()=>[J,e],O=()=>["",Rn,gi],D=()=>["auto",as,J],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",J],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[as,J];return{cacheSize:500,separator:":",theme:{colors:[Go],spacing:[Rn,gi],blur:["none","",vi,J],brightness:I(),borderColor:[t],borderRadius:["none","","full",vi,J],borderSpacing:k(),borderWidth:O(),contrast:I(),grayscale:z(),hueRotate:I(),invert:z(),gap:k(),gradientColorStops:[t],gradientColorStopPositions:[LF,gi],inset:R(),margin:R(),opacity:I(),padding:k(),saturate:I(),scale:I(),sepia:z(),skew:I(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[vi]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...V(),J]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yo,J]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Yo,J]}],"grid-cols":[{"grid-cols":[Go]}],"col-start-end":[{col:["auto",{span:["full",Yo,J]},J]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Go]}],"row-start-end":[{row:["auto",{span:[Yo,J]},J]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,e]}],"min-w":[{"min-w":[J,e,"min","max","fit"]}],"max-w":[{"max-w":[J,e,"none","full","min","max","fit","prose",{screen:[vi]},vi]}],h:[{h:[J,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,e,"auto","min","max","fit"]}],"font-size":[{text:["base",vi,gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rm]}],"font-family":[{font:[Go]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",as,rm]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rn,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rn,gi]}],"underline-offset":[{"underline-offset":["auto",Rn,J]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),FF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",RF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OF]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...T(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:T()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...T()]}],"outline-offset":[{"outline-offset":[Rn,J]}],"outline-w":[{outline:[Rn,gi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Rn,gi]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",vi,VF]}],"shadow-color":[{shadow:[Go]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vi,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Yo,J]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Rn,gi,rm]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},BF=(t,{cacheSize:e,prefix:n,separator:i,experimentalParseClassName:r,extend:s={},override:o={}})=>{Xo(t,"cacheSize",e),Xo(t,"prefix",n),Xo(t,"separator",i),Xo(t,"experimentalParseClassName",r);for(const a in o)KF(t[a],o[a]);for(const a in s)HF(t[a],s[a]);return t},Xo=(t,e,n)=>{n!==void 0&&(t[e]=n)},KF=(t,e)=>{if(e)for(const n in e)Xo(t,n,e[n])},HF=(t,e)=>{if(e)for(const n in e){const i=e[n];i!==void 0&&(t[n]=(t[n]||[]).concat(i))}},WF=(t,...e)=>typeof t=="function"?im(sm,t,...e):im(()=>BF(sm(),t),...e),UF=im(sm);var YF={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},K_=t=>t||void 0,qo=(...t)=>K_(L_(t).filter(Boolean).join(" ")),om=null,Fn={},am=!1,Qo=(...t)=>e=>e.twMerge?((!om||am)&&(am=!1,om=mt(Fn)?UF:WF(N($({},Fn),{extend:$({theme:Fn.theme,classGroups:Fn.classGroups,conflictingClassGroupModifiers:Fn.conflictingClassGroupModifiers,conflictingClassGroups:Fn.conflictingClassGroups},Fn.extend)}))),K_(om(qo(t)))):qo(t),H_=(t,e)=>{for(let n in e)t.hasOwnProperty(n)?t[n]=qo(t[n],e[n]):t[n]=e[n];return t},GF=(t,e)=>{let{extend:n=null,slots:i={},variants:r={},compoundVariants:s=[],compoundSlots:o=[],defaultVariants:a={}}=t,l=$($({},YF),e),u=n!=null&&n.base?qo(n.base,t==null?void 0:t.base):t==null?void 0:t.base,c=n!=null&&n.variants&&!mt(n.variants)?R_(r,n.variants):r,d=n!=null&&n.defaultVariants&&!mt(n.defaultVariants)?$($({},n.defaultVariants),a):a;!mt(l.twMergeConfig)&&!fF(l.twMergeConfig,Fn)&&(am=!0,Fn=l.twMergeConfig);let f=mt(n==null?void 0:n.slots),h=mt(i)?{}:$({base:qo(t==null?void 0:t.base,f&&(n==null?void 0:n.base))},i),g=f?h:H_($({},n==null?void 0:n.slots),mt(h)?{base:t==null?void 0:t.base}:h),v=mt(n==null?void 0:n.compoundVariants)?s:A_(n==null?void 0:n.compoundVariants,s),b=m=>{if(mt(c)&&mt(i)&&f)return Qo(u,m==null?void 0:m.class,m==null?void 0:m.className)(l);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let y=(k,O,D=[],V)=>{let T=D;if(typeof O=="string")T=T.concat(F_(O).split(" ").map(L=>`${k}:${L}`));else if(Array.isArray(O))T=T.concat(O.reduce((L,F)=>L.concat(`${k}:${F}`),[]));else if(typeof O=="object"&&typeof V=="string"){for(let L in O)if(O.hasOwnProperty(L)&&L===V){let F=O[L];if(F&&typeof F=="string"){let z=F_(F);T[V]?T[V]=T[V].concat(z.split(" ").map(K=>`${k}:${K}`)):T[V]=z.split(" ").map(K=>`${k}:${K}`)}else Array.isArray(F)&&F.length>0&&(T[V]=F.reduce((z,K)=>z.concat(`${k}:${K}`),[]))}}return T},S=(k,O=c,D=null,V=null)=>{var T;let L=O[k];if(!L||mt(L))return null;let F=(T=V==null?void 0:V[k])!=null?T:m==null?void 0:m[k];if(F===null)return null;let z=M_(F),K=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,I=d==null?void 0:d[k],j=[];if(typeof z=="object"&&K)for(let[ee,G]of Object.entries(z)){let He=L[G];if(ee==="initial"){I=G;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(ee)||(j=y(ee,He,j,D))}let Q=z!=null&&typeof z!="object"?z:M_(I),H=L[Q||"false"];return typeof j=="object"&&typeof D=="string"&&j[D]?H_(j,H):j.length>0?(j.push(H),j):H},P=()=>c?Object.keys(c).map(k=>S(k,c)):null,C=(k,O)=>{if(!c||typeof c!="object")return null;let D=new Array;for(let V in c){let T=S(V,c,k,O),L=k==="base"&&typeof T=="string"?T:T&&T[k];L&&(D[D.length]=L)}return D},M={};for(let k in m)m[k]!==void 0&&(M[k]=m[k]);let E=(k,O)=>{var D;let V=typeof(m==null?void 0:m[k])=="object"?{[k]:(D=m[k])==null?void 0:D.initial}:{};return $($($($({},d),M),V),O)},w=(k=[],O)=>{let D=[];for(let V of k){let T=V,{class:L,className:F}=T,z=ne(T,["class","className"]);let K=!0;for(let[I,j]of Object.entries(z)){let Q=E(I,O);if(Array.isArray(j)){if(!j.includes(Q[I])){K=!1;break}}else if(Q[I]!==j){K=!1;break}}K&&(L&&D.push(L),F&&D.push(F))}return D},_=k=>{let O=w(v,k);if(!Array.isArray(O))return O;let D={};for(let V of O)if(typeof V=="string"&&(D.base=Qo(D.base,V)(l)),typeof V=="object")for(let[T,L]of Object.entries(V))D[T]=Qo(D[T],L)(l);return D},R=k=>{if(o.length<1)return null;let O={};for(let D of o){let V=D,{slots:T=[],class:L,className:F}=V,z=ne(V,["slots","class","className"]);if(!mt(z)){let K=!0;for(let I of Object.keys(z)){let j=E(I,k)[I];if(j===void 0||(Array.isArray(z[I])?!z[I].includes(j):z[I]!==j)){K=!1;break}}if(!K)continue}for(let K of T)O[K]=O[K]||[],O[K].push([L,F])}return O};if(!mt(i)||!f){let k={};if(typeof g=="object"&&!mt(g))for(let O of Object.keys(g))k[O]=D=>{var V,T;return Qo(g[O],C(O,D),((V=_(D))!=null?V:[])[O],((T=R(D))!=null?T:[])[O],D==null?void 0:D.class,D==null?void 0:D.className)(l)};return k}return Qo(u,P(),w(v),m==null?void 0:m.class,m==null?void 0:m.className)(l)},p=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return b.variantKeys=p(),b.extend=n,b.base=u,b.slots=g,b.variants=c,b.defaultVariants=d,b.compoundSlots=o,b.compoundVariants=v,b};const XF=GF({base:"w-full px-8 py-3 min-h-[52px] rounded text-center font-sans font-bold tracking-tight flex items-center justify-center",variants:{color:{primary:"bg-sfprimary text-white hover:bg-sfnavy",secondary:"border-2 border-sfprimary bg-white text-sfprimary hover:bg-sfprimary hover:text-white"},size:{sm:"text-sm leading-none",md:"text-base leading-none",lg:"px-8 py-5 text-lg leading-none"}},compoundVariants:[{size:["sm","md"],class:""}]}),qF=(t,e)=>{const n=t.target,i=n.closest('[data-blade-name="sf/open"]'),r=i?i.getAttribute("data-blade-id"):"",s=i?i.getAttribute("data-blade-position"):"";let o=0,a=n.previousElementSibling;for(;a;)o++,a=a.previousElementSibling;const l={event:"custEv_contentClick",blade:{id:r,name:"sf/marquee/agentforce",position:s,source:"www",variant:"marquee",state:"rendered",type:"blade",module:{id:r,name:n.innerText,type:"cta",position:o+1,link:{text:n.innerText,url:n.getAttribute("href"),type:`${e} cta`,internalDriver:""}}}};window.dataLayer&&window.dataLayer.push($({},l))},W_=({children:t,url:e,target:n,variant:i="primary",size:r="md"})=>A.jsx(A.Fragment,{children:A.jsx(c3,{onPress:s=>{qF(s,i)},href:e,target:n,className:XF({size:r,color:i==="text"?"secondary":i}),children:t})}),QF=()=>A.jsxs("div",{className:"relative mx-auto h-[200px] w-full sm:h-[300px]",children:[A.jsx("div",{className:"masked-contour absolute inset-x-0 bottom-0 z-0 mx-auto -mb-[2px] w-full",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/contour.svg",alt:"",className:"w-full"})}),A.jsx("div",{className:"data-dust-left absolute left-0 top-[-50px] z-10 sm:top-[-450px]",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/DataDust.svg",alt:"",className:"w-auto max-sm:w-[250px]"})}),A.jsx("div",{className:"data-dust-right visible absolute right-0 top-[-80px] z-10 max-lg:hidden",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/DataDust-2.svg",alt:""})}),A.jsx("div",{className:"astro-agentforce absolute bottom-[-20px] right-0 z-20 sm:right-[10%]",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/astro-bot.png",alt:"",className:"w-[200px] sm:w-[260px]"})}),A.jsx("div",{className:"einstein-agentforce absolute bottom-[-40px] left-[13%] z-20",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/einstein-bot.png",alt:"",className:"w-[200px] sm:w-[260px]"})}),A.jsx("div",{className:"appy-agentforce absolute bottom-[-20px] left-[3%] z-20",children:A.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/appy-bot.png",alt:"",className:"w-[80px] sm:w-[180px]"})})]}),ZF={name:"agentforce-roi",private:!0,version:"0.2.4",type:"module",scripts:{dev:"vite",build:"vite build",lint:"eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview",commit:"git-cz",format:"prettier --write ."},dependencies:{"chart.js":"^4.4.5","chartjs-plugin-datalabels":"^2.2.0","framer-motion":"^11.11.9",react:"^18.3.1","react-aria-components":"^1.4.0","react-chartjs-2":"^5.2.0","react-dom":"^18.3.1","tailwind-variants":"^0.2.1"},devDependencies:{"@types/node":"^22.7.5","@types/react":"^18.3.11","@types/react-dom":"^18.3.1","@typescript-eslint/eslint-plugin":"^8.8.1","@typescript-eslint/parser":"^8.8.1","@vitejs/plugin-react":"^4.3.2",autoprefixer:"^10.4.20",eslint:"^9.12.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.12",postcss:"^8.4.47","postcss-prefix-selector":"^2.1.0",prettier:"3.3.3","prettier-plugin-tailwindcss":"^0.6.8",tailwindcss:"^3.4.13","tailwindcss-react-aria-components":"^1.1.6",typescript:"^5.6.3",vite:"^5.4.8"},config:{commitizen:{path:"./node_modules/cz-conventional-changelog"}}},lm={AP:"USD",AU:"AUD",IN:"USD",CA:"USD",EU:"EUR",UK:"GBP",DE:"EUR",FR:"EUR",JP:"JPY",BR:"USD",ES:"EUR",IT:"EUR",NL:"EUR",MX:"USD",KR:"USD",SE:"SEK",TH:"USD",TW:"USD","FR-CA":"USD",US:"USD"},us={USD:2,AUD:2.8,EUR:2,GBP:1.6,JPY:240,SEK:20},um=["in","ap","au","eu","ca","uk","se","th","kr","tw","de","fr","jp","it","es","nl","mx","fr-ca"];function JF({appRegion:t,appDebug:e}){const[n,i]=x.useState(20),[r,s]=x.useState(5e4),[o,a]=x.useState(20),[l,u]=x.useState(50),[c,d]=x.useState("US"),[f,h]=x.useState("USD"),[g,v]=x.useState(2),[b,p]=x.useState("JSON"),[m,y]=x.useState("");console.log("version",ZF.version),x.useEffect(()=>{(()=>{var ir,rr;const He=document.querySelector('[data-component="table"]');He&&(He.querySelectorAll("tbody tr").forEach(ju=>{var bi,Bu;const cs=ju.querySelectorAll("td");if(cs.length===2){const Zo=(bi=cs[0].textContent)==null?void 0:bi.trim(),Jo=(Bu=cs[1].textContent)==null?void 0:Bu.trim();Zo&&Jo&&Y.hasOwnProperty(Zo)&&(Y[Zo]=Jo)}}),p("Table")),He&&new URLSearchParams(window.location.search).get("showTable")!=="true"&&((ir=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||ir.remove(),(rr=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||rr.remove())})()},[]),x.useEffect(()=>{const G=window.location.pathname.split("/")[1];t?(y(t),d(t.toUpperCase()),h(lm[t.toUpperCase()]),v(us[f]),s(25e3*us[f])):G.length===2&&um.includes(G)||G==="fr-ca"?(console.log("regionCode",G),y(G),d(G.toUpperCase()),h(lm[G.toUpperCase()]),v(us[f]),s(25e3*us[f])):c!=="US"&&(h(lm[c]),v(us[f]),s(25e3*us[f]))},[f,c]);const S=n*r,P=o*n*260,M=75*n*12,E=l,w=l-l*.3,_=w-w*.3;//! Removed `* 2` from costYear1 per Vandana Gangwar const R=P*g*(_/100),k=P*g*(w/100),O=P*g*(E/100),D=R+k+O,V=(S+M)*(1-_/100),T=(S+M)*(1-w/100),L=(S+M)*(1-E/100),F=V+T+L,z=S+M-V-R,K=S+M-T-k,I=S+M-L-O,j=z+K+I,Q=[{year:Y.oblroi_chart_year_0,serviceRepCost:Math.max(0,S),cost:0,savings:0},{year:Y.oblroi_chart_year_1,serviceRepCost:Math.max(0,V),cost:Math.max(0,R),savings:Math.max(0,z)},{year:Y.oblroi_chart_year_2,serviceRepCost:Math.max(0,T),cost:Math.max(0,k),savings:Math.max(0,K)},{year:Y.oblroi_chart_year_3,serviceRepCost:Math.max(0,L),cost:Math.max(0,O),savings:Math.max(0,I)},{serviceRepCost:Math.max(0,F),year:Y.oblroi_chart_total,cost:Math.max(0,D),savings:Math.max(0,j)}],H=`${Y.oblroi_service_agent_handling} ${Math.round(l)}${Y.oblroi_conversations} $${Math.round(j)} ${Y.oblroi_over_years}`,ee=`${Y.oblroi_chart_intro} $${Math.round(V)} ${Y.oblroi_chart_human_cost}, $${Math.round(R)} ${Y.oblroi_chart_agentforce_cost} $${Math.round(z)} ${Y.oblroi_chart_net_savings} ${Y.oblroi_chart_year_1} $${Math.round(T)} ${Y.oblroi_chart_human_cost}, $${Math.round(k)} ${Y.oblroi_chart_agentforce_cost} $${Math.round(K)} ${Y.oblroi_chart_net_savings} ${Y.oblroi_chart_in} ${Y.oblroi_chart_year_2} . $${Math.round(L)} ${Y.oblroi_chart_human_cost}, $${Math.round(O)} ${Y.oblroi_chart_agentforce_cost} $${Math.round(I)} ${Y.oblroi_chart_net_savings} ${Y.oblroi_chart_in} ${Y.oblroi_chart_year_3} .`;return A.jsxs("div",{className:"bg-agentforce-light",children:[new URLSearchParams(window.location.search).get("debug")==="true"&&A.jsxs("div",{className:"bg-agentpurple text-white text-sm font-semibold py-2",children:[A.jsxs("div",{className:"mx-auto flex justify-between items-center max-w-2xl",children:[A.jsxs("span",{children:["Region: ",c]}),A.jsxs("span",{children:["Currency: ",f]}),A.jsxs("span",{children:["Agentforce cost: ",g]}),A.jsxs("span",{children:["Copy source: ",b]}),A.jsxs("span",{children:["totalSavings ",j]})]}),A.jsx("div",{className:"mx-auto flex justify-between items-center max-w-2xl",children:um.map(G=>A.jsx("a",{href:`/${G}/agentforce/ai-agents-roi-calculator/?debug=true`,className:"underline",children:G},G))})]}),e&&A.jsxs(A.Fragment,{children:[A.jsx("div",{className:"bg-purple-800 text-white text-sm font-semibold py-2",children:A.jsxs("div",{className:"mx-auto flex justify-between items-center max-w-2xl",children:[A.jsxs("span",{children:["Region: ",c]}),A.jsxs("span",{children:["Currency: ",f]}),A.jsxs("span",{children:["Agentforce cost: ",g]}),A.jsxs("span",{children:["Copy source: ",b]}),A.jsxs("span",{children:["totalSavings ",j]})]})}),A.jsx("div",{className:"bg-agentpurple text-white text-sm font-semibold py-2",children:A.jsx("div",{className:"mx-auto flex justify-between items-center max-w-2xl",children:um.map(G=>A.jsx("button",{onClick:()=>d(G.toUpperCase()),className:"underline",children:G},G))})})]}),A.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center px-4 pb-10 pt-10 md:pt-16",children:[A.jsxs("section",{className:"max-w-[1280px] text-center md:max-w-[540px] lg:max-w-[768px]",children:[A.jsxs("h1",{className:"text-5xl text-sky-950",children:[A.jsxs("span",{children:[A.jsx("span",{className:"text-indigo-700",children:Y.oblroi_headerEyebrow}),A.jsx("br",{}),Y.oblroi_header]}),A.jsx("br",{})]}),A.jsx("h2",{className:"mb-10 text-2xl text-sky-950 md:mb-16",children:Y.oblroi_headerBottom})]}),A.jsxs("section",{className:"container z-20 mx-auto flex flex-col gap-8 p-0 md:max-w-[540px] md:flex-col lg:max-w-[768px] xl:max-w-[1280px] xl:flex-row 2xl:max-w-[1440px]",children:[A.jsxs("div",{className:"w-full self-start rounded-2xl bg-white px-6 py-8 shadow-lg xl:w-[320px]",children:[A.jsx("h3",{className:"mb-6 font-display text-2xl text-sfnavy",children:Y.oblroi_formHeadline}),A.jsx("p",{className:"mb-6 font-sans text-sm font-normal leading-tight text-neutral-700",children:"(All fields are required)"}),A.jsxs("div",{className:"flex flex-col gap-6",children:[A.jsx(pp,{label:Y.oblroi_formField1Label,info:Y.oblroi_formField1Info,value:n,defaultValue:n,minValue:1,formatOptions:{maximumFractionDigits:0},onChange:G=>isNaN(G)?i(1):i(Number(G)),validationBehavior:"native",errorMessage:Y.oblroi_error_service_employees,isRequired:!0}),A.jsx(pp,{label:Y.oblroi_formField2Label,info:Y.oblroi_formField2Info,value:r,defaultValue:r,minValue:1,formatOptions:{style:"currency",currency:f||"USD",maximumFractionDigits:0},onChange:G=>isNaN(G)?s(0):s(Number(G)),validationBehavior:"native",errorMessage:Y.oblroi_error_cost_per_employee,isRequired:!0}),A.jsx(pp,{label:Y.oblroi_formField4Label,info:Y.oblroi_formField4Info,value:o,defaultValue:o,formatOptions:{maximumFractionDigits:0},onChange:G=>isNaN(G)?a(1):a(Number(G)),validationBehavior:"native",errorMessage:Y.oblroi_error_conversations_handled,isRequired:!0}),A.jsx(Z3,{label:Y.oblroi_formField3Label,info:Y.oblroi_formField3Info,value:l,onChange:u,maxValue:100,suffix:"%",step:5})]})]}),A.jsxs("div",{className:"relative flex w-full flex-col gap-6 self-start overflow-hidden rounded-2xl bg-white p-8 pt-12 shadow-lg sm:px-10 xl:flex-1",children:[A.jsx("div",{className:"absolute inset-0 top-0 h-2 w-full",style:{background:"linear-gradient(90deg, #02BEC7 -12.85%, #1E1D80 26.7%, #7B00E1 95.81%, #DC32EC 129.59%)"}}),A.jsxs("div",{className:"inline-flex w-full flex-col items-center justify-start",children:[A.jsxs("h2",{className:"mb-4 max-w-lg text-center font-display text-2xl leading-9 text-sfnavy sm:text-2xl sm:leading-10",children:[Y.oblroi_resultsHeadline_part1," ",A.jsxs("span",{className:"text-indigo-500",children:[l,"%"]})," ",Y.oblroi_resultsHeadline_part2.replace(/%/g,"")]}),A.jsx("div",{className:"mb-4 text-center text-display-2 font-semibold sm:text-display-1",children:A.jsx("div",{style:{background:"linear-gradient(90deg, #02BEC7 -12.85%, #1E1D80 26.7%, #7B00E1 95.81%, #DC32EC 129.59%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStrokeWidth:"1",WebkitTextStrokeColor:"#8E55E4",fontFeatureSettings:'"liga" off, "clig" off',accentColor:"#8E55E4"},children:A.jsx(PT,{value:j,currency:f,locale:c})})}),A.jsx("div",{className:"mb-5 font-sans text-xl font-bold leading-[30px] tracking-tight text-neutral-900",children:Y.oblroi_resultsDescription}),A.jsx("div",{role:"region",id:"agentforce-savings-info",className:"sr-only","aria-live":"polite","aria-atomic":"true",children:H}),A.jsxs(J3,{children:[A.jsxs(eL,{children:[A.jsx(xS,{id:"table",children:"Table"}),A.jsx(xS,{id:"chart",children:"Chart"})]}),A.jsx(wS,{id:"table",children:A.jsx("div",{className:"flex w-full flex-col",children:A.jsx(vD,{yearlyData:Q,currentCurrency:f,currentRegion:c})})}),A.jsx(wS,{id:"chart",children:A.jsx("div",{className:"relative flex w-full flex-col overflow-x-auto max-sm:h-[40vh] max-sm:w-[75vw]",children:A.jsx(dF,{data:Q,ariaLabel:ee,region:c,currency:f})})})]}),A.jsxs("p",{className:"my-8 font-sans text-xs font-normal leading-[18px] tracking-tight text-black",children:[Y.oblroi_legalDisclaimer_1,A.jsx("br",{}),A.jsx("br",{}),Y.oblroi_legalDisclaimer_2,A.jsx("br",{}),A.jsx("br",{}),Y.oblroi_legalDisclaimer_3]}),A.jsxs("div",{className:"flex w-full flex-col gap-4 md:flex-row",children:[A.jsx(W_,{url:`${window.location.origin}${m?`/${m}`:""}/form/agentforce/contact-us/?d=pb`,target:"_blank",children:Y.oblroi_cta1Label}),A.jsx(W_,{variant:"secondary",url:`${window.location.origin}${m?`/${m}`:""}/agentforce`,children:Y.oblroi_cta2Label})]})]})]})]})]}),A.jsx(QF,{})]})}document.querySelectorAll("[id^='wps-agentforce-roi']").forEach(t=>{const e=t.dataset||{};qu.createRoot(t).render(A.jsx(W.StrictMode,{children:A.jsx(JF,$({},e))}))})});