(function(be){typeof define=="function"&&define.amd?define(be):be()})(function(){"use strict";var KF=Object.defineProperty,YF=Object.defineProperties;var GF=Object.getOwnPropertyDescriptors;var nc=Object.getOwnPropertySymbols;var FP=Object.prototype.hasOwnProperty,NP=Object.prototype.propertyIsEnumerable;var mm=Math.pow,pm=(be,Te,De)=>Te in be?KF(be,Te,{enumerable:!0,configurable:!0,writable:!0,value:De}):be[Te]=De,T=(be,Te)=>{for(var De in Te||(Te={}))FP.call(Te,De)&&pm(be,De,Te[De]);if(nc)for(var De of nc(Te))NP.call(Te,De)&&pm(be,De,Te[De]);return be},B=(be,Te)=>YF(be,GF(Te));var te=(be,Te)=>{var De={};for(var Lt in be)FP.call(be,Lt)&&Te.indexOf(Lt)<0&&(De[Lt]=be[Lt]);if(be!=null&&nc)for(var Lt of nc(be))Te.indexOf(Lt)<0&&NP.call(be,Lt)&&(De[Lt]=be[Lt]);return De};var X=(be,Te,De)=>pm(be,typeof Te!="symbol"?Te+"":Te,De);var Zu,$i;function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Te={exports:{}},De={},Lt={exports:{}},ee={};/** * @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 xs=Symbol.for("react.element"),jP=Symbol.for("react.portal"),OP=Symbol.for("react.fragment"),IP=Symbol.for("react.strict_mode"),VP=Symbol.for("react.profiler"),zP=Symbol.for("react.provider"),BP=Symbol.for("react.context"),HP=Symbol.for("react.forward_ref"),WP=Symbol.for("react.suspense"),UP=Symbol.for("react.memo"),KP=Symbol.for("react.lazy"),gm=Symbol.iterator;function YP(e){return e===null||typeof e!="object"?null:(e=gm&&e[gm]||e["@@iterator"],typeof e=="function"?e:null)}var vm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ym=Object.assign,bm={};function gr(e,t,n){this.props=e,this.context=t,this.refs=bm,this.updater=n||vm}gr.prototype.isReactComponent={},gr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},gr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xm(){}xm.prototype=gr.prototype;function ic(e,t,n){this.props=e,this.context=t,this.refs=bm,this.updater=n||vm}var rc=ic.prototype=new xm;rc.constructor=ic,ym(rc,gr.prototype),rc.isPureReactComponent=!0;var _m=Array.isArray,wm=Object.prototype.hasOwnProperty,sc={current:null},Sm={key:!0,ref:!0,__self:!0,__source:!0};function Pm(e,t,n){var i,r={},s=null,o=null;if(t!=null)for(i in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)wm.call(t,i)&&!Sm.hasOwnProperty(i)&&(r[i]=t[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1>>1,H=N[j];if(0>>1;jr(re,U))yer(lt,re)?(N[j]=lt,N[ye]=U,j=ye):(N[j]=re,N[J]=U,j=J);else if(yer(lt,U))N[j]=lt,N[ye]=U,j=ye;else break e}}return V}function r(N,V){var U=N.sortIndex-V.sortIndex;return U!==0?U:N.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,m=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(N){for(var V=n(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=N)i(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function w(N){if(v=!1,b(N),!m)if(n(l)!==null)m=!0,R(S);else{var V=n(u);V!==null&&z(w,V.startTime-N)}}function S(N,V){m=!1,v&&(v=!1,p(M),M=-1),h=!0;var U=f;try{for(b(V),d=n(l);d!==null&&(!(d.expirationTime>V)||N&&!F());){var j=d.callback;if(typeof j=="function"){d.callback=null,f=d.priorityLevel;var H=j(d.expirationTime<=V);V=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&i(l),b(V)}else i(l);d=n(l)}if(d!==null)var q=!0;else{var J=n(u);J!==null&&z(w,J.startTime-V),q=!1}return q}finally{d=null,f=U,h=!1}}var k=!1,$=null,M=-1,P=5,E=-1;function F(){return!(e.unstable_now()-EN||125j?(N.sortIndex=U,t(u,N),n(l)===null&&N===n(u)&&(v?(p(M),M=-1):v=!0,z(w,U-j))):(N.sortIndex=H,t(l,N),m||h||(m=!0,R(S))),N},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(N){var V=f;return function(){var U=f;f=V;try{return N.apply(this,arguments)}finally{f=U}}}})(Mm),$m.exports=Mm;var rk=$m.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 sk=_,Pt=rk;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}function it(e,t,n,i,r,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new it(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new it(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new it(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new it(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new it(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){We[e]=new it(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){We[e]=new it(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){We[e]=new it(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){We[e]=new it(e,5,!1,e.toLowerCase(),null,!1,!1)});var cc=/[\-:]([a-z])/g;function dc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(cc,dc);We[t]=new it(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(cc,dc);We[t]=new it(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(cc,dc);We[t]=new it(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){We[e]=new it(e,1,!1,e.toLowerCase(),null,!1,!1)}),We.xlinkHref=new it("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){We[e]=new it(e,1,!1,e.toLowerCase(),null,!0,!0)});function fc(e,t,n,i){var r=We.hasOwnProperty(t)?We[t]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` `+r[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{xc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ss(e):""}function ck(e){switch(e.tag){case 5:return Ss(e.type);case 16:return Ss("Lazy");case 13:return Ss("Suspense");case 19:return Ss("SuspenseList");case 0:case 2:case 15:return e=_c(e.type,!1),e;case 11:return e=_c(e.type.render,!1),e;case 1:return e=_c(e.type,!0),e;default:return""}}function wc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case yr:return"Portal";case pc:return"Profiler";case hc:return"StrictMode";case gc:return"Suspense";case vc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fm:return(e.displayName||"Context")+".Consumer";case Rm:return(e._context.displayName||"Context")+".Provider";case mc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yc:return t=e.displayName||null,t!==null?t:wc(e.type)||"Memo";case Un:t=e._payload,e=e._init;try{return wc(e(t))}catch(n){}}return null}function dk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wc(t);case 8:return t===hc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Om(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fk(e){var t=Om(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xa(e){e._valueTracker||(e._valueTracker=fk(e))}function Im(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Om(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function _a(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Sc(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Vm(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=Kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zm(e,t){t=t.checked,t!=null&&fc(e,"checked",t,!1)}function Pc(e,t){zm(e,t);var n=Kn(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kc(e,t.type,n):t.hasOwnProperty("defaultValue")&&kc(e,t.type,Kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function kc(e,t,n){(t!=="number"||_a(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ps=Array.isArray;function xr(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r"+t.valueOf().toString()+"",t=wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ks(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cs={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},hk=["Webkit","ms","Moz","O"];Object.keys(Cs).forEach(function(e){hk.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cs[t]=Cs[e]})});function Gm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cs.hasOwnProperty(e)&&Cs[e]?(""+t).trim():t+"px"}function Xm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Gm(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}var pk=Se({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 Ec(e,t){if(t){if(pk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function $c(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mc=null;function Dc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ac=null,_r=null,wr=null;function qm(e){if(e=Gs(e)){if(typeof Ac!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Ua(t),Ac(e.stateNode,e.type,t))}}function Qm(e){_r?wr?wr.push(e):wr=[e]:_r=e}function Zm(){if(_r){var e=_r,t=wr;if(wr=_r=null,qm(e),t)for(e=0;e>>=0,e===0?32:31-(kk(e)/Ck|0)|0}var Ta=64,Ea=4194304;function Ms(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $a(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,r=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=Ms(a):(s&=o,s!==0&&(i=Ms(s)))}else o=n&~r,o!==0?i=Ms(o):s!==0&&(i=Ms(s));if(i===0)return 0;if(t!==0&&t!==i&&!(t&r)&&(r=i&-i,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0n;n++)t.push(e);return t}function Ds(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xt(t),e[t]=n}function Mk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0=Is),Cg=" ",Tg=!1;function Eg(e,t){switch(e){case"keyup":return rC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $g(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kr=!1;function oC(e,t){switch(e){case"compositionend":return $g(t);case"keypress":return t.which!==32?null:(Tg=!0,Cg);case"textInput":return e=t.data,e===Cg&&Tg?null:e;default:return null}}function aC(e,t){if(kr)return e==="compositionend"||!qc&&Eg(e,t)?(e=xg(),Ra=Wc=Qn=null,kr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ng(n)}}function Og(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Og(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ig(){for(var e=window,t=_a();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(i){n=!1}if(n)e=t.contentWindow;else break;t=_a(e.document)}return t}function Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function gC(e){var t=Ig(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Og(n.ownerDocument.documentElement,n)){if(i!==null&&Jc(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!e.extend&&s>i&&(r=i,i=s,s=r),r=jg(n,s);var o=jg(n,i);r&&o&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cr=null,ed=null,Hs=null,td=!1;function Vg(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;td||Cr==null||Cr!==_a(i)||(i=Cr,"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}),Hs&&Bs(Hs,i)||(Hs=i,i=Ba(ed,"onSelect"),0Dr||(e.current=hd[Dr],hd[Dr]=null,Dr--)}function pe(e,t){Dr++,hd[Dr]=e.current,e.current=t}var ti={},Xe=ei(ti),dt=ei(!1),Ri=ti;function Ar(e,t){var n=e.type.contextTypes;if(!n)return ti;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function ft(e){return e=e.childContextTypes,e!=null}function Ka(){ge(dt),ge(Xe)}function tv(e,t,n){if(Xe.current!==ti)throw Error(W(168));pe(Xe,t),pe(dt,n)}function nv(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in t))throw Error(W(108,dk(e)||"Unknown",r));return Se({},n,i)}function Ya(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,Ri=Xe.current,pe(Xe,e),pe(dt,dt.current),!0}function iv(e,t,n){var i=e.stateNode;if(!i)throw Error(W(169));n?(e=nv(e,t,Ri),i.__reactInternalMemoizedMergedChildContext=e,ge(dt),ge(Xe),pe(Xe,e)):ge(dt),pe(dt,n)}var Sn=null,Ga=!1,pd=!1;function rv(e){Sn===null?Sn=[e]:Sn.push(e)}function EC(e){Ga=!0,rv(e)}function ni(){if(!pd&&Sn!==null){pd=!0;var e=0,t=ce;try{var n=Sn;for(ce=1;e>=o,r-=o,Pn=1<<32-Xt(t)+r|n<M?(P=$,$=null):P=$.sibling;var E=f(p,$,b[M],w);if(E===null){$===null&&($=P);break}e&&$&&E.alternate===null&&t(p,$),g=s(E,g,M),k===null?S=E:k.sibling=E,k=E,$=P}if(M===b.length)return n(p,$),xe&&Ni(p,M),S;if($===null){for(;MM?(P=$,$=null):P=$.sibling;var F=f(p,$,E.value,w);if(F===null){$===null&&($=P);break}e&&$&&F.alternate===null&&t(p,$),g=s(F,g,M),k===null?S=F:k.sibling=F,k=F,$=P}if(E.done)return n(p,$),xe&&Ni(p,M),S;if($===null){for(;!E.done;M++,E=b.next())E=d(p,E.value,w),E!==null&&(g=s(E,g,M),k===null?S=E:k.sibling=E,k=E);return xe&&Ni(p,M),S}for($=i(p,$);!E.done;M++,E=b.next())E=h($,p,M,E.value,w),E!==null&&(e&&E.alternate!==null&&$.delete(E.key===null?M:E.key),g=s(E,g,M),k===null?S=E:k.sibling=E,k=E);return e&&$.forEach(function(C){return t(p,C)}),xe&&Ni(p,M),S}function x(p,g,b,w){if(typeof b=="object"&&b!==null&&b.type===br&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case ba:e:{for(var S=b.key,k=g;k!==null;){if(k.key===S){if(S=b.type,S===br){if(k.tag===7){n(p,k.sibling),g=r(k,b.props.children),g.return=p,p=g;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Un&&cv(S)===k.type){n(p,k.sibling),g=r(k,b.props),g.ref=Xs(p,k,b),g.return=p,p=g;break e}n(p,k);break}else t(p,k);k=k.sibling}b.type===br?(g=Wi(b.props.children,p.mode,w,b.key),g.return=p,p=g):(w=wl(b.type,b.key,b.props,null,p.mode,w),w.ref=Xs(p,g,b),w.return=p,p=w)}return o(p);case yr:e:{for(k=b.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(p,g.sibling),g=r(g,b.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=ff(b,p.mode,w),g.return=p,p=g}return o(p);case Un:return k=b._init,x(p,g,k(b._payload),w)}if(Ps(b))return m(p,g,b,w);if(ws(b))return v(p,g,b,w);Za(p,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(p,g.sibling),g=r(g,b),g.return=p,p=g):(n(p,g),g=df(b,p.mode,w),g.return=p,p=g),o(p)):n(p,g)}return x}var Nr=dv(!0),fv=dv(!1),Ja=ei(null),el=null,jr=null,xd=null;function _d(){xd=jr=el=null}function wd(e){var t=Ja.current;ge(Ja),e._currentValue=t}function Sd(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){el=e,xd=jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Nt(e){var t=e._currentValue;if(xd!==e)if(e={context:e,memoizedValue:t,next:null},jr===null){if(el===null)throw Error(W(308));jr=e,el.dependencies={lanes:0,firstContext:e}}else jr=jr.next=e;return t}var ji=null;function Pd(e){ji===null?ji=[e]:ji.push(e)}function hv(e,t,n,i){var r=t.interleaved;return r===null?(n.next=n,Pd(t)):(n.next=r.next,r.next=n),t.interleaved=n,Cn(e,i)}function Cn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ii=!1;function kd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ri(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ne&2){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Cn(e,n)}return r=i.interleaved,r===null?(t.next=t,Pd(i)):(t.next=r.next,r.next=t),i.interleaved=t,Cn(e,n)}function tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Ic(e,n)}}function mv(e,t){var n=e.updateQueue,i=e.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=t:s=s.next=t}else r=s=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nl(e,t,n,i){var r=e.updateQueue;ii=!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=e.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 m=e,v=a;switch(f=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=Se({},d,f);break e;case 2:ii=!0}}a.callback!==null&&a.lane!==0&&(e.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,t=r.shared.interleaved,t!==null){r=t;do o|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);Vi|=o,e.lanes=o,e.memoizedState=d}}function gv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var i=Md.transition;Md.transition={};try{e(!1),t()}finally{ce=n,Md.transition=i}}function Fv(){return jt().memoizedState}function AC(e,t,n){var i=li(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Nv(e))jv(t,n);else if(n=hv(e,t,n,i),n!==null){var r=st();tn(n,e,i,r),Ov(n,t,i)}}function LC(e,t,n){var i=li(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nv(e))jv(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,qt(a,o)){var l=t.interleaved;l===null?(r.next=r,Pd(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch(u){}finally{}n=hv(e,t,r,i),n!==null&&(r=st(),tn(n,e,i,r),Ov(n,t,i))}}function Nv(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function jv(e,t){Js=sl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ov(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Ic(e,n)}}var ll={readContext:Nt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useInsertionEffect:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useSyncExternalStore:qe,useId:qe,unstable_isNewReconciler:!1},RC={readContext:Nt,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:Tv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ol(4194308,4,Mv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ol(4194308,4,e,t)},useInsertionEffect:function(e,t){return ol(4,2,e,t)},useMemo:function(e,t){var n=un();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=un();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=AC.bind(null,ke,e),[i.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:kv,useDebugValue:jd,useDeferredValue:function(e){return un().memoizedState=e},useTransition:function(){var e=kv(!1),t=e[0];return e=DC.bind(null,e[1]),un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ke,r=un();if(xe){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ve===null)throw Error(W(349));Ii&30||xv(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,Tv(wv.bind(null,i,s,e),[e]),i.flags|=2048,no(9,_v.bind(null,i,s,n,t),void 0,null),n},useId:function(){var e=un(),t=Ve.identifierPrefix;if(xe){var n=kn,i=Pn;n=(i&~(1<<32-Xt(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=eo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(n,{is:i.is}):(e=o.createElement(n),n==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,n),e[an]=t,e[Ys]=i,ry(e,t,!1,!1),t.stateNode=e;e:{switch(o=$c(n,i),n){case"dialog":me("cancel",e),me("close",e),r=i;break;case"iframe":case"object":case"embed":me("load",e),r=i;break;case"video":case"audio":for(r=0;rHr&&(t.flags|=128,i=!0,io(s,!1),t.lanes=4194304)}else{if(!i)if(e=il(o),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),io(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!xe)return Qe(t),null}else 2*Ae()-s.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,i=!0,io(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=Pe.current,pe(Pe,i?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return lf(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Et&1073741824&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function BC(e,t){switch(gd(t),t.tag){case 1:return ft(t.type)&&Ka(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),ge(dt),ge(Xe),$d(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Td(t),null;case 13:if(ge(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(Pe),null;case 4:return Ir(),null;case 10:return wd(t.type._context),null;case 22:case 23:return lf(),null;case 24:return null;default:return null}}var fl=!1,Ze=!1,HC=typeof WeakSet=="function"?WeakSet:Set,Y=null;function zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ee(e,t,i)}else n.current=null}function Xd(e,t,n){try{n()}catch(i){Ee(e,t,i)}}var ay=!1;function WC(e,t){if(ad=Aa,e=Ig(),Jc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.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(w){n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,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===e)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(ld={focusedElem:e,selectionRange:n},Aa=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,x=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Zt(t.type,v),x);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(w){Ee(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=ay,ay=!1,m}function ro(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&Xd(t,n,s)}r=r.next}while(r!==i)}}function hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function qd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ly(e){var t=e.alternate;t!==null&&(e.alternate=null,ly(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[Ys],delete t[fd],delete t[CC],delete t[TC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uy(e){return e.tag===5||e.tag===3||e.tag===4}function cy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qd(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wa));else if(i!==4&&(e=e.child,e!==null))for(Qd(e,t,n),e=e.sibling;e!==null;)Qd(e,t,n),e=e.sibling}function Zd(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Zd(e,t,n),e=e.sibling;e!==null;)Zd(e,t,n),e=e.sibling}var Ue=null,Jt=!1;function si(e,t,n){for(n=n.child;n!==null;)dy(e,t,n),n=n.sibling}function dy(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Ca,n)}catch(a){}switch(n.tag){case 5:Ze||zr(n,t);case 6:var i=Ue,r=Jt;Ue=null,si(e,t,n),Ue=i,Jt=r,Ue!==null&&(Jt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Jt?(e=Ue,n=n.stateNode,e.nodeType===8?dd(e.parentNode,n):e.nodeType===1&&dd(e,n),Ns(e)):dd(Ue,n.stateNode));break;case 4:i=Ue,r=Jt,Ue=n.stateNode.containerInfo,Jt=!0,si(e,t,n),Ue=i,Jt=r;break;case 0:case 11:case 14:case 15:if(!Ze&&(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)&&Xd(n,t,o),r=r.next}while(r!==i)}si(e,t,n);break;case 1:if(!Ze&&(zr(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Ee(n,t,a)}si(e,t,n);break;case 21:si(e,t,n);break;case 22:n.mode&1?(Ze=(i=Ze)||n.memoizedState!==null,si(e,t,n),Ze=i):si(e,t,n);break;default:si(e,t,n)}}function fy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new HC),t.forEach(function(i){var r=JC.bind(null,e,i);n.has(i)||(n.add(i),i.then(r,r))})}}function en(e,t){var n=t.deletions;if(n!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=Ae()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*KC(i/1960))-i,10e?16:e,ai===null)var i=!1;else{if(e=ai,ai=null,yl=0,ne&6)throw Error(W(331));var r=ne;for(ne|=4,Y=e.current;Y!==null;){var s=Y,o=s.child;if(Y.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lAe()-tf?Bi(e,0):ef|=n),mt(e,t)}function ky(e,t){t===0&&(e.mode&1?(t=Ea,Ea<<=1,!(Ea&130023424)&&(Ea=4194304)):t=1);var n=st();e=Cn(e,t),e!==null&&(Ds(e,t,n),mt(e,n))}function ZC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ky(e,n)}function JC(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(W(314))}i!==null&&i.delete(t),ky(e,n)}var Cy;Cy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)ht=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ht=!1,VC(e,t,n);ht=!!(e.flags&131072)}else ht=!1,xe&&t.flags&1048576&&sv(t,qa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;dl(e,t),e=t.pendingProps;var r=Ar(t,Xe.current);Or(t,n),r=Ad(null,t,i,e,r,n);var s=Ld();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ft(i)?(s=!0,Ya(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,kd(t),r.updater=ul,t.stateNode=r,r._reactInternals=t,Id(t,i,e,n),t=Hd(null,t,i,!0,s,n)):(t.tag=0,xe&&s&&md(t),rt(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=tT(i),e=Zt(i,e),r){case 0:t=Bd(null,t,i,e,n);break e;case 1:t=Zv(null,t,i,e,n);break e;case 11:t=Yv(null,t,i,e,n);break e;case 14:t=Gv(null,t,i,Zt(i.type,e),n);break e}throw Error(W(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:Zt(i,r),Bd(e,t,i,r,n);case 1:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:Zt(i,r),Zv(e,t,i,r,n);case 3:e:{if(Jv(t),e===null)throw Error(W(387));i=t.pendingProps,s=t.memoizedState,r=s.element,pv(e,t),nl(t,i,null,n);var o=t.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=Vr(Error(W(423)),t),t=ey(e,t,i,n,r);break e}else if(i!==r){r=Vr(Error(W(424)),t),t=ey(e,t,i,n,r);break e}else for(Tt=Jn(t.stateNode.containerInfo.firstChild),Ct=t,xe=!0,Qt=null,n=fv(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fr(),i===r){t=En(e,t,n);break e}rt(e,t,i,n)}t=t.child}return t;case 5:return vv(t),e===null&&yd(t),i=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,o=r.children,ud(i,r)?o=null:s!==null&&ud(i,s)&&(t.flags|=32),Qv(e,t),rt(e,t,o,n),t.child;case 6:return e===null&&yd(t),null;case 13:return ty(e,t,n);case 4:return Cd(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Nr(t,null,i,n):rt(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:Zt(i,r),Yv(e,t,i,r,n);case 7:return rt(e,t,t.pendingProps,n),t.child;case 8:return rt(e,t,t.pendingProps.children,n),t.child;case 12:return rt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,s=t.memoizedProps,o=r.value,pe(Ja,i._currentValue),i._currentValue=o,s!==null)if(qt(s.value,o)){if(s.children===r.children&&!dt.current){t=En(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);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=Tn(-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),Sd(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(W(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Sd(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}rt(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,Or(t,n),r=Nt(r),i=i(r),t.flags|=1,rt(e,t,i,n),t.child;case 14:return i=t.type,r=Zt(i,t.pendingProps),r=Zt(i.type,r),Gv(e,t,i,r,n);case 15:return Xv(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:Zt(i,r),dl(e,t),t.tag=1,ft(i)?(e=!0,Ya(t)):e=!1,Or(t,n),Vv(t,i,r),Id(t,i,r,n),Hd(null,t,i,!0,e,n);case 19:return iy(e,t,n);case 22:return qv(e,t,n)}throw Error(W(156,t.tag))};function Ty(e,t){return og(e,t)}function eT(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,i){return new eT(e,t,n,i)}function cf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tT(e){if(typeof e=="function")return cf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mc)return 11;if(e===yc)return 14}return 2}function ci(e,t){var n=e.alternate;return n===null?(n=It(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wl(e,t,n,i,r,s){var o=2;if(i=e,typeof e=="function")cf(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case br:return Wi(n.children,r,s,t);case hc:o=8,r|=8;break;case pc:return e=It(12,n,t,r|2),e.elementType=pc,e.lanes=s,e;case gc:return e=It(13,n,t,r),e.elementType=gc,e.lanes=s,e;case vc:return e=It(19,n,t,r),e.elementType=vc,e.lanes=s,e;case Nm:return Sl(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rm:o=10;break e;case Fm:o=9;break e;case mc:o=11;break e;case yc:o=14;break e;case Un:o=16,i=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=It(o,n,t,r),t.elementType=e,t.type=i,t.lanes=s,t}function Wi(e,t,n,i){return e=It(7,e,i,t),e.lanes=n,e}function Sl(e,t,n,i){return e=It(22,e,i,t),e.elementType=Nm,e.lanes=n,e.stateNode={isHidden:!1},e}function df(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function ff(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nT(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function hf(e,t,n,i,r,s,o,a,l){return e=new nT(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=It(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kd(s),e}function iT(e,t,n){var i=3e,isStatic:!1,reducedMotion:"never"});class uT extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function cT({children:e,isPresent:t}){const n=_.useId(),i=_.useRef(null),r=_.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=_.useContext(yf);return _.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=r.current;if(t||!i.current||!o||!a)return;i.current.dataset.motionPopId=n;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; height: ${a}px !important; top: ${l}px !important; left: ${u}px !important; } `),()=>{document.head.removeChild(c)}},[t]),y.jsx(uT,{isPresent:t,childRef:i,sizeRef:r,children:_.cloneElement(e,{ref:i})})}const dT=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:o})=>{const a=Ml(fT),l=_.useId(),u=_.useCallback(d=>{a.set(d,!0);for(const f of a.values())if(!f)return;i&&i()},[a,i]),c=_.useMemo(()=>({id:l,initial:t,isPresent:n,custom:r,onExitComplete:u,register:d=>(a.set(d,!1),()=>a.delete(d))}),s?[Math.random(),u]:[n,u]);return _.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),_.useEffect(()=>{!n&&!a.size&&i&&i()},[n]),o==="popLayout"&&(e=y.jsx(cT,{isPresent:n,children:e})),y.jsx(Dl.Provider,{value:c,children:e})};function fT(){return new Map}function Fy(e=!0){const t=_.useContext(Dl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,s=_.useId();_.useEffect(()=>{e&&r(s)},[e]);const o=_.useCallback(()=>e&&i&&i(s),[s,i,e]);return!n&&i?[!1,o]:[!0]}const Al=e=>e.key||"";function Ny(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const bf=typeof window!="undefined",xf=bf?_.useLayoutEffect:_.useEffect,hT=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:o=!1})=>{const[a,l]=Fy(o),u=_.useMemo(()=>Ny(e),[e]),c=o&&!a?[]:u.map(Al),d=_.useRef(!0),f=_.useRef(u),h=Ml(()=>new Map),[m,v]=_.useState(u),[x,p]=_.useState(u);xf(()=>{d.current=!1,f.current=u;for(let w=0;w{const S=Al(w),k=o&&!a?!1:u===x||c.includes(S),$=()=>{if(h.has(S))h.set(S,!0);else return;let M=!0;h.forEach(P=>{P||(M=!1)}),M&&(b==null||b(),p(f.current),o&&(l==null||l()),i&&i())};return y.jsx(dT,{isPresent:k,initial:!d.current||n?void 0:!1,custom:k?void 0:t,presenceAffectsLayout:r,mode:s,onExitComplete:k?void 0:$,children:w},S)})})},ot=e=>e;let pT=ot,jy=ot;function _f(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ui=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i},Mn=e=>e*1e3,Dn=e=>e/1e3,mT={useManualTiming:!1};function gT(e){let t=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),e()),u(o)}const l={schedule:(u,c=!1,d=!1)=>{const h=d&&i?t: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,[t,n]=[n,t],t.forEach(a),t.clear(),i=!1,r&&(r=!1,l.process(u))}};return l}const Ll=["read","resolveKeyframes","update","preRender","render","postRender"],vT=40;function Oy(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ll.reduce((p,g)=>(p[g]=gT(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,vT),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&&t&&(i=!1,e(h))},m=()=>{n=!0,i=!0,r.isProcessing||e(h)};return{schedule:Ll.reduce((p,g)=>{const b=o[g];return p[g]=(w,S=!1,k=!1)=>(n||m(),b.schedule(w,S,k)),p},{}),cancel:p=>{for(let g=0;gVy[e].some(n=>!!t[n])};function yT(e){for(const t in e)Ur[t]=T(T({},Ur[t]),e[t])}const bT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bT.has(e)}let zy=e=>!Rl(e);function xT(e){e&&(zy=t=>t.startsWith("on")?!Rl(t):e(t))}try{xT(require("@emotion/is-prop-valid").default)}catch(e){}function _T(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(zy(r)||n===!0&&Rl(r)||!t&&!Rl(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}function wT(e){if(typeof Proxy=="undefined")return e;const t=new Map,n=(...i)=>e(...i);return new Proxy(n,{get:(i,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Fl=_.createContext({});function uo(e){return typeof e=="string"||Array.isArray(e)}function Nl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Sf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pf=["initial",...Sf];function jl(e){return Nl(e.animate)||Pf.some(t=>uo(e[t]))}function By(e){return!!(jl(e)||e.variants)}function ST(e,t){if(jl(e)){const{initial:n,animate:i}=e;return{initial:n===!1||uo(n)?n:void 0,animate:uo(i)?i:void 0}}return e.inherit!==!1?t:{}}function PT(e){const{initial:t,animate:n}=ST(e,_.useContext(Fl));return _.useMemo(()=>({initial:t,animate:n}),[Hy(t),Hy(n)])}function Hy(e){return Array.isArray(e)?e.join(" "):e}const kT=Symbol.for("motionComponentSymbol");function Kr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function CT(e,t,n){return _.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Kr(n)&&(n.current=i))},[t])}const kf=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wy="data-"+kf("framerAppearId"),{schedule:Cf}=Oy(queueMicrotask,!1),Uy=_.createContext({});function TT(e,t,n,i,r){var s,o;const{visualElement:a}=_.useContext(Fl),l=_.useContext(Iy),u=_.useContext(Dl),c=_.useContext(yf).reducedMotion,d=_.useRef(null);i=i||l.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,h=_.useContext(Uy);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&ET(d.current,n,r,h);const m=_.useRef(!1);_.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const v=n[Wy],x=_.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,v)));return xf(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Cf.render(f.render),x.current&&f.animationState&&f.animationState.animateChanges())}),_.useEffect(()=>{f&&(!x.current&&f.animationState&&f.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)===null||p===void 0||p.call(window,v)}),x.current=!1))}),f}function ET(e,t,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ky(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!o||a&&Kr(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}function Ky(e){if(e)return e.options.allowProjection!==!1?e.projection:Ky(e.parent)}function $T({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){var s,o;e&&yT(e);function a(u,c){let d;const f=B(T(T({},_.useContext(yf)),u),{layoutId:MT(u)}),{isStatic:h}=f,m=PT(u),v=i(u,h);if(!h&&bf){DT();const x=AT(f);d=x.MeasureLayout,m.visualElement=TT(r,v,f,t,x.ProjectionNode)}return y.jsxs(Fl.Provider,{value:m,children:[d&&m.visualElement?y.jsx(d,T({visualElement:m.visualElement},f)):null,n(r,u,CT(v,m.visualElement,c),v,h,m.visualElement)]})}a.displayName=`motion.${typeof r=="string"?r:`create(${(o=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&o!==void 0?o:""})`}`;const l=_.forwardRef(a);return l[kT]=r,l}function MT({layoutId:e}){const t=_.useContext(vf).id;return t&&e!==void 0?t+"-"+e:e}function DT(e,t){_.useContext(Iy).strict}function AT(e){const{drag:t,layout:n}=Ur;if(!t&&!n)return{};const i=T(T({},t),n);return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const LT=["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 Tf(e){return typeof e!="string"||e.includes("-")?!1:!!(LT.indexOf(e)>-1||/[A-Z]/u.test(e))}function Yy(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Ef(e,t,n,i){if(typeof t=="function"){const[r,s]=Yy(i);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=Yy(i);t=t(n!==void 0?n:e.custom,r,s)}return t}const $f=e=>Array.isArray(e),RT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),FT=e=>$f(e)?e[e.length-1]||0:e,Je=e=>!!(e&&e.getVelocity);function Ol(e){const t=Je(e)?e.get():e;return RT(t)?t.toValue():t}function NT({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},i,r,s){const o={latestValues:jT(i,r,s,e),renderState:t()};return n&&(o.onMount=a=>n(T({props:i,current:a},o)),o.onUpdate=a=>n(a)),o}const Gy=e=>(t,n)=>{const i=_.useContext(Fl),r=_.useContext(Dl),s=()=>NT(e,t,i,r);return n?s():Ml(s)};function jT(e,t,n,i){const r={},s=i(e,{});for(const h in s)r[h]=Ol(s[h]);let{initial:o,animate:a}=e;const l=jl(e),u=By(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Nl(d)){const h=Array.isArray(d)?d:[d];for(let m=0;mt=>typeof t=="string"&&t.startsWith(e),qy=Xy("--"),OT=Xy("var(--"),Mf=e=>OT(e)?IT.test(e.split("/*")[0].trim()):!1,IT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,fn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},co=B(T({},Gr),{transform:e=>fn(0,1,e)}),Il=B(T({},Gr),{default:1}),fo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),di=fo("deg"),hn=fo("%"),G=fo("px"),VT=fo("vh"),zT=fo("vw"),Zy=B(T({},hn),{parse:e=>hn.parse(e)/100,transform:e=>hn.transform(e*100)}),BT={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},HT={rotate:di,rotateX:di,rotateY:di,rotateZ:di,scale:Il,scaleX:Il,scaleY:Il,scaleZ:Il,skew:di,skewX:di,skewY:di,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:co,originX:Zy,originY:Zy,originZ:G},Jy=B(T({},Gr),{transform:Math.round}),Df=B(T(T({},BT),HT),{zIndex:Jy,size:G,fillOpacity:co,strokeOpacity:co,numOctaves:Jy}),WT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UT=Yr.length;function KT(e,t,n){let i="",r=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}}),t0=()=>B(T({},Rf()),{attrs:{}}),Ff=e=>typeof e=="string"&&e.toLowerCase()==="svg";function n0(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const s in n)e.style.setProperty(s,n[s])}const i0=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 r0(e,t,n,i){n0(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(i0.has(r)?r:kf(r),t.attrs[r])}const Vl={};function QT(e){Object.assign(Vl,e)}function s0(e,{layout:t,layoutId:n}){return Ki.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vl[e]||e==="opacity")}function Nf(e,t,n){var i;const{style:r}=e,s={};for(const o in r)(Je(r[o])||t.style&&Je(t.style[o])||s0(o,e)||((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 o0(e,t,n){const i=Nf(e,t,n);for(const r in e)if(Je(e[r])||Je(t[r])){const s=Yr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=e[r]}return i}function ZT(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch(n){t.dimensions={x:0,y:0,width:0,height:0}}}const a0=["x","y","width","height","cx","cy","r"],JT={useVisualState:Gy({scrapeMotionValuesFromProps:o0,createRenderState:t0,onUpdate:({props:e,prevProps:t,current:n,renderState:i,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in r)if(Ki.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a{ZT(n,i),le.render(()=>{Lf(i,r,Ff(n.tagName),e.transformTemplate),r0(n,i)})})}})},e2={useVisualState:Gy({scrapeMotionValuesFromProps:Nf,createRenderState:Rf})};function l0(e,t,n){for(const i in t)!Je(t[i])&&!s0(i,n)&&(e[i]=t[i])}function t2({transformTemplate:e},t){return _.useMemo(()=>{const n=Rf();return Af(n,t,e),Object.assign({},n.vars,n.style)},[t])}function n2(e,t){const n=e.style||{},i={};return l0(i,n,e),Object.assign(i,t2(e,t)),i}function i2(e,t){const n={},i=n2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}function r2(e,t,n,i){const r=_.useMemo(()=>{const s=t0();return Lf(s,t,Ff(i),e.transformTemplate),B(T({},s.attrs),{style:T({},s.style)})},[t]);if(e.style){const s={};l0(s,e.style,e),r.style=T(T({},s),r.style)}return r}function s2(e=!1){return(n,i,r,{latestValues:s},o)=>{const l=(Tf(n)?r2:i2)(i,s,o,n),u=_T(i,typeof n=="string",e),c=n!==_.Fragment?B(T(T({},u),l),{ref:r}):{},{children:d}=i,f=_.useMemo(()=>Je(d)?d.get():d,[d]);return _.createElement(n,B(T({},c),{children:f}))}}function o2(e,t){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const s=Tf(i)?JT:e2,o=B(T({},s),{preloadedFeatures:e,useRender:s2(r),createVisualElement:t,Component:i});return $T(o)}}function u0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;iwindow.ScrollTimeline!==void 0);class a2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i{if(c0()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{i.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class l2 extends a2{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function jf(e,t){return e?e[t]||e.default||e:void 0}const Of=2e4;function d0(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t=Of?1/0:t}function If(e){return typeof e=="function"}function f0(e,t){e.timeline=t,e.onfinish=null}const Vf=e=>Array.isArray(e)&&typeof e[0]=="number",u2={linearEasing:void 0};function c2(e,t){const n=_f(e);return()=>{var i;return(i=u2[t])!==null&&i!==void 0?i:n()}}const Bl=c2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),h0=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let s=0;s`cubic-bezier(${e}, ${t}, ${n}, ${i})`,zf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ho([0,.65,.55,1]),circOut:ho([.55,0,1,.45]),backIn:ho([.31,.01,.66,-.59]),backOut:ho([.33,1.53,.69,.99])};function m0(e,t){if(e)return typeof e=="function"&&Bl()?h0(e,t):Vf(e)?ho(e):Array.isArray(e)?e.map(n=>m0(n,t)||zf.easeOut):zf[e]}const nn={x:!1,y:!1};function g0(){return nn.x||nn.y}function v0(e,t,n){var i;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(i=void 0)!==null&&i!==void 0?i:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function y0(e,t){const n=v0(e),i=new AbortController,r=B(T({passive:!0},t),{signal:i.signal});return[n,r,()=>i.abort()]}function b0(e){return t=>{t.pointerType==="touch"||g0()||e(t)}}function d2(e,t,n={}){const[i,r,s]=y0(e,n),o=b0(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=b0(d=>{u(d),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,r)});return i.forEach(a=>{a.addEventListener("pointerenter",o,r)}),s}const x0=(e,t)=>t?e===t?!0:x0(e,t.parentElement):!1,Bf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,f2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function h2(e){return f2.has(e.tagName)||e.tabIndex!==-1}const po=new WeakSet;function _0(e){return t=>{t.key==="Enter"&&e(t)}}function Hf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const p2=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=_0(()=>{if(po.has(n))return;Hf(n,"down");const r=_0(()=>{Hf(n,"up")}),s=()=>Hf(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function w0(e){return Bf(e)&&!g0()}function m2(e,t,n={}){const[i,r,s]=y0(e,n),o=a=>{const l=a.currentTarget;if(!w0(a)||po.has(l))return;po.add(l);const u=t(a),c=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!w0(h)||!po.has(l))&&(po.delete(l),typeof u=="function"&&u(h,{success:m}))},d=h=>{c(h,n.useGlobalTarget||x0(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,r),window.addEventListener("pointercancel",f,r)};return i.forEach(a=>{!h2(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),a.addEventListener("focus",u=>p2(u,r),r)}),s}function g2(e){return e==="x"||e==="y"?nn[e]?null:(nn[e]=!0,()=>{nn[e]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}const S0=new Set(["width","height","top","left","right","bottom",...Yr]);let Hl;function v2(){Hl=void 0}const pn={now:()=>(Hl===void 0&&pn.set(ze.isProcessing||mT.useManualTiming?ze.timestamp:performance.now()),Hl),set:e=>{Hl=e,queueMicrotask(v2)}};function Wf(e,t){e.indexOf(t)===-1&&e.push(t)}function Uf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kf{constructor(){this.subscriptions=[]}add(t){return Wf(this.subscriptions,t),()=>Uf(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let s=0;s!isNaN(parseFloat(e));class b2{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=pn.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(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=y2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kf);const i=this.events[t].add(n);return t==="change"?()=>{i(),le.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>P0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,P0);return Yf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function An(e,t){return new b2(e,t)}function x2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,An(n))}function _2(e,t){let o=zl(e,t)||{},{transitionEnd:i={},transition:r={}}=o,s=te(o,["transitionEnd","transition"]);s=T(T({},s),i);for(const a in s){const l=FT(s[a]);x2(e,a,l)}}function w2(e){return!!(Je(e)&&e.add)}function Gf(e,t){const n=e.getValue("willChange");if(w2(n))return n.add(t)}function k0(e){return e.props[Wy]}const C0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,S2=1e-7,P2=12;function k2(e,t,n,i,r){let s,o,a=0;do o=t+(n-t)/2,s=C0(o,i,r)-e,s>0?n=o:t=o;while(Math.abs(s)>S2&&++ak2(s,0,1,e,n);return s=>s===0||s===1?s:C0(r(s),t,i)}const T0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,E0=e=>t=>1-e(1-t),$0=mo(.33,1.53,.69,.99),Xf=E0($0),M0=T0(Xf),D0=e=>(e*=2)<1?.5*Xf(e):.5*(2-Math.pow(2,-10*(e-1))),qf=e=>1-Math.sin(Math.acos(e)),A0=E0(qf),L0=T0(qf),R0=e=>/^0[^.\s]+$/u.test(e);function C2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||R0(e):!0}const go=e=>Math.round(e*1e5)/1e5,Qf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T2(e){return e==null}const E2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zf=(e,t)=>n=>!!(typeof n=="string"&&E2.test(n)&&n.startsWith(e)||t&&!T2(n)&&Object.prototype.hasOwnProperty.call(n,t)),F0=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,s,o,a]=i.match(Qf);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$2=e=>fn(0,255,e),Jf=B(T({},Gr),{transform:e=>Math.round($2(e))}),Yi={test:Zf("rgb","red"),parse:F0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Jf.transform(e)+", "+Jf.transform(t)+", "+Jf.transform(n)+", "+go(co.transform(i))+")"};function M2(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const eh={test:Zf("#"),parse:M2,transform:Yi.transform},Xr={test:Zf("hsl","hue"),parse:F0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+hn.transform(go(t))+", "+hn.transform(go(n))+", "+go(co.transform(i))+")"},et={test:e=>Yi.test(e)||eh.test(e)||Xr.test(e),parse:e=>Yi.test(e)?Yi.parse(e):Xr.test(e)?Xr.parse(e):eh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yi.transform(e):Xr.transform(e)},D2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function A2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Qf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(D2))===null||n===void 0?void 0:n.length)||0)>0}const N0="number",j0="color",L2="var",R2="var(",O0="${}",F2=/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 vo(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(F2,l=>(et.test(l)?(i.color.push(s),r.push(j0),n.push(et.parse(l))):l.startsWith(R2)?(i.var.push(s),r.push(L2),n.push(l)):(i.number.push(s),r.push(N0),n.push(parseFloat(l))),++s,O0)).split(O0);return{values:n,split:a,indexes:i,types:r}}function I0(e){return vo(e).values}function V0(e){const{split:t,types:n}=vo(e),i=t.length;return r=>{let s="";for(let o=0;otypeof e=="number"?0:e;function j2(e){const t=I0(e);return V0(e)(t.map(N2))}const fi={test:A2,parse:I0,createTransformer:V0,getAnimatableNone:j2},O2=new Set(["brightness","contrast","saturate","opacity"]);function I2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Qf)||[];if(!i)return e;const r=n.replace(i,"");let s=O2.has(t)?1:0;return i!==n&&(s*=100),t+"("+s+r+")"}const V2=/\b([a-z-]*)\(.*?\)/gu,th=B(T({},fi),{getAnimatableNone:e=>{const t=e.match(V2);return t?t.map(I2).join(" "):e}}),z2=B(T({},Df),{color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:th,WebkitFilter:th}),nh=e=>z2[e];function z0(e,t){let n=nh(e);return n!==th&&(n=fi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const B2=new Set(["auto","none","0"]);function H2(e,t,n){let i=0,r;for(;ie===Gr||e===G,H0=(e,t)=>parseFloat(e.split(", ")[t]),W0=(e,t)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return H0(r[1],t);{const s=i.match(/^matrix\((.+)\)$/u);return s?H0(s[1],e):0}},W2=new Set(["x","y","z"]),U2=Yr.filter(e=>!W2.has(e));function K2(e){const t=[];return U2.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const qr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:W0(4,13),y:W0(5,14)};qr.translateX=qr.x,qr.translateY=qr.y;const Gi=new Set;let ih=!1,rh=!1;function U0(){if(rh){const e=Array.from(Gi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=K2(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.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)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}rh=!1,ih=!1,Gi.forEach(e=>e.complete()),Gi.clear()}function K0(){Gi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rh=!0)})}function Y2(){K0(),U0()}class sh{constructor(t,n,i,r,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Gi.add(this),ih||(ih=!0,le.read(K0),le.resolveKeyframes(U0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;for(let s=0;s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),G2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function X2(e){const t=G2.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n!=null?n:i}`,r]}function G0(e,t,n=1){const[i,r]=X2(e);if(!i)return;const s=window.getComputedStyle(t).getPropertyValue(i);if(s){const o=s.trim();return Y0(o)?parseFloat(o):o}return Mf(r)?G0(r,t,n+1):r}const X0=e=>t=>t.test(e),q0=[Gr,G,hn,di,zT,VT,{test:e=>e==="auto",parse:e=>e}],Q0=e=>q0.find(X0(e));class Z0 extends sh{constructor(t,n,i,r,s){super(t,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const J0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fi.test(e)||e==="0")&&!e.startsWith("url("));function q2(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Wl(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(Z2),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const J2=40;class eb{constructor(l){var u=l,{autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o="loop"}=u,a=te(u,["autoplay","delay","type","repeat","repeatDelay","repeatType"]);this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=pn.now(),this.options=T({autoplay:t,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:o},a),this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>J2?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Y2(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=pn.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Q2(t,i,r,s))if(o)this.options.duration=0;else{l&&l(Wl(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved=T({keyframes:t,finalKeyframe:n},c),this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ce=(e,t,n)=>e+(t-e)*n;function oh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eE({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,s=0,o=0;if(!t)r=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=oh(l,a,e+1/3),s=oh(l,a,e),o=oh(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}function Ul(e,t){return n=>n>0?t:e}const ah=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},tE=[eh,Yi,Xr],nE=e=>tE.find(t=>t.test(e));function tb(e){const t=nE(e);if(!t)return!1;let n=t.parse(e);return t===Xr&&(n=eE(n)),n}const nb=(e,t)=>{const n=tb(e),i=tb(t);if(!n||!i)return Ul(e,t);const r=T({},n);return s=>(r.red=ah(n.red,i.red,s),r.green=ah(n.green,i.green,s),r.blue=ah(n.blue,i.blue,s),r.alpha=Ce(n.alpha,i.alpha,s),Yi.transform(r))},iE=(e,t)=>n=>t(e(n)),yo=(...e)=>e.reduce(iE),lh=new Set(["none","hidden"]);function rE(e,t){return lh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sE(e,t){return n=>Ce(e,t,n)}function uh(e){return typeof e=="number"?sE:typeof e=="string"?Mf(e)?Ul:et.test(e)?nb:lE:Array.isArray(e)?ib:typeof e=="object"?et.test(e)?nb:oE:Ul}function ib(e,t){const n=[...e],i=n.length,r=e.map((s,o)=>uh(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in i)n[s]=i[s](r);return n}}function aE(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s{const n=fi.createTransformer(t),i=vo(e),r=vo(t);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?lh.has(e)&&!r.values.length||lh.has(t)&&!i.values.length?rE(e,t):yo(ib(aE(i,r),r.values),n):Ul(e,t)};function rb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ce(e,t,n):uh(e)(e,t)}const uE=5;function sb(e,t,n){const i=Math.max(t-uE,0);return Yf(n-e(i),t-i)}const $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ob=.001;function cE({duration:e=$e.duration,bounce:t=$e.bounce,velocity:n=$e.velocity,mass:i=$e.mass}){let r,s,o=1-t;o=fn($e.minDamping,$e.maxDamping,o),e=fn($e.minDuration,$e.maxDuration,Dn(e)),o<1?(r=u=>{const c=u*o,d=c*e,f=c-n,h=ch(u,o),m=Math.exp(-d);return ob-f/h*m},s=u=>{const d=u*o*e,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-d),v=ch(Math.pow(u,2),o);return(-r(u)+ob>0?-1:1)*((f-h)*m)/v}):(r=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-.001+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=fE(r,s,a);if(e=Mn(e),isNaN(l))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const dE=12;function fE(e,t,n){let i=n;for(let r=1;re[n]!==void 0)}function mE(e){let t=T({velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1},e);if(!ab(e,pE)&&ab(e,hE))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*fn(.05,1,1-(e.bounce||0))*Math.sqrt(r);t=B(T({},t),{mass:$e.mass,stiffness:r,damping:s})}else{const n=cE(e);t=B(T(T({},t),n),{mass:$e.mass}),t.isResolvedFromDuration=!0}return t}function lb(e=$e.visualDuration,t=$e.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=mE(B(T({},n),{velocity:-Dn(n.velocity||0)})),m=f||0,v=u/(2*Math.sqrt(l*c)),x=o-s,p=Dn(Math.sqrt(l/c)),g=Math.abs(x)<5;i||(i=g?$e.restSpeed.granular:$e.restSpeed.default),r||(r=g?$e.restDelta.granular:$e.restDelta.default);let b;if(v<1){const S=ch(p,v);b=k=>{const $=Math.exp(-v*p*k);return o-$*((m+v*p*x)/S*Math.sin(S*k)+x*Math.cos(S*k))}}else if(v===1)b=S=>o-Math.exp(-p*S)*(x+(m+p*x)*S);else{const S=p*Math.sqrt(v*v-1);b=k=>{const $=Math.exp(-v*p*k),M=Math.min(S*k,300);return o-$*((m+v*p*x)*Math.sinh(M)+S*x*Math.cosh(M))/S}}const w={calculatedDuration:h&&d||null,next:S=>{const k=b(S);if(h)a.done=S>=d;else{let $=0;v<1&&($=S===0?Mn(m):sb(b,S,k));const M=Math.abs($)<=i,P=Math.abs(o-k)<=r;a.done=M&&P}return a.value=a.done?o:k,a},toString:()=>{const S=Math.min(d0(w),Of),k=h0($=>w.next(S*$).value,S,30);return S+"ms "+k}};return w}function ub({keyframes:e,velocity:t=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=e[0],f={done:!1,value:d},h=M=>a!==void 0&&Ml,m=M=>a===void 0?l:l===void 0||Math.abs(a-M)-v*Math.exp(-M/i),b=M=>p+g(M),w=M=>{const P=g(M),E=b(M);f.done=Math.abs(P)<=u,f.value=f.done?p:E};let S,k;const $=M=>{h(f.value)&&(S=M,k=lb({keyframes:[f.value,m(f.value)],velocity:sb(b,M,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:c}))};return $(0),{calculatedDuration:null,next:M=>{let P=!1;return!k&&S===void 0&&(P=!0,w(M),$(M)),S!==void 0&&M>=S?k.next(M-S):(!P&&w(M),f)}}}const gE=mo(.42,0,1,1),vE=mo(0,0,.58,1),cb=mo(.42,0,.58,1),yE=e=>Array.isArray(e)&&typeof e[0]!="number",bE={linear:ot,easeIn:gE,easeInOut:cb,easeOut:vE,circIn:qf,circInOut:L0,circOut:A0,backIn:Xf,backInOut:M0,backOut:$0,anticipate:D0},db=e=>{if(Vf(e)){jy(e.length===4);const[t,n,i,r]=e;return mo(t,n,i,r)}else if(typeof e=="string")return bE[e];return e};function xE(e,t,n){const i=[],r=n||rb,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xE(t,i,r),l=a.length,u=c=>{if(o&&c1)for(;du(fn(e[0],e[s-1],c)):u}function _E(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=Ui(0,t,i);e.push(Ce(n,1,r))}}function hb(e){const t=[0];return _E(t,e.length-1),t}function wE(e,t){return e.map(n=>n*t)}function SE(e,t){return e.map(()=>t||cb).splice(0,e.length-1)}function Kl({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=yE(i)?i.map(db):db(i),s={done:!1,value:t[0]},o=wE(n&&n.length===t.length?n:hb(t),e),a=fb(o,t,{ease:Array.isArray(r)?r:SE(t,r)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const PE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>le.update(t,!0),stop:()=>dn(t),now:()=>ze.isProcessing?ze.timestamp:pn.now()}},kE={decay:ub,inertia:ub,tween:Kl,keyframes:Kl,spring:lb},CE=e=>e/100;class dh extends eb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:i,element:r,keyframes:s}=this.options,o=(r==null?void 0:r.KeyframeResolver)||sh,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,i,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:o=0}=this.options,a=If(n)?n:kE[n]||Kl;let l,u;a!==Kl&&typeof t[0]!="number"&&(l=yo(CE,rb(t[0],t[1])),t=[0,100]);const c=a(B(T({},this.options),{keyframes:t}));s==="mirror"&&(u=a(B(T({},this.options),{keyframes:[...t].reverse(),velocity:-o}))),c.calculatedDuration===null&&(c.calculatedDuration=d0(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:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:i}=this;if(!i){const{keyframes:M}=this.options;return{done:!0,value:M[M.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:m,repeatDelay:v,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),g=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let b=this.currentTime,w=s;if(h){const M=Math.min(this.currentTime,c)/d;let P=Math.floor(M),E=M%1;!E&&M>=1&&(E=1),E===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(m==="reverse"?(E=1-E,v&&(E-=v/d)):m==="mirror"&&(w=o)),b=fn(0,1,E)*d}const S=g?{done:!1,value:l[0]}:w.next(b);a&&(S.value=a(S.value));let{done:k}=S;!g&&u!==null&&(k=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return $&&r!==void 0&&(S.value=Wl(l,this.options,r)),x&&x(S.value),$&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Dn(t.calculatedDuration):0}get time(){return Dn(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Dn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=PE,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=t(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 t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const TE=new Set(["opacity","clipPath","filter","transform"]);function EE(e,t,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=m0(a,r);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:i,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const $E=_f(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yl=10,ME=2e4;function DE(e){return If(e.type)||e.type==="spring"||!p0(e.ease)}function AE(e,t){const n=new dh(B(T({},t),{keyframes:e,repeat:0,delay:0,isGenerator:!0}));let i={done:!1,value:e[0]};const r=[];let s=0;for(;!i.done&&sthis.onKeyframesResolved(o,a),n,i,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:i=300,times:r,ease:s,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Bl()&&LE(s)&&(s=pb[s]),DE(this.options)){const d=this.options,{onComplete:f,onUpdate:h,motionValue:m,element:v}=d,x=te(d,["onComplete","onUpdate","motionValue","element"]),p=AE(t,x);t=p.keyframes,t.length===1&&(t[1]=t[0]),i=p.duration,r=p.times,s=p.ease,o="keyframes"}const c=EE(a.owner.current,l,t,B(T({},this.options),{duration:i,times:r,ease:s}));return c.startTime=u!=null?u:this.calcStartTime(),this.pendingTimeline?(f0(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(Wl(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:r,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Dn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Dn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ot;const{animation:i}=n;f0(i,t)}return ot}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:i,duration:r,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const u=this.options,{motionValue:c,onUpdate:d,onComplete:f,element:h}=u,m=te(u,["motionValue","onUpdate","onComplete","element"]),v=new dh(B(T({},m),{keyframes:i,duration:r,type:s,ease:o,times:a,isGenerator:!0})),x=Mn(this.time);c.setWithVelocity(v.sample(x-Yl).value,v.sample(x).value,Yl)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return $E()&&i&&TE.has(i)&&!l&&!u&&!r&&s!=="mirror"&&o!==0&&a!=="inertia"}}const RE={type:"spring",stiffness:500,damping:25,restSpeed:10},FE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NE={type:"keyframes",duration:.8},jE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OE=(e,{keyframes:t})=>t.length>2?NE:Ki.has(e)?e.startsWith("scale")?FE(t[1]):RE:jE;function IE(d){var f=d,{when:e,delay:t,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 fh=(e,t,n,i={},r,s)=>o=>{const a=jf(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Mn(l);let c=B(T({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity()},a),{delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:r});IE(a)||(c=T(T({},c),OE(e,c))),c.duration&&(c.duration=Mn(c.duration)),c.repeatDelay&&(c.repeatDelay=Mn(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&&t.get()!==void 0){const f=Wl(c.keyframes,a);if(f!==void 0)return le.update(()=>{c.onUpdate(f),c.onComplete()}),new l2([])}return!s&&mb.supports(c)?new mb(c):new dh(c)};function VE({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function gb(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var s;let d=t,{transition:o=e.getDefaultTransition(),transitionEnd:a}=d,l=te(d,["transition","transitionEnd"]);i&&(o=i);const u=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),m=l[f];if(m===void 0||c&&VE(c,f))continue;const v=T({delay:n},jf(o||{},f));let x=!1;if(window.MotionHandoffAnimation){const g=k0(e);if(g){const b=window.MotionHandoffAnimation(g,f,le);b!==null&&(v.startTime=b,x=!0)}}Gf(e,f),h.start(fh(f,h,m,e.shouldReduceMotion&&S0.has(f)?{type:!1}:v,e,x));const p=h.animation;p&&u.push(p)}return a&&Promise.all(u).then(()=>{le.update(()=>{a&&_2(e,a)})}),u}function hh(e,t,n={}){var i;const r=zl(e,t,n.type==="exit"?(i=e.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(gb(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return zE(e,t,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 zE(e,t,n=0,i=0,r=1,s){const o=[],a=(e.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(e.variantChildren).sort(BE).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(hh(u,t,B(T({},s),{delay:n+l(c)})).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function BE(e,t){return e.sortNodePosition(t)}function HE(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(s=>hh(e,s,n));i=Promise.all(r)}else if(typeof t=="string")i=hh(e,t,n);else{const r=typeof t=="function"?zl(e,t,n.custom):t;i=Promise.all(gb(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const WE=Pf.length;function vb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?vb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:i})=>HE(e,n,i)))}function GE(e){let t=YE(e),n=yb(),i=!0;const r=l=>(u,c)=>{var d;const f=zl(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const h=f,{transition:m,transitionEnd:v}=h,x=te(h,["transition","transitionEnd"]);u=T(T(T({},u),x),v)}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,c=vb(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let x=0;xm&&w,P=!1;const E=Array.isArray(b)?b:[b];let F=E.reduce(r(p),{});S===!1&&(F={});const{prevResolvedValues:C={}}=g,I=T(T({},C),F),A=z=>{M=!0,f.has(z)&&(P=!0,f.delete(z)),g.needsAnimating[z]=!0;const N=e.getValue(z);N&&(N.liveStyle=!1)};for(const z in I){const N=F[z],V=C[z];if(h.hasOwnProperty(z))continue;let U=!1;$f(N)&&$f(V)?U=!u0(N,V):U=N!==V,U?N!=null?A(z):f.add(z):N!==void 0&&f.has(z)?A(z):g.protectedKeys[z]=!0}g.prevProp=b,g.prevResolvedValues=F,g.isActive&&(h=T(T({},h),F)),i&&e.blockInitialAnimation&&(M=!1),M&&(!(k&&$)||P)&&d.push(...E.map(z=>({animation:z,options:{type:p}})))}if(f.size){const x={};f.forEach(p=>{const g=e.getBaseTarget(p),b=e.getValue(p);b&&(b.liveStyle=!0),x[p]=g!=null?g:null}),d.push({animation:x})}let v=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),i=!1,v?t(d):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.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=yb(),i=!0}}}function XE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!u0(t,e):!1}function Xi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yb(){return{animate:Xi(!0),whileInView:Xi(),whileHover:Xi(),whileTap:Xi(),whileDrag:Xi(),whileFocus:Xi(),exit:Xi()}}class hi{constructor(t){this.isMounted=!1,this.node=t}update(){}}class qE extends hi{constructor(t){super(t),t.animationState||(t.animationState=GE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Nl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let QE=0;class ZE extends hi{constructor(){super(...arguments),this.id=QE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const JE={animation:{Feature:qE},exit:{Feature:ZE}};function bo(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function xo(e){return{point:{x:e.pageX,y:e.pageY}}}const e$=e=>t=>Bf(t)&&e(t,xo(t));function _o(e,t,n,i){return bo(e,t,e$(n),i)}const bb=(e,t)=>Math.abs(e-t);function t$(e,t){const n=bb(e.x,t.x),i=bb(e.y,t.y);return Math.sqrt(mm(n,2)+mm(i,2))}class xb{constructor(t,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=mh(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=t$(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=d,{timestamp:v}=ze;this.history.push(B(T({},m),{timestamp:v}));const{onStart:x,onMove:p}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ph(f,this.transformPagePoint),le.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=mh(d.type==="pointercancel"?this.lastMoveEventInfo:ph(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,x),m&&m(d,x)},!Bf(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const o=xo(t),a=ph(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ze;this.history=[B(T({},l),{timestamp:u})];const{onSessionStart:c}=n;c&&c(t,mh(a,this.history)),this.removeListeners=yo(_o(this.contextWindow,"pointermove",this.handlePointerMove),_o(this.contextWindow,"pointerup",this.handlePointerUp),_o(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dn(this.updatePoint)}}function ph(e,t){return t?{point:t(e.point)}:e}function _b(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mh({point:e},t){return{point:e,delta:_b(e,wb(t)),offset:_b(e,n$(t)),velocity:i$(t,.1)}}function n$(e){return e[0]}function wb(e){return e[e.length-1]}function i$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=wb(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Mn(t)));)n--;if(!i)return{x:0,y:0};const s=Dn(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}const Sb=1e-4,r$=1-Sb,s$=1+Sb,Pb=.01,o$=0-Pb,a$=0+Pb;function $t(e){return e.max-e.min}function l$(e,t,n){return Math.abs(e-t)<=n}function kb(e,t,n,i=.5){e.origin=i,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=$t(n)/$t(t),e.translate=Ce(n.min,n.max,e.origin)-e.originPoint,(e.scale>=r$&&e.scale<=s$||isNaN(e.scale))&&(e.scale=1),(e.translate>=o$&&e.translate<=a$||isNaN(e.translate))&&(e.translate=0)}function wo(e,t,n,i){kb(e.x,t.x,n.x,i?i.originX:void 0),kb(e.y,t.y,n.y,i?i.originY:void 0)}function Cb(e,t,n){e.min=n.min+t.min,e.max=e.min+$t(t)}function u$(e,t,n){Cb(e.x,t.x,n.x),Cb(e.y,t.y,n.y)}function Tb(e,t,n){e.min=t.min-n.min,e.max=e.min+$t(t)}function So(e,t,n){Tb(e.x,t.x,n.x),Tb(e.y,t.y,n.y)}function c$(e,{min:t,max:n},i){return t!==void 0&&en&&(e=i?Ce(n,e,i.max):Math.min(e,n)),e}function Eb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d$(e,{top:t,left:n,bottom:i,right:r}){return{x:Eb(e.x,n,r),y:Eb(e.y,t,i)}}function $b(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.mini?n=Ui(t.min,t.max-i,e.min):i>r&&(n=Ui(e.min,e.max-r,t.min)),fn(0,1,n)}function p$(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const gh=.35;function m$(e=gh){return e===!1?e=0:e===!0&&(e=gh),{x:Mb(e,"left","right"),y:Mb(e,"top","bottom")}}function Mb(e,t,n){return{min:Db(e,t),max:Db(e,n)}}function Db(e,t){return typeof e=="number"?e:e[t]||0}const Ab=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qr=()=>({x:Ab(),y:Ab()}),Lb=()=>({min:0,max:0}),Le=()=>({x:Lb(),y:Lb()});function Vt(e){return[e("x"),e("y")]}function Rb({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function g$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v$(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function vh(e){return e===void 0||e===1}function yh({scale:e,scaleX:t,scaleY:n}){return!vh(e)||!vh(t)||!vh(n)}function qi(e){return yh(e)||Fb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fb(e){return Nb(e.x)||Nb(e.y)}function Nb(e){return e&&e!=="0%"}function Gl(e,t,n){const i=e-n,r=t*i;return n+r}function jb(e,t,n,i,r){return r!==void 0&&(e=Gl(e,r,i)),Gl(e,n,i)+t}function bh(e,t=0,n=1,i,r){e.min=jb(e.min,t,n,i,r),e.max=jb(e.max,t,n,i,r)}function Ob(e,{x:t,y:n}){bh(e.x,t.translate,t.scale,t.originPoint),bh(e.y,n.translate,n.scale,n.originPoint)}const Ib=.999999999999,Vb=1.0000000000001;function y$(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,o;for(let a=0;aIb&&(t.x=1),t.yIb&&(t.y=1)}function Zr(e,t){e.min=e.min+t,e.max=e.max+t}function zb(e,t,n,i,r=.5){const s=Ce(e.min,e.max,r);bh(e,t,n,s,i)}function Jr(e,t){zb(e.x,t.x,t.scaleX,t.scale,t.originX),zb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Bb(e,t){return Rb(v$(e.getBoundingClientRect(),t))}function b$(e,t,n){const i=Bb(e,n),{scroll:r}=t;return r&&(Zr(i.x,r.offset.x),Zr(i.y,r.offset.y)),i}const Hb=({current:e})=>e?e.ownerDocument.defaultView:null,x$=new WeakMap;class _${constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Le(),this.visualElement=t}start(t,{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(xo(c).point)},s=(c,d)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=g2(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vt(x=>{let p=this.getAxisMotionValue(x).get()||0;if(hn.test(p)){const{projection:g}=this.visualElement;if(g&&g.layout){const b=g.layout.layoutBox[x];b&&(p=$t(b)*(parseFloat(p)/100))}}this.originPoint[x]=p}),m&&le.postRender(()=>m(c,d)),Gf(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=d;if(h&&this.currentDirection===null){this.currentDirection=w$(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),v&&v(c,d)},a=(c,d)=>this.stop(c,d),l=()=>Vt(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 xb(t,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Hb(this.visualElement)})}stop(t,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&le.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!Xl(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=c$(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Kr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=d$(r.layoutBox,n):this.constraints=!1,this.elastic=m$(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Vt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=p$(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Kr(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=b$(i,r.root,this.visualElement.getTransformPagePoint());let o=f$(r.layout.layoutBox,s);if(n){const a=n(g$(o));this.hasMutatedConstraints=!!a,a&&(o=Rb(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Vt(c=>{if(!Xl(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,m=T(T({type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},s),d);return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Gf(this.visualElement,t),i.start(fh(t,i,0,n,this.visualElement,!1))}stopAnimation(){Vt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Vt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Vt(n=>{const{drag:i}=this.getProps();if(!Xl(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(t[n]-Ce(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Kr(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Vt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();r[o]=h$({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(),Vt(o=>{if(!Xl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ce(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;x$.set(this.visualElement,this);const t=this.visualElement.current,n=_o(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Kr(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()),le.read(i);const o=bo(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Vt(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 t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=gh,dragMomentum:a=!0}=t;return B(T({},t),{drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a})}}function Xl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function w$(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class S$ extends hi{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new _$(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}}const Wb=e=>(t,n)=>{e&&le.postRender(()=>e(t,n))};class P$ extends hi{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new xb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Wb(t),onStart:Wb(n),onMove:i,onEnd:(s,o)=>{delete this.session,r&&le.postRender(()=>r(s,o))}}}mount(){this.removePointerDownListener=_o(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ql={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ub(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Po={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Ub(e,t.target.x),i=Ub(e,t.target.y);return`${n}% ${i}%`}},k$={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=fi.parse(e);if(r.length>5)return i;const s=fi.createTransformer(e),o=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=l;const u=Ce(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),s(r)}};class C$ extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=t;QT(T$),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions(B(T({},s.options),{onExitComplete:()=>this.safeToRemove()}))),ql.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||le.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Kb(e){const[t,n]=Fy(),i=_.useContext(vf);return y.jsx(C$,B(T({},e),{layoutGroup:i,switchLayoutGroup:_.useContext(Uy),isPresent:t,safeToRemove:n}))}const T$={borderRadius:B(T({},Po),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Po,borderTopRightRadius:Po,borderBottomLeftRadius:Po,borderBottomRightRadius:Po,boxShadow:k$};function E$(e,t,n){const i=Je(e)?e:An(e);return i.start(fh("",i,t,n)),i.animation}function $$(e){return e instanceof SVGElement&&e.tagName!=="svg"}const M$=(e,t)=>e.depth-t.depth;class D${constructor(){this.children=[],this.isDirty=!1}add(t){Wf(this.children,t),this.isDirty=!0}remove(t){Uf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(M$),this.isDirty=!1,this.children.forEach(t)}}function A$(e,t){const n=pn.now(),i=({timestamp:r})=>{const s=r-n;s>=t&&(dn(i),e(s-t))};return le.read(i,!0),()=>dn(i)}const Yb=["TopLeft","TopRight","BottomLeft","BottomRight"],L$=Yb.length,Gb=e=>typeof e=="string"?parseFloat(e):e,Xb=e=>typeof e=="number"||G.test(e);function R$(e,t,n,i,r,s){r?(e.opacity=Ce(0,n.opacity!==void 0?n.opacity:1,F$(i)),e.opacityExit=Ce(t.opacity!==void 0?t.opacity:1,0,N$(i))):s&&(e.opacity=Ce(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let o=0;oit?1:n(Ui(e,t,i))}function Zb(e,t){e.min=t.min,e.max=t.max}function zt(e,t){Zb(e.x,t.x),Zb(e.y,t.y)}function Jb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ex(e,t,n,i,r){return e-=t,e=Gl(e,1/n,i),r!==void 0&&(e=Gl(e,1/r,i)),e}function j$(e,t=0,n=1,i=.5,r,s=e,o=e){if(hn.test(t)&&(t=parseFloat(t),t=Ce(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ce(s.min,s.max,i);e===s&&(a-=t),e.min=ex(e.min,t,n,a,r),e.max=ex(e.max,t,n,a,r)}function tx(e,t,[n,i,r],s,o){j$(e,t[n],t[i],t[r],t.scale,s,o)}const O$=["x","scaleX","originX"],I$=["y","scaleY","originY"];function nx(e,t,n,i){tx(e.x,t,O$,n?n.x:void 0,i?i.x:void 0),tx(e.y,t,I$,n?n.y:void 0,i?i.y:void 0)}function ix(e){return e.translate===0&&e.scale===1}function rx(e){return ix(e.x)&&ix(e.y)}function sx(e,t){return e.min===t.min&&e.max===t.max}function V$(e,t){return sx(e.x,t.x)&&sx(e.y,t.y)}function ox(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ax(e,t){return ox(e.x,t.x)&&ox(e.y,t.y)}function lx(e){return $t(e.x)/$t(e.y)}function ux(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z${constructor(){this.members=[]}add(t){Wf(this.members,t),t.scheduleRender()}remove(t){if(Uf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===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(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function B$(e,t,n){let i="";const r=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:m}=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) `),m&&(i+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Qi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ko=typeof window!="undefined"&&window.MotionDebug!==void 0,xh=["","X","Y","Z"],H$={visibility:"hidden"},cx=1e3;let W$=0;function _h(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function dx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=k0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",le,!(r||s))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&dx(i)}function fx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=t==null?void 0:t()){this.id=W$++,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,ko&&(Qi.totalNodes=Qi.resolvedTargetDeltas=Qi.recalculatedProjection=0),this.nodes.forEach(Y$),this.nodes.forEach(Z$),this.nodes.forEach(J$),this.nodes.forEach(G$),ko&&window.MotionDebug.record(Qi)},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;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=A$(f,250),ql.hasAnimatedSinceResize&&(ql.hasAnimatedSinceResize=!1,this.nodes.forEach(px))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||rM,{onLayoutAnimationStart:x,onLayoutAnimationComplete:p}=c.getProps(),g=!this.targetLayout||!ax(this.targetLayout,m)||h,b=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const w=B(T({},jf(v,"layout")),{onPlay:x,onComplete:p});(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||px(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,dn(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(eM),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&&dx(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 S=w/1e3;mx(d.x,o.x,S),mx(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(So(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nM(this.relativeTarget,this.relativeTargetOrigin,f,S),b&&V$(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Le()),zt(b,this.relativeTarget)),v&&(this.animationValues=c,R$(c,u,this.latestValues,S,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(dn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(()=>{ql.hasAnimatedSinceResize=!0,this.currentAnimation=E$(0,cx,B(T({},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(cx),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&&xx(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Le();const d=$t(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=$t(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}zt(a,l),Jr(a,c),wo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new z$),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&&_h("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(hx),this.root.sharedNodes.clear()}}}function U$(e){e.updateLayout()}function K$(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?Vt(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=$t(f);f.min=i[d].min,f.max=f.min+h}):xx(s,n.layoutBox,i)&&Vt(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],h=$t(i[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=Qr();wo(a,i,n.layoutBox);const l=Qr();o?wo(l,e.applyTransform(r,!0),n.measuredBox):wo(l,i,n.layoutBox);const u=!rx(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Le();So(m,n.layoutBox,f.layoutBox);const v=Le();So(v,i,h.layoutBox),ax(m,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function Y$(e){ko&&Qi.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function G$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function X$(e){e.clearSnapshot()}function hx(e){e.clearMeasurements()}function q$(e){e.isLayoutDirty=!1}function Q$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function px(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Z$(e){e.resolveTargetDelta()}function J$(e){e.calcProjection()}function eM(e){e.resetSkewAndRotation()}function tM(e){e.removeLeadSnapshot()}function mx(e,t,n){e.translate=Ce(t.translate,0,n),e.scale=Ce(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gx(e,t,n,i){e.min=Ce(t.min,n.min,i),e.max=Ce(t.max,n.max,i)}function nM(e,t,n,i){gx(e.x,t.x,n.x,i),gx(e.y,t.y,n.y,i)}function iM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const rM={duration:.45,ease:[.4,0,.1,1]},vx=e=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yx=vx("applewebkit/")&&!vx("chrome/")?Math.round:ot;function bx(e){e.min=yx(e.min),e.max=yx(e.max)}function sM(e){bx(e.x),bx(e.y)}function xx(e,t,n){return e==="position"||e==="preserve-aspect"&&!l$(lx(t),lx(n),.2)}function oM(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const aM=fx({attachResizeListener:(e,t)=>bo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wh={current:void 0},_x=fx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wh.current){const e=new aM({});e.mount(window),e.setOptions({layoutScroll:!0}),wh.current=e}return wh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lM={pan:{Feature:P$},drag:{Feature:S$,ProjectionNode:_x,MeasureLayout:Kb}};function wx(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&le.postRender(()=>s(t,xo(t)))}class uM extends hi{mount(){const{current:t}=this.node;t&&(this.unmount=d2(t,n=>(wx(this.node,n,"Start"),i=>wx(this.node,i,"End"))))}unmount(){}}class cM extends hi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=yo(bo(this.node.current,"focus",()=>this.onFocus()),bo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sx(e,t,n){const{props:i}=e;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&le.postRender(()=>s(t,xo(t)))}class dM extends hi{mount(){const{current:t}=this.node;t&&(this.unmount=m2(t,n=>(Sx(this.node,n,"Start"),(i,{success:r})=>Sx(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Sh=new WeakMap,Ph=new WeakMap,fM=e=>{const t=Sh.get(e.target);t&&t(e)},hM=e=>{e.forEach(fM)};function pM(n){var i=n,{root:e}=i,t=te(i,["root"]);const r=e||document;Ph.has(r)||Ph.set(r,{});const s=Ph.get(r),o=JSON.stringify(t);return s[o]||(s[o]=new IntersectionObserver(hM,T({root:e},t))),s[o]}function mM(e,t,n){const i=pM(t);return Sh.set(e,n),i.observe(e),()=>{Sh.delete(e),i.unobserve(e)}}const gM={some:0,all:1};class vM extends hi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:gM[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 mM(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(yM(t,n))&&this.startObserver()}unmount(){}}function yM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const bM={inView:{Feature:vM},tap:{Feature:dM},focus:{Feature:cM},hover:{Feature:uM}},xM={layout:{ProjectionNode:_x,MeasureLayout:Kb}},kh={current:null},Px={current:!1};function _M(){if(Px.current=!0,!!bf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kh.current=e.matches;e.addListener(t),t()}else kh.current=!1}const wM=[...q0,et,fi],SM=e=>wM.find(X0(e)),kx=new WeakMap;function PM(e,t,n){for(const i in t){const r=t[i],s=n[i];if(Je(r))e.addValue(i,r);else if(Je(s))e.addValue(i,An(r,{owner:e}));else if(s!==r)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(i);e.addValue(i,An(o!==void 0?o:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Cx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kM{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,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=sh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=pn.now();this.renderScheduledAtthis.bindToMotionValue(i,n)),Px.current||_M(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){kx.delete(this.current),this.projection&&this.projection.unmount(),dn(this.notifyUpdate),dn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Ki.has(t),r=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&le.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ur){const n=Ur[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Le()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;in.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=An(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){var i;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Y0(r)||R0(r))?r=parseFloat(r):!SM(r)&&fi.test(n)&&(r=z0(t,n)),this.setBaseTarget(t,Je(r)?r.get():r)),Je(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const o=Ef(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(r=o[t])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Je(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Tx extends kM{constructor(){super(...arguments),this.KeyframeResolver=Z0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Je(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function CM(e){return window.getComputedStyle(e)}class TM extends Tx{constructor(){super(...arguments),this.type="html",this.renderInstance=n0}readValueFromInstance(t,n){if(Ki.has(n)){const i=nh(n);return i&&i.default||0}else{const i=CM(t),r=(qy(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Bb(t,n)}build(t,n,i){Af(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Nf(t,n,i)}}class EM extends Tx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Le}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ki.has(n)){const i=nh(n);return i&&i.default||0}return n=i0.has(n)?n:kf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return o0(t,n,i)}build(t,n,i){Lf(t,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,i,r){r0(t,n,i,r)}mount(t){this.isSVGTag=Ff(t.tagName),super.mount(t)}}const $M=(e,t)=>Tf(e)?new EM(t):new TM(t,{allowProjection:e!==_.Fragment}),MM=o2(T(T(T(T({},JE),bM),lM),xM),$M),Zi=wT(MM);function Ex(e,t,n){_.useInsertionEffect(()=>e.on(t,n),[e,t,n])}function $x(e,t){let n;const i=()=>{const{currentTime:r}=t,o=(r===null?0:r.value)/100;n!==o&&e(o),n=o};return le.update(i,!0),()=>dn(i)}const Ql=new WeakMap;let pi;function DM(e,t){if(t){const{inlineSize:n,blockSize:i}=t[0];return{width:n,height:i}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function AM({target:e,contentRect:t,borderBoxSize:n}){var i;(i=Ql.get(e))===null||i===void 0||i.forEach(r=>{r({target:e,contentSize:t,get size(){return DM(e,n)}})})}function LM(e){e.forEach(AM)}function RM(){typeof ResizeObserver!="undefined"&&(pi=new ResizeObserver(LM))}function FM(e,t){pi||RM();const n=v0(e);return n.forEach(i=>{let r=Ql.get(i);r||(r=new Set,Ql.set(i,r)),r.add(t),pi==null||pi.observe(i)}),()=>{n.forEach(i=>{const r=Ql.get(i);r==null||r.delete(t),r!=null&&r.size||pi==null||pi.unobserve(i)})}}const Zl=new Set;let Co;function NM(){Co=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Zl.forEach(n=>n(t))},window.addEventListener("resize",Co)}function jM(e){return Zl.add(e),Co||NM(),()=>{Zl.delete(e),!Zl.size&&Co&&(Co=void 0)}}function OM(e,t){return typeof e=="function"?jM(e):FM(e,t)}const IM=50,Mx=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),VM=()=>({time:0,x:Mx(),y:Mx()}),zM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Dx(e,t,n,i){const r=n[t],{length:s,position:o}=zM[t],a=r.current,l=n.time;r.current=e[`scroll${o}`],r.scrollLength=e[`scroll${s}`]-e[`client${s}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=Ui(0,r.scrollLength,r.current);const u=i-l;r.velocity=u>IM?0:Yf(r.current-a,u)}function BM(e,t,n){Dx(e,"x",t,n),Dx(e,"y",t,n),t.time=n}function HM(e,t){const n={x:0,y:0};let i=e;for(;i&&i!==t;)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 Ch={start:0,center:.5,end:1};function Ax(e,t,n=0){let i=0;if(e in Ch&&(e=Ch[e]),typeof e=="string"){const r=parseFloat(e);e.endsWith("px")?i=r:e.endsWith("%")?e=r/100:e.endsWith("vw")?i=r/100*document.documentElement.clientWidth:e.endsWith("vh")?i=r/100*document.documentElement.clientHeight:e=r}return typeof e=="number"&&(i=t*e),n+i}const WM=[0,0];function UM(e,t,n,i){let r=Array.isArray(e)?e:WM,s=0,o=0;return typeof e=="number"?r=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?r=e.split(" "):r=[e,Ch[e]?e:"0"]),s=Ax(r[0],n,i),o=Ax(r[1],t),s-o}const KM={All:[[0,0],[1,1]]},YM={x:0,y:0};function GM(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function XM(e,t,n){const{offset:i=KM.All}=n,{target:r=e,axis:s="y"}=n,o=s==="y"?"height":"width",a=r!==e?HM(r,e):YM,l=r===e?{width:e.scrollWidth,height:e.scrollHeight}:GM(r),u={width:e.clientWidth,height:e.clientHeight};t[s].offset.length=0;let c=!t[s].interpolate;const d=i.length;for(let f=0;fqM(e,i.target,n),update:r=>{BM(e,n,r),(i.offset||i.target)&&XM(e,n,i)},notify:()=>t(n)}}const To=new WeakMap,Lx=new WeakMap,Th=new WeakMap,Rx=e=>e===document.documentElement?window:e;function Eh(e,i={}){var r=i,{container:t=document.documentElement}=r,n=te(r,["container"]);let s=Th.get(t);s||(s=new Set,Th.set(t,s));const o=VM(),a=QM(t,e,o,n);if(s.add(a),!To.has(t)){const u=()=>{for(const m of s)m.measure()},c=()=>{for(const m of s)m.update(ze.timestamp)},d=()=>{for(const m of s)m.notify()},f=()=>{le.read(u,!1,!0),le.read(c,!1,!0),le.update(d,!1,!0)};To.set(t,f);const h=Rx(t);window.addEventListener("resize",f,{passive:!0}),t!==document.documentElement&&Lx.set(t,OM(t,f)),h.addEventListener("scroll",f,{passive:!0})}const l=To.get(t);return le.read(l,!1,!0),()=>{var u;dn(l);const c=Th.get(t);if(!c||(c.delete(a),c.size))return;const d=To.get(t);To.delete(t),d&&(Rx(t).removeEventListener("scroll",d),(u=Lx.get(t))===null||u===void 0||u(),window.removeEventListener("resize",d))}}function ZM({source:e,container:t,axis:n="y"}){e&&(t=e);const i={value:0},r=Eh(s=>{i.value=s[n].progress*100},{container:t,axis:n});return{currentTime:i,cancel:r}}const $h=new Map;function Fx({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),$h.has(t)||$h.set(t,{});const i=$h.get(t);return i[n]||(i[n]=c0()?new ScrollTimeline({source:t,axis:n}):ZM({source:t,axis:n})),i[n]}function JM(e){return e.length===2}function Nx(e){return e&&(e.target||e.offset)}function eD(e,t){return JM(e)||Nx(t)?Eh(n=>{e(n[t.axis].progress,n)},t):$x(e,Fx(t))}function tD(e,t){if(e.flatten(),Nx(t))return e.pause(),Eh(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Fx(t);return e.attachTimeline?e.attachTimeline(n,i=>(i.pause(),$x(r=>{i.time=i.duration*r},n))):ot}}function nD(e,i={}){var r=i,{axis:t="y"}=r,n=te(r,["axis"]);const s=T({axis:t},n);return typeof e=="function"?eD(e,s):tD(e,s)}function jx(e,t){pT(!!(!t||t.current))}const iD=()=>({scrollX:An(0),scrollY:An(0),scrollXProgress:An(0),scrollYProgress:An(0)});function Ox(r={}){var s=r,{container:e,target:t,layoutEffect:n=!0}=s,i=te(s,["container","target","layoutEffect"]);const o=Ml(iD);return(n?xf:_.useEffect)(()=>(jx("target",t),jx("container",e),nD((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)},B(T({},i),{container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}))),[e,t,JSON.stringify(i.offset)]),o}const K=({children:e})=>{const[t,n]=_.useState(!1),[i,r]=_.useState(!0),s=_.useRef(null),{scrollXProgress:o}=Ox({container:s});return Ex(o,"change",a=>{n(a>0),r(a<1)}),y.jsxs("div",{className:"relative w-full rounded-2xl bg-white shadow mb-4",children:[y.jsx(Zi.div,{initial:{opacity:0},animate:{opacity:t?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"}),y.jsx(Zi.section,{ref:s,layoutScroll:!0,className:"simpletable--blade relative overflow-x-auto",children:y.jsx("div",{className:"simpletable__table table",style:{padding:0},children:y.jsx("table",{className:"table-auto border-collapse text-left",children:e})})}),y.jsx(Zi.div,{initial:{opacity:0},animate:{opacity:i?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"})]})},rD=({children:e})=>y.jsx("thead",{children:e}),sD=({children:e})=>y.jsx("tr",{role:"row",className:"last:bg-[#F1F3FB]",children:e}),oD=({children:e})=>y.jsx("td",{className:"inline-block min-w-[180px] items-start",role:"cell",children:e}),aD=({children:e})=>y.jsx("th",{className:"inline-block min-w-[180px] items-start font-semibold",role:"columnheader",children:e}),lD=({children:e})=>y.jsx("tbody",{children:e});K.Head=rD,K.Row=sD,K.Cell=oD,K.HeaderCell=aD,K.Body=lD;const mi=typeof document!="undefined"?Z.useLayoutEffect:()=>{};function Be(e){const t=_.useRef(null);return mi(()=>{t.current=e},[e]),_.useCallback((...n)=>{const i=t.current;return i==null?void 0:i(...n)},[])}function uD(e){let[t,n]=_.useState(e),i=_.useRef(null),r=Be(()=>{if(!i.current)return;let o=i.current.next();if(o.done){i.current=null;return}t===o.value?r():n(o.value)});mi(()=>{i.current&&r()});let s=Be(o=>{i.current=o(t),r()});return[t,s]}const Mh={prefix:String(Math.round(Math.random()*1e10)),current:0},Ix=Z.createContext(Mh),cD=Z.createContext(!1);let dD=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Dh=new WeakMap;function fD(e=!1){let t=_.useContext(Ix),n=_.useRef(null);if(n.current===null&&!e){var i,r;let s=(r=Z.__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=Dh.get(s);o==null?Dh.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==o.state&&(t.current=o.id,Dh.delete(s))}n.current=++t.current}return n.current}function hD(e){let t=_.useContext(Ix);t===Mh&&!dD&&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=fD(!!e),i=`react-aria${t.prefix}`;return e||`${i}-${n}`}function pD(e){let t=Z.useId(),[n]=_.useState(Vx()),i=n?"react-aria":`react-aria${Mh.prefix}`;return e||`${i}-${t}`}const mD=typeof Z.useId=="function"?pD:hD;function gD(){return!1}function vD(){return!0}function yD(e){return()=>{}}function Vx(){return typeof Z.useSyncExternalStore=="function"?Z.useSyncExternalStore(yD,gD,vD):_.useContext(cD)}let bD=!!(typeof window!="undefined"&&window.document&&window.document.createElement),gi=new Map;function Ji(e){let[t,n]=_.useState(e),i=_.useRef(null),r=mD(t),s=_.useCallback(o=>{i.current=o},[]);return bD&&(gi.has(r)&&!gi.get(r).includes(s)?gi.set(r,[...gi.get(r),s]):gi.set(r,[s])),mi(()=>{let o=r;return()=>{gi.delete(o)}},[r]),_.useEffect(()=>{let o=i.current;o&&(i.current=null,n(o))}),r}function xD(e,t){if(e===t)return e;let n=gi.get(e);if(n)return n.forEach(r=>r(t)),t;let i=gi.get(t);return i?(i.forEach(r=>r(e)),e):t}function zx(e=[]){let t=Ji(),[n,i]=uD(t),r=_.useCallback(()=>{i(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,i]);return mi(r,[t,r,...e]),n}function Ah(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Bt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},rn=e=>e&&"window"in e&&e.window===e?e:Bt(e).defaultView||window;function Bx(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t=65&&r.charCodeAt(2)<=90?t[r]=Ah(s,o):(r==="className"||r==="UNSAFE_className")&&typeof s=="string"&&typeof o=="string"?t[r]=_D(s,o):r==="id"&&s&&o?t.id=xD(s,o):t[r]=o!==void 0?o:s}}return t}function wD(...e){return e.length===1&&e[0]?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const SD=new Set(["id"]),PD=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),kD=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),CD=/^(data-.*)$/;function er(e,t={}){let{labelable:n,isLink:i,propNames:r}=t,s={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(SD.has(o)||n&&PD.has(o)||i&&kD.has(o)||r!=null&&r.has(o)||CD.test(o))&&(s[o]=e[o]);return s}function vi(e){if(TD())e.focus({preventScroll:!0});else{let t=ED(e);e.focus(),$D(t)}}let Jl=null;function TD(){if(Jl==null){Jl=!1;try{document.createElement("div").focus({get preventScroll(){return Jl=!0,!0}})}catch(e){}}return Jl}function ED(e){let t=e.parentNode,n=[],i=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==i;)(t.offsetHeighte.test(n.brand)))||e.test(window.navigator.userAgent)}function Lh(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function yi(e){let t=null;return()=>(t==null&&(t=e()),t)}const Eo=yi(function(){return Lh(/^Mac/i)}),Hx=yi(function(){return Lh(/^iPhone/i)}),Wx=yi(function(){return Lh(/^iPad/i)||Eo()&&navigator.maxTouchPoints>1}),Rh=yi(function(){return Hx()||Wx()}),MD=yi(function(){return eu(/AppleWebKit/i)&&!DD()}),DD=yi(function(){return eu(/Chrome/i)}),Fh=yi(function(){return eu(/Android/i)}),AD=yi(function(){return eu(/Firefox/i)}),LD=_.createContext({isNative:!0,open:ND,useHref:e=>e});function Ux(){return _.useContext(LD)}function RD(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function es(e,t,n=!0){var i,r;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=t;AD()&&(!((r=window.event)===null||r===void 0||(i=r.type)===null||i===void 0)&&i.startsWith("key"))&&e.target==="_blank"&&(Eo()?s=!0:o=!0);let u=MD()&&Eo()&&!Wx()?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});es.isOpening=n,vi(e),e.dispatchEvent(u),es.isOpening=!1}es.isOpening=!1;function FD(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function ND(e,t){FD(e,n=>es(n,t))}function jD(e){let t=Ux();var n;const i=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?i:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let ts=new Map,Nh=new Set;function Kx(){if(typeof window=="undefined")return;function e(i){return"propertyName"in i}let t=i=>{if(!e(i)||!i.target)return;let r=ts.get(i.target);r||(r=new Set,ts.set(i.target,r),i.target.addEventListener("transitioncancel",n,{once:!0})),r.add(i.propertyName)},n=i=>{if(!e(i)||!i.target)return;let r=ts.get(i.target);if(r&&(r.delete(i.propertyName),r.size===0&&(i.target.removeEventListener("transitioncancel",n),ts.delete(i.target)),ts.size===0)){for(let s of Nh)s();Nh.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document!="undefined"&&(document.readyState!=="loading"?Kx():document.addEventListener("DOMContentLoaded",Kx));function Yx(e){requestAnimationFrame(()=>{ts.size===0?e():Nh.add(e)})}function $o(){let e=_.useRef(new Map),t=_.useCallback((r,s,o,a)=>{let l=a!=null&&a.once?(...u)=>{e.current.delete(o),o(...u)}:o;e.current.set(o,{type:s,eventTarget:r,fn:l,options:a}),r.addEventListener(s,l,a)},[]),n=_.useCallback((r,s,o,a)=>{var l;let u=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;r.removeEventListener(s,u,a),e.current.delete(o)},[]),i=_.useCallback(()=>{e.current.forEach((r,s)=>{n(r.eventTarget,r.type,s,r.options)})},[n]);return _.useEffect(()=>i,[i]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:i}}function OD(e,t){let{id:n,"aria-label":i,"aria-labelledby":r}=e;return n=Ji(n),r&&i?r=[...new Set([n,...r.trim().split(/\s+/)])].join(" "):r&&(r=r.trim().split(/\s+/).join(" ")),!i&&!r&&t&&(i=t),{id:n,"aria-label":i,"aria-labelledby":r}}function ID(e){const t=_.useRef(null);return _.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function Gx(e,t){mi(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function VD(e,t,n,i){let r=Be(n),s=n==null;_.useEffect(()=>{if(s||!e.current)return;let o=e.current;return o.addEventListener(t,r,i),()=>{o.removeEventListener(t,r,i)}},[e,t,i,s,r])}function jh(e){return e.mozInputSource===0&&e.isTrusted?!0:Fh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zD(e){return!Fh()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Oh(e,t,n){let i=_.useRef(t),r=Be(()=>{n&&n(i.current)});_.useEffect(()=>{var s;let o=e==null||(s=e.current)===null||s===void 0?void 0:s.form;return o==null||o.addEventListener("reset",r),()=>{o==null||o.removeEventListener("reset",r)}},[e,r])}function Ih(e,t,n){let[i,r]=_.useState(e||t),s=_.useRef(e!==void 0),o=e!==void 0;_.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?e:i,l=_.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,...m)=>{let v=u(o?a:h,...m);return d(v,...c),o?h:v})):(o||r(u),d(u,...c))},[o,a,n]);return[a,l]}function ns(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function tu(e,t){let n=e,i=t.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 gt(e,t,n,i){t=Number(t),n=Number(n);let r=(e-(isNaN(t)?0:t))%i,s=tu(Math.abs(r)*2>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r,i);return isNaN(t)?!isNaN(n)&&s>n&&(s=Math.floor(tu(n/i,i))*i):sn&&(s=t+Math.floor(tu((n-t)/i,i))*i),s=tu(s,i),s}const Xx=Symbol("default");function Vh({values:e,children:t}){for(let[n,i]of e)t=Z.createElement(n.Provider,{value:i},t);return t}function Ln(e){let{className:t,style:n,children:i,defaultClassName:r,defaultChildren:s,defaultStyle:o,values:a}=e;return _.useMemo(()=>{let l,u,c;return typeof t=="function"?l=t(B(T({},a),{defaultClassName:r})):l=t,typeof n=="function"?u=n(B(T({},a),{defaultStyle:o||{}})):u=n,typeof i=="function"?c=i(B(T({},a),{defaultChildren:s})):i==null?c=s:c=i,{className:l!=null?l:r,style:u||o?T(T({},o),u):void 0,children:c!=null?c:s,"data-rac":""}},[t,n,i,r,s,o,a])}function zh(e,t){let n=_.useContext(e);if(t===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(!t&&!n.slots[Xx])throw new Error(`A slot prop is required. Valid slot names are ${i}.`);let r=t||Xx;if(!n.slots[r])throw new Error(`Invalid slot "${t}". Valid slot names are ${i}.`);return n.slots[r]}return n}function Rn(e,t,n){let l=zh(n,e.slot)||{},{ref:r}=l,s=te(l,["ref"]),o=ID(_.useMemo(()=>wD(t,r),[t,r])),a=_e(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?a.style=u=>{let c=typeof s.style=="function"?s.style(u):s.style,d=T(T({},u.defaultStyle),c),f=typeof e.style=="function"?e.style(B(T({},u),{defaultStyle:d})):e.style;return T(T({},d),f)}:a.style=T(T({},s.style),e.style)),[a,o]}function Bh(){let[e,t]=_.useState(!0),n=_.useRef(!1),i=_.useCallback(r=>{n.current=!0,t(!!r)},[]);return mi(()=>{n.current||t(!1)},[]),[i,e]}function BD(e){const t=/^(data-.*)$/;let n={};for(const i in e)t.test(i)||(n[i]=e[i]);return n}if(typeof HTMLTemplateElement!="undefined"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const HD=_.createContext(!1);typeof DocumentFragment!="undefined"&&new DocumentFragment;function qx(e){let t=(n,i)=>_.useContext(HD)?null:e(n,i);return t.displayName=e.displayName||e.name,_.forwardRef(t)}const nu=_.createContext({}),Qx=qx(function(t,n){[t,n]=Rn(t,n,nu);let s=t,{elementType:i="label"}=s,r=te(s,["elementType"]);return Z.createElement(i,B(T({className:"react-aria-Label"},r),{ref:n}))});let is="default",Hh="",iu=new WeakMap;function Wh(e){if(Rh()){if(is==="default"){const t=Bt(e);Hh=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}is="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(iu.set(e,e.style.userSelect),e.style.userSelect="none")}function Mo(e){if(Rh()){if(is!=="disabled")return;is="restoring",setTimeout(()=>{Yx(()=>{if(is==="restoring"){const t=Bt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Hh||""),Hh="",is="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&iu.has(e)){let t=iu.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),iu.delete(e)}}const Zx=Z.createContext({register:()=>{}});Zx.displayName="PressResponderContext";function WD(e,t){return t.get?t.get.call(e):t.value}function Jx(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function UD(e,t){var n=Jx(e,t,"get");return WD(e,n)}function KD(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function YD(e,t,n){KD(e,t),t.set(e,n)}function GD(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function e_(e,t,n){var i=Jx(e,t,"set");return GD(e,i,n),n}function XD(e){let t=_.useContext(Zx);if(t){let n=t,{register:i}=n,r=te(n,["register"]);e=_e(r,e),i()}return Gx(t,e.ref),e}var ru=new WeakMap;class su{continuePropagation(){e_(this,ru,!1)}get shouldStopPropagation(){return UD(this,ru)}constructor(t,n,i,r){YD(this,ru,{writable:!0,value:void 0}),e_(this,ru,!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=t,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 t_=Symbol("linkClicked");function qD(e){let M=XD(e),{onPress:t,onPressChange:n,onPressStart:i,onPressEnd:r,onPressUp:s,isDisabled:o,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d}=M,f=te(M,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref"]),[h,m]=_.useState(!1),v=_.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:x,removeAllGlobalListeners:p}=$o(),g=Be((P,E)=>{let F=v.current;if(o||F.didFirePressStart)return!1;let C=!0;if(F.isTriggeringEvent=!0,i){let I=new su("pressstart",E,P);i(I),C=I.shouldStopPropagation}return n&&n(!0),F.isTriggeringEvent=!1,F.didFirePressStart=!0,m(!0),C}),b=Be((P,E,F=!0)=>{let C=v.current;if(!C.didFirePressStart)return!1;C.ignoreClickAfterPress=!0,C.didFirePressStart=!1,C.isTriggeringEvent=!0;let I=!0;if(r){let A=new su("pressend",E,P);r(A),I=A.shouldStopPropagation}if(n&&n(!1),m(!1),t&&F&&!o){let A=new su("press",E,P);t(A),I&&(I=A.shouldStopPropagation)}return C.isTriggeringEvent=!1,I}),w=Be((P,E)=>{let F=v.current;if(o)return!1;if(s){F.isTriggeringEvent=!0;let C=new su("pressup",E,P);return s(C),F.isTriggeringEvent=!1,C.shouldStopPropagation}return!0}),S=Be(P=>{let E=v.current;E.isPressed&&E.target&&(E.isOverTarget&&E.pointerType!=null&&b(Fn(E.target,P),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,p(),c||Mo(E.target))}),k=Be(P=>{u&&S(P)}),$=_.useMemo(()=>{let P=v.current,E={onKeyDown(C){if(Kh(C.nativeEvent,C.currentTarget)&&C.currentTarget.contains(C.target)){var I;r_(C.target,C.key)&&C.preventDefault();let A=!0;if(!P.isPressed&&!C.repeat){P.target=C.currentTarget,P.isPressed=!0,A=g(C,"keyboard");let L=C.currentTarget,R=z=>{Kh(z,L)&&!z.repeat&&L.contains(z.target)&&P.target&&w(Fn(P.target,z),"keyboard")};x(Bt(C.currentTarget),"keyup",Ah(R,F),!0)}A&&C.stopPropagation(),C.metaKey&&Eo()&&((I=P.metaKeyEvents)===null||I===void 0||I.set(C.key,C.nativeEvent))}else C.key==="Meta"&&(P.metaKeyEvents=new Map)},onClick(C){if(!(C&&!C.currentTarget.contains(C.target))&&C&&C.button===0&&!P.isTriggeringEvent&&!es.isOpening){let I=!0;if(o&&C.preventDefault(),!P.ignoreClickAfterPress&&!P.ignoreEmulatedMouseEvents&&!P.isPressed&&(P.pointerType==="virtual"||jh(C.nativeEvent))){!o&&!l&&vi(C.currentTarget);let A=g(C,"virtual"),L=w(C,"virtual"),R=b(C,"virtual");I=A&&L&&R}P.ignoreEmulatedMouseEvents=!1,P.ignoreClickAfterPress=!1,I&&C.stopPropagation()}}},F=C=>{var I;if(P.isPressed&&P.target&&Kh(C,P.target)){var A;r_(C.target,C.key)&&C.preventDefault();let R=C.target;b(Fn(P.target,C),"keyboard",P.target.contains(R)),p(),C.key!=="Enter"&&Uh(P.target)&&P.target.contains(R)&&!C[t_]&&(C[t_]=!0,es(P.target,C,!1)),P.isPressed=!1,(A=P.metaKeyEvents)===null||A===void 0||A.delete(C.key)}else if(C.key==="Meta"&&(!((I=P.metaKeyEvents)===null||I===void 0)&&I.size)){var L;let R=P.metaKeyEvents;P.metaKeyEvents=void 0;for(let z of R.values())(L=P.target)===null||L===void 0||L.dispatchEvent(new KeyboardEvent("keyup",z))}};if(typeof PointerEvent!="undefined"){E.onPointerDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(zD(L.nativeEvent)){P.pointerType="virtual";return}Gh(L.currentTarget)&&L.preventDefault(),P.pointerType=L.pointerType;let R=!0;if(!P.isPressed){P.isPressed=!0,P.isOverTarget=!0,P.activePointerId=L.pointerId,P.target=L.currentTarget,!o&&!l&&vi(L.currentTarget),c||Wh(P.target),R=g(L,P.pointerType);let z=L.target;"releasePointerCapture"in z&&z.releasePointerCapture(L.pointerId),x(Bt(L.currentTarget),"pointerup",C,!1),x(Bt(L.currentTarget),"pointercancel",A,!1)}R&&L.stopPropagation()},E.onMouseDown=L=>{L.currentTarget.contains(L.target)&&L.button===0&&(Gh(L.currentTarget)&&L.preventDefault(),L.stopPropagation())},E.onPointerUp=L=>{!L.currentTarget.contains(L.target)||P.pointerType==="virtual"||L.button===0&&w(L,P.pointerType||L.pointerType)},E.onPointerEnter=L=>{L.pointerId===P.activePointerId&&P.target&&!P.isOverTarget&&P.pointerType!=null&&(P.isOverTarget=!0,g(Fn(P.target,L),P.pointerType))},E.onPointerLeave=L=>{L.pointerId===P.activePointerId&&P.target&&P.isOverTarget&&P.pointerType!=null&&(P.isOverTarget=!1,b(Fn(P.target,L),P.pointerType,!1),k(L))};let C=L=>{L.pointerId===P.activePointerId&&P.isPressed&&L.button===0&&P.target&&(P.target.contains(L.target)&&P.pointerType!=null?b(Fn(P.target,L),P.pointerType):P.isOverTarget&&P.pointerType!=null&&b(Fn(P.target,L),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,p(),c||Mo(P.target),"ontouchend"in P.target&&L.pointerType!=="mouse"&&x(P.target,"touchend",I,{once:!0}))},I=L=>{i_(L.currentTarget)&&L.preventDefault()},A=L=>{S(L)};E.onDragStart=L=>{L.currentTarget.contains(L.target)&&S(L)}}else{E.onMouseDown=A=>{if(A.button!==0||!A.currentTarget.contains(A.target))return;if(Gh(A.currentTarget)&&A.preventDefault(),P.ignoreEmulatedMouseEvents){A.stopPropagation();return}P.isPressed=!0,P.isOverTarget=!0,P.target=A.currentTarget,P.pointerType=jh(A.nativeEvent)?"virtual":"mouse",!o&&!l&&vi(A.currentTarget),g(A,P.pointerType)&&A.stopPropagation(),x(Bt(A.currentTarget),"mouseup",C,!1)},E.onMouseEnter=A=>{if(!A.currentTarget.contains(A.target))return;let L=!0;P.isPressed&&!P.ignoreEmulatedMouseEvents&&P.pointerType!=null&&(P.isOverTarget=!0,L=g(A,P.pointerType)),L&&A.stopPropagation()},E.onMouseLeave=A=>{if(!A.currentTarget.contains(A.target))return;let L=!0;P.isPressed&&!P.ignoreEmulatedMouseEvents&&P.pointerType!=null&&(P.isOverTarget=!1,L=b(A,P.pointerType,!1),k(A)),L&&A.stopPropagation()},E.onMouseUp=A=>{A.currentTarget.contains(A.target)&&!P.ignoreEmulatedMouseEvents&&A.button===0&&w(A,P.pointerType||"mouse")};let C=A=>{if(A.button===0){if(P.isPressed=!1,p(),P.ignoreEmulatedMouseEvents){P.ignoreEmulatedMouseEvents=!1;return}P.target&&Yh(A,P.target)&&P.pointerType!=null?b(Fn(P.target,A),P.pointerType):P.target&&P.isOverTarget&&P.pointerType!=null&&b(Fn(P.target,A),P.pointerType,!1),P.isOverTarget=!1}};E.onTouchStart=A=>{if(!A.currentTarget.contains(A.target))return;let L=QD(A.nativeEvent);if(!L)return;P.activePointerId=L.identifier,P.ignoreEmulatedMouseEvents=!0,P.isOverTarget=!0,P.isPressed=!0,P.target=A.currentTarget,P.pointerType="touch",!o&&!l&&vi(A.currentTarget),c||Wh(P.target),g(bi(P.target,A),P.pointerType)&&A.stopPropagation(),x(rn(A.currentTarget),"scroll",I,!0)},E.onTouchMove=A=>{if(!A.currentTarget.contains(A.target))return;if(!P.isPressed){A.stopPropagation();return}let L=n_(A.nativeEvent,P.activePointerId),R=!0;L&&Yh(L,A.currentTarget)?!P.isOverTarget&&P.pointerType!=null&&(P.isOverTarget=!0,R=g(bi(P.target,A),P.pointerType)):P.isOverTarget&&P.pointerType!=null&&(P.isOverTarget=!1,R=b(bi(P.target,A),P.pointerType,!1),k(bi(P.target,A))),R&&A.stopPropagation()},E.onTouchEnd=A=>{if(!A.currentTarget.contains(A.target))return;if(!P.isPressed){A.stopPropagation();return}let L=n_(A.nativeEvent,P.activePointerId),R=!0;L&&Yh(L,A.currentTarget)&&P.pointerType!=null?(w(bi(P.target,A),P.pointerType),R=b(bi(P.target,A),P.pointerType)):P.isOverTarget&&P.pointerType!=null&&(R=b(bi(P.target,A),P.pointerType,!1)),R&&A.stopPropagation(),P.isPressed=!1,P.activePointerId=null,P.isOverTarget=!1,P.ignoreEmulatedMouseEvents=!0,P.target&&!c&&Mo(P.target),p()},E.onTouchCancel=A=>{A.currentTarget.contains(A.target)&&(A.stopPropagation(),P.isPressed&&S(bi(P.target,A)))};let I=A=>{P.isPressed&&A.target.contains(P.target)&&S({currentTarget:P.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};E.onDragStart=A=>{A.currentTarget.contains(A.target)&&S(A)}}return E},[x,o,l,p,c,S,k,b,g,w]);return _.useEffect(()=>()=>{var P;c||Mo((P=v.current.target)!==null&&P!==void 0?P:void 0)},[c]),{isPressed:a||h,pressProps:_e(f,$)}}function Uh(e){return e.tagName==="A"&&e.hasAttribute("href")}function Kh(e,t){const{key:n,code:i}=e,r=t,s=r.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||i==="Space")&&!(r instanceof rn(r).HTMLInputElement&&!s_(r,n)||r instanceof rn(r).HTMLTextAreaElement||r.isContentEditable)&&!((s==="link"||!s&&Uh(r))&&n!=="Enter")}function QD(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function n_(e,t){const n=e.changedTouches;for(let i=0;it.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Yh(e,t){let n=t.getBoundingClientRect(),i=ZD(e);return JD(n,i)}function Gh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function i_(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Uh(e)}function r_(e,t){return e instanceof HTMLInputElement?!s_(e,t):i_(e)}const eA=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function s_(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":eA.has(e.type)}class tA{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function o_(e){let t=_.useRef({isFocused:!1,observer:null});mi(()=>{const i=t.current;return()=>{i.observer&&(i.observer.disconnect(),i.observer=null)}},[]);let n=Be(i=>{e==null||e(i)});return _.useCallback(i=>{if(i.target instanceof HTMLButtonElement||i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=i.target,s=o=>{t.current.isFocused=!1,r.disabled&&n(new tA("blur",o)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var o;(o=t.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}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Xh(e){let{isDisabled:t,onFocus:n,onBlur:i,onFocusChange:r}=e;const s=_.useCallback(l=>{if(l.target===l.currentTarget)return i&&i(l),r&&r(!1),!0},[i,r]),o=o_(s),a=_.useCallback(l=>{const u=Bt(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),r&&r(!0),o(l))},[r,n,o]);return{focusProps:{onFocus:!t&&(n||r||i)?a:void 0,onBlur:!t&&(i||r)?s:void 0}}}let tr=null,qh=new Set,Do=new Map,nr=!1,Qh=!1;const nA={Tab:!0,Escape:!0};function ou(e,t){for(let n of qh)n(e,t)}function iA(e){return!(e.metaKey||!Eo()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function au(e){nr=!0,iA(e)&&(tr="keyboard",ou("keyboard",e))}function Ht(e){tr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(nr=!0,ou("pointer",e))}function a_(e){jh(e)&&(nr=!0,tr="virtual")}function l_(e){e.target===window||e.target===document||(!nr&&!Qh&&(tr="virtual",ou("virtual",e)),nr=!1,Qh=!1)}function u_(){nr=!1,Qh=!0}function Zh(e){if(typeof window=="undefined"||Do.get(rn(e)))return;const t=rn(e),n=Bt(e);let i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){nr=!0,i.apply(this,arguments)},n.addEventListener("keydown",au,!0),n.addEventListener("keyup",au,!0),n.addEventListener("click",a_,!0),t.addEventListener("focus",l_,!0),t.addEventListener("blur",u_,!1),typeof PointerEvent!="undefined"?(n.addEventListener("pointerdown",Ht,!0),n.addEventListener("pointermove",Ht,!0),n.addEventListener("pointerup",Ht,!0)):(n.addEventListener("mousedown",Ht,!0),n.addEventListener("mousemove",Ht,!0),n.addEventListener("mouseup",Ht,!0)),t.addEventListener("beforeunload",()=>{c_(e)},{once:!0}),Do.set(t,{focus:i})}const c_=(e,t)=>{const n=rn(e),i=Bt(e);t&&i.removeEventListener("DOMContentLoaded",t),Do.has(n)&&(n.HTMLElement.prototype.focus=Do.get(n).focus,i.removeEventListener("keydown",au,!0),i.removeEventListener("keyup",au,!0),i.removeEventListener("click",a_,!0),n.removeEventListener("focus",l_,!0),n.removeEventListener("blur",u_,!1),typeof PointerEvent!="undefined"?(i.removeEventListener("pointerdown",Ht,!0),i.removeEventListener("pointermove",Ht,!0),i.removeEventListener("pointerup",Ht,!0)):(i.removeEventListener("mousedown",Ht,!0),i.removeEventListener("mousemove",Ht,!0),i.removeEventListener("mouseup",Ht,!0)),Do.delete(n))};function rA(e){const t=Bt(e);let n;return t.readyState!=="loading"?Zh(e):(n=()=>{Zh(e)},t.addEventListener("DOMContentLoaded",n)),()=>c_(e,n)}typeof document!="undefined"&&rA();function d_(){return tr!=="pointer"}function sA(){return tr}function f_(e){tr=e,ou(e,null)}const oA=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function aA(e,t,n){var i;const r=typeof window!="undefined"?rn(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window!="undefined"?rn(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window!="undefined"?rn(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window!="undefined"?rn(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof r&&!oA.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),!(e&&t==="keyboard"&&n instanceof a&&!nA[n.key])}function lA(e,t,n){Zh(),_.useEffect(()=>{let i=(r,s)=>{aA(!!(n!=null&&n.isTextInput),r,s)&&e(d_())};return qh.add(i),()=>{qh.delete(i)}},t)}function Jh(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:i,onFocusWithinChange:r}=e,s=_.useRef({isFocusWithin:!1}),o=_.useCallback(u=>{s.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(u),r&&r(!1))},[n,r,s]),a=o_(o),l=_.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 t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}let lu=!1,ep=0;function tp(){lu=!0,setTimeout(()=>{lu=!1},50)}function h_(e){e.pointerType==="touch"&&tp()}function uA(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",h_):document.addEventListener("touchend",tp),ep++,()=>{ep--,!(ep>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",h_):document.removeEventListener("touchend",tp))}}function Ao(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,isDisabled:r}=e,[s,o]=_.useState(!1),a=_.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;_.useEffect(uA,[]);let{hoverProps:l,triggerHoverEnd:u}=_.useMemo(()=>{let c=(h,m)=>{if(a.pointerType=m,r||m==="touch"||a.isHovered||!h.currentTarget.contains(h.target))return;a.isHovered=!0;let v=h.currentTarget;a.target=v,t&&t({type:"hoverstart",target:v,pointerType:m}),n&&n(!0),o(!0)},d=(h,m)=>{if(a.pointerType="",a.target=null,m==="touch"||!a.isHovered)return;a.isHovered=!1;let v=h.currentTarget;i&&i({type:"hoverend",target:v,pointerType:m}),n&&n(!1),o(!1)},f={};return typeof PointerEvent!="undefined"?(f.onPointerEnter=h=>{lu&&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&&!lu&&c(h,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=h=>{!r&&h.currentTarget.contains(h.target)&&d(h,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,i,r,a]);return _.useEffect(()=>{r&&u({currentTarget:a.target},a.pointerType)},[r]),{hoverProps:l,isHovered:s}}function p_(e){if(!e)return;let t=!0;return n=>{let i=B(T({},n),{preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}});e(i),t&&n.stopPropagation()}}function m_(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:p_(e.onKeyDown),onKeyUp:p_(e.onKeyUp)}}}function g_(e){let{onMoveStart:t,onMove:n,onMoveEnd:i}=e,r=_.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:s,removeGlobalListener:o}=$o(),a=Be((c,d,f,h)=>{f===0&&h===0||(r.current.didMove||(r.current.didMove=!0,t==null||t({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=Be((c,d)=>{Mo(),r.current.didMove&&(i==null||i({type:"moveend",pointerType:d,shiftKey:c.shiftKey,metaKey:c.metaKey,ctrlKey:c.ctrlKey,altKey:c.altKey}))});return{moveProps:_.useMemo(()=>{let c={},d=()=>{Wh(),r.current.didMove=!1};if(typeof PointerEvent=="undefined"){let h=p=>{if(p.button===0){var g,b,w,S;a(p,"mouse",p.pageX-((w=(g=r.current.lastPosition)===null||g===void 0?void 0:g.pageX)!==null&&w!==void 0?w:0),p.pageY-((S=(b=r.current.lastPosition)===null||b===void 0?void 0:b.pageY)!==null&&S!==void 0?S:0)),r.current.lastPosition={pageX:p.pageX,pageY:p.pageY}}},m=p=>{p.button===0&&(l(p,"mouse"),o(window,"mousemove",h,!1),o(window,"mouseup",m,!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",m,!1))};let v=p=>{let g=[...p.changedTouches].findIndex(({identifier:$})=>$===r.current.id);if(g>=0){var b,w;let{pageX:$,pageY:M}=p.changedTouches[g];var S,k;a(p,"touch",$-((S=(b=r.current.lastPosition)===null||b===void 0?void 0:b.pageX)!==null&&S!==void 0?S:0),M-((k=(w=r.current.lastPosition)===null||w===void 0?void 0:w.pageY)!==null&&k!==void 0?k:0)),r.current.lastPosition={pageX:$,pageY:M}}},x=p=>{[...p.changedTouches].findIndex(({identifier:b})=>b===r.current.id)>=0&&(l(p,"touch"),r.current.id=null,o(window,"touchmove",v),o(window,"touchend",x),o(window,"touchcancel",x))};c.onTouchStart=p=>{if(p.changedTouches.length===0||r.current.id!=null)return;let{pageX:g,pageY:b,identifier:w}=p.changedTouches[0];d(),p.stopPropagation(),p.preventDefault(),r.current.lastPosition={pageX:g,pageY:b},r.current.id=w,s(window,"touchmove",v,!1),s(window,"touchend",x,!1),s(window,"touchcancel",x,!1)}}else{let h=v=>{if(v.pointerId===r.current.id){var x,p;let w=v.pointerType||"mouse";var g,b;a(v,w,v.pageX-((g=(x=r.current.lastPosition)===null||x===void 0?void 0:x.pageX)!==null&&g!==void 0?g:0),v.pageY-((b=(p=r.current.lastPosition)===null||p===void 0?void 0:p.pageY)!==null&&b!==void 0?b:0)),r.current.lastPosition={pageX:v.pageX,pageY:v.pageY}}},m=v=>{if(v.pointerId===r.current.id){let x=v.pointerType||"mouse";l(v,x),r.current.id=null,o(window,"pointermove",h,!1),o(window,"pointerup",m,!1),o(window,"pointercancel",m,!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",m,!1),s(window,"pointercancel",m,!1))}}let f=(h,m,v)=>{d(),a(h,"keyboard",m,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 cA(e,t){let{onScroll:n,isDisabled:i}=e,r=_.useCallback(s=>{s.ctrlKey||(s.preventDefault(),s.stopPropagation(),n&&n({deltaX:s.deltaX,deltaY:s.deltaY}))},[n]);VD(t,"wheel",i?void 0:r)}function dA(e){const t=Bt(e);if(sA()==="virtual"){let n=t.activeElement;Yx(()=>{t.activeElement===n&&e.isConnected&&vi(e)})}else vi(e)}function uu(e={}){let{autoFocus:t=!1,isTextInput:n,within:i}=e,r=_.useRef({isFocused:!1,isFocusVisible:t||d_()}),[s,o]=_.useState(!1),[a,l]=_.useState(()=>r.current.isFocused&&r.current.isFocusVisible),u=_.useCallback(()=>l(r.current.isFocused&&r.current.isFocusVisible),[]),c=_.useCallback(h=>{r.current.isFocused=h,o(h),u()},[u]);lA(h=>{r.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:d}=Xh({isDisabled:i,onFocusChange:c}),{focusWithinProps:f}=Jh({isDisabled:!i,onFocusWithinChange:c});return{isFocused:s,isFocusVisible:a,focusProps:i?f:d}}let fA=Z.createContext(null);function hA(e){let t=_.useContext(fA)||{};Gx(t,e);let r=t,{ref:n}=r;return te(r,["ref"])}function np(e,t){let{focusProps:n}=Xh(e),{keyboardProps:i}=m_(e),r=_e(n,i),s=hA(t),o=e.isDisabled?{}:s,a=_.useRef(e.autoFocus);return _.useEffect(()=>{a.current&&t.current&&dA(t.current),a.current=!1},[t]),{focusableProps:_e(B(T({},r),{tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0}),o)}}function pA(e,t){let p=e,{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}=np(e,t),{pressProps:d,isPressed:f}=qD({onPress:i,onPressStart:r,onPressEnd:s,isDisabled:a,ref:t}),h=er(l,{labelable:!0}),m=_e(c,d),v=Ux(),x=jD(e);return{isPressed:f,linkProps:_e(h,x,B(T(T({},m),u),{"aria-disabled":a||void 0,"aria-current":e["aria-current"],onClick:g=>{var b;(b=d.onClick)===null||b===void 0||b.call(d,g),o&&(o(g),console.warn("onClick is deprecated, please use onPress")),!v.isNative&&g.currentTarget instanceof HTMLAnchorElement&&g.currentTarget.href&&!g.isDefaultPrevented()&&RD(g.currentTarget,g)&&e.href&&(g.preventDefault(),v.open(g.currentTarget,g,e.href,e.routerOptions))}}))}}const mA=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gA=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function vA(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),i=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(i)return i.direction==="rtl";if(n.script)return mA.has(n.script)}let t=e.split("-")[0];return gA.has(t)}const yA=Symbol.for("react-aria.i18n.locale");function v_(){let e=typeof window!="undefined"&&window[yA]||typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:vA(e)?"rtl":"ltr"}}let ip=v_(),Lo=new Set;function y_(){ip=v_();for(let e of Lo)e(ip)}function bA(){let e=Vx(),[t,n]=_.useState(ip);return _.useEffect(()=>(Lo.size===0&&window.addEventListener("languagechange",y_),Lo.add(n),()=>{Lo.delete(n),Lo.size===0&&window.removeEventListener("languagechange",y_)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const xA=Z.createContext(null);function Ro(){let e=bA();return _.useContext(xA)||e}const _A=Symbol.for("react-aria.i18n.locale"),wA=Symbol.for("react-aria.i18n.strings");let rs;class cu{getStringForLocale(t,n){let r=this.getStringsForLocale(n)[t];if(!r)throw new Error(`Could not find intl message ${t} in ${n} locale`);return r}getStringsForLocale(t){let n=this.strings[t];return n||(n=SA(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window=="undefined")return null;let n=window[_A];if(rs===void 0){let r=window[wA];if(!r)return null;rs={};for(let s in r)rs[s]=new cu({[n]:r[s]},n)}let i=rs==null?void 0:rs[t];if(!i)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return i}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,i])=>i)),this.defaultLocale=n}}function SA(e,t,n="en-US"){if(t[e])return t[e];let i=PA(e);if(t[i])return t[i];for(let r in t)if(r.startsWith(i+"-"))return t[r];return t[n]}function PA(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const b_=new Map,x_=new Map;class kA{format(t,n){let i=this.strings.getStringForLocale(t,this.locale);return typeof i=="function"?i(n,this):i}plural(t,n,i="cardinal"){let r=n["="+t];if(r)return typeof r=="function"?r():r;let s=this.locale+":"+i,o=b_.get(s);o||(o=new Intl.PluralRules(this.locale,{type:i}),b_.set(s,o));let a=o.select(t);return r=n[a]||n.other,typeof r=="function"?r():r}number(t){let n=x_.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),x_.set(this.locale,n)),n.format(t)}select(t,n){let i=t[n]||t.other;return typeof i=="function"?i():i}constructor(t,n){this.locale=t,this.strings=n}}const __=new WeakMap;function CA(e){let t=__.get(e);return t||(t=new cu(e),__.set(e,t)),t}function TA(e,t){return t&&cu.getGlobalDictionaryForPackage(t)||CA(e)}function w_(e,t){let{locale:n}=Ro(),i=TA(e,t);return _.useMemo(()=>new kA(n,i),[n,i])}let rp=new Map,sp=!1;try{sp=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch(e){}let du=!1;try{du=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch(e){}const S_={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class fu{format(t){let n="";if(!sp&&this.options.signDisplay!=null?n=$A(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!du){var i;let{unit:r,unitDisplay:s="short",locale:o}=this.resolvedOptions();if(!r)return n;let a=(i=S_[r])===null||i===void 0?void 0:i[s];n+=a[o]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let i=this.numberFormatter.formatToParts(t),r=this.numberFormatter.formatToParts(n);return[...i.map(s=>B(T({},s),{source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(s=>B(T({},s),{source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!sp&&this.options.signDisplay!=null&&(t=B(T({},t),{signDisplay:this.options.signDisplay})),!du&&this.options.style==="unit"&&(t=B(T({},t),{style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay})),t}constructor(t,n={}){this.numberFormatter=EA(t,n),this.options=n}}function EA(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!du){var i;let{unit:o,unitDisplay:a="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((i=S_[o])===null||i===void 0)&&i[a]))throw new Error(`Unsupported unit ${o} with unitDisplay = ${a}`);t=B(T({},t),{style:"decimal"})}let r=e+(t?Object.entries(t).sort((o,a)=>o[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):i=n>0),i){let r=e.format(-n),s=e.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 e.format(n)}}const MA=new RegExp("^.*\\(.*\\).*$"),DA=["latn","arab","hanidec","deva","beng"];class P_{parse(t){return op(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,i){return op(this.locale,this.options,t).isValidPartialNumber(t,n,i)}getNumberingSystem(t){return op(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const k_=new Map;function op(e,t,n){let i=C_(e,t);if(!e.includes("-nu-")&&!i.isValidPartialNumber(n)){for(let r of DA)if(r!==i.options.numberingSystem){let s=C_(e+(e.includes("-u-")?"-nu-":"-u-nu-")+r,t);if(s.isValidPartialNumber(n))return s}}return i}function C_(e,t){let n=e+(t?Object.entries(t).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=B(T({},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 P_(this.locale,o).parse(new fu(this.locale,o).format(i))}return this.options.currencySign==="accounting"&&MA.test(t)&&(i=-1*i),i}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=hu(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=hu(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,i=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&i>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=hu(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=RA(t,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 T_=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),LA=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function RA(e,t,n,i){var r,s,o,a;let l=new Intl.NumberFormat(e,B(T({},n),{minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"})),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=LA.map(E=>l.formatToParts(E));var f;let h=(f=(r=u.find(E=>E.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&f!==void 0?f:"-",m=(s=c.find(E=>E.type==="plusSign"))===null||s===void 0?void 0:s.value;!m&&((i==null?void 0:i.signDisplay)==="exceptZero"||(i==null?void 0:i.signDisplay)==="always")&&(m="+");let x=(o=new Intl.NumberFormat(e,B(T({},n),{minimumFractionDigits:2,maximumFractionDigits:2})).formatToParts(.001).find(E=>E.type==="decimal"))===null||o===void 0?void 0:o.value,p=(a=u.find(E=>E.type==="group"))===null||a===void 0?void 0:a.value,g=u.filter(E=>!T_.has(E.type)).map(E=>E_(E.value)),b=d.flatMap(E=>E.filter(F=>!T_.has(F.type)).map(F=>E_(F.value))),w=[...new Set([...g,...b])].sort((E,F)=>F.length-E.length),S=w.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${w.join("|")}|[\\p{White_Space}]`,"gu"),k=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),$=new Map(k.map((E,F)=>[E,F])),M=new RegExp(`[${k.join("")}]`,"g");return{minusSign:h,plusSign:m,decimal:x,group:p,literals:S,numeral:M,index:E=>String($.get(E))}}function hu(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function E_(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ap(e={}){let{locale:t}=Ro();return _.useMemo(()=>new fu(t,e),[t,e])}const $_=7e3;let Wt=null;function FA(e,t="assertive",n=$_){Wt?Wt.announce(e,t,n):(Wt=new jA,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest!="undefined")?Wt.announce(e,t,n):setTimeout(()=>{Wt!=null&&Wt.isAttached()&&(Wt==null||Wt.announce(e,t,n))},100))}function NA(e){Wt&&Wt.clear(e)}class jA{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",i=$_){var r,s;if(!this.node)return;let o=document.createElement("div");typeof t=="object"?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",t["aria-labelledby"])):o.textContent=t,n==="assertive"?(r=this.assertiveLog)===null||r===void 0||r.appendChild(o):(s=this.politeLog)===null||s===void 0||s.appendChild(o),t!==""&&setTimeout(()=>{o.remove()},i)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="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))}}const M_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},D_=B(T({},M_),{customError:!0,valid:!1}),Fo={isInvalid:!1,validationDetails:M_,validationErrors:[]},OA=_.createContext({}),lp="__formValidationState"+Date.now();function A_(e){if(e[lp]){let{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:s}=e[lp];return{realtimeValidation:t,displayValidation:n,updateValidation:i,resetValidation:r,commitValidation:s}}return IA(e)}function IA(e){let{isInvalid:t,validationState:n,name:i,value:r,builtinValidation:s,validate:o,validationBehavior:a="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:D_}:null,u=_.useMemo(()=>{if(!o||r==null)return null;let E=VA(o,r);return L_(E)},[o,r]);s!=null&&s.validationDetails.valid&&(s=void 0);let c=_.useContext(OA),d=_.useMemo(()=>i?Array.isArray(i)?i.flatMap(E=>up(c[E])):up(c[i]):[],[c,i]),[f,h]=_.useState(c),[m,v]=_.useState(!1);c!==f&&(h(c),v(!1));let x=_.useMemo(()=>L_(m?[]:d),[m,d]),p=_.useRef(Fo),[g,b]=_.useState(Fo),w=_.useRef(Fo),S=()=>{if(!k)return;$(!1);let E=u||s||p.current;cp(E,w.current)||(w.current=E,b(E))},[k,$]=_.useState(!1);return _.useEffect(S),{realtimeValidation:l||x||u||s||Fo,displayValidation:a==="native"?l||x||g:l||x||u||s||g,updateValidation(E){a==="aria"&&!cp(g,E)?b(E):p.current=E},resetValidation(){let E=Fo;cp(E,w.current)||(w.current=E,b(E)),a==="native"&&$(!1),v(!0)},commitValidation(){a==="native"&&$(!0),v(!0)}}}function up(e){return e?Array.isArray(e)?e:[e]:[]}function VA(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return up(n)}return[]}function L_(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:D_}:null}function cp(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,i)=>n===t.validationErrors[i])&&Object.entries(e.validationDetails).every(([n,i])=>t.validationDetails[n]===i)}function zA(e,t,n){let{validationBehavior:i,focus:r}=e;mi(()=>{if(i==="native"&&(n!=null&&n.current)&&!n.current.disabled){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(HA(n.current))}});let s=Be(()=>{t.resetValidation()}),o=Be(l=>{var u;t.displayValidation.isInvalid||t.commitValidation();let c=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&n&&c&&WA(c)===n.current){var d;r?r():(d=n.current)===null||d===void 0||d.focus(),f_("keyboard")}l.preventDefault()}),a=Be(()=>{t.commitValidation()});_.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 BA(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function HA(e){return{isInvalid:!e.validity.valid,validationDetails:BA(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function WA(e){for(let t=0;t{let j=(i-n)/10;return j=gt(j,0,j+s,s),Math.max(j,s)},[s,i,n]),l=_.useCallback(j=>j==null?void 0:j.map((H,q)=>{let J=q===0?n:j[q-1],re=q===j.length-1?i:j[q+1];return gt(H,J,re,s)}),[n,i,s]),u=_.useMemo(()=>l(F_(e.value)),[e.value]),c=_.useMemo(()=>{var j;return l((j=F_(e.defaultValue))!==null&&j!==void 0?j:[n])},[e.defaultValue,n]),d=N_(e.value,e.defaultValue,e.onChange),f=N_(e.value,e.defaultValue,e.onChangeEnd);const[h,m]=Ih(u,c,d),[v,x]=_.useState(new Array(h.length).fill(!1)),p=_.useRef(new Array(h.length).fill(!0)),[g,b]=_.useState(void 0),w=_.useRef(h),S=_.useRef(v);let k=j=>{w.current=j,m(j)},$=j=>{S.current=j,x(j)};function M(j){return(j-n)/(i-n)}function P(j){return j===0?n:h[j-1]}function E(j){return j===h.length-1?i:h[j+1]}function F(j){return p.current[j]}function C(j,H){p.current[j]=H}function I(j,H){if(t||!F(j))return;const q=P(j),J=E(j);H=gt(H,q,J,s);let re=R_(w.current,j,H);k(re)}function A(j,H){if(t||!F(j))return;H&&(w.current=h);const q=S.current[j];S.current=R_(S.current,j,H),$(S.current),f&&q&&!S.current.some(Boolean)&&f(w.current)}function L(j){return r.format(j)}function R(j,H){I(j,N(H))}function z(j){return Math.round((j-n)/s)*s+n}function N(j){const H=j*(i-n)+n;return ns(z(H),n,i)}function V(j,H=1){let q=Math.max(H,s);I(j,gt(h[j]+q,n,i,s))}function U(j,H=1){let q=Math.max(H,s);I(j,gt(h[j]-q,n,i,s))}return{values:h,getThumbValue:j=>h[j],setThumbValue:I,setThumbPercent:R,isThumbDragging:j=>v[j],setThumbDragging:A,focusedThumb:g,setFocusedThumb:b,getThumbPercent:j=>M(h[j]),getValuePercent:M,getThumbValueLabel:j=>L(h[j]),getFormattedValue:L,getThumbMinValue:P,getThumbMaxValue:E,getPercentValue:N,isThumbEditable:F,setThumbEditable:C,incrementThumb:V,decrementThumb:U,step:s,pageSize:a,orientation:o,isDisabled:t}}function R_(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function F_(e){if(e!=null)return Array.isArray(e)?e:[e]}function N_(e,t,n){return i=>{typeof e=="number"||typeof t=="number"?n==null||n(i[0]):n==null||n(i)}}function qA(e){let{minValue:t,maxValue:n,step:i,formatOptions:r,value:s,defaultValue:o=NaN,onChange:a,locale:l,isDisabled:u,isReadOnly:c}=e;s===null&&(s=NaN),s!==void 0&&!isNaN(s)&&(i!==void 0&&!isNaN(i)?s=gt(s,t,n,i):s=ns(s,t,n)),isNaN(o)||(i!==void 0&&!isNaN(i)?o=gt(o,t,n,i):o=ns(o,t,n));let[d,f]=Ih(s,isNaN(o)?NaN:o,a),[h,m]=_.useState(()=>isNaN(d)?"":new fu(l,r).format(d)),v=_.useMemo(()=>new P_(l,r),[l,r]),x=_.useMemo(()=>v.getNumberingSystem(h),[v,h]),p=_.useMemo(()=>new fu(l,B(T({},r),{numberingSystem:x})),[l,r,x]),g=_.useMemo(()=>p.resolvedOptions(),[p]),b=_.useCallback(H=>isNaN(H)||H===null?"":p.format(H),[p]),w=A_(B(T({},e),{value:d})),S=i!==void 0&&!isNaN(i)?i:1;g.style==="percent"&&(i===void 0||isNaN(i))&&(S=.01);let[k,$]=_.useState(d),[M,P]=_.useState(l),[E,F]=_.useState(r);(!Object.is(d,k)||l!==M||r!==E)&&(m(b(d)),$(d),P(l),F(r));let C=_.useMemo(()=>v.parse(h),[v,h]),I=()=>{if(!h.length){f(NaN),m(s===void 0?"":b(d));return}if(isNaN(C)){m(b(d));return}let H;i===void 0||isNaN(i)?H=ns(C,t,n):H=gt(C,t,n,i),H=v.parse(b(H)),f(H),m(b(s===void 0?H:d))},A=(H,q=0)=>{let J=C;if(isNaN(J)){let re=isNaN(q)?0:q;return gt(re,t,n,S)}else{let re=gt(J,t,n,S);return H==="+"&&re>J||H==="-"&&re{let H=A("+",t);H===d&&m(b(H)),f(H),w.commitValidation()},R=()=>{let H=A("-",n);H===d&&m(b(H)),f(H),w.commitValidation()},z=()=>{n!=null&&(f(gt(n,t,n,S)),w.commitValidation())},N=()=>{t!=null&&(f(t),w.commitValidation())},V=_.useMemo(()=>!u&&!c&&(isNaN(C)||n===void 0||isNaN(n)||gt(C,t,n,S)>C||fp("+",C,S)<=n),[u,c,t,n,S,C]),U=_.useMemo(()=>!u&&!c&&(isNaN(C)||t===void 0||isNaN(t)||gt(C,t,n,S)=t),[u,c,t,n,S,C]),j=H=>v.isValidPartialNumber(H,t,n);return B(T({},w),{validate:j,increment:L,incrementToMax:z,decrement:R,decrementToMin:N,canIncrement:V,canDecrement:U,minValue:t,maxValue:n,numberValue:C,setNumberValue:f,setInputValue:m,inputValue:h,commit:I})}function fp(e,t,n){let i=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const r=t.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));t=Math.round(t*l),n=Math.round(n*l),i=e==="+"?t+n:t-n,i/=l}return i}const j_={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 QA(e={}){let{style:t,isFocusable:n}=e,[i,r]=_.useState(!1),{focusWithinProps:s}=Jh({isDisabled:!n,onFocusWithinChange:a=>r(a)}),o=_.useMemo(()=>i?t:t?T(T({},j_),t):j_,[i]);return{visuallyHiddenProps:B(T({},s),{style:o})}}function ZA(e){let a=e,{children:t,elementType:n="div",isFocusable:i,style:r}=a,s=te(a,["children","elementType","isFocusable","style"]),{visuallyHiddenProps:o}=QA(e);return Z.createElement(n,_e(s,o),t)}const hp=new WeakMap;function pp(e,t){let n=hp.get(e);if(!n)throw new Error("Unknown slider state");return`${n.id}-${t}`}function JA(e,t,n){let{labelProps:i,fieldProps:r}=dp(e),s=e.orientation==="vertical";var o;hp.set(t,{id:(o=i.id)!==null&&o!==void 0?o:r.id,"aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]});let{direction:a}=Ro(),{addGlobalListener:l,removeGlobalListener:u}=$o();const c=_.useRef(null),d=a==="rtl",f=_.useRef(null),{moveProps:h}=g_({onMoveStart(){f.current=null},onMove({deltaX:p,deltaY:g}){if(!n.current)return;let{height:b,width:w}=n.current.getBoundingClientRect(),S=s?b:w;f.current==null&&c.current!=null&&(f.current=t.getThumbPercent(c.current)*S);let k=s?g:p;if((s||d)&&(k=-k),f.current+=k,c.current!=null&&n.current){const $=ns(f.current/S,0,1);t.setThumbPercent(c.current,$)}},onMoveEnd(){c.current!=null&&(t.setThumbDragging(c.current,!1),c.current=null)}});let m=_.useRef(void 0),v=(p,g,b,w)=>{if(n.current&&!e.isDisabled&&t.values.every((S,k)=>!t.isThumbDragging(k))){let{height:S,width:k,top:$,left:M}=n.current.getBoundingClientRect(),P=s?S:k,I=((s?w:b)-(s?$:M))/P;(a==="rtl"||s)&&(I=1-I);let A=t.getPercentValue(I),L,R=t.values.findIndex(z=>A-z<0);if(R===0)L=R;else if(R===-1)L=t.values.length-1;else{let z=t.values[R-1],N=t.values[R];Math.abs(z-A)=0&&t.isThumbEditable(L)?(p.preventDefault(),c.current=L,t.setFocusedThumb(L),m.current=g,t.setThumbDragging(c.current,!0),t.setThumbValue(L,A),l(window,"mouseup",x,!1),l(window,"touchend",x,!1),l(window,"pointerup",x,!1)):c.current=null}},x=p=>{var g,b;((b=p.pointerId)!==null&&b!==void 0?b:(g=p.changedTouches)===null||g===void 0?void 0:g[0].identifier)===m.current&&(c.current!=null&&(t.setThumbDragging(c.current,!1),c.current=null),u(window,"mouseup",x,!1),u(window,"touchend",x,!1),u(window,"pointerup",x,!1))};return"htmlFor"in i&&i.htmlFor&&(delete i.htmlFor,i.onClick=()=>{var p;(p=document.getElementById(pp(t,0)))===null||p===void 0||p.focus(),f_("keyboard")}),{labelProps:i,groupProps:T({role:"group"},r),trackProps:_e({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:t.values.map((p,g)=>pp(t,g)).join(" "),"aria-live":"off"}}}function e3(e,t){let{index:n=0,isRequired:i,validationState:r,isInvalid:s,trackRef:o,inputRef:a,orientation:l=t.orientation,name:u}=e,c=e.isDisabled||t.isDisabled,d=l==="vertical",{direction:f}=Ro(),{addGlobalListener:h,removeGlobalListener:m}=$o(),v=hp.get(t);var x;const{labelProps:p,fieldProps:g}=dp(B(T({},e),{id:pp(t,n),"aria-labelledby":`${v.id} ${(x=e["aria-labelledby"])!==null&&x!==void 0?x:""}`.trim()})),b=t.values[n],w=_.useCallback(()=>{a.current&&vi(a.current)},[a]),S=t.focusedThumb===n;_.useEffect(()=>{S&&w()},[S,w]);let k=f==="rtl",$=_.useRef(null),{keyboardProps:M}=m_({onKeyDown(R){let{getThumbMaxValue:z,getThumbMinValue:N,decrementThumb:V,incrementThumb:U,setThumbValue:j,setThumbDragging:H,pageSize:q}=t;if(!/^(PageUp|PageDown|Home|End)$/.test(R.key)){R.continuePropagation();return}switch(R.preventDefault(),H(n,!0),R.key){case"PageUp":U(n,q);break;case"PageDown":V(n,q);break;case"Home":j(n,N(n));break;case"End":j(n,z(n));break}H(n,!1)}}),{moveProps:P}=g_({onMoveStart(){$.current=null,t.setThumbDragging(n,!0)},onMove({deltaX:R,deltaY:z,pointerType:N,shiftKey:V}){const{getThumbPercent:U,setThumbPercent:j,decrementThumb:H,incrementThumb:q,step:J,pageSize:re}=t;if(!o.current)return;let{width:ye,height:lt}=o.current.getBoundingClientRect(),fr=d?lt:ye;if($.current==null&&($.current=U(n)*fr),N==="keyboard")R>0&&k||R<0&&!k||z>0?H(n,V?re:J):q(n,V?re:J);else{let Wn=d?z:R;(d||k)&&(Wn=-Wn),$.current+=Wn,j(n,ns($.current/fr,0,1))}},onMoveEnd(){t.setThumbDragging(n,!1)}});t.setThumbEditable(n,!c);const{focusableProps:E}=np(_e(e,{onFocus:()=>t.setFocusedThumb(n),onBlur:()=>t.setFocusedThumb(void 0)}),a);let F=_.useRef(void 0),C=R=>{w(),F.current=R,t.setThumbDragging(n,!0),h(window,"mouseup",I,!1),h(window,"touchend",I,!1),h(window,"pointerup",I,!1)},I=R=>{var z,N;((N=R.pointerId)!==null&&N!==void 0?N:(z=R.changedTouches)===null||z===void 0?void 0:z[0].identifier)===F.current&&(w(),t.setThumbDragging(n,!1),m(window,"mouseup",I,!1),m(window,"touchend",I,!1),m(window,"pointerup",I,!1))},A=t.getThumbPercent(n);(d||f==="rtl")&&(A=1-A);let L=c?{}:_e(M,P,{onMouseDown:R=>{R.button!==0||R.altKey||R.ctrlKey||R.metaKey||C()},onPointerDown:R=>{R.button!==0||R.altKey||R.ctrlKey||R.metaKey||C(R.pointerId)},onTouchStart:R=>{C(R.changedTouches[0].identifier)}});return Oh(a,b,R=>{t.setThumbValue(n,R)}),{inputProps:_e(E,g,{type:"range",tabIndex:c?void 0:0,min:t.getThumbMinValue(n),max:t.getThumbMaxValue(n),step:t.step,value:b,name:u,disabled:c,"aria-orientation":l,"aria-valuetext":t.getThumbValueLabel(n),"aria-required":i||void 0,"aria-invalid":s||r==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-describedby":[v["aria-describedby"],e["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[v["aria-details"],e["aria-details"]].filter(Boolean).join(" "),onChange:R=>{t.setThumbValue(n,parseFloat(R.target.value))}}),thumbProps:B(T({},L),{style:{position:"absolute",[d?"top":"left"]:`${A*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}}),labelProps:p,isDragging:t.isThumbDragging(n),isDisabled:c,isFocused:S}}function t3(e,t){let{inputElementType:n="input",isDisabled:i=!1,isRequired:r=!1,isReadOnly:s=!1,type:o="text",validationBehavior:a="aria"}=e,[l,u]=Ih(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=np(e,t),d=A_(B(T({},e),{value:l})),{isInvalid:f,validationErrors:h,validationDetails:m}=d.displayValidation,{labelProps:v,fieldProps:x,descriptionProps:p,errorMessageProps:g}=UA(B(T({},e),{isInvalid:f,errorMessage:e.errorMessage||h})),b=er(e,{labelable:!0});const w={type:o,pattern:e.pattern};return Oh(t,l,u),zA(e,d,t),_.useEffect(()=>{if(t.current instanceof rn(t.current).HTMLTextAreaElement){let S=t.current;Object.defineProperty(S,"defaultValue",{get:()=>S.value,set:()=>{},configurable:!0})}},[t]),{labelProps:v,inputProps:_e(b,n==="input"?w:void 0,T(T({disabled:i,readOnly:s,required:r&&a==="native","aria-required":r&&a==="aria"||void 0,"aria-invalid":f||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:S=>u(S.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput},c),x)),descriptionProps:p,errorMessageProps:g,isInvalid:f,validationErrors:h,validationDetails:m}}function O_(){return typeof window!="undefined"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function n3(e,t,n){let i=Be(f=>{let h=n.current;if(!h)return;let m=null;switch(f.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":m=h.value.slice(0,h.selectionStart)+h.value.slice(h.selectionEnd);break;case"deleteContentForward":m=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":m=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":m=h.value.slice(h.selectionStart);break;default:f.data!=null&&(m=h.value.slice(0,h.selectionStart)+f.data+h.value.slice(h.selectionEnd));break}(m==null||!t.validate(m))&&f.preventDefault()});_.useEffect(()=>{if(!O_()||!n.current)return;let f=n.current;return f.addEventListener("beforeinput",i,!1),()=>{f.removeEventListener("beforeinput",i,!1)}},[n,i]);let r=O_()?null:f=>{let h=f.target.value.slice(0,f.target.selectionStart)+f.data+f.target.value.slice(f.target.selectionEnd);t.validate(h)||f.preventDefault()},d=t3(e,n),{labelProps:s,inputProps:o,descriptionProps:a,errorMessageProps:l}=d,u=te(d,["labelProps","inputProps","descriptionProps","errorMessageProps"]),c=_.useRef(null);return T({inputProps:_e(o,{onBeforeInput:r,onCompositionStart(){let{value:f,selectionStart:h,selectionEnd:m}=n.current;c.current={value:f,selectionStart:h,selectionEnd:m}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:f,selectionStart:h,selectionEnd:m}=c.current;n.current.value=f,n.current.setSelectionRange(h,m),t.setInputValue(f)}}}),labelProps:s,descriptionProps:a,errorMessageProps:l},u)}var I_={};I_={Empty:"فارغ"};var V_={};V_={Empty:"Изпразни"};var z_={};z_={Empty:"Prázdné"};var B_={};B_={Empty:"Tom"};var H_={};H_={Empty:"Leer"};var W_={};W_={Empty:"Άδειο"};var U_={};U_={Empty:"Empty"};var K_={};K_={Empty:"Vacío"};var Y_={};Y_={Empty:"Tühjenda"};var G_={};G_={Empty:"Tyhjä"};var X_={};X_={Empty:"Vide"};var q_={};q_={Empty:"ריק"};var Q_={};Q_={Empty:"Prazno"};var Z_={};Z_={Empty:"Üres"};var J_={};J_={Empty:"Vuoto"};var e1={};e1={Empty:"空"};var t1={};t1={Empty:"비어 있음"};var n1={};n1={Empty:"Tuščias"};var i1={};i1={Empty:"Tukšs"};var r1={};r1={Empty:"Tom"};var s1={};s1={Empty:"Leeg"};var o1={};o1={Empty:"Pusty"};var a1={};a1={Empty:"Vazio"};var l1={};l1={Empty:"Vazio"};var u1={};u1={Empty:"Gol"};var c1={};c1={Empty:"Не заполнено"};var d1={};d1={Empty:"Prázdne"};var f1={};f1={Empty:"Prazen"};var h1={};h1={Empty:"Prazno"};var p1={};p1={Empty:"Tomt"};var m1={};m1={Empty:"Boş"};var g1={};g1={Empty:"Пусто"};var v1={};v1={Empty:"空"};var y1={};y1={Empty:"空白"};var b1={};b1={"ar-AE":I_,"bg-BG":V_,"cs-CZ":z_,"da-DK":B_,"de-DE":H_,"el-GR":W_,"en-US":U_,"es-ES":K_,"et-EE":Y_,"fi-FI":G_,"fr-FR":X_,"he-IL":q_,"hr-HR":Q_,"hu-HU":Z_,"it-IT":J_,"ja-JP":e1,"ko-KR":t1,"lt-LT":n1,"lv-LV":i1,"nb-NO":r1,"nl-NL":s1,"pl-PL":o1,"pt-BR":a1,"pt-PT":l1,"ro-RO":u1,"ru-RU":c1,"sk-SK":d1,"sl-SI":f1,"sr-SP":h1,"sv-SE":p1,"tr-TR":m1,"uk-UA":g1,"zh-CN":v1,"zh-TW":y1};function i3(e){return e&&e.__esModule?e.default:e}function r3(e){const t=_.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:m}=e;const v=w_(i3(b1),"@react-aria/spinbutton"),x=()=>clearTimeout(t.current);_.useEffect(()=>()=>x(),[]);let p=F=>{if(!(F.ctrlKey||F.metaKey||F.shiftKey||F.altKey||a))switch(F.key){case"PageUp":if(c){F.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(F.preventDefault(),u==null||u());break;case"PageDown":if(f){F.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(F.preventDefault(),d==null||d());break;case"Home":h&&(F.preventDefault(),h==null||h());break;case"End":m&&(F.preventDefault(),m==null||m());break}},g=_.useRef(!1),b=()=>{g.current=!0},w=()=>{g.current=!1},S=i===""?v.format("Empty"):(i||`${n}`).replace("-","−");_.useEffect(()=>{g.current&&(NA("assertive"),FA(S,"assertive"))},[S]);const k=Be(F=>{x(),u==null||u(),t.current=window.setTimeout(()=>{(s===void 0||isNaN(s)||n===void 0||isNaN(n)||n{x(),d==null||d(),t.current=window.setTimeout(()=>{(r===void 0||isNaN(r)||n===void 0||isNaN(n)||n>r)&&$(60)},F)});let M=F=>{F.preventDefault()},{addGlobalListener:P,removeAllGlobalListeners:E}=$o();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":S,"aria-valuemin":r,"aria-valuemax":s,"aria-disabled":o||void 0,"aria-readonly":a||void 0,"aria-required":l||void 0,onKeyDown:p,onFocus:b,onBlur:w},incrementButtonProps:{onPressStart:()=>{k(400),P(window,"contextmenu",M)},onPressEnd:()=>{x(),E()},onFocus:b,onBlur:w},decrementButtonProps:{onPressStart:()=>{$(400),P(window,"contextmenu",M)},onPressEnd:()=>{x(),E()},onFocus:b,onBlur:w}}}var x1={};x1={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var _1={};_1={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var w1={};w1={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var S1={};S1={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var P1={};P1={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var k1={};k1={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var C1={};C1={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var T1={};T1={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var E1={};E1={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var $1={};$1={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var M1={};M1={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var D1={};D1={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var A1={};A1={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var L1={};L1={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var R1={};R1={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var F1={};F1={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var N1={};N1={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var j1={};j1={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var O1={};O1={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var I1={};I1={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var V1={};V1={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var z1={};z1={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var B1={};B1={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var H1={};H1={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var W1={};W1={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var U1={};U1={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var K1={};K1={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Y1={};Y1={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var G1={};G1={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var X1={};X1={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var q1={};q1={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Q1={};Q1={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var Z1={};Z1={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var J1={};J1={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"};var ew={};ew={"ar-AE":x1,"bg-BG":_1,"cs-CZ":w1,"da-DK":S1,"de-DE":P1,"el-GR":k1,"en-US":C1,"es-ES":T1,"et-EE":E1,"fi-FI":$1,"fr-FR":M1,"he-IL":D1,"hr-HR":A1,"hu-HU":L1,"it-IT":R1,"ja-JP":F1,"ko-KR":N1,"lt-LT":j1,"lv-LV":O1,"nb-NO":I1,"nl-NL":V1,"pl-PL":z1,"pt-BR":B1,"pt-PT":H1,"ro-RO":W1,"ru-RU":U1,"sk-SK":K1,"sl-SI":Y1,"sr-SP":G1,"sv-SE":X1,"tr-TR":q1,"uk-UA":Q1,"zh-CN":Z1,"zh-TW":J1};function s3(e){return e&&e.__esModule?e.default:e}function o3(e,t,n){let mr=e,{id:i,decrementAriaLabel:r,incrementAriaLabel:s,isDisabled:o,isReadOnly:a,isRequired:l,minValue:u,maxValue:c,autoFocus:d,label:f,formatOptions:h,onBlur:m=()=>{},onFocus:v,onFocusChange:x,onKeyDown:p,onKeyUp:g,description:b,errorMessage:w,isWheelDisabled:S}=mr,k=te(mr,["id","decrementAriaLabel","incrementAriaLabel","isDisabled","isReadOnly","isRequired","minValue","maxValue","autoFocus","label","formatOptions","onBlur","onFocus","onFocusChange","onKeyDown","onKeyUp","description","errorMessage","isWheelDisabled"]),{increment:$,incrementToMax:M,decrement:P,decrementToMin:E,numberValue:F,inputValue:C,commit:I,commitValidation:A}=t;const L=w_(s3(ew),"@react-aria/numberfield");let R=Ji(i),{focusProps:z}=Xh({onBlur(){I()}}),N=ap(h),V=_.useMemo(()=>N.resolvedOptions(),[N]),U=ap(B(T({},h),{currencySign:void 0})),j=_.useMemo(()=>isNaN(F)?"":U.format(F),[U,F]),{spinButtonProps:H,incrementButtonProps:q,decrementButtonProps:J}=r3({isDisabled:o,isReadOnly:a,isRequired:l,maxValue:c,minValue:u,onIncrement:$,onIncrementToMax:M,onDecrement:P,onDecrementToMin:E,value:F,textValue:j}),[re,ye]=_.useState(!1),{focusWithinProps:lt}=Jh({isDisabled:o,onFocusWithinChange:ye}),fr=_.useCallback(ct=>{Math.abs(ct.deltaY)<=Math.abs(ct.deltaX)||(ct.deltaY>0?$():ct.deltaY<0&&P())},[P,$]);cA({onScroll:fr,isDisabled:S||o||a||!re},n);var ms;let hr=((ms=V.maximumFractionDigits)!==null&&ms!==void 0?ms:0)>0,ca=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,bn="numeric";Hx()?ca?bn="text":hr&&(bn="decimal"):Fh()&&(ca?bn="numeric":hr&&(bn="decimal"));let Ju=ct=>{t.validate(ct)&&t.setInputValue(ct)},gs=er(e),da=_.useCallback(ct=>{ct.key==="Enter"?(I(),A()):ct.continuePropagation()},[I,A]),{isInvalid:pr,validationErrors:ec,validationDetails:fe}=t.displayValidation,{labelProps:fa,inputProps:Mi,descriptionProps:tc,errorMessageProps:vs}=n3(B(T(T({},k),gs),{name:void 0,label:f,autoFocus:d,isDisabled:o,isReadOnly:a,isRequired:l,validate:void 0,[lp]:t,value:C,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:R,type:"text",inputMode:bn,onChange:Ju,onBlur:m,onFocus:v,onFocusChange:x,onKeyDown:_.useMemo(()=>Ah(da,p),[da,p]),onKeyUp:g,description:b,errorMessage:w}),t,n);Oh(n,t.numberValue,t.setNumberValue);let ha=_e(H,z,Mi,{role:null,"aria-roledescription":Rh()?null:L.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e.validationBehavior==="native"&&(ha["aria-required"]=void 0);let Gt=ct=>{var ma;document.activeElement!==n.current&&(ct.pointerType==="mouse"?(ma=n.current)===null||ma===void 0||ma.focus():ct.target.focus())},ys=e["aria-label"]||(typeof e.label=="string"?e.label:""),wt;ys||(wt=e.label!=null?fa.id:e["aria-labelledby"]);let pa=Ji(),oe=Ji(),At=_e(q,{"aria-label":s||L.format("increase",{fieldLabel:ys}).trim(),id:wt&&!s?pa:null,"aria-labelledby":wt&&!s?`${pa} ${wt}`:null,"aria-controls":R,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:Gt}),ut=_e(J,{"aria-label":r||L.format("decrease",{fieldLabel:ys}).trim(),id:wt&&!r?oe:null,"aria-labelledby":wt&&!r?`${oe} ${wt}`:null,"aria-controls":R,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:Gt});return{groupProps:B(T({},lt),{role:"group","aria-disabled":o,"aria-invalid":pr?"true":void 0}),labelProps:fa,inputProps:ha,incrementButtonProps:At,decrementButtonProps:ut,errorMessageProps:vs,descriptionProps:tc,isInvalid:pr,validationErrors:ec,validationDetails:fe}}const a3=_.createContext({}),tw=_.createContext({}),l3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,tw);let s=t,{elementType:i="span"}=s,r=te(s,["elementType"]);return Z.createElement(i,B(T({className:"react-aria-Text"},r),{ref:n}))}),mp=_.createContext(null),u3=_.forwardRef(function(t,n){let i=_.useContext(mp);return i!=null&&i.isInvalid?Z.createElement(c3,B(T({},t),{ref:n})):null}),c3=_.forwardRef((e,t)=>{let n=_.useContext(mp),i=er(e),r=Ln(B(T({},e),{defaultClassName:"react-aria-FieldError",defaultChildren:n.validationErrors.length===0?void 0:n.validationErrors.join(" "),values:n}));return r.children==null?null:Z.createElement(l3,B(T(T({slot:"errorMessage"},i),r),{ref:t}))}),d3=_.createContext(null),nw=_.createContext({}),f3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,nw);let p=t,{isDisabled:i,isInvalid:r,onHoverStart:s,onHoverChange:o,onHoverEnd:a}=p,l=te(p,["isDisabled","isInvalid","onHoverStart","onHoverChange","onHoverEnd"]),{hoverProps:u,isHovered:c}=Ao({onHoverStart:s,onHoverChange:o,onHoverEnd:a,isDisabled:i}),{isFocused:d,isFocusVisible:f,focusProps:h}=uu({within:!0});i!=null||(i=!!t["aria-disabled"]&&t["aria-disabled"]!=="false"),r!=null||(r=!!t["aria-invalid"]&&t["aria-invalid"]!=="false");let m=Ln(B(T({},t),{values:{isHovered:c,isFocusWithin:d,isFocusVisible:f,isDisabled:i,isInvalid:r},defaultClassName:"react-aria-Group"}));var v,x;return Z.createElement("div",B(T(T({},_e(l,h,u)),m),{ref:n,role:(v=t.role)!==null&&v!==void 0?v:"group",slot:(x=t.slot)!==null&&x!==void 0?x:void 0,"data-focus-within":d||void 0,"data-hovered":c||void 0,"data-focus-visible":f||void 0,"data-disabled":i||void 0,"data-invalid":r||void 0}),m.children)}),iw=_.createContext({});let h3=e=>{let s=e,{onHoverStart:t,onHoverChange:n,onHoverEnd:i}=s;return te(s,["onHoverStart","onHoverChange","onHoverEnd"])};const p3=qx(function(t,n){[t,n]=Rn(t,n,iw);let{hoverProps:i,isHovered:r}=Ao(t),{isFocused:s,isFocusVisible:o,focusProps:a}=uu({isTextInput:!0,autoFocus:t.autoFocus}),l=!!t["aria-invalid"]&&t["aria-invalid"]!=="false",u=Ln(B(T({},t),{values:{isHovered:r,isFocused:s,isFocusVisible:o,isDisabled:t.disabled||!1,isInvalid:l},defaultClassName:"react-aria-Input"}));return Z.createElement("input",B(T(T({},_e(h3(t),a,i)),u),{ref:n,"data-focused":s||void 0,"data-disabled":t.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":l||void 0}))}),m3=_.createContext(null),g3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,m3);let i=t.href&&!t.isDisabled?"a":"span",{linkProps:r,isPressed:s}=pA(B(T({},t),{elementType:i}),n),{hoverProps:o,isHovered:a}=Ao(t),{focusProps:l,isFocused:u,isFocusVisible:c}=uu(),d=Ln(B(T({},t),{defaultClassName:"react-aria-Link",values:{isCurrent:!!t["aria-current"],isDisabled:t.isDisabled||!1,isPressed:s,isHovered:a,isFocused:u,isFocusVisible:c}}));return Z.createElement(i,B(T({ref:n,slot:t.slot||void 0},_e(d,r,o,l)),{"data-focused":u||void 0,"data-hovered":a||void 0,"data-pressed":s||void 0,"data-focus-visible":c||void 0,"data-current":!!t["aria-current"]||void 0,"data-disabled":t.isDisabled||void 0}),d.children)}),v3=_.createContext(null),pu=_.createContext(null),gp=_.createContext(null),rw=_.createContext(null),y3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,v3);let i=_.useRef(null),r=ap(t.formatOptions),s=XA(B(T({},t),{numberFormatter:r})),[o,a]=Bh(),{groupProps:l,trackProps:u,labelProps:c,outputProps:d}=JA(B(T({},t),{label:a}),s,i),f=Ln(B(T({},t),{values:{orientation:s.orientation,isDisabled:s.isDisabled,state:s},defaultClassName:"react-aria-Slider"})),h=er(t);return delete h.id,Z.createElement(Vh,{values:[[pu,s],[gp,B(T({},u),{ref:i})],[rw,d],[nu,B(T({},c),{ref:o})]]},Z.createElement("div",B(T(T(T({},h),l),f),{ref:n,slot:t.slot||void 0,"data-orientation":s.orientation,"data-disabled":s.isDisabled||void 0})))}),b3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,rw);let u=t,{children:i,style:r,className:s}=u,o=te(u,["children","style","className"]),a=_.useContext(pu),l=Ln({className:s,style:r,children:i,defaultChildren:a.getThumbValueLabel(0),defaultClassName:"react-aria-SliderOutput",values:{orientation:a.orientation,isDisabled:a.isDisabled,state:a}});return Z.createElement("output",B(T(T({},o),l),{ref:n,"data-orientation":a.orientation||void 0,"data-disabled":a.isDisabled||void 0}))}),x3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,gp);let i=_.useContext(pu),d=t,{onHoverStart:r,onHoverEnd:s,onHoverChange:o}=d,a=te(d,["onHoverStart","onHoverEnd","onHoverChange"]),{hoverProps:l,isHovered:u}=Ao({onHoverStart:r,onHoverEnd:s,onHoverChange:o}),c=Ln(B(T({},t),{defaultClassName:"react-aria-SliderTrack",values:{orientation:i.orientation,isDisabled:i.isDisabled,isHovered:u,state:i}}));return Z.createElement("div",B(T(T({},_e(a,l)),c),{ref:n,"data-hovered":u||void 0,"data-orientation":i.orientation||void 0,"data-disabled":i.isDisabled||void 0}))}),_3=_.forwardRef(function(t,n){let{inputRef:i=null}=t,r=_.useContext(pu),{ref:s}=zh(gp),{index:o=0}=t,a=_.useRef(null),l=i||a,[u,c]=Bh(),{thumbProps:d,inputProps:f,labelProps:h,isDragging:m,isFocused:v,isDisabled:x}=e3(B(T({},t),{index:o,trackRef:s,inputRef:l,label:c}),r),{focusProps:p,isFocusVisible:g}=uu(),{hoverProps:b,isHovered:w}=Ao(t),S=Ln(B(T({},t),{defaultClassName:"react-aria-SliderThumb",values:{state:r,isHovered:w,isDragging:m,isFocused:v,isFocusVisible:g,isDisabled:x}})),k=er(t);return delete k.id,Z.createElement("div",B(T(T({},_e(k,d,b)),S),{ref:n,style:T(T({},d.style),S.style),"data-hovered":w||void 0,"data-dragging":m||void 0,"data-focused":v||void 0,"data-focus-visible":g||void 0,"data-disabled":x||void 0}),Z.createElement(ZA,null,Z.createElement("input",T({ref:l},_e(f,p)))),Z.createElement(Vh,{values:[[nu,B(T({},h),{ref:u})]]},S.children))}),w3=_.createContext(null),S3=_.createContext(null),P3=_.forwardRef(function(t,n){[t,n]=Rn(t,n,w3);let{validationBehavior:i}=zh(d3)||{};var r,s;let o=(s=(r=t.validationBehavior)!==null&&r!==void 0?r:i)!==null&&s!==void 0?s:"native",{locale:a}=Ro(),l=qA(B(T({},t),{locale:a,validationBehavior:o})),u=_.useRef(null),[c,d]=Bh(),k=o3(B(T({},BD(t)),{label:d,validationBehavior:o}),l,u),{labelProps:f,groupProps:h,inputProps:m,incrementButtonProps:v,decrementButtonProps:x,descriptionProps:p,errorMessageProps:g}=k,b=te(k,["labelProps","groupProps","inputProps","incrementButtonProps","decrementButtonProps","descriptionProps","errorMessageProps"]),w=Ln(B(T({},t),{values:{state:l,isDisabled:t.isDisabled||!1,isInvalid:b.isInvalid||!1},defaultClassName:"react-aria-NumberField"})),S=er(t);return delete S.id,Z.createElement(Vh,{values:[[S3,l],[nw,h],[iw,B(T({},m),{ref:u})],[nu,B(T({},f),{ref:c})],[a3,{slots:{increment:v,decrement:x}}],[tw,{slots:{description:p,errorMessage:g}}],[mp,b]]},Z.createElement("div",B(T(T({},S),w),{ref:n,slot:t.slot||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":b.isInvalid||void 0})),t.name&&Z.createElement("input",{type:"hidden",name:t.name,value:isNaN(l.numberValue)?"":l.numberValue}))});function vp(){const e={id:"",name:"",position:"",source:"",variant:"",state:"",type:""},t=document.getElementById("wps-agentforce-roi");if(!t)return e;const n=t.closest('[data-blade-name="sf/open"]');if(!n)return e;const i={};return Array.from(n.attributes).forEach(r=>{if(r.name.startsWith("data-blade-")){const s=r.name.replace("data-blade-","");i[s]=r.value}}),T(T({},e),i)}const k3=e=>{if(!e)return 0;const t=e.closest(".input-panel");if(!t)return 0;const n=Array.from(t.querySelectorAll(".input-container")),i=e.closest(".input-container");return i?n.indexOf(i)+1:0},sw=(e,t,n)=>{let i=null;const r=vp();typeof e=="number"?i=document.querySelectorAll(`[data-input-name="${t}"]`)[0]:i=e.target;const s=k3(i),o={event:"custEv_contentClick",blade:{id:r.id,name:"sf/marquee/agentforce-inputs",position:r.position,source:"www",variant:"marquee",state:"rendered",type:"blade",module:{id:"",name:t,type:i?"input field":"slider",position:s,link:{text:"",url:"",type:"",internalDriver:""}}}};window.dataLayer&&window.dataLayer.push(T({},o))};function sn(o){var a=o,{label:e,description:t,errorMessage:n,info:i,inputName:r}=a,s=te(a,["label","description","errorMessage","info","inputName"]);return y.jsx(P3,B(T({},s),{children:y.jsxs("div",{className:"flex flex-col gap-2 input-container",children:[y.jsx(Qx,{className:"font-sans text-sm font-bold leading-tight text-neutral-700",children:e}),y.jsx(f3,{children:y.jsx(p3,{id:e,className:"w-full rounded border border-[#747474] p-2 text-lg focus:outline-none focus:ring-2 focus:ring-blue-500",onChange:l=>sw(l,r),"data-input-name":r})}),y.jsx(u3,{className:"font-sans text-sm leading-tight text-red-600",children:n})]})}))}function xi({label:e,info:t,value:n,onChange:i,maxValue:r,minValue:s,prefix:o,suffix:a,step:l,inputName:u}){return y.jsx("div",{className:"flex justify-center input-container",children:y.jsxs(y3,{value:n,onChange:c=>{i(c),sw(c,u)},className:"w-full",maxValue:r!=null?r:100,minValue:s!=null?s:0,step:l!=null?l:1,"data-input-name":u,children:[y.jsx("div",{className:"flex font-sans text-sm font-bold leading-tight text-neutral-700",children:y.jsx(Qx,{className:"flex-1",children:e})}),y.jsxs("div",{className:"mt-6 flex gap-4",children:[y.jsx(x3,{className:"relative flex h-7 w-full",children:({state:c})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"slider-track absolute top-[50%] h-1 w-full translate-y-[-50%] rounded-full bg-[#929292]"}),y.jsx("div",{className:"text-right font-sans text-sm font-bold leading-tight text-[#5867E8]",style:{position:"absolute",left:c.getThumbPercent(0)*100+"%",bottom:"20px",transform:"translate(-50%, -50%)",touchAction:"none"},children:y.jsx(b3,{})}),y.jsx("div",{className:"absolute top-[50%] h-1 translate-y-[-50%] rounded-full bg-[#5867E8]",style:{width:c.getThumbPercent(0)*100+"%"}}),y.jsx(_3,{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"})]})}),y.jsx("div",{className:"font-sans text-lg font-normal leading-7 tracking-tight text-neutral-900",children:"%"})]})]})})}/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela * Released under the MIT License */function No(e){return e+.5|0}const _i=(e,t,n)=>Math.max(Math.min(e,n),t);function jo(e){return _i(No(e*2.55),0,255)}function wi(e){return _i(No(e*255),0,255)}function Nn(e){return _i(No(e/2.55)/100,0,1)}function ow(e){return _i(No(e*100),0,100)}const Ut={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},yp=[..."0123456789ABCDEF"],C3=e=>yp[e&15],T3=e=>yp[(e&240)>>4]+yp[e&15],mu=e=>(e&240)>>4===(e&15),E3=e=>mu(e.r)&&mu(e.g)&&mu(e.b)&&mu(e.a);function $3(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Ut[e[1]]*17,g:255&Ut[e[2]]*17,b:255&Ut[e[3]]*17,a:t===5?Ut[e[4]]*17:255}:(t===7||t===9)&&(n={r:Ut[e[1]]<<4|Ut[e[2]],g:Ut[e[3]]<<4|Ut[e[4]],b:Ut[e[5]]<<4|Ut[e[6]],a:t===9?Ut[e[7]]<<4|Ut[e[8]]:255})),n}const M3=(e,t)=>e<255?t(e):"";function D3(e){var t=E3(e)?C3:T3;return e?"#"+t(e.r)+t(e.g)+t(e.b)+M3(e.a,t):void 0}const A3=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function aw(e,t,n){const i=t*Math.min(n,1-n),r=(s,o=(s+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function L3(e,t,n){const i=(r,s=(r+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function R3(e,t,n){const i=aw(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function F3(e,t,n,i,r){return e===r?(t-n)/i+(t.5?c/(2-s-o):c/(s+o),l=F3(n,i,r,c,s),l=l*60+.5),[l|0,u||0,a]}function xp(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(wi)}function _p(e,t,n){return xp(aw,e,t,n)}function N3(e,t,n){return xp(R3,e,t,n)}function j3(e,t,n){return xp(L3,e,t,n)}function lw(e){return(e%360+360)%360}function O3(e){const t=A3.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?jo(+t[5]):wi(+t[5]));const r=lw(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=N3(r,s,o):t[1]==="hsv"?i=j3(r,s,o):i=_p(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function I3(e,t){var n=bp(e);n[0]=lw(n[0]+t),n=_p(n),e.r=n[0],e.g=n[1],e.b=n[2]}function V3(e){if(!e)return;const t=bp(e),n=t[0],i=ow(t[1]),r=ow(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Nn(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const uw={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"},cw={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 z3(){const e={},t=Object.keys(cw),n=Object.keys(uw);let i,r,s,o,a;for(i=0;i>16&255,s>>8&255,s&255]}return e}let gu;function B3(e){gu||(gu=z3(),gu.transparent=[0,0,0,0]);const t=gu[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const H3=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function W3(e){const t=H3.exec(e);let n=255,i,r,s;if(t){if(t[7]!==i){const o=+t[7];n=t[8]?jo(o):_i(o*255,0,255)}return i=+t[1],r=+t[3],s=+t[5],i=255&(t[2]?jo(i):_i(i,0,255)),r=255&(t[4]?jo(r):_i(r,0,255)),s=255&(t[6]?jo(s):_i(s,0,255)),{r:i,g:r,b:s,a:n}}}function U3(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Nn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const wp=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ss=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function K3(e,t,n){const i=ss(Nn(e.r)),r=ss(Nn(e.g)),s=ss(Nn(e.b));return{r:wi(wp(i+n*(ss(Nn(t.r))-i))),g:wi(wp(r+n*(ss(Nn(t.g))-r))),b:wi(wp(s+n*(ss(Nn(t.b))-s))),a:e.a+n*(t.a-e.a)}}function vu(e,t,n){if(e){let i=bp(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=_p(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function dw(e,t){return e&&Object.assign(t||{},e)}function fw(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=wi(e[3]))):(t=dw(e,{r:0,g:0,b:0,a:1}),t.a=wi(t.a)),t}function Y3(e){return e.charAt(0)==="r"?W3(e):O3(e)}class Oo{constructor(t){if(t instanceof Oo)return t;const n=typeof t;let i;n==="object"?i=fw(t):n==="string"&&(i=$3(t)||B3(t)||Y3(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=dw(this._rgb);return t&&(t.a=Nn(t.a)),t}set rgb(t){this._rgb=fw(t)}rgbString(){return this._valid?U3(this._rgb):void 0}hexString(){return this._valid?D3(this._rgb):void 0}hslString(){return this._valid?V3(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,r=t.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(t,n){return t&&(this._rgb=K3(this._rgb,t._rgb,n)),this}clone(){return new Oo(this.rgb)}alpha(t){return this._rgb.a=wi(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=No(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return vu(this._rgb,2,t),this}darken(t){return vu(this._rgb,2,-t),this}saturate(t){return vu(this._rgb,1,t),this}desaturate(t){return vu(this._rgb,1,-t),this}rotate(t){return I3(this._rgb,t),this}}/*! * Chart.js v4.4.8 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */function jn(){}const G3=(()=>{let e=0;return()=>e++})();function se(e){return e==null}function Fe(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function ie(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Kt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function mn(e,t){return Kt(e)?e:t}function ae(e,t){return typeof e=="undefined"?t:e}const X3=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function he(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ue(e,t,n,i){let r,s,o;if(Fe(e))for(s=e.length,r=0;re,x:e=>e.x,y:e=>e.y};function Z3(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function J3(e){const t=Z3(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function os(e,t){return(pw[t]||(pw[t]=J3(t)))(e)}function Sp(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Vo=e=>typeof e!="undefined",Si=e=>typeof e=="function",mw=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function eL(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const He=Math.PI,at=2*He,xu=Number.POSITIVE_INFINITY,tL=He/180,Ye=He/2,ir=He/4,gw=He*2/3,vw=Math.log10,Pi=Math.sign;function _u(e,t,n){return Math.abs(e-t)r-s).pop(),t}function iL(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function wu(e){return!iL(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function rL(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function sL(e,t,n){let i,r,s;for(i=0,r=e.length;il&&u=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function Pp(e,t,n){n=n||(o=>e[o]1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const kp=(e,t,n,i)=>Pp(e,n,i?r=>{const s=e[r][t];return se[r][t]Pp(e,n,i=>e[i][t]>=n);function cL(e,t,n){let i=0,r=e.length;for(;ii&&e[r-1]>n;)r--;return i>0||r{const i="_onData"+Sp(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...s)}),o}})})}function Sw(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(ww.forEach(s=>{delete e[s]}),delete e._chartjs)}function Pw(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const kw=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function Cw(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,kw.call(window,()=>{i=!1,e.apply(t,n)}))}}function fL(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const Cp=e=>e==="start"?"left":e==="end"?"right":"center",tt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,hL=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t,Su=e=>e===0||e===1,Tw=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*at/n)),Ew=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*at/n)+1,zo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ye)+1,easeOutSine:e=>Math.sin(e*Ye),easeInOutSine:e=>-.5*(Math.cos(He*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Su(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Su(e)?e:Tw(e,.075,.3),easeOutElastic:e=>Su(e)?e:Ew(e,.075,.3),easeInOutElastic(e){return Su(e)?e:e<.5?.5*Tw(e*2,.1125,.45):.5+.5*Ew(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-zo.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?zo.easeInBounce(e*2)*.5:zo.easeOutBounce(e*2-1)*.5+.5};function $w(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Mw(e){return $w(e)?e:new Oo(e)}function Tp(e){return $w(e)?e:new Oo(e).saturate(.5).darken(.1).hexString()}const pL=["x","y","borderWidth","radius","tension"],mL=["color","borderColor","backgroundColor"];function gL(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:mL},numbers:{type:"number",properties:pL}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function vL(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Dw=new Map;function yL(e,t){t=t||{};const n=e+JSON.stringify(t);let i=Dw.get(n);return i||(i=new Intl.NumberFormat(e,t),Dw.set(n,i)),i}function Aw(e,t,n){return yL(t,n).format(e)}const bL={values(e){return Fe(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,s=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),s=xL(e,n)}const o=vw(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),Aw(e,i,l)}};function xL(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Lw={formatters:bL};function _L(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Lw.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ar=Object.create(null),Ep=Object.create(null);function Bo(e,t){if(!t)return e;const n=t.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)=>Tp(r.backgroundColor),this.hoverBorderColor=(i,r)=>Tp(r.borderColor),this.hoverColor=(i,r)=>Tp(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(t),this.apply(n)}set(t,n){return $p(this,t,n)}get(t){return Bo(this,t)}describe(t,n){return $p(Ep,t,n)}override(t,n){return $p(ar,t,n)}route(t,n,i,r){const s=Bo(this,t),o=Bo(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 ie(l)?Object.assign({},u,l):ae(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Me=new wL({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[gL,vL,_L]);function SL(e){return!e||se(e.size)||se(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Rw(e,t,n,i,r){let s=t[r];return s||(s=t[r]=e.measureText(r).width,n.push(r)),s>i&&(i=s),i}function lr(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Fw(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Mp(e,t,n,i){Nw(e,t,n,i,null)}function Nw(e,t,n,i,r){let s,o,a,l,u,c,d,f;const h=t.pointStyle,m=t.rotation,v=t.radius;let x=(m||0)*tL;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(x),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(v)||v<=0)){switch(e.beginPath(),h){default:r?e.ellipse(n,i,r/2,v,0,0,at):e.arc(n,i,v,0,at),e.closePath();break;case"triangle":c=r?r/2:v,e.moveTo(n+Math.sin(x)*c,i-Math.cos(x)*v),x+=gw,e.lineTo(n+Math.sin(x)*c,i-Math.cos(x)*v),x+=gw,e.lineTo(n+Math.sin(x)*c,i-Math.cos(x)*v),e.closePath();break;case"rectRounded":u=v*.516,l=v-u,o=Math.cos(x+ir)*l,d=Math.cos(x+ir)*(r?r/2-u:l),a=Math.sin(x+ir)*l,f=Math.sin(x+ir)*(r?r/2-u:l),e.arc(n-d,i-a,u,x-He,x-Ye),e.arc(n+f,i-o,u,x-Ye,x),e.arc(n+d,i+a,u,x,x+Ye),e.arc(n-f,i+o,u,x+Ye,x+He),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*v,c=r?r/2:l,e.rect(n-c,i-l,2*c,2*l);break}x+=ir;case"rectRot":d=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,a=Math.sin(x)*v,f=Math.sin(x)*(r?r/2:v),e.moveTo(n-d,i-a),e.lineTo(n+f,i-o),e.lineTo(n+d,i+a),e.lineTo(n-f,i+o),e.closePath();break;case"crossRot":x+=ir;case"cross":d=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,a=Math.sin(x)*v,f=Math.sin(x)*(r?r/2:v),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-o),e.lineTo(n-f,i+o);break;case"star":d=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,a=Math.sin(x)*v,f=Math.sin(x)*(r?r/2:v),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-o),e.lineTo(n-f,i+o),x+=ir,d=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,a=Math.sin(x)*v,f=Math.sin(x)*(r?r/2:v),e.moveTo(n-d,i-a),e.lineTo(n+d,i+a),e.moveTo(n+f,i-o),e.lineTo(n-f,i+o);break;case"line":o=r?r/2:Math.cos(x)*v,a=Math.sin(x)*v,e.moveTo(n-o,i-a),e.lineTo(n+o,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(x)*(r?r/2:v),i+Math.sin(x)*v);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Dp(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&s.strokeColor!=="";let l,u;for(e.save(),e.font=r.string,PL(e,s),l=0;l+e||0;function Rp(e,t){const n={},i=ie(t),r=i?Object.keys(t):t,s=ie(e)?i?o=>ae(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of r)n[o]=ML(s(o));return n}function jw(e){return Rp(e,{top:"y",right:"x",bottom:"y",left:"x"})}function as(e){return Rp(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(e){const t=jw(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ge(e,t){e=e||{},t=t||Me.font;let n=ae(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=ae(e.style,t.style);i&&!(""+i).match(EL)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:ae(e.family,t.family),lineHeight:$L(ae(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:ae(e.weight,t.weight),string:""};return r.string=SL(r),r}function we(e,t,n,i){let r,s,o;for(r=0,s=e.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function ls(e,t){return Object.assign(Object.create(e),t)}function Fp(e,t=[""],n,i,r=()=>e[0]){const s=n||e;typeof i=="undefined"&&(i=Bw("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:i,_getTarget:r,override:a=>Fp([a,...e],t,s,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Iw(a,l,()=>IL(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Hw(a).includes(l)},ownKeys(a){return Hw(a)},set(a,l,u){const c=a._storage||(a._storage=r());return a[l]=c[l]=u,delete a._keys,!0}})}function us(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Ow(e,i),setContext:s=>us(e,s,n,i),override:s=>us(e.override(s),t,n,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return Iw(s,o,()=>LL(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function Ow(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:Si(n)?n:()=>n,isIndexable:Si(i)?i:()=>i}}const AL=(e,t)=>e?e+Sp(t):t,Np=(e,t)=>ie(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Iw(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function LL(e,t,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=e;let a=i[t];return Si(a)&&o.isScriptable(t)&&(a=RL(t,a,e,n)),Fe(a)&&a.length&&(a=FL(t,a,e,o.isIndexable)),Np(t,a)&&(a=us(a,r,s&&s[t],o)),a}function RL(e,t,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||i);return a.delete(e),Np(e,l)&&(l=jp(r._scopes,r,e,l)),l}function FL(e,t,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&i(e))return t[s.index%t.length];if(ie(t[0])){const l=t,u=r._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=jp(u,r,e,c);t.push(us(d,s,o&&o[e],a))}}return t}function Vw(e,t,n){return Si(e)?e(t,n):e}const NL=(e,t)=>e===!0?t:typeof e=="string"?os(t,e):void 0;function jL(e,t,n,i,r){for(const s of t){const o=NL(n,s);if(o){e.add(o);const a=Vw(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 jp(e,t,n,i){const r=t._rootScopes,s=Vw(t._fallback,n,i),o=[...e,...r],a=new Set;a.add(i);let l=zw(a,o,n,s||n,i);return l===null||typeof s!="undefined"&&s!==n&&(l=zw(a,o,s,l,i),l===null)?!1:Fp(Array.from(a),[""],r,s,()=>OL(t,n,i))}function zw(e,t,n,i,r){for(;n;)n=jL(e,t,n,i,r);return n}function OL(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return Fe(r)&&ie(n)?n:r||{}}function IL(e,t,n,i){let r;for(const s of t)if(r=Bw(AL(s,e),n),typeof r!="undefined")return Np(e,r)?jp(n,i,e,r):r}function Bw(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i!="undefined")return i}}function Hw(e){let t=e._keys;return t||(t=e._keys=VL(e._scopes)),t}function VL(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Op(){return typeof window!="undefined"&&typeof document!="undefined"}function Ip(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ku(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Cu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function zL(e,t){return Cu(e).getPropertyValue(t)}const BL=["top","right","bottom","left"];function ur(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=BL[r];i[s]=parseFloat(e[t+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const HL=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function WL(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:s}=i;let o=!1,a,l;if(HL(r,s,e.target))a=r,l=s;else{const u=t.getBoundingClientRect();a=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function cr(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Cu(n),s=r.boxSizing==="border-box",o=ur(r,"padding"),a=ur(r,"border","width"),{x:l,y:u,box:c}=WL(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:m}=t;return s&&(h-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-d)/h*n.width/i),y:Math.round((u-f)/m*n.height/i)}}function UL(e,t,n){let i,r;if(t===void 0||n===void 0){const s=e&&Ip(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Cu(s),l=ur(a,"border","width"),u=ur(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,i=ku(a.maxWidth,s,"clientWidth"),r=ku(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:i||xu,maxHeight:r||xu}}const Tu=e=>Math.round(e*10)/10;function KL(e,t,n,i){const r=Cu(e),s=ur(r,"margin"),o=ku(r.maxWidth,e,"clientWidth")||xu,a=ku(r.maxHeight,e,"clientHeight")||xu,l=UL(e,t,n);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const f=ur(r,"border","width"),h=ur(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=Tu(Math.min(u,o,l.maxWidth)),c=Tu(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Tu(u/2)),(t!==void 0||n!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,u=Tu(Math.floor(c*i))),{width:u,height:c}}function Ww(e,t,n){const i=t||1,r=Math.floor(e.height*i),s=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(e.currentDevicePixelRatio=i,o.height=r,o.width=s,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const YL=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Op()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Uw(e,t){const n=zL(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}const GL=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},XL=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function cs(e,t,n){return e?GL(t,n):XL()}function Kw(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Yw(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}/*! * Chart.js v4.4.8 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */class qL{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const s=n.listeners[r],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=kw.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=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(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),s.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var On=new qL;const Gw="transparent",QL={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=Mw(e||Gw),r=i.valid&&Mw(t||Gw);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class ZL{constructor(t,n,i,r){const s=n[i];r=we([t.to,r,s,t.from]);const o=we([t.from,s,r]);this._active=!0,this._fn=t.fn||QL[t.type||typeof o],this._easing=zo[t.easing]||zo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,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,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=we([t.to,n,r,t.from]),this._from=we([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-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 t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r{const s=t[r];if(!ie(s))return;const o={};for(const a of n)o[a]=s[a];(Fe(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,n){const i=n.options,r=e4(t,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&JL(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,n){const i=this._properties,r=[],s=t.$animations||(t.$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(t,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){t[u]=c;continue}s[u]=d=new ZL(f,t,u,c),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return On.add(this._chart,i),!0}}function JL(e,t){const n=[],i=Object.keys(t);for(let r=0;r0||!n&&s<0)return r.index}return null}function eS(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,u=o.axis,c=r4(s,o,i),d=t.length;let f;for(let h=0;hn[i].axis===t).shift()}function a4(e,t){return ls(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function l4(e,t,n){return ls(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Wo(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){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 Bp=e=>e==="reset"||e==="none",tS=(e,t)=>t?e:Object.assign({},e),u4=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Qw(n,!0),values:null};class Uo{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Vp(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Wo(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,f,h,m)=>d==="x"?f:d==="r"?m:h,s=n.xAxisID=ae(i.xAxisID,zp(t,"x")),o=n.yAxisID=ae(i.yAxisID,zp(t,"y")),a=n.rAxisID=ae(i.rAxisID,zp(t,"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(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Sw(this._data,this),t._stacked&&Wo(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(ie(n)){const r=this._cachedMeta;this._data=i4(n,r)}else if(i!==n){if(i){Sw(i,this);const r=this._cachedMeta;Wo(r),r._parsed=[]}n&&Object.isExtensible(n)&&dL(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const s=n._stacked;n._stacked=Vp(n.vScale,n),n.stack!==i.stack&&(r=!0,Wo(n),n.stack=i.stack),this._resyncElements(t),(r||s!==n._stacked)&&(eS(this,n._parsed),n._stacked=Vp(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,a=s.axis;let l=t===0&&n===r.length?!0:i._sorted,u=t>0&&i._parsed[t-1],c,d,f;if(this._parsing===!1)i._parsed=r,i._sorted=!0,f=r;else{Fe(r[t])?f=this.parseArrayData(i,r,t,n):ie(r[t])?f=this.parseObjectData(i,r,t,n):f=this.parsePrimitiveData(i,r,t,n);const h=()=>d[a]===null||u&&d[a]v||d=0;--f)if(!m()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,s,o;for(r=0,s=n.length;r=0&&tthis.getContext(i,r,n),v=u.resolveNamedOptions(f,h,m,d);return v.$shared&&(v.$shared=l,s[o]=Object.freeze(tS(v,l))),v}_resolveAnimations(t,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(t,i,n))}const u=new Xw(r,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Bp(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,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(t,n,i,r){Bp(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!Bp(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const s=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,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,t):s{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=t;ar-s))}return e._cache.$bar}function d4(e){const t=e.iScale,n=c4(t,e.type);let i=t._length,r,s,o,a;const l=()=>{o===32767||o===-32768||(Vo(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(r=0,s=n.length;r0?r[e-1]:null,a=eMath.abs(a)&&(l=a,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:r,end:s,min:o,max:a}}function nS(e,t,n,i){return Fe(e)?p4(e,t,n,i):t[n.axis]=n.parse(e,i),t}function iS(e,t,n,i){const r=e.iScale,s=e.vScale,o=r.getLabels(),a=r===s,l=[];let u,c,d,f;for(u=n,c=n+i;u=n?1:-1)}function g4(e){let t,n,i,r,s;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.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(se(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===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const r=this._getStacks(t,i),s=n!==void 0?r.indexOf(n):-1;return s===-1?r.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let s,o;for(s=0,o=n.data.length;s!se(v[d.axis]));c.lo-=Math.max(0,h);const m=f.slice(c.hi).findIndex(v=>!se(v[d.axis]));c.hi+=Math.max(0,m)}return c}}return{lo:0,hi:s.length-1}}function $u(e,t,n,i,r){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a{l[o]&&l[o](t[n],r)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,r))}),i&&!a?[]:s}var k4={modes:{index(e,t,n,i){const r=cr(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Up(e,r,s,i,o):Kp(e,r,s,!1,i,o),l=[];return a.length?(e.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(e,t,n,i){const r=cr(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Up(e,r,s,i,o):Kp(e,r,s,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;cn.pos===t)}function lS(e,t){return e.filter(n=>aS.indexOf(n.pos)===-1&&n.box.axis===t)}function Yo(e,t){return e.sort((n,i)=>{const r=t?i:n,s=t?n:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function C4(e){const t=[];let n,i,r,s,o,a;for(n=0,i=(e||[]).length;nu.box.fullSize),!0),i=Yo(Ko(t,"left"),!0),r=Yo(Ko(t,"right")),s=Yo(Ko(t,"top"),!0),o=Yo(Ko(t,"bottom")),a=lS(t,"x"),l=lS(t,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:Ko(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function uS(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function cS(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function M4(e,t,n,i){const{pos:r,box:s}=n,o=e.maxPadding;if(!ie(r)){n.size&&(e[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,e[r]+=n.size}s.getPadding&&cS(o,s.getPadding());const a=Math.max(0,t.outerWidth-uS(o,e,"left","right")),l=Math.max(0,t.outerHeight-uS(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function D4(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function A4(e,t){const n=t.maxPadding;function i(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return i(e?["left","right"]:["top","bottom"])}function Go(e,t,n,i){const r=[];let s,o,a,l,u,c;for(s=0,o=e.length,u=0;s{typeof v.beforeLayout=="function"&&v.beforeLayout()});const c=l.reduce((v,x)=>x.box.options&&x.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},r);cS(f,Mt(i));const h=Object.assign({maxPadding:f,w:s,h:o,x:r.left,y:r.top},r),m=E4(l.concat(u),d);Go(a.fullSize,h,d,m),Go(l,h,d,m),Go(u,h,d,m)&&Go(l,h,d,m),D4(h),dS(a.leftAndTop,h,d,m),h.x+=h.w,h.y+=h.h,dS(a.rightAndBottom,h,d,m),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},ue(a.chartArea,v=>{const x=v.box;Object.assign(x,e.chartArea),x.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class fS{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class L4 extends fS{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Du="$chartjs",R4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},hS=e=>e===null||e==="";function F4(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[Du]={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",hS(r)){const s=Uw(e,"width");s!==void 0&&(e.width=s)}if(hS(i))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Uw(e,"height");s!==void 0&&(e.height=s)}return e}const pS=YL?{passive:!0}:!1;function N4(e,t,n){e&&e.addEventListener(t,n,pS)}function j4(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,pS)}function O4(e,t){const n=R4[e.type]||e.type,{x:i,y:r}=cr(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Au(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function I4(e,t,n){const i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Au(a.addedNodes,i),o=o&&!Au(a.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function V4(e,t,n){const i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Au(a.removedNodes,i),o=o&&!Au(a.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const Xo=new Map;let mS=0;function gS(){const e=window.devicePixelRatio;e!==mS&&(mS=e,Xo.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function z4(e,t){Xo.size||window.addEventListener("resize",gS),Xo.set(e,t)}function B4(e){Xo.delete(e),Xo.size||window.removeEventListener("resize",gS)}function H4(e,t,n){const i=e.canvas,r=i&&Ip(i);if(!r)return;const s=Cw((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),z4(e,s),o}function Yp(e,t,n){n&&n.disconnect(),t==="resize"&&B4(e)}function W4(e,t,n){const i=e.canvas,r=Cw(s=>{e.ctx!==null&&n(O4(s,e))},e);return N4(i,t,r),r}class U4 extends fS{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(F4(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[Du])return!1;const i=n[Du].initial;["height","width"].forEach(s=>{const o=i[s];se(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[Du],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),o={attach:I4,detach:V4,resize:H4}[n]||W4;r[n]=o(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:Yp,detach:Yp,resize:Yp}[n]||j4)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return KL(t,n,i,r)}isAttached(t){const n=t&&Ip(t);return!!(n&&n.isConnected)}}function K4(e){return!Op()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?L4:U4}let ki=(Zu=class{constructor(){X(this,"x");X(this,"y");X(this,"active",!1);X(this,"options");X(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return wu(this.x)&&wu(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}},X(Zu,"defaults",{}),X(Zu,"defaultRoutes"),Zu);function Y4(e,t){const n=e.options.ticks,i=G4(e),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?q4(t):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>r)return Q4(t,u,s,o/r),u;const c=X4(s,t,r);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(Lu(t,u,c,se(h)?0:a-h,a),d=0,f=o-1;dr)return l}return Math.max(r,1)}function q4(e){const t=[];let n,i;for(n=0,i=e.length;ne==="left"?"right":e==="right"?"left":e,vS=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,yS=(e,t)=>Math.min(t||e,e);function bS(e,t){const n=[],i=e.length/t,r=e.length;let s=0;for(;so+a)))return l}function t5(e,t){ue(e,n=>{const i=n.gc,r=i.length/2;let s;if(r>t){for(s=0;si?i:n,i=r&&n>i?n:i,{min:mn(n,mn(i,n)),max:mn(i,mn(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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){he(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,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=DL(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=vt(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:h/(i-1),d+6>a&&(a=h/(i-(t.offset?.5:1)),l=this.maxHeight-qo(t.grid)-n.padding-xS(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=oL(Math.min(Math.asin(vt((c.highest.height+6)/a,-1,1)),Math.asin(vt(l/u,-1,1))-Math.asin(vt(f/u,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){he(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){he(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=xS(r,n.options.font);if(a?(t.width=this.maxWidth,t.height=qo(s)+l):(t.height=this.maxHeight,t.width=qo(s)+l),i.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=i.padding*2,m=rr(this.labelRotation),v=Math.cos(m),x=Math.sin(m);if(a){const p=i.mirror?0:x*d.width+v*f.height;t.height=Math.min(this.maxHeight,t.height+p+h)}else{const p=i.mirror?0:v*d.width+x*f.height;t.width=Math.min(this.maxWidth,t.width+p+h)}this._calculatePadding(u,c,x,v)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,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*t.width,h=i*n.height):(f=i*t.height,h=r*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.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=t.height/2;s==="start"?(c=0,d=t.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(){he(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n({width:o[P]||0,height:a[P]||0});return{first:M(0),last:M(n-1),widest:M(k),highest:M($),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return lL(this._alignToPixels?lr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*r?a/i:l/r:l*r0}_computeGridLineItems(t){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=qo(s),h=[],m=a.setContext(this.getContext()),v=m.display?m.width:0,x=v/2,p=function(R){return lr(i,R,v)};let g,b,w,S,k,$,M,P,E,F,C,I;if(o==="top")g=p(this.bottom),$=this.bottom-f,P=g-x,F=p(t.top)+x,I=t.bottom;else if(o==="bottom")g=p(this.top),F=t.top,I=p(t.bottom)-x,$=g+x,P=this.top+f;else if(o==="left")g=p(this.right),k=this.right-f,M=g-x,E=p(t.left)+x,C=t.right;else if(o==="right")g=p(this.left),E=t.left,C=p(t.right)-x,k=g+x,M=this.left+f;else if(n==="x"){if(o==="center")g=p((t.top+t.bottom)/2+.5);else if(ie(o)){const R=Object.keys(o)[0],z=o[R];g=p(this.chart.scales[R].getPixelForValue(z))}F=t.top,I=t.bottom,$=g+x,P=$+f}else if(n==="y"){if(o==="center")g=p((t.left+t.right)/2);else if(ie(o)){const R=Object.keys(o)[0],z=o[R];g=p(this.chart.scales[R].getPixelForValue(z))}k=g-x,M=k-f,E=t.left,C=t.right}const A=ae(r.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/A));for(b=0;b0&&(ye-=J/2);break}j={left:ye,top:re,width:J+H.width,height:q+H.height,color:L.backdropColor}}x.push({label:w,font:P,textOffset:C,options:{rotation:v,color:z,strokeColor:N,strokeWidth:V,textAlign:U,textBaseline:I,translation:[S,k],backdrop:j}})}return x}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-rr(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=t+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 t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(s=>s.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));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(t){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=[e].concat(i).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");Me.route(s,r,l,a)})}function l5(e){return"id"in e&&"defaults"in e}class u5{constructor(){this.controllers=new Ru(Uo,"datasets",!0),this.elements=new Ru(ki,"elements"),this.plugins=new Ru(Object,"plugins"),this.scales=new Ru(ds,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(r=>{const s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):ue(r,o=>{const a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,i){const r=Sp(t);he(i["before"+r],[],i),n[t](i),he(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;ns.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function d5(e){const t={},n=[],i=Object.keys(vn.plugins.items);for(let s=0;s1&&_S(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function wS(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function y5(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return wS(e,"x",n[0])||wS(e,"y",n[0])}return{}}function b5(e,t){const n=ar[e.type]||{scales:{}},i=t.scales||{},r=Gp(e.type,t),s=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!ie(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=Xp(o,a,y5(o,e),Me.scales[a.type]),u=g5(l,r),c=n.scales||{};s[o]=Io(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Gp(a,t),c=(ar[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=m5(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Io(s[h],[{axis:f},i[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];Io(a,[Me.scales[a.type],Me.scale])}),s}function SS(e){const t=e.options||(e.options={});t.plugins=ae(t.plugins,{}),t.scales=b5(e,t)}function PS(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function x5(e){return e=e||{},e.data=PS(e.data),SS(e),e}const kS=new Map,CS=new Set;function Fu(e,t){let n=kS.get(e);return n||(n=t(),kS.set(e,n),CS.add(n)),n}const Qo=(e,t,n)=>{const i=os(t,n);i!==void 0&&e.add(i)};class _5{constructor(t){this._config=x5(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=PS(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),SS(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fu(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Fu(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Fu(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return Fu(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:s}=this,o=this._cachedScopes(t,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>Qo(l,t,d))),c.forEach(d=>Qo(l,r,d)),c.forEach(d=>Qo(l,ar[s]||{},d)),c.forEach(d=>Qo(l,Me,d)),c.forEach(d=>Qo(l,Ep,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),CS.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,ar[n]||{},Me.datasets[n]||{},{type:n},Me,Ep]}resolveNamedOptions(t,n,i,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=TS(this._resolverCache,t,r);let l=o;if(S5(o,n)){s.$shared=!1,i=Si(i)?i():i;const u=this.createResolver(t,i,a);l=us(o,i,u)}for(const u of n)s[u]=l[u];return s}createResolver(t,n,i=[""],r){const{resolver:s}=TS(this._resolverCache,t,i);return ie(n)?us(s,n,void 0,r):s}}function TS(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let s=i.get(r);return s||(s={resolver:Fp(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,s)),s}const w5=e=>ie(e)&&Object.getOwnPropertyNames(e).some(t=>Si(e[t]));function S5(e,t){const{isScriptable:n,isIndexable:i}=Ow(e);for(const r of t){const s=n(r),o=i(r),a=(o||s)&&e[r];if(s&&(Si(a)||w5(a))||o&&Fe(a))return!0}return!1}var P5="4.4.8";const k5=["top","bottom","left","right","chartArea"];function ES(e,t){return e==="top"||e==="bottom"||k5.indexOf(e)===-1&&t==="x"}function $S(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function MS(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),he(n&&n.onComplete,[e],t)}function C5(e){const t=e.chart,n=t.options.animation;he(n&&n.onProgress,[e],t)}function DS(e){return Op()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Nu={},AS=e=>{const t=DS(e);return Object.values(Nu).filter(n=>n.canvas===t).pop()};function T5(e,t,n){const i=Object.keys(e);for(const r of i){const s=+r;if(s>=t){const o=e[r];delete e[r],(n>0||s>t)&&(e[s+n]=o)}}}function E5(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function ju(e,t,n){return e.options.clip?e[n]:t[n]}function $5(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:ju(n,t,"left"),right:ju(n,t,"right"),top:ju(i,t,"top"),bottom:ju(i,t,"bottom")}:t}let Ou=($i=class{static register(...t){vn.add(...t),LS()}static unregister(...t){vn.remove(...t),LS()}constructor(t,n){const i=this.config=new _5(n),r=DS(t),s=AS(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||K4(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=G3(),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 c5,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fL(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Nu[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}On.listen(this,"complete",MS),On.listen(this,"progress",C5),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:s}=this;return se(t)?n&&s?s:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return vn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ww(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Fw(this.canvas,this.ctx),this}stop(){return On.stop(this),this}resize(t,n){On.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,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,Ww(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),he(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ue(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.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=Xp(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),ue(s,o=>{const a=o.options,l=a.id,u=Xp(l,a),c=ae(a.type,o.dtype);(a.position===void 0||ES(a.position,u)!==ES(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=vn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),ue(r,(o,a)=>{o||delete i[a]}),ue(i,o=>{Yt.configure(this,o,o.options),Yt.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,s)=>r.index-s.index),i>n){for(let r=n;rn.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],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(t){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:t,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(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($S("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ue(this.scales,t=>{Yt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!mw(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:s}of n){const o=i==="_removeElements"?-s:s;T5(t,r,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=s=>new Set(t.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(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Yt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ue(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(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,s=$5(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&Ap(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}),t.controller.draw(),r&&Lp(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Dp(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const s=k4.modes[n];return typeof s=="function"?s(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],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:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=ls(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);Vo(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),On.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,s,o),t[s]=o},r=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};ue(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},r=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[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(){ue(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ue(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=t.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}});!yu(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,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,t),a=i?t:s(t,n);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const s=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:s}=this,o=n,a=this._getActiveElements(t,r,i,o),l=eL(t),u=E5(t,this._lastEvent,i,l);i&&(this._lastEvent=null,he(s.onHover,[t,a,this],this),l&&he(s.onClick,[t,a,this],this));const c=!yu(a,r);return(c||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=u,c}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,r)}},X($i,"defaults",Me),X($i,"instances",Nu),X($i,"overrides",ar),X($i,"registry",vn),X($i,"version",P5),X($i,"getChart",AS),$i);function LS(){return ue(Ou.instances,e=>e._plugins.invalidate())}function M5(e,t,n){const{startAngle:i,pixelMargin:r,x:s,y:o,outerRadius:a,innerRadius:l}=t;let u=r/a;e.beginPath(),e.arc(s,o,a,i-u,n+u),l>r?(u=r/l,e.arc(s,o,l,n+u,i-u,!0)):e.arc(s,o,r,n+Ye,i-Ye),e.closePath(),e.clip()}function D5(e){return Rp(e,["outerStart","outerEnd","innerStart","innerEnd"])}function A5(e,t,n,i){const r=D5(e.options.borderRadius),s=(n-t)/2,o=Math.min(s,i*t/2),a=l=>{const u=(n-Math.min(s,l))*i/2;return vt(l,0,Math.min(s,u))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:vt(r.innerStart,0,o),innerEnd:vt(r.innerEnd,0,o)}}function fs(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Iu(e,t,n,i,r,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=t,d=Math.max(t.outerRadius+i+n-u,0),f=c>0?c+i+n+u:0;let h=0;const m=r-l;if(i){const L=c>0?c-i:0,R=d>0?d-i:0,z=(L+R)/2,N=z!==0?m*z/(z+i):m;h=(m-N)/2}const v=Math.max(.001,m*d-n/He)/d,x=(m-v)/2,p=l+x+h,g=r-x-h,{outerStart:b,outerEnd:w,innerStart:S,innerEnd:k}=A5(t,f,d,g-p),$=d-b,M=d-w,P=p+b/$,E=g-w/M,F=f+S,C=f+k,I=p+S/F,A=g-k/C;if(e.beginPath(),s){const L=(P+E)/2;if(e.arc(o,a,d,P,L),e.arc(o,a,d,L,E),w>0){const V=fs(M,E,o,a);e.arc(V.x,V.y,w,E,g+Ye)}const R=fs(C,g,o,a);if(e.lineTo(R.x,R.y),k>0){const V=fs(C,A,o,a);e.arc(V.x,V.y,k,g+Ye,A+Math.PI)}const z=(g-k/f+(p+S/f))/2;if(e.arc(o,a,f,g-k/f,z,!0),e.arc(o,a,f,z,p+S/f,!0),S>0){const V=fs(F,I,o,a);e.arc(V.x,V.y,S,I+Math.PI,p-Ye)}const N=fs($,p,o,a);if(e.lineTo(N.x,N.y),b>0){const V=fs($,P,o,a);e.arc(V.x,V.y,b,p-Ye,P)}}else{e.moveTo(o,a);const L=Math.cos(P)*d+o,R=Math.sin(P)*d+a;e.lineTo(L,R);const z=Math.cos(E)*d+o,N=Math.sin(E)*d+a;e.lineTo(z,N)}e.closePath()}function L5(e,t,n,i,r){const{fullCircles:s,startAngle:o,circumference:a}=t;let l=t.endAngle;if(s){Iu(e,t,n,i,l,r);for(let u=0;u=at||v,p=or(a,c+h,d+h);return x&&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>at?Math.floor(r/at):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(He,r||0)),c=s*u;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,L5(n,this,c,o,a),R5(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 RS(e,t,n,i){const r=e.options,{[n]:s}=e.getProps([n],i);return Math.abs(t-s){let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},V5=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class jS extends ki{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,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 t=this.options.labels||{};let n=he(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=Ge(i.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=NS(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,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,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=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((m,v)=>{const x=i+n/2+s.measureText(m.text).width;(v===0||u[u.length-1]+x+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:x,height:r},u[u.length-1]+=x+a}),d}_fitCols(t,n,i,r){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,m=0,v=0;return this.legendItems.forEach((x,p)=>{const{itemWidth:g,itemHeight:b}=z5(i,n,s,x,r);p>0&&h+b+2*a>c&&(d+=f+a,u.push({width:f,height:h}),m+=f+a,v++,f=h=0),l[p]={left:m,top:h,col:v,width:g,height:b},f=Math.max(f,g),h+=b+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:s}}=this,o=cs(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=tt(i,this.left+r,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=tt(i,this.left+r,this.right-this.lineWidths[a])),u.top+=this.top+t+r,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+r}else{let a=0,l=tt(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=tt(i,this.top+t+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 t=this.ctx;Ap(t,this),this._draw(),Lp(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:s,labels:o}=t,a=Me.color,l=cs(t.rtl,this.left,this.width),u=Ge(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:m,boxHeight:v,itemHeight:x}=NS(o,d),p=function(k,$,M){if(isNaN(m)||m<=0||isNaN(v)||v<0)return;r.save();const P=ae(M.lineWidth,1);if(r.fillStyle=ae(M.fillStyle,a),r.lineCap=ae(M.lineCap,"butt"),r.lineDashOffset=ae(M.lineDashOffset,0),r.lineJoin=ae(M.lineJoin,"miter"),r.lineWidth=P,r.strokeStyle=ae(M.strokeStyle,a),r.setLineDash(ae(M.lineDash,[])),o.usePointStyle){const E={radius:v*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:P},F=l.xPlus(k,m/2),C=$+f;Nw(r,E,F,C,o.pointStyleWidth&&m)}else{const E=$+Math.max((d-v)/2,0),F=l.leftForLtr(k,m),C=as(M.borderRadius);r.beginPath(),Object.values(C).some(I=>I!==0)?Pu(r,{x:F,y:E,w:m,h:v,radius:C}):r.rect(F,E,m,v),r.fill(),P!==0&&r.stroke()}r.restore()},g=function(k,$,M){Ho(r,M.text,k,$+x/2,u,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},b=this.isHorizontal(),w=this._computeTitleHeight();b?h={x:tt(s,this.left+c,this.right-i[0]),y:this.top+c+w,line:0}:h={x:this.left+c,y:tt(s,this.top+w+c,this.bottom-n[0].height),line:0},Kw(this.ctx,t.textDirection);const S=x+c;this.legendItems.forEach((k,$)=>{r.strokeStyle=k.fontColor,r.fillStyle=k.fontColor;const M=r.measureText(k.text).width,P=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),E=m+f+M;let F=h.x,C=h.y;l.setWidth(this.width),b?$>0&&F+E+c>this.right&&(C=h.y+=S,h.line++,F=h.x=tt(s,this.left+c,this.right-i[h.line])):$>0&&C+S>this.bottom&&(F=h.x=F+n[h.line].width+c,h.line++,C=h.y=tt(s,this.top+w+c,this.bottom-n[h.line].height));const I=l.x(F);if(p(I,C,k),F=hL(P,F+m+f,b?F+E:this.right,t.rtl),g(l.x(F),C,k),b)h.x+=E+c;else if(typeof k.text!="string"){const A=u.lineHeight;h.y+=OS(k,A)+c}else h.y+=S}),Yw(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=Ge(n.font),r=Mt(n.padding);if(!n.display)return;const s=cs(t.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=tt(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((v,x)=>Math.max(v,x.height),0);c=u+tt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=tt(a,d,d+f);o.textAlign=s.textAlign(Cp(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Ho(o,n.text,h,c,i)}_computeTitleHeight(){const t=this.options.title,n=Ge(t.font),i=Mt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,s;if(or(t,this.left,this.right)&&or(n,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;is.length>o.length?s:o)),t+n.size/2+i.measureText(r).width}function H5(e,t,n){let i=e;return typeof t.text!="string"&&(i=OS(t,n)),i}function OS(e,t){const n=e.text?e.text.length:0;return t*n}function W5(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var U5={id:"legend",_element:jS,start(e,t,n){const i=e.legend=new jS({ctx:e.ctx,options:n,chart:e});Yt.configure(e,i,n),Yt.addBox(e,i)},stop(e){Yt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Yt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Mt(u.borderWidth);return{text:t[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:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class IS extends ki{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const 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=t,this.height=this.bottom=n;const r=Fe(i.text)?i.text.length:1;this._padding=Mt(i.padding);const s=r*Ge(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){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=tt(a,i,s),d=n+t,u=s-i):(o.position==="left"?(c=i+t,d=tt(a,r,n),l=He*-.5):(c=s-t,d=tt(a,n,r),l=He*.5),u=r-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=Ge(n.font),s=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Ho(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:u,textAlign:Cp(n.align),textBaseline:"middle",translation:[o,a]})}}function K5(e,t){const n=new IS({ctx:e.ctx,options:t,chart:e});Yt.configure(e,n,t),Yt.addBox(e,n),e.titleBlock=n}var Y5={id:"title",_element:IS,start(e,t,n){K5(e,n)},stop(e){const t=e.titleBlock;Yt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Yt.configure(e,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 ea={average(e){if(!e.length)return!1;let t,n,i=new Set,r=0,s=0;for(t=0,n=e.length;ta+l)/i.size,y:r/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s-1?e.split(` `):e}function G5(e,t){const{element:n,datasetIndex:i,index:r}=t,s=e.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function VS(e,t){const n=e.chart.ctx,{body:i,footer:r,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=Ge(t.bodyFont),u=Ge(t.titleFont),c=Ge(t.footerFont),d=s.length,f=r.length,h=i.length,m=Mt(t.padding);let v=m.height,x=0,p=i.reduce((w,S)=>w+S.before.length+S.lines.length+S.after.length,0);if(p+=e.beforeBody.length+e.afterBody.length,d&&(v+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),p){const w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;v+=h*w+(p-h)*l.lineHeight+(p-1)*t.bodySpacing}f&&(v+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let g=0;const b=function(w){x=Math.max(x,n.measureText(w).width+g)};return n.save(),n.font=u.string,ue(e.title,b),n.font=l.string,ue(e.beforeBody.concat(e.afterBody),b),g=t.displayColors?o+2+t.boxPadding:0,ue(i,w=>{ue(w.before,b),ue(w.lines,b),ue(w.after,b)}),g=0,n.font=c.string,ue(e.footer,b),n.restore(),x+=m.width,{width:x,height:v}}function X5(e,t){const{y:n,height:i}=t;return ne.height-i/2?"bottom":"center"}function q5(e,t,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&r+s+o>t.width||e==="right"&&r-s-o<0)return!0}function Q5(e,t,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return i==="center"?u=r<=(a+l)/2?"left":"right":r<=s/2?u="left":r>=o-s/2&&(u="right"),q5(u,e,t,n)&&(u="center"),u}function zS(e,t,n){const i=n.yAlign||t.yAlign||X5(e,n);return{xAlign:n.xAlign||t.xAlign||Q5(e,t,n,i),yAlign:i}}function Z5(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function J5(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function BS(e,t,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=r+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=as(o);let m=Z5(t,a);const v=J5(t,l,u);return l==="center"?a==="left"?m+=u:a==="right"&&(m-=u):a==="left"?m-=Math.max(c,f)+r:a==="right"&&(m+=Math.max(d,h)+r),{x:vt(m,0,i.width-t.width),y:vt(v,0,i.height-t.height)}}function zu(e,t,n){const i=Mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function HS(e){return yn([],In(e))}function eR(e,t,n){return ls(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function WS(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const US={beforeTitle:jn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex{const o={before:[],lines:[],after:[]},a=WS(i,s);yn(o.before,In(yt(a,"beforeLabel",this,s))),yn(o.lines,yt(a,"label",this,s)),yn(o.after,In(yt(a,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,n){return HS(yt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=yt(i,"beforeFooter",this,t),s=yt(i,"footer",this,t),o=yt(i,"afterFooter",this,t);let a=[];return a=yn(a,In(r)),a=yn(a,In(s)),a=yn(a,In(o)),a}_createItems(t){const n=this._active,i=this.chart.data,r=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;lt.filter(c,d,f,i))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,i))),ue(a,c=>{const d=WS(t.callbacks,c);r.push(yt(d,"labelColor",this,c)),s.push(yt(d,"labelPointStyle",this,c)),o.push(yt(d,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,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=ea[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=VS(this,i),u=Object.assign({},a,l),c=zS(this.chart,i,u),d=BS(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),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){const s=this.getCaretPosition(t,i,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=as(a),{x:f,y:h}=t,{width:m,height:v}=n;let x,p,g,b,w,S;return s==="center"?(w=h+v/2,r==="left"?(x=f,p=x-o,b=w+o,S=w-o):(x=f+m,p=x+o,b=w-o,S=w+o),g=x):(r==="left"?p=f+Math.max(l,c)+o:r==="right"?p=f+m-Math.max(u,d)-o:p=this.caretX,s==="top"?(b=h,w=b-o,x=p-o,g=p+o):(b=h+v,w=b+o,x=p+o,g=p-o),S=b),{x1:x,x2:p,x3:g,y1:b,y2:w,y3:S}}drawTitle(t,n,i){const r=this.title,s=r.length;let o,a,l;if(s){const u=cs(i.rtl,this.x,this.width);for(t.x=zu(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",o=Ge(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lg!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Pu(t,{x:v,y:m,w:u,h:l,radius:p}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Pu(t,{x,y:m+1,w:u-2,h:l-2,radius:p}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(v,m,u,l),t.strokeRect(v,m,u,l),t.fillStyle=o.backgroundColor,t.fillRect(x,m+1,u-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=i,d=Ge(i.bodyFont);let f=d.lineHeight,h=0;const m=cs(i.rtl,this.x,this.width),v=function(M){n.fillText(M,m.x(t.x+h),t.y+f/2),t.y+=f+s},x=m.textAlign(o);let p,g,b,w,S,k,$;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=zu(this,x,i),n.fillStyle=i.bodyColor,ue(this.beforeBody,v),h=a&&x!=="right"?o==="center"?u/2+c:u+2+c:0,w=0,k=r.length;w0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){const o=ea[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=VS(this,t),l=Object.assign({},o,this._size),u=zS(n,t,l),c=BS(t,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(t){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=Mt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,r,n),Kw(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),Yw(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,r=t.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=!yu(i,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,i),a=this._positionChanged(o,t),l=n||!yu(o,s)||a;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const s=this.options;if(t.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(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:i,caretY:r,options:s}=this,o=ea[s.position].call(this,t,n);return o!==!1&&(i!==o.x||r!==o.y)}}X(Zp,"positioners",ea);var tR={id:"tooltip",_element:Zp,positioners:ea,afterInit(e,t,n){n&&(e.tooltip=new Zp({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",B(T({},n),{cancelable:!0}))===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:US},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const nR=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function iR(e,t,n,i){const r=e.indexOf(t);if(r===-1)return nR(e,t,n,i);const s=e.lastIndexOf(t);return r!==s?n:r}const rR=(e,t)=>e===null?null:vt(Math.round(e),0,t);function KS(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}X(Jp,"id","category"),X(Jp,"defaults",{ticks:{callback:KS}});function sR(e,t){const n=[],{bounds:r,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=s||1,m=c-1,{min:v,max:x}=t,p=!se(o),g=!se(a),b=!se(u),w=(x-v)/(d+1);let S=yw((x-v)/m/h)*h,k,$,M,P;if(S<1e-14&&!p&&!g)return[{value:v},{value:x}];P=Math.ceil(x/S)-Math.floor(v/S),P>m&&(S=yw(P*S/m/h)*h),se(l)||(k=Math.pow(10,l),S=Math.ceil(S*k)/k),r==="ticks"?($=Math.floor(v/S)*S,M=Math.ceil(x/S)*S):($=v,M=x),p&&g&&s&&rL((a-o)/s,S/1e3)?(P=Math.round(Math.min((a-o)/S,c)),S=(a-o)/P,$=o,M=a):b?($=p?o:$,M=g?a:M,P=u-1,S=(M-$)/P):(P=(M-$)/S,_u(P,Math.round(P),S/1e3)?P=Math.round(P):P=Math.ceil(P));const E=Math.max(bw(S),bw($));k=Math.pow(10,se(l)?E:l),$=Math.round($*k)/k,M=Math.round(M*k)/k;let F=0;for(p&&(f&&$!==o?(n.push({value:o}),$a)break;n.push({value:C})}return g&&f&&M!==a?n.length&&_u(n[n.length-1].value,a,YS(a,w,e))?n[n.length-1].value=a:n.push({value:a}):(!g||M===a)&&n.push({value:M}),n}function YS(e,t,{horizontal:n,minRotation:i}){const r=rr(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class oR extends ds{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return se(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=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(t){const l=Pi(r),u=Pi(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),t||o(r-l)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,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 t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=sR(r,s);return t.bounds==="ticks"&&sL(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return Aw(t,this.chart.options.locale,this.options.ticks.format)}}class em extends oR{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Kt(t)?t:0,this.max=Kt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=rr(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}X(em,"id","linear"),X(em,"defaults",{ticks:{callback:Lw.formatters.numeric}});const Bu={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}},bt=Object.keys(Bu);function GS(e,t){return e-t}function XS(e,t){if(se(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:s}=e._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),Kt(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(wu(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function qS(e,t,n,i){const r=bt.length;for(let s=bt.indexOf(e);s=bt.indexOf(n);s--){const o=bt[s];if(Bu[o].common&&e._adapter.diff(r,i,o)>=t-1)return o}return bt[n?bt.indexOf(n):0]}function lR(e){for(let t=bt.indexOf(e)+1,n=bt.length;t=t?n[i]:n[r];e[s]=!0}}function uR(e,t,n,i){const r=e._adapter,s=+r.startOf(t[0].value,i),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function ZS(e,t,n){const i=[],r={},s=t.length;let o,a;for(o=0;o+t.value))}initOffsets(t=[]){let n=0,i=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?i=s:i=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=vt(n,0,o),i=vt(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||qS(s.minUnit,n,i,this._getLabelCapacity(n)),a=ae(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=wu(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const m=r.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f+v)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,r){const s=this.options,o=s.ticks.callback;if(o)return he(o,[t,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(t,r||(h?d:c))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;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=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=kp(e,"pos",t)),{pos:s,time:a}=e[i],{pos:o,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=kp(e,"time",t)),{time:s,pos:a}=e[i],{time:o,pos:l}=e[r]);const u=o-s;return u?a+(l-a)*(t-s)/u:a}class JS extends Hu{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Wu(n,this.min),this._tableRange=Wu(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],s=[];let o,a,l,u,c;for(o=0,a=t.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 t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Wu(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return Wu(this._table,i*this._tableRange+this._minPos,!0)}}X(JS,"id","timeseries"),X(JS,"defaults",Hu.defaults);const eP="label";function tP(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function cR(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function nP(e,t){e.labels=t}function iP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eP;const i=[];e.datasets=t.map(r=>{const s=e.datasets.find(o=>o[n]===r[n]);return!s||!r.data||i.includes(s)?T({},r):(i.push(s),Object.assign(s,r),s)})}function dR(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:eP;const n={labels:[],datasets:[]};return nP(n,e.labels),iP(n,e.datasets,t),n}function fR(e,t){const p=e,{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=_.useRef(null),m=_.useRef(null),v=()=>{h.current&&(m.current=new Ou(h.current,{type:o,data:dR(a,s),options:l&&T({},l),plugins:u}),tP(t,m.current))},x=()=>{tP(t,null),m.current&&(m.current.destroy(),m.current=null)};return _.useEffect(()=>{!r&&m.current&&l&&cR(m.current,l)},[r,l]),_.useEffect(()=>{!r&&m.current&&nP(m.current.config.data,a.labels)},[r,a.labels]),_.useEffect(()=>{!r&&m.current&&a.datasets&&iP(m.current.config.data,a.datasets,s)},[r,a.datasets]),_.useEffect(()=>{m.current&&(r?(x(),setTimeout(v)):m.current.update(d))},[r,l,a.labels,a.datasets,d]),_.useEffect(()=>{m.current&&(x(),setTimeout(v))},[o]),_.useEffect(()=>(v(),()=>x()),[]),Z.createElement("canvas",T({ref:h,role:"img",height:n,width:i},f),c)}const hR=_.forwardRef(fR);function pR(e,t){return Ou.register(t),_.forwardRef((n,i)=>Z.createElement(hR,B(T({},n),{ref:i,type:e})))}const mR=pR("bar",Eu);/*! * 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 rP=function(){if(typeof window!="undefined"){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),ta={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(` `)):Array.isArray(n)?e.push.apply(e,n):se(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var i=[].concat(t),r=i.length,s=e.font,o=0,a;for(e.font=n.string,a=0;an.right&&(i|=oP),tn.bottom&&(i|=aP),i}function yR(e,t){for(var n=e.x0,i=e.y0,r=e.x1,s=e.y1,o=Uu(n,i,t),a=Uu(r,s,t),l,u,c;!(!(o|a)||o&a);)l=o||a,l&lP?(u=n+(r-n)*(t.top-i)/(s-i),c=t.top):l&aP?(u=n+(r-n)*(t.bottom-i)/(s-i),c=t.bottom):l&oP?(c=i+(s-i)*(t.right-n)/(r-n),u=t.right):l&sP&&(c=i+(s-i)*(t.left-n)/(r-n),u=t.left),l===o?(n=u,i=c,o=Uu(n,i,t)):(r=u,s=c,a=Uu(r,s,t));return{x0:n,x1:r,y0:i,y1:s}}function Ku(e,t){var n=t.anchor,i=e,r,s;return t.clamp&&(i=yR(i,t.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),gR(r,s,e.vx,e.vy,t.align)}var Yu={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,i=Math.cos(n),r=Math.sin(n),s=e.innerRadius,o=e.outerRadius;return Ku({x0:e.x+i*s,y0:e.y+r*s,x1:e.x+i*o,y1:e.y+r*o,vx:i,vy:r},t)},point:function(e,t){var n=tm(e,t.origin),i=n.x*e.options.radius,r=n.y*e.options.radius;return Ku({x0:e.x-i,y0:e.y-r,x1:e.x+i,y1:e.y+r,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=tm(e,t.origin),i=e.x,r=e.y,s=0,o=0;return e.horizontal?(i=Math.min(e.x,e.base),s=Math.abs(e.base-e.x)):(r=Math.min(e.y,e.base),o=Math.abs(e.base-e.y)),Ku({x0:i,y0:r+o,x1:i+s,y1:r,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=tm(e,t.origin);return Ku({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},Vn=ta.rasterize;function bR(e){var t=e.borderWidth||0,n=e.padding,i=e.size.height,r=e.size.width,s=-r/2,o=-i/2;return{frame:{x:s-n.left-t,y:o-n.top-t,w:r+n.width+t*2,h:i+n.height+t*2},text:{x:s,y:o,w:r,h:i}}}function xR(e,t){var n=t.chart.getDatasetMeta(t.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 e.horizontal?{x:i,y:null}:{x:null,y:i}}function _R(e){return e instanceof Zo?Yu.arc:e instanceof Vu?Yu.point:e instanceof Jo?Yu.bar:Yu.fallback}function wR(e,t,n,i,r,s){var o=Math.PI/2;if(s){var a=Math.min(s,r/2,i/2),l=t+a,u=n+a,c=t+i-a,d=n+r-a;e.moveTo(t,u),li.x+i.w+n*2||e.y>i.y+i.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),i=[Gu(t[0],t[1]),Gu(t[0],t[3])],r,s,o;for(this._rotation!==e._rotation&&i.push(Gu(n[0],n[1]),Gu(n[0],n[3])),r=0;r=0;--n)for(r=e[n].$layout,i=n-1;i>=0&&r._visible;--i)s=e[i].$layout,s._visible&&r._box.intersects(s._box)&&t(r,s);return e}function MR(e){var t,n,i,r,s,o,a;for(t=0,n=e.length;tl.getProps([u],!0)[u]}),s=i.geometry(),o=fP(a,i.model(),s),r._box.update(o,s,i.rotation()));return $R(e,function(l,u){var c=l._hidable,d=u._hidable;c&&d||d?u._visible=!1:c&&(l._visible=!1)})}var ia={prepare:function(e){var t=[],n,i,r,s,o;for(n=0,r=e.length;n=0;--n)if(i=e[n].$layout,i&&i._visible&&i._box.contains(t))return e[n];return null},draw:function(e,t){var n,i,r,s,o,a;for(n=0,i=t.length;n{const l=()=>{s(window.innerWidth)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[]);const o={labels:e.slice(0,4).map(l=>l.year),datasets:[{label:D.oblroi_resultsTable_human_cost,data:e.slice(0,4).map(l=>l.serviceRepCost),backgroundColor:"#F0F3FC"},{label:D.oblroi_resultsTable_agentforce_investment,data:e.slice(0,4).map(l=>l.cost),backgroundColor:"#4864D2"},{label:D.oblroi_resultsTable_your_savings,data:e.slice(0,4).map(l=>l.savings),backgroundColor:"#C8D4F8"}]},a={indexAxis:"y",plugins:{title:{display:!1,text:"Stacked Bar Chart"},legend:{position:"bottom",labels:{color:"#000000",font:{size:12,family:"Salesforce Sans"}}},tooltip:{enabled:!1},datalabels:{display:!(r<768),color:"#3651C0",anchor:"middle",font:{weight:"bold",size:r<1024?10:16},align:"middle",formatter:(l,u)=>u.dataset.label===D.oblroi_resultsTable_your_savings&&l!==0?new Intl.NumberFormat(i,{style:"currency",currency:n,maximumFractionDigits:0}).format(l):null}},elements:{bar:{borderRadius:0,barPercentage:1}},responsive:!0,maintainAspectRatio:!1,scales:{x:{stacked:!0,grid:{display:!0,drawTicks:!0,color:"#fff",tickColor:"#D9D9D9"},title:{display:!0,text:D.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 y.jsx(mR,{data:o,options:a,"aria-label":t})}var pP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_t=e=>!e||typeof e!="object"||Object.keys(e).length===0,IR=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function mP(e,t){e.forEach(function(n){Array.isArray(n)?mP(n,t):t.push(n)})}function gP(e){let t=[];return mP(e,t),t}var vP=(...e)=>gP(e).filter(Boolean),yP=(e,t)=>{let n={},i=Object.keys(e),r=Object.keys(t);for(let s of i)if(r.includes(s)){let o=e[s],a=t[s];typeof o=="object"&&typeof a=="object"?n[s]=yP(o,a):Array.isArray(o)||Array.isArray(a)?n[s]=vP(a,o):n[s]=a+" "+o}else n[s]=e[s];for(let s of r)i.includes(s)||(n[s]=t[s]);return n},bP=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const im="-",VR=e=>{const t=BR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:o=>{const a=o.split(im);return a[0]===""&&a.length!==1&&a.shift(),xP(a,t)||zR(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&i[o]?[...l,...i[o]]:l}}},xP=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),r=i?xP(e.slice(1),i):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(im);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},_P=/^\[(.+)\]$/,zR=e=>{if(_P.test(e)){const t=_P.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},BR=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return WR(Object.entries(e.classGroups),n).forEach(([s,o])=>{rm(o,i,s,t)}),i},rm=(e,t,n,i)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:wP(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(HR(r)){rm(r(i),t,n,i);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,o])=>{rm(o,wP(t,s),n,i)})})},wP=(e,t)=>{let n=e;return t.split(im).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},HR=e=>e.isThemeGetter,WR=(e,t)=>t?e.map(([n,i])=>{const r=i.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,r]}):e,UR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const r=(s,o)=>{n.set(s,o),t++,t>e&&(t=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)}}},SP="!",KR=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,r=t[0],s=t.length,o=a=>{const l=[];let u=0,c=0,d;for(let x=0;xc?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:o}):o},YR=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},GR=e=>T({cache:UR(e.cacheSize),parseClassName:KR(e)},VR(e)),XR=/\s+/,qR=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=t,s=[],o=e.trim().split(XR);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 m=!!h,v=i(m?f.substring(0,h):f);if(!v){if(!m){a=u+(a.length>0?" "+a:a);continue}if(v=i(f),!v){a=u+(a.length>0?" "+a:a);continue}m=!1}const x=YR(c).join(":"),p=d?x+SP:x,g=p+v;if(s.includes(g))continue;s.push(g);const b=r(v,m);for(let w=0;w0?" "+a:a)}return a};function QR(){let e=0,t,n,i="";for(;e{if(typeof e=="string")return e;let t,n="";for(let i=0;id(c),e());return n=GR(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=qR(l,n);return r(l,c),c}return function(){return s(QR.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kP=/^\[(?:([a-z-]+):)?(.+)\]$/i,ZR=/^\d+\/\d+$/,JR=new Set(["px","full","screen"]),eF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tF=/\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$/,nF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,iF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zn=e=>hs(e)||JR.has(e)||ZR.test(e),Ti=e=>ps(e,"length",fF),hs=e=>!!e&&!Number.isNaN(Number(e)),om=e=>ps(e,"number",hs),ra=e=>!!e&&Number.isInteger(Number(e)),sF=e=>e.endsWith("%")&&hs(e.slice(0,-1)),Q=e=>kP.test(e),Ei=e=>eF.test(e),oF=new Set(["length","size","percentage"]),aF=e=>ps(e,oF,CP),lF=e=>ps(e,"position",CP),uF=new Set(["image","url"]),cF=e=>ps(e,uF,pF),dF=e=>ps(e,"",hF),sa=()=>!0,ps=(e,t,n)=>{const i=kP.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},fF=e=>tF.test(e)&&!nF.test(e),CP=()=>!1,hF=e=>iF.test(e),pF=e=>rF.test(e),am=()=>{const e=ve("colors"),t=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"),m=ve("gradientColorStopPositions"),v=ve("inset"),x=ve("margin"),p=ve("opacity"),g=ve("padding"),b=ve("saturate"),w=ve("scale"),S=ve("sepia"),k=ve("skew"),$=ve("space"),M=ve("translate"),P=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Q,t],C=()=>[Q,t],I=()=>["",zn,Ti],A=()=>["auto",hs,Q],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Q],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[hs,Q];return{cacheSize:500,separator:":",theme:{colors:[sa],spacing:[zn,Ti],blur:["none","",Ei,Q],brightness:j(),borderColor:[e],borderRadius:["none","","full",Ei,Q],borderSpacing:C(),borderWidth:I(),contrast:j(),grayscale:V(),hueRotate:j(),invert:V(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[sF,Ti],inset:F(),margin:F(),opacity:j(),padding:C(),saturate:j(),scale:j(),sepia:V(),skew:j(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Ei]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...L(),Q]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],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",ra,Q]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",ra,Q]}],"grid-cols":[{"grid-cols":[sa]}],"col-start-end":[{col:["auto",{span:["full",ra,Q]},Q]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[sa]}],"row-start-end":[{row:["auto",{span:[ra,Q]},Q]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Ei]},Ei]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ei,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",om]}],"font-family":[{font:[sa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",hs,om]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zn,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zn,Ti]}],"underline-offset":[{"underline-offset":["auto",zn,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],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",Q]}],"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:[...L(),lF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cF]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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:[...R(),"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:R()}],"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:["",...R()]}],"outline-offset":[{"outline-offset":[zn,Q]}],"outline-w":[{outline:[zn,Ti]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[zn,Ti]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ei,dF]}],"shadow-color":[{shadow:[sa]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ei,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"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":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",Q]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[ra,Q]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zn,Ti,om]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mF=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:r,extend:s={},override:o={}})=>{oa(e,"cacheSize",t),oa(e,"prefix",n),oa(e,"separator",i),oa(e,"experimentalParseClassName",r);for(const a in o)gF(e[a],o[a]);for(const a in s)vF(e[a],s[a]);return e},oa=(e,t,n)=>{n!==void 0&&(e[t]=n)},gF=(e,t)=>{if(t)for(const n in t)oa(e,n,t[n])},vF=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},yF=(e,...t)=>typeof e=="function"?sm(am,e,...t):sm(()=>mF(am(),e),...t),bF=sm(am);var xF={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},TP=e=>e||void 0,aa=(...e)=>TP(gP(e).filter(Boolean).join(" ")),lm=null,Bn={},um=!1,la=(...e)=>t=>t.twMerge?((!lm||um)&&(um=!1,lm=_t(Bn)?bF:yF(B(T({},Bn),{extend:T({theme:Bn.theme,classGroups:Bn.classGroups,conflictingClassGroupModifiers:Bn.conflictingClassGroupModifiers,conflictingClassGroups:Bn.conflictingClassGroups},Bn.extend)}))),TP(lm(aa(e)))):aa(e),EP=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=aa(e[n],t[n]):e[n]=t[n];return e},_F=(e,t)=>{let{extend:n=null,slots:i={},variants:r={},compoundVariants:s=[],compoundSlots:o=[],defaultVariants:a={}}=e,l=T(T({},xF),t),u=n!=null&&n.base?aa(n.base,e==null?void 0:e.base):e==null?void 0:e.base,c=n!=null&&n.variants&&!_t(n.variants)?yP(r,n.variants):r,d=n!=null&&n.defaultVariants&&!_t(n.defaultVariants)?T(T({},n.defaultVariants),a):a;!_t(l.twMergeConfig)&&!IR(l.twMergeConfig,Bn)&&(um=!0,Bn=l.twMergeConfig);let f=_t(n==null?void 0:n.slots),h=_t(i)?{}:T({base:aa(e==null?void 0:e.base,f&&(n==null?void 0:n.base))},i),m=f?h:EP(T({},n==null?void 0:n.slots),_t(h)?{base:e==null?void 0:e.base}:h),v=_t(n==null?void 0:n.compoundVariants)?s:vP(n==null?void 0:n.compoundVariants,s),x=g=>{if(_t(c)&&_t(i)&&f)return la(u,g==null?void 0:g.class,g==null?void 0:g.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 b=(C,I,A=[],L)=>{let R=A;if(typeof I=="string")R=R.concat(bP(I).split(" ").map(z=>`${C}:${z}`));else if(Array.isArray(I))R=R.concat(I.reduce((z,N)=>z.concat(`${C}:${N}`),[]));else if(typeof I=="object"&&typeof L=="string"){for(let z in I)if(I.hasOwnProperty(z)&&z===L){let N=I[z];if(N&&typeof N=="string"){let V=bP(N);R[L]?R[L]=R[L].concat(V.split(" ").map(U=>`${C}:${U}`)):R[L]=V.split(" ").map(U=>`${C}:${U}`)}else Array.isArray(N)&&N.length>0&&(R[L]=N.reduce((V,U)=>V.concat(`${C}:${U}`),[]))}}return R},w=(C,I=c,A=null,L=null)=>{var R;let z=I[C];if(!z||_t(z))return null;let N=(R=L==null?void 0:L[C])!=null?R:g==null?void 0:g[C];if(N===null)return null;let V=pP(N),U=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,j=d==null?void 0:d[C],H=[];if(typeof V=="object"&&U)for(let[re,ye]of Object.entries(V)){let lt=z[ye];if(re==="initial"){j=ye;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(re)||(H=b(re,lt,H,A))}let q=V!=null&&typeof V!="object"?V:pP(j),J=z[q||"false"];return typeof H=="object"&&typeof A=="string"&&H[A]?EP(H,J):H.length>0?(H.push(J),H):J},S=()=>c?Object.keys(c).map(C=>w(C,c)):null,k=(C,I)=>{if(!c||typeof c!="object")return null;let A=new Array;for(let L in c){let R=w(L,c,C,I),z=C==="base"&&typeof R=="string"?R:R&&R[C];z&&(A[A.length]=z)}return A},$={};for(let C in g)g[C]!==void 0&&($[C]=g[C]);let M=(C,I)=>{var A;let L=typeof(g==null?void 0:g[C])=="object"?{[C]:(A=g[C])==null?void 0:A.initial}:{};return T(T(T(T({},d),$),L),I)},P=(C=[],I)=>{let A=[];for(let L of C){let R=L,{class:z,className:N}=R,V=te(R,["class","className"]);let U=!0;for(let[j,H]of Object.entries(V)){let q=M(j,I);if(Array.isArray(H)){if(!H.includes(q[j])){U=!1;break}}else if(q[j]!==H){U=!1;break}}U&&(z&&A.push(z),N&&A.push(N))}return A},E=C=>{let I=P(v,C);if(!Array.isArray(I))return I;let A={};for(let L of I)if(typeof L=="string"&&(A.base=la(A.base,L)(l)),typeof L=="object")for(let[R,z]of Object.entries(L))A[R]=la(A[R],z)(l);return A},F=C=>{if(o.length<1)return null;let I={};for(let A of o){let L=A,{slots:R=[],class:z,className:N}=L,V=te(L,["slots","class","className"]);if(!_t(V)){let U=!0;for(let j of Object.keys(V)){let H=M(j,C)[j];if(H===void 0||(Array.isArray(V[j])?!V[j].includes(H):V[j]!==H)){U=!1;break}}if(!U)continue}for(let U of R)I[U]=I[U]||[],I[U].push([z,N])}return I};if(!_t(i)||!f){let C={};if(typeof m=="object"&&!_t(m))for(let I of Object.keys(m))C[I]=A=>{var L,R;return la(m[I],k(I,A),((L=E(A))!=null?L:[])[I],((R=F(A))!=null?R:[])[I],A==null?void 0:A.class,A==null?void 0:A.className)(l)};return C}return la(u,S(),P(v),g==null?void 0:g.class,g==null?void 0:g.className)(l)},p=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return x.variantKeys=p(),x.extend=n,x.base=u,x.slots=m,x.variants=c,x.defaultVariants=d,x.compoundSlots=o,x.compoundVariants=v,x};const wF=_F({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:""}]}),SF=(e,t)=>{const n=e.target;let i=0,r=n.previousElementSibling;for(;r;)i++,r=r.previousElementSibling;const s=vp(),o={event:"custEv_contentClick",blade:{id:s.id,name:"sf/marquee/agentforce",position:s.position,source:"www",variant:"marquee",state:"rendered",type:"blade",module:{id:s.id,name:n.innerText,type:"cta",position:i+1,link:{text:n.innerText,url:n.getAttribute("href"),type:`${t} cta`,internalDriver:""}}}};window.dataLayer&&window.dataLayer.push(T({},o))},ua=({children:e,url:t,target:n,variant:i="primary",size:r="md"})=>y.jsx(y.Fragment,{children:y.jsx(g3,{onPress:s=>{SF(s,i)},href:t,target:n,className:wF({size:r,color:i==="text"?"secondary":i}),children:e})});function PF({currentRegion:e,locale:t,currentCurrency:n,agentforcePrice:i,copySource:r,totalSavings:s,validRegionPaths:o,onRegionChange:a,grandTotal:l}){return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"bg-purple-900 py-2 text-sm font-semibold text-white",children:y.jsxs("div",{className:"mx-auto flex max-w-3xl items-center justify-between gap-2",children:[y.jsxs("span",{children:["Region: ",y.jsx("span",{className:"text-gray-300",children:e})]}),y.jsxs("span",{children:["Locale: ",y.jsx("span",{className:"text-gray-300",children:t})]}),y.jsxs("span",{children:["Currency: ",y.jsx("span",{className:"text-gray-300",children:n})]}),y.jsxs("span",{children:["Agentforce cost: ",y.jsx("span",{className:"text-gray-300",children:i})]}),y.jsxs("span",{children:["Copy source: ",y.jsx("span",{className:"text-gray-300",children:r})]}),y.jsxs("span",{children:["grandTotal ",y.jsx("span",{className:"text-gray-300",children:l})]})]})}),y.jsx("div",{className:"bg-purple-800 py-2 text-sm font-semibold text-white",children:y.jsxs("div",{className:"mx-auto flex max-w-3xl items-center justify-between",children:[y.jsx("span",{children:"region switcher:"}),o.map(u=>y.jsx("button",{onClick:()=>a(u),className:"underline",children:u},u))]})})]})}const kF=Z.createContext(void 0),Dt=({children:e})=>{const[t]=_.useState(new Map),n=Z.useRef(1),i=_.useCallback(r=>(t.has(r)||(t.set(r,n.current),n.current+=1),t.get(r)),[t]);return y.jsx(kF.Provider,{value:{registerItem:i},children:y.jsx("div",{children:e})})},CF=({defaultOpen:e=!1,children:t,onToggle:n})=>{const[i,r]=_.useState(e),s=_.useRef(null),o=()=>{var c;r(d=>{const f=!d;return n&&n(f),f});const a=s.current?Array.from(((c=s.current.parentElement)==null?void 0:c.children)||[]).filter(d=>d.classList.contains("accordion-item")).indexOf(s.current)+1:1,l=vp(),u={event:"custEv_contentClick",blade:{id:l.id,name:"sf/marquee/agentforce-selector",position:l.position,source:"www",variant:"marquee",state:"rendered",type:"blade",module:{id:`accordion-item-${a}`,name:`roi-${a===1?"service":a===2?"coach":"sdr"}-toggle`,type:"toggle",position:a,link:{text:"",url:"",type:"",internalDriver:""}}}};window.dataLayer&&window.dataLayer.push(T({},u))};return y.jsx("div",{ref:s,className:"accordion-item",children:Z.Children.map(t,a=>{if(Z.isValidElement(a)){if(a.type===$P)return Z.cloneElement(a,{isOpen:i,onClick:o});if(a.type===MP)return Z.cloneElement(a,{isOpen:i})}return a})})},$P=({children:e,onClick:t,isOpen:n})=>y.jsx("button",{onClick:t,className:`flex w-full flex-col py-6 ${n?"rounded-t-2xl":"mb-8 rounded-2xl"} border border-neutral-200 bg-white px-8 hover:bg-neutral-50`,children:y.jsxs("div",{className:"flex items-center gap-8",children:[y.jsxs("div",{className:"relative h-6 w-10",children:[y.jsx("div",{className:`absolute left-0 top-0 h-6 w-10 rounded-full ${n?"bg-sky-600":"bg-neutral-400"}`}),y.jsx("div",{className:`absolute top-[2px] h-5 w-5 rounded-full bg-white ${n?"left-[18px]":"left-[2px]"}`})]}),y.jsx("div",{className:"w-full",children:e})]})}),MP=({children:e,isOpen:t})=>y.jsx(hT,{children:t?y.jsx(Zi.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1,transition:{duration:.3}},exit:{height:0,opacity:0},className:"mb-8 flex w-full flex-col items-start justify-start gap-4 rounded-b-2xl border border-t-0 border-neutral-200 bg-neutral-200/25 p-2 shadow lg:flex-row md:gap-8 md:p-8",children:e}):null});Dt.Item=CF,Dt.Header=$P,Dt.Panel=MP;const DP={1:"1-service",2:"2-sales",3:"3-sdr"},TF=({setCurrentStep:e,setEnabledWizard:t,currentStep:n,nextCopy:i,backCopy:r,resultsCopy:s,skipCopy:o})=>{const a=DP[n],l=(u,c)=>{const d={event:"custEv_contentClick",blade:{name:"sf/marquee/agentforce-roi-wizard",position:"",module:{name:a,link:{url:"",text:c,elementType:"text"}}}};console.log("eventDetails",d),window.dataLayer&&window.dataLayer.push(T({},d))};return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"mt-8",children:n<3?y.jsx("button",{onClick:()=>e(u=>u+1),className:"flex min-h-[52px] w-full items-center justify-center rounded bg-sfprimary px-8 py-3 text-center font-sans font-bold tracking-tight text-white hover:bg-sfnavy",children:i}):y.jsx("button",{onClick:()=>t(!1),className:"flex min-h-[52px] w-full items-center justify-center rounded bg-sfprimary px-8 py-3 text-center font-sans font-bold tracking-tight text-white hover:bg-sfnavy",children:s})}),y.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[n>1?y.jsx("button",{onClick:()=>{e(u=>u-1),l("back","Back")},className:"font-bold text-sfprimary underline hover:text-sfnavy hover:no-underline",children:r}):null,y.jsx("button",{onClick:()=>{t(!1),l("skip","Skip Survey")},className:"ml-auto font-bold text-sfprimary underline hover:text-sfnavy hover:no-underline",children:o})]})]})},cm=({enabledCalc:e,calcName:t,handleAnswer:n,currentStep:i,stepCopy:r,selectAgentsCopy:s,completeSurveyCopy:o,agentTypeCoach:a,questionCopy:l,questionYesCopy:u,questionYesDetailCopy:c,questionNoCopy:d,questionNoDetailCopy:f})=>{const h=DP[i],m=v=>{const x={event:"custEv_contentClick",blade:{name:"sf/marquee/agentforce-initial-questions",position:"",module:{name:v,link:{url:"",text:v,elementType:"button"}}}};console.log("eventDetails",x),window.dataLayer&&window.dataLayer.push(T({},x))};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"text-center text-sm",children:[r," ",i," of 3"]}),y.jsx("h2",{className:"mb-0 text-center text-xl text-sky-950",children:s}),i===1?y.jsx("p",{className:"text-center",children:o}):null,y.jsx("div",{className:"flex justify-center",children:y.jsx(Zi.span,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},className:"inline-flex items-center rounded-full bg-[#F0F3FC] px-3 py-1 text-sm text-sky-950",children:y.jsx("strong",{children:a})})}),y.jsx(Zi.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},className:"mx-auto mb-8 w-full text-center text-xl sm:w-8/12",children:l}),y.jsxs("button",{onClick:()=>{n(t,!0),m(`${h}-yes`)},className:`flex items-center justify-between gap-4 rounded-lg px-6 py-5 shadow-md transition-all ${e?"ring-2 ring-[#0176D3] hover:ring-2 hover:ring-sky-950":"ring-1 ring-[#e6e6e6] hover:bg-[#EAF5FE] hover:ring-1 hover:ring-[#0176D3] focus:bg-[#EAF5FE] focus:ring-[#0176D3] focus:ring-offset-4"}`,"aria-description":u+" - "+c,children:[y.jsx("div",{className:"flex flex-col",children:y.jsx("p",{className:"text-left text-lg",children:y.jsx("strong",{children:u})})}),y.jsx("div",{children:e?y.jsx("div",{className:"h-3 w-3 rounded-full bg-[#0176D3] ring-1 ring-[#0176D3] ring-offset-4"}):y.jsx("div",{className:"h-3 w-3 rounded-full bg-white ring-1 ring-[#747474] ring-offset-4"})})]}),y.jsxs("button",{onClick:()=>{n(t,!1),m(`${h}-no`)},className:`flex items-center justify-between gap-4 rounded-lg px-6 py-5 shadow-md transition-all ${e?"ring-1 ring-[#e6e6e6] hover:bg-[#EAF5FE] hover:ring-1 hover:ring-[#0176D3] focus:bg-[#EAF5FE] focus:ring-[#0176D3] focus:ring-offset-4":"ring-2 ring-[#0176D3] hover:ring-2 hover:ring-sky-950"}`,"aria-description":d+" - "+f,children:[y.jsx("div",{className:"flex flex-col",children:y.jsx("p",{className:"text-left text-lg",children:y.jsx("strong",{children:d})})}),y.jsx("div",{children:e?y.jsx("div",{className:"h-3 w-3 rounded-full bg-white ring-1 ring-[#747474] ring-offset-4"}):y.jsx("div",{className:"h-3 w-3 rounded-full bg-[#0176D3] ring-1 ring-[#0176D3] ring-offset-4"})})]})]})};function AP(e,t,n){var c;const i=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).format(e<0?0:e),o=((c=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(e).find(d=>d.type==="currency"))==null?void 0:c.value)||"",l=new Intl.NumberFormat(t,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e<0?0:e);return{formattedNumber:i,symbol:n==="AUD"?"AU$":o,number:l}}const de=({value:e,locale:t="en-US",currency:n="USD"})=>{const{symbol:i,number:r}=AP(e,t,n);return`${i}${r}`},EF=({value:e,locale:t="en-US",currency:n="USD"})=>{const{symbol:i,number:r}=AP(e,t,n);return y.jsxs("span",{className:"flex items-start justify-center text-center",children:[y.jsx("span",{className:"flex-start items-start text-display-5 sm:text-display-3 mr-2",children:i}),y.jsx("span",{children:r})]})},$F=({value:e,currency:t,locale:n,totalCopy:i,withAgentforceCopy:r,inactiveCopy:s,salesCoachCopy:o,sdrCopy:a,serviceCopy:l,salesCoachResults:u,sdrResults:c,serviceResults:d,enabledCalcs:f})=>{const[h,m]=_.useState(!0),[v,x]=_.useState(window.innerWidth),[p,g]=_.useState(0),[b,w]=_.useState(73),[S,k]=_.useState(56),{scrollY:$}=Ox();Ex($,"change",E=>{const F=$.getPrevious(),C=$.getVelocity(),I=230;F!==void 0&&FE&&p850&&p850?m(!1):m(!0)});const M=()=>{x(window.innerWidth)};_.useEffect(()=>{typeof window!="undefined"&&window.addEventListener("resize",M,!1)},[]);const P={background:"linear-gradient(90deg, #0529C1 0%, #B302FC 100%)",backgroundImage:` url('https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/12/bg-mointain-sticky-left_9e6e57.png'), url('https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/12/bg-mointain-sticky-right_82471e.png'), linear-gradient(90deg, #0529C1 0%, #B302FC 100%) `,backgroundPosition:"left -15px top, right top 15px, 0 0",backgroundSize:"250px auto, 320px auto, cover",backgroundRepeat:"no-repeat, no-repeat, no-repeat",zIndex:999};return y.jsxs(Zi.div,{variants:{visible:{y:v>1280?b:S},hidden:{y:"-100%"}},initial:"hidden",animate:h?"hidden":"visible",style:P,transition:{duration:.3,ease:[.45,.14,.1,.97]},className:"fixed top-0 flex max-h-[92px] min-h-[60px] w-full items-stretch justify-center gap-2 p-2 text-white shadow-2xl sm:min-h-[92px]",children:[y.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:gap-2",children:[y.jsx("div",{className:"text-md inline-flex items-center justify-center font-display",children:i}),y.jsx("div",{className:"inline-flex min-w-[150px] items-center justify-center font-display text-3xl",children:y.jsx(de,{value:e,currency:t,locale:n})})]}),y.jsx("div",{className:"visible inline-flex items-center justify-center pl-2 text-sm max-sm:hidden",children:r}),y.jsxs("div",{className:"flew-row flex gap-3",children:[y.jsx("div",{className:"visible inline-flex items-center justify-center gap-2 rounded-lg ring-inset max-sm:hidden",children:y.jsxs("div",{className:"flex flex-col items-center justify-start gap-1",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${f.serviceAgent?"bg-white text-[#753ADE]":"bg-white/10"}`,children:l}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight",children:f.serviceAgent?y.jsx(de,{value:d,currency:t,locale:n}):s})]})}),y.jsx("div",{className:"text-md visible inline-flex items-center justify-center font-display max-sm:hidden",children:"+"}),y.jsx("div",{className:"visible inline-flex items-center justify-center gap-2 rounded-lg max-sm:hidden md:min-h-16",children:y.jsxs("div",{className:"flex flex-col items-center justify-start gap-1",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${f.salesCoach?"bg-white text-[#753ADE]":"bg-white/10"}`,children:o}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight",children:f.salesCoach?y.jsx(de,{value:u,currency:t,locale:n}):s})]})}),y.jsx("div",{className:"text-md visible inline-flex items-center justify-center font-display max-sm:hidden",children:"+"}),y.jsx("div",{className:"visible inline-flex items-center justify-center gap-2 max-sm:hidden",children:y.jsxs("div",{className:"flex flex-col items-center justify-start gap-1",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${f.sdrAgent?"bg-white text-[#753ADE]":"bg-white/10"}`,children:a}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight",children:f.sdrAgent?y.jsx(de,{value:c,currency:t,locale:n}):s})]})})]})]})},Xu=({text1:e,text2:t,text3:n})=>y.jsxs("p",{className:"my-8 font-sans text-xs font-normal leading-[18px] tracking-tight text-black",children:[e,t&&y.jsxs(y.Fragment,{children:[y.jsx("br",{}),y.jsx("br",{}),t]}),n&&y.jsxs(y.Fragment,{children:[y.jsx("br",{}),y.jsx("br",{}),n]})]}),dm=({headline:e,item1:t,item2:n,item3:i})=>y.jsxs("div",{className:"flex w-full flex-col gap-6 pl-4",children:[y.jsx("h3",{className:"font-display text-xl font-semibold leading-7 text-sky-950",children:e}),y.jsxs("ul",{className:"ml-8 list-disc font-sans text-lg font-normal leading-7 tracking-tight text-neutral-900",children:[y.jsx("li",{children:t}),n&&y.jsx("li",{children:n}),i&&y.jsx("li",{children:i})]})]}),MF=({salesCoachResults:e,sdrResults:t,serviceResults:n,enabledCalculators:i,grandTotal:r,currency:s,locale:o})=>y.jsxs("div",{className:"bg-white h-[100vh] w-[100vw]",children:[y.jsx("h1",{children:"PDF Report"}),i.serviceAgent&&y.jsxs("div",{children:[y.jsx("h2",{children:"Service Agent Results"}),y.jsxs("p",{children:["Total Savings:"," ",y.jsx(de,{value:n.totalSavings,currency:s,locale:o})]})]}),i.salesCoach&&y.jsxs("div",{children:[y.jsx("h2",{children:"Sales Coach Results"}),y.jsxs("p",{children:["Three Year Net Benefit:"," ",y.jsx(de,{value:e.threeYearNetBenefit,currency:s,locale:o})]})]}),i.sdrAgent&&y.jsxs("div",{children:[y.jsx("h2",{children:"SDR Results"}),y.jsxs("p",{children:["Three Year Net Benefit:"," ",y.jsx(de,{value:t.threeYearNetBenefit,currency:s,locale:o})]})]}),y.jsxs("h2",{children:["Grand Total:"," ",y.jsx(de,{value:r,currency:s,locale:o})]}),y.jsxs("h2",{children:["Currency: ",s]}),y.jsxs("h2",{children:["Locale: ",o]})]}),DF=({eyebrow:e,header:t,headerBottom:n})=>y.jsxs("section",{className:"max-w-[1280px] text-center md:max-w-[540px] lg:max-w-[768px]",children:[y.jsxs("h1",{className:"text-4xl text-sky-950 lg:text-5xl",children:[y.jsx("span",{className:"text-indigo-700",children:e}),y.jsx("br",{}),t]}),y.jsx("h2",{className:"mb-10 text-xl text-sky-950 md:mb-16 lg:text-2xl",children:n})]}),AF=()=>y.jsxs("div",{className:"relative mx-auto h-[200px] w-full sm:h-[300px]",style:{backgroundImage:` url('https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/12/bg-mointain-sticky-left_9e6e57.png'), url('https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/12/bg-mointain-sticky-right_82471e.png') `,backgroundPosition:"left -45px top, right top 45px, 0 0",backgroundRepeat:"no-repeat, no-repeat, no-repeat"},children:[y.jsx("div",{className:"masked-contour absolute inset-x-0 bottom-0 z-0 mx-auto -mb-[2px] w-full",children:y.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/contour.svg",alt:"",className:"w-full"})}),y.jsx("div",{className:"data-dust-left absolute left-0 top-[-50px] z-10 sm:top-[-450px]",children:y.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]"})}),y.jsx("div",{className:"data-dust-right visible absolute right-0 top-[-80px] z-10 max-lg:hidden",children:y.jsx("img",{src:"https://wp.sfdcdigital.com/en-us/wp-content/uploads/sites/4/2024/10/DataDust-2.svg",alt:""})}),y.jsx("div",{className:"astro-agentforce absolute bottom-[-20px] right-0 z-20 sm:right-[10%]",children:y.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]"})}),y.jsx("div",{className:"einstein-agentforce absolute bottom-[-40px] left-[13%] z-20",children:y.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]"})}),y.jsx("div",{className:"appy-agentforce absolute bottom-[-20px] left-[3%] z-20",children:y.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]"})})]}),LF=({children:e})=>y.jsxs("div",{className:"bg-agentforce-light",children:[y.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center px-4 pb-10 pt-10 md:pt-16",children:e}),y.jsx(AF,{})]}),RF=({children:e})=>y.jsx("section",{className:"container z-20 mx-auto mb-8 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:y.jsxs("div",{className:"relative flex w-full flex-col self-start overflow-hidden rounded-2xl bg-white p-6 pt-8 shadow-lg md:p-8 xl:flex-1 ",children:[y.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%)"}}),e]})}),FF=(e,t)=>{var i,r;const n=document.querySelector('[data-component="table"]');n&&(n.querySelectorAll("tbody tr").forEach(o=>{var l,u;const a=o.querySelectorAll("td");if(a.length===2){const c=(l=a[0].textContent)==null?void 0:l.trim(),d=(u=a[1].textContent)==null?void 0:u.trim();c&&d&&e.hasOwnProperty(c)&&(e[c]=d)}}),t("Table")),n&&new URLSearchParams(window.location.search).get("showTable")!=="true"&&((i=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||i.remove(),(r=document.querySelector('[data-blade-name="sf/simpletable"]'))==null||r.remove())},qu={ap:"USD",au:"AUD",in:"USD",ca:"USD",eu:"EUR",uk:"GBP",de:"EUR",fr:"EUR",jp:"JPY",br:"USD",es:"EUR",it:"EUR",nl:"EUR",mx:"USD",kr:"USD",se:"SEK",th:"USD",tw:"USD","fr-ca":"USD",us:"USD"},Hn={USD:2,AUD:2.8,EUR:2,GBP:1.6,JPY:240,SEK:20},Qu={in:"en-IN",au:"en-AU",ca:"en-CA",uk:"en-GB",se:"sv-SE",th:"th-TH",kr:"ko-KR",tw:"zh-TW",de:"de-DE",fr:"fr-FR",jp:"ja-JP",it:"it-IT",es:"es-ES",nl:"nl-NL",mx:"es-MX","fr-ca":"fr-CA"},LP=Object.keys(Qu);function fm(e){const t=qu[e],n=Hn[t],i=Qu[e];return{currentCurrency:t,agentforcePrice:n,locale:i}}function NF(e){const{serviceEmployees:t,costPerEmployee:n,conversationsPerDay:i,serviceAgentCases:r,currentRegion:s}=e,o=fm(s),a=t*n,l=i*t*260,c=75*t*12,d=r,f=r-r*.3,h=f-f*.3,m=l*o.agentforcePrice*(h/100),v=l*o.agentforcePrice*(f/100),x=l*o.agentforcePrice*(d/100),p=m+v+x,g=a*3,b=a*(1-h/100),w=a*(1-f/100),S=a*(1-d/100),k=b+w+S,$=(a+c)*(1-h/100),M=(a+c)*(1-f/100),P=(a+c)*(1-d/100),E=$+M+P,F=Math.max(a+c-$-m,0),C=Math.max(a+c-M-v,0),I=Math.max(a+c-P-x,0),A=F+C+I,L=A/g*100;return{totalHumanCost:a,totalAnnualConversations:l,totalLicenseCost:c,costYear1:m,costYear2:v,costYear3:x,costTotal:p,costTotalAsIs:g,humanCostSavingsTotal:k,serviceRepCostTotal:E,totalSavings:A,totalSavingsPercentage:L,yearOne:h,yearTwo:f,yearThree:d,conversationsYear1:l*(h/100),conversationsYear2:l*(f/100),conversationsYear3:l*(d/100),humanCostSavingsYear1:b,humanCostSavingsYear2:w,humanCostSavingsYear3:S,serviceRepCostYear1:$,serviceRepCostYear2:M,serviceRepCostYear3:P,netSavingsYear1:F,netSavingsYear2:C,netSavingsYear3:I,currentCurrency:o.currentCurrency,locale:o.locale}}const jF=40,OF=50,IF=.25;function VF(e){const t=jF,n=OF,i=IF,r=fm(e.currentRegion),s={yearThree:e.yearThreeTargetPercentage,yearTwo:e.yearThreeTargetPercentage*.7};function o(x){const p=t*e.timeSpentOnLeadProspecting*i,g=e.numberOfSalesReps*n*p,b=g/(t*n),w=b*e.averageSalesRepSalary,S=e.numberOfSalesReps*n*e.leadsPerRepPerWeek,k=e.unengagedLeadsPerYear*x,$=k*e.leadConversionRate*e.averageDealSize*e.opportunityCloseRate*e.grossMargin,M=S+k,P=M*r.agentforcePrice,E=w+$,F=E-P;return{productivityImprovement:i,hoursSavedPerRepWeek:p,totalHoursSavedAnnually:g,fullTimeEquivalentSavings:b,productivityBenefits:w,totalLeadsTouchedByDigitalSdr:S,percentLeadsProspected:x,increasedLeadsFromProspecting:k,benefitsFromQualifiedLeads:$,totalLeadsProcessed:M,totalAgentforceCosts:P,totalAgentforceBenefits:E,netBenefit:F}}const a=o(s.yearTwo*.4),l=o(s.yearTwo),u=o(s.yearThree),c=Math.max(a.productivityBenefits+a.benefitsFromQualifiedLeads+l.productivityBenefits+l.benefitsFromQualifiedLeads+u.productivityBenefits+u.benefitsFromQualifiedLeads,0),d=a.totalAgentforceCosts+l.totalAgentforceCosts+u.totalAgentforceCosts,f=Math.max((c-d)/d,0),h=Math.max(c-d,0),m=[{year:"Year 1",netBenefit:Math.max(a.netBenefit,0),productivityBenefits:a.productivityBenefits,benefitsFromQualifiedLeads:a.benefitsFromQualifiedLeads,totalAgentforceCosts:a.totalAgentforceCosts,totalAgentforceBenefits:a.totalAgentforceBenefits},{year:"Year 2",netBenefit:Math.max(l.netBenefit,0),productivityBenefits:l.productivityBenefits,benefitsFromQualifiedLeads:l.benefitsFromQualifiedLeads,totalAgentforceCosts:l.totalAgentforceCosts,totalAgentforceBenefits:l.totalAgentforceBenefits},{year:"Year 3",netBenefit:Math.max(u.netBenefit,0),productivityBenefits:u.productivityBenefits,benefitsFromQualifiedLeads:u.benefitsFromQualifiedLeads,totalAgentforceCosts:u.totalAgentforceCosts,totalAgentforceBenefits:u.totalAgentforceBenefits}],v=`[[${m[0].year},${m[0].productivityBenefits},${m[0].totalAgentforceCosts},${m[0].netBenefit}], [${m[1].year},${m[1].productivityBenefits},${m[1].totalAgentforceCosts},${m[1].netBenefit}], [${m[2].year},${m[2].productivityBenefits},${m[2].totalAgentforceCosts},${m[2].netBenefit}], ["Total",${c},${d},${h}]]`;return{threeYearTotalBenefits:c,threeYearTotalCosts:d,threeYearROI:f,threeYearNetBenefit:h,tableData:m,yearOne:a,yearTwo:l,yearThree:u,locale:r.locale,currentCurrency:r.currentCurrency,threeYearProductivityBenefits:a.productivityBenefits+l.productivityBenefits+u.productivityBenefits,threeYearBenefitsFromQualifiedLeads:a.benefitsFromQualifiedLeads+l.benefitsFromQualifiedLeads+u.benefitsFromQualifiedLeads,tableDataString:v}}const RP="agentforce_roi_state";function zF(e){try{localStorage.setItem(RP,JSON.stringify(e))}catch(t){console.error("Error saving state to localStorage:",t)}}function BF(){try{const e=localStorage.getItem(RP);return e?JSON.parse(e):null}catch(e){return console.error("Error loading state from localStorage:",e),null}}function HF(e){const i=fm(e.currentRegion),r=e.yearThreeProductivityTarget/100,s={yearOne:r*.5,yearTwo:r*.7,yearThree:r};function o(x){const p=40*e.timeSpentOnCoaching*x,g=e.numberOfSalesManagers*50*p,b=Math.ceil(g/(40*50)),w=b*e.averageSalesManagerSalary,S=e.numberOfSalesManagers*e.coachingConversationsPerWeek*50,k=S*i.agentforcePrice;return{productivityImprovement:x,hoursSavedPerManagerWeek:p,totalHoursSavedAnnually:g,fullTimeEquivalentSavings:b,productivityBenefits:w,totalAgentforceConversations:S,totalAgentforceInvestment:k}}const a=o(s.yearOne),l=o(s.yearTwo),u=o(s.yearThree),c=Math.max(0,a.productivityBenefits+l.productivityBenefits+u.productivityBenefits),d=Math.max(0,a.totalAgentforceInvestment+l.totalAgentforceInvestment+u.totalAgentforceInvestment),f=Math.max(0,(c-d)/d),h=Math.max(0,c-d),m=[{year:"Year 1",productivityBenefits:a.productivityBenefits,totalAgentforceInvestment:a.totalAgentforceInvestment,netBenefit:Math.max(0,a.productivityBenefits-a.totalAgentforceInvestment)},{year:"Year 2",productivityBenefits:l.productivityBenefits,totalAgentforceInvestment:l.totalAgentforceInvestment,netBenefit:Math.max(0,l.productivityBenefits-l.totalAgentforceInvestment)},{year:"Year 3",productivityBenefits:u.productivityBenefits,totalAgentforceInvestment:u.totalAgentforceInvestment,netBenefit:Math.max(0,u.productivityBenefits-u.totalAgentforceInvestment)}],v=`[[${m[0].year},${m[0].productivityBenefits},${m[0].totalAgentforceInvestment},${m[0].netBenefit}], [${m[1].year},${m[1].productivityBenefits},${m[1].totalAgentforceInvestment},${m[1].netBenefit}], [${m[2].year},${m[2].productivityBenefits},${m[2].totalAgentforceInvestment},${m[2].netBenefit}], ["Total",${c},${d},${h}]]`;return{tableData:m,threeYearTotalBenefits:c,threeYearTotalInvestment:d,threeYearNetBenefit:h,threeYearROI:f,yearOne:a,yearTwo:l,yearThree:u,locale:i.locale,currentCurrency:i.currentCurrency,tableDataString:v}}function WF({appDebug:e,appPhaseTwo:t,appReport:n}){const[i,r]=_.useState("us"),[s,o]=_.useState("USD"),[a,l]=_.useState(2),[u,c]=_.useState("JSON"),[d,f]=_.useState(""),[h,m]=_.useState("en-US"),[v,x]=_.useState(()=>new URLSearchParams(window.location.search)),[p,g]=_.useState(()=>Number(v.get("serviceEmployees"))||20),[b,w]=_.useState(()=>Number(v.get("costPerEmployee"))||5e4),[S,k]=_.useState(()=>Number(v.get("conversationsPerDay"))||20),[$,M]=_.useState(()=>Number(v.get("serviceAgentCases"))||50),[P,E]=_.useState(()=>Number(v.get("numberOfSalesManagers"))||40),[F,C]=_.useState(()=>Number(v.get("timeSpentOnCoaching"))||.4),[I,A]=_.useState(()=>Number(v.get("averageSalesManagerSalary"))||1e5),[L,R]=_.useState(()=>Number(v.get("coachingConversationsPerWeek"))||40),[z,N]=_.useState(()=>Number(v.get("yearThreeProductivityTarget"))||30),[V,U]=_.useState(()=>Number(v.get("numberOfSalesReps"))||200),[j,H]=_.useState(()=>Number(v.get("timeSpentOnLeadProspecting"))||.3),[q,J]=_.useState(()=>Number(v.get("averageSalesRepSalary"))||5e4),[re,ye]=_.useState(()=>Number(v.get("leadsPerRepPerWeek"))||20),[lt,fr]=_.useState(()=>Number(v.get("unengagedLeadsPerYear"))||2e5),[Wn,ms]=_.useState(()=>Number(v.get("leadConversionRate"))||.2),[hr,ca]=_.useState(()=>Number(v.get("averageDealSize"))||1e3),[bn,Ju]=_.useState(()=>Number(v.get("opportunityCloseRate"))||.1),[gs,da]=_.useState(()=>Number(v.get("grossMargin"))||.2),[pr,ec]=_.useState(()=>Number(v.get("yearThreeTargetPercentage"))||.8),[fe,fa]=_.useState({serviceAgent:!0,salesCoach:!0,sdrAgent:!0}),[Mi,tc]=_.useState(0),[vs,ha]=_.useState(!0),[Gt,ys]=_.useState(1);_.useEffect(()=>{const O=BF();O&&(g(O.serviceAgent.serviceEmployees),w(O.serviceAgent.costPerEmployee),k(O.serviceAgent.conversationsPerDay),M(O.serviceAgent.serviceAgentCases),E(O.salesCoach.numberOfSalesManagers),C(O.salesCoach.timeSpentOnCoaching),A(O.salesCoach.averageSalesManagerSalary),R(O.salesCoach.coachingConversationsPerWeek),N(O.salesCoach.yearThreeProductivityTarget),U(O.sdr.numberOfSalesReps),H(O.sdr.timeSpentOnLeadProspecting),J(O.sdr.averageSalesRepSalary),ye(O.sdr.leadsPerRepPerWeek),fr(O.sdr.unengagedLeadsPerYear),ms(O.sdr.leadConversionRate),ca(O.sdr.averageDealSize),Ju(O.sdr.opportunityCloseRate),da(O.sdr.grossMargin),ec(O.sdr.yearThreeTargetPercentage),fa(O.enabledCalculators),ys(O.currentStep),ha(!O.wizardComplete),tc(O.grandTotal))},[]),_.useEffect(()=>{zF({serviceAgent:{serviceEmployees:p,costPerEmployee:b,conversationsPerDay:S,serviceAgentCases:$,currentRegion:i},salesCoach:{numberOfSalesManagers:P,timeSpentOnCoaching:F,averageSalesManagerSalary:I,coachingConversationsPerWeek:L,yearThreeProductivityTarget:z,currentRegion:i},sdr:{numberOfSalesReps:V,timeSpentOnLeadProspecting:j,averageSalesRepSalary:q,leadsPerRepPerWeek:re,unengagedLeadsPerYear:lt,leadConversionRate:Wn,averageDealSize:hr,opportunityCloseRate:bn,grossMargin:gs,yearThreeTargetPercentage:pr,currentRegion:i},enabledCalculators:fe,currentStep:Gt,wizardComplete:!vs,currentRegion:i,locale:h,grandTotal:Mi})},[p,b,S,$,P,F,I,L,z,V,j,q,re,lt,Wn,hr,bn,gs,pr,fe,Gt,vs,i,h,Mi]);const wt=(O,bs)=>{fa(UF=>B(T({},UF),{[O]:bs}))};_.useEffect(()=>{FF(D,c)},[]);const pa=O=>{r(O),m(Qu[O]),o(qu[O]);const bs=qu[O];l(Hn[bs]),w(25e3*Hn[bs]),A(5e4*Hn[bs]),J(5e4*Hn[bs])};_.useEffect(()=>{const O=window.location.pathname.split("/")[1];(O.length===2&&LP.includes(O)||O==="fr-ca")&&(f(O),pa(O))},[]),_.useEffect(()=>{if(h!=="en-US"&&i){const O=qu[i];m(Qu[i]),o(O),l(Hn[O]),w(25e3*Hn[O]),A(5e4*Hn[O]),J(5e4*Hn[O])}},[i]);const oe=NF({serviceEmployees:p,costPerEmployee:b,conversationsPerDay:S,serviceAgentCases:$,currentRegion:i}),At=HF({numberOfSalesManagers:P,timeSpentOnCoaching:F,averageSalesManagerSalary:I,coachingConversationsPerWeek:L,yearThreeProductivityTarget:z,currentRegion:i}),ut=VF({numberOfSalesReps:V,timeSpentOnLeadProspecting:j,averageSalesRepSalary:q,leadsPerRepPerWeek:re,unengagedLeadsPerYear:lt,leadConversionRate:Wn,averageDealSize:hr,opportunityCloseRate:bn,grossMargin:gs,yearThreeTargetPercentage:pr,currentRegion:i});_.useEffect(()=>{const O=(fe.serviceAgent?oe.totalSavings:0)+(fe.salesCoach?At.threeYearNetBenefit:0)+(fe.sdrAgent?ut.threeYearNetBenefit:0);tc(O)},[oe,At,ut,fe]);const mr=[{year:D.oblroi_chart_year_0,serviceRepCost:Math.max(0,oe.totalHumanCost),cost:0,savings:0},{year:D.oblroi_chart_year_1,serviceRepCost:Math.max(0,oe.serviceRepCostYear1),cost:Math.max(0,oe.costYear1),savings:Math.max(0,oe.netSavingsYear1)},{year:D.oblroi_chart_year_2,serviceRepCost:Math.max(0,oe.serviceRepCostYear2),cost:Math.max(0,oe.costYear2),savings:Math.max(0,oe.netSavingsYear2)},{year:D.oblroi_chart_year_3,serviceRepCost:Math.max(0,oe.serviceRepCostYear3),cost:Math.max(0,oe.costYear3),savings:Math.max(0,oe.netSavingsYear3)},{year:D.oblroi_chart_total,serviceRepCost:Math.max(0,oe.serviceRepCostTotal),cost:Math.max(0,oe.costTotal),savings:Math.max(0,oe.totalSavings)}],ct=`${D.oblroi_service_agent_handling} ${Math.round($)}${D.oblroi_conversations} $${Math.round(oe.totalSavings)} ${D.oblroi_over_years}`,ma=`${D.oblroi_chart_intro} $${Math.round(oe.serviceRepCostYear1)} ${D.oblroi_chart_human_cost}, $${Math.round(oe.costYear1)} ${D.oblroi_chart_agentforce_cost} $${Math.round(oe.netSavingsYear1)} ${D.oblroi_chart_net_savings} ${D.oblroi_chart_year_1} $${Math.round(oe.serviceRepCostYear2)} ${D.oblroi_chart_human_cost}, $${Math.round(oe.costYear2)} ${D.oblroi_chart_agentforce_cost} $${Math.round(oe.netSavingsYear2)} ${D.oblroi_chart_net_savings} ${D.oblroi_chart_in} ${D.oblroi_chart_year_2} . $${Math.round(oe.serviceRepCostYear3)} ${D.oblroi_chart_human_cost}, $${Math.round(oe.costYear3)} ${D.oblroi_chart_agentforce_cost} $${Math.round(oe.netSavingsYear3)} ${D.oblroi_chart_net_savings} ${D.oblroi_chart_in} ${D.oblroi_chart_year_3} .`,Oe={service:{serviceEmployees:"service-service-employees",costPerEmployee:"service-cost-per-employee",conversationsPerDay:"service-conversations-per-day",serviceAgentCases:"service-automation-percent"},coach:{numberOfSalesManagers:"coach-manager-count",timeSpentOnCoaching:"coach-time-spent",yearThreeProductivityTarget:"coach-productivity-target",averageSalesManagerSalary:"coach-manager-salary",coachingConversationsPerWeek:"coach-weekly-conversations"},sdr:{numberOfSalesReps:"sdr-rep-count",timeSpentOnLeadProspecting:"sdr-prospecting-time",averageSalesRepSalary:"sdr-rep-salary",leadsPerRepPerWeek:"sdr-weekly-leads",unengagedLeadsPerYear:"sdr-unengaged-leads",leadConversionRate:"sdr-conversion-rate",averageDealSize:"sdr-deal-size",opportunityCloseRate:"sdr-close-rate",grossMargin:"sdr-margin",yearThreeTargetPercentage:"sdr-year3-target"}};return n?y.jsx(MF,{salesCoachResults:At,sdrResults:ut,serviceResults:oe,enabledCalculators:fe,grandTotal:Mi,currency:s,locale:h}):y.jsxs(y.Fragment,{children:[(e||new URLSearchParams(window.location.search).get("debug")==="true")&&y.jsx(PF,{currentRegion:i,locale:h,currentCurrency:s,agentforcePrice:a,copySource:u,totalSavings:oe.totalSavings,validRegionPaths:LP,onRegionChange:pa,grandTotal:Mi}),y.jsxs(LF,{children:[y.jsx(DF,{eyebrow:D.oblroi_headerEyebrow,header:D.oblroi_header,headerBottom:D.oblroi_headerBottom}),vs?y.jsx("section",{className:"z-20 mx-auto mb-8 flex w-full max-w-[1280px] flex-col gap-8 p-0 sm:w-1/2 md:max-w-[540px] md:flex-col lg:max-w-[768px] xl:max-w-[1280px] 2xl:max-w-[1440px]",children:y.jsxs("div",{className:"relative flex w-full flex-col gap-3 self-start overflow-hidden rounded-2xl bg-white p-6 pt-12 shadow-lg sm:px-10 xl:flex-1",children:[y.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%)"}}),Gt===1?y.jsx(cm,{enabledCalc:fe.serviceAgent,calcName:"serviceAgent",handleAnswer:wt,currentStep:Gt,stepCopy:D.oblroi_wizard_step,selectAgentsCopy:D.oblroi_wizard_select_agents,completeSurveyCopy:D.oblroi_wizard_complete_survey,agentTypeCoach:D.oblroi_agent_type_service,questionCopy:D.oblroi_wizard_question_3,questionYesCopy:D.oblroi_wizard_question_yes,questionNoCopy:D.oblroi_wizard_question_no}):null,Gt===2?y.jsx(cm,{enabledCalc:fe.salesCoach,calcName:"salesCoach",handleAnswer:wt,currentStep:Gt,stepCopy:D.oblroi_wizard_step,selectAgentsCopy:D.oblroi_wizard_select_agents,completeSurveyCopy:D.oblroi_wizard_complete_survey,agentTypeCoach:D.oblroi_agent_type_coach,questionCopy:D.oblroi_wizard_question_1,questionYesCopy:D.oblroi_wizard_question_yes,questionNoCopy:D.oblroi_wizard_question_no}):null,Gt===3?y.jsx(cm,{enabledCalc:fe.sdrAgent,calcName:"sdrAgent",handleAnswer:wt,currentStep:Gt,stepCopy:D.oblroi_wizard_step,selectAgentsCopy:D.oblroi_wizard_select_agents,completeSurveyCopy:D.oblroi_wizard_complete_survey,agentTypeCoach:D.oblroi_agent_type_sdr,questionCopy:D.oblroi_wizard_question_2,questionYesCopy:D.oblroi_wizard_question_yes,questionNoCopy:D.oblroi_wizard_question_no}):null,y.jsx(TF,{setCurrentStep:ys,setEnabledWizard:ha,currentStep:Gt,nextCopy:D.oblroi_wizard_next,backCopy:D.oblroi_wizard_back,resultsCopy:D.oblroi_wizard_view_results,skipCopy:D.oblroi_wizard_skip})]})}):null,t&&vs===!1&&y.jsxs(y.Fragment,{children:[fe.salesCoach||fe.sdrAgent||fe.serviceAgent?y.jsx($F,{value:Mi,currency:s,locale:h,totalCopy:D.oblroi_sticky_total_copy,withAgentforceCopy:D.oblroi_sticky_withAgentforce_copy,inactiveCopy:D.oblroi_sticky_inactive_copy,salesCoachResults:At.threeYearNetBenefit,sdrResults:ut.threeYearNetBenefit,serviceResults:oe.totalSavings,salesCoachCopy:D.oblroi_agent_type_coach,sdrCopy:D.oblroi_agent_type_sdr,serviceCopy:D.oblroi_agent_type_service,enabledCalcs:fe}):null,y.jsxs(RF,{children:[y.jsxs("div",{className:"inline-flex w-full flex-col items-center justify-start",children:[fe.salesCoach||fe.sdrAgent||fe.serviceAgent?y.jsxs(y.Fragment,{children:[y.jsx("h2",{className:"mb-4 max-w-lg text-center font-display text-2xl leading-9 text-sfnavy sm:text-2xl sm:leading-10",children:D.oblroi_resultsHeadline}),y.jsx("div",{className:"mb-4 text-center text-display-2 font-semibold sm:text-display-1",children:y.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:y.jsx(EF,{value:Mi,currency:s,locale:h})})}),y.jsx("p",{className:"mb-1 font-sans text-base font-normal leading-normal tracking-tight text-sky-950",children:D.oblroi_sticky_active_copy}),y.jsxs("div",{className:"mb-4 flex w-full flex-col justify-center gap-3 md:flex-row",children:[y.jsx("div",{className:"inline-flex items-start justify-center gap-2",children:y.jsxs("div",{className:"inline-flex flex-row items-center justify-start gap-1 md:flex-col",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${fe.serviceAgent?"bg-[#F0F3FC]":"bg-[#F0F3FC]/50 text-sky-950/50"}`,children:D.oblroi_agent_type_service_short}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight text-sky-950",children:fe.serviceAgent?y.jsx(de,{value:oe.totalSavings,currency:s,locale:h}):D.oblroi_sticky_inactive_copy})]})}),y.jsx("div",{className:"text-md visible inline-flex items-center justify-center font-display max-sm:hidden",children:"+"}),y.jsx("div",{className:"inline-flex items-start justify-center gap-2",children:y.jsxs("div",{className:"inline-flex flex-row items-center justify-start gap-1 md:flex-col",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${fe.salesCoach?"bg-[#F0F3FC]":"bg-[#F0F3FC]/50 text-sky-950/50"}`,children:D.oblroi_agent_type_coach_short}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight text-sky-950",children:fe.salesCoach?y.jsx(de,{value:At.threeYearNetBenefit,currency:s,locale:h}):D.oblroi_sticky_inactive_copy})]})}),y.jsx("div",{className:"text-md visible inline-flex items-center justify-center font-display max-sm:hidden",children:"+"}),y.jsx("div",{className:"inline-flex items-start justify-center gap-2",children:y.jsxs("div",{className:"inline-flex flex-row items-center justify-start gap-1 md:flex-col",children:[y.jsx("h6",{className:`rounded-full px-3 py-1 text-center font-sans text-sm font-bold leading-tight ${fe.sdrAgent?"bg-[#F0F3FC]":"bg-[#F0F3FC]/50 text-sky-950/50"}`,children:D.oblroi_agent_type_sdr_short}),y.jsx("p",{className:"font-sans text-base leading-normal tracking-tight text-sky-950",children:fe.sdrAgent?y.jsx(de,{value:ut.threeYearNetBenefit,currency:s,locale:h}):D.oblroi_sticky_inactive_copy})]})})]}),y.jsx("div",{className:"mb-5 font-sans text-xl font-bold leading-[30px] tracking-tight text-neutral-900",children:D.oblroi_resultsDescription}),y.jsxs("div",{className:"mb-8 flex w-full flex-col gap-4 md:w-1/2 md:flex-row",children:[h==="en-US"&&i?y.jsx(ua,{variant:"primary",url:`${window.location.origin}${d?`/${d}`:""}/form/agentforce/roi-calculator-download/?pb=1`,target:"_blank",children:"Download report"}):y.jsx(ua,{url:`${window.location.origin}${d?`/${d}`:""}/form/agentforce/contact-us/?d=pb`,target:"_blank",variant:"primary",children:D.oblroi_cta1Label}),y.jsx(ua,{variant:"secondary",url:`${window.location.origin}${d?`/${d}`:""}/agentforce`,children:D.oblroi_cta2Label})]})]}):y.jsxs("div",{className:"mb-5 text-center",children:[y.jsx("h3",{className:"pb-2 font-display text-xl font-semibold text-sky-950",children:D.oblroi_no_calculators_headline}),y.jsx("p",{className:"pt-2 font-sans text-base text-neutral-700",children:D.oblroi_no_calculators_description}),y.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-10 pt-6 font-display text-sky-950 md:flex-row",children:[y.jsx("div",{className:"w-full p-4 sm:min-w-[200px] sm:max-w-[250px]",children:D.oblroi_service_marketing_headline}),y.jsx("div",{className:"w-full p-4 sm:min-w-[200px] sm:max-w-[250px]",children:D.oblroi_sdr_marketing_headline}),y.jsx("div",{className:"w-full p-4 sm:min-w-[200px] sm:max-w-[250px]",children:D.oblroi_coach_marketing_headline})]}),y.jsx("div",{className:"my-6 flex",children:y.jsxs("div",{className:"mx-auto flex w-full flex-col gap-4 md:flex-row",children:[y.jsx("div",{className:"w-full",children:y.jsx(ua,{url:`${window.location.origin}${d?`/${d}`:""}/form/agentforce/contact-us/?d=pb`,target:"_blank",variant:"primary",children:D.oblroi_cta1Label})}),y.jsx("div",{className:"w-full",children:y.jsx(ua,{variant:"secondary",url:`${window.location.origin}${d?`/${d}`:""}/agentforce`,children:D.oblroi_cta2Label})})]})})]}),y.jsx("p",{className:"mb-8 font-sans text-sm font-normal leading-normal tracking-tight text-neutral-700",children:D.oblroi_calculator_toggle_info}),y.jsx("div",{role:"region",id:"agentforce-savings-info",className:"sr-only","aria-live":"polite","aria-atomic":"true",children:ct})]}),y.jsxs(Dt,{children:[y.jsxs(Dt.Item,{defaultOpen:fe.serviceAgent,onToggle:O=>wt("serviceAgent",O),children:[y.jsx(Dt.Header,{children:y.jsxs("div",{className:"flex items-center gap-4 pt-1",children:[y.jsxs("h5",{className:"font-display text-xl font-semibold leading-normal text-sky-950 hover:text-sky-900",children:[D.oblroi_agent_type_service," "]}),y.jsx("p",{className:"hidden font-sans text-base font-normal leading-normal tracking-tight text-neutral-900 md:block",children:D.oblroi_service_description})]})}),y.jsxs(Dt.Panel,{children:[y.jsx(hm,{children:y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs("p",{className:"font-sans text-sm font-normal leading-tight text-neutral-700",children:["(",D.oblroi_form_required,")"]}),y.jsx(sn,{label:D.oblroi_service_employees_label,info:D.oblroi_service_employees_info,value:p,inputName:Oe.service.serviceEmployees,minValue:1,maxValue:1e5,formatOptions:{maximumFractionDigits:0},onChange:O=>isNaN(O)?g(1):g(Number(O)),validationBehavior:"native",errorMessage:D.oblroi_error_service_employees,isRequired:!0}),y.jsx(sn,{label:D.oblroi_service_cost_per_employee_label,info:D.oblroi_service_cost_per_employee_info,value:b,inputName:Oe.service.costPerEmployee,minValue:1,maxValue:1e6,formatOptions:{style:"currency",currency:s||"USD",maximumFractionDigits:0},onChange:O=>isNaN(O)?w(0):w(Number(O)),validationBehavior:"native",errorMessage:D.oblroi_error_cost_per_employee,isRequired:!0}),y.jsx(sn,{label:D.oblroi_service_conversations_per_day_label,info:D.oblroi_service_conversations_per_day_info,value:S,inputName:Oe.service.conversationsPerDay,formatOptions:{maximumFractionDigits:0},onChange:O=>isNaN(O)?k(1):k(Number(O)),validationBehavior:"native",errorMessage:D.oblroi_error_conversations_handled,minValue:1,isRequired:!0}),y.jsx(xi,{label:D.oblroi_service_automation_percent_label,info:D.oblroi_service_automation_percent_info,value:$,inputName:Oe.service.serviceAgentCases,onChange:M,maxValue:100,minValue:1,suffix:"%",step:1})]})}),y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs(K,{children:[y.jsx(K.Head,{children:y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:" "}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_1}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_2}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_3}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_total})]})}),y.jsxs(K.Body,{children:[y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_resultsTable_human_cost}),mr.slice(1).map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.serviceRepCost,currency:s,locale:h})},O.year))]}),y.jsxs(K.Row,{children:[y.jsxs(K.HeaderCell,{children:[D.oblroi_resultsTable_agentforce_investment,"*"]}),mr.slice(1).map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.cost,currency:s,locale:h})},O.year))]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_resultsTable_your_savings}),mr.slice(1).map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.savings,currency:s,locale:h})},O.year))]})]})]}),e&&y.jsx("div",{className:"flex min-h-[400px] w-full flex-row",children:y.jsx(OR,{data:mr,ariaLabel:ma,currency:s,locale:h})}),y.jsx(dm,{headline:D.oblroi_service_marketing_headline,item1:D.oblroi_service_marketing_item1,item2:D.oblroi_service_marketing_item2,item3:D.oblroi_service_marketing_item3}),y.jsx(Xu,{text1:D.oblroi_service_legalDisclaimer_1,text2:D.oblroi_service_legalDisclaimer_2})]})]})]}),y.jsxs(Dt.Item,{defaultOpen:fe.salesCoach,onToggle:O=>wt("salesCoach",O),children:[y.jsx(Dt.Header,{children:y.jsxs("div",{className:"flex items-center gap-4 pt-1",children:[y.jsxs("h5",{className:"text-left font-display text-xl font-semibold leading-normal text-sky-950 hover:text-sky-900",children:[D.oblroi_agent_type_coach," "]}),y.jsx("p",{className:"hidden text-left font-sans text-base font-normal leading-normal tracking-tight text-neutral-900 md:block",children:D.oblroi_coach_description})]})}),y.jsxs(Dt.Panel,{children:[y.jsx(hm,{children:y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs("p",{className:"font-sans text-sm font-normal leading-tight text-neutral-700",children:["(",D.oblroi_form_required,")"]}),y.jsx(sn,{label:D.oblroi_coach_manager_count_label,info:D.oblroi_coach_manager_count_info,value:P,inputName:Oe.coach.numberOfSalesManagers,onChange:O=>E(Number(O)),minValue:1,maxValue:1e3,formatOptions:{maximumFractionDigits:0},isRequired:!0}),y.jsx(xi,{label:D.oblroi_coach_time_spent_label,info:D.oblroi_coach_time_spent_info,value:F*100,onChange:O=>C(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.coach.timeSpentOnCoaching}),y.jsx(xi,{label:D.oblroi_coach_productivity_target_label,info:D.oblroi_coach_productivity_target_info,value:z,onChange:N,maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.coach.yearThreeProductivityTarget}),y.jsx(sn,{label:D.oblroi_coach_manager_salary_label,info:D.oblroi_coach_manager_salary_info,value:I,minValue:1,onChange:O=>A(Number(O)),formatOptions:{style:"currency",currency:s,maximumFractionDigits:0},isRequired:!0,inputName:Oe.coach.averageSalesManagerSalary}),y.jsx(sn,{label:D.oblroi_coach_weekly_conversations_label,info:D.oblroi_coach_weekly_conversations_info,value:L,onChange:O=>R(Number(O)),minValue:1,maxValue:100,formatOptions:{maximumFractionDigits:0},isRequired:!0,inputName:Oe.coach.coachingConversationsPerWeek})]})}),y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs(K,{children:[y.jsx(K.Head,{children:y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:" "}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_1}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_2}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_3}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_total})]})}),y.jsxs(K.Body,{children:[y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_results_table_productivity}),At.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.productivityBenefits,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:At.threeYearTotalBenefits,currency:s,locale:h})})]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_resultsTable_agentforce_investment}),At.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.totalAgentforceInvestment,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:At.threeYearTotalInvestment,currency:s,locale:h})})]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_results_table_net_benefit}),At.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.netBenefit,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:At.threeYearNetBenefit,currency:s,locale:h})})]})]})]}),y.jsx(dm,{headline:D.oblroi_coach_marketing_headline,item1:D.oblroi_coach_marketing_item1,item2:D.oblroi_coach_marketing_item2,item3:D.oblroi_coach_marketing_item3}),y.jsx(Xu,{text1:D.oblroi_coach_legalDisclaimer_1,text2:D.oblroi_coach_legalDisclaimer_2,text3:D.oblroi_coach_legalDisclaimer_3})]})]})]}),y.jsxs(Dt.Item,{defaultOpen:fe.sdrAgent,onToggle:O=>wt("sdrAgent",O),children:[y.jsx(Dt.Header,{children:y.jsxs("div",{className:"flex items-center gap-4 pt-1",children:[y.jsx("h5",{className:"font-display text-xl font-semibold text-sky-950 hover:text-sky-900",children:D.oblroi_agent_type_sdr}),y.jsx("p",{className:"hidden font-sans text-base font-normal leading-normal tracking-tight text-neutral-900 md:block",children:D.oblroi_sdr_description})]})}),y.jsxs(Dt.Panel,{children:[y.jsx(hm,{children:y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs("p",{className:"font-sans text-sm font-normal leading-tight text-neutral-700",children:["(",D.oblroi_form_required,")"]}),y.jsx(sn,{label:D.oblroi_sdr_rep_count_label,info:D.oblroi_sdr_rep_count_info,value:V,inputName:Oe.sdr.numberOfSalesReps,onChange:O=>U(Number(O)),minValue:1,maxValue:1e4,formatOptions:{maximumFractionDigits:0},isRequired:!0}),y.jsx(xi,{label:D.oblroi_sdr_prospecting_time_label,info:D.oblroi_sdr_prospecting_time_info,value:j*100,onChange:O=>H(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.sdr.timeSpentOnLeadProspecting}),y.jsx(sn,{label:D.oblroi_sdr_rep_salary_label,info:D.oblroi_sdr_rep_salary_info,value:q,minValue:1,onChange:O=>J(Number(O)),formatOptions:{style:"currency",currency:s,maximumFractionDigits:0},isRequired:!0,inputName:Oe.sdr.averageSalesRepSalary}),y.jsx(sn,{label:D.oblroi_sdr_weekly_leads_label,info:D.oblroi_sdr_weekly_leads_info,value:re,onChange:O=>ye(Number(O)),minValue:1,maxValue:1e3,formatOptions:{maximumFractionDigits:0},isRequired:!0,inputName:Oe.sdr.leadsPerRepPerWeek}),y.jsx(sn,{label:D.oblroi_sdr_unengaged_leads_label,info:D.oblroi_sdr_unengaged_leads_info,value:lt,onChange:O=>fr(Number(O)),minValue:0,formatOptions:{maximumFractionDigits:0},isRequired:!0,inputName:Oe.sdr.unengagedLeadsPerYear}),y.jsx(xi,{label:D.oblroi_sdr_year3_target_label,info:D.oblroi_sdr_year3_target_info,value:pr*100,onChange:O=>ec(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.sdr.yearThreeTargetPercentage}),y.jsx(xi,{label:D.oblroi_sdr_conversion_rate_label,info:D.oblroi_sdr_conversion_rate_info,value:Wn*100,onChange:O=>ms(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.sdr.leadConversionRate}),y.jsx(sn,{label:D.oblroi_sdr_deal_size_label,info:D.oblroi_sdr_deal_size_info,value:hr,minValue:1,onChange:O=>ca(Number(O)),formatOptions:{style:"currency",currency:s,maximumFractionDigits:0},isRequired:!0,inputName:Oe.sdr.averageDealSize}),y.jsx(xi,{label:D.oblroi_sdr_close_rate_label,info:D.oblroi_sdr_close_rate_info,value:bn*100,onChange:O=>Ju(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.sdr.opportunityCloseRate}),y.jsx(xi,{label:D.oblroi_sdr_margin_label,info:D.oblroi_sdr_margin_info,value:gs*100,onChange:O=>da(O/100),maxValue:100,minValue:1,suffix:"%",step:1,inputName:Oe.sdr.grossMargin})]})}),y.jsxs("div",{className:"flex w-full flex-col gap-6",children:[y.jsxs(K,{children:[y.jsx(K.Head,{children:y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:" "}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_1}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_2}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_year_3}),y.jsx(K.HeaderCell,{children:D.oblroi_chart_total})]})}),y.jsxs(K.Body,{children:[y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_results_table_productivity}),ut.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.productivityBenefits,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:ut.threeYearProductivityBenefits,currency:s,locale:h})})]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_results_table_qualified_leads}),ut.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.benefitsFromQualifiedLeads,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:ut.threeYearBenefitsFromQualifiedLeads,currency:s,locale:h})})]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_resultsTable_agentforce_investment}),ut.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.totalAgentforceCosts,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:ut.threeYearTotalCosts,currency:s,locale:h})})]}),y.jsxs(K.Row,{children:[y.jsx(K.HeaderCell,{children:D.oblroi_results_table_net_benefit}),ut.tableData.map(O=>y.jsx(K.Cell,{children:y.jsx(de,{value:O.netBenefit,currency:s,locale:h})},O.year)),y.jsx(K.Cell,{children:y.jsx(de,{value:ut.threeYearNetBenefit,currency:s,locale:h})})]})]})]}),y.jsx(dm,{headline:D.oblroi_sdr_marketing_headline,item1:D.oblroi_sdr_marketing_item1,item2:D.oblroi_sdr_marketing_item2,item3:D.oblroi_sdr_marketing_item3}),y.jsx(Xu,{text1:D.oblroi_sdr_legalDisclaimer_1,text2:D.oblroi_sdr_legalDisclaimer_2,text3:D.oblroi_sdr_legalDisclaimer_3})]})]})]})]}),y.jsx(Xu,{text1:D.oblroi_all_legalDisclaimer,text2:D.oblroi_all_legalDisclaimer_2})]})]})]})]})}const hm=({children:e})=>y.jsx("div",{className:"input-panel w-full gap-2 self-start rounded border border-neutral-200 bg-white p-4 shadow lg:w-1/4",children:e});document.querySelectorAll("[id^='wps-agentforce-roi']").forEach(e=>{const t=e.dataset||{};lc.createRoot(e).render(y.jsx(Z.StrictMode,{children:y.jsx(WF,T({},t))}))})});