(function(ne){typeof define=="function"&&define.amd?define(ne):ne()})(function(){"use strict";var r8=Object.defineProperty,s8=Object.defineProperties;var o8=Object.getOwnPropertyDescriptors;var Hu=Object.getOwnPropertySymbols;var Q_=Object.prototype.hasOwnProperty,q_=Object.prototype.propertyIsEnumerable;var dm=(ne,ee)=>(ee=Symbol[ne])?ee:Symbol.for("Symbol."+ne),a8=ne=>{throw TypeError(ne)},hm=Math.pow,fm=(ne,ee,pe)=>ee in ne?r8(ne,ee,{enumerable:!0,configurable:!0,writable:!0,value:pe}):ne[ee]=pe,$=(ne,ee)=>{for(var pe in ee||(ee={}))Q_.call(ee,pe)&&fm(ne,pe,ee[pe]);if(Hu)for(var pe of Hu(ee))q_.call(ee,pe)&&fm(ne,pe,ee[pe]);return ne},N=(ne,ee)=>s8(ne,o8(ee));var te=(ne,ee)=>{var pe={};for(var Le in ne)Q_.call(ne,Le)&&ee.indexOf(Le)<0&&(pe[Le]=ne[Le]);if(ne!=null&&Hu)for(var Le of Hu(ne))ee.indexOf(Le)<0&&q_.call(ne,Le)&&(pe[Le]=ne[Le]);return pe};var X=(ne,ee,pe)=>fm(ne,typeof ee!="symbol"?ee+"":ee,pe);var l8=function(ne,ee){this[0]=ne,this[1]=ee};var cs=ne=>{var ee=ne[dm("asyncIterator")],pe=!1,Le,q={};return ee==null?(ee=ne[dm("iterator")](),Le=it=>q[it]=xi=>ee[it](xi)):(ee=ee.call(ne),Le=it=>q[it]=xi=>{if(pe){if(pe=!1,it==="throw")throw xi;return xi}return pe=!0,{done:!1,value:new l8(new Promise(Wu=>{var ta=ee[it](xi);ta instanceof Object||a8("Object expected"),Wu(ta)}),1)}}),q[dm("iterator")]=()=>q,Le("next"),"throw"in ee?Le("throw"):q.throw=it=>{throw it},"return"in ee&&Le("return"),q};var Bu,yi;function ne(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ee={exports:{}},pe={},Le={exports:{}},q={};/** * @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"),Wu=Symbol.for("react.fragment"),ta=Symbol.for("react.strict_mode"),Z_=Symbol.for("react.profiler"),J_=Symbol.for("react.provider"),e$=Symbol.for("react.context"),t$=Symbol.for("react.forward_ref"),n$=Symbol.for("react.suspense"),i$=Symbol.for("react.memo"),r$=Symbol.for("react.lazy"),pm=Symbol.iterator;function s$(t){return t===null||typeof t!="object"?null:(t=pm&&t[pm]||t["@@iterator"],typeof t=="function"?t:null)}var mm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gm=Object.assign,vm={};function sr(t,e,n){this.props=t,this.context=e,this.refs=vm,this.updater=n||mm}sr.prototype.isReactComponent={},sr.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")},sr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ym(){}ym.prototype=sr.prototype;function Uu(t,e,n){this.props=t,this.context=e,this.refs=vm,this.updater=n||mm}var Yu=Uu.prototype=new ym;Yu.constructor=Uu,gm(Yu,sr.prototype),Yu.isPureReactComponent=!0;var bm=Array.isArray,xm=Object.prototype.hasOwnProperty,Gu={current:null},wm={key:!0,ref:!0,__self:!0,__source:!0};function Sm(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)xm.call(e,i)&&!wm.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1>>1,B=R[F];if(0>>1;Fr(Q,K))ier(nt,Q)?(R[F]=nt,R[ie]=K,F=ie):(R[F]=Q,R[H]=K,F=H);else if(ier(nt,K))R[F]=nt,R[ie]=K,F=ie;else break e}}return z}function r(R,z){var K=R.sortIndex-z.sortIndex;return K!==0?K:R.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(R){for(var z=n(u);z!==null;){if(z.callback===null)i(u);else if(z.startTime<=R)i(u),z.sortIndex=z.expirationTime,e(l,z);else break;z=n(u)}}function S(R){if(v=!1,y(R),!g)if(n(l)!==null)g=!0,C(P);else{var z=n(u);z!==null&&L(S,z.startTime-R)}}function P(R,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)||R&&!A());){var F=d.callback;if(typeof F=="function"){d.callback=null,f=d.priorityLevel;var B=F(d.expirationTime<=z);z=t.unstable_now(),typeof B=="function"?d.callback=B:d===n(l)&&i(l),y(z)}else i(l);d=n(l)}if(d!==null)var Z=!0;else{var H=n(u);H!==null&&L(S,H.startTime-z),Z=!1}return Z}finally{d=null,f=K,h=!1}}var T=!1,D=null,E=-1,w=5,_=-1;function A(){return!(t.unstable_now()-_R||125F?(R.sortIndex=K,e(u,R),n(l)===null&&R===n(u)&&(v?(p(E),E=-1):v=!0,L(S,K-F))):(R.sortIndex=B,e(l,R),g||h||(g=!0,C(P))),R},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(R){var z=f;return function(){var K=f;f=z;try{return R.apply(this,arguments)}finally{f=K}}}})(Cm),Tm.exports=Cm;var g$=Tm.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 v$=x,vt=g$;function j(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;ne}return!1}function Ze(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 Ze(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 Ze(e,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ve[t]=new Ze(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ve[t]=new Ze(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 Ze(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){Ve[t]=new Ze(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){Ve[t]=new Ze(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){Ve[t]=new Ze(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){Ve[t]=new Ze(t,5,!1,t.toLowerCase(),null,!1,!1)});var Ju=/[\-:]([a-z])/g;function ec(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(Ju,ec);Ve[e]=new Ze(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(Ju,ec);Ve[e]=new Ze(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(Ju,ec);Ve[e]=new Ze(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){Ve[t]=new Ze(t,1,!1,t.toLowerCase(),null,!1,!1)}),Ve.xlinkHref=new Ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){Ve[t]=new Ze(t,1,!1,t.toLowerCase(),null,!0,!0)});function tc(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{uc=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?hs(t):""}function S$(t){switch(t.tag){case 5:return hs(t.type);case 16:return hs("Lazy");case 13:return hs("Suspense");case 19:return hs("SuspenseList");case 0:case 2:case 15:return t=cc(t.type,!1),t;case 11:return t=cc(t.type.render,!1),t;case 1:return t=cc(t.type,!0),t;default:return""}}function dc(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 lr:return"Fragment";case ar:return"Portal";case ic:return"Profiler";case nc:return"StrictMode";case sc:return"Suspense";case oc:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Am:return(t.displayName||"Context")+".Consumer";case Lm:return(t._context.displayName||"Context")+".Provider";case rc:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ac:return e=t.displayName||null,e!==null?e:dc(t.type)||"Memo";case In:e=t._payload,t=t._init;try{return dc(t(e))}catch(n){}}return null}function P$(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 dc(e);case 8:return e===nc?"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 Im(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _$(t){var e=Im(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 oa(t){t._valueTracker||(t._valueTracker=_$(t))}function Om(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Im(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function aa(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 fc(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 Vm(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 Nm(t,e){e=e.checked,e!=null&&tc(t,"checked",e,!1)}function hc(t,e){Nm(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")?pc(t,e.type,n):e.hasOwnProperty("defaultValue")&&pc(t,e.type,On(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function zm(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 pc(t,e,n){(e!=="number"||aa(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ps=Array.isArray;function ur(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=la.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ms(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var gs={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},$$=["Webkit","ms","Moz","O"];Object.keys(gs).forEach(function(t){$$.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gs[e]=gs[t]})});function Um(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||gs.hasOwnProperty(t)&&gs[t]?(""+e).trim():e+"px"}function Ym(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Um(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var k$=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 vc(t,e){if(e){if(k$[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(j(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(j(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(j(61))}if(e.style!=null&&typeof e.style!="object")throw Error(j(62))}}function yc(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 bc=null;function xc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wc=null,cr=null,dr=null;function Gm(t){if(t=Vs(t)){if(typeof wc!="function")throw Error(j(280));var e=t.stateNode;e&&(e=Da(e),wc(t.stateNode,t.type,e))}}function Xm(t){cr?dr?dr.push(t):dr=[t]:cr=t}function Qm(){if(cr){var t=cr,e=dr;if(dr=cr=null,Gm(t),e)for(t=0;t>>=0,t===0?32:31-(O$(t)/V$|0)|0}var ha=64,pa=4194304;function xs(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 ma(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=xs(a):(s&=o,s!==0&&(i=xs(s)))}else o=n&~r,o!==0?i=xs(o):s!==0&&(i=xs(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 ws(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 j$(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=Es),_g=" ",$g=!1;function kg(t,e){switch(t){case"keyup":return gk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var pr=!1;function yk(t,e){switch(t){case"compositionend":return Tg(e);case"keypress":return e.which!==32?null:($g=!0,_g);case"textInput":return t=e.data,t===_g&&$g?null:t;default:return null}}function bk(t,e){if(pr)return t==="compositionend"||!Nc&&kg(t,e)?(t=yg(),xa=Ac=jn=null,pr=!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=Rg(n)}}function Ig(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ig(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Og(){for(var t=window,e=aa();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=aa(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 Ck(t){var e=Og(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Ig(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=Fg(n,s);var o=Fg(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,mr=null,Kc=null,As=null,Hc=!1;function Vg(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hc||mr==null||mr!==aa(i)||(i=mr,"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}),As&&Ls(As,i)||(As=i,i=Ca(Kc,"onSelect"),0xr||(t.current=nd[xr],nd[xr]=null,xr--)}function he(t,e){xr++,nd[xr]=t.current,t.current=e}var Un={},He=Wn(Un),rt=Wn(!1),_i=Un;function wr(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 La(){ge(rt),ge(He)}function Jg(t,e,n){if(He.current!==Un)throw Error(j(168));he(He,e),he(rt,n)}function ev(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(j(108,P$(t)||"Unknown",r));return xe({},n,i)}function Aa(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Un,_i=He.current,he(He,t),he(rt,rt.current),!0}function tv(t,e,n){var i=t.stateNode;if(!i)throw Error(j(169));n?(t=ev(t,e,_i),i.__reactInternalMemoizedMergedChildContext=t,ge(rt),ge(He),he(He,t)):ge(rt),he(rt,n)}var pn=null,Ra=!1,id=!1;function nv(t){pn===null?pn=[t]:pn.push(t)}function zk(t){Ra=!0,nv(t)}function Yn(){if(!id&&pn!==null){id=!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=D,D=null):w=D.sibling;var _=f(p,D,y[E],S);if(_===null){D===null&&(D=w);break}t&&D&&_.alternate===null&&e(p,D),m=s(_,m,E),T===null?P=_:T.sibling=_,T=_,D=w}if(E===y.length)return n(p,D),ye&&ki(p,E),P;if(D===null){for(;EE?(w=D,D=null):w=D.sibling;var A=f(p,D,_.value,S);if(A===null){D===null&&(D=w);break}t&&D&&A.alternate===null&&e(p,D),m=s(A,m,E),T===null?P=A:T.sibling=A,T=A,D=w}if(_.done)return n(p,D),ye&&ki(p,E),P;if(D===null){for(;!_.done;E++,_=y.next())_=d(p,_.value,S),_!==null&&(m=s(_,m,E),T===null?P=_:T.sibling=_,T=_);return ye&&ki(p,E),P}for(D=i(p,D);!_.done;E++,_=y.next())_=h(D,p,E,_.value,S),_!==null&&(t&&_.alternate!==null&&D.delete(_.key===null?E:_.key),m=s(_,m,E),T===null?P=_:T.sibling=_,T=_);return t&&D.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===lr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case sa:e:{for(var P=y.key,T=m;T!==null;){if(T.key===P){if(P=y.type,P===lr){if(T.tag===7){n(p,T.sibling),m=r(T,y.props.children),m.return=p,p=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===In&&lv(P)===T.type){n(p,T.sibling),m=r(T,y.props),m.ref=Ns(p,T,y),m.return=p,p=m;break e}n(p,T);break}else e(p,T);T=T.sibling}y.type===lr?(m=Ri(y.props.children,p.mode,S,y.key),m.return=p,p=m):(S=ll(y.type,y.key,y.props,null,p.mode,S),S.ref=Ns(p,m,y),S.return=p,p=S)}return o(p);case ar:e:{for(T=y.key;m!==null;){if(m.key===T)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=ef(y,p.mode,S),m.return=p,p=m}return o(p);case In:return T=y._init,b(p,m,T(y._payload),S)}if(ps(y))return g(p,m,y,S);if(fs(y))return v(p,m,y,S);Va(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=Jd(y,p.mode,S),m.return=p,p=m),o(p)):n(p,m)}return b}var $r=uv(!0),cv=uv(!1),Na=Wn(null),za=null,kr=null,ud=null;function cd(){ud=kr=za=null}function dd(t){var e=Na.current;ge(Na),t._currentValue=e}function fd(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 Tr(t,e){za=t,ud=kr=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(ud!==t)if(t={context:t,memoizedValue:e,next:null},kr===null){if(za===null)throw Error(j(308));kr=t,za.dependencies={lanes:0,firstContext:t}}else kr=kr.next=t;return e}var Ti=null;function hd(t){Ti===null?Ti=[t]:Ti.push(t)}function dv(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,hd(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 pd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fv(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,hd(i)):(e.next=r.next,r.next=e),i.interleaved=e,vn(t,n)}function Ba(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,Cc(t,n)}}function hv(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 pv(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var i=bd.transition;bd.transition={};try{t(!1),e()}finally{de=n,bd.transition=i}}function Av(){return Et().memoizedState}function Hk(t,e,n){var i=Jn(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Rv(t))Fv(e,n);else if(n=dv(t,e,n,i),n!==null){var r=et();Ut(n,t,i,r),Iv(n,e,i)}}function Wk(t,e,n){var i=Jn(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rv(t))Fv(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,Bt(a,o)){var l=e.interleaved;l===null?(r.next=r,hd(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch(u){}finally{}n=dv(t,e,r,i),n!==null&&(r=et(),Ut(n,t,i,r),Iv(n,e,i))}}function Rv(t){var e=t.alternate;return t===Se||e!==null&&e===Se}function Fv(t,e){Ks=Wa=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Iv(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Cc(t,n)}}var Ga={readContext:Ct,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Uk={readContext:Ct,useCallback:function(t,e){return Jt().memoizedState=[t,e===void 0?null:e],t},useContext:Ct,useEffect:$v,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Ua(4194308,4,Cv.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ua(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ua(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=Hk.bind(null,Se,t),[i.memoizedState,t]},useRef:function(t){var e=Jt();return t={current:t},e.memoizedState=t},useState:Pv,useDebugValue:kd,useDeferredValue:function(t){return Jt().memoizedState=t},useTransition:function(){var t=Pv(!1),e=t[0];return t=Kk.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(j(407));n=n()}else{if(n=e(),Re===null)throw Error(j(349));Ei&30||yv(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,$v(xv.bind(null,i,s,t),[t]),i.flags|=2048,Us(9,bv.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=Hs++,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[Os]=i,ny(t,e,!1,!1),e.stateNode=t;e:{switch(o=yc(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;rLr&&(e.flags|=128,i=!0,Ys(s,!1),e.lanes=4194304)}else{if(!i)if(t=Ka(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ys(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ye)return Ue(e),null}else 2*ke()-s.renderingStartTime>Lr&&n!==1073741824&&(e.flags|=128,i=!0,Ys(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):(Ue(e),null);case 22:case 23:return Qd(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?wt&1073741824&&(Ue(e),e.subtreeFlags&6&&(e.flags|=8192)):Ue(e),null;case 24:return null;case 25:return null}throw Error(j(156,e.tag))}function eT(t,e){switch(sd(e),e.tag){case 1:return st(e.type)&&La(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Cr(),ge(rt),ge(He),yd(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return gd(e),null;case 13:if(ge(we),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(j(340));_r()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ge(we),null;case 4:return Cr(),null;case 10:return dd(e.type._context),null;case 22:case 23:return Qd(),null;case 24:return null;default:return null}}var Za=!1,Ye=!1,tT=typeof WeakSet=="function"?WeakSet:Set,U=null;function Mr(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 Vd(t,e,n){try{n()}catch(i){_e(t,e,i)}}var sy=!1;function nT(t,e){if(Qc=ya,t=Og(),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},ya=!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(j(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=sy,sy=!1,g}function Gs(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&&Vd(e,n,s)}r=r.next}while(r!==i)}}function Ja(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 Nd(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 oy(t){var e=t.alternate;e!==null&&(t.alternate=null,oy(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[qt],delete e[Os],delete e[td],delete e[Vk],delete e[Nk])),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 ay(t){return t.tag===5||t.tag===3||t.tag===4}function ly(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ay(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 zd(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=Ma));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}function Bd(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(Bd(t,e,n),t=t.sibling;t!==null;)Bd(t,e,n),t=t.sibling}var Ne=null,Ht=!1;function Qn(t,e,n){for(n=n.child;n!==null;)uy(t,e,n),n=n.sibling}function uy(t,e,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(fa,n)}catch(a){}switch(n.tag){case 5:Ye||Mr(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?ed(t.parentNode,n):t.nodeType===1&&ed(t,n),ks(t)):ed(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(!Ye&&(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)&&Vd(n,e,o),r=r.next}while(r!==i)}Qn(t,e,n);break;case 1:if(!Ye&&(Mr(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?(Ye=(i=Ye)||n.memoizedState!==null,Qn(t,e,n),Ye=i):Qn(t,e,n);break;default:Qn(t,e,n)}}function cy(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new tT),e.forEach(function(i){var r=dT.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*rT(i/1960))-i,10t?16:t,Zn===null)var i=!1;else{if(t=Zn,Zn=null,rl=0,re&6)throw Error(j(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()-Hd?Li(t,0):Kd|=n),lt(t,e)}function Py(t,e){e===0&&(t.mode&1?(e=pa,pa<<=1,!(pa&130023424)&&(pa=4194304)):e=1);var n=et();t=vn(t,e),t!==null&&(ws(t,e,n),lt(t,n))}function cT(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Py(t,n)}function dT(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(j(314))}i!==null&&i.delete(e),Py(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,Zk(t,e,n);ot=!!(t.flags&131072)}else ot=!1,ye&&e.flags&1048576&&iv(e,Ia,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;qa(t,e),t=e.pendingProps;var r=wr(e,He.current);Tr(e,n),r=wd(null,e,i,t,r,n);var s=Sd();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,Aa(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,pd(e),r.updater=Xa,e.stateNode=r,r._reactInternals=e,Cd(e,i,t,n),e=Ld(null,e,i,!0,s,n)):(e.tag=0,ye&&s&&rd(e),Je(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=hT(i),t=Kt(i,t),r){case 0:e=Dd(null,e,i,t,n);break e;case 1:e=Qv(null,e,i,t,n);break e;case 11:e=Wv(null,e,i,t,n);break e;case 14:e=Uv(null,e,i,Kt(i.type,t),n);break e}throw Error(j(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),Dd(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(qv(e),t===null)throw Error(j(387));i=e.pendingProps,s=e.memoizedState,r=s.element,fv(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=Er(Error(j(423)),e),e=Zv(t,e,i,n,r);break e}else if(i!==r){r=Er(Error(j(424)),e),e=Zv(t,e,i,n,r);break e}else for(xt=Hn(e.stateNode.containerInfo.firstChild),bt=e,ye=!0,jt=null,n=cv(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}Je(t,e,i,n)}e=e.child}return e;case 5:return mv(e),t===null&&ad(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,Zc(i,r)?o=null:s!==null&&Zc(i,s)&&(e.flags|=32),Xv(t,e),Je(t,e,o,n),e.child;case 6:return t===null&&ad(e),null;case 13:return Jv(t,e,n);case 4:return md(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=$r(e,null,i,n):Je(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Kt(i,r),Wv(t,e,i,r,n);case 7:return Je(t,e,e.pendingProps,n),e.child;case 8:return Je(t,e,e.pendingProps.children,n),e.child;case 12:return Je(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(Na,i._currentValue),i._currentValue=o,s!==null)if(Bt(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),fd(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(j(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),fd(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}Je(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Tr(e,n),r=Ct(r),i=i(r),e.flags|=1,Je(t,e,i,n),e.child;case 14:return i=e.type,r=Kt(i,e.pendingProps),r=Kt(i.type,r),Uv(t,e,i,r,n);case 15:return Yv(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,Aa(e)):t=!1,Tr(e,n),Vv(e,i,r),Cd(e,i,r,n),Ld(null,e,i,!0,t,n);case 19:return ty(t,e,n);case 22:return Gv(t,e,n)}throw Error(j(156,e.tag))};function $y(t,e){return rg(t,e)}function fT(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 fT(t,e,n,i)}function Zd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function hT(t){if(typeof t=="function")return Zd(t)?1:0;if(t!=null){if(t=t.$$typeof,t===rc)return 11;if(t===ac)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 ll(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")Zd(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case lr:return Ri(n.children,r,s,e);case nc:o=8,r|=8;break;case ic:return t=Dt(12,n,e,r|2),t.elementType=ic,t.lanes=s,t;case sc:return t=Dt(13,n,e,r),t.elementType=sc,t.lanes=s,t;case oc:return t=Dt(19,n,e,r),t.elementType=oc,t.lanes=s,t;case Rm:return ul(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Lm:o=10;break e;case Am:o=9;break e;case rc:o=11;break e;case ac:o=14;break e;case In:o=16,i=null;break e}throw Error(j(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 ul(t,e,n,i){return t=Dt(22,t,i,e),t.elementType=Rm,t.lanes=n,t.stateNode={isHidden:!1},t}function Jd(t,e,n){return t=Dt(6,t,null,e),t.lanes=n,t}function ef(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 pT(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=Tc(0),this.expirationTimes=Tc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tc(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function tf(t,e,n,i,r,s,o,a,l){return t=new pT(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},pd(s),t}function mT(t,e,n){var i=3{const i=new Intl.NumberFormat(e,{style:"currency",currency:n,maximumFractionDigits:0}).format(t<0?0:t);return I.jsx("span",{children:i})},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 xT(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 yl(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const of=t=>Array.isArray(t);function Ay(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]=Ry(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]=Ry(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function bl(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],eo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fi=new Set(eo),wn=t=>t*1e3,Sn=t=>t/1e3,wT={type:"spring",stiffness:500,damping:25,restSpeed:10},ST=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),PT={type:"keyframes",duration:.8},_T={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$T=(t,{keyframes:e})=>e.length>2?PT:Fi.has(t)?t.startsWith("scale")?ST(e[1]):wT:_T;function cf(t,e){return t?t[e]||t.default||t:void 0}const kT={skipAnimations:!1,useManualTiming:!1},TT=t=>t!==null;function xl(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(TT),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const Be=t=>t;function CT(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 wl=["read","resolveKeyframes","update","preRender","render","postRender"],ET=40;function Fy(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=wl.reduce((p,m)=>(p[m]=CT(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,ET),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:wl.reduce((p,m)=>{const y=o[m];return p[m]=(S,P=!1,T=!1)=>(n||g(),y.schedule(S,P,T)),p},{}),cancel:p=>{for(let m=0;m(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,MT=1e-7,DT=12;function LT(t,e,n,i,r){let s,o,a=0;do o=e+(n-e)/2,s=Iy(o,i,r)-t,s>0?n=o:e=o;while(Math.abs(s)>MT&&++aLT(s,0,1,t,n);return s=>s===0||s===1?s:Iy(r(s),e,i)}const Oy=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Vy=t=>e=>1-t(1-e),Ny=to(.33,1.53,.69,.99),ff=Vy(Ny),zy=Oy(ff),By=t=>(t*=2)<1?.5*ff(t):.5*(2-Math.pow(2,-10*(t-1))),hf=t=>1-Math.sin(Math.acos(t)),jy=Vy(hf),Ky=Oy(hf),Hy=t=>/^0[^.\s]+$/u.test(t);function AT(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Hy(t):!0}let RT=Be,pf=Be;const Wy=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Uy=t=>e=>typeof e=="string"&&e.startsWith(t),Yy=Uy("--"),FT=Uy("var(--"),mf=t=>FT(t)?IT.test(t.split("/*")[0].trim()):!1,IT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,OT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function VT(t){const e=OT.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n!=null?n:i}`,r]}function Gy(t,e,n=1){const[i,r]=VT(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return Wy(o)?parseFloat(o):o}return mf(r)?Gy(r,e,n+1):r}const ni=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},no=N($({},Rr),{transform:t=>ni(0,1,t)}),Sl=N($({},Rr),{default:1}),io=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ii=io("deg"),nn=io("%"),G=io("px"),NT=io("vh"),zT=io("vw"),Xy=N($({},nn),{parse:t=>nn.parse(t)/100,transform:t=>nn.transform(t*100)}),BT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Qy=t=>t===Rr||t===G,qy=(t,e)=>parseFloat(t.split(", ")[e]),Zy=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return qy(r[1],e);{const s=i.match(/^matrix\((.+)\)$/u);return s?qy(s[1],t):0}},jT=new Set(["x","y","z"]),KT=eo.filter(t=>!jT.has(t));function HT(t){const e=[];return KT.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Fr={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:Zy(4,13),y:Zy(5,14)};Fr.translateX=Fr.x,Fr.translateY=Fr.y;const Jy=t=>e=>e.test(t),e0=[Rr,G,nn,ii,zT,NT,{test:t=>t==="auto",parse:t=>t}],t0=t=>e0.find(Jy(t)),Ii=new Set;let gf=!1,vf=!1;function n0(){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=HT(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 i0(){Ii.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vf=!0)})}function WT(){i0(),n0()}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(i0),se.resolveKeyframes(n0))):(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 UT(t){return t==null}const YT=/^(?:#[\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"&&YT.test(n)&&n.startsWith(t)||e&&!UT(n)&&Object.prototype.hasOwnProperty.call(n,e)),r0=(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}},GT=t=>ni(0,255,t),wf=N($({},Rr),{transform:t=>Math.round(GT(t))}),Oi={test:xf("rgb","red"),parse:r0("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+wf.transform(t)+", "+wf.transform(e)+", "+wf.transform(n)+", "+ro(no.transform(i))+")"};function XT(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:XT,transform:Oi.transform},Ir={test:xf("hsl","hue"),parse:r0("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+nn.transform(ro(e))+", "+nn.transform(ro(n))+", "+ro(no.transform(i))+")"},Ge={test:t=>Oi.test(t)||Sf.test(t)||Ir.test(t),parse:t=>Oi.test(t)?Oi.parse(t):Ir.test(t)?Ir.parse(t):Sf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Oi.transform(t):Ir.transform(t)},QT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qT(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(QT))===null||n===void 0?void 0:n.length)||0)>0}const s0="number",o0="color",ZT="var",JT="var(",a0="${}",eC=/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 so(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=e.replace(eC,l=>(Ge.test(l)?(i.color.push(s),r.push(o0),n.push(Ge.parse(l))):l.startsWith(JT)?(i.var.push(s),r.push(ZT),n.push(l)):(i.number.push(s),r.push(s0),n.push(parseFloat(l))),++s,a0)).split(a0);return{values:n,split:a,indexes:i,types:r}}function l0(t){return so(t).values}function u0(t){const{split:e,types:n}=so(t),i=e.length;return r=>{let s="";for(let o=0;otypeof t=="number"?0:t;function nC(t){const e=l0(t);return u0(t)(e.map(tC))}const ri={test:qT,parse:l0,createTransformer:u0,getAnimatableNone:nC},iC=new Set(["brightness","contrast","saturate","opacity"]);function rC(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=iC.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const sC=/\b([a-z-]*)\(.*?\)/gu,Pf=N($({},ri),{getAnimatableNone:t=>{const e=t.match(sC);return e?e.map(rC).join(" "):t}}),oC={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G},aC={rotate:ii,rotateX:ii,rotateY:ii,rotateZ:ii,scale:Sl,scaleX:Sl,scaleY:Sl,scaleZ:Sl,skew:ii,skewX:ii,skewY:ii,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:no,originX:Xy,originY:Xy,originZ:G},c0=N($({},Rr),{transform:Math.round}),_f=N($($({},oC),aC),{zIndex:c0,size:G,fillOpacity:no,strokeOpacity:no,numOctaves:c0}),lC=N($({},_f),{color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:Pf,WebkitFilter:Pf}),$f=t=>lC[t];function d0(t,e){let n=$f(t);return n!==Pf&&(n=ri),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const uC=new Set(["auto","none","0"]);function cC(t,e,n){let i=0,r;for(;i{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function kf(t){return typeof t=="function"}let Pl;function dC(){Pl=void 0}const rn={now:()=>(Pl===void 0&&rn.set(Fe.isProcessing||kT.useManualTiming?Fe.timestamp:performance.now()),Pl),set:t=>{Pl=t,queueMicrotask(dC)}},h0=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ri.test(t)||t==="0")&&!t.startsWith("url("));function fC(t){const e=t[0];if(t.length===1)return!0;for(let n=0;npC?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&WT(),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&&!hC(e,i,r,s))if(o)this.options.duration=0;else{l==null||l(xl(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 mC=5;function m0(t,e,n){const i=Math.max(e-mC,0);return Tf(n-t(i),e-i)}const Cf=.001,gC=.01,vC=10,yC=.05,bC=1;function xC({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,s,o=1-e;o=ni(yC,bC,o),t=ni(gC,vC,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=SC(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 wC=12;function SC(t,e,n){let i=n;for(let r=1;rt[n]!==void 0)}function $C(t){let e=$({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!g0(t,_C)&&g0(t,PC)){const n=xC(t);e=N($($({},e),n),{mass:1}),e.isResolvedFromDuration=!0}return e}function v0(r){var s=r,{keyframes:t,restDelta:e,restSpeed:n}=s,i=te(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}=$C(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=T=>{const D=Math.exp(-b*m*T);return a-D*((v+b*m*p)/P*Math.sin(P*T)+p*Math.cos(P*T))}}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=T=>{const D=Math.exp(-b*m*T),E=Math.min(P*T,300);return a-D*((v+b*m*p)*Math.sinh(E)+P*p*Math.cosh(E))/P}}return{calculatedDuration:g&&f||null,next:P=>{const T=S(P);if(g)l.done=P>=f;else{let D=0;b<1&&(D=P===0?wn(v):m0(S,P,T));const E=Math.abs(D)<=n,w=Math.abs(a-T)<=e;l.done=E&&w}return l.value=l.done?a:T,l}}}function y0({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,T;const D=E=>{h(f.value)&&(P=E,T=v0({keyframes:[f.value,g(f.value)],velocity:m0(y,E,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:c}))};return D(0),{calculatedDuration:null,next:E=>{let w=!1;return!T&&P===void 0&&(w=!0,S(E),D(E)),P!==void 0&&E>=P?T.next(E-P):(!w&&S(E),f)}}}const kC=to(.42,0,1,1),TC=to(0,0,.58,1),b0=to(.42,0,.58,1),CC=t=>Array.isArray(t)&&typeof t[0]!="number",Mf=t=>Array.isArray(t)&&typeof t[0]=="number",x0={linear:Be,easeIn:kC,easeInOut:b0,easeOut:TC,circIn:hf,circInOut:Ky,circOut:jy,backIn:ff,backInOut:zy,backOut:Ny,anticipate:By},w0=t=>{if(Mf(t)){pf(t.length===4);const[e,n,i,r]=t;return to(e,n,i,r)}else if(typeof t=="string")return pf(x0[t]!==void 0),x0[t];return t},EC=(t,e)=>n=>e(t(n)),Pn=(...t)=>t.reduce(EC),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 MC({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 _l(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)},DC=[Sf,Oi,Ir],LC=t=>DC.find(e=>e.test(t));function S0(t){const e=LC(t);if(!e)return!1;let n=e.parse(t);return e===Ir&&(n=MC(n)),n}const P0=(t,e)=>{const n=S0(t),i=S0(e);if(!n||!i)return _l(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 AC(t,e){return Af.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function RC(t,e){return n=>Pe(t,e,n)}function Rf(t){return typeof t=="number"?RC:typeof t=="string"?mf(t)?_l:Ge.test(t)?P0:OC:Array.isArray(t)?_0:typeof t=="object"?Ge.test(t)?P0:FC:_l}function _0(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 IC(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s{const n=ri.createTransformer(e),i=so(t),r=so(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?AC(t,e):Pn(_0(IC(i,r),r.values),n):_l(t,e)};function $0(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Pe(t,e,n):Rf(t)(t,e)}function VC(t,e,n){const i=[],r=n||$0,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=VC(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 NC(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 T0(t){const e=[0];return NC(e,t.length-1),e}function zC(t,e){return t.map(n=>n*e)}function BC(t,e){return t.map(()=>e||b0).splice(0,t.length-1)}function $l({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=CC(i)?i.map(w0):w0(i),s={done:!1,value:e[0]},o=zC(n&&n.length===e.length?n:T0(e),t),a=k0(o,e,{ease:Array.isArray(r)?r:BC(e,r)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const C0=2e4;function jC(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e=C0?1/0:e}const KC=t=>{const e=({timestamp:n})=>t(n);return{start:()=>se.update(e,!0),stop:()=>tn(e),now:()=>Fe.isProcessing?Fe.timestamp:rn.now()}},HC={decay:y0,inertia:y0,tween:$l,keyframes:$l,spring:v0},WC=t=>t/100;class Ff extends p0{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:HC[n]||$l;let l,u;a!==$l&&typeof e[0]!="number"&&(l=Pn(WC,$0(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=jC(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:T}=P;!m&&u!==null&&(T=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return D&&r!==void 0&&(P.value=xl(l,this.options,r)),b&&b(P.value),D&&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=KC,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 UC=new Set(["opacity","clipPath","filter","transform"]),YC=10,GC=(t,e)=>{let n="";const i=Math.max(Math.round(e/YC),2);for(let r=0;r(e===void 0&&(e=t()),e)}const XC={linearEasing:void 0};function QC(t,e){const n=If(t);return()=>{var i;return(i=XC[e])!==null&&i!==void 0?i:n()}}const kl=QC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");function E0(t){return!!(typeof t=="function"&&kl()||!t||typeof t=="string"&&(t in Of||kl())||Mf(t)||Array.isArray(t)&&t.every(E0))}const oo=([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:oo([0,.65,.55,1]),circOut:oo([.55,0,1,.45]),backIn:oo([.31,.01,.66,-.59]),backOut:oo([.33,1.53,.69,.99])};function M0(t,e){if(t)return typeof t=="function"&&kl()?GC(t,e):Mf(t)?oo(t):Array.isArray(t)?t.map(n=>M0(n,e)||Of.easeOut):Of[t]}function qC(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=M0(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 D0(t,e){t.timeline=e,t.onfinish=null}const ZC=If(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Tl=10,JC=2e4;function eE(t){return kf(t.type)||t.type==="spring"||!E0(t.ease)}function tE(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"&&kl()&&nE(o)&&(o=L0[o]),eE(this.options)){const f=this.options,{onComplete:h,onUpdate:g,motionValue:v,element:b}=f,p=te(f,["onComplete","onUpdate","motionValue","element"]),m=tE(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=qC(l.owner.current,u,e,N($({},this.options),{duration:r,times:s,ease:o}));return d.startTime=c!=null?c:this.calcStartTime(),this.pendingTimeline?(D0(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;l.set(xl(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 Be;const{animation:i}=n;D0(i,e)}return Be}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=te(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-Tl).value,v.sample(b).value,Tl)}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 ZC()&&i&&UC.has(i)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}}const R0=If(()=>window.ScrollTimeline!==void 0);class iE{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;iR0()&&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 rE(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=te(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});rE(a)||(c=$($({},c),$T(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=xl(c.keyframes,a);if(f!==void 0)return se.update(()=>{c.onUpdate(f),c.onComplete()}),new iE([])}return!s&&A0.supports(c)?new A0(c):new Ff(c)},sE=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),oE=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 Bf{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 lE{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=aE(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 Bf);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>F0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,F0);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 lE(t,e)}function uE(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,_n(n))}function cE(t,e){let o=bl(t,e)||{},{transitionEnd:i={},transition:r={}}=o,s=te(o,["transitionEnd","transition"]);s=$($({},s),i);for(const a in s){const l=oE(s[a]);uE(t,a,l)}}const jf=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),I0="data-"+jf("framerAppearId");function O0(t){return t.props[I0]}const Xe=t=>!!(t&&t.getVelocity);function dE(t){return!!(Xe(t)&&t.add)}function Kf(t,e){const n=t.getValue("willChange");if(dE(n))return n.add(e)}function fE({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function V0(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var s;let d=e,{transition:o=t.getDefaultTransition(),transitionEnd:a}=d,l=te(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&&fE(c,f))continue;const v=$({delay:n},cf(o||{},f));let b=!1;if(window.MotionHandoffAnimation){const m=O0(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&&cE(t,a)})}),u}function Hf(t,e,n={}){var i;const r=bl(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(V0(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return hE(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 hE(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(pE).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 pE(t,e){return t.sortNodePosition(e)}function mE(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"?bl(t,e,n.custom):e;i=Promise.all(V0(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const gE=uf.length;function N0(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?N0(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})=>mE(t,n,i)))}function xE(t){let e=bE(t),n=z0(),i=!0;const r=l=>(u,c)=>{var d;const f=bl(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=te(h,["transition","transitionEnd"]);u=$($($({},u),b),v)}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,c=N0(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 A=_.reduce(r(p),{});P===!1&&(A={});const{prevResolvedValues:k={}}=m,V=$($({},k),A),M=L=>{E=!0,f.has(L)&&(w=!0,f.delete(L)),m.needsAnimating[L]=!0;const R=t.getValue(L);R&&(R.liveStyle=!1)};for(const L in V){const R=A[L],z=k[L];if(h.hasOwnProperty(L))continue;let K=!1;of(R)&&of(z)?K=!Ay(R,z):K=R!==z,K?R!=null?M(L):f.add(L):R!==void 0&&f.has(L)?M(L):m.protectedKeys[L]=!0}m.prevProp=y,m.prevResolvedValues=A,m.isActive&&(h=$($({},h),A)),i&&t.blockInitialAnimation&&(E=!1),E&&(!(T&&D)||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=z0(),i=!0}}}function wE(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ay(e,t):!1}function Ni(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function z0(){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 SE extends si{constructor(e){super(e),e.animationState||(e.animationState=xE(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();yl(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 PE=0;class _E extends si{constructor(){super(...arguments),this.id=PE++}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 $E={animation:{Feature:SE},exit:{Feature:_E}},B0=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Cl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const kE=t=>e=>B0(e)&&t(e,Cl(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,kE(n),i)}const j0=(t,e)=>Math.abs(t-e);function TE(t,e){const n=j0(t.x,e.x),i=j0(t.y,e.y);return Math.sqrt(hm(n,2)+hm(i,2))}class K0{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=TE(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)},!B0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const o=Cl(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 H0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Uf({point:t},e){return{point:t,delta:H0(t,W0(e)),offset:H0(t,CE(e)),velocity:EE(e,.1)}}function CE(t){return t[0]}function W0(t){return t[t.length-1]}function EE(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=W0(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 U0(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Y0=U0("dragHorizontal"),G0=U0("dragVertical");function X0(t){let e=!1;if(t==="y")e=G0();else if(t==="x")e=Y0();else{const n=Y0(),i=G0();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function Q0(){const t=X0(!0);return t?(t(),!1):!0}function Or(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const q0=1e-4,ME=1-q0,DE=1+q0,Z0=.01,LE=0-Z0,AE=0+Z0;function St(t){return t.max-t.min}function RE(t,e,n){return Math.abs(t-e)<=n}function J0(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>=ME&&t.scale<=DE||isNaN(t.scale))&&(t.scale=1),(t.translate>=LE&&t.translate<=AE||isNaN(t.translate))&&(t.translate=0)}function ao(t,e,n,i){J0(t.x,e.x,n.x,i?i.originX:void 0),J0(t.y,e.y,n.y,i?i.originY:void 0)}function eb(t,e,n){t.min=n.min+e.min,t.max=t.min+St(e)}function FE(t,e,n){eb(t.x,e.x,n.x),eb(t.y,e.y,n.y)}function tb(t,e,n){t.min=e.min-n.min,t.max=t.min+St(e)}function lo(t,e,n){tb(t.x,e.x,n.x),tb(t.y,e.y,n.y)}function IE(t,{min:e,max:n},i){return e!==void 0&&tn&&(t=i?Pe(n,t,i.max):Math.min(t,n)),t}function nb(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 OE(t,{top:e,left:n,bottom:i,right:r}){return{x:nb(t.x,n,r),y:nb(t.y,e,i)}}function ib(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 zE(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 BE(t=Yf){return t===!1?t=0:t===!0&&(t=Yf),{x:rb(t,"left","right"),y:rb(t,"top","bottom")}}function rb(t,e,n){return{min:sb(t,e),max:sb(t,n)}}function sb(t,e){return typeof t=="number"?t:t[e]||0}const ob=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vr=()=>({x:ob(),y:ob()}),ab=()=>({min:0,max:0}),Te=()=>({x:ab(),y:ab()});function Lt(t){return[t("x"),t("y")]}function lb({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function jE({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function KE(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)||ub(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ub(t){return cb(t.x)||cb(t.y)}function cb(t){return t&&t!=="0%"}function El(t,e,n){const i=t-n,r=e*i;return n+r}function db(t,e,n,i,r){return r!==void 0&&(t=El(t,r,i)),El(t,n,i)+e}function Qf(t,e=0,n=1,i,r){t.min=db(t.min,e,n,i,r),t.max=db(t.max,e,n,i,r)}function fb(t,{x:e,y:n}){Qf(t.x,e.translate,e.scale,e.originPoint),Qf(t.y,n.translate,n.scale,n.originPoint)}const hb=.999999999999,pb=1.0000000000001;function HE(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;ahb&&(e.x=1),e.yhb&&(e.y=1)}function Nr(t,e){t.min=t.min+e,t.max=t.max+e}function mb(t,e,n,i,r=.5){const s=Pe(t.min,t.max,r);Qf(t,e,n,s,i)}function zr(t,e){mb(t.x,e.x,e.scaleX,e.scale,e.originX),mb(t.y,e.y,e.scaleY,e.scale,e.originY)}function gb(t,e){return lb(KE(t.getBoundingClientRect(),e))}function WE(t,e,n){const i=gb(t,n),{scroll:r}=e;return r&&(Nr(i.x,r.offset.x),Nr(i.y,r.offset.y)),i}const vb=({current:t})=>t?t.ownerDocument.defaultView:null,UE=new WeakMap;class YE{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(Cl(c,"page").point)},s=(c,d)=>{const{drag:f,dragPropagation:h,onDragStart:g}=this.getProps();if(f&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=X0(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=GE(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 K0(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:vb(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||!Ml(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=IE(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&&Or(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=OE(r.layoutBox,n):this.constraints=!1,this.elastic=BE(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Lt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=zE(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Or(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=WE(i,r.root,this.visualElement.getTransformPagePoint());let o=VE(r.layout.layoutBox,s);if(n){const a=n(jE(o));this.hasMutatedConstraints=!!a,a&&(o=lb(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(!Ml(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(!Ml(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(!Or(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]=NE({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(!Ml(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;UE.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();Or(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 Ml(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function GE(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class XE extends si{constructor(e){super(e),this.removeGroupControls=Be,this.removeListeners=Be,this.controls=new YE(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Be}unmount(){this.removeGroupControls(),this.removeListeners()}}const yb=t=>(e,n)=>{t&&se.postRender(()=>t(e,n))};class QE extends si{constructor(){super(...arguments),this.removePointerDownListener=Be}onPointerDown(e){this.session=new K0(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vb(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:yb(e),onStart:yb(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 qE(){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 bb=x.createContext({}),xb=x.createContext({}),Dl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wb(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const uo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(G.test(t))t=parseFloat(t);else return t;const n=wb(t,e.target.x),i=wb(t,e.target.y);return`${n}% ${i}%`}},ZE={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)}},Ll={};function JE(t){Object.assign(Ll,t)}const{schedule:Zf,cancel:t7}=Fy(queueMicrotask,!1);class e2 extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;JE(t2),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()}))),Dl.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 Sb(t){const[e,n]=qE(),i=x.useContext(bb);return I.jsx(e2,N($({},t),{layoutGroup:i,switchLayoutGroup:x.useContext(xb),isPresent:e,safeToRemove:n}))}const t2={borderRadius:N($({},uo),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:ZE},Pb=["TopLeft","TopRight","BottomLeft","BottomRight"],n2=Pb.length,_b=t=>typeof t=="string"?parseFloat(t):t,$b=t=>typeof t=="number"||G.test(t);function i2(t,e,n,i,r,s){r?(t.opacity=Pe(0,n.opacity!==void 0?n.opacity:1,r2(i)),t.opacityExit=Pe(e.opacity!==void 0?e.opacity:1,0,s2(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 Cb(t,e){t.min=e.min,t.max=e.max}function At(t,e){Cb(t.x,e.x),Cb(t.y,e.y)}function Eb(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Mb(t,e,n,i,r){return t-=e,t=El(t,1/n,i),r!==void 0&&(t=El(t,1/r,i)),t}function o2(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=Mb(t.min,e,n,a,r),t.max=Mb(t.max,e,n,a,r)}function Db(t,e,[n,i,r],s,o){o2(t,e[n],e[i],e[r],e.scale,s,o)}const a2=["x","scaleX","originX"],l2=["y","scaleY","originY"];function Lb(t,e,n,i){Db(t.x,e,a2,n?n.x:void 0,i?i.x:void 0),Db(t.y,e,l2,n?n.y:void 0,i?i.y:void 0)}function Ab(t){return t.translate===0&&t.scale===1}function Rb(t){return Ab(t.x)&&Ab(t.y)}function Fb(t,e){return t.min===e.min&&t.max===e.max}function u2(t,e){return Fb(t.x,e.x)&&Fb(t.y,e.y)}function Ib(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ob(t,e){return Ib(t.x,e.x)&&Ib(t.y,e.y)}function Vb(t){return St(t.x)/St(t.y)}function Nb(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class c2{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 d2(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 f2=(t,e)=>t.depth-e.depth;class h2{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(f2),this.isDirty=!1,this.children.forEach(e)}}function Al(t){const e=Xe(t)?t.get():t;return sE(e)?e.toValue():e}function p2(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 m2(t){return t instanceof SVGElement&&t.tagName!=="svg"}function g2(t,e,n){const i=Xe(t)?t:_n(t);return i.start(Vf("",i,e,n)),i.animation}const Bi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},co=typeof window!="undefined"&&window.MotionDebug!==void 0,Jf=["","X","Y","Z"],v2={visibility:"hidden"},zb=1e3;let y2=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 Bb(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=O0(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&&Bb(i)}function jb({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=y2++,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,co&&(Bi.totalNodes=Bi.resolvedTargetDeltas=Bi.recalculatedProjection=0),this.nodes.forEach(w2),this.nodes.forEach(k2),this.nodes.forEach(T2),this.nodes.forEach(S2),co&&window.MotionDebug.record(Bi)},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=p2(f,250),Dl.hasAnimatedSinceResize&&(Dl.hasAnimatedSinceResize=!1,this.nodes.forEach(Hb))})}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()||L2,{onLayoutAnimationStart:b,onLayoutAnimationComplete:p}=c.getProps(),m=!this.targetLayout||!Ob(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||Hb(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(C2),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&&Bb(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;Wb(d.x,o.x,P),Wb(d.y,o.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),M2(this.relativeTarget,this.relativeTargetOrigin,f,P),y&&u2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Te()),At(y,this.relativeTarget)),v&&(this.animationValues=c,i2(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(()=>{Dl.hasAnimatedSinceResize=!0,this.currentAnimation=g2(0,zb,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(zb),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&&Qb(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),zr(a,c),ao(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new c2),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(Kb),this.root.sharedNodes.clear()}}}function b2(t){t.updateLayout()}function x2(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}):Qb(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=Vr();ao(a,i,n.layoutBox);const l=Vr();o?ao(l,t.applyTransform(r,!0),n.measuredBox):ao(l,i,n.layoutBox);const u=!Rb(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();lo(g,n.layoutBox,f.layoutBox);const v=Te();lo(v,i,h.layoutBox),Ob(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 w2(t){co&&Bi.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 S2(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function P2(t){t.clearSnapshot()}function Kb(t){t.clearMeasurements()}function _2(t){t.isLayoutDirty=!1}function $2(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Hb(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function k2(t){t.resolveTargetDelta()}function T2(t){t.calcProjection()}function C2(t){t.resetSkewAndRotation()}function E2(t){t.removeLeadSnapshot()}function Wb(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 Ub(t,e,n,i){t.min=Pe(e.min,n.min,i),t.max=Pe(e.max,n.max,i)}function M2(t,e,n,i){Ub(t.x,e.x,n.x,i),Ub(t.y,e.y,n.y,i)}function D2(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const L2={duration:.45,ease:[.4,0,.1,1]},Yb=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Gb=Yb("applewebkit/")&&!Yb("chrome/")?Math.round:Be;function Xb(t){t.min=Gb(t.min),t.max=Gb(t.max)}function A2(t){Xb(t.x),Xb(t.y)}function Qb(t,e,n){return t==="position"||t==="preserve-aspect"&&!RE(Vb(e),Vb(n),.2)}function R2(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const F2=jb({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},qb=jb({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!th.current){const t=new F2({});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"}),I2={pan:{Feature:QE},drag:{Feature:XE,ProjectionNode:qb,MeasureLayout:Sb}};function Zb(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd",r=(s,o)=>{if(s.pointerType==="touch"||Q0())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 O2 extends si{mount(){this.unmount=Pn(Zb(this.node,!0),Zb(this.node,!1))}unmount(){}}class V2 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 Jb=(t,e)=>e?t===e?!0:Jb(t,e.parentElement):!1;function nh(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Cl(n))}class N2 extends si{constructor(){super(...arguments),this.removeStartListeners=Be,this.removeEndListeners=Be,this.removeAccessibleListeners=Be,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&&!Jb(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),!Q0()}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,z2=t=>{const e=ih.get(t.target);e&&e(t)},B2=t=>{t.forEach(z2)};function j2(n){var i=n,{root:t}=i,e=te(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(B2,$({root:t},e))),s[o]}function K2(t,e,n){const i=j2(e);return ih.set(t,n),i.observe(t),()=>{ih.delete(t),i.unobserve(t)}}const H2={some:0,all:1};class W2 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:H2[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 K2(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(U2(e,n))&&this.startObserver()}unmount(){}}function U2({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Y2={inView:{Feature:W2},tap:{Feature:N2},focus:{Feature:V2},hover:{Feature:O2}},G2={layout:{ProjectionNode:qb,MeasureLayout:Sb}},ex=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Rl=x.createContext({}),sh=typeof window!="undefined",tx=sh?x.useLayoutEffect:x.useEffect,nx=x.createContext({strict:!1});function X2(t,e,n,i,r){var s,o;const{visualElement:a}=x.useContext(Rl),l=x.useContext(nx),u=x.useContext(qf),c=x.useContext(ex).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(xb);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&Q2(d.current,n,r,h),x.useInsertionEffect(()=>{f&&f.update(n,u)});const g=n[I0],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 tx(()=>{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 Q2(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:ix(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Or(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}function ix(t){if(t)return t.options.allowProjection!==!1?t.projection:ix(t.parent)}function q2(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):Or(n)&&(n.current=i))},[e])}function Fl(t){return yl(t.animate)||uf.some(e=>Js(t[e]))}function rx(t){return!!(Fl(t)||t.variants)}function Z2(t,e){if(Fl(t)){const{initial:n,animate:i}=t;return{initial:n===!1||Js(n)?n:void 0,animate:Js(i)?i:void 0}}return t.inherit!==!1?e:{}}function J2(t){const{initial:e,animate:n}=Z2(t,x.useContext(Rl));return x.useMemo(()=>({initial:e,animate:n}),[sx(e),sx(n)])}function sx(t){return Array.isArray(t)?t.join(" "):t}const ox={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 ox)Br[t]={isEnabled:e=>ox[t].some(n=>!!e[n])};function eM(t){for(const e in t)Br[e]=$($({},Br[e]),t[e])}const tM=Symbol.for("motionComponentSymbol");function nM({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&eM(t);function s(a,l){let u;const c=N($($({},x.useContext(ex)),a),{layoutId:iM(a)}),{isStatic:d}=c,f=J2(a),h=i(a,d);if(!d&&sh){rM();const g=sM(c);u=g.MeasureLayout,f.visualElement=X2(r,h,c,e,g.ProjectionNode)}return I.jsxs(Rl.Provider,{value:f,children:[u&&f.visualElement?I.jsx(u,$({visualElement:f.visualElement},c)):null,n(r,a,q2(h,f.visualElement,l),h,d,f.visualElement)]})}const o=x.forwardRef(s);return o[tM]=r,o}function iM({layoutId:t}){const e=x.useContext(bb).id;return e&&t!==void 0?e+"-"+t:t}function rM(t,e){x.useContext(nx).strict}function sM(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 oM=["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:!!(oM.indexOf(t)>-1||/[A-Z]/u.test(t))}function ax(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 lx=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 ux(t,e,n,i){ax(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(lx.has(r)?r:jf(r),e.attrs[r])}function cx(t,{layout:e,layoutId:n}){return Fi.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ll[t]||t==="opacity")}function ah(t,e,n){var i;const{style:r}=t,s={};for(const o in r)(Xe(r[o])||e.style&&Xe(e.style[o])||cx(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 dx(t,e,n){const i=ah(t,e,n);for(const r in t)if(Xe(t[r])||Xe(e[r])){const s=eo.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}function fx(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}function aM({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,s){const o={latestValues:lM(i,r,s,t),renderState:e()};return n&&(o.mount=a=>n(i,a,o)),o}const hx=t=>(e,n)=>{const i=x.useContext(Rl),r=x.useContext(qf),s=()=>aM(t,e,i,r);return n?s():fx(s)};function lM(t,e,n,i){const r={},s=i(t,{});for(const h in s)r[h]=Al(s[h]);let{initial:o,animate:a}=t;const l=Fl(t),u=rx(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"&&!yl(d)){const h=Array.isArray(d)?d:[d];for(let g=0;g({style:{},transform:{},transformOrigin:{},vars:{}}),px=()=>N($({},lh()),{attrs:{}}),mx=(t,e)=>e&&typeof t=="number"?e.transform(t):t,uM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cM=eo.length;function dM(t,e,n){let i="",r=!0;for(let s=0;stypeof t=="string"&&t.toLowerCase()==="svg",gM={useVisualState:hx({scrapeMotionValuesFromProps:dx,createRenderState:px,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),ux(e,n)})}})},vM={useVisualState:hx({scrapeMotionValuesFromProps:ah,createRenderState:lh})};function vx(t,e,n){for(const i in e)!Xe(e[i])&&!cx(i,n)&&(t[i]=e[i])}function yM({transformTemplate:t},e){return x.useMemo(()=>{const n=lh();return uh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bM(t,e){const n=t.style||{},i={};return vx(i,n,t),Object.assign(i,yM(t,e)),i}function xM(t,e){const n={},i=bM(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 wM=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 Il(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wM.has(t)}let yx=t=>!Il(t);function SM(t){t&&(yx=e=>e.startsWith("on")?!Il(e):t(e))}try{SM(require("@emotion/is-prop-valid").default)}catch(t){}function PM(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(yx(r)||n===!0&&Il(r)||!e&&!Il(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function _M(t,e,n,i){const r=x.useMemo(()=>{const s=px();return ch(s,e,dh(i),t.transformTemplate),N($({},s.attrs),{style:$({},s.style)})},[e]);if(t.style){const s={};vx(s,t.style,t),r.style=$($({},s),r.style)}return r}function $M(t=!1){return(n,i,r,{latestValues:s},o)=>{const l=(oh(n)?_M:xM)(i,s,o,n),u=PM(i,typeof n=="string",t),c=n!==x.Fragment?N($($({},u),l),{ref:r}):{},{children:d}=i,f=x.useMemo(()=>Xe(d)?d.get():d,[d]);return x.createElement(n,N($({},c),{children:f}))}}function kM(t,e){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const s=oh(i)?gM:vM,o=N($({},s),{preloadedFeatures:t,useRender:$M(r),createVisualElement:e,Component:i});return nM(o)}}const fh={current:null},bx={current:!1};function TM(){if(bx.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 CM(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Xe(r))t.addValue(i,r);else if(Xe(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 xx=new WeakMap,EM=[...e0,Ge,ri],MM=t=>EM.find(Jy(t)),wx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class DM{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)),bx.current||TM(),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(){xx.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"&&(Wy(r)||Hy(r))?r=parseFloat(r):!MM(r)&&ri.test(n)&&(r=d0(e,n)),this.setBaseTarget(e,Xe(r)?r.get():r)),Xe(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&&!Xe(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 Bf),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Sx extends DM{constructor(){super(...arguments),this.KeyframeResolver=f0}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 LM(t){return window.getComputedStyle(t)}class AM extends Sx{constructor(){super(...arguments),this.type="html",this.renderInstance=ax}readValueFromInstance(e,n){if(Fi.has(n)){const i=$f(n);return i&&i.default||0}else{const i=LM(e),r=(Yy(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return gb(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;Xe(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class RM extends Sx{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=lx.has(n)?n:jf(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return dx(e,n,i)}build(e,n,i){ch(e,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,i,r){ux(e,n,i,r)}mount(e){this.isSVGTag=dh(e.tagName),super.mount(e)}}const FM=(t,e)=>oh(t)?new RM(e):new AM(e,{allowProjection:t!==x.Fragment}),IM=kM($($($($({},$E),Y2),I2),G2),FM),hh=xT(IM);function OM(t,e,n){x.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function VM(t,e,n){return typeof t=="string"?t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Ol=new WeakMap;let oi;function NM(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 zM({target:t,contentRect:e,borderBoxSize:n}){var i;(i=Ol.get(t))===null||i===void 0||i.forEach(r=>{r({target:t,contentSize:e,get size(){return NM(t,n)}})})}function BM(t){t.forEach(zM)}function jM(){typeof ResizeObserver!="undefined"&&(oi=new ResizeObserver(BM))}function KM(t,e){oi||jM();const n=VM(t);return n.forEach(i=>{let r=Ol.get(i);r||(r=new Set,Ol.set(i,r)),r.add(e),oi==null||oi.observe(i)}),()=>{n.forEach(i=>{const r=Ol.get(i);r==null||r.delete(e),r!=null&&r.size||oi==null||oi.unobserve(i)})}}const Vl=new Set;let fo;function HM(){fo=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Vl.forEach(n=>n(e))},window.addEventListener("resize",fo)}function WM(t){return Vl.add(t),fo||HM(),()=>{Vl.delete(t),!Vl.size&&fo&&(fo=void 0)}}function UM(t,e){return typeof t=="function"?WM(t):KM(t,e)}const YM=50,Px=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),GM=()=>({time:0,x:Px(),y:Px()}),XM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function _x(t,e,n,i){const r=n[e],{length:s,position:o}=XM[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>YM?0:Tf(r.current-a,u)}function QM(t,e,n){_x(t,"x",e,n),_x(t,"y",e,n),e.time=n}function qM(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 ZM={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 $x(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 JM=[0,0];function eD(t,e,n,i){let r=Array.isArray(t)?t:JM,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=$x(r[0],n,i),o=$x(r[1],e),s-o}const tD={x:0,y:0};function nD(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function iD(t,e,n){const{offset:i=ZM.All}=n,{target:r=t,axis:s="y"}=n,o=s==="y"?"height":"width",a=r!==t?qM(r,t):tD,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:nD(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;frD(t,i.target,n),update:r=>{QM(t,n,r),(i.offset||i.target)&&iD(t,n,i)},notify:()=>e(n)}}const ho=new WeakMap,kx=new WeakMap,mh=new WeakMap,Tx=t=>t===document.documentElement?window:t;function gh(t,i={}){var r=i,{container:e=document.documentElement}=r,n=te(r,["container"]);let s=mh.get(e);s||(s=new Set,mh.set(e,s));const o=GM(),a=sD(e,t,o,n);if(s.add(a),!ho.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)};ho.set(e,f);const h=Tx(e);window.addEventListener("resize",f,{passive:!0}),e!==document.documentElement&&kx.set(e,UM(e,f)),h.addEventListener("scroll",f,{passive:!0})}const l=ho.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=ho.get(e);ho.delete(e),d&&(Tx(e).removeEventListener("scroll",d),(u=kx.get(e))===null||u===void 0||u(),window.removeEventListener("resize",d))}}function Cx(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 oD({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 Ex({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]=R0()?new ScrollTimeline({source:e,axis:n}):oD({source:e,axis:n})),i[n]}function aD(t){return t.length===2}function Mx(t){return t&&(t.target||t.offset)}function lD(t,e){return aD(t)||Mx(e)?gh(n=>{t(n[e.axis].progress,n)},e):Cx(t,Ex(e))}function uD(t,e){if(Mx(e))return t.pause(),gh(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=Ex(e);return t.attachTimeline(n,i=>(i.pause(),Cx(r=>{i.time=i.duration*r},n)))}}function cD(t,i={}){var r=i,{axis:e="y"}=r,n=te(r,["axis"]);const s=$({axis:e},n);return typeof t=="function"?lD(t,s):uD(t,s)}function Dx(t,e){RT(!!(!e||e.current))}const dD=()=>({scrollX:_n(0),scrollY:_n(0),scrollXProgress:_n(0),scrollYProgress:_n(0)});function fD(r={}){var s=r,{container:t,target:e,layoutEffect:n=!0}=s,i=te(s,["container","target","layoutEffect"]);const o=fx(dD);return(n?tx:x.useEffect)(()=>(Dx("target",e),Dx("container",t),cD((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}function hD({yearlyData:t,currentCurrency:e,currentRegion:n}){const[i,r]=x.useState(!1),[s,o]=x.useState(!0),a=x.useRef(null),{scrollXProgress:l}=fD({container:a});return OM(l,"change",u=>{u>0&&r(!0),u===0&&r(!1),o(u!==1)}),I.jsxs("div",{className:"relative",children:[I.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"}),I.jsx(hh.section,{ref:a,layoutScroll:!0,className:"simpletable--blade relative overflow-x-auto",children:I.jsx("div",{className:"simpletable__table table",style:{padding:0},children:I.jsxs("table",{className:"table-auto border-collapse text-left",children:[I.jsx("thead",{children:I.jsxs("tr",{children:[I.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader1}),I.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader2}),I.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader3}),I.jsx("th",{scope:"col",className:"inline-block min-w-[180px] items-start",children:Y.oblroi_resultsTableHeader4})]})}),I.jsx("tbody",{children:t.map(u=>I.jsxs("tr",{role:"row",className:"last:bg-[#F1F3FB]",children:[I.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.year}),I.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.serviceRepCost!==void 0&&I.jsx(vl,{value:u.serviceRepCost,currency:e,locale:n})}),I.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.cost!==void 0&&I.jsx(vl,{value:u.cost,currency:e,locale:n})}),I.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:u.savings!==void 0&&I.jsx(vl,{value:u.savings,currency:e,locale:n})})]},u.year))})]})})}),I.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 pD{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 Lx{*[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 po extends Lx{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof po?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 po?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=te(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 mD extends Lx{get isConnected(){return this.isMounted}createElement(e){return new po(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 po&&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 Ax(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 Nl={prefix:String(Math.round(Math.random()*1e10)),current:0},Rx=W.createContext(Nl),gD=W.createContext(!1);let vD=!!(typeof window!="undefined"&&window.document&&window.document.createElement),bh=new WeakMap;function yD(t=!1){let e=x.useContext(Rx),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 bD(t){let e=x.useContext(Rx);e===Nl&&!vD&&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=yD(!!t),i=`react-aria${e.prefix}`;return t||`${i}-${n}`}function xD(t){let e=W.useId(),[n]=x.useState(mo()),i=n?"react-aria":`react-aria${Nl.prefix}`;return t||`${i}-${e}`}const wD=typeof W.useId=="function"?xD:bD;function SD(){return!1}function PD(){return!0}function _D(t){return()=>{}}function mo(){return typeof W.useSyncExternalStore=="function"?W.useSyncExternalStore(_D,SD,PD):x.useContext(gD)}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),$D=typeof DocumentFragment!="undefined"?new DocumentFragment:null;function kD(t){let e=x.useContext(xh),n=mo();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):gl.createPortal(i,$D)}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 TD(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 CD=!!(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=wD(e),s=x.useCallback(o=>{i.current=o},[]);return CD&&(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 ED(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 Fx(t=[]){let e=li(),[n,i]=TD(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 Ix(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]=MD(s,o):r==="id"&&s&&o?e.id=ED(s,o):e[r]=o!==void 0?o:s}}return e}function DD(...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 LD=new Set(["id"]),AD=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),RD=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),FD=/^(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)&&(LD.has(o)||n&&AD.has(o)||i&&RD.has(o)||r!=null&&r.has(o)||FD.test(o))&&(s[o]=t[o]);return s}function sn(t){if(ID())t.focus({preventScroll:!0});else{let e=OD(t);t.focus(),VD(e)}}let zl=null;function ID(){if(zl==null){zl=!1;try{document.createElement("div").focus({get preventScroll(){return zl=!0,!0}})}catch(t){}}return zl}function OD(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 ji=Tn(function(){return Ph(/^Mac/i)}),Ox=Tn(function(){return Ph(/^iPhone/i)}),Vx=Tn(function(){return Ph(/^iPad/i)||ji()&&navigator.maxTouchPoints>1}),jl=Tn(function(){return Ox()||Vx()}),ND=Tn(function(){return ji()||jl()}),zD=Tn(function(){return Bl(/AppleWebKit/i)&&!BD()}),BD=Tn(function(){return Bl(/Chrome/i)}),_h=Tn(function(){return Bl(/Android/i)}),jD=Tn(function(){return Bl(/Firefox/i)}),KD=x.createContext({isNative:!0,open:UD,useHref:t=>t});function Kl(){return x.useContext(KD)}function HD(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;jD()&&(!((r=window.event)===null||r===void 0||(i=r.type)===null||i===void 0)&&i.startsWith("key"))&&t.target==="_blank"&&(ji()?s=!0:o=!0);let u=zD()&&ji()&&!Vx()?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 WD(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 UD(t,e){WD(t,n=>Ki(n,e))}function Nx(t){let e=Kl();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 jr=new Map,$h=new Set;function zx(){if(typeof window=="undefined")return;function t(i){return"propertyName"in i}let e=i=>{if(!t(i)||!i.target)return;let r=jr.get(i.target);r||(r=new Set,jr.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=jr.get(i.target);if(r&&(r.delete(i.propertyName),r.size===0&&(i.target.removeEventListener("transitioncancel",n),jr.delete(i.target)),jr.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"?zx():document.addEventListener("DOMContentLoaded",zx));function Bx(t){requestAnimationFrame(()=>{jr.size===0?t():$h.add(t)})}function Kr(){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 Hl(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 jx(t,e){Yt(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function YD(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 GD(t,e){const n=[];for(;t&&t!==document.documentElement;)YD(t,e)&&n.push(t),t=t.parentElement;return n}let XD=0;const Th=new Map;function QD(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-${XD++}`;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 Kx(t,e){let n=Hx(t,e,"left"),i=Hx(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 Hx(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 Wx(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let l=GD(t);for(let u of l)Kx(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 qD(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 go(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 Hr(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}function Wl(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=Wl(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(Wl(n/i,i))*i):sn&&(s=e+Math.floor(Wl((n-e)/i,i))*i),s=Wl(s,i),s}var Ux={exports:{}},Yx={};/** * @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 Wr=x;function ZD(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var JD=typeof Object.is=="function"?Object.is:ZD,e4=Wr.useState,t4=Wr.useEffect,n4=Wr.useLayoutEffect,i4=Wr.useDebugValue;function r4(t,e){var n=e(),i=e4({inst:{value:n,getSnapshot:e}}),r=i[0].inst,s=i[1];return n4(function(){r.value=n,r.getSnapshot=e,Dh(r)&&s({inst:r})},[t,n,e]),t4(function(){return Dh(r)&&s({inst:r}),t(function(){Dh(r)&&s({inst:r})})},[t]),i4(n),n}function Dh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!JD(t,n)}catch(i){return!0}}function s4(t,e){return e()}var o4=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?s4:r4;Yx.useSyncExternalStore=Wr.useSyncExternalStore!==void 0?Wr.useSyncExternalStore:o4,Ux.exports=Yx;var a4=Ux.exports;const Gx=x.createContext(!1),vo=x.createContext(null);function l4(t){if(x.useContext(vo))return t.content;let{collection:n,document:i}=f4(t.createCollection);return W.createElement(W.Fragment,null,W.createElement(kD,null,W.createElement(vo.Provider,{value:i},t.content)),W.createElement(u4,{render:t.children,collection:n}))}function u4({collection:t,render:e}){return e(t)}function c4(t,e,n){let i=mo(),r=x.useRef(i);r.current=i;let s=x.useCallback(()=>r.current?n():e(),[e,n]);return a4.useSyncExternalStore(t,s)}const d4=typeof W.useSyncExternalStore=="function"?W.useSyncExternalStore:c4;function f4(t){let[e]=x.useState(()=>new mD((t==null?void 0:t())||new pD)),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=d4(n,i,r);return Yt(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:s,document:e}}const Lh=x.createContext(null);function h4(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 p4(t,e){let n=({node:r})=>e(r.props,r.props.ref,r),i=x.forwardRef((r,s)=>{if(!x.useContext(Gx)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(r,s)}return h4(t,r,s,"children"in r?r.children:null,null,a=>W.createElement(n,{node:a}))});return i.displayName=e.name,i}function m4(t){return Ax(N($({},t),{addIdAndValue:!0}))}const Xx=x.createContext(null);function g4(t){let e=x.useContext(Xx),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),i=t.idScope||(e==null?void 0:e.idScope),r=m4(N($({},t),{idScope:i,dependencies:n}));return x.useContext(vo)&&(r=W.createElement(v4,null,r)),e=x.useMemo(()=>({dependencies:n,idScope:i}),[i,...n]),W.createElement(Xx.Provider,{value:e},r)}function v4({children:t}){let e=x.useContext(vo),n=x.useMemo(()=>W.createElement(vo.Provider,{value:null},W.createElement(Gx.Provider,{value:!0},t)),[t]);return mo()?W.createElement(Lh.Provider,{value:e},n):gl.createPortal(n,e)}const y4={CollectionRoot({collection:t,renderDropIndicator:e}){return Qx(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Qx(t,e,n)}};function Qx(t,e,n){return Ax({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 b4=x.createContext(y4);function x4(t){return x.useMemo(()=>t!=null?new Set([t]):null,[t])}const qx=Symbol("default");function yo({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 Ul(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[qx])throw new Error(`A slot prop is required. Valid slot names are ${i}.`);let r=e||qx;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=Ul(n,t.slot)||{},{ref:r}=l,s=te(l,["ref"]),o=Hl(x.useMemo(()=>DD(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 w4(t){const e=/^(data-.*)$/;let n={};for(const i in t)e.test(i)||(n[i]=t[i]);return n}let Ur="default",Rh="",Yl=new WeakMap;function Fh(t){if(jl()){if(Ur==="default"){const e=ut(t);Rh=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Ur="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(Yl.set(t,t.style.userSelect),t.style.userSelect="none")}function bo(t){if(jl()){if(Ur!=="disabled")return;Ur="restoring",setTimeout(()=>{Bx(()=>{if(Ur==="restoring"){const e=ut(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Rh||""),Rh="",Ur="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Yl.has(t)){let e=Yl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Yl.delete(t)}}const Zx=W.createContext({register:()=>{}});Zx.displayName="PressResponderContext";function S4(t,e){return e.get?e.get.call(t):e.value}function Jx(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function P4(t,e){var n=Jx(t,e,"get");return S4(t,n)}function _4(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $4(t,e,n){_4(t,e),e.set(t,n)}function k4(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 e1(t,e,n){var i=Jx(t,e,"set");return k4(t,i,n),n}function T4(t){let e=x.useContext(Zx);if(e){let n=e,{register:i}=n,r=te(n,["register"]);t=ae(r,t),i()}return jx(e,t.ref),t}var Gl=new WeakMap;class Xl{continuePropagation(){e1(this,Gl,!1)}get shouldStopPropagation(){return P4(this,Gl)}constructor(e,n,i,r){$4(this,Gl,{writable:!0,value:void 0}),e1(this,Gl,!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 t1=Symbol("linkClicked");function Ih(t){let E=T4(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=te(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}=Kr(),m=Ie((w,_)=>{let A=v.current;if(o||A.didFirePressStart)return!1;let k=!0;if(A.isTriggeringEvent=!0,i){let V=new Xl("pressstart",_,w);i(V),k=V.shouldStopPropagation}return n&&n(!0),A.isTriggeringEvent=!1,A.didFirePressStart=!0,g(!0),k}),y=Ie((w,_,A=!0)=>{let k=v.current;if(!k.didFirePressStart)return!1;k.ignoreClickAfterPress=!0,k.didFirePressStart=!1,k.isTriggeringEvent=!0;let V=!0;if(r){let M=new Xl("pressend",_,w);r(M),V=M.shouldStopPropagation}if(n&&n(!1),g(!1),e&&A&&!o){let M=new Xl("press",_,w);e(M),V&&(V=M.shouldStopPropagation)}return k.isTriggeringEvent=!1,V}),S=Ie((w,_)=>{let A=v.current;if(o)return!1;if(s){A.isTriggeringEvent=!0;let k=new Xl("pressup",_,w);return s(k),A.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||bo(_.target))}),T=Ie(w=>{u&&P(w)}),D=x.useMemo(()=>{let w=v.current,_={onKeyDown(k){if(Vh(k.nativeEvent,k.currentTarget)&&k.currentTarget.contains(k.target)){var V;r1(k.target,k.key)&&k.preventDefault();let M=!0;if(!w.isPressed&&!k.repeat){w.target=k.currentTarget,w.isPressed=!0,M=m(k,"keyboard");let O=k.currentTarget,C=L=>{Vh(L,O)&&!L.repeat&&O.contains(L.target)&&w.target&&S(Cn(w.target,L),"keyboard")};b(ut(k.currentTarget),"keyup",Sh(C,A),!0)}M&&k.stopPropagation(),k.metaKey&&ji()&&((V=w.metaKeyEvents)===null||V===void 0||V.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 V=!0;if(o&&k.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Eh(k.nativeEvent))){!o&&!l&&sn(k.currentTarget);let M=m(k,"virtual"),O=S(k,"virtual"),C=y(k,"virtual");V=M&&O&&C}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,V&&k.stopPropagation()}}},A=k=>{var V;if(w.isPressed&&w.target&&Vh(k,w.target)){var M;r1(k.target,k.key)&&k.preventDefault();let C=k.target;y(Cn(w.target,k),"keyboard",w.target.contains(C)),p(),k.key!=="Enter"&&Oh(w.target)&&w.target.contains(C)&&!k[t1]&&(k[t1]=!0,Ki(w.target,k,!1)),w.isPressed=!1,(M=w.metaKeyEvents)===null||M===void 0||M.delete(k.key)}else if(k.key==="Meta"&&(!((V=w.metaKeyEvents)===null||V===void 0)&&V.size)){var O;let C=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let L of C.values())(O=w.target)===null||O===void 0||O.dispatchEvent(new KeyboardEvent("keyup",L))}};if(typeof PointerEvent!="undefined"){_.onPointerDown=C=>{if(C.button!==0||!C.currentTarget.contains(C.target))return;if(qD(C.nativeEvent)){w.pointerType="virtual";return}Nh(C.currentTarget)&&C.preventDefault(),w.pointerType=C.pointerType;let L=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=C.pointerId,w.target=C.currentTarget,!o&&!l&&sn(C.currentTarget),c||Fh(w.target),L=m(C,w.pointerType),b(ut(C.currentTarget),"pointermove",k,!1),b(ut(C.currentTarget),"pointerup",V,!1),b(ut(C.currentTarget),"pointercancel",O,!1)),L&&C.stopPropagation()},_.onMouseDown=C=>{C.currentTarget.contains(C.target)&&C.button===0&&(Nh(C.currentTarget)&&C.preventDefault(),C.stopPropagation())},_.onPointerUp=C=>{!C.currentTarget.contains(C.target)||w.pointerType==="virtual"||C.button===0&&Yr(C,C.currentTarget)&&S(C,w.pointerType||C.pointerType)};let k=C=>{C.pointerId===w.activePointerId&&(w.target&&Yr(C,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,m(Cn(w.target,C),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,y(Cn(w.target,C),w.pointerType,!1),T(C)))},V=C=>{C.pointerId===w.activePointerId&&w.isPressed&&C.button===0&&w.target&&(Yr(C,w.target)&&w.pointerType!=null?y(Cn(w.target,C),w.pointerType):w.isOverTarget&&w.pointerType!=null&&y(Cn(w.target,C),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,p(),c||bo(w.target),"ontouchend"in w.target&&C.pointerType!=="mouse"&&b(w.target,"touchend",M,{once:!0}))},M=C=>{i1(C.currentTarget)&&C.preventDefault()},O=C=>{P(C)};_.onDragStart=C=>{C.currentTarget.contains(C.target)&&P(C)}}else{_.onMouseDown=M=>{if(M.button!==0||!M.currentTarget.contains(M.target))return;if(Nh(M.currentTarget)&&M.preventDefault(),w.ignoreEmulatedMouseEvents){M.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=M.currentTarget,w.pointerType=Eh(M.nativeEvent)?"virtual":"mouse",!o&&!l&&sn(M.currentTarget),m(M,w.pointerType)&&M.stopPropagation(),b(ut(M.currentTarget),"mouseup",k,!1)},_.onMouseEnter=M=>{if(!M.currentTarget.contains(M.target))return;let O=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,O=m(M,w.pointerType)),O&&M.stopPropagation()},_.onMouseLeave=M=>{if(!M.currentTarget.contains(M.target))return;let O=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,O=y(M,w.pointerType,!1),T(M)),O&&M.stopPropagation()},_.onMouseUp=M=>{M.currentTarget.contains(M.target)&&!w.ignoreEmulatedMouseEvents&&M.button===0&&S(M,w.pointerType||"mouse")};let k=M=>{if(M.button===0){if(w.isPressed=!1,p(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&Yr(M,w.target)&&w.pointerType!=null?y(Cn(w.target,M),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&y(Cn(w.target,M),w.pointerType,!1),w.isOverTarget=!1}};_.onTouchStart=M=>{if(!M.currentTarget.contains(M.target))return;let O=C4(M.nativeEvent);if(!O)return;w.activePointerId=O.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=M.currentTarget,w.pointerType="touch",!o&&!l&&sn(M.currentTarget),c||Fh(w.target),m(ui(w.target,M),w.pointerType)&&M.stopPropagation(),b(Rt(M.currentTarget),"scroll",V,!0)},_.onTouchMove=M=>{if(!M.currentTarget.contains(M.target))return;if(!w.isPressed){M.stopPropagation();return}let O=n1(M.nativeEvent,w.activePointerId),C=!0;O&&Yr(O,M.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,C=m(ui(w.target,M),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,C=y(ui(w.target,M),w.pointerType,!1),T(ui(w.target,M))),C&&M.stopPropagation()},_.onTouchEnd=M=>{if(!M.currentTarget.contains(M.target))return;if(!w.isPressed){M.stopPropagation();return}let O=n1(M.nativeEvent,w.activePointerId),C=!0;O&&Yr(O,M.currentTarget)&&w.pointerType!=null?(S(ui(w.target,M),w.pointerType),C=y(ui(w.target,M),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(C=y(ui(w.target,M),w.pointerType,!1)),C&&M.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!c&&bo(w.target),p()},_.onTouchCancel=M=>{M.currentTarget.contains(M.target)&&(M.stopPropagation(),w.isPressed&&P(ui(w.target,M)))};let V=M=>{w.isPressed&&M.target.contains(w.target)&&P({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};_.onDragStart=M=>{M.currentTarget.contains(M.target)&&P(M)}}return _},[b,o,l,p,c,P,T,y,m,S]);return x.useEffect(()=>()=>{var w;c||bo((w=v.current.target)!==null&&w!==void 0?w:void 0)},[c]),{isPressed:a||h,pressProps:ae(f,D)}}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&&!s1(r,n)||r instanceof Rt(r).HTMLTextAreaElement||r.isContentEditable)&&!((s==="link"||!s&&Oh(r))&&n!=="Enter")}function C4(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function n1(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 Yr(t,e){let n=e.getBoundingClientRect(),i=E4(t);return M4(n,i)}function Nh(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function i1(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Oh(t)}function r1(t,e){return t instanceof HTMLInputElement?!s1(t,e):i1(t)}const D4=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function s1(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":D4.has(t.type)}class L4{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 o1(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 L4("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=o1(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,Bh=new Set,xo=new Map,Wi=!1,jh=!1;const A4={Tab:!0,Escape:!0};function Ql(t,e){for(let n of Bh)n(t,e)}function R4(t){return!(t.metaKey||!ji()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function ql(t){Wi=!0,R4(t)&&(Hi="keyboard",Ql("keyboard",t))}function Ft(t){Hi="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Wi=!0,Ql("pointer",t))}function a1(t){Eh(t)&&(Wi=!0,Hi="virtual")}function l1(t){t.target===window||t.target===document||(!Wi&&!jh&&(Hi="virtual",Ql("virtual",t)),Wi=!1,jh=!1)}function u1(){Wi=!1,jh=!0}function Kh(t){if(typeof window=="undefined"||xo.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",ql,!0),n.addEventListener("keyup",ql,!0),n.addEventListener("click",a1,!0),e.addEventListener("focus",l1,!0),e.addEventListener("blur",u1,!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",()=>{c1(t)},{once:!0}),xo.set(e,{focus:i})}const c1=(t,e)=>{const n=Rt(t),i=ut(t);e&&i.removeEventListener("DOMContentLoaded",e),xo.has(n)&&(n.HTMLElement.prototype.focus=xo.get(n).focus,i.removeEventListener("keydown",ql,!0),i.removeEventListener("keyup",ql,!0),i.removeEventListener("click",a1,!0),n.removeEventListener("focus",l1,!0),n.removeEventListener("blur",u1,!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)),xo.delete(n))};function F4(t){const e=ut(t);let n;return e.readyState!=="loading"?Kh(t):(n=()=>{Kh(t)},e.addEventListener("DOMContentLoaded",n)),()=>c1(t,n)}typeof document!="undefined"&&F4();function d1(){return Hi!=="pointer"}function Hh(){return Hi}function f1(t){Hi=t,Ql(t,null)}const I4=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function O4(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&&!I4.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&&!A4[n.key])}function V4(t,e,n){Kh(),x.useEffect(()=>{let i=(r,s)=>{O4(!!(n!=null&&n.isTextInput),r,s)&&t(d1())};return Bh.add(i),()=>{Bh.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=o1(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 Zl=!1,Uh=0;function Yh(){Zl=!0,setTimeout(()=>{Zl=!1},50)}function h1(t){t.pointerType==="touch"&&Yh()}function N4(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",h1):document.addEventListener("touchend",Yh),Uh++,()=>{Uh--,!(Uh>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",h1):document.removeEventListener("touchend",Yh))}}function Gr(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(N4,[]);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=>{Zl&&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&&!Zl&&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 p1(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 m1(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:p1(t.onKeyDown),onKeyUp:p1(t.onKeyUp)}}}function g1(t){let{onMoveStart:e,onMove:n,onMoveEnd:i}=t,r=x.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:s,removeGlobalListener:o}=Kr(),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)=>{bo(),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:D})=>D===r.current.id);if(m>=0){var y,S;let{pageX:D,pageY:E}=p.changedTouches[m];var P,T;a(p,"touch",D-((P=(y=r.current.lastPosition)===null||y===void 0?void 0:y.pageX)!==null&&P!==void 0?P:0),E-((T=(S=r.current.lastPosition)===null||S===void 0?void 0:S.pageY)!==null&&T!==void 0?T:0)),r.current.lastPosition={pageX:D,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 z4(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 B4=500;function j4(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:i,onLongPress:r,threshold:s=B4,accessibilityDescription:o}=t;const a=x.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=Kr(),{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=QD(r&&!e?o:void 0);return{longPressProps:ae(c,d)}}function Jl(t){const e=ut(t);if(Hh()==="virtual"){let n=e.activeElement;Bx(()=>{e.activeElement===n&&t.isConnected&&sn(t)})}else sn(t)}function K4(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 H4(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 v1(t,e){return t.nodeName!=="#comment"&&K4(t)&&H4(t,e)&&(!t.parentElement||v1(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]"],W4=Gh.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Gh.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const U4=Gh.join(':not([hidden]):not([tabindex="-1"]),');function y1(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function b1(t,e,n){let i=e!=null&&e.tabbable?U4:W4,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)&&v1(s)&&(!n||y1(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 x1({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&&y1(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*cs(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 x1({scopeRef:null}),this.fastMap.set(null,this.root)}}class x1{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||d1()}),[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]);V4(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 Y4=W.createContext(null);function G4(t){let e=x.useContext(Y4)||{};jx(e,t);let r=e,{ref:n}=r;return te(r,["ref"])}function Qh(t,e){let{focusProps:n}=zh(t),{keyboardProps:i}=m1(t),r=ae(n,i),s=G4(e),o=t.isDisabled?{}:s,a=x.useRef(t.autoFocus);return x.useEffect(()=>{a.current&&e.current&&Jl(e.current),a.current=!1},[e]),{focusableProps:ae(N($({},r),{tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0}),o)}}function X4(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=b1(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 Q4(t,e){let p=t,{elementType:n="a",onPress:i,onPressStart:r,onPressEnd:s,onClick:o,isDisabled:a}=p,l=te(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=Kl(),b=Nx(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()&&HD(m.currentTarget,m)&&t.href&&(m.preventDefault(),v.open(m.currentTarget,m,t.href,t.routerOptions))}}))}}const q4=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Z4=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function J4(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 q4.has(n.script)}let e=t.split("-")[0];return Z4.has(e)}const e5=Symbol.for("react-aria.i18n.locale");function w1(){let t=typeof window!="undefined"&&window[e5]||typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch(e){t="en-US"}return{locale:t,direction:J4(t)?"rtl":"ltr"}}let qh=w1(),wo=new Set;function S1(){qh=w1();for(let t of wo)t(qh)}function t5(){let t=mo(),[e,n]=x.useState(qh);return x.useEffect(()=>(wo.size===0&&window.addEventListener("languagechange",S1),wo.add(n),()=>{wo.delete(n),wo.size===0&&window.removeEventListener("languagechange",S1)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const n5=W.createContext(null);function Yi(){let t=t5();return x.useContext(n5)||t}const i5=Symbol.for("react-aria.i18n.locale"),r5=Symbol.for("react-aria.i18n.strings");let Xr;class eu{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=s5(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window=="undefined")return null;let n=window[i5];if(Xr===void 0){let r=window[r5];if(!r)return null;Xr={};for(let s in r)Xr[s]=new eu({[n]:r[s]},n)}let i=Xr==null?void 0:Xr[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 s5(t,e,n="en-US"){if(e[t])return e[t];let i=o5(t);if(e[i])return e[i];for(let r in e)if(r.startsWith(i+"-"))return e[r];return e[n]}function o5(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const P1=new Map,_1=new Map;class a5{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=P1.get(s);o||(o=new Intl.PluralRules(this.locale,{type:i}),P1.set(s,o));let a=o.select(e);return r=n[a]||n.other,typeof r=="function"?r():r}number(e){let n=_1.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),_1.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 $1=new WeakMap;function l5(t){let e=$1.get(t);return e||(e=new eu(t),$1.set(t,e)),e}function u5(t,e){return e&&eu.getGlobalDictionaryForPackage(e)||l5(t)}function k1(t,e){let{locale:n}=Yi(),i=u5(t,e);return x.useMemo(()=>new a5(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 tu=!1;try{tu=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(t){}const T1={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class nu{format(e){let n="";if(!Jh&&this.options.signDisplay!=null?n=d5(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!tu){var i;let{unit:r,unitDisplay:s="short",locale:o}=this.resolvedOptions();if(!r)return n;let a=(i=T1[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})),!tu&&this.options.style==="unit"&&(e=N($({},e),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),e}constructor(e,n={}){this.numberFormatter=c5(e,n),this.options=n}}function c5(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!tu){var i;let{unit:o,unitDisplay:a="short"}=e;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=T1[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 f5=new RegExp("^.*\\(.*\\).*$"),h5=["latn","arab","hanidec"];class C1{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 E1=new Map;function ep(t,e,n){let i=M1(t,e);if(!t.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of h5)if(r!==i.options.numberingSystem){let s=M1(t+(t.includes("-u-")?"-nu-":"-u-nu-")+r,e);if(s.isValidPartialNumber(n))return s}}return i}function M1(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 C1(this.locale,o).parse(new nu(this.locale,o).format(i))}return this.options.currencySign==="accounting"&&f5.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=iu(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=iu(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=iu(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=g5(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 D1=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),m5=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function g5(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=m5.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(_=>!D1.has(_.type)).map(_=>L1(_.value)),y=d.flatMap(_=>_.filter(A=>!D1.has(A.type)).map(A=>L1(A.value))),S=[...new Set([...m,...y])].sort((_,A)=>A.length-_.length),P=S.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${S.join("|")}|[\\p{White_Space}]`,"gu"),T=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),D=new Map(T.map((_,A)=>[_,A])),E=new RegExp(`[${T.join("")}]`,"g");return{minusSign:h,plusSign:g,decimal:b,group:p,literals:P,numeral:E,index:_=>String(D.get(_))}}function iu(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function L1(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tp(t={}){let{locale:e}=Yi();return x.useMemo(()=>new nu(e,t),[e,t])}const A1=7e3;let It=null;function v5(t,e="assertive",n=A1){It?It.announce(t,e,n):(It=new b5,(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 y5(t){It&&It.clear(t)}class b5{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=A1){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 x5(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(S5(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&&P5(c)===n.current){var d;r?r():(d=n.current)===null||d===void 0||d.focus(),f1("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 w5(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 S5(t){return{isInvalid:!t.validity.valid,validationDetails:w5(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function P5(t){for(let e=0;eO1(k5(o,r)),[o,r]);s!=null&&s.validationDetails.valid&&(s=null);let c=x.useContext(_5),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(()=>O1(g?[]:d),[g,d]),p=x.useRef(So),[m,y]=x.useState(So),S=x.useRef(So),P=()=>{if(!T)return;D(!1);let _=u||s||p.current;rp(_,S.current)||(S.current=_,y(_))},[T,D]=x.useState(!1);return x.useEffect(P),{realtimeValidation:l||b||u||s||So,displayValidation:a==="native"?l||b||m:l||b||u||s||m,updateValidation(_){a==="aria"&&!rp(m,_)?y(_):p.current=_},resetValidation(){let _=So;rp(_,S.current)||(S.current=_,y(_)),a==="native"&&D(!1),v(!0)},commitValidation(){a==="native"&&D(!0),v(!0)}}}function ip(t){return t?Array.isArray(t)?t:[t]:[]}function k5(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return ip(n)}return[]}function O1(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:F1}: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 T5(t){let{description:e,errorMessage:n,isInvalid:i,validationState:r}=t,{labelProps:s,fieldProps:o}=sp(t),a=Fx([!!e,!!n,i,r]),l=Fx([!!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 C5=0,E5=100,M5=1;function D5(t){const{isDisabled:e=!1,minValue:n=C5,maxValue:i=E5,numberFormatter:r,step:s=M5,orientation:o="horizontal"}=t;let a=x.useMemo(()=>{let F=(i-n)/10;return F=ct(F,0,F+s,s),Math.max(F,s)},[s,i,n]),l=x.useCallback(F=>F==null?void 0:F.map((B,Z)=>{let H=Z===0?n:B[Z-1],Q=Z===F.length-1?i:B[Z+1];return ct(B,H,Q,s)}),[n,i,s]),u=x.useMemo(()=>l(N1(t.value)),[t.value]),c=x.useMemo(()=>{var F;return l((F=N1(t.defaultValue))!==null&&F!==void 0?F:[n])},[t.defaultValue,n]),d=z1(t.value,t.defaultValue,t.onChange),f=z1(t.value,t.defaultValue,t.onChangeEnd);const[h,g]=go(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 T=F=>{S.current=F,g(F)},D=F=>{P.current=F,b(F)};function E(F){return(F-n)/(i-n)}function w(F){return F===0?n:h[F-1]}function _(F){return F===h.length-1?i:h[F+1]}function A(F){return p.current[F]}function k(F,B){p.current[F]=B}function V(F,B){if(e||!A(F))return;const Z=w(F),H=_(F);B=ct(B,Z,H,s);let Q=V1(S.current,F,B);T(Q)}function M(F,B){if(e||!A(F))return;B&&(S.current=h);const Z=P.current[F];P.current=V1(P.current,F,B),D(P.current),f&&Z&&!P.current.some(Boolean)&&f(S.current)}function O(F){return r.format(F)}function C(F,B){V(F,R(B))}function L(F){return Math.round((F-n)/s)*s+n}function R(F){const B=F*(i-n)+n;return Hr(L(B),n,i)}function z(F,B=1){let Z=Math.max(B,s);V(F,ct(h[F]+Z,n,i,s))}function K(F,B=1){let Z=Math.max(B,s);V(F,ct(h[F]-Z,n,i,s))}return{values:h,getThumbValue:F=>h[F],setThumbValue:V,setThumbPercent:C,isThumbDragging:F=>v[F],setThumbDragging:M,focusedThumb:m,setFocusedThumb:y,getThumbPercent:F=>E(h[F]),getValuePercent:E,getThumbValueLabel:F=>O(h[F]),getFormattedValue:O,getThumbMinValue:w,getThumbMaxValue:_,getPercentValue:R,isThumbEditable:A,setThumbEditable:k,incrementThumb:z,decrementThumb:K,step:s,pageSize:a,orientation:o,isDisabled:e}}function V1(t,e,n){return t[e]===n?t:[...t.slice(0,e),n,...t.slice(e+1)]}function N1(t){if(t!=null)return Array.isArray(t)?t:[t]}function z1(t,e,n){return i=>{typeof t=="number"||typeof e=="number"?n==null||n(i[0]):n==null||n(i)}}function L5(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=Hr(s,e,n)),isNaN(o)||(i!==void 0&&!isNaN(i)?o=ct(o,e,n,i):o=Hr(o,e,n));let[d,f]=go(s,isNaN(o)?NaN:o,a),[h,g]=x.useState(()=>isNaN(d)?"":new nu(l,r).format(d)),v=x.useMemo(()=>new C1(l,r),[l,r]),b=x.useMemo(()=>v.getNumberingSystem(h),[v,h]),p=x.useMemo(()=>new nu(l,N($({},r),{numberingSystem:b})),[l,r,b]),m=x.useMemo(()=>p.resolvedOptions(),[p]),y=x.useCallback(B=>isNaN(B)||B===null?"":p.format(B),[p]),S=I1(N($({},t),{value:d})),P=i!==void 0&&!isNaN(i)?i:1;m.style==="percent"&&(i===void 0||isNaN(i))&&(P=.01);let[T,D]=x.useState(d),[E,w]=x.useState(l),[_,A]=x.useState(r);(!Object.is(d,T)||l!==E||r!==_)&&(g(y(d)),D(d),w(l),A(r));let k=x.useMemo(()=>v.parse(h),[v,h]),V=()=>{if(!h.length){f(NaN),g(s===void 0?"":y(d));return}if(isNaN(k)){g(y(d));return}let B;i===void 0||isNaN(i)?B=Hr(k,e,n):B=ct(k,e,n,i),B=v.parse(y(B)),f(B),g(y(s===void 0?B:d))},M=(B,Z=0)=>{let H=k;if(isNaN(H)){let Q=isNaN(Z)?0:Z;return ct(Q,e,n,P)}else{let Q=ct(H,e,n,P);return B==="+"&&Q>H||B==="-"&&Q{let B=M("+",e);B===d&&g(y(B)),f(B),S.commitValidation()},C=()=>{let B=M("-",n);B===d&&g(y(B)),f(B),S.commitValidation()},L=()=>{n!=null&&(f(ct(n,e,n,P)),S.commitValidation())},R=()=>{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]),F=B=>v.isValidPartialNumber(B,e,n);return N($({},S),{validate:F,increment:O,incrementToMax:L,decrement:C,decrementToMin:R,canIncrement:z,canDecrement:K,minValue:e,maxValue:n,numberValue:k,setNumberValue:f,setInputValue:g,inputValue:h,commit:V})}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 B1={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 A5(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?$($({},B1),e):B1,[i]);return{visuallyHiddenProps:N($({},s),{style:o})}}function R5(t){let a=t,{children:e,elementType:n="div",isFocusable:i,style:r}=a,s=te(a,["children","elementType","isFocusable","style"]),{visuallyHiddenProps:o}=A5(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 F5(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}=Kr();const c=x.useRef(null),d=a==="rtl",f=x.useRef(null),{moveProps:h}=g1({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 T=s?m:p;if((s||d)&&(T=-T),f.current+=T,c.current!=null&&n.current){const D=Hr(f.current/P,0,1);e.setThumbPercent(c.current,D)}},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,T)=>!e.isThumbDragging(T))){let{height:P,width:T,top:D,left:E}=n.current.getBoundingClientRect(),w=s?P:T,V=((s?S:y)-(s?D:E))/w;(a==="rtl"||s)&&(V=1-V);let M=e.getPercentValue(V),O,C=e.values.findIndex(L=>M-L<0);if(C===0)O=C;else if(C===-1)O=e.values.length-1;else{let L=e.values[C-1],R=e.values[C];Math.abs(L-M)=0&&e.isThumbEditable(O)?(p.preventDefault(),c.current=O,e.setFocusedThumb(O),g.current=m,e.setThumbDragging(c.current,!0),e.setThumbValue(O,M),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(),f1("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 I5(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}=Kr(),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 T=f==="rtl",D=x.useRef(null),{keyboardProps:E}=m1({onKeyDown(C){let{getThumbMaxValue:L,getThumbMinValue:R,decrementThumb:z,incrementThumb:K,setThumbValue:F,setThumbDragging:B,pageSize:Z}=e;if(!/^(PageUp|PageDown|Home|End)$/.test(C.key)){C.continuePropagation();return}switch(C.preventDefault(),B(n,!0),C.key){case"PageUp":K(n,Z);break;case"PageDown":z(n,Z);break;case"Home":F(n,R(n));break;case"End":F(n,L(n));break}B(n,!1)}}),{moveProps:w}=g1({onMoveStart(){D.current=null,e.setThumbDragging(n,!0)},onMove({deltaX:C,deltaY:L,pointerType:R,shiftKey:z}){const{getThumbPercent:K,setThumbPercent:F,decrementThumb:B,incrementThumb:Z,step:H,pageSize:Q}=e;let{width:ie,height:nt}=o.current.getBoundingClientRect(),qo=d?nt:ie;if(D.current==null&&(D.current=K(n)*qo),R==="keyboard")C>0&&T||C<0&&!T||L>0?B(n,z?Q:H):Z(n,z?Q:H);else{let bi=d?L:C;(d||T)&&(bi=-bi),D.current+=bi,F(n,Hr(D.current/qo,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 A=x.useRef(void 0),k=C=>{S(),A.current=C,e.setThumbDragging(n,!0),h(window,"mouseup",V,!1),h(window,"touchend",V,!1),h(window,"pointerup",V,!1)},V=C=>{var L,R;((R=C.pointerId)!==null&&R!==void 0?R:(L=C.changedTouches)===null||L===void 0?void 0:L[0].identifier)===A.current&&(S(),e.setThumbDragging(n,!1),g(window,"mouseup",V,!1),g(window,"touchend",V,!1),g(window,"pointerup",V,!1))},M=e.getThumbPercent(n);(d||f==="rtl")&&(M=1-M);let O=c?{}:ae(E,w,{onMouseDown:C=>{C.button!==0||C.altKey||C.ctrlKey||C.metaKey||k()},onPointerDown:C=>{C.button!==0||C.altKey||C.ctrlKey||C.metaKey||k(C.pointerId)},onTouchStart:C=>{k(C.changedTouches[0].identifier)}});return Mh(a,y,C=>{e.setThumbValue(n,C)}),{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:C=>{e.setThumbValue(n,parseFloat(C.target.value))}}),thumbProps:N($({},O),{style:{position:"absolute",[d?"top":"left"]:`${M*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}}),labelProps:p,isDragging:e.isThumbDragging(n),isDisabled:c,isFocused:P}}function O5(t,e){let{inputElementType:n="input",isDisabled:i=!1,isRequired:r=!1,isReadOnly:s=!1,type:o="text",validationBehavior:a="aria"}=t,[l,u]=go(t.value,t.defaultValue||"",t.onChange),{focusableProps:c}=Qh(t,e),d=I1(N($({},t),{value:l})),{isInvalid:f,validationErrors:h,validationDetails:g}=d.displayValidation,{labelProps:v,fieldProps:b,descriptionProps:p,errorMessageProps:m}=T5(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),x5(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 j1(){return typeof window!="undefined"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function V5(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(!j1())return;let f=n.current;return f.addEventListener("beforeinput",i,!1),()=>{f.removeEventListener("beforeinput",i,!1)}},[n,i]);let r=j1()?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=O5(t,n),{labelProps:s,inputProps:o,descriptionProps:a,errorMessageProps:l}=d,u=te(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 K1={};K1={Empty:"فارغ"};var H1={};H1={Empty:"Изпразни"};var W1={};W1={Empty:"Prázdné"};var U1={};U1={Empty:"Tom"};var Y1={};Y1={Empty:"Leer"};var G1={};G1={Empty:"Άδειο"};var X1={};X1={Empty:"Empty"};var Q1={};Q1={Empty:"Vacío"};var q1={};q1={Empty:"Tühjenda"};var Z1={};Z1={Empty:"Tyhjä"};var J1={};J1={Empty:"Vide"};var ew={};ew={Empty:"ריק"};var tw={};tw={Empty:"Prazno"};var nw={};nw={Empty:"Üres"};var iw={};iw={Empty:"Vuoto"};var rw={};rw={Empty:"空"};var sw={};sw={Empty:"비어 있음"};var ow={};ow={Empty:"Tuščias"};var aw={};aw={Empty:"Tukšs"};var lw={};lw={Empty:"Tom"};var uw={};uw={Empty:"Leeg"};var cw={};cw={Empty:"Pusty"};var dw={};dw={Empty:"Vazio"};var fw={};fw={Empty:"Vazio"};var hw={};hw={Empty:"Gol"};var pw={};pw={Empty:"Не заполнено"};var mw={};mw={Empty:"Prázdne"};var gw={};gw={Empty:"Prazen"};var vw={};vw={Empty:"Prazno"};var yw={};yw={Empty:"Tomt"};var bw={};bw={Empty:"Boş"};var xw={};xw={Empty:"Пусто"};var ww={};ww={Empty:"空"};var Sw={};Sw={Empty:"空白"};var Pw={};Pw={"ar-AE":K1,"bg-BG":H1,"cs-CZ":W1,"da-DK":U1,"de-DE":Y1,"el-GR":G1,"en-US":X1,"es-ES":Q1,"et-EE":q1,"fi-FI":Z1,"fr-FR":J1,"he-IL":ew,"hr-HR":tw,"hu-HU":nw,"it-IT":iw,"ja-JP":rw,"ko-KR":sw,"lt-LT":ow,"lv-LV":aw,"nb-NO":lw,"nl-NL":uw,"pl-PL":cw,"pt-BR":dw,"pt-PT":fw,"ro-RO":hw,"ru-RU":pw,"sk-SK":mw,"sl-SI":gw,"sr-SP":vw,"sv-SE":yw,"tr-TR":bw,"uk-UA":xw,"zh-CN":ww,"zh-TW":Sw};function N5(t){return t&&t.__esModule?t.default:t}function z5(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=k1(N5(Pw),"@react-aria/spinbutton"),b=()=>clearTimeout(e.current);x.useEffect(()=>()=>b(),[]);let p=A=>{if(!(A.ctrlKey||A.metaKey||A.shiftKey||A.altKey||a))switch(A.key){case"PageUp":if(c){A.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(A.preventDefault(),u==null||u());break;case"PageDown":if(f){A.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(A.preventDefault(),d==null||d());break;case"Home":h&&(A.preventDefault(),h==null||h());break;case"End":g&&(A.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&&(y5("assertive"),v5(P,"assertive"))},[P]);const T=Ie(A=>{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)&&D(60)},A)});let E=A=>{A.preventDefault()},{addGlobalListener:w,removeAllGlobalListeners:_}=Kr();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:()=>{T(400),w(window,"contextmenu",E)},onPressEnd:()=>{b(),_()},onFocus:y,onBlur:S},decrementButtonProps:{onPressStart:()=>{D(400),w(window,"contextmenu",E)},onPressEnd:()=>{b(),_()},onFocus:y,onBlur:S}}}var _w={};_w={decrease:t=>`خفض ${t.fieldLabel}`,increase:t=>`زيادة ${t.fieldLabel}`,numberField:"حقل رقمي"};var $w={};$w={decrease:t=>`Намаляване ${t.fieldLabel}`,increase:t=>`Усилване ${t.fieldLabel}`,numberField:"Номер на полето"};var kw={};kw={decrease:t=>`Snížit ${t.fieldLabel}`,increase:t=>`Zvýšit ${t.fieldLabel}`,numberField:"Číselné pole"};var Tw={};Tw={decrease:t=>`Reducer ${t.fieldLabel}`,increase:t=>`Øg ${t.fieldLabel}`,numberField:"Talfelt"};var Cw={};Cw={decrease:t=>`${t.fieldLabel} verringern`,increase:t=>`${t.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var Ew={};Ew={decrease:t=>`Μείωση ${t.fieldLabel}`,increase:t=>`Αύξηση ${t.fieldLabel}`,numberField:"Πεδίο αριθμού"};var Mw={};Mw={decrease:t=>`Decrease ${t.fieldLabel}`,increase:t=>`Increase ${t.fieldLabel}`,numberField:"Number field"};var Dw={};Dw={decrease:t=>`Reducir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo de número"};var Lw={};Lw={decrease:t=>`Vähenda ${t.fieldLabel}`,increase:t=>`Suurenda ${t.fieldLabel}`,numberField:"Numbri väli"};var Aw={};Aw={decrease:t=>`Vähennä ${t.fieldLabel}`,increase:t=>`Lisää ${t.fieldLabel}`,numberField:"Numerokenttä"};var Rw={};Rw={decrease:t=>`Diminuer ${t.fieldLabel}`,increase:t=>`Augmenter ${t.fieldLabel}`,numberField:"Champ de nombre"};var Fw={};Fw={decrease:t=>`הקטן ${t.fieldLabel}`,increase:t=>`הגדל ${t.fieldLabel}`,numberField:"שדה מספר"};var Iw={};Iw={decrease:t=>`Smanji ${t.fieldLabel}`,increase:t=>`Povećaj ${t.fieldLabel}`,numberField:"Polje broja"};var Ow={};Ow={decrease:t=>`${t.fieldLabel} csökkentése`,increase:t=>`${t.fieldLabel} növelése`,numberField:"Számmező"};var Vw={};Vw={decrease:t=>`Riduci ${t.fieldLabel}`,increase:t=>`Aumenta ${t.fieldLabel}`,numberField:"Campo numero"};var Nw={};Nw={decrease:t=>`${t.fieldLabel}を縮小`,increase:t=>`${t.fieldLabel}を拡大`,numberField:"数値フィールド"};var zw={};zw={decrease:t=>`${t.fieldLabel} 감소`,increase:t=>`${t.fieldLabel} 증가`,numberField:"번호 필드"};var Bw={};Bw={decrease:t=>`Sumažinti ${t.fieldLabel}`,increase:t=>`Padidinti ${t.fieldLabel}`,numberField:"Numerio laukas"};var jw={};jw={decrease:t=>`Samazināšana ${t.fieldLabel}`,increase:t=>`Palielināšana ${t.fieldLabel}`,numberField:"Skaitļu lauks"};var Kw={};Kw={decrease:t=>`Reduser ${t.fieldLabel}`,increase:t=>`Øk ${t.fieldLabel}`,numberField:"Tallfelt"};var Hw={};Hw={decrease:t=>`${t.fieldLabel} verlagen`,increase:t=>`${t.fieldLabel} verhogen`,numberField:"Getalveld"};var Ww={};Ww={decrease:t=>`Zmniejsz ${t.fieldLabel}`,increase:t=>`Zwiększ ${t.fieldLabel}`,numberField:"Pole numeru"};var Uw={};Uw={decrease:t=>`Diminuir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo de número"};var Yw={};Yw={decrease:t=>`Diminuir ${t.fieldLabel}`,increase:t=>`Aumentar ${t.fieldLabel}`,numberField:"Campo numérico"};var Gw={};Gw={decrease:t=>`Scădere ${t.fieldLabel}`,increase:t=>`Creștere ${t.fieldLabel}`,numberField:"Câmp numeric"};var Xw={};Xw={decrease:t=>`Уменьшение ${t.fieldLabel}`,increase:t=>`Увеличение ${t.fieldLabel}`,numberField:"Числовое поле"};var Qw={};Qw={decrease:t=>`Znížiť ${t.fieldLabel}`,increase:t=>`Zvýšiť ${t.fieldLabel}`,numberField:"Číselné pole"};var qw={};qw={decrease:t=>`Upadati ${t.fieldLabel}`,increase:t=>`Povečajte ${t.fieldLabel}`,numberField:"Številčno polje"};var Zw={};Zw={decrease:t=>`Smanji ${t.fieldLabel}`,increase:t=>`Povećaj ${t.fieldLabel}`,numberField:"Polje broja"};var Jw={};Jw={decrease:t=>`Minska ${t.fieldLabel}`,increase:t=>`Öka ${t.fieldLabel}`,numberField:"Nummerfält"};var eS={};eS={decrease:t=>`${t.fieldLabel} azalt`,increase:t=>`${t.fieldLabel} arttır`,numberField:"Sayı alanı"};var tS={};tS={decrease:t=>`Зменшити ${t.fieldLabel}`,increase:t=>`Збільшити ${t.fieldLabel}`,numberField:"Поле номера"};var nS={};nS={decrease:t=>`降低 ${t.fieldLabel}`,increase:t=>`提高 ${t.fieldLabel}`,numberField:"数字字段"};var iS={};iS={decrease:t=>`縮小 ${t.fieldLabel}`,increase:t=>`放大 ${t.fieldLabel}`,numberField:"數字欄位"};var rS={};rS={"ar-AE":_w,"bg-BG":$w,"cs-CZ":kw,"da-DK":Tw,"de-DE":Cw,"el-GR":Ew,"en-US":Mw,"es-ES":Dw,"et-EE":Lw,"fi-FI":Aw,"fr-FR":Rw,"he-IL":Fw,"hr-HR":Iw,"hu-HU":Ow,"it-IT":Vw,"ja-JP":Nw,"ko-KR":zw,"lt-LT":Bw,"lv-LV":jw,"nb-NO":Kw,"nl-NL":Hw,"pl-PL":Ww,"pt-BR":Uw,"pt-PT":Yw,"ro-RO":Gw,"ru-RU":Xw,"sk-SK":Qw,"sl-SI":qw,"sr-SP":Zw,"sv-SE":Jw,"tr-TR":eS,"uk-UA":tS,"zh-CN":nS,"zh-TW":iS};function B5(t){return t&&t.__esModule?t.default:t}function j5(t,e,n){let X_=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}=X_,T=te(X_,["id","decrementAriaLabel","incrementAriaLabel","isDisabled","isReadOnly","isRequired","minValue","maxValue","autoFocus","label","formatOptions","onBlur","onFocus","onFocusChange","onKeyDown","onKeyUp","description","errorMessage","isWheelDisabled"]),{increment:D,incrementToMax:E,decrement:w,decrementToMin:_,numberValue:A,inputValue:k,commit:V,commitValidation:M}=e;const O=k1(B5(rS),"@react-aria/numberfield");let C=li(i),{focusProps:L}=zh({onBlur(){V()}}),R=tp(h),z=x.useMemo(()=>R.resolvedOptions(),[R]),K=tp(N($({},h),{currencySign:void 0})),F=x.useMemo(()=>isNaN(A)?"":K.format(A),[K,A]),{spinButtonProps:B,incrementButtonProps:Z,decrementButtonProps:H}=z5({isDisabled:o,isReadOnly:a,isRequired:l,maxValue:c,minValue:u,onIncrement:D,onIncrementToMax:E,onDecrement:w,onDecrementToMin:_,value:A,textValue:F}),[Q,ie]=x.useState(!1),{focusWithinProps:nt}=Wh({isDisabled:o,onFocusWithinChange:ie}),qo=x.useCallback($t=>{Math.abs($t.deltaY)<=Math.abs($t.deltaX)||($t.deltaY>0?D():$t.deltaY<0&&w())},[w,D]);z4({onScroll:qo,isDisabled:P||o||a||!Q},n);var ls;let Zo=((ls=z.maximumFractionDigits)!==null&&ls!==void 0?ls:0)>0,lm=e.minValue===void 0||isNaN(e.minValue)||e.minValue<0,ir="numeric";Ox()?lm?ir="text":Zo&&(ir="decimal"):_h()&&(lm?ir="numeric":Zo&&(ir="decimal"));let Jo=$t=>{e.validate($t)&&e.setInputValue($t)},ju=Gt(t),ea=x.useCallback($t=>{$t.key==="Enter"?(V(),M()):$t.continuePropagation()},[V,M]),{isInvalid:us,validationErrors:Ku,validationDetails:ZF}=e.displayValidation,{labelProps:H_,inputProps:JF,descriptionProps:e8,errorMessageProps:t8}=V5(N($($({},T),ju),{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:C,type:"text",inputMode:ir,onChange:Jo,onBlur:g,onFocus:v,onFocusChange:b,onKeyDown:x.useMemo(()=>Sh(ea,p),[ea,p]),onKeyUp:m,description:y,errorMessage:S}),e,n);Mh(n,e.numberValue,e.setNumberValue);let W_=ae(B,L,JF,{role:null,"aria-roledescription":jl()?null:O.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});t.validationBehavior==="native"&&(W_["aria-required"]=void 0);let U_=$t=>{var cm;document.activeElement!==n.current&&($t.pointerType==="mouse"?(cm=n.current)===null||cm===void 0||cm.focus():$t.target.focus())},um=t["aria-label"]||(typeof t.label=="string"?t.label:""),rr;um||(rr=t.label!=null?H_.id:t["aria-labelledby"]);let Y_=li(),G_=li(),n8=ae(Z,{"aria-label":s||O.format("increase",{fieldLabel:um}).trim(),id:rr&&!s?Y_:null,"aria-labelledby":rr&&!s?`${Y_} ${rr}`:null,"aria-controls":C,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!e.canIncrement,onPressStart:U_}),i8=ae(H,{"aria-label":r||O.format("decrease",{fieldLabel:um}).trim(),id:rr&&!r?G_:null,"aria-labelledby":rr&&!r?`${G_} ${rr}`:null,"aria-controls":C,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!e.canDecrement,onPressStart:U_});return{groupProps:N($({},nt),{role:"group","aria-disabled":o,"aria-invalid":us?"true":void 0}),labelProps:H_,inputProps:W_,incrementButtonProps:n8,decrementButtonProps:i8,errorMessageProps:t8,descriptionProps:e8,isInvalid:us,validationErrors:Ku,validationDetails:ZF}}function up(t){return ND()?t.altKey:t.ctrlKey}function Qr(t){return ji()?t.metaKey:t.ctrlKey}const K5=1e3;function H5(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:i}=t,r=x.useRef({search:"",timeout:null}).current,s=o=>{let a=W5(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=""},K5)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:null}}}function W5(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function U5(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=Kl(),p=_=>{if(_.altKey&&_.key==="Tab"&&_.preventDefault(),!i.current.contains(_.target))return;const A=(H,Q)=>{if(H!=null){if(e.isLink(H)&&g==="selection"&&l&&!up(_)){gl.flushSync(()=>{e.setFocusedKey(H,Q)});let ie=h.current.querySelector(`[data-key="${CSS.escape(H.toString())}"]`),nt=e.getItemProps(H);b.open(ie,_,nt.href,nt.routerOptions);return}if(e.setFocusedKey(H,Q),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,V,M;let H=e.focusedKey!=null?(k=n.getKeyBelow)===null||k===void 0?void 0:k.call(n,e.focusedKey):(V=n.getFirstKey)===null||V===void 0?void 0:V.call(n);H==null&&s&&(H=(M=n.getFirstKey)===null||M===void 0?void 0:M.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),A(H))}break;case"ArrowUp":if(n.getKeyAbove){var O,C,L;let H=e.focusedKey!=null?(O=n.getKeyAbove)===null||O===void 0?void 0:O.call(n,e.focusedKey):(C=n.getLastKey)===null||C===void 0?void 0:C.call(n);H==null&&s&&(H=(L=n.getLastKey)===null||L===void 0?void 0:L.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),A(H))}break;case"ArrowLeft":if(n.getKeyLeftOf){var R,z,K;let H=(R=n.getKeyLeftOf)===null||R===void 0?void 0:R.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(),A(H,v==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var F,B,Z;let H=(F=n.getKeyRightOf)===null||F===void 0?void 0:F.call(n,e.focusedKey);H==null&&s&&(H=v==="rtl"?(B=n.getLastKey)===null||B===void 0?void 0:B.call(n,e.focusedKey):(Z=n.getFirstKey)===null||Z===void 0?void 0:Z.call(n,e.focusedKey)),H!=null&&(_.preventDefault(),A(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(),A(H))}break;case"PageUp":if(n.getKeyPageAbove){let H=n.getKeyPageAbove(e.focusedKey);H!=null&&(_.preventDefault(),A(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=b1(i.current,{tabbable:!0}),Q,ie;do ie=H.lastChild(),ie&&(Q=ie);while(ie);Q&&!Q.contains(document.activeElement)&&sn(Q)}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 V=O=>{O!=null&&(e.setFocusedKey(O),l&&e.replaceSelection(O))},M=_.relatedTarget;var A,k;M&&_.currentTarget.compareDocumentPosition(M)&Node.DOCUMENT_POSITION_FOLLOWING?V((A=e.lastSelectedKey)!==null&&A!==void 0?A:n.getLastKey()):V((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 V=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);V&&(V.contains(document.activeElement)||sn(V),Hh()==="keyboard"&&Wx(V,{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 A=e.selectedKeys;if(A.size){for(let k of A)if(e.canSelectItem(k)){_=k;break}}e.setFocused(!0),e.setFocusedKey(_),_==null&&!c&&Jl(i.current)}},[]);let T=x.useRef(e.focusedKey);x.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==T.current||P.current)&&(h!=null&&h.current)){let _=Hh(),A=i.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!A)return;(_==="keyboard"||P.current)&&(Kx(h.current,A),_!=="virtual"&&Wx(A,{containingElement:i.current}))}!c&&e.isFocused&&e.focusedKey==null&&T.current!=null&&Jl(i.current),T.current=e.focusedKey,P.current=!1}),Ch(i,"react-aria-focus-scope-restore",_=>{_.preventDefault(),e.setFocused(!0)});let D={onKeyDown:p,onFocus:y,onBlur:S,onMouseDown(_){h.current===_.target&&_.preventDefault()}},{typeSelectProps:E}=H5({keyboardDelegate:n,selectionManager:e});u||(D=ae(E,D));let w;return c||(w=e.focusedKey==null?0:-1),{collectionProps:N($({},D),{tabIndex:w})}}function Y5(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=Kl(),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 R=e.getItemProps(n);d.open(i.current,L,R.href,R.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&&Jl(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),T=S&&b,D=x.useRef(!1),E=x.useRef(!1),w=L=>{if(l&&l(),v){let R=e.getItemProps(n);d.open(i.current,L,R.href,R.routerOptions)}},_={};r?(_.onPressStart=L=>{P.current=L.pointerType,D.current=T,L.pointerType==="keyboard"&&(!S||oS())&&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"&&!sS())return;w(L)}else L.pointerType!=="keyboard"&&b&&f(L)}):(_.onPressStart=L=>{P.current=L.pointerType,D.current=T,E.current=m,b&&(L.pointerType==="mouse"&&!m||L.pointerType==="keyboard"&&(!p||oS()))&&f(L)},_.onPress=L=>{(L.pointerType==="touch"||L.pointerType==="pen"||L.pointerType==="virtual"||L.pointerType==="keyboard"&&S&&sS()||L.pointerType==="mouse"&&E.current)&&(S?w(L):b&&f(L))}),h["data-key"]=n,_.preventFocusOnPress=s;let{pressProps:A,isPressed:k}=Ih(_),V=y?L=>{P.current==="mouse"&&(L.stopPropagation(),L.preventDefault(),w(L))}:void 0,{longPressProps:M}=j4({isDisabled:!T,onLongPress(L){L.pointerType==="touch"&&(f(L),e.setSelectionBehavior("toggle"))}}),O=L=>{P.current==="touch"&&D.current&&L.preventDefault()},C=e.isLink(n)?L=>{Ki.isOpening||L.preventDefault()}:void 0;return{itemProps:ae(h,b||m?A:{},T?M:{},{onDoubleClick:V,onDragStartCapture:O,onClick:C}),isPressed:k,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:a,allowsSelection:b,hasAction:S}}function sS(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function oS(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class G5{build(e,n){return this.context=n,aS(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:i}=e;if(W.isValidElement(n)&&n.type===W.Fragment)yield*cs(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*cs(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*cs(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:X5(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:aS(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 aS(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 X5(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 Q5(t,e,n){let i=x.useMemo(()=>new G5,[]),{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 q5(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Z5(t){return J5(t)}function J5(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=[...lS(t,e),e],r=[...lS(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 lS(t,e){let n=[];for(;(e==null?void 0:e.parentKey)!=null;)e=t.getItem(e.parentKey),n.unshift(e);return n}const uS=new WeakMap;function ru(t,e,n){return t?(typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${uS.get(t)}-${n}-${e}`):""}function e3(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}=Y5({selectionManager:o,key:i,ref:n,isDisabled:u,shouldSelectOnPressUp:s,linkBehavior:"selection"}),f=ru(e,i,"tab"),h=ru(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=Nx(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 t3(t,e,n){let i=X4(n)?void 0:0;var r;const s=ru(e,(r=t.id)!==null&&r!==void 0?r:e==null?void 0:e.selectedKey,"tabpanel"),o=kh(N($({},t),{id:s,"aria-labelledby":ru(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 n3{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 i3(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 n3(s,l,i,a),[s,a,i,l]),{collectionProps:c}=U5({ref:n,selectionManager:o,keyboardDelegate:u,selectOnFocus:r==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),d=li();uS.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 r3=x.createContext(null);function s3(t,e){[t,e]=on(t,e,r3);let n=t.href&&!t.isDisabled?"a":"span",{linkProps:i,isPressed:r}=Q4(N($({},t),{elementType:n}),e),{hoverProps:s,isHovered:o}=Gr(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 o3=x.forwardRef(s3),su=x.createContext({});function a3(t,e){[t,e]=on(t,e,su);let r=t,{elementType:n="label"}=r,i=te(r,["elementType"]);return W.createElement(n,N($({className:"react-aria-Label"},i),{ref:e}))}const cS=wh(a3),l3=x.createContext({}),dS=x.createContext({});function u3(t,e){[t,e]=on(t,e,dS);let r=t,{elementType:n="span"}=r,i=te(r,["elementType"]);return W.createElement(n,N($({className:"react-aria-Text"},i),{ref:e}))}const c3=x.forwardRef(u3);class fS{*[Symbol.iterator](){yield*cs(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 d3(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function f3(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(()=>hS(t.selectedKeys),[t.selectedKeys]),f=x.useMemo(()=>hS(t.defaultSelectedKeys,new Xt),[t.defaultSelectedKeys]),[h,g]=go(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||!d3(y,h))&&g(y)},disabledKeys:v,disabledBehavior:s}}function hS(t,e){return t?t==="all"?"all":new Xt(t):e}class h3{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(Z5(q5(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 p3(t){let{filter:e,layoutDelegate:n}=t,i=f3(t),r=x.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=x.useCallback(c=>e?new fS(e(c)):new fS(c),[e]),o=x.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=Q5(t,s,o),l=x.useMemo(()=>new h3(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),T=null,D=!1;for(;P>=0;){if(!l.isDisabled(y[P].key)){T=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(T?T.key:null)}u.current=a},[a,l,i,i.focusedKey]),{collection:a,disabledKeys:r,selectionManager:l}}function m3(t){var e;let[n,i]=go(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}=p3(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 g3(t){var e;let n=m3(N($({},t),{suppressTextValueWarning:!0,defaultSelectedKey:(e=t.defaultSelectedKey)!==null&&e!==void 0?e:pS(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=pS(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 pS(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 v3(t,e){let n=x.useContext(fp);return n!=null&&n.isInvalid?W.createElement(b3,N($({},t),{ref:e})):null}const y3=x.forwardRef(v3),b3=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(c3,N($($({slot:"errorMessage"},i),r),{ref:e}))}),x3=x.createContext(null),mS=x.createContext({});let w3=t=>{let s=t,{onHoverStart:e,onHoverChange:n,onHoverEnd:i}=s;return te(s,["onHoverStart","onHoverChange","onHoverEnd"])};function S3(t,e){[t,e]=on(t,e,mS);let{hoverProps:n,isHovered:i}=Gr(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(w3(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 P3=wh(S3),_3=x.createContext(null),ou=x.createContext(null),hp=x.createContext(null),gS=x.createContext(null);function $3(t,e){[t,e]=on(t,e,_3);let n=x.useRef(null),i=tp(t.formatOptions),r=D5(N($({},t),{numberFormatter:i})),[s,o]=Ah(),{groupProps:a,trackProps:l,labelProps:u,outputProps:c}=F5(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(yo,{values:[[ou,r],[hp,N($({},l),{ref:n})],[gS,c],[su,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 k3=x.forwardRef($3);function T3(t,e){[t,e]=on(t,e,gS);let l=t,{children:n,style:i,className:r}=l,s=te(l,["children","style","className"]),o=x.useContext(ou),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 C3=x.forwardRef(T3);function E3(t,e){[t,e]=on(t,e,hp);let n=x.useContext(ou),c=t,{onHoverStart:i,onHoverEnd:r,onHoverChange:s}=c,o=te(c,["onHoverStart","onHoverEnd","onHoverChange"]),{hoverProps:a,isHovered:l}=Gr({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 M3=x.forwardRef(E3);function D3(t,e){let{inputRef:n=null}=t,i=x.useContext(ou),{ref:r}=Ul(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}=I5(N($({},t),{index:s,trackRef:r,inputRef:a,label:u}),i),{focusProps:b,isFocusVisible:p}=Ui(),{hoverProps:m,isHovered:y}=Gr(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(R5,null,W.createElement("input",$({ref:a},ae(d,b)))),W.createElement(yo,{values:[[su,N($({},f),{ref:l})]]},S.children))}const L3=x.forwardRef(D3),vS=x.createContext({});function A3(t,e){[t,e]=on(t,e,vS);let b=t,{isDisabled:n,isInvalid:i,onHoverStart:r,onHoverChange:s,onHoverEnd:o}=b,a=te(b,["isDisabled","isInvalid","onHoverStart","onHoverChange","onHoverEnd"]),{hoverProps:l,isHovered:u}=Gr({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 R3=x.forwardRef(A3),F3=x.createContext(null),I3=x.createContext(null);function O3(t,e){[t,e]=on(t,e,F3);let{validationBehavior:n}=Ul(x3)||{};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=L5(N($({},t),{locale:o,validationBehavior:s})),l=x.useRef(null),[u,c]=Ah(),P=j5(N($({},w4(t)),{label:c,validationBehavior:s}),a,l),{labelProps:d,groupProps:f,inputProps:h,incrementButtonProps:g,decrementButtonProps:v,descriptionProps:b,errorMessageProps:p}=P,m=te(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(yo,{values:[[I3,a],[vS,f],[mS,N($({},h),{ref:l})],[su,N($({},d),{ref:u})],[l3,{slots:{increment:g,decrement:v}}],[dS,{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 V3=x.forwardRef(O3),au=x.createContext(null),qr=x.createContext(null);function N3(t,e){[t,e]=on(t,e,au);let{children:n,orientation:i="horizontal"}=t;return n=x.useMemo(()=>typeof n=="function"?n({orientation:i,defaultChildren:null}):n,[n,i]),W.createElement(l4,{content:n},r=>W.createElement(z3,{props:t,collection:r,tabsRef:e}))}function z3({props:t,tabsRef:e,collection:n}){let{orientation:i="horizontal"}=t,r=g3(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(yo,{values:[[au,t],[qr,r]]},u.children))}const B3=x.forwardRef(N3);function j3(t,e){return x.useContext(qr)?W.createElement(K3,{props:t,forwardedRef:e}):W.createElement(g4,t)}function K3({props:t,forwardedRef:e}){let n=x.useContext(qr),{CollectionRoot:i}=x.useContext(b4),{orientation:r="horizontal",keyboardActivation:s="automatic"}=Ul(au),o=Hl(e),{tabListProps:a}=i3(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:x4(n.selectionManager.focusedKey)}))}const H3=x.forwardRef(j3),W3=p4("item",(t,e,n)=>{let i=x.useContext(qr),r=Hl(e),{tabProps:s,isSelected:o,isDisabled:a,isPressed:l}=e3($({key:n.key},t),i,r),{focusProps:u,isFocused:c,isFocusVisible:d}=Ui(),{hoverProps:f,isHovered:h}=Gr({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 U3(t,e){const n=x.useContext(qr);let i=Hl(e),{tabPanelProps:r}=t3(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(yo,{values:[[au,null],[qr,null]]},u.children))}const Y3=wh(U3);function pp(s){var o=s,{label:t,description:e,errorMessage:n,info:i}=o,r=te(o,["label","description","errorMessage","info"]);return I.jsx(V3,N($({},r),{children:I.jsxs("div",{className:"flex flex-col gap-2",children:[I.jsx(cS,{className:"font-sans text-sm font-bold leading-tight text-neutral-700",children:t}),I.jsx(R3,{children:I.jsx(P3,{id:t,className:"w-full rounded border border-[#747474] p-2 text-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})}),I.jsx(y3,{className:"font-sans text-sm leading-tight text-red-600",children:n})]})}))}function G3({label:t,info:e,value:n,onChange:i,maxValue:r,prefix:s,suffix:o,step:a}){return I.jsx("div",{className:"flex justify-center",children:I.jsxs(k3,{value:n,onChange:l=>i(l),className:"w-full",maxValue:r!=null?r:100,step:a!=null?a:1,children:[I.jsx("div",{className:"flex font-sans text-sm font-bold leading-tight text-neutral-700",children:I.jsx(cS,{className:"flex-1",children:t})}),I.jsxs("div",{className:"mt-6 flex gap-4",children:[I.jsx(M3,{className:"relative flex h-7 w-full",children:({state:l})=>I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"slider-track absolute top-[50%] h-1 w-full translate-y-[-50%] rounded-full bg-[#929292]"}),I.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:I.jsx(C3,{})}),I.jsx("div",{className:"absolute top-[50%] h-1 translate-y-[-50%] rounded-full bg-[#5867E8]",style:{width:l.getThumbPercent(0)*100+"%"}}),I.jsx(L3,{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"})]})}),I.jsx("div",{className:"font-sans text-lg font-normal leading-7 tracking-tight text-neutral-900",children:"%"})]})]})})}function X3({children:t}){return I.jsx("div",{className:"flex w-full justify-center border-b",children:I.jsx(B3,{className:"w-full",children:t})})}function Q3({children:t}){return I.jsx("div",{className:"flex justify-start border-b",children:I.jsx(H3,{"aria-label":"Results",className:"flex space-x-1",children:t})})}function yS(t){return I.jsx(W3,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 bS(t){return I.jsx(Y3,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 Po(t){return t+.5|0}const ci=(t,e,n)=>Math.max(Math.min(t,n),e);function _o(t){return ci(Po(t*2.55),0,255)}function di(t){return ci(Po(t*255),0,255)}function En(t){return ci(Po(t/2.55)/100,0,1)}function xS(t){return ci(Po(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"],q3=t=>mp[t&15],Z3=t=>mp[(t&240)>>4]+mp[t&15],lu=t=>(t&240)>>4===(t&15),J3=t=>lu(t.r)&&lu(t.g)&&lu(t.b)&&lu(t.a);function eL(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 tL=(t,e)=>t<255?e(t):"";function nL(t){var e=J3(t)?q3:Z3;return t?"#"+e(t.r)+e(t.g)+e(t.b)+tL(t.a,e):void 0}const iL=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function wS(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 rL(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 sL(t,e,n){const i=wS(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 oL(t,e,n,i,r){return t===r?(e-n)/i+(e.5?c/(2-s-o):c/(s+o),l=oL(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(wS,t,e,n)}function aL(t,e,n){return vp(sL,t,e,n)}function lL(t,e,n){return vp(rL,t,e,n)}function SS(t){return(t%360+360)%360}function uL(t){const e=iL.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?_o(+e[5]):di(+e[5]));const r=SS(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=aL(r,s,o):e[1]==="hsv"?i=lL(r,s,o):i=yp(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function cL(t,e){var n=gp(t);n[0]=SS(n[0]+e),n=yp(n),t.r=n[0],t.g=n[1],t.b=n[2]}function dL(t){if(!t)return;const e=gp(t),n=e[0],i=xS(e[1]),r=xS(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${En(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const PS={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"},_S={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 fL(){const t={},e=Object.keys(_S),n=Object.keys(PS);let i,r,s,o,a;for(i=0;i>16&255,s>>8&255,s&255]}return t}let uu;function hL(t){uu||(uu=fL(),uu.transparent=[0,0,0,0]);const e=uu[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const pL=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function mL(t){const e=pL.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 gL(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,Zr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function vL(t,e,n){const i=Zr(En(t.r)),r=Zr(En(t.g)),s=Zr(En(t.b));return{r:di(bp(i+n*(Zr(En(e.r))-i))),g:di(bp(r+n*(Zr(En(e.g))-r))),b:di(bp(s+n*(Zr(En(e.b))-s))),a:t.a+n*(e.a-t.a)}}function cu(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 $S(t,e){return t&&Object.assign(e||{},t)}function kS(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=$S(t,{r:0,g:0,b:0,a:1}),e.a=di(e.a)),e}function yL(t){return t.charAt(0)==="r"?mL(t):uL(t)}class $o{constructor(e){if(e instanceof $o)return e;const n=typeof e;let i;n==="object"?i=kS(e):n==="string"&&(i=eL(e)||hL(e)||yL(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=$S(this._rgb);return e&&(e.a=En(e.a)),e}set rgb(e){this._rgb=kS(e)}rgbString(){return this._valid?gL(this._rgb):void 0}hexString(){return this._valid?nL(this._rgb):void 0}hslString(){return this._valid?dL(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=vL(this._rgb,e._rgb,n)),this}clone(){return new $o(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=Po(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 cu(this._rgb,2,e),this}darken(e){return cu(this._rgb,2,-e),this}saturate(e){return cu(this._rgb,1,e),this}desaturate(e){return cu(this._rgb,1,-e),this}rotate(e){return cL(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 bL=(()=>{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 xL=(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 PL(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 _L(t){const e=PL(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function Jr(t,e){return(CS[e]||(CS[e]=_L(e)))(t)}function xp(t){return t.charAt(0).toUpperCase()+t.slice(1)}const To=t=>typeof t!="undefined",fi=t=>typeof t=="function",ES=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function $L(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Oe=Math.PI,tt=2*Oe,hu=Number.POSITIVE_INFINITY,kL=Oe/180,je=Oe/2,Gi=Oe/4,MS=Oe*2/3,wp=Math.log10,hi=Math.sign;function pu(t,e,n){return Math.abs(t-e)r-s).pop(),e}function mu(t){return!isNaN(parseFloat(t))&&isFinite(t)}function CL(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function EL(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 RL(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 IS(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)&&(FS.forEach(s=>{delete t[s]}),delete t._chartjs)}function OS(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const VS=function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame}();function NS(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,VS.call(window,()=>{i=!1,t.apply(e,n)}))}}function IL(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,OL=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e,gu=t=>t===0||t===1,zS=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*tt/n)),BS=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*tt/n)+1,Co={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*je)+1,easeOutSine:t=>Math.sin(t*je),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=>gu(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=>gu(t)?t:zS(t,.075,.3),easeOutElastic:t=>gu(t)?t:BS(t,.075,.3),easeInOutElastic(t){return gu(t)?t:t<.5?.5*zS(t*2,.1125,.45):.5+.5*BS(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-Co.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?Co.easeInBounce(t*2)*.5:Co.easeOutBounce(t*2-1)*.5+.5};function jS(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function KS(t){return jS(t)?t:new $o(t)}function $p(t){return jS(t)?t:new $o(t).saturate(.5).darken(.1).hexString()}const VL=["x","y","borderWidth","radius","tension"],NL=["color","borderColor","backgroundColor"];function zL(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:NL},numbers:{type:"number",properties:VL}}),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 BL(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const HS=new Map;function jL(t,e){e=e||{};const n=t+JSON.stringify(e);let i=HS.get(n);return i||(i=new Intl.NumberFormat(t,e),HS.set(n,i)),i}function WS(t,e,n){return jL(e,n).format(t)}const US={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=KL(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),WS(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?US.numeric.call(this,t,e,n):""}};function KL(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 YS={formatters:US};function HL(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:YS.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 Eo(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 Eo(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=Eo(this,e),o=Eo(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 WL({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zL,BL,HL]);function UL(t){return!t||ue(t.size)||ue(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function GS(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 XS(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){QS(t,e,n,i,null)}function QS(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)*kL;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,tt):t.arc(n,i,v,0,tt),t.closePath();break;case"triangle":c=r?r/2:v,t.moveTo(n+Math.sin(b)*c,i-Math.cos(b)*v),b+=MS,t.lineTo(n+Math.sin(b)*c,i-Math.cos(b)*v),b+=MS,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-je),t.arc(n+f,i-o,u,b-je,b),t.arc(n+d,i+a,u,b,b+je),t.arc(n-f,i+o,u,b+je,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,YL(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]=JL(s(o));return n}function qS(t){return Lp(t,{top:"y",right:"x",bottom:"y",left:"x"})}function es(t){return Lp(t,["topLeft","topRight","bottomLeft","bottomRight"])}function _t(t){const e=qS(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(qL)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:le(t.family,e.family),lineHeight:ZL(le(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:le(t.weight,e.weight),string:""};return r.string=UL(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 ts(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=nP("_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 JS(a,l,()=>lA(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return iP(a).includes(l)},ownKeys(a){return iP(a)},set(a,l,u){const c=a._storage||(a._storage=r());return a[l]=c[l]=u,delete a._keys,!0}})}function ns(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:ZS(t,i),setContext:s=>ns(t,s,n,i),override:s=>ns(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 JS(s,o,()=>nA(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 ZS(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 tA=(t,e)=>t?t+xp(e):e,Rp=(t,e)=>oe(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function JS(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function nA(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];return fi(a)&&o.isScriptable(e)&&(a=iA(e,a,t,n)),Ee(a)&&a.length&&(a=rA(e,a,t,o.isIndexable)),Rp(e,a)&&(a=ns(a,r,s&&s[e],o)),a}function iA(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 rA(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(ns(d,s,o&&o[t],a))}}return e}function eP(t,e,n){return fi(t)?t(e,n):t}const sA=(t,e)=>t===!0?e:typeof t=="string"?Jr(e,t):void 0;function oA(t,e,n,i,r){for(const s of e){const o=sA(n,s);if(o){t.add(o);const a=eP(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=eP(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=tP(a,o,n,s||n,i);return l===null||typeof s!="undefined"&&s!==n&&(l=tP(a,o,s,l,i),l===null)?!1:Ap(Array.from(a),[""],r,s,()=>aA(e,n,i))}function tP(t,e,n,i,r){for(;n;)n=oA(t,e,n,i,r);return n}function aA(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Ee(r)&&oe(n)?n:r||{}}function lA(t,e,n,i){let r;for(const s of e)if(r=nP(tA(s,t),n),typeof r!="undefined")return Rp(t,r)?Fp(n,i,t,r):r}function nP(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i!="undefined")return i}}function iP(t){let e=t._keys;return e||(e=t._keys=uA(t._scopes)),e}function uA(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 yu(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 bu=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function cA(t,e){return bu(t).getPropertyValue(e)}const dA=["top","right","bottom","left"];function er(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=dA[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const fA=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function hA(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o=!1,a,l;if(fA(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=bu(n),s=r.boxSizing==="border-box",o=er(r,"padding"),a=er(r,"border","width"),{x:l,y:u,box:c}=hA(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 pA(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=bu(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=yu(a.maxWidth,s,"clientWidth"),r=yu(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:i||hu,maxHeight:r||hu}}const xu=t=>Math.round(t*10)/10;function mA(t,e,n,i){const r=bu(t),s=er(r,"margin"),o=yu(r.maxWidth,t,"clientWidth")||hu,a=yu(r.maxHeight,t,"clientHeight")||hu,l=pA(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=xu(Math.min(u,o,l.maxWidth)),c=xu(Math.min(c,a,l.maxHeight)),u&&!c&&(c=xu(u/2)),(e!==void 0||n!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,u=xu(Math.floor(c*i))),{width:u,height:c}}function rP(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 gA=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 sP(t,e){const n=cA(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}const vA=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}}},yA=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function is(t,e,n){return t?vA(e,n):yA()}function oP(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 aP(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 bA{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=VS.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 bA;const lP="transparent",xA={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=KS(t||lP),r=i.valid&&KS(e||lP);return r&&r.valid?r.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class wA{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||xA[e.type||typeof o],this._easing=Co[e.easing]||Co.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=PA(e,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&SA(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 wA(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 SA(t,e){const n=[],i=Object.keys(e);for(let r=0;r0||!n&&s<0)return r.index}return null}function pP(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=TA(s,o,i),d=e.length;let f;for(let h=0;hn[i].axis===e).shift()}function MA(t,e){return ts(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function DA(t,e,n){return ts(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Do(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",mP=(t,e)=>e?t:Object.assign({},t),LA=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:dP(n,!0),values:null};class Lo{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&&Do(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&&IS(this._data,this),e._stacked&&Do(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(oe(n)){const r=this._cachedMeta;this._data=kA(n,r)}else if(i!==n){if(i){IS(i,this);const r=this._cachedMeta;Do(r),r._parsed=[]}n&&Object.isExtensible(n)&&FL(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,Do(n),n.stack=i.stack),this._resyncElements(e),(r||s!==n._stacked)&&(pP(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(mP(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 uP(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 RA(t){const e=t.iScale,n=AA(e,t.type);let i=e._length,r,s,o,a;const l=()=>{o===32767||o===-32768||(To(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 gP(t,e,n,i){return Ee(t)?OA(t,e,n,i):e[n.axis]=n.parse(t,i),e}function vP(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 NA(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 GA={evaluateInteractionItems:Ao,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 SP(t,e){return t.filter(n=>wP.indexOf(n.pos)===-1&&n.box.axis===e)}function Fo(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 XA(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;nu.box.fullSize),!0),i=Fo(Ro(e,"left"),!0),r=Fo(Ro(e,"right")),s=Fo(Ro(e,"top"),!0),o=Fo(Ro(e,"bottom")),a=SP(e,"x"),l=SP(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:Ro(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function PP(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function _P(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 JA(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&&_P(o,s.getPadding());const a=Math.max(0,e.outerWidth-PP(o,t,"left","right")),l=Math.max(0,e.outerHeight-PP(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 e6(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 t6(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 Io(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);_P(f,_t(i));const h=Object.assign({maxPadding:f,w:s,h:o,x:r.left,y:r.top},r),g=qA(l.concat(u),d);Io(a.fullSize,h,d,g),Io(l,h,d,g),Io(u,h,d,g)&&Io(l,h,d,g),e6(h),$P(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,$P(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 kP{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 n6 extends kP{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Pu="$chartjs",i6={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},TP=t=>t===null||t==="";function r6(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[Pu]={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",TP(r)){const s=sP(t,"width");s!==void 0&&(t.width=s)}if(TP(i))if(t.style.height==="")t.height=t.width/(e||2);else{const s=sP(t,"height");s!==void 0&&(t.height=s)}return t}const CP=gA?{passive:!0}:!1;function s6(t,e,n){t&&t.addEventListener(e,n,CP)}function o6(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,CP)}function a6(t,e){const n=i6[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 _u(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function l6(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||_u(a.addedNodes,i),o=o&&!_u(a.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function u6(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||_u(a.removedNodes,i),o=o&&!_u(a.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Oo=new Map;let EP=0;function MP(){const t=window.devicePixelRatio;t!==EP&&(EP=t,Oo.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function c6(t,e){Oo.size||window.addEventListener("resize",MP),Oo.set(t,e)}function d6(t){Oo.delete(t),Oo.size||window.removeEventListener("resize",MP)}function f6(t,e,n){const i=t.canvas,r=i&&Op(i);if(!r)return;const s=NS((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),c6(t,s),o}function Wp(t,e,n){n&&n.disconnect(),e==="resize"&&d6(t)}function h6(t,e,n){const i=t.canvas,r=NS(s=>{t.ctx!==null&&n(a6(s,t))},t);return s6(i,e,r),r}class p6 extends kP{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(r6(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[Pu])return!1;const i=n[Pu].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[Pu],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),o={attach:l6,detach:u6,resize:f6}[n]||h6;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]||o6)(e,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,r){return mA(e,n,i,r)}isAttached(e){const n=e&&Op(e);return!!(n&&n.isConnected)}}function m6(t){return!Ip()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?n6:p6}let pi=(Bu=class{constructor(){X(this,"x");X(this,"y");X(this,"active",!1);X(this,"options");X(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return mu(this.x)&&mu(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}},X(Bu,"defaults",{}),X(Bu,"defaultRoutes"),Bu);function g6(t,e){const n=t.options.ticks,i=v6(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?b6(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>r)return x6(e,u,s,o/r),u;const c=y6(s,e,r);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for($u(e,u,c,ue(h)?0:a-h,a),d=0,f=o-1;dr)return l}return Math.max(r,1)}function b6(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,DP=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,LP=(t,e)=>Math.min(e||t,t);function AP(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;so+a)))return l}function _6(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=eA(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-Vo(e.grid)-n.padding-RP(e.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=ML(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=RP(r,n.options.font);if(a?(e.width=this.maxWidth,e.height=Vo(s)+l):(e.height=this.maxHeight,e.width=Vo(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(T),highest:E(D),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 LL(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=Vo(s),h=[],g=a.setContext(this.getContext()),v=g.display?g.width:0,b=v/2,p=function(C){return Ji(i,C,v)};let m,y,S,P,T,D,E,w,_,A,k,V;if(o==="top")m=p(this.bottom),D=this.bottom-f,w=m-b,A=p(e.top)+b,V=e.bottom;else if(o==="bottom")m=p(this.top),A=e.top,V=p(e.bottom)-b,D=m+b,w=this.top+f;else if(o==="left")m=p(this.right),T=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,T=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 C=Object.keys(o)[0],L=o[C];m=p(this.chart.scales[C].getPixelForValue(L))}A=e.top,V=e.bottom,D=m+b,w=D+f}else if(n==="y"){if(o==="center")m=p((e.left+e.right)/2);else if(oe(o)){const C=Object.keys(o)[0],L=o[C];m=p(this.chart.scales[C].getPixelForValue(L))}T=m-b,E=T-f,_=e.left,k=e.right}const M=le(r.ticks.maxTicksLimit,d),O=Math.max(1,Math.ceil(d/M));for(y=0;y0&&(ie-=H/2);break}F={left:ie,top:Q,width:H+B.width,height:Z+B.height,color:O.backdropColor}}b.push({label:S,font:w,textOffset:k,options:{rotation:v,color:L,strokeColor:R,strokeWidth:z,textAlign:K,textBaseline:V,translation:[P,T],backdrop:F}})}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 D6(t){return"id"in t&&"defaults"in t}class L6{constructor(){this.controllers=new ku(Lo,"datasets",!0),this.elements=new ku(pi,"elements"),this.plugins=new ku(Object,"plugins"),this.scales=new ku(rs,"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 R6(t){const e={},n=[],i=Object.keys(un.plugins.items);for(let s=0;s1&&FP(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function IP(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function B6(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 IP(t,"x",n[0])||IP(t,"y",n[0])}return{}}function j6(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,B6(o,t),$e.scales[a.type]),u=N6(l,r),c=n.scales||{};s[o]=ko(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=V6(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),ko(s[h],[{axis:f},i[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];ko(a,[$e.scales[a.type],$e.scale])}),s}function OP(t){const e=t.options||(t.options={});e.plugins=le(e.plugins,{}),e.scales=j6(t,e)}function VP(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function K6(t){return t=t||{},t.data=VP(t.data),OP(t),t}const NP=new Map,zP=new Set;function Tu(t,e){let n=NP.get(t);return n||(n=e(),NP.set(t,n),zP.add(n)),n}const No=(t,e,n)=>{const i=Jr(e,n);i!==void 0&&t.add(i)};class H6{constructor(e){this._config=K6(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=VP(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(),OP(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Tu(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Tu(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Tu(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Tu(`${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=>No(l,e,d))),c.forEach(d=>No(l,r,d)),c.forEach(d=>No(l,Zi[s]||{},d)),c.forEach(d=>No(l,$e,d)),c.forEach(d=>No(l,kp,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),zP.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}=BP(this._resolverCache,e,r);let l=o;if(U6(o,n)){s.$shared=!1,i=fi(i)?i():i;const u=this.createResolver(e,i,a);l=ns(o,i,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,i=[""],r){const{resolver:s}=BP(this._resolverCache,e,i);return oe(n)?ns(s,n,void 0,r):s}}function BP(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 W6=t=>oe(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function U6(t,e){const{isScriptable:n,isIndexable:i}=ZS(t);for(const r of e){const s=n(r),o=i(r),a=(o||s)&&t[r];if(s&&(fi(a)||W6(a))||o&&Ee(a))return!0}return!1}var Y6="4.4.6";const G6=["top","bottom","left","right","chartArea"];function jP(t,e){return t==="top"||t==="bottom"||G6.indexOf(t)===-1&&e==="x"}function KP(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function HP(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),fe(n&&n.onComplete,[t],e)}function X6(t){const e=t.chart,n=e.options.animation;fe(n&&n.onProgress,[t],e)}function WP(t){return Ip()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Cu={},UP=t=>{const e=WP(t);return Object.values(Cu).filter(n=>n.canvas===e).pop()};function Q6(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 q6(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function Eu(t,e,n){return t.options.clip?t[n]:e[n]}function Z6(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Eu(n,e,"left"),right:Eu(n,e,"right"),top:Eu(i,e,"top"),bottom:Eu(i,e,"bottom")}:e}let Mu=(yi=class{static register(...e){un.add(...e),YP()}static unregister(...e){un.remove(...e),YP()}constructor(e,n){const i=this.config=new H6(n),r=WP(e),s=UP(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||m6(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=bL(),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 A6,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=IL(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Cu[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Dn.listen(this,"complete",HP),Dn.listen(this,"progress",X6),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():rP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return XS(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,rP(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||jP(a.position,u)!==jP(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(KP("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);(!ES(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;Q6(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=Z6(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=GA.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=ts(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);To(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}});!du(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=$L(e),u=q6(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=!du(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)}},X(yi,"defaults",$e),X(yi,"instances",Cu),X(yi,"overrides",Zi),X(yi,"registry",un),X(yi,"version",Y6),X(yi,"getChart",UP),yi);function YP(){return ce(Mu.instances,t=>t._plugins.invalidate())}function J6(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+je,i-je),t.closePath(),t.clip()}function eR(t){return Lp(t,["outerStart","outerEnd","innerStart","innerEnd"])}function tR(t,e,n,i){const r=eR(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 ss(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Du(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 O=c>0?c-i:0,C=d>0?d-i:0,L=(O+C)/2,R=L!==0?g*L/(L+i):g;h=(g-R)/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:T}=tR(e,f,d,m-p),D=d-y,E=d-S,w=p+y/D,_=m-S/E,A=f+P,k=f+T,V=p+P/A,M=m-T/k;if(t.beginPath(),s){const O=(w+_)/2;if(t.arc(o,a,d,w,O),t.arc(o,a,d,O,_),S>0){const z=ss(E,_,o,a);t.arc(z.x,z.y,S,_,m+je)}const C=ss(k,m,o,a);if(t.lineTo(C.x,C.y),T>0){const z=ss(k,M,o,a);t.arc(z.x,z.y,T,m+je,M+Math.PI)}const L=(m-T/f+(p+P/f))/2;if(t.arc(o,a,f,m-T/f,L,!0),t.arc(o,a,f,L,p+P/f,!0),P>0){const z=ss(A,V,o,a);t.arc(z.x,z.y,P,V+Math.PI,p-je)}const R=ss(D,p,o,a);if(t.lineTo(R.x,R.y),y>0){const z=ss(D,w,o,a);t.arc(z.x,z.y,y,p-je,w)}}else{t.moveTo(o,a);const O=Math.cos(w)*d+o,C=Math.sin(w)*d+a;t.lineTo(O,C);const L=Math.cos(_)*d+o,R=Math.sin(_)*d+a;t.lineTo(L,R)}t.closePath()}function nR(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){Du(t,e,n,i,l,r);for(let u=0;u=tt||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>tt?Math.floor(r/tt):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,nR(n,this,c,o,a),iR(n,this,c,o,a),n.restore()}}X(zo,"id","arc"),X(zo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),X(zo,"defaultRoutes",{backgroundColor:"backgroundColor"}),X(zo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function GP(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)}},uR=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class qP 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}=QP(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}=cR(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=is(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=is(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}=QP(o,d),p=function(T,D,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},A=l.xPlus(T,g/2),k=D+f;QS(r,_,A,k,o.pointStyleWidth&&g)}else{const _=D+Math.max((d-v)/2,0),A=l.leftForLtr(T,g),k=es(E.borderRadius);r.beginPath(),Object.values(k).some(V=>V!==0)?vu(r,{x:A,y:_,w:g,h:v,radius:k}):r.rect(A,_,g,v),r.fill(),w!==0&&r.stroke()}r.restore()},m=function(T,D,E){Mo(r,E.text,T,D+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},oP(this.ctx,e.textDirection);const P=b+c;this.legendItems.forEach((T,D)=>{r.strokeStyle=T.fontColor,r.fillStyle=T.fontColor;const E=r.measureText(T.text).width,w=l.textAlign(T.textAlign||(T.textAlign=o.textAlign)),_=g+f+E;let A=h.x,k=h.y;l.setWidth(this.width),y?D>0&&A+_+c>this.right&&(k=h.y+=P,h.line++,A=h.x=Qe(s,this.left+c,this.right-i[h.line])):D>0&&k+P>this.bottom&&(A=h.x=A+n[h.line].width+c,h.line++,k=h.y=Qe(s,this.top+S+c,this.bottom-n[h.line].height));const V=l.x(A);if(p(V,k,T),A=OL(w,A+g+f,y?A+_:this.right,e.rtl),m(l.x(A),k,T),y)h.x+=_+c;else if(typeof T.text!="string"){const M=u.lineHeight;h.y+=ZP(T,M)+c}else h.y+=P}),aP(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=is(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,Mo(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 fR(t,e,n){let i=t;return typeof e.text!="string"&&(i=ZP(e,n)),i}function ZP(t,e){const n=t.text?t.text.length:0;return e*n}function hR(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var pR={id:"legend",_element:qP,start(t,e,n){const i=t.legend=new qP({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 JP 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);Mo(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:u,textAlign:_p(n.align),textBaseline:"middle",translation:[o,a]})}}function mR(t,e){const n=new JP({ctx:t.ctx,options:e,chart:t});Nt.configure(t,n,e),Nt.addBox(t,n),t.titleBlock=n}var gR={id:"title",_element:JP,start(t,e,n){mR(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 jo={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 vR(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 e_(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 yR(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function bR(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 xR(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"),bR(u,t,e,n)&&(u="center"),u}function t_(t,e,n){const i=n.yAlign||e.yAlign||yR(t,n);return{xAlign:n.xAlign||e.xAlign||xR(t,e,n,i),yAlign:i}}function wR(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function SR(t,e,n){let{y:i,height:r}=t;return e==="top"?i+=n:e==="bottom"?i-=r+n:i-=r/2,i}function n_(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}=es(o);let g=wR(e,a);const v=SR(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 Au(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 i_(t){return cn([],Ln(t))}function PR(t,e,n){return ts(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function r_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const s_={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=r_(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 i_(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=r_(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=jo[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=e_(this,i),u=Object.assign({},a,l),c=t_(this.chart,i,u),d=n_(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}=es(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=is(i.rtl,this.x,this.width);for(e.x=Au(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,vu(e,{x:v,y:g,w:u,h:l,radius:p}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),vu(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=is(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,T,D;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Au(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,T=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=jo[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=e_(this,e),l=Object.assign({},o,this._size),u=t_(n,e,l),c=n_(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),oP(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),aP(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=!du(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||!du(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=jo[s.position].call(this,e,n);return o!==!1&&(i!==o.x||r!==o.y)}}X(Qp,"positioners",jo);var _R={id:"tooltip",_element:Qp,positioners:jo,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:s_},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 $R=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function kR(t,e,n,i){const r=t.indexOf(e);if(r===-1)return $R(t,e,n,i);const s=t.lastIndexOf(e);return r!==s?n:r}const TR=(t,e)=>t===null?null:dt(Math.round(t),0,e);function o_(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}}X(qp,"id","category"),X(qp,"defaults",{ticks:{callback:o_}});function CR(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=DS((b-v)/g/h)*h,T,D,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=DS(w*P/g/h)*h),ue(l)||(T=Math.pow(10,l),P=Math.ceil(P*T)/T),r==="ticks"?(D=Math.floor(v/P)*P,E=Math.ceil(b/P)*P):(D=v,E=b),p&&m&&s&&CL((a-o)/s,P/1e3)?(w=Math.round(Math.min((a-o)/P,c)),P=(a-o)/w,D=o,E=a):y?(D=p?o:D,E=m?a:E,w=u-1,P=(E-D)/w):(w=(E-D)/P,pu(w,Math.round(w),P/1e3)?w=Math.round(w):w=Math.ceil(w));const _=Math.max(LS(P),LS(D));T=Math.pow(10,ue(l)?_:l),D=Math.round(D*T)/T,E=Math.round(E*T)/T;let A=0;for(p&&(f&&D!==o?(n.push({value:o}),Da)break;n.push({value:k})}return m&&f&&E!==a?n.length&&pu(n[n.length-1].value,a,a_(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!m||E===a)&&n.push({value:E}),n}function a_(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 ER extends rs{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=CR(r,s);return e.bounds==="ticks"&&EL(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 WS(e,this.chart.options.locale,this.options.ticks.format)}}class Zp extends ER{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}}X(Zp,"id","linear"),X(Zp,"defaults",{ticks:{callback:YS.formatters.numeric}});const Ru={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(Ru);function l_(t,e){return t-e}function u_(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"&&(mu(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function c_(t,e,n,i){const r=ht.length;for(let s=ht.indexOf(t);s=ht.indexOf(n);s--){const o=ht[s];if(Ru[o].common&&t._adapter.diff(r,i,o)>=e-1)return o}return ht[n?ht.indexOf(n):0]}function DR(t){for(let e=ht.indexOf(t)+1,n=ht.length;e=e?n[i]:n[r];t[s]=!0}}function LR(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 f_(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||c_(s.minUnit,n,i,this._getLabelCapacity(n)),a=le(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=mu(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 h_ extends Fu{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=Iu(n,this.min),this._tableRange=Iu(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(Iu(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Iu(this._table,i*this._tableRange+this._minPos,!0)}}X(h_,"id","timeseries"),X(h_,"defaults",Fu.defaults);const p_="label";function m_(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function AR(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function g_(t,e){t.labels=e}function v_(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p_;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 RR(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p_;const n={labels:[],datasets:[]};return g_(n,t.labels),v_(n,t.datasets,e),n}function FR(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=te(p,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]),h=x.useRef(null),g=x.useRef(),v=()=>{h.current&&(g.current=new Mu(h.current,{type:o,data:RR(a,s),options:l&&$({},l),plugins:u}),m_(e,g.current))},b=()=>{m_(e,null),g.current&&(g.current.destroy(),g.current=null)};return x.useEffect(()=>{!r&&g.current&&l&&AR(g.current,l)},[r,l]),x.useEffect(()=>{!r&&g.current&&g_(g.current.config.data,a.labels)},[r,a.labels]),x.useEffect(()=>{!r&&g.current&&a.datasets&&v_(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 IR=x.forwardRef(FR);function OR(t,e){return Mu.register(e),x.forwardRef((n,i)=>W.createElement(IR,Object.assign({},n,{ref:i,type:t})))}const VR=OR("bar",wu);/*! * 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 y_=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}(),Ko={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|=x_),en.bottom&&(i|=w_),i}function BR(t,e){for(var n=t.x0,i=t.y0,r=t.x1,s=t.y1,o=Ou(n,i,e),a=Ou(r,s,e),l,u,c;!(!(o|a)||o&a);)l=o||a,l&S_?(u=n+(r-n)*(e.top-i)/(s-i),c=e.top):l&w_?(u=n+(r-n)*(e.bottom-i)/(s-i),c=e.bottom):l&x_?(c=i+(s-i)*(e.right-n)/(r-n),u=e.right):l&b_&&(c=i+(s-i)*(e.left-n)/(r-n),u=e.left),l===o?(n=u,i=c,o=Ou(n,i,e)):(r=u,s=c,a=Ou(r,s,e));return{x0:n,x1:r,y0:i,y1:s}}function Vu(t,e){var n=e.anchor,i=t,r,s;return e.clamp&&(i=BR(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),NR(r,s,t.vx,t.vy,e.align)}var Nu={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 Vu({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 Vu({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)),Vu({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 Vu({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=Ko.rasterize;function jR(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 KR(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 HR(t){return t instanceof zo?Nu.arc:t instanceof Lu?Nu.point:t instanceof Bo?Nu.bar:Nu.fallback}function WR(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=[zu(e[0],e[1]),zu(e[0],e[3])],r,s,o;for(this._rotation!==t._rotation&&i.push(zu(n[0],n[1]),zu(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 JR(t){var e,n,i,r,s,o,a;for(e=0,n=t.length;el.getProps([u],!0)[u]}),s=i.geometry(),o=k_(a,i.model(),s),r._box.update(o,s,i.rotation()));return ZR(t,function(l,u){var c=l._hidable,d=u._hidable;c&&d||d?u._visible=!1:c&&(l._visible=!1)})}var Wo={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 o=()=>{i(window.innerWidth)};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]);const r={labels:t.slice(0,4).map(o=>o.year),datasets:[{label:Y.oblroi_resultsTableHeader2,data:t.slice(0,4).map(o=>o.serviceRepCost),backgroundColor:"#F0F3FC"},{label:Y.oblroi_resultsTableHeader3,data:t.slice(0,4).map(o=>o.cost),backgroundColor:"#4864D2"},{label:Y.oblroi_resultsTableHeader4,data:t.slice(0,4).map(o=>o.savings),backgroundColor:"#C8D4F8"}]},s={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:!(n<768),color:"#3651C0",anchor:"middle",font:{weight:"bold",size:n<1024?10:16},align:"middle",formatter:(o,a)=>a.dataset.label===Y.oblroi_resultsTableHeader4&&o!==0?`$${o.toLocaleString()}`: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 I.jsx(VR,{data:r,options:s,"aria-label":e})}var C_=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,mt=t=>!t||typeof t!="object"||Object.keys(t).length===0,lF=(t,e)=>JSON.stringify(t)===JSON.stringify(e);function E_(t,e){t.forEach(function(n){Array.isArray(n)?E_(n,e):e.push(n)})}function M_(t){let e=[];return E_(t,e),e}var D_=(...t)=>M_(t).filter(Boolean),L_=(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]=L_(o,a):Array.isArray(o)||Array.isArray(a)?n[s]=D_(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},A_=t=>!t||typeof t!="string"?t:t.replace(/\s+/g," ").trim();const tm="-",uF=t=>{const e=dF(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{const a=o.split(tm);return a[0]===""&&a.length!==1&&a.shift(),R_(a,e)||cF(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},R_=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?R_(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},F_=/^\[(.+)\]$/,cF=t=>{if(F_.test(t)){const e=F_.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},dF=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return hF(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:I_(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(fF(r)){nm(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{nm(o,I_(e,s),n,i)})})},I_=(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},fF=t=>t.isThemeGetter,hF=(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,pF=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)}}},O_="!",mF=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},gF=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},vF=t=>$({cache:pF(t.cacheSize),parseClassName:mF(t)},uF(t)),yF=/\s+/,bF=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,s=[],o=t.trim().split(yF);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=gF(c).join(":"),p=d?b+O_: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 xF(){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=vF(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=bF(l,n);return r(l,c),c}return function(){return s(xF.apply(null,arguments))}}const ve=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},N_=/^\[(?:([a-z-]+):)?(.+)\]$/i,wF=/^\d+\/\d+$/,SF=new Set(["px","full","screen"]),PF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_F=/\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$/,$F=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=t=>os(t)||SF.has(t)||wF.test(t),gi=t=>as(t,"length",FF),os=t=>!!t&&!Number.isNaN(Number(t)),rm=t=>as(t,"number",os),Uo=t=>!!t&&Number.isInteger(Number(t)),CF=t=>t.endsWith("%")&&os(t.slice(0,-1)),J=t=>N_.test(t),vi=t=>PF.test(t),EF=new Set(["length","size","percentage"]),MF=t=>as(t,EF,z_),DF=t=>as(t,"position",z_),LF=new Set(["image","url"]),AF=t=>as(t,LF,OF),RF=t=>as(t,"",IF),Yo=()=>!0,as=(t,e,n)=>{const i=N_.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},FF=t=>_F.test(t)&&!$F.test(t),z_=()=>!1,IF=t=>kF.test(t),OF=t=>TF.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"),T=ve("skew"),D=ve("space"),E=ve("translate"),w=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",J,e],k=()=>[J,e],V=()=>["",Rn,gi],M=()=>["auto",os,J],O=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["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"],R=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",J],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[os,J];return{cacheSize:500,separator:":",theme:{colors:[Yo],spacing:[Rn,gi],blur:["none","",vi,J],brightness:F(),borderColor:[t],borderRadius:["none","","full",vi,J],borderSpacing:k(),borderWidth:V(),contrast:F(),grayscale:z(),hueRotate:F(),invert:z(),gap:k(),gradientColorStops:[t],gradientColorStopPositions:[CF,gi],inset:A(),margin:A(),opacity:F(),padding:k(),saturate:F(),scale:F(),sepia:z(),skew:F(),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:[...O(),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",Uo,J]}],basis:[{basis:A()}],"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",Uo,J]}],"grid-cols":[{"grid-cols":[Yo]}],"col-start-end":[{col:["auto",{span:["full",Uo,J]},J]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Yo]}],"row-start-end":[{row:["auto",{span:[Uo,J]},J]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","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",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[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":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"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:[Yo]}],"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",os,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:[...C(),"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:[...O(),DF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",MF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AF]}],"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:[...C(),"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:C()}],"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:["",...C()]}],"outline-offset":[{"outline-offset":[Rn,J]}],"outline-w":[{outline:[Rn,gi]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:V()}],"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,RF]}],"shadow-color":[{shadow:[Yo]}],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:F()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:F()}],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:[Uo,J]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"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"]}}},VF=(t,{cacheSize:e,prefix:n,separator:i,experimentalParseClassName:r,extend:s={},override:o={}})=>{Go(t,"cacheSize",e),Go(t,"prefix",n),Go(t,"separator",i),Go(t,"experimentalParseClassName",r);for(const a in o)NF(t[a],o[a]);for(const a in s)zF(t[a],s[a]);return t},Go=(t,e,n)=>{n!==void 0&&(t[e]=n)},NF=(t,e)=>{if(e)for(const n in e)Go(t,n,e[n])},zF=(t,e)=>{if(e)for(const n in e){const i=e[n];i!==void 0&&(t[n]=(t[n]||[]).concat(i))}},BF=(t,...e)=>typeof t=="function"?im(sm,t,...e):im(()=>VF(sm(),t),...e),jF=im(sm);var KF={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},B_=t=>t||void 0,Xo=(...t)=>B_(M_(t).filter(Boolean).join(" ")),om=null,Fn={},am=!1,Qo=(...t)=>e=>e.twMerge?((!om||am)&&(am=!1,om=mt(Fn)?jF:BF(N($({},Fn),{extend:$({theme:Fn.theme,classGroups:Fn.classGroups,conflictingClassGroupModifiers:Fn.conflictingClassGroupModifiers,conflictingClassGroups:Fn.conflictingClassGroups},Fn.extend)}))),B_(om(Xo(t)))):Xo(t),j_=(t,e)=>{for(let n in e)t.hasOwnProperty(n)?t[n]=Xo(t[n],e[n]):t[n]=e[n];return t},HF=(t,e)=>{let{extend:n=null,slots:i={},variants:r={},compoundVariants:s=[],compoundSlots:o=[],defaultVariants:a={}}=t,l=$($({},KF),e),u=n!=null&&n.base?Xo(n.base,t==null?void 0:t.base):t==null?void 0:t.base,c=n!=null&&n.variants&&!mt(n.variants)?L_(r,n.variants):r,d=n!=null&&n.defaultVariants&&!mt(n.defaultVariants)?$($({},n.defaultVariants),a):a;!mt(l.twMergeConfig)&&!lF(l.twMergeConfig,Fn)&&(am=!0,Fn=l.twMergeConfig);let f=mt(n==null?void 0:n.slots),h=mt(i)?{}:$({base:Xo(t==null?void 0:t.base,f&&(n==null?void 0:n.base))},i),g=f?h:j_($({},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:D_(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,V,M=[],O)=>{let C=M;if(typeof V=="string")C=C.concat(A_(V).split(" ").map(L=>`${k}:${L}`));else if(Array.isArray(V))C=C.concat(V.reduce((L,R)=>L.concat(`${k}:${R}`),[]));else if(typeof V=="object"&&typeof O=="string"){for(let L in V)if(V.hasOwnProperty(L)&&L===O){let R=V[L];if(R&&typeof R=="string"){let z=A_(R);C[O]?C[O]=C[O].concat(z.split(" ").map(K=>`${k}:${K}`)):C[O]=z.split(" ").map(K=>`${k}:${K}`)}else Array.isArray(R)&&R.length>0&&(C[O]=R.reduce((z,K)=>z.concat(`${k}:${K}`),[]))}}return C},S=(k,V=c,M=null,O=null)=>{var C;let L=V[k];if(!L||mt(L))return null;let R=(C=O==null?void 0:O[k])!=null?C:m==null?void 0:m[k];if(R===null)return null;let z=C_(R),K=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,F=d==null?void 0:d[k],B=[];if(typeof z=="object"&&K)for(let[Q,ie]of Object.entries(z)){let nt=L[ie];if(Q==="initial"){F=ie;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(Q)||(B=y(Q,nt,B,M))}let Z=z!=null&&typeof z!="object"?z:C_(F),H=L[Z||"false"];return typeof B=="object"&&typeof M=="string"&&B[M]?j_(B,H):B.length>0?(B.push(H),B):H},P=()=>c?Object.keys(c).map(k=>S(k,c)):null,T=(k,V)=>{if(!c||typeof c!="object")return null;let M=new Array;for(let O in c){let C=S(O,c,k,V),L=k==="base"&&typeof C=="string"?C:C&&C[k];L&&(M[M.length]=L)}return M},D={};for(let k in m)m[k]!==void 0&&(D[k]=m[k]);let E=(k,V)=>{var M;let O=typeof(m==null?void 0:m[k])=="object"?{[k]:(M=m[k])==null?void 0:M.initial}:{};return $($($($({},d),D),O),V)},w=(k=[],V)=>{let M=[];for(let O of k){let C=O,{class:L,className:R}=C,z=te(C,["class","className"]);let K=!0;for(let[F,B]of Object.entries(z)){let Z=E(F,V);if(Array.isArray(B)){if(!B.includes(Z[F])){K=!1;break}}else if(Z[F]!==B){K=!1;break}}K&&(L&&M.push(L),R&&M.push(R))}return M},_=k=>{let V=w(v,k);if(!Array.isArray(V))return V;let M={};for(let O of V)if(typeof O=="string"&&(M.base=Qo(M.base,O)(l)),typeof O=="object")for(let[C,L]of Object.entries(O))M[C]=Qo(M[C],L)(l);return M},A=k=>{if(o.length<1)return null;let V={};for(let M of o){let O=M,{slots:C=[],class:L,className:R}=O,z=te(O,["slots","class","className"]);if(!mt(z)){let K=!0;for(let F of Object.keys(z)){let B=E(F,k)[F];if(B===void 0||(Array.isArray(z[F])?!z[F].includes(B):z[F]!==B)){K=!1;break}}if(!K)continue}for(let K of C)V[K]=V[K]||[],V[K].push([L,R])}return V};if(!mt(i)||!f){let k={};if(typeof g=="object"&&!mt(g))for(let V of Object.keys(g))k[V]=M=>{var O,C;return Qo(g[V],T(V,M),((O=_(M))!=null?O:[])[V],((C=A(M))!=null?C:[])[V],M==null?void 0:M.class,M==null?void 0:M.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 WF=HF({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:""}]}),UF=(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))},K_=({children:t,url:e,target:n,variant:i="primary",size:r="md"})=>I.jsx(I.Fragment,{children:I.jsx(o3,{onPress:s=>{UF(s,i)},href:e,target:n,className:WF({size:r,color:i==="text"?"secondary":i}),children:t})}),YF=()=>I.jsxs("div",{className:"relative mx-auto h-[200px] w-full sm:h-[300px]",children:[I.jsx("div",{className:"masked-contour absolute inset-x-0 bottom-0 z-0 mx-auto -mb-[2px] w-full",children:I.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/contour.svg",alt:"",className:"w-full"})}),I.jsx("div",{className:"data-dust-left absolute left-0 top-[-50px] z-10 sm:top-[-450px]",children:I.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]"})}),I.jsx("div",{className:"data-dust-right visible absolute right-0 top-[-80px] z-10 max-lg:hidden",children:I.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/DataDust-2.svg",alt:""})}),I.jsx("div",{className:"astro-agentforce absolute bottom-[-20px] right-0 z-20 sm:right-[10%]",children:I.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]"})}),I.jsx("div",{className:"einstein-agentforce absolute bottom-[-40px] left-[13%] z-20",children:I.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]"})}),I.jsx("div",{className:"appy-agentforce absolute bottom-[-20px] left-[3%] z-20",children:I.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]"})})]}),GF={name:"@sfdc-www/digital-open-blade-libs",private:!0,version:"0.0.6",license:"UNLICENSED",type:"module",engines:{node:"18.18.2",yarn:"3.4.1"},files:["dist/*.json"],main:"dist/manifest.json",publishConfig:{registry:"https://npm.pkg.github.com"},workspaces:["packages/*"],scripts:{build:"yarn workspaces foreach run build","dev:guided-tour":"yarn workspace guided-tours dev","dev:use-cases":"yarn workspace use-cases dev","dev:blade-runner":"yarn workspace blade-runner dev","dev:react-example":"yarn workspace react-example dev",dev:"concurrently npm:dev:*",release:"semantic-release",commit:"git-cz"},devDependencies:{"@commitlint/cli":"^19.2.1","@commitlint/config-conventional":"^19.1.0",concurrently:"^8.2.2","cz-conventional-changelog":"^3.3.0"},config:{commitizen:{path:"./node_modules/cz-conventional-changelog"}}},XF={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"},QF={USD:2,AUD:2.8,EUR:2,GBP:1.6,JPY:240,SEK:20};function qF(){const[t,e]=x.useState(20),[n,i]=x.useState(5e4),[r,s]=x.useState(20),[o,a]=x.useState(50),[l,u]=x.useState("en-US"),[c,d]=x.useState("USD"),[f,h]=x.useState(2),[g,v]=x.useState("JSON"),[b,p]=x.useState("");console.log("version",GF.version),x.useEffect(()=>{const ie=window.location.pathname.split("/")[1],nt=["in","ap","au","eu","ca","uk","se","th","kr","tw"];h(QF[XF[ie.toUpperCase()]]),ie.length===2&&nt.includes(ie)?(console.log("regionCode",ie),p(ie)):(u("US"),d("USD")),(()=>{var ls,Zo;const bi=document.querySelector('[data-component="table"]');bi&&(bi.querySelectorAll("tbody tr").forEach(ir=>{var ju,ea;const Jo=ir.querySelectorAll("td");if(Jo.length===2){const us=(ju=Jo[0].textContent)==null?void 0:ju.trim(),Ku=(ea=Jo[1].textContent)==null?void 0:ea.trim();us&&Ku&&Y.hasOwnProperty(us)&&(Y[us]=Ku)}}),v("Table")),bi&&new URLSearchParams(window.location.search).get("showTable")!=="true"&&((ls=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||ls.remove(),(Zo=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||Zo.remove())})()},[]);const m=t*n,y=r*t*260,S=2,T=75*t*12,D=o,E=o-o*.3,w=E-E*.3;//! Removed `* 2` from costYear1 per Vandana Gangwar const _=y*S*(w/100),A=y*S*(E/100),k=y*S*(D/100),V=_+A+k,M=(m+T)*(1-w/100),O=(m+T)*(1-E/100),C=(m+T)*(1-D/100),L=M+O+C,R=m+T-M-_,z=m+T-O-A,K=m+T-C-k,F=R+z+K,B=[{year:Y.oblroi_chart_year_0,serviceRepCost:Math.max(0,m),cost:0,savings:0},{year:Y.oblroi_chart_year_1,serviceRepCost:Math.max(0,M),cost:Math.max(0,_),savings:Math.max(0,R)},{year:Y.oblroi_chart_year_2,serviceRepCost:Math.max(0,O),cost:Math.max(0,A),savings:Math.max(0,z)},{year:Y.oblroi_chart_year_3,serviceRepCost:Math.max(0,C),cost:Math.max(0,k),savings:Math.max(0,K)},{serviceRepCost:Math.max(0,L),year:Y.oblroi_chart_total,cost:Math.max(0,V),savings:Math.max(0,F)}],Z=`${Y.oblroi_service_agent_handling} ${Math.round(o)}${Y.oblroi_conversations} $${Math.round(F)} ${Y.oblroi_over_years}`,H=`${Y.oblroi_chart_intro} $${Math.round(M)} ${Y.oblroi_chart_human_cost}, $${Math.round(_)} ${Y.oblroi_chart_agentforce_cost} $${Math.round(R)} ${Y.oblroi_chart_net_savings} ${Y.oblroi_chart_year_1} $${Math.round(O)} ${Y.oblroi_chart_human_cost}, $${Math.round(A)} ${Y.oblroi_chart_agentforce_cost} $${Math.round(z)} ${Y.oblroi_chart_net_savings} ${Y.oblroi_chart_in} ${Y.oblroi_chart_year_2} . $${Math.round(C)} ${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_3} .`;return I.jsxs("div",{className:"bg-agentforce-light",children:[new URLSearchParams(window.location.search).get("debug")==="true"&&I.jsx("div",{className:"bg-agentpurple text-white text-sm font-semibold py-2",children:I.jsxs("div",{className:"mx-auto flex justify-between items-center max-w-2xl",children:[I.jsxs("span",{children:["Region: ",l]}),I.jsxs("span",{children:["Currency: ",c]}),I.jsxs("span",{children:["Agentforce cost: ",f]}),I.jsxs("span",{children:["Copy source: ",g]}),I.jsxs("span",{children:["totalSavings ",F]})]})}),I.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center px-4 pb-10 pt-10 md:pt-16",children:[I.jsxs("section",{className:"max-w-[1280px] text-center md:max-w-[540px] lg:max-w-[768px]",children:[I.jsxs("h1",{className:"text-5xl text-sky-950",children:[I.jsxs("span",{children:[I.jsx("span",{className:"text-indigo-700",children:Y.oblroi_headerEyebrow}),I.jsx("br",{}),Y.oblroi_header]}),I.jsx("br",{})]}),I.jsx("h2",{className:"mb-10 text-2xl text-sky-950 md:mb-16",children:Y.oblroi_headerBottom})]}),I.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:[I.jsxs("div",{className:"w-full self-start rounded-2xl bg-white px-6 py-8 shadow-lg xl:w-[320px]",children:[I.jsx("h3",{className:"mb-6 font-display text-2xl text-sfnavy",children:Y.oblroi_formHeadline}),I.jsx("p",{className:"mb-6 font-sans text-sm font-normal leading-tight text-neutral-700",children:"(All fields are required)"}),I.jsxs("div",{className:"flex flex-col gap-6",children:[I.jsx(pp,{label:Y.oblroi_formField1Label,info:Y.oblroi_formField1Info,value:t,defaultValue:t,minValue:1,maxValue:1e5,formatOptions:{maximumFractionDigits:0},onChange:Q=>isNaN(Q)?e(1):e(Number(Q)),validationBehavior:"native",errorMessage:Y.oblroi_error_service_employees,isRequired:!0}),I.jsx(pp,{label:Y.oblroi_formField2Label,info:Y.oblroi_formField2Info,value:n,defaultValue:n,minValue:1,maxValue:1e6,formatOptions:{style:"currency",currency:"USD",maximumFractionDigits:0},onChange:Q=>isNaN(Q)?i(0):i(Number(Q)),validationBehavior:"native",errorMessage:Y.oblroi_error_cost_per_employee,isRequired:!0}),I.jsx(pp,{label:Y.oblroi_formField4Label,info:Y.oblroi_formField4Info,value:r,defaultValue:r,formatOptions:{maximumFractionDigits:0},onChange:Q=>isNaN(Q)?s(1):s(Number(Q)),validationBehavior:"native",errorMessage:Y.oblroi_error_conversations_handled,isRequired:!0}),I.jsx(G3,{label:Y.oblroi_formField3Label,info:Y.oblroi_formField3Info,value:o,onChange:a,maxValue:100,suffix:"%",step:5})]})]}),I.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:[I.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%)"}}),I.jsxs("div",{className:"inline-flex w-full flex-col items-center justify-start",children:[I.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," ",I.jsxs("span",{className:"text-indigo-500",children:[o,"%"]})," ",Y.oblroi_resultsHeadline_part2.replace(/%/g,"")]}),I.jsx("div",{className:"mb-4 text-center text-5xl font-semibold sm:text-[80px] sm:leading-[80px]",children:I.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:I.jsx(vl,{value:F,currency:c,locale:l})})}),I.jsx("div",{className:"mb-5 font-sans text-xl font-bold leading-[30px] tracking-tight text-neutral-900",children:Y.oblroi_resultsDescription}),I.jsx("div",{role:"region",id:"agentforce-savings-info",className:"sr-only","aria-live":"polite","aria-atomic":"true",children:Z}),I.jsxs(X3,{children:[I.jsxs(Q3,{children:[I.jsx(yS,{id:"table",children:"Table"}),I.jsx(yS,{id:"chart",children:"Chart"})]}),I.jsx(bS,{id:"table",children:I.jsx("div",{className:"flex w-full flex-col",children:I.jsx(hD,{yearlyData:B,currentCurrency:c,currentRegion:l})})}),I.jsx(bS,{id:"chart",children:I.jsx("div",{className:"relative flex w-full flex-col overflow-x-auto max-sm:h-[40vh] max-sm:w-[75vw]",children:I.jsx(aF,{data:B,ariaLabel:H})})})]}),I.jsxs("p",{className:"my-8 font-sans text-xs font-normal leading-[18px] tracking-tight text-black",children:[Y.oblroi_legalDisclaimer_1,I.jsx("br",{}),I.jsx("br",{}),Y.oblroi_legalDisclaimer_2,I.jsx("br",{}),I.jsx("br",{}),Y.oblroi_legalDisclaimer_3]}),I.jsxs("div",{className:"flex w-full flex-col gap-4 md:flex-row",children:[I.jsx(K_,{url:`${window.location.origin}${b?`/${b}`:""}/form/agentforce/contact-us/?d=pb`,target:"_blank",children:Y.oblroi_cta1Label}),I.jsx(K_,{variant:"secondary",url:`${window.location.origin}${b?`/${b}`:""}/agentforce`,children:Y.oblroi_cta2Label})]})]})]})]})]}),I.jsx(YF,{})]})}qu.createRoot(document.getElementById("wps-agentforce-roi")).render(I.jsx(W.StrictMode,{children:I.jsx(qF,{})}))});