@3sc/common-component 0.0.282 → 0.0.284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -299,7 +299,7 @@ const theme2 = createTheme({ palette: {
299
299
  ${p}px !important;
300
300
  top: ${u}px !important;
301
301
  }
302
- `),()=>{document.head.removeChild(h)}},[t]),g.jsx(K5,{isPresent:t,childRef:o,sizeRef:i,children:S.cloneElement(e,{ref:o})})}const Z5=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=Cd(J5),u=R.useId(),d=R.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=R.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return R.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(X5,{isPresent:n,anchorX:l,children:e})),g.jsx(Ll.Provider,{value:f,children:e})};function J5(){return new Map}function ey(e=!0){const t=R.useContext(Ll);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=R.useId();R.useEffect(()=>{if(e)return o(i)},[e]);const a=R.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Vl=e=>e.key||"";function ty(e){const t=[];return R.Children.forEach(e,n=>{R.isValidElement(n)&&t.push(n)}),t}const Q5=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ey(a),d=R.useMemo(()=>ty(e),[e]),f=a&&!c?[]:d.map(Vl),p=R.useRef(!0),h=R.useRef(d),y=Cd(()=>new Map),[m,b]=R.useState(d),[x,w]=R.useState(d);Qg(()=>{p.current=!1,h.current=d;for(let v=0;v<x.length;v++){const k=Vl(x[v]);f.includes(k)?y.delete(k):y.get(k)!==!0&&y.set(k,!1)}},[x,f.length,f.join("-")]);const C=[];if(d!==m){let v=[...d];for(let k=0;k<x.length;k++){const E=x[k],M=Vl(E);f.includes(M)||(v.splice(k,0,E),C.push(E))}return i==="wait"&&C.length&&(v=C),w(ty(v)),b(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:O}=R.useContext(wd);return g.jsx(g.Fragment,{children:x.map(v=>{const k=Vl(v),E=a&&!c?!1:d===x||f.includes(k),M=()=>{if(y.has(k))y.set(k,!0);else return;let D=!0;y.forEach(A=>{A||(D=!1)}),D&&(O==null||O(),w(h.current),a&&(u==null||u()),r&&r())};return g.jsx(Z5,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:M,anchorX:l,children:v},k)})})};function Od(e,t){e.indexOf(t)===-1&&e.push(t)}function kd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let us=()=>{},Vr=()=>{};process.env.NODE_ENV!=="production"&&(us=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Vr=(e,t)=>{if(!e)throw new Error(t)});const Ed={useManualTiming:!1};function Pd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bn=e=>e,Ei=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Md{constructor(){this.subscriptions=[]}add(t){return Od(this.subscriptions,t),()=>kd(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ir=e=>e/1e3;function ny(e,t){return t?e*(1e3/t):0}const ry=new Set;function Wl(e,t,n){e||ry.has(t)||(console.warn(t),ry.add(t))}const eI=Pd(()=>window.ScrollTimeline!==void 0);class tI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(eI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class nI extends tI{then(t,n){return this.finished.finally(t).then(()=>{})}}const oy={value:null},Rd=e=>Array.isArray(e)&&typeof e[0]=="number",rI={};function oI(e,t){const n=Pd(e);return()=>rI[t]??n()}const Pi=oI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sy=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Mi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Dd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mi([0,.65,.55,1]),circOut:Mi([.55,0,1,.45]),backIn:Mi([.31,.01,.66,-.59]),backOut:Mi([.33,1.53,.69,.99])};function iy(e,t){if(e)return typeof e=="function"&&Pi()?sy(e,t):Rd(e)?Mi(e):Array.isArray(e)?e.map(n=>iy(n,t)||Dd.easeOut):Dd[e]}function sI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=iy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function Id(e){return typeof e=="function"&&"applyToOptions"in e}function Ad(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const zl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zl;)t+=n,r=e.next(t);return t>=zl?1/0:t}function iI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),zl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ir(o)}}function ay(e){return!!(typeof e=="function"&&Pi()||!e||typeof e=="string"&&(e in Dd||Pi())||Rd(e)||Array.isArray(e)&&e.every(ay))}function ly(e,t){e.timeline=t,e.onfinish=null}const Ul=["read","resolveKeyframes","update","preRender","render","postRender"];function aI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const m=h&&o?n:r;return p&&a.add(f),m.has(f)||m.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&oy.value&&oy.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const lI=40;function cy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ul.reduce((x,w)=>(x[w]=aI(i,t?w:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,lI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Ul.reduce((x,w)=>{const C=a[w];return x[w]=(O,v=!1,k=!1)=>(n||y(),C.schedule(O,v,k)),x},{}),cancel:x=>{for(let w=0;w<Ul.length;w++)a[Ul[w]].cancel(x)},state:o,steps:a}}const{schedule:Nd}=cy(queueMicrotask,!1),{schedule:wt,cancel:Wr,state:qt,steps:$d}=cy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bn,!0);let Hl;function cI(){Hl=void 0}const ar={now:()=>(Hl===void 0&&ar.set(qt.isProcessing||Ed.useManualTiming?qt.timestamp:performance.now()),Hl),set:e=>{Hl=e,queueMicrotask(cI)}},Yn={x:!1,y:!1};function uy(){return Yn.x||Yn.y}function uI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function dI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function dy(e,t){const n=dI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function fy(e){return!(e.pointerType==="touch"||uy())}function fI(e,t,n={}){const[r,o,i]=dy(e,n),a=l=>{if(!fy(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{fy(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const py=(e,t)=>t?e===t?!0:py(e,t.parentElement):!1,_d=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hI(e){return pI.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function hy(e){return t=>{t.key==="Enter"&&e(t)}}function Fd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=hy(()=>{if(Ri.has(n))return;Fd(n,"down");const o=hy(()=>{Fd(n,"up")}),i=()=>Fd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function my(e){return _d(e)&&!uy()}function gI(e,t,n={}){const[r,o,i]=dy(e,n),a=l=>{const c=l.currentTarget;if(!my(l)||Ri.has(c))return;Ri.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!my(h)||!Ri.has(c))&&(Ri.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||py(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>mI(u,o)),!hI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const gy=30,yI=e=>!isNaN(parseFloat(e));class bI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=ar.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&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=ar.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Wl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Md);const r=this.events[t].add(n);return t==="change"?()=>{r(),wt.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=ar.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>gy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,gy);return ny(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 Di(e,t){return new bI(e,t)}const yy=R.createContext({strict:!1}),by={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ds={};for(const e in by)ds[e]={isEnabled:t=>by[e].some(n=>!!t[n])};function vI(e){for(const t in e)ds[t]={...ds[t],...e[t]}}const xI=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 ql(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xI.has(e)}let vy=e=>!ql(e);function wI(e){e&&(vy=t=>t.startsWith("on")?!ql(t):e(t))}try{wI(require("@emotion/is-prop-valid").default)}catch{}function CI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vy(o)||n===!0&&ql(o)||!t&&!ql(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function SI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Wl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Yl=R.createContext({});function Gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ii(e){return typeof e=="string"||Array.isArray(e)}const Bd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ld=["initial",...Bd];function Kl(e){return Gl(e.animate)||Ld.some(t=>Ii(e[t]))}function xy(e){return!!(Kl(e)||e.variants)}function TI(e,t){if(Kl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ii(n)?n:void 0,animate:Ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function OI(e){const{initial:t,animate:n}=TI(e,R.useContext(Yl));return R.useMemo(()=>({initial:t,animate:n}),[wy(t),wy(n)])}function wy(e){return Array.isArray(e)?e.join(" "):e}const kI=Symbol.for("motionComponentSymbol");function fs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EI(e,t,n){return R.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):fs(n)&&(n.current=r))},[t])}const Vd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cy="data-"+Vd("framerAppearId"),Sy=R.createContext({});function PI(e,t,n,r,o){var m,b;const{visualElement:i}=R.useContext(Yl),a=R.useContext(yy),l=R.useContext(Ll),c=R.useContext(Td).reducedMotion,u=R.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=R.useContext(Sy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&MI(u.current,n,o,f);const p=R.useRef(!1);R.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[Cy],y=R.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Qg(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Nd.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),R.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function MI(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ty(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&fs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ty(e){if(e)return e.options.allowProjection!==!1?e.projection:Ty(e.parent)}function RI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&vI(e);function i(l,c){let u;const d={...R.useContext(Td),...l,layoutId:DI(l)},{isStatic:f}=d,p=OI(l),h=r(l,f);if(!f&&Sd){II(d,e);const y=AI(d);u=y.MeasureLayout,p.visualElement=PI(o,h,d,t,y.ProjectionNode)}return g.jsxs(Yl.Provider,{value:p,children:[u&&p.visualElement?g.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,EI(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=R.forwardRef(i);return a[kI]=o,a}function DI({layoutId:e}){const t=R.useContext(wd).id;return t&&e!==void 0?t+"-"+e:e}function II(e,t){const n=R.useContext(yy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?us(!1,r):Vr(!1,r)}}function AI(e){const{drag:t,layout:n}=ds;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Oy=e=>t=>typeof t=="string"&&t.startsWith(e),Wd=Oy("--"),jI=Oy("var(--"),zd=e=>jI(e)?NI.test(e.split("/*")[0].trim()):!1,NI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ai={};function $I(e){for(const t in e)Ai[t]=e[t],Wd(t)&&(Ai[t].isCSSVariable=!0)}const ps=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lo=new Set(ps);function ky(e,{layout:t,layoutId:n}){return lo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ai[e]||e==="opacity")}const Xt=e=>!!(e&&e.getVelocity),Ey=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,hs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ji={...hs,transform:e=>Or(0,1,e)},Xl={...hs,default:1},Ni=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zr=Ni("deg"),lr=Ni("%"),_e=Ni("px"),_I=Ni("vh"),FI=Ni("vw"),Py={...lr,parse:e=>lr.parse(e)/100,transform:e=>lr.transform(e*100)},BI={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,radius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,backgroundPositionX:_e,backgroundPositionY:_e},LI={rotate:zr,rotateX:zr,rotateY:zr,rotateZ:zr,scale:Xl,scaleX:Xl,scaleY:Xl,scaleZ:Xl,skew:zr,skewX:zr,skewY:zr,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:ji,originX:Py,originY:Py,originZ:_e},My={...hs,transform:Math.round},Ud={...BI,...LI,zIndex:My,size:_e,fillOpacity:ji,strokeOpacity:ji,numOctaves:My},VI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WI=ps.length;function zI(e,t,n){let r="",o=!0;for(let i=0;i<WI;i++){const a=ps[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Ey(l,Ud[a]);if(!c){o=!1;const d=VI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Hd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(lo.has(c)){a=!0;continue}else if(Wd(c)){o[c]=u;continue}else{const d=Ey(u,Ud[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=zI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ry(e,t,n){for(const r in t)!Xt(t[r])&&!ky(r,n)&&(e[r]=t[r])}function UI({transformTemplate:e},t){return R.useMemo(()=>{const n=qd();return Hd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function HI(e,t){const n=e.style||{},r={};return Ry(r,n,e),Object.assign(r,UI(e,t)),r}function qI(e,t){const n={},r=HI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const YI=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(YI.indexOf(e)>-1||/[A-Z]/u.test(e))}const GI={offset:"stroke-dashoffset",array:"stroke-dasharray"},KI={offset:"strokeDashoffset",array:"strokeDasharray"};function XI(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?GI:KI;e[i.offset]=_e.transform(-r);const a=_e.transform(t),l=_e.transform(n);e[i.array]=`${a} ${l}`}function Dy(e,t,n){return typeof e=="string"?e:_e.transform(t+n*e)}function ZI(e,t,n){const r=Dy(t,e.x,e.width),o=Dy(n,e.y,e.height);return`${r} ${o}`}function Gd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Hd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=ZI(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&XI(p,a,l,c,!1)}const Iy=()=>({...qd(),attrs:{}}),Kd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function JI(e,t,n,r){const o=R.useMemo(()=>{const i=Iy();return Gd(i,t,Kd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ry(i,e.style,e),o.style={...i,...o.style}}return o}function QI(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Yd(n)?JI:qI)(r,i,a,n),u=CI(r,typeof n=="string",e),d=n!==R.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=R.useMemo(()=>Xt(f)?f.get():f,[f]);return R.createElement(n,{...d,children:p})}}function Ay(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xd(e,t,n,r){if(typeof t=="function"){const[o,i]=Ay(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Ay(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Zd=e=>Array.isArray(e),eA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tA=e=>Zd(e)?e[e.length-1]||0:e;function Zl(e){const t=Xt(e)?e.get():e;return eA(t)?t.toValue():t}function nA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:rA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const jy=e=>(t,n)=>{const r=R.useContext(Yl),o=R.useContext(Ll),i=()=>nA(e,t,r,o);return n?i():Cd(i)};function rA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Zl(i[p]);let{initial:a,animate:l}=e;const c=Kl(e),u=xy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Gl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Xd(e,p[h]);if(y){const{transitionEnd:m,transition:b,...x}=y;for(const w in x){let C=x[w];if(Array.isArray(C)){const O=d?C.length-1:0;C=C[O]}C!==null&&(o[w]=C)}for(const w in m)o[w]=m[w]}}}return o}function Jd(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Xt(r[a])||t.style&&Xt(t.style[a])||ky(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const oA={useVisualState:jy({scrapeMotionValuesFromProps:Jd,createRenderState:qd})};function Ny(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function $y(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const _y=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 Fy(e,t,n,r){$y(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(_y.has(o)?o:Vd(o),t.attrs[o])}function By(e,t,n){const r=Jd(e,t,n);for(const o in e)if(Xt(e[o])||Xt(t[o])){const i=ps.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Ly=["x","y","width","height","cx","cy","r"],sA={useVisualState:jy({scrapeMotionValuesFromProps:By,createRenderState:Iy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(lo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<Ly.length;l++){const c=Ly[l];e[c]!==t[c]&&(a=!0)}a&&wt.read(()=>{Ny(n,r),wt.render(()=>{Gd(r,o,Kd(n.tagName),e.transformTemplate),Fy(n,r)})})}})};function iA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Yd(r)?sA:oA,preloadedFeatures:e,useRender:QI(o),createVisualElement:t,Component:r};return RI(a)}}function $i(e,t,n){const r=e.getProps();return Xd(r,t,n!==void 0?n:r.custom,e)}const Vy=new Set(["width","height","top","left","right","bottom",...ps]);function aA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Di(n))}function lA(e,t){const n=$i(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=tA(i[a]);aA(e,a,l)}}function cA(e){return!!(Xt(e)&&e.add)}function Qd(e,t){const n=e.getValue("willChange");if(cA(n))return n.add(t);if(!n&&Ed.WillChange){const r=new Ed.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Wy(e){return e.props[Cy]}const zy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uA=1e-7,dA=12;function fA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=zy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>uA&&++l<dA);return a}function _i(e,t,n,r){if(e===t&&n===r)return Bn;const o=i=>fA(i,0,1,e,n);return i=>i===0||i===1?i:zy(o(i),t,r)}const Uy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Hy=e=>t=>1-e(1-t),qy=_i(.33,1.53,.69,.99),ef=Hy(qy),Yy=Uy(ef),Gy=e=>(e*=2)<1?.5*ef(e):.5*(2-Math.pow(2,-10*(e-1))),tf=e=>1-Math.sin(Math.acos(e)),Ky=Hy(tf),Xy=Uy(tf),Zy=e=>/^0[^.\s]+$/u.test(e);function pA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zy(e):!0}const Fi=e=>Math.round(e*1e5)/1e5,nf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hA(e){return e==null}const mA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rf=(e,t)=>n=>!!(typeof n=="string"&&mA.test(n)&&n.startsWith(e)||t&&!hA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jy=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(nf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},gA=e=>Or(0,255,e),of={...hs,transform:e=>Math.round(gA(e))},co={test:rf("rgb","red"),parse:Jy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+of.transform(e)+", "+of.transform(t)+", "+of.transform(n)+", "+Fi(ji.transform(r))+")"};function yA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const sf={test:rf("#"),parse:yA,transform:co.transform},ms={test:rf("hsl","hue"),parse:Jy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+lr.transform(Fi(t))+", "+lr.transform(Fi(n))+", "+Fi(ji.transform(r))+")"},Zt={test:e=>co.test(e)||sf.test(e)||ms.test(e),parse:e=>co.test(e)?co.parse(e):ms.test(e)?ms.parse(e):sf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?co.transform(e):ms.transform(e)},bA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nf))==null?void 0:t.length)||0)+(((n=e.match(bA))==null?void 0:n.length)||0)>0}const Qy="number",eb="color",xA="var",wA="var(",tb="${}",CA=/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 Bi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(CA,c=>(Zt.test(c)?(r.color.push(i),o.push(eb),n.push(Zt.parse(c))):c.startsWith(wA)?(r.var.push(i),o.push(xA),n.push(c)):(r.number.push(i),o.push(Qy),n.push(parseFloat(c))),++i,tb)).split(tb);return{values:n,split:l,indexes:r,types:o}}function nb(e){return Bi(e).values}function rb(e){const{split:t,types:n}=Bi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===Qy?i+=Fi(o[a]):l===eb?i+=Zt.transform(o[a]):i+=o[a]}return i}}const SA=e=>typeof e=="number"?0:e;function TA(e){const t=nb(e);return rb(e)(t.map(SA))}const Ur={test:vA,parse:nb,createTransformer:rb,getAnimatableNone:TA},OA=new Set(["brightness","contrast","saturate","opacity"]);function kA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nf)||[];if(!r)return e;const o=n.replace(r,"");let i=OA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const EA=/\b([a-z-]*)\(.*?\)/gu,af={...Ur,getAnimatableNone:e=>{const t=e.match(EA);return t?t.map(kA).join(" "):e}},PA={...Ud,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:af,WebkitFilter:af},ob=e=>PA[e];function sb(e,t){let n=ob(e);return n!==af&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const MA=new Set(["auto","none","0"]);function RA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!MA.has(i)&&Bi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sb(n,o)}const uo=e=>e*180/Math.PI,lf=e=>{const t=uo(Math.atan2(e[1],e[0]));return cf(t)},DA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lf,rotateZ:lf,skewX:e=>uo(Math.atan(e[1])),skewY:e=>uo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cf=e=>(e=e%360,e<0&&(e+=360),e),ib=lf,ab=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),IA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ab,scaleY:lb,scale:e=>(ab(e)+lb(e))/2,rotateX:e=>cf(uo(Math.atan2(e[6],e[5]))),rotateY:e=>cf(uo(Math.atan2(-e[2],e[0]))),rotateZ:ib,rotate:ib,skewX:e=>uo(Math.atan(e[4])),skewY:e=>uo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cb(e){return e.includes("scale")?1:0}function uf(e,t){if(!e||e==="none")return cb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=IA,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=DA,o=l}if(!o)return cb(t);const i=r[t],a=o[1].split(",").map(jA);return typeof i=="function"?i(a):a[i]}const AA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uf(n,t)};function jA(e){return parseFloat(e.trim())}const ub=e=>e===hs||e===_e,NA=new Set(["x","y","z"]),$A=ps.filter(e=>!NA.has(e));function _A(e){const t=[];return $A.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gs={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:(e,{transform:t})=>uf(t,"x"),y:(e,{transform:t})=>uf(t,"y")};gs.translateX=gs.x,gs.translateY=gs.y;const fo=new Set;let df=!1,ff=!1;function db(){if(ff){const e=Array.from(fo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=_A(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ff=!1,df=!1,fo.forEach(e=>e.complete()),fo.clear()}function fb(){fo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ff=!0)})}function FA(){fb(),db()}class pf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(fo.add(this),df||(df=!0,wt.read(fb),wt.resolveKeyframes(db))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),fo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,fo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const pb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),BA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LA(e){const t=BA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const VA=4;function hb(e,t,n=1){Vr(n<=VA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=LA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return pb(a)?parseFloat(a):a}return zd(o)?hb(o,t,n+1):o}const mb=e=>t=>t.test(e),gb=[hs,_e,lr,zr,FI,_I,{test:e=>e==="auto",parse:e=>e}],yb=e=>gb.find(mb(e));class bb extends pf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),zd(u))){const d=hb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Vy.has(r)||t.length!==2)return;const[o,i]=t,a=yb(o),l=yb(i);if(a!==l)if(ub(a)&&ub(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)pA(t[o])&&r.push(o);r.length&&RA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=gs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const vb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function WA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=vb(o,t),l=vb(i,t);return us(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:WA(e)||(n==="spring"||Id(n))&&r}const UA=e=>e!==null;function Jl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const HA=40;class xb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ar.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ar.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!zA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(Jl(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Et=(e,t,n)=>e+(t-e)*n;function hf(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 qA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=hf(c,l,e+1/3),i=hf(c,l,e),a=hf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ql(e,t){return n=>n>0?t:e}const mf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},YA=[sf,co,ms],GA=e=>YA.find(t=>t.test(e));function wb(e){const t=GA(e);if(us(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ms&&(n=qA(n)),n}const Cb=(e,t)=>{const n=wb(e),r=wb(t);if(!n||!r)return Ql(e,t);const o={...n};return i=>(o.red=mf(n.red,r.red,i),o.green=mf(n.green,r.green,i),o.blue=mf(n.blue,r.blue,i),o.alpha=Et(n.alpha,r.alpha,i),co.transform(o))},KA=(e,t)=>n=>t(e(n)),Li=(...e)=>e.reduce(KA),gf=new Set(["none","hidden"]);function XA(e,t){return gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ZA(e,t){return n=>Et(e,t,n)}function yf(e){return typeof e=="number"?ZA:typeof e=="string"?zd(e)?Ql:Zt.test(e)?Cb:ej:Array.isArray(e)?Sb:typeof e=="object"?Zt.test(e)?Cb:JA:Ql}function Sb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>yf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function JA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=yf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function QA(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const ej=(e,t)=>{const n=Ur.createTransformer(t),r=Bi(e),o=Bi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?gf.has(e)&&!o.values.length||gf.has(t)&&!r.values.length?XA(e,t):Li(Sb(QA(r,o),o.values),n):(us(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ql(e,t))};function Tb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Et(e,t,n):yf(e)(e,t)}const tj=5;function Ob(e,t,n){const r=Math.max(t-tj,0);return ny(n-e(r),t-r)}const Pt={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},kb=.001;function nj({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let o,i;us(e<=qn(Pt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Pt.minDamping,Pt.maxDamping,a),e=Or(Pt.minDuration,Pt.maxDuration,ir(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=bf(u,a),y=Math.exp(-f);return kb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),m=bf(Math.pow(u,2),a);return(-o(u)+kb>0?-1:1)*((p-h)*y)/m}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=oj(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const rj=12;function oj(e,t,n){let r=n;for(let o=1;o<rj;o++)r=r-e(r)/t(r);return r}function bf(e,t){return e*Math.sqrt(1-t*t)}const sj=["duration","bounce"],ij=["stiffness","damping","mass"];function Eb(e,t){return t.some(n=>e[n]!==void 0)}function aj(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!Eb(e,ij)&&Eb(e,sj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:i}}else{const n=nj(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function ec(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=aj({...n,velocity:-ir(n.velocity||0)}),y=p||0,m=u/(2*Math.sqrt(c*d)),b=a-i,x=ir(Math.sqrt(c/d)),w=Math.abs(b)<5;r||(r=w?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=w?Pt.restDelta.granular:Pt.restDelta.default);let C;if(m<1){const v=bf(x,m);C=k=>{const E=Math.exp(-m*x*k);return a-E*((y+m*x*b)/v*Math.sin(v*k)+b*Math.cos(v*k))}}else if(m===1)C=v=>a-Math.exp(-x*v)*(b+(y+x*b)*v);else{const v=x*Math.sqrt(m*m-1);C=k=>{const E=Math.exp(-m*x*k),M=Math.min(v*k,300);return a-E*((y+m*x*b)*Math.sinh(M)+v*b*Math.cosh(M))/v}}const O={calculatedDuration:h&&f||null,next:v=>{const k=C(v);if(h)l.done=v>=f;else{let E=0;m<1&&(E=v===0?qn(y):Ob(C,v,k));const M=Math.abs(E)<=r,D=Math.abs(a-k)<=o;l.done=M&&D}return l.value=l.done?a:k,l},toString:()=>{const v=Math.min(jd(O),zl),k=sy(E=>O.next(v*E).value,v,30);return v+"ms "+k},toTransition:()=>{}};return O}ec.applyToOptions=e=>{const t=iI(e,100,ec);return e.ease=Pi()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Pb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=M=>l!==void 0&&M<l||c!==void 0&&M>c,y=M=>l===void 0?c:c===void 0||Math.abs(l-M)<Math.abs(c-M)?l:c;let m=n*t;const b=f+m,x=a===void 0?b:a(b);x!==b&&(m=x-f);const w=M=>-m*Math.exp(-M/r),C=M=>x+w(M),O=M=>{const D=w(M),A=C(M);p.done=Math.abs(D)<=u,p.value=p.done?x:A};let v,k;const E=M=>{h(p.value)&&(v=M,k=ec({keyframes:[p.value,y(p.value)],velocity:Ob(C,M,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:M=>{let D=!1;return!k&&v===void 0&&(D=!0,O(M),E(M)),v!==void 0&&M>=v?k.next(M-v):(!D&&O(M),p)}}}const lj=_i(.42,0,1,1),cj=_i(0,0,.58,1),Mb=_i(.42,0,.58,1),uj=e=>Array.isArray(e)&&typeof e[0]!="number",Rb={linear:Bn,easeIn:lj,easeInOut:Mb,easeOut:cj,circIn:tf,circInOut:Xy,circOut:Ky,backIn:ef,backInOut:Yy,backOut:qy,anticipate:Gy},Db=e=>{if(Rd(e)){Vr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return _i(t,n,r,o)}else if(typeof e=="string")return Vr(Rb[e]!==void 0,`Invalid easing type '${e}'`),Rb[e];return e};function dj(e,t,n){const r=[],o=n||Tb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Bn:t;l=Li(c,l)}r.push(l)}return r}function fj(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Vr(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=dj(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Ei(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function pj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ei(0,t,r);e.push(Et(n,1,o))}}function hj(e){const t=[0];return pj(t,e.length-1),t}function mj(e,t){return e.map(n=>n*t)}function gj(e,t){return e.map(()=>t||Mb).splice(0,e.length-1)}function Vi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=uj(r)?r.map(Db):Db(r),i={done:!1,value:t[0]},a=mj(n&&n.length===t.length?n:hj(t),e),l=fj(a,t,{ease:Array.isArray(o)?o:gj(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const yj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>wt.update(t,!0),stop:()=>Wr(t),now:()=>qt.isProcessing?qt.timestamp:ar.now()}},bj={decay:Pb,inertia:Pb,tween:Vi,keyframes:Vi,spring:ec},vj=e=>e/100;class vf extends xb{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:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||pf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=Id(n)?n:bj[n]||Vi;let c,u;process.env.NODE_ENV!=="production"&&l!==Vi&&Vr(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Vi&&typeof t[0]!="number"&&(c=Li(vj,Tb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=jd(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,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:r}=this;if(!r){const{keyframes:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:m,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 x=this.currentTime-p*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,O=i;if(h){const M=Math.min(this.currentTime,d)/f;let D=Math.floor(M),A=M%1;!A&&M>=1&&(A=1),A===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(y==="reverse"?(A=1-A,m&&(A-=m/f)):y==="mirror"&&(O=a)),C=Or(0,1,A)*f}const v=w?{done:!1,value:c[0]}:O.next(C);l&&(v.value=l(v.value));let{done:k}=v;!w&&u!==null&&(k=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&o!==void 0&&(v.value=Jl(c,this.options,o)),b&&b(v.value),E&&this.finish(),v}get duration(){const{resolved:t}=this;return t?ir(t.calculatedDuration):0}get time(){return ir(this.currentTime)}set time(t){t=qn(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=ir(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=yj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const xj=new Set(["opacity","clipPath","filter","transform"]),wj=Pd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tc=10,Cj=2e4;function Sj(e){return Id(e.type)||e.type==="spring"||!ay(e.ease)}function Tj(e,t){const n=new vf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Cj;)r=n.sample(i),o.push(r.value),i+=tc;return{times:void 0,keyframes:o,duration:i-tc,ease:"linear"}}const Ib={anticipate:Gy,backInOut:Yy,circInOut:Xy};function Oj(e){return e in Ib}class Ab extends xb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new bb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Pi()&&Oj(i)&&(i=Ib[i]),Sj(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...m}=this.options,b=Tj(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,o=b.times,i=b.ease,a="keyframes"}const d=sI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(ly(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Jl(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ir(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ir(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.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 Bn;const{animation:r}=n;ly(r,t)}return Bn}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:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new vf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),m=qn(this.time);u.setWithVelocity(y.sample(m-tc).value,y.sample(m).value,tc)}const{onStop:c}=this.options;c&&c(),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:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return wj()&&r&&xj.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const kj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ej=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pj={type:"keyframes",duration:.8},Mj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Rj=(e,{keyframes:t})=>t.length>2?Pj:lo.has(e)?e.startsWith("scale")?Ej(t[1]):kj:Mj;function Dj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const xf=(e,t,n,r={},o,i)=>a=>{const l=Ad(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};Dj(l)||(d={...d,...Rj(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=Jl(d.keyframes,l);if(p!==void 0)return wt.update(()=>{d.onUpdate(p),d.onComplete()}),new nI([])}return!i&&Ab.supports(d)?new Ab(d):new vf(d)};function Ij({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jb(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&Ij(u,d))continue;const h={delay:n,...Ad(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const b=Wy(e);if(b){const x=window.MotionHandoffAnimation(b,d,wt);x!==null&&(h.startTime=x,y=!0)}}Qd(e,d),f.start(xf(d,f,p,e.shouldReduceMotion&&Vy.has(d)?{type:!1}:h,e,y));const m=f.animation;m&&c.push(m)}return a&&Promise.all(c).then(()=>{wt.update(()=>{a&&lA(e,a)})}),c}function wf(e,t,n={}){var c;const r=$i(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(jb(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return Aj(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function Aj(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(jj).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(wf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function jj(e,t){return e.sortNodePosition(t)}function Nj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>wf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=wf(e,t,n);else{const o=typeof t=="function"?$i(e,t,n.custom):t;r=Promise.all(jb(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Nb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $j=Ld.length;function $b(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$b(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$j;n++){const r=Ld[n],o=e.props[r];(Ii(o)||o===!1)&&(t[r]=o)}return t}const _j=[...Bd].reverse(),Fj=Bd.length;function Bj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nj(e,n,r)))}function Lj(e){let t=Bj(e),n=_b(),r=!0;const o=c=>(u,d)=>{var p;const f=$i(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...m}=f;u={...u,...m,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=$b(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let b=0;b<Fj;b++){const x=_j[b],w=n[x],C=u[x]!==void 0?u[x]:d[x],O=Ii(C),v=x===c?w.isActive:null;v===!1&&(y=b);let k=C===d[x]&&C!==u[x]&&O;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),w.protectedKeys={...h},!w.isActive&&v===null||!C&&!w.prevProp||Gl(C)||typeof C=="boolean")continue;const E=Vj(w.prevProp,C);let M=E||x===c&&w.isActive&&!k&&O||b>y&&O,D=!1;const A=Array.isArray(C)?C:[C];let $=A.reduce(o(x),{});v===!1&&($={});const{prevResolvedValues:I={}}=w,W={...I,...$},j=N=>{M=!0,p.has(N)&&(D=!0,p.delete(N)),w.needsAnimating[N]=!0;const L=e.getValue(N);L&&(L.liveStyle=!1)};for(const N in W){const L=$[N],H=I[N];if(h.hasOwnProperty(N))continue;let V=!1;Zd(L)&&Zd(H)?V=!Nb(L,H):V=L!==H,V?L!=null?j(N):p.add(N):L!==void 0&&p.has(N)?j(N):w.protectedKeys[N]=!0}w.prevProp=C,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(k&&E)||D)&&f.push(...A.map(N=>({animation:N,options:{type:x}})))}if(p.size){const b={};if(typeof u.initial!="boolean"){const x=$i(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}p.forEach(x=>{const w=e.getBaseTarget(x),C=e.getValue(x);C&&(C.liveStyle=!0),b[x]=w??null}),f.push({animation:b})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=_b(),r=!0}}}function Vj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nb(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _b(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}class Hr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Wj extends Hr{constructor(t){super(t),t.animationState||(t.animationState=Lj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gl(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.call(this)}}let zj=0;class Uj extends Hr{constructor(){super(...arguments),this.id=zj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Hj={animation:{Feature:Wj},exit:{Feature:Uj}};function Wi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function zi(e){return{point:{x:e.pageX,y:e.pageY}}}const qj=e=>t=>_d(t)&&e(t,zi(t));function Ui(e,t,n,r){return Wi(e,t,qj(n),r)}function Fb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Bb=1e-4,Kj=1-Bb,Xj=1+Bb,Lb=.01,Zj=0-Lb,Jj=0+Lb;function on(e){return e.max-e.min}function Qj(e,t,n){return Math.abs(e-t)<=n}function Vb(e,t,n,r=.5){e.origin=r,e.originPoint=Et(t.min,t.max,e.origin),e.scale=on(n)/on(t),e.translate=Et(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kj&&e.scale<=Xj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Zj&&e.translate<=Jj||isNaN(e.translate))&&(e.translate=0)}function Hi(e,t,n,r){Vb(e.x,t.x,n.x,r?r.originX:void 0),Vb(e.y,t.y,n.y,r?r.originY:void 0)}function Wb(e,t,n){e.min=n.min+t.min,e.max=e.min+on(t)}function eN(e,t,n){Wb(e.x,t.x,n.x),Wb(e.y,t.y,n.y)}function zb(e,t,n){e.min=t.min-n.min,e.max=e.min+on(t)}function qi(e,t,n){zb(e.x,t.x,n.x),zb(e.y,t.y,n.y)}const Ub=()=>({translate:0,scale:1,origin:0,originPoint:0}),ys=()=>({x:Ub(),y:Ub()}),Hb=()=>({min:0,max:0}),_t=()=>({x:Hb(),y:Hb()});function Ln(e){return[e("x"),e("y")]}function Cf(e){return e===void 0||e===1}function Sf({scale:e,scaleX:t,scaleY:n}){return!Cf(e)||!Cf(t)||!Cf(n)}function ho(e){return Sf(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return Yb(e.x)||Yb(e.y)}function Yb(e){return e&&e!=="0%"}function nc(e,t,n){const r=e-n,o=t*r;return n+o}function Gb(e,t,n,r,o){return o!==void 0&&(e=nc(e,o,r)),nc(e,n,r)+t}function Tf(e,t=0,n=1,r,o){e.min=Gb(e.min,t,n,r,o),e.max=Gb(e.max,t,n,r,o)}function Kb(e,{x:t,y:n}){Tf(e.x,t.translate,t.scale,t.originPoint),Tf(e.y,n.translate,n.scale,n.originPoint)}const Xb=.999999999999,Zb=1.0000000000001;function tN(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vs(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Kb(e,a)),r&&ho(i.latestValues)&&vs(e,i.latestValues))}t.x<Zb&&t.x>Xb&&(t.x=1),t.y<Zb&&t.y>Xb&&(t.y=1)}function bs(e,t){e.min=e.min+t,e.max=e.max+t}function Jb(e,t,n,r,o=.5){const i=Et(e.min,e.max,o);Tf(e,t,n,i,r)}function vs(e,t){Jb(e.x,t.x,t.scaleX,t.scale,t.originX),Jb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Fb(Gj(e.getBoundingClientRect(),t))}function nN(e,t,n){const r=Qb(e,n),{scroll:o}=t;return o&&(bs(r.x,o.offset.x),bs(r.y,o.offset.y)),r}const ev=({current:e})=>e?e.ownerDocument.defaultView:null,tv=(e,t)=>Math.abs(e-t);function rN(e,t){const n=tv(e.x,t.x),r=tv(e.y,t.y);return Math.sqrt(n**2+r**2)}class nv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=kf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=rN(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:m}=qt;this.history.push({...y,timestamp:m});const{onStart:b,onMove:x}=this.handlers;p||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Of(p,this.transformPagePoint),wt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=kf(f.type==="pointercancel"?this.lastMoveEventInfo:Of(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,b),y&&y(f,b)},!_d(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=zi(t),l=Of(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=qt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,kf(l,this.history)),this.removeListeners=Li(Ui(this.contextWindow,"pointermove",this.handlePointerMove),Ui(this.contextWindow,"pointerup",this.handlePointerUp),Ui(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wr(this.updatePoint)}}function Of(e,t){return t?{point:t(e.point)}:e}function rv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kf({point:e},t){return{point:e,delta:rv(e,ov(t)),offset:rv(e,oN(t)),velocity:sN(t,.1)}}function oN(e){return e[0]}function ov(e){return e[e.length-1]}function sN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ov(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ir(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function iN(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Et(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Et(n,e,r.max):Math.min(e,n)),e}function sv(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 aN(e,{top:t,left:n,bottom:r,right:o}){return{x:sv(e.x,n,o),y:sv(e.y,t,r)}}function iv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lN(e,t){return{x:iv(e.x,t.x),y:iv(e.y,t.y)}}function cN(e,t){let n=.5;const r=on(e),o=on(t);return o>r?n=Ei(t.min,t.max-r,e.min):r>o&&(n=Ei(e.min,e.max-o,t.min)),Or(0,1,n)}function uN(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 Ef=.35;function dN(e=Ef){return e===!1?e=0:e===!0&&(e=Ef),{x:av(e,"left","right"),y:av(e,"top","bottom")}}function av(e,t,n){return{min:lv(e,t),max:lv(e,n)}}function lv(e,t){return typeof e=="number"?e:e[t]||0}const fN=new WeakMap;class pN{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=_t(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uI(p),!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),Ln(b=>{let x=this.getAxisMotionValue(b).get()||0;if(lr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[b];C&&(x=on(C)*(parseFloat(x)/100))}}this.originPoint[b]=x}),y&&wt.postRender(()=>y(d,f)),Qd(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(h&&this.currentDirection===null){this.currentDirection=hN(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Ln(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new nv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ev(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&wt.postRender(()=>i(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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!rc(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=iN(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&fs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aN(r.layoutBox,t):this.constraints=!1,this.elastic=dN(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fs(t))return!1;const r=t.current;Vr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=nN(r,o.root,this.visualElement.getTransformPagePoint());let a=lN(o.layout.layoutBox,i);if(n){const l=n(Yj(a));this.hasMutatedConstraints=!!l,l&&(a=Fb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ln(d=>{if(!rc(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Qd(this.visualElement,t),r.start(xf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ln(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!rc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Et(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!fs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=cN({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ln(a=>{if(!rc(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Et(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;fN.set(this.visualElement,this);const t=this.visualElement.current,n=Ui(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();fs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),wt.read(r);const a=Wi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ln(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Ef,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function rc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mN extends Hr{constructor(t){super(t),this.removeGroupControls=Bn,this.removeListeners=Bn,this.controls=new pN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const cv=e=>(t,n)=>{e&&wt.postRender(()=>e(t,n))};class gN extends Hr{constructor(){super(...arguments),this.removePointerDownListener=Bn}onPointerDown(t){this.session=new nv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ev(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cv(t),onStart:cv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&wt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ui(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 oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const n=uv(e,t.target.x),r=uv(e,t.target.y);return`${n}% ${r}%`}},yN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ur.parse(e);if(o.length>5)return r;const i=Ur.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Et(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class bN extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;$I(vN),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),oc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||wt.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dv(e){const[t,n]=ey(),r=R.useContext(wd);return g.jsx(bN,{...e,layoutGroup:r,switchLayoutGroup:R.useContext(Sy),isPresent:t,safeToRemove:n})}const vN={borderRadius:{...Yi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yi,borderTopRightRadius:Yi,borderBottomLeftRadius:Yi,borderBottomRightRadius:Yi,boxShadow:yN};function xN(e,t,n){const r=Xt(e)?e:Di(e);return r.start(xf("",r,t,n)),r.animation}function wN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const CN=(e,t)=>e.depth-t.depth;class SN{constructor(){this.children=[],this.isDirty=!1}add(t){Od(this.children,t),this.isDirty=!0}remove(t){kd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CN),this.isDirty=!1,this.children.forEach(t)}}function TN(e,t){const n=ar.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wr(r),e(i-t))};return wt.read(r,!0),()=>Wr(r)}const fv=["TopLeft","TopRight","BottomLeft","BottomRight"],ON=fv.length,pv=e=>typeof e=="string"?parseFloat(e):e,hv=e=>typeof e=="number"||_e.test(e);function kN(e,t,n,r,o,i){o?(e.opacity=Et(0,n.opacity??1,EN(r)),e.opacityExit=Et(t.opacity??1,0,PN(r))):i&&(e.opacity=Et(t.opacity??1,n.opacity??1,r));for(let a=0;a<ON;a++){const l=`border${fv[a]}Radius`;let c=mv(t,l),u=mv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||hv(c)===hv(u)?(e[l]=Math.max(Et(pv(c),pv(u),r),0),(lr.test(u)||lr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Et(t.rotate||0,n.rotate||0,r))}function mv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EN=gv(0,.5,Ky),PN=gv(.5,.95,Bn);function gv(e,t,n){return r=>r<e?0:r>t?1:n(Ei(e,t,r))}function yv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){yv(e.x,t.x),yv(e.y,t.y)}function bv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vv(e,t,n,r,o){return e-=t,e=nc(e,1/n,r),o!==void 0&&(e=nc(e,1/o,r)),e}function MN(e,t=0,n=1,r=.5,o,i=e,a=e){if(lr.test(t)&&(t=parseFloat(t),t=Et(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Et(i.min,i.max,r);e===i&&(l-=t),e.min=vv(e.min,t,n,l,o),e.max=vv(e.max,t,n,l,o)}function xv(e,t,[n,r,o],i,a){MN(e,t[n],t[r],t[o],t.scale,i,a)}const RN=["x","scaleX","originX"],DN=["y","scaleY","originY"];function wv(e,t,n,r){xv(e.x,t,RN,n?n.x:void 0,r?r.x:void 0),xv(e.y,t,DN,n?n.y:void 0,r?r.y:void 0)}function Cv(e){return e.translate===0&&e.scale===1}function Sv(e){return Cv(e.x)&&Cv(e.y)}function Tv(e,t){return e.min===t.min&&e.max===t.max}function IN(e,t){return Tv(e.x,t.x)&&Tv(e.y,t.y)}function Ov(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kv(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Ev(e){return on(e.x)/on(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class AN{constructor(){this.members=[]}add(t){Od(this.members,t),t.scheduleRender()}remove(t){if(kd(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Pf=["","X","Y","Z"],NN={visibility:"hidden"},Mv=1e3;let $N=0;function Mf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Wy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",wt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rv(r)}function Dv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=$N++,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,this.nodes.forEach(BN),this.nodes.forEach(UN),this.nodes.forEach(HN),this.nodes.forEach(LN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new SN)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Md),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=wN(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=TN(p,250),oc.hasAnimatedSinceResize&&(oc.hasAnimatedSinceResize=!1,this.nodes.forEach(Av))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||XN,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!kv(this.targetLayout,y),C=!p&&h;if(this.options.layoutRoot||this.resumeFrom||C||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,C);const O={...Ad(m,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else p||Av(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Wr(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(qN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Iv);return}this.isUpdating||this.nodes.forEach(WN),this.isUpdating=!1,this.nodes.forEach(zN),this.nodes.forEach(_N),this.nodes.forEach(FN),this.clearAllSnapshots();const l=ar.now();qt.delta=Or(0,1e3/60,l-qt.timestamp),qt.timestamp=l,qt.isProcessing=!0,$d.update.process(qt),$d.preRender.process(qt),$d.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VN),this.sharedNodes.forEach(YN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!on(this.snapshot.measuredBox.x)&&!on(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Sv(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||ho(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),ZN(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return _t();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(JN))){const{scroll:d}=this.root;d&&(bs(l.x,d.offset.x),bs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=_t();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),bs(l.x,f.offset.x),bs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=_t();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&vs(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ho(d.latestValues)&&vs(c,d.latestValues)}return ho(this.latestValues)&&vs(c,this.latestValues),c}removeTransform(a){const l=_t();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ho(u.latestValues))continue;Sf(u.latestValues)&&u.updateSnapshot();const d=_t(),f=u.measurePageBox();Vn(d,f),wv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ho(this.latestValues)&&wv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),qi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_t(),this.targetWithTransforms=_t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Kb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),qi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Sf(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;tN(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=_t());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bv(this.prevProjectionDelta.x,this.projectionDelta.x),bv(this.prevProjectionDelta.y,this.projectionDelta.y)),Hi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ys(),this.projectionDelta=ys(),this.projectionDeltaWithTransform=ys()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=_t(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,b=this.getStack(),x=!b||b.members.length<=1,w=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(KN));this.animationProgress=0;let C;this.mixTargetDelta=O=>{const v=O/1e3;jv(f.x,a.x,v),jv(f.y,a.y,v),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GN(this.relativeTarget,this.relativeTargetOrigin,p,v),C&&IN(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=_t()),Vn(C,this.relativeTarget)),m&&(this.animationValues=d,kN(d,u,this.latestValues,v,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=wt.update(()=>{oc.hasAnimatedSinceResize=!0,this.currentAnimation=xN(0,Mv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Mv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Bv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||_t();const f=on(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=on(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),vs(l,d),Hi(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new AN),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Mf("z",a,u,this.animationValues);for(let d=0;d<Pf.length;d++)Mf(`rotate${Pf[d]}`,a,u,this.animationValues),Mf(`skew${Pf[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return NN;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Zl(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Zl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ho(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=jN(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in Ai){if(d[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:b}=Ai[h],x=l.transform==="none"?d[h]:y(d[h],u);if(m){const w=m.length;for(let C=0;C<w;C++)l[m[C]]=x}else b?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?Zl(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Iv),this.root.sharedNodes.clear()}}}function _N(e){e.updateLayout()}function FN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=on(p);p.min=r[f].min,p.max=p.min+h}):Bv(i,t.layoutBox,r)&&Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=on(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=ys();Hi(l,r,t.layoutBox);const c=ys();a?Hi(c,e.applyTransform(o,!0),t.measuredBox):Hi(c,r,t.layoutBox);const u=!Sv(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=_t();qi(y,t.layoutBox,p.layoutBox);const m=_t();qi(m,r,h.layoutBox),kv(y,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function BN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function LN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VN(e){e.clearSnapshot()}function Iv(e){e.clearMeasurements()}function WN(e){e.isLayoutDirty=!1}function zN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Av(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UN(e){e.resolveTargetDelta()}function HN(e){e.calcProjection()}function qN(e){e.resetSkewAndRotation()}function YN(e){e.removeLeadSnapshot()}function jv(e,t,n){e.translate=Et(t.translate,0,n),e.scale=Et(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nv(e,t,n,r){e.min=Et(t.min,n.min,r),e.max=Et(t.max,n.max,r)}function GN(e,t,n,r){Nv(e.x,t.x,n.x,r),Nv(e.y,t.y,n.y,r)}function KN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const XN={duration:.45,ease:[.4,0,.1,1]},$v=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_v=$v("applewebkit/")&&!$v("chrome/")?Math.round:Bn;function Fv(e){e.min=_v(e.min),e.max=_v(e.max)}function ZN(e){Fv(e.x),Fv(e.y)}function Bv(e,t,n){return e==="position"||e==="preserve-aspect"&&!Qj(Ev(t),Ev(n),.2)}function JN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const QN=Dv({attachResizeListener:(e,t)=>Wi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rf={current:void 0},Lv=Dv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rf.current){const e=new QN({});e.mount(window),e.setOptions({layoutScroll:!0}),Rf.current=e}return Rf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),e6={pan:{Feature:gN},drag:{Feature:mN,ProjectionNode:Lv,MeasureLayout:dv}};function Vv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&wt.postRender(()=>i(t,zi(t)))}class t6 extends Hr{mount(){const{current:t}=this.node;t&&(this.unmount=fI(t,(n,r)=>(Vv(this.node,r,"Start"),o=>Vv(this.node,o,"End"))))}unmount(){}}class n6 extends Hr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=Li(Wi(this.node.current,"focus",()=>this.onFocus()),Wi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Wv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&wt.postRender(()=>i(t,zi(t)))}class r6 extends Hr{mount(){const{current:t}=this.node;t&&(this.unmount=gI(t,(n,r)=>(Wv(this.node,r,"Start"),(o,{success:i})=>Wv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Df=new WeakMap,If=new WeakMap,o6=e=>{const t=Df.get(e.target);t&&t(e)},s6=e=>{e.forEach(o6)};function i6({root:e,...t}){const n=e||document;If.has(n)||If.set(n,{});const r=If.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(s6,{root:e,...t})),r[o]}function a6(e,t,n){const r=i6(t);return Df.set(e,n),r.observe(e),()=>{Df.delete(e),r.unobserve(e)}}const l6={some:0,all:1};class c6 extends Hr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:l6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return a6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(u6(t,n))&&this.startObserver()}unmount(){}}function u6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const d6={inView:{Feature:c6},tap:{Feature:r6},focus:{Feature:n6},hover:{Feature:t6}},f6={layout:{ProjectionNode:Lv,MeasureLayout:dv}},Af={current:null},zv={current:!1};function p6(){if(zv.current=!0,!!Sd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Af.current=e.matches;e.addListener(t),t()}else Af.current=!1}const h6=[...gb,Zt,Ur],m6=e=>h6.find(mb(e)),g6=new WeakMap;function y6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Wl(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Xt(i))e.addValue(r,Di(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Di(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class b6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=ar.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,wt.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Kl(n),this.isVariantNode=xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Xt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,g6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),zv.current||p6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Af.current,process.env.NODE_ENV!=="production"&&Wl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Wr(this.notifyUpdate),Wr(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 r=lo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&wt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),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 ds){const n=ds[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_t()}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 r=0;r<Uv.length;r++){const o=Uv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=y6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Di(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pb(r)||Zy(r))?r=parseFloat(r):!m6(r)&&Ur.test(n)&&(r=sb(t,n)),this.setBaseTarget(t,Xt(r)?r.get():r)),Xt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Xd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Xt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Md),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hv extends b6{constructor(){super(...arguments),this.KeyframeResolver=bb}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function v6(e){return window.getComputedStyle(e)}class x6 extends Hv{constructor(){super(...arguments),this.type="html",this.renderInstance=$y}readValueFromInstance(t,n){if(lo.has(n))return AA(t,n);{const r=v6(t),o=(Wd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Hd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jd(t,n,r)}}class w6 extends Hv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_t,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ny(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lo.has(n)){const r=ob(n);return r&&r.default||0}return n=_y.has(n)?n:Vd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return By(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&wt.postRender(this.updateDimensions)}build(t,n,r){Gd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Fy(t,n,r,o)}mount(t){this.isSVGTag=Kd(t.tagName),super.mount(t)}}const C6=(e,t)=>Yd(e)?new w6(t):new x6(t,{allowProjection:e!==R.Fragment}),S6=iA({...Hj,...d6,...e6,...f6},C6),Gi=SI(S6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const{isPrimary:a}=i,l=n||Ke[e],u=It().palette.mode==="dark",d=a?"invert(100%) brightness(200%)":u?"invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%)":"invert(48%) sepia(0%) saturate(0%) hue-rotate(181deg) brightness(95%) contrast(90%)";return l?g.jsx("img",{src:l,alt:`${e}-icon`,style:{filter:d,...o},...i}):null},T6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=R.useRef(null);return R.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),g.jsx(rs,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>g.jsx(Nr,{...a,timeout:100,children:g.jsx(ye,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:g.jsx(ye,{children:r==null?void 0:r.map((l,c)=>g.jsx(Fr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:g.jsx(ft,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:g.jsx(ft,{direction:"row",alignItems:"center",gap:"1rem",children:g.jsx(nt,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},qv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var y,m;const i=It();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=R.useState(!1),u=R.useRef(null),[d,f]=R.useState(!1),[p,h]=R.useState(e==null?void 0:e.isAnimate);return g.jsxs(Gi.button,{ref:u,onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>p&&c(!1),initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(y=e==null?void 0:e.hover)==null?void 0:y.backgroundColor,color:(m=e==null?void 0:e.hover)==null?void 0:m.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?`0.1rem solid ${i.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(b=>!b),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&g.jsxs(Gi.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[g.jsx(nt,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?g.jsx(hn,{url:Ke.ArrowUpLight}):g.jsx(hn,{url:Ke.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),g.jsx(T6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};qv.propTypes={styles:s.object.isRequired,label:s.string};function mo({...e}){return g.jsx(Fn,{children:g.jsx(qv,{...e})})}function sc({...e}){return g.jsx(Fn,{children:g.jsx(U0,{id:e==null?void 0:e.id,icon:g.jsx(ye,{component:"img",src:Ke.Uncheck}),checkedIcon:g.jsx(ye,{component:"img",src:Ke.Check}),...e})})}const Yv=new Set;function O6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
302
+ `),()=>{document.head.removeChild(h)}},[t]),g.jsx(K5,{isPresent:t,childRef:o,sizeRef:i,children:S.cloneElement(e,{ref:o})})}const Z5=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:l})=>{const c=Cd(J5),u=R.useId(),d=R.useCallback(p=>{c.set(p,!0);for(const h of c.values())if(!h)return;r&&r()},[c,r]),f=R.useMemo(()=>({id:u,initial:t,isPresent:n,custom:o,onExitComplete:d,register:p=>(c.set(p,!1),()=>c.delete(p))}),i?[Math.random(),d]:[n,d]);return R.useMemo(()=>{c.forEach((p,h)=>c.set(h,!1))},[n]),S.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(X5,{isPresent:n,anchorX:l,children:e})),g.jsx(Ll.Provider,{value:f,children:e})};function J5(){return new Map}function ey(e=!0){const t=R.useContext(Ll);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=R.useId();R.useEffect(()=>{if(e)return o(i)},[e]);const a=R.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Vl=e=>e.key||"";function ty(e){const t=[];return R.Children.forEach(e,n=>{R.isValidElement(n)&&t.push(n)}),t}const Q5=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=ey(a),d=R.useMemo(()=>ty(e),[e]),f=a&&!c?[]:d.map(Vl),p=R.useRef(!0),h=R.useRef(d),y=Cd(()=>new Map),[m,b]=R.useState(d),[x,w]=R.useState(d);Qg(()=>{p.current=!1,h.current=d;for(let v=0;v<x.length;v++){const k=Vl(x[v]);f.includes(k)?y.delete(k):y.get(k)!==!0&&y.set(k,!1)}},[x,f.length,f.join("-")]);const C=[];if(d!==m){let v=[...d];for(let k=0;k<x.length;k++){const E=x[k],M=Vl(E);f.includes(M)||(v.splice(k,0,E),C.push(E))}return i==="wait"&&C.length&&(v=C),w(ty(v)),b(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:O}=R.useContext(wd);return g.jsx(g.Fragment,{children:x.map(v=>{const k=Vl(v),E=a&&!c?!1:d===x||f.includes(k),M=()=>{if(y.has(k))y.set(k,!0);else return;let D=!0;y.forEach(A=>{A||(D=!1)}),D&&(O==null||O(),w(h.current),a&&(u==null||u()),r&&r())};return g.jsx(Z5,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,onExitComplete:E?void 0:M,anchorX:l,children:v},k)})})};function Od(e,t){e.indexOf(t)===-1&&e.push(t)}function kd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let us=()=>{},Vr=()=>{};process.env.NODE_ENV!=="production"&&(us=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Vr=(e,t)=>{if(!e)throw new Error(t)});const Ed={useManualTiming:!1};function Pd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bn=e=>e,Ei=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Md{constructor(){this.subscriptions=[]}add(t){return Od(this.subscriptions,t),()=>kd(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=e=>e*1e3,ir=e=>e/1e3;function ny(e,t){return t?e*(1e3/t):0}const ry=new Set;function Wl(e,t,n){e||ry.has(t)||(console.warn(t),ry.add(t))}const eI=Pd(()=>window.ScrollTimeline!==void 0);class tI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(eI()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].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;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class nI extends tI{then(t,n){return this.finished.finally(t).then(()=>{})}}const oy={value:null},Rd=e=>Array.isArray(e)&&typeof e[0]=="number",rI={};function oI(e,t){const n=Pd(e);return()=>rI[t]??n()}const Pi=oI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sy=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=e(i/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Mi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Dd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mi([0,.65,.55,1]),circOut:Mi([.55,0,1,.45]),backIn:Mi([.31,.01,.66,-.59]),backOut:Mi([.33,1.53,.69,.99])};function iy(e,t){if(e)return typeof e=="function"&&Pi()?sy(e,t):Rd(e)?Mi(e):Array.isArray(e)?e.map(n=>iy(n,t)||Dd.easeOut):Dd[e]}function sI(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=iy(l,o);return Array.isArray(f)&&(d.easing=f),e.animate(d,{delay:r,duration:o,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function Id(e){return typeof e=="function"&&"applyToOptions"in e}function Ad(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const zl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zl;)t+=n,r=e.next(t);return t>=zl?1/0:t}function iI(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),zl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:ir(o)}}function ay(e){return!!(typeof e=="function"&&Pi()||!e||typeof e=="string"&&(e in Dd||Pi())||Rd(e)||Array.isArray(e)&&e.every(ay))}function ly(e,t){e.timeline=t,e.onfinish=null}const Ul=["read","resolveKeyframes","update","preRender","render","postRender"];function aI(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){a.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,p=!1,h=!1)=>{const m=h&&o?n:r;return p&&a.add(f),m.has(f)||m.add(f),f},cancel:f=>{r.delete(f),a.delete(f)},process:f=>{if(l=f,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),t&&oy.value&&oy.value.frameloop[t].push(c),c=0,n.clear(),o=!1,i&&(i=!1,d.process(f))}};return d}const lI=40;function cy(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ul.reduce((x,w)=>(x[w]=aI(i,t?w:void 0),x),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=a,h=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,lI),1),o.timestamp=x,o.isProcessing=!0,l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},y=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Ul.reduce((x,w)=>{const C=a[w];return x[w]=(O,v=!1,k=!1)=>(n||y(),C.schedule(O,v,k)),x},{}),cancel:x=>{for(let w=0;w<Ul.length;w++)a[Ul[w]].cancel(x)},state:o,steps:a}}const{schedule:Nd}=cy(queueMicrotask,!1),{schedule:wt,cancel:Wr,state:qt,steps:$d}=cy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bn,!0);let Hl;function cI(){Hl=void 0}const ar={now:()=>(Hl===void 0&&ar.set(qt.isProcessing||Ed.useManualTiming?qt.timestamp:performance.now()),Hl),set:e=>{Hl=e,queueMicrotask(cI)}},Yn={x:!1,y:!1};function uy(){return Yn.x||Yn.y}function uI(e){return e==="x"||e==="y"?Yn[e]?null:(Yn[e]=!0,()=>{Yn[e]=!1}):Yn.x||Yn.y?null:(Yn.x=Yn.y=!0,()=>{Yn.x=Yn.y=!1})}function dI(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function dy(e,t){const n=dI(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function fy(e){return!(e.pointerType==="touch"||uy())}function fI(e,t,n={}){const[r,o,i]=dy(e,n),a=l=>{if(!fy(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{fy(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(l=>{l.addEventListener("pointerenter",a,o)}),i}const py=(e,t)=>t?e===t?!0:py(e,t.parentElement):!1,_d=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pI=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hI(e){return pI.has(e.tagName)||e.tabIndex!==-1}const Ri=new WeakSet;function hy(e){return t=>{t.key==="Enter"&&e(t)}}function Fd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=hy(()=>{if(Ri.has(n))return;Fd(n,"down");const o=hy(()=>{Fd(n,"up")}),i=()=>Fd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function my(e){return _d(e)&&!uy()}function gI(e,t,n={}){const[r,o,i]=dy(e,n),a=l=>{const c=l.currentTarget;if(!my(l)||Ri.has(c))return;Ri.add(c);const u=t(c,l),d=(h,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!my(h)||!Ri.has(c))&&(Ri.delete(c),typeof u=="function"&&u(h,{success:y}))},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||py(c,h.target))},p=h=>{d(h,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",p,o)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,o),l instanceof HTMLElement&&(l.addEventListener("focus",u=>mI(u,o)),!hI(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}const gy=30,yI=e=>!isNaN(parseFloat(e));class bI{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=ar.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&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=ar.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Wl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Md);const r=this.events[t].add(n);return t==="change"?()=>{r(),wt.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=ar.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>gy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,gy);return ny(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 Di(e,t){return new bI(e,t)}const yy=R.createContext({strict:!1}),by={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ds={};for(const e in by)ds[e]={isEnabled:t=>by[e].some(n=>!!t[n])};function vI(e){for(const t in e)ds[t]={...ds[t],...e[t]}}const xI=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 ql(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xI.has(e)}let vy=e=>!ql(e);function wI(e){e&&(vy=t=>t.startsWith("on")?!ql(t):e(t))}try{wI(require("@emotion/is-prop-valid").default)}catch{}function CI(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(vy(o)||n===!0&&ql(o)||!t&&!ql(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function SI(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Wl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Yl=R.createContext({});function Gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ii(e){return typeof e=="string"||Array.isArray(e)}const Bd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ld=["initial",...Bd];function Kl(e){return Gl(e.animate)||Ld.some(t=>Ii(e[t]))}function xy(e){return!!(Kl(e)||e.variants)}function TI(e,t){if(Kl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ii(n)?n:void 0,animate:Ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function OI(e){const{initial:t,animate:n}=TI(e,R.useContext(Yl));return R.useMemo(()=>({initial:t,animate:n}),[wy(t),wy(n)])}function wy(e){return Array.isArray(e)?e.join(" "):e}const kI=Symbol.for("motionComponentSymbol");function fs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EI(e,t,n){return R.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):fs(n)&&(n.current=r))},[t])}const Vd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cy="data-"+Vd("framerAppearId"),Sy=R.createContext({});function PI(e,t,n,r,o){var m,b;const{visualElement:i}=R.useContext(Yl),a=R.useContext(yy),l=R.useContext(Ll),c=R.useContext(Td).reducedMotion,u=R.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,f=R.useContext(Sy);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&MI(u.current,n,o,f);const p=R.useRef(!1);R.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const h=n[Cy],y=R.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return Qg(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),Nd.render(d.render),y.current&&d.animationState&&d.animationState.animateChanges())}),R.useEffect(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),y.current=!1))}),d}function MI(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ty(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||l&&fs(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ty(e){if(e)return e.options.allowProjection!==!1?e.projection:Ty(e.parent)}function RI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&vI(e);function i(l,c){let u;const d={...R.useContext(Td),...l,layoutId:DI(l)},{isStatic:f}=d,p=OI(l),h=r(l,f);if(!f&&Sd){II(d,e);const y=AI(d);u=y.MeasureLayout,p.visualElement=PI(o,h,d,t,y.ProjectionNode)}return g.jsxs(Yl.Provider,{value:p,children:[u&&p.visualElement?g.jsx(u,{visualElement:p.visualElement,...d}):null,n(o,l,EI(h,p.visualElement,c),h,f,p.visualElement)]})}i.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const a=R.forwardRef(i);return a[kI]=o,a}function DI({layoutId:e}){const t=R.useContext(wd).id;return t&&e!==void 0?t+"-"+e:e}function II(e,t){const n=R.useContext(yy).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?us(!1,r):Vr(!1,r)}}function AI(e){const{drag:t,layout:n}=ds;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Oy=e=>t=>typeof t=="string"&&t.startsWith(e),Wd=Oy("--"),jI=Oy("var(--"),zd=e=>jI(e)?NI.test(e.split("/*")[0].trim()):!1,NI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ai={};function $I(e){for(const t in e)Ai[t]=e[t],Wd(t)&&(Ai[t].isCSSVariable=!0)}const ps=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lo=new Set(ps);function ky(e,{layout:t,layoutId:n}){return lo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ai[e]||e==="opacity")}const Xt=e=>!!(e&&e.getVelocity),Ey=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Or=(e,t,n)=>n>t?t:n<e?e:n,hs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ji={...hs,transform:e=>Or(0,1,e)},Xl={...hs,default:1},Ni=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zr=Ni("deg"),lr=Ni("%"),_e=Ni("px"),_I=Ni("vh"),FI=Ni("vw"),Py={...lr,parse:e=>lr.parse(e)/100,transform:e=>lr.transform(e*100)},BI={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,radius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,backgroundPositionX:_e,backgroundPositionY:_e},LI={rotate:zr,rotateX:zr,rotateY:zr,rotateZ:zr,scale:Xl,scaleX:Xl,scaleY:Xl,scaleZ:Xl,skew:zr,skewX:zr,skewY:zr,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:ji,originX:Py,originY:Py,originZ:_e},My={...hs,transform:Math.round},Ud={...BI,...LI,zIndex:My,size:_e,fillOpacity:ji,strokeOpacity:ji,numOctaves:My},VI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},WI=ps.length;function zI(e,t,n){let r="",o=!0;for(let i=0;i<WI;i++){const a=ps[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Ey(l,Ud[a]);if(!c){o=!1;const d=VI[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Hd(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(lo.has(c)){a=!0;continue}else if(Wd(c)){o[c]=u;continue}else{const d=Ey(u,Ud[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=zI(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ry(e,t,n){for(const r in t)!Xt(t[r])&&!ky(r,n)&&(e[r]=t[r])}function UI({transformTemplate:e},t){return R.useMemo(()=>{const n=qd();return Hd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function HI(e,t){const n=e.style||{},r={};return Ry(r,n,e),Object.assign(r,UI(e,t)),r}function qI(e,t){const n={},r=HI(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const YI=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(YI.indexOf(e)>-1||/[A-Z]/u.test(e))}const GI={offset:"stroke-dashoffset",array:"stroke-dasharray"},KI={offset:"strokeDashoffset",array:"strokeDasharray"};function XI(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?GI:KI;e[i.offset]=_e.transform(-r);const a=_e.transform(t),l=_e.transform(n);e[i.array]=`${a} ${l}`}function Dy(e,t,n){return typeof e=="string"?e:_e.transform(t+n*e)}function ZI(e,t,n){const r=Dy(t,e.x,e.width),o=Dy(n,e.y,e.height);return`${r} ${o}`}function Gd(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Hd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:y}=e;p.transform&&(y&&(h.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=ZI(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),a!==void 0&&XI(p,a,l,c,!1)}const Iy=()=>({...qd(),attrs:{}}),Kd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function JI(e,t,n,r){const o=R.useMemo(()=>{const i=Iy();return Gd(i,t,Kd(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ry(i,e.style,e),o.style={...i,...o.style}}return o}function QI(e=!1){return(n,r,o,{latestValues:i},a)=>{const c=(Yd(n)?JI:qI)(r,i,a,n),u=CI(r,typeof n=="string",e),d=n!==R.Fragment?{...u,...c,ref:o}:{},{children:f}=r,p=R.useMemo(()=>Xt(f)?f.get():f,[f]);return R.createElement(n,{...d,children:p})}}function Ay(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xd(e,t,n,r){if(typeof t=="function"){const[o,i]=Ay(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Ay(r);t=t(n!==void 0?n:e.custom,o,i)}return t}const Zd=e=>Array.isArray(e),eA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tA=e=>Zd(e)?e[e.length-1]||0:e;function Zl(e){const t=Xt(e)?e.get():e;return eA(t)?t.toValue():t}function nA({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:rA(r,o,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const jy=e=>(t,n)=>{const r=R.useContext(Yl),o=R.useContext(Ll),i=()=>nA(e,t,r,o);return n?i():Cd(i)};function rA(e,t,n,r){const o={},i=r(e,{});for(const p in i)o[p]=Zl(i[p]);let{initial:a,animate:l}=e;const c=Kl(e),u=xy(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Gl(f)){const p=Array.isArray(f)?f:[f];for(let h=0;h<p.length;h++){const y=Xd(e,p[h]);if(y){const{transitionEnd:m,transition:b,...x}=y;for(const w in x){let C=x[w];if(Array.isArray(C)){const O=d?C.length-1:0;C=C[O]}C!==null&&(o[w]=C)}for(const w in m)o[w]=m[w]}}}return o}function Jd(e,t,n){var i;const{style:r}=e,o={};for(const a in r)(Xt(r[a])||t.style&&Xt(t.style[a])||ky(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}const oA={useVisualState:jy({scrapeMotionValuesFromProps:Jd,createRenderState:qd})};function Ny(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function $y(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const _y=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 Fy(e,t,n,r){$y(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(_y.has(o)?o:Vd(o),t.attrs[o])}function By(e,t,n){const r=Jd(e,t,n);for(const o in e)if(Xt(e[o])||Xt(t[o])){const i=ps.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}const Ly=["x","y","width","height","cx","cy","r"],sA={useVisualState:jy({scrapeMotionValuesFromProps:By,createRenderState:Iy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in o)if(lo.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<Ly.length;l++){const c=Ly[l];e[c]!==t[c]&&(a=!0)}a&&wt.read(()=>{Ny(n,r),wt.render(()=>{Gd(r,o,Kd(n.tagName),e.transformTemplate),Fy(n,r)})})}})};function iA(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const a={...Yd(r)?sA:oA,preloadedFeatures:e,useRender:QI(o),createVisualElement:t,Component:r};return RI(a)}}function $i(e,t,n){const r=e.getProps();return Xd(r,t,n!==void 0?n:r.custom,e)}const Vy=new Set(["width","height","top","left","right","bottom",...ps]);function aA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Di(n))}function lA(e,t){const n=$i(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const l=tA(i[a]);aA(e,a,l)}}function cA(e){return!!(Xt(e)&&e.add)}function Qd(e,t){const n=e.getValue("willChange");if(cA(n))return n.add(t);if(!n&&Ed.WillChange){const r=new Ed.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Wy(e){return e.props[Cy]}const zy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uA=1e-7,dA=12;function fA(e,t,n,r,o){let i,a,l=0;do a=t+(n-t)/2,i=zy(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>uA&&++l<dA);return a}function _i(e,t,n,r){if(e===t&&n===r)return Bn;const o=i=>fA(i,0,1,e,n);return i=>i===0||i===1?i:zy(o(i),t,r)}const Uy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Hy=e=>t=>1-e(1-t),qy=_i(.33,1.53,.69,.99),ef=Hy(qy),Yy=Uy(ef),Gy=e=>(e*=2)<1?.5*ef(e):.5*(2-Math.pow(2,-10*(e-1))),tf=e=>1-Math.sin(Math.acos(e)),Ky=Hy(tf),Xy=Uy(tf),Zy=e=>/^0[^.\s]+$/u.test(e);function pA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zy(e):!0}const Fi=e=>Math.round(e*1e5)/1e5,nf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hA(e){return e==null}const mA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rf=(e,t)=>n=>!!(typeof n=="string"&&mA.test(n)&&n.startsWith(e)||t&&!hA(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jy=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,l]=r.match(nf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},gA=e=>Or(0,255,e),of={...hs,transform:e=>Math.round(gA(e))},co={test:rf("rgb","red"),parse:Jy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+of.transform(e)+", "+of.transform(t)+", "+of.transform(n)+", "+Fi(ji.transform(r))+")"};function yA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const sf={test:rf("#"),parse:yA,transform:co.transform},ms={test:rf("hsl","hue"),parse:Jy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+lr.transform(Fi(t))+", "+lr.transform(Fi(n))+", "+Fi(ji.transform(r))+")"},Zt={test:e=>co.test(e)||sf.test(e)||ms.test(e),parse:e=>co.test(e)?co.parse(e):ms.test(e)?ms.parse(e):sf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?co.transform(e):ms.transform(e)},bA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(nf))==null?void 0:t.length)||0)+(((n=e.match(bA))==null?void 0:n.length)||0)>0}const Qy="number",eb="color",xA="var",wA="var(",tb="${}",CA=/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 Bi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const l=t.replace(CA,c=>(Zt.test(c)?(r.color.push(i),o.push(eb),n.push(Zt.parse(c))):c.startsWith(wA)?(r.var.push(i),o.push(xA),n.push(c)):(r.number.push(i),o.push(Qy),n.push(parseFloat(c))),++i,tb)).split(tb);return{values:n,split:l,indexes:r,types:o}}function nb(e){return Bi(e).values}function rb(e){const{split:t,types:n}=Bi(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const l=n[a];l===Qy?i+=Fi(o[a]):l===eb?i+=Zt.transform(o[a]):i+=o[a]}return i}}const SA=e=>typeof e=="number"?0:e;function TA(e){const t=nb(e);return rb(e)(t.map(SA))}const Ur={test:vA,parse:nb,createTransformer:rb,getAnimatableNone:TA},OA=new Set(["brightness","contrast","saturate","opacity"]);function kA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(nf)||[];if(!r)return e;const o=n.replace(r,"");let i=OA.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const EA=/\b([a-z-]*)\(.*?\)/gu,af={...Ur,getAnimatableNone:e=>{const t=e.match(EA);return t?t.map(kA).join(" "):e}},PA={...Ud,color:Zt,backgroundColor:Zt,outlineColor:Zt,fill:Zt,stroke:Zt,borderColor:Zt,borderTopColor:Zt,borderRightColor:Zt,borderBottomColor:Zt,borderLeftColor:Zt,filter:af,WebkitFilter:af},ob=e=>PA[e];function sb(e,t){let n=ob(e);return n!==af&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const MA=new Set(["auto","none","0"]);function RA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!MA.has(i)&&Bi(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sb(n,o)}const uo=e=>e*180/Math.PI,lf=e=>{const t=uo(Math.atan2(e[1],e[0]));return cf(t)},DA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:lf,rotateZ:lf,skewX:e=>uo(Math.atan(e[1])),skewY:e=>uo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cf=e=>(e=e%360,e<0&&(e+=360),e),ib=lf,ab=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),IA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ab,scaleY:lb,scale:e=>(ab(e)+lb(e))/2,rotateX:e=>cf(uo(Math.atan2(e[6],e[5]))),rotateY:e=>cf(uo(Math.atan2(-e[2],e[0]))),rotateZ:ib,rotate:ib,skewX:e=>uo(Math.atan(e[4])),skewY:e=>uo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function cb(e){return e.includes("scale")?1:0}function uf(e,t){if(!e||e==="none")return cb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=IA,o=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=DA,o=l}if(!o)return cb(t);const i=r[t],a=o[1].split(",").map(jA);return typeof i=="function"?i(a):a[i]}const AA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uf(n,t)};function jA(e){return parseFloat(e.trim())}const ub=e=>e===hs||e===_e,NA=new Set(["x","y","z"]),$A=ps.filter(e=>!NA.has(e));function _A(e){const t=[];return $A.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gs={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:(e,{transform:t})=>uf(t,"x"),y:(e,{transform:t})=>uf(t,"y")};gs.translateX=gs.x,gs.translateY=gs.y;const fo=new Set;let df=!1,ff=!1;function db(){if(ff){const e=Array.from(fo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=_A(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{var l;(l=r.getValue(i))==null||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ff=!1,df=!1,fo.forEach(e=>e.complete()),fo.clear()}function fb(){fo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ff=!0)})}function FA(){fb(),db()}class pf{constructor(t,n,r,o,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(fo.add(this),df||(df=!0,wt.read(fb),wt.resolveKeyframes(db))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=o==null?void 0:o.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),fo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,fo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const pb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),BA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LA(e){const t=BA.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const VA=4;function hb(e,t,n=1){Vr(n<=VA,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=LA(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return pb(a)?parseFloat(a):a}return zd(o)?hb(o,t,n+1):o}const mb=e=>t=>t.test(e),gb=[hs,_e,lr,zr,FI,_I,{test:e=>e==="auto",parse:e=>e}],yb=e=>gb.find(mb(e));class bb extends pf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),zd(u))){const d=hb(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Vy.has(r)||t.length!==2)return;const[o,i]=t,a=yb(o),l=yb(i);if(a!==l)if(ub(a)&&ub(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)pA(t[o])&&r.push(o);r.length&&RA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=gs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const vb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function WA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=vb(o,t),l=vb(i,t);return us(a===l,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!a||!l?!1:WA(e)||(n==="spring"||Id(n))&&r}const UA=e=>e!==null;function Jl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(UA),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const HA=40;class xb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ar.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ar.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!zA(t,r,o,i))if(a)this.options.duration=0;else{c&&c(Jl(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Et=(e,t,n)=>e+(t-e)*n;function hf(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 qA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=hf(c,l,e+1/3),i=hf(c,l,e),a=hf(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Ql(e,t){return n=>n>0?t:e}const mf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},YA=[sf,co,ms],GA=e=>YA.find(t=>t.test(e));function wb(e){const t=GA(e);if(us(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ms&&(n=qA(n)),n}const Cb=(e,t)=>{const n=wb(e),r=wb(t);if(!n||!r)return Ql(e,t);const o={...n};return i=>(o.red=mf(n.red,r.red,i),o.green=mf(n.green,r.green,i),o.blue=mf(n.blue,r.blue,i),o.alpha=Et(n.alpha,r.alpha,i),co.transform(o))},KA=(e,t)=>n=>t(e(n)),Li=(...e)=>e.reduce(KA),gf=new Set(["none","hidden"]);function XA(e,t){return gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ZA(e,t){return n=>Et(e,t,n)}function yf(e){return typeof e=="number"?ZA:typeof e=="string"?zd(e)?Ql:Zt.test(e)?Cb:ej:Array.isArray(e)?Sb:typeof e=="object"?Zt.test(e)?Cb:JA:Ql}function Sb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>yf(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function JA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=yf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function QA(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],l=e.values[a]??0;n[o]=l,r[i]++}return n}const ej=(e,t)=>{const n=Ur.createTransformer(t),r=Bi(e),o=Bi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?gf.has(e)&&!o.values.length||gf.has(t)&&!r.values.length?XA(e,t):Li(Sb(QA(r,o),o.values),n):(us(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ql(e,t))};function Tb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Et(e,t,n):yf(e)(e,t)}const tj=5;function Ob(e,t,n){const r=Math.max(t-tj,0);return ny(n-e(r),t-r)}const Pt={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},kb=.001;function nj({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let o,i;us(e<=qn(Pt.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Or(Pt.minDamping,Pt.maxDamping,a),e=Or(Pt.minDuration,Pt.maxDuration,ir(e)),a<1?(o=u=>{const d=u*a,f=d*e,p=d-n,h=bf(u,a),y=Math.exp(-f);return kb-p/h*y},i=u=>{const f=u*a*e,p=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,y=Math.exp(-f),m=bf(Math.pow(u,2),a);return(-o(u)+kb>0?-1:1)*((p-h)*y)/m}):(o=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-.001+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=oj(o,i,l);if(e=qn(e),isNaN(c))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const rj=12;function oj(e,t,n){let r=n;for(let o=1;o<rj;o++)r=r-e(r)/t(r);return r}function bf(e,t){return e*Math.sqrt(1-t*t)}const sj=["duration","bounce"],ij=["stiffness","damping","mass"];function Eb(e,t){return t.some(n=>e[n]!==void 0)}function aj(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!Eb(e,ij)&&Eb(e,sj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Or(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Pt.mass,stiffness:o,damping:i}}else{const n=nj(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function ec(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:h}=aj({...n,velocity:-ir(n.velocity||0)}),y=p||0,m=u/(2*Math.sqrt(c*d)),b=a-i,x=ir(Math.sqrt(c/d)),w=Math.abs(b)<5;r||(r=w?Pt.restSpeed.granular:Pt.restSpeed.default),o||(o=w?Pt.restDelta.granular:Pt.restDelta.default);let C;if(m<1){const v=bf(x,m);C=k=>{const E=Math.exp(-m*x*k);return a-E*((y+m*x*b)/v*Math.sin(v*k)+b*Math.cos(v*k))}}else if(m===1)C=v=>a-Math.exp(-x*v)*(b+(y+x*b)*v);else{const v=x*Math.sqrt(m*m-1);C=k=>{const E=Math.exp(-m*x*k),M=Math.min(v*k,300);return a-E*((y+m*x*b)*Math.sinh(M)+v*b*Math.cosh(M))/v}}const O={calculatedDuration:h&&f||null,next:v=>{const k=C(v);if(h)l.done=v>=f;else{let E=0;m<1&&(E=v===0?qn(y):Ob(C,v,k));const M=Math.abs(E)<=r,D=Math.abs(a-k)<=o;l.done=M&&D}return l.value=l.done?a:k,l},toString:()=>{const v=Math.min(jd(O),zl),k=sy(E=>O.next(v*E).value,v,30);return v+"ms "+k},toTransition:()=>{}};return O}ec.applyToOptions=e=>{const t=iI(e,100,ec);return e.ease=Pi()?t.ease:"easeOut",e.duration=qn(t.duration),e.type="keyframes",e};function Pb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},h=M=>l!==void 0&&M<l||c!==void 0&&M>c,y=M=>l===void 0?c:c===void 0||Math.abs(l-M)<Math.abs(c-M)?l:c;let m=n*t;const b=f+m,x=a===void 0?b:a(b);x!==b&&(m=x-f);const w=M=>-m*Math.exp(-M/r),C=M=>x+w(M),O=M=>{const D=w(M),A=C(M);p.done=Math.abs(D)<=u,p.value=p.done?x:A};let v,k;const E=M=>{h(p.value)&&(v=M,k=ec({keyframes:[p.value,y(p.value)],velocity:Ob(C,M,p.value),damping:o,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:M=>{let D=!1;return!k&&v===void 0&&(D=!0,O(M),E(M)),v!==void 0&&M>=v?k.next(M-v):(!D&&O(M),p)}}}const lj=_i(.42,0,1,1),cj=_i(0,0,.58,1),Mb=_i(.42,0,.58,1),uj=e=>Array.isArray(e)&&typeof e[0]!="number",Rb={linear:Bn,easeIn:lj,easeInOut:Mb,easeOut:cj,circIn:tf,circInOut:Xy,circOut:Ky,backIn:ef,backInOut:Yy,backOut:qy,anticipate:Gy},Db=e=>{if(Rd(e)){Vr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return _i(t,n,r,o)}else if(typeof e=="string")return Vr(Rb[e]!==void 0,`Invalid easing type '${e}'`),Rb[e];return e};function dj(e,t,n){const r=[],o=n||Tb,i=e.length-1;for(let a=0;a<i;a++){let l=o(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||Bn:t;l=Li(c,l)}r.push(l)}return r}function fj(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Vr(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=dj(t,r,o),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Ei(e[f],e[f+1],d);return l[f](p)};return n?d=>u(Or(e[0],e[i-1],d)):u}function pj(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ei(0,t,r);e.push(Et(n,1,o))}}function hj(e){const t=[0];return pj(t,e.length-1),t}function mj(e,t){return e.map(n=>n*t)}function gj(e,t){return e.map(()=>t||Mb).splice(0,e.length-1)}function Vi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=uj(r)?r.map(Db):Db(r),i={done:!1,value:t[0]},a=mj(n&&n.length===t.length?n:hj(t),e),l=fj(a,t,{ease:Array.isArray(o)?o:gj(t,o)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const yj=e=>{const t=({timestamp:n})=>e(n);return{start:()=>wt.update(t,!0),stop:()=>Wr(t),now:()=>qt.isProcessing?qt.timestamp:ar.now()}},bj={decay:Pb,inertia:Pb,tween:Vi,keyframes:Vi,spring:ec},vj=e=>e/100;class vf extends xb{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:c}=this.options;c&&c()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,a=(o==null?void 0:o.KeyframeResolver)||pf,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=this.options,l=Id(n)?n:bj[n]||Vi;let c,u;process.env.NODE_ENV!=="production"&&l!==Vi&&Vr(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Vi&&typeof t[0]!="number"&&(c=Li(vj,Tb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=jd(d));const{calculatedDuration:f}=d,p=f+o,h=p*(r+1)-o;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,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:r}=this;if(!r){const{keyframes:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:h,repeatType:y,repeatDelay:m,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 x=this.currentTime-p*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,O=i;if(h){const M=Math.min(this.currentTime,d)/f;let D=Math.floor(M),A=M%1;!A&&M>=1&&(A=1),A===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(y==="reverse"?(A=1-A,m&&(A-=m/f)):y==="mirror"&&(O=a)),C=Or(0,1,A)*f}const v=w?{done:!1,value:c[0]}:O.next(C);l&&(v.value=l(v.value));let{done:k}=v;!w&&u!==null&&(k=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&o!==void 0&&(v.value=Jl(c,this.options,o)),b&&b(v.value),E&&this.finish(),v}get duration(){const{resolved:t}=this;return t?ir(t.calculatedDuration):0}get time(){return ir(this.currentTime)}set time(t){t=qn(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=ir(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=yj,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const xj=new Set(["opacity","clipPath","filter","transform"]),wj=Pd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tc=10,Cj=2e4;function Sj(e){return Id(e.type)||e.type==="spring"||!ay(e.ease)}function Tj(e,t){const n=new vf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<Cj;)r=n.sample(i),o.push(r.value),i+=tc;return{times:void 0,keyframes:o,duration:i-tc,ease:"linear"}}const Ib={anticipate:Gy,backInOut:Yy,circInOut:Xy};function Oj(e){return e in Ib}class Ab extends xb{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:i}=this.options;this.resolver=new bb(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Pi()&&Oj(i)&&(i=Ib[i]),Sj(this.options)){const{onComplete:f,onUpdate:p,motionValue:h,element:y,...m}=this.options,b=Tj(t,m);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,o=b.times,i=b.ease,a="keyframes"}const d=sI(l.owner.current,c,t,{...this.options,duration:r,times:o,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(ly(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Jl(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ir(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ir(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=qn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.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 Bn;const{animation:r}=n;ly(r,t)}return Bn}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:r,duration:o,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...h}=this.options,y=new vf({...h,keyframes:r,duration:o,type:i,ease:a,times:l,isGenerator:!0}),m=qn(this.time);u.setWithVelocity(y.sample(m-tc).value,y.sample(m).value,tc)}const{onStop:c}=this.options;c&&c(),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:r,repeatDelay:o,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return wj()&&r&&xj.has(r)&&(r!=="transform"||!u)&&!c&&!o&&i!=="mirror"&&a!==0&&l!=="inertia"}}const kj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ej=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pj={type:"keyframes",duration:.8},Mj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Rj=(e,{keyframes:t})=>t.length>2?Pj:lo.has(e)?e.startsWith("scale")?Ej(t[1]):kj:Mj;function Dj({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const xf=(e,t,n,r={},o,i)=>a=>{const l=Ad(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:o};Dj(l)||(d={...d,...Rj(e,d)}),d.duration&&(d.duration=qn(d.duration)),d.repeatDelay&&(d.repeatDelay=qn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const p=Jl(d.keyframes,l);if(p!==void 0)return wt.update(()=>{d.onUpdate(p),d.onComplete()}),new nI([])}return!i&&Ab.supports(d)?new Ab(d):new vf(d)};function Ij({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jb(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),p=l[d];if(p===void 0||u&&Ij(u,d))continue;const h={delay:n,...Ad(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const b=Wy(e);if(b){const x=window.MotionHandoffAnimation(b,d,wt);x!==null&&(h.startTime=x,y=!0)}}Qd(e,d),f.start(xf(d,f,p,e.shouldReduceMotion&&Vy.has(d)?{type:!1}:h,e,y));const m=f.animation;m&&c.push(m)}return a&&Promise.all(c).then(()=>{wt.update(()=>{a&&lA(e,a)})}),c}function wf(e,t,n={}){var c;const r=$i(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(jb(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=o;return Aj(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,d]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function Aj(e,t,n=0,r=0,o=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=o===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(jj).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(wf(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function jj(e,t){return e.sortNodePosition(t)}function Nj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>wf(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=wf(e,t,n);else{const o=typeof t=="function"?$i(e,t,n.custom):t;r=Promise.all(jb(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Nb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $j=Ld.length;function $b(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$b(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$j;n++){const r=Ld[n],o=e.props[r];(Ii(o)||o===!1)&&(t[r]=o)}return t}const _j=[...Bd].reverse(),Fj=Bd.length;function Bj(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nj(e,n,r)))}function Lj(e){let t=Bj(e),n=_b(),r=!0;const o=c=>(u,d)=>{var p;const f=$i(e,d,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:h,transitionEnd:y,...m}=f;u={...u,...m,...y}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=$b(e.parent)||{},f=[],p=new Set;let h={},y=1/0;for(let b=0;b<Fj;b++){const x=_j[b],w=n[x],C=u[x]!==void 0?u[x]:d[x],O=Ii(C),v=x===c?w.isActive:null;v===!1&&(y=b);let k=C===d[x]&&C!==u[x]&&O;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),w.protectedKeys={...h},!w.isActive&&v===null||!C&&!w.prevProp||Gl(C)||typeof C=="boolean")continue;const E=Vj(w.prevProp,C);let M=E||x===c&&w.isActive&&!k&&O||b>y&&O,D=!1;const A=Array.isArray(C)?C:[C];let $=A.reduce(o(x),{});v===!1&&($={});const{prevResolvedValues:I={}}=w,W={...I,...$},j=N=>{M=!0,p.has(N)&&(D=!0,p.delete(N)),w.needsAnimating[N]=!0;const L=e.getValue(N);L&&(L.liveStyle=!1)};for(const N in W){const L=$[N],H=I[N];if(h.hasOwnProperty(N))continue;let V=!1;Zd(L)&&Zd(H)?V=!Nb(L,H):V=L!==H,V?L!=null?j(N):p.add(N):L!==void 0&&p.has(N)?j(N):w.protectedKeys[N]=!0}w.prevProp=C,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),r&&e.blockInitialAnimation&&(M=!1),M&&(!(k&&E)||D)&&f.push(...A.map(N=>({animation:N,options:{type:x}})))}if(p.size){const b={};if(typeof u.initial!="boolean"){const x=$i(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}p.forEach(x=>{const w=e.getBaseTarget(x),C=e.getValue(x);C&&(C.liveStyle=!0),b[x]=w??null}),f.push({animation:b})}let m=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=_b(),r=!0}}}function Vj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Nb(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _b(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}class Hr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Wj extends Hr{constructor(t){super(t),t.animationState||(t.animationState=Lj(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gl(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.call(this)}}let zj=0;class Uj extends Hr{constructor(){super(...arguments),this.id=zj++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Hj={animation:{Feature:Wj},exit:{Feature:Uj}};function Wi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function zi(e){return{point:{x:e.pageX,y:e.pageY}}}const qj=e=>t=>_d(t)&&e(t,zi(t));function Ui(e,t,n,r){return Wi(e,t,qj(n),r)}function Fb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Yj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Gj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Bb=1e-4,Kj=1-Bb,Xj=1+Bb,Lb=.01,Zj=0-Lb,Jj=0+Lb;function on(e){return e.max-e.min}function Qj(e,t,n){return Math.abs(e-t)<=n}function Vb(e,t,n,r=.5){e.origin=r,e.originPoint=Et(t.min,t.max,e.origin),e.scale=on(n)/on(t),e.translate=Et(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kj&&e.scale<=Xj||isNaN(e.scale))&&(e.scale=1),(e.translate>=Zj&&e.translate<=Jj||isNaN(e.translate))&&(e.translate=0)}function Hi(e,t,n,r){Vb(e.x,t.x,n.x,r?r.originX:void 0),Vb(e.y,t.y,n.y,r?r.originY:void 0)}function Wb(e,t,n){e.min=n.min+t.min,e.max=e.min+on(t)}function eN(e,t,n){Wb(e.x,t.x,n.x),Wb(e.y,t.y,n.y)}function zb(e,t,n){e.min=t.min-n.min,e.max=e.min+on(t)}function qi(e,t,n){zb(e.x,t.x,n.x),zb(e.y,t.y,n.y)}const Ub=()=>({translate:0,scale:1,origin:0,originPoint:0}),ys=()=>({x:Ub(),y:Ub()}),Hb=()=>({min:0,max:0}),_t=()=>({x:Hb(),y:Hb()});function Ln(e){return[e("x"),e("y")]}function Cf(e){return e===void 0||e===1}function Sf({scale:e,scaleX:t,scaleY:n}){return!Cf(e)||!Cf(t)||!Cf(n)}function ho(e){return Sf(e)||qb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qb(e){return Yb(e.x)||Yb(e.y)}function Yb(e){return e&&e!=="0%"}function nc(e,t,n){const r=e-n,o=t*r;return n+o}function Gb(e,t,n,r,o){return o!==void 0&&(e=nc(e,o,r)),nc(e,n,r)+t}function Tf(e,t=0,n=1,r,o){e.min=Gb(e.min,t,n,r,o),e.max=Gb(e.max,t,n,r,o)}function Kb(e,{x:t,y:n}){Tf(e.x,t.translate,t.scale,t.originPoint),Tf(e.y,n.translate,n.scale,n.originPoint)}const Xb=.999999999999,Zb=1.0000000000001;function tN(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let l=0;l<o;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&vs(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Kb(e,a)),r&&ho(i.latestValues)&&vs(e,i.latestValues))}t.x<Zb&&t.x>Xb&&(t.x=1),t.y<Zb&&t.y>Xb&&(t.y=1)}function bs(e,t){e.min=e.min+t,e.max=e.max+t}function Jb(e,t,n,r,o=.5){const i=Et(e.min,e.max,o);Tf(e,t,n,i,r)}function vs(e,t){Jb(e.x,t.x,t.scaleX,t.scale,t.originX),Jb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qb(e,t){return Fb(Gj(e.getBoundingClientRect(),t))}function nN(e,t,n){const r=Qb(e,n),{scroll:o}=t;return o&&(bs(r.x,o.offset.x),bs(r.y,o.offset.y)),r}const ev=({current:e})=>e?e.ownerDocument.defaultView:null,tv=(e,t)=>Math.abs(e-t);function rN(e,t){const n=tv(e.x,t.x),r=tv(e.y,t.y);return Math.sqrt(n**2+r**2)}class nv{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=kf(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=rN(f.offset,{x:0,y:0})>=3;if(!p&&!h)return;const{point:y}=f,{timestamp:m}=qt;this.history.push({...y,timestamp:m});const{onStart:b,onMove:x}=this.handlers;p||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Of(p,this.transformPagePoint),wt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:h,onSessionEnd:y,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=kf(f.type==="pointercancel"?this.lastMoveEventInfo:Of(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,b),y&&y(f,b)},!_d(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=zi(t),l=Of(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=qt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,kf(l,this.history)),this.removeListeners=Li(Ui(this.contextWindow,"pointermove",this.handlePointerMove),Ui(this.contextWindow,"pointerup",this.handlePointerUp),Ui(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Wr(this.updatePoint)}}function Of(e,t){return t?{point:t(e.point)}:e}function rv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kf({point:e},t){return{point:e,delta:rv(e,ov(t)),offset:rv(e,oN(t)),velocity:sN(t,.1)}}function oN(e){return e[0]}function ov(e){return e[e.length-1]}function sN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ov(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const i=ir(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function iN(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Et(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Et(n,e,r.max):Math.min(e,n)),e}function sv(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 aN(e,{top:t,left:n,bottom:r,right:o}){return{x:sv(e.x,n,o),y:sv(e.y,t,r)}}function iv(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lN(e,t){return{x:iv(e.x,t.x),y:iv(e.y,t.y)}}function cN(e,t){let n=.5;const r=on(e),o=on(t);return o>r?n=Ei(t.min,t.max-r,e.min):r>o&&(n=Ei(e.min,e.max-o,t.min)),Or(0,1,n)}function uN(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 Ef=.35;function dN(e=Ef){return e===!1?e=0:e===!0&&(e=Ef),{x:av(e,"left","right"),y:av(e,"top","bottom")}}function av(e,t,n){return{min:lv(e,t),max:lv(e,n)}}function lv(e,t){return typeof e=="number"?e:e[t]||0}const fN=new WeakMap;class pN{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=_t(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zi(d).point)},i=(d,f)=>{const{drag:p,dragPropagation:h,onDragStart:y}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uI(p),!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),Ln(b=>{let x=this.getAxisMotionValue(b).get()||0;if(lr.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[b];C&&(x=on(C)*(parseFloat(x)/100))}}this.originPoint[b]=x}),y&&wt.postRender(()=>y(d,f)),Qd(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:p,dragDirectionLock:h,onDirectionLock:y,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(h&&this.currentDirection===null){this.currentDirection=hN(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Ln(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new nv(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ev(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&wt.postRender(()=>i(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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!rc(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=iN(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,o=this.constraints;t&&fs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aN(r.layoutBox,t):this.constraints=!1,this.elastic=dN(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ln(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fs(t))return!1;const r=t.current;Vr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=nN(r,o.root,this.visualElement.getTransformPagePoint());let a=lN(o.layout.layoutBox,i);if(n){const l=n(Yj(a));this.hasMutatedConstraints=!!l,l&&(a=Fb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ln(d=>{if(!rc(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=o?200:1e6,h=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Qd(this.visualElement,t),r.start(xf(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ln(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ln(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ln(n=>{const{drag:r}=this.getProps();if(!rc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:l}=o.layout.layoutBox[n];i.set(t[n]-Et(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!fs(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ln(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();o[a]=cN({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ln(a=>{if(!rc(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(Et(c,u,o[a]))})}addListeners(){if(!this.visualElement.current)return;fN.set(this.visualElement,this);const t=this.visualElement.current,n=Ui(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();fs(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),wt.read(r);const a=Wi(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ln(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=Ef,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function rc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function hN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class mN extends Hr{constructor(t){super(t),this.removeGroupControls=Bn,this.removeListeners=Bn,this.controls=new pN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const cv=e=>(t,n)=>{e&&wt.postRender(()=>e(t,n))};class gN extends Hr{constructor(){super(...arguments),this.removePointerDownListener=Bn}onPointerDown(t){this.session=new nv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ev(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:cv(t),onStart:cv(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&wt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=Ui(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 oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function uv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const n=uv(e,t.target.x),r=uv(e,t.target.y);return`${n}% ${r}%`}},yN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ur.parse(e);if(o.length>5)return r;const i=Ur.createTransformer(e),a=typeof o[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;o[0+a]/=l,o[1+a]/=c;const u=Et(l,c,.5);return typeof o[2+a]=="number"&&(o[2+a]/=u),typeof o[3+a]=="number"&&(o[3+a]/=u),i(o)}};class bN extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;$I(vN),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),oc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||wt.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function dv(e){const[t,n]=ey(),r=R.useContext(wd);return g.jsx(bN,{...e,layoutGroup:r,switchLayoutGroup:R.useContext(Sy),isPresent:t,safeToRemove:n})}const vN={borderRadius:{...Yi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yi,borderTopRightRadius:Yi,borderBottomLeftRadius:Yi,borderBottomRightRadius:Yi,boxShadow:yN};function xN(e,t,n){const r=Xt(e)?e:Di(e);return r.start(xf("",r,t,n)),r.animation}function wN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const CN=(e,t)=>e.depth-t.depth;class SN{constructor(){this.children=[],this.isDirty=!1}add(t){Od(this.children,t),this.isDirty=!0}remove(t){kd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CN),this.isDirty=!1,this.children.forEach(t)}}function TN(e,t){const n=ar.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Wr(r),e(i-t))};return wt.read(r,!0),()=>Wr(r)}const fv=["TopLeft","TopRight","BottomLeft","BottomRight"],ON=fv.length,pv=e=>typeof e=="string"?parseFloat(e):e,hv=e=>typeof e=="number"||_e.test(e);function kN(e,t,n,r,o,i){o?(e.opacity=Et(0,n.opacity??1,EN(r)),e.opacityExit=Et(t.opacity??1,0,PN(r))):i&&(e.opacity=Et(t.opacity??1,n.opacity??1,r));for(let a=0;a<ON;a++){const l=`border${fv[a]}Radius`;let c=mv(t,l),u=mv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||hv(c)===hv(u)?(e[l]=Math.max(Et(pv(c),pv(u),r),0),(lr.test(u)||lr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Et(t.rotate||0,n.rotate||0,r))}function mv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EN=gv(0,.5,Ky),PN=gv(.5,.95,Bn);function gv(e,t,n){return r=>r<e?0:r>t?1:n(Ei(e,t,r))}function yv(e,t){e.min=t.min,e.max=t.max}function Vn(e,t){yv(e.x,t.x),yv(e.y,t.y)}function bv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vv(e,t,n,r,o){return e-=t,e=nc(e,1/n,r),o!==void 0&&(e=nc(e,1/o,r)),e}function MN(e,t=0,n=1,r=.5,o,i=e,a=e){if(lr.test(t)&&(t=parseFloat(t),t=Et(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=Et(i.min,i.max,r);e===i&&(l-=t),e.min=vv(e.min,t,n,l,o),e.max=vv(e.max,t,n,l,o)}function xv(e,t,[n,r,o],i,a){MN(e,t[n],t[r],t[o],t.scale,i,a)}const RN=["x","scaleX","originX"],DN=["y","scaleY","originY"];function wv(e,t,n,r){xv(e.x,t,RN,n?n.x:void 0,r?r.x:void 0),xv(e.y,t,DN,n?n.y:void 0,r?r.y:void 0)}function Cv(e){return e.translate===0&&e.scale===1}function Sv(e){return Cv(e.x)&&Cv(e.y)}function Tv(e,t){return e.min===t.min&&e.max===t.max}function IN(e,t){return Tv(e.x,t.x)&&Tv(e.y,t.y)}function Ov(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kv(e,t){return Ov(e.x,t.x)&&Ov(e.y,t.y)}function Ev(e){return on(e.x)/on(e.y)}function Pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class AN{constructor(){this.members=[]}add(t){Od(this.members,t),t.scheduleRender()}remove(t){if(kd(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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Pf=["","X","Y","Z"],NN={visibility:"hidden"},Mv=1e3;let $N=0;function Mf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Wy(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",wt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rv(r)}function Dv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},l=t==null?void 0:t()){this.id=$N++,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,this.nodes.forEach(BN),this.nodes.forEach(UN),this.nodes.forEach(HN),this.nodes.forEach(LN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new SN)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Md),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=wN(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=TN(p,250),oc.hasAnimatedSinceResize&&(oc.hasAnimatedSinceResize=!1,this.nodes.forEach(Av))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||XN,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),w=!this.targetLayout||!kv(this.targetLayout,y),C=!p&&h;if(this.options.layoutRoot||this.resumeFrom||C||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,C);const O={...Ad(m,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else p||Av(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Wr(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(qN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Iv);return}this.isUpdating||this.nodes.forEach(WN),this.isUpdating=!1,this.nodes.forEach(zN),this.nodes.forEach(_N),this.nodes.forEach(FN),this.clearAllSnapshots();const l=ar.now();qt.delta=Or(0,1e3/60,l-qt.timestamp),qt.timestamp=l,qt.isProcessing=!0,$d.update.process(qt),$d.preRender.process(qt),$d.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VN),this.sharedNodes.forEach(YN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!on(this.snapshot.measuredBox.x)&&!on(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Sv(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||ho(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),ZN(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return _t();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(JN))){const{scroll:d}=this.root;d&&(bs(l.x,d.offset.x),bs(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=_t();if(Vn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Vn(l,a),bs(l.x,f.offset.x),bs(l.y,f.offset.y))}return l}applyTransform(a,l=!1){const c=_t();Vn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&vs(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),ho(d.latestValues)&&vs(c,d.latestValues)}return ho(this.latestValues)&&vs(c,this.latestValues),c}removeTransform(a){const l=_t();Vn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ho(u.latestValues))continue;Sf(u.latestValues)&&u.updateSnapshot();const d=_t(),f=u.measurePageBox();Vn(d,f),wv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return ho(this.latestValues)&&wv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),qi(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_t(),this.targetWithTransforms=_t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),eN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vn(this.target,this.layout.layoutBox),Kb(this.target,this.targetDelta)):Vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),qi(this.relativeTargetOrigin,this.target,h.target),Vn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Sf(this.parent.latestValues)||qb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;tN(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=_t());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bv(this.prevProjectionDelta.x,this.projectionDelta.x),bv(this.prevProjectionDelta.y,this.projectionDelta.y)),Hi(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Pv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ys(),this.projectionDelta=ys(),this.projectionDeltaWithTransform=ys()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=_t(),h=c?c.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,b=this.getStack(),x=!b||b.members.length<=1,w=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(KN));this.animationProgress=0;let C;this.mixTargetDelta=O=>{const v=O/1e3;jv(f.x,a.x,v),jv(f.y,a.y,v),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qi(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GN(this.relativeTarget,this.relativeTargetOrigin,p,v),C&&IN(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=_t()),Vn(C,this.relativeTarget)),m&&(this.animationValues=d,kN(d,u,this.latestValues,v,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Wr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=wt.update(()=>{oc.hasAnimatedSinceResize=!0,this.currentAnimation=xN(0,Mv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Mv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&Bv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||_t();const f=on(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=on(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}Vn(l,c),vs(l,d),Hi(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new AN),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Mf("z",a,u,this.animationValues);for(let d=0;d<Pf.length;d++)Mf(`rotate${Pf[d]}`,a,u,this.animationValues),Mf(`skew${Pf[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return NN;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Zl(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Zl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ho(this.latestValues)&&(h.transform=c?c({},""):"none",this.hasProjected=!1),h}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=jN(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:f,y:p}=this.projectionDelta;l.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const h in Ai){if(d[h]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:b}=Ai[h],x=l.transform==="none"?d[h]:y(d[h],u);if(m){const w=m.length;for(let C=0;C<w;C++)l[m[C]]=x}else b?this.options.visualElement.renderState.vars[h]=x:l[h]=x}return this.options.layoutId&&(l.pointerEvents=u===this?Zl(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Iv),this.root.sharedNodes.clear()}}}function _N(e){e.updateLayout()}function FN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=on(p);p.min=r[f].min,p.max=p.min+h}):Bv(i,t.layoutBox,r)&&Ln(f=>{const p=a?t.measuredBox[f]:t.layoutBox[f],h=on(r[f]);p.max=p.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=ys();Hi(l,r,t.layoutBox);const c=ys();a?Hi(c,e.applyTransform(o,!0),t.measuredBox):Hi(c,r,t.layoutBox);const u=!Sv(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:h}=f;if(p&&h){const y=_t();qi(y,t.layoutBox,p.layoutBox);const m=_t();qi(m,r,h.layoutBox),kv(y,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function BN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function LN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VN(e){e.clearSnapshot()}function Iv(e){e.clearMeasurements()}function WN(e){e.isLayoutDirty=!1}function zN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Av(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UN(e){e.resolveTargetDelta()}function HN(e){e.calcProjection()}function qN(e){e.resetSkewAndRotation()}function YN(e){e.removeLeadSnapshot()}function jv(e,t,n){e.translate=Et(t.translate,0,n),e.scale=Et(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nv(e,t,n,r){e.min=Et(t.min,n.min,r),e.max=Et(t.max,n.max,r)}function GN(e,t,n,r){Nv(e.x,t.x,n.x,r),Nv(e.y,t.y,n.y,r)}function KN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const XN={duration:.45,ease:[.4,0,.1,1]},$v=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_v=$v("applewebkit/")&&!$v("chrome/")?Math.round:Bn;function Fv(e){e.min=_v(e.min),e.max=_v(e.max)}function ZN(e){Fv(e.x),Fv(e.y)}function Bv(e,t,n){return e==="position"||e==="preserve-aspect"&&!Qj(Ev(t),Ev(n),.2)}function JN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const QN=Dv({attachResizeListener:(e,t)=>Wi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rf={current:void 0},Lv=Dv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rf.current){const e=new QN({});e.mount(window),e.setOptions({layoutScroll:!0}),Rf.current=e}return Rf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),e6={pan:{Feature:gN},drag:{Feature:mN,ProjectionNode:Lv,MeasureLayout:dv}};function Vv(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&wt.postRender(()=>i(t,zi(t)))}class t6 extends Hr{mount(){const{current:t}=this.node;t&&(this.unmount=fI(t,(n,r)=>(Vv(this.node,r,"Start"),o=>Vv(this.node,o,"End"))))}unmount(){}}class n6 extends Hr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{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=Li(Wi(this.node.current,"focus",()=>this.onFocus()),Wi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Wv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&wt.postRender(()=>i(t,zi(t)))}class r6 extends Hr{mount(){const{current:t}=this.node;t&&(this.unmount=gI(t,(n,r)=>(Wv(this.node,r,"Start"),(o,{success:i})=>Wv(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Df=new WeakMap,If=new WeakMap,o6=e=>{const t=Df.get(e.target);t&&t(e)},s6=e=>{e.forEach(o6)};function i6({root:e,...t}){const n=e||document;If.has(n)||If.set(n,{});const r=If.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(s6,{root:e,...t})),r[o]}function a6(e,t,n){const r=i6(t);return Df.set(e,n),r.observe(e),()=>{Df.delete(e),r.unobserve(e)}}const l6={some:0,all:1};class c6 extends Hr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:l6[o]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return a6(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(u6(t,n))&&this.startObserver()}unmount(){}}function u6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const d6={inView:{Feature:c6},tap:{Feature:r6},focus:{Feature:n6},hover:{Feature:t6}},f6={layout:{ProjectionNode:Lv,MeasureLayout:dv}},Af={current:null},zv={current:!1};function p6(){if(zv.current=!0,!!Sd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Af.current=e.matches;e.addListener(t),t()}else Af.current=!1}const h6=[...gb,Zt,Ur],m6=e=>h6.find(mb(e)),g6=new WeakMap;function y6(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Xt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Wl(o.version==="12.7.3",`Attempting to mix Motion versions ${o.version} with 12.7.3 may not work as expected.`);else if(Xt(i))e.addValue(r,Di(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,Di(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Uv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class b6{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=ar.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,wt.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Kl(n),this.isVariantNode=xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in p){const y=p[h];c[h]!==void 0&&Xt(y)&&y.set(c[h],!1)}}mount(t){this.current=t,g6.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),zv.current||p6(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Af.current,process.env.NODE_ENV!=="production"&&Wl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Wr(this.notifyUpdate),Wr(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 r=lo.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&wt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),a&&a(),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 ds){const n=ds[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_t()}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 r=0;r<Uv.length;r++){const o=Uv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=y6(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Di(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pb(r)||Zy(r))?r=parseFloat(r):!m6(r)&&Ur.test(n)&&(r=sb(t,n)),this.setBaseTarget(t,Xt(r)?r.get():r)),Xt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Xd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Xt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Md),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Hv extends b6{constructor(){super(...arguments),this.KeyframeResolver=bb}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Xt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function v6(e){return window.getComputedStyle(e)}class x6 extends Hv{constructor(){super(...arguments),this.type="html",this.renderInstance=$y}readValueFromInstance(t,n){if(lo.has(n))return AA(t,n);{const r=v6(t),o=(Wd(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Qb(t,n)}build(t,n,r){Hd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jd(t,n,r)}}class w6 extends Hv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_t,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ny(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lo.has(n)){const r=ob(n);return r&&r.default||0}return n=_y.has(n)?n:Vd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return By(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&wt.postRender(this.updateDimensions)}build(t,n,r){Gd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Fy(t,n,r,o)}mount(t){this.isSVGTag=Kd(t.tagName),super.mount(t)}}const C6=(e,t)=>Yd(e)?new w6(t):new x6(t,{allowProjection:e!==R.Fragment}),S6=iA({...Hj,...d6,...e6,...f6},C6),Gi=SI(S6),hn=({name:e,size:t=24,url:n,color:r="currentColor",style:o={},...i})=>{const{isPrimary:a}=i,l=n||Ke[e],u=It().palette.mode==="dark",d=a?"invert(0%) brightness(200%)":u?"invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%)":"invert(48%) sepia(0%) saturate(0%) hue-rotate(181deg) brightness(95%) contrast(90%)";return l?g.jsx("img",{src:l,alt:`${e}-icon`,style:{filter:d,...o},...i}):null},T6=({showOptions:e,setShowOptions:t,buttonRef:n,options:r,onClick:o})=>{const i=R.useRef(null);return R.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{i!=null&&i.current&&!(i!=null&&i.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),g.jsx(rs,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:i,children:({TransitionProps:a})=>g.jsx(Nr,{...a,timeout:100,children:g.jsx(ye,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:g.jsx(ye,{children:r==null?void 0:r.map((l,c)=>g.jsx(Fr,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),o(l)},children:g.jsx(ft,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:g.jsx(ft,{direction:"row",alignItems:"center",gap:"1rem",children:g.jsx(nt,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},qv=({styles:e,label:t,disabled:n,onClick:r,...o})=>{var y,m;const i=It();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=o!=null&&o.options?a+15:a;const[l,c]=R.useState(!1),u=R.useRef(null),[d,f]=R.useState(!1),[p,h]=R.useState(e==null?void 0:e.isAnimate);return g.jsxs(Gi.button,{ref:u,onMouseEnter:()=>p&&c(!0),onMouseLeave:()=>p&&c(!1),initial:{width:(e==null?void 0:e.width)||(!p&&t?`${a/10}rem`:"3.2rem"),borderRadius:"0.7rem"},animate:{width:p?`${l?a/10:3.2}rem`:t?`${a/10}rem`:"3.2rem"},whileHover:{backgroundColor:(y=e==null?void 0:e.hover)==null?void 0:y.backgroundColor,color:(m=e==null?void 0:e.hover)==null?void 0:m.color},transition:{duration:.2,ease:"easeInOut"},style:{height:"3.2rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?i.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?i.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyButtonBackground:i.palette.brandColor.orange:i.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?`0.1rem solid ${i.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:l||!p?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?i.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!p?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(o!=null&&o.options)&&r(),o!=null&&o.options&&(f(b=>!b),h(d))},...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),t&&g.jsxs(Gi.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!p?1:0,width:l||!p?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[g.jsx(nt,{sx:{fontSize:"1.1rem"},children:t}),(o==null?void 0:o.options)&&(d?g.jsx(hn,{url:Ke.ArrowUpLight}):g.jsx(hn,{url:Ke.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&g.jsx(hn,{url:e==null?void 0:e.icon,isPrimary:e==null?void 0:e.iconPrimary}),g.jsx(T6,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:f,options:o==null?void 0:o.options,onClick:r})]})};qv.propTypes={styles:s.object.isRequired,label:s.string};function mo({...e}){return g.jsx(Fn,{children:g.jsx(qv,{...e})})}function sc({...e}){return g.jsx(Fn,{children:g.jsx(U0,{id:e==null?void 0:e.id,icon:g.jsx(ye,{component:"img",src:Ke.Uncheck}),checkedIcon:g.jsx(ye,{component:"img",src:Ke.Check}),...e})})}const Yv=new Set;function O6(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
303
303
  `):e;Yv.has(n)||(Yv.add(n),t==="error"?console.error(n):console.warn(n))}function k6(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const kr=s.oneOfType([s.func,s.object]);function E6(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":k6(7));return e.charAt(0).toUpperCase()+e.slice(1)}function jf(e){return e&&e.ownerDocument||document}const cr=typeof window<"u"?S.useLayoutEffect:S.useEffect;let Gv=0;function P6(e){const[t,n]=S.useState(e),r=e||t;return S.useEffect(()=>{t==null&&(Gv+=1,n(`mui-${Gv}`))},[t]),r}const Kv={...S}.useId;function ic(e){if(Kv!==void 0){const t=Kv();return e??t}return P6(e)}function xs({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=S.useRef(e!==void 0),[i,a]=S.useState(t),l=o?e:i;if(process.env.NODE_ENV!=="production"){S.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
304
304
  `))},[r,n,e]);const{current:u}=S.useRef(t);S.useEffect(()=>{!o&&!Object.is(u,t)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
305
305
  `))},[JSON.stringify(t)])}const c=S.useCallback(u=>{o||a(u)},[]);return[l,c]}function Te(e){const t=S.useRef(e);return cr(()=>{t.current=e}),S.useRef((...n)=>(0,t.current)(...n)).current}function mn(...e){const t=S.useRef(void 0),n=S.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,l=a(r);return typeof l=="function"?l:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return S.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const Xv={};function M6(e,t){const n=S.useRef(Xv);return n.current===Xv&&(n.current=e(t)),n}const R6=[];function D6(e){S.useEffect(e,R6)}class Nf{constructor(){Lc(this,"currentId",null);Lc(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Lc(this,"disposeEffect",()=>this.clear)}static create(){return new Nf}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ws(){const e=M6(Nf.create).current;return D6(e.disposeEffect),e}const I6={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function At(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",l=!0;for(let c=0;c<i.length;c+=1){const u=i[c];u&&(a+=(l===!0?"":" ")+t(u),l=!1,n&&n[u]&&(a+=" "+n[u]))}r[o]=a}return r}const Zv=e=>e,A6=(()=>{let e=Zv;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Zv}}})(),j6={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Lt(e,t,n="Mui"){const r=j6[t];return r?`${n}-${r}`:`${A6.generate(e)}-${t}`}function Vt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Lt(e,o,n)}),r}function N6(e){return typeof e=="string"}function $6(e,t,n){return e===void 0||N6(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function _6(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Jv(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function F6(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),y={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...n,...o,...r};return h.length>0&&(m.className=h),Object.keys(y).length>0&&(m.style=y),{props:m,internalRef:void 0}}const a=_6({...o,...r}),l=Jv(r),c=Jv(o),u=t(a),d=de(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},p={...u,...n,...c,...l};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function Ki(e,t,n){return typeof e=="function"?e(t,n):e}function dt(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Ki(n,r),{props:l,internalRef:c}=F6({...i,externalSlotProps:a}),u=mn(c,a==null?void 0:a.ref,(f=e.additionalProps)==null?void 0:f.ref);return $6(t,{...l,ref:u},r)}const Xi=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),B6=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},ac=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Zi=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:l})=>{const c=ac(a,a.date(void 0,l),e);n&&a.isBefore(o,c)&&(o=c),t&&a.isAfter(r,c)&&(r=c);let u=e,d=e;for(a.isBefore(e,o)&&(u=o,d=null),a.isAfter(e,r)&&(d&&(d=r),u=null);u||d;){if(u&&a.isAfter(u,r)&&(u=null),d&&a.isBefore(d,o)&&(d=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(d){if(!i(d))return d;d=a.addDays(d,-1)}}return null},L6=(e,t)=>e.isValid(t)?t:null,Qv=(e,t,n)=>t==null||!e.isValid(t)?n:t,V6=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),$f=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},e2=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),W6=["year","month","day"],t2=e=>W6.includes(e),_f=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Xi(n,["year"])?o.year:Xi(n,["month"])?o.month:Xi(n,["day"])?o.dayOfMonth:Xi(n,["month","year"])?`${o.month} ${o.year}`:Xi(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},z6=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},U6=["hours","minutes","seconds"],H6=e=>U6.includes(e),n2=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),q6=(e,t)=>(n,r)=>e?t.isAfter(n,r):n2(n,t)>n2(r,t),ur={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Y6=e=>Math.max(...e.map(t=>ur[t.type]??1)),Ji=(e,t,n)=>{if(t===ur.year)return e.startOfYear(n);if(t===ur.month)return e.startOfMonth(n);if(t===ur.day)return e.startOfDay(n);let r=n;return t<ur.minutes&&(r=e.setMinutes(r,0)),t<ur.seconds&&(r=e.setSeconds(r,0)),t<ur.milliseconds&&(r=e.setMilliseconds(r,0)),r},G6=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Ji(t,n,e2(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=Ji(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=Ji(t,n,e.maxDate));const a=q6(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=Ji(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:ac(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=Ji(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:ac(t,i,e.maxTime))),i},Ff=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
@@ -313,7 +313,7 @@ const theme2 = createTheme({ palette: {
313
313
  `))},[o]),S.useEffect(()=>{!m&&y!==i&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled Picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
314
314
  `))},[JSON.stringify(y)]));const{timezone:w,value:C,handleValueChange:O}=ta({name:"a picker component",timezone:c,value:o,defaultValue:y,referenceDate:l,onChange:a,valueManager:n}),[v,k]=S.useState(()=>({open:!1,lastExternalValue:C,clockShallowValue:void 0,lastCommittedValue:C,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:E}=E2({props:t,validator:r,timezone:w,value:C,onError:t.onError}),M=Te(I=>{const W=typeof I=="function"?I(v.open):I;b||k(j=>T({},j,{open:W})),W&&p&&p(),W||h==null||h()}),D=Te((I,W)=>{const{changeImportance:j="accept",skipPublicationIfPristine:F=!1,validationError:P,shortcut:N,shouldClose:L=j==="accept"}=W??{};let H,V;!F&&!m&&!v.hasBeenModifiedSinceMount?(H=!0,V=j==="accept"):(H=!n.areValuesEqual(x,I,C),V=j==="accept"&&!n.areValuesEqual(x,I,v.lastCommittedValue)),k(ne=>T({},ne,{clockShallowValue:H?void 0:ne.clockShallowValue,lastCommittedValue:V?C:ne.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let z=null;const Z=()=>(z||(z={validationError:P??E(I)},N&&(z.shortcut=N)),z);H&&O(I,Z()),V&&u&&u(I,Z()),L&&M(!1)});C!==v.lastExternalValue&&k(I=>T({},I,{lastExternalValue:C,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const A=Te((I,W="partial")=>{if(W==="shallow"){k(j=>T({},j,{clockShallowValue:I,hasBeenModifiedSinceMount:!0}));return}D(I,{changeImportance:W==="finish"&&d?"accept":"set"})});S.useEffect(()=>{if(b){if(f===void 0)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");k(I=>T({},I,{open:f}))}},[b,f]);const $=S.useMemo(()=>n.cleanValue(x,v.clockShallowValue===void 0?C:v.clockShallowValue),[x,n,v.clockShallowValue,C]);return{timezone:w,state:v,setValue:D,setValueFromView:A,setOpen:M,value:C,viewValue:$}}const J9=["className","sx"],N2=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:l,rendererInterceptor:c,localeText:u,viewContainerRole:d,getStepNavigation:f})=>{const{views:p,view:h,openTo:y,onViewChange:m,viewRenderers:b,reduceAnimations:x,orientation:w,disableOpenPicker:C,closeOnSelect:O,disabled:v,readOnly:k,formatDensity:E,enableAccessibleFieldDOMStructure:M,selectedSections:D,onSelectedSectionsChange:A,format:$,label:I,autoFocus:W,name:j}=t,{className:F,sx:P}=t,N=re(t,J9),L=ic(),H=Ct(),V=yo(),z=D2(x),Z=X9(p,w),{current:ne}=S.useRef(y??null),[J,se]=S.useState(null),Q=S.useRef(null),ue=S.useRef(null),_=S.useRef(null),q=mn(e,_),{timezone:X,state:Y,setOpen:B,setValue:K,setValueFromView:ee,value:oe,viewValue:ce}=Z9({props:t,valueManager:n,validator:i}),{view:Ce,setView:ae,defaultView:we,focusedView:me,setFocusedView:ge,setValueAndGoToNextView:$e,goToNextStep:Ae,hasNextStep:Me,hasSeveralSteps:ze}=A2({view:h,views:p,openTo:y,onChange:ee,onViewChange:m,autoFocus:l,getStepNavigation:f}),Xe=Te(()=>K(n.emptyValue)),Fe=Te(()=>K(n.getTodayValue(H,X,r))),Be=Te(()=>K(oe)),fe=Te(()=>K(Y.lastCommittedValue,{skipPublicationIfPristine:!0})),Oe=Te(()=>{K(oe,{skipPublicationIfPristine:!0})}),{hasUIView:Le,viewModeLookup:Ue,timeViewsCount:it}=S.useMemo(()=>p.reduce((xt,zt)=>{const Kr=b[zt]==null?"field":"UI";return xt.viewModeLookup[zt]=Kr,Kr==="UI"&&(xt.hasUIView=!0,H6(zt)&&(xt.timeViewsCount+=1)),xt},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[b,p]),be=Ue[Ce],le=Te(()=>be),[pe,ve]=S.useState(be==="UI"?Ce:null);pe!==Ce&&Ue[Ce]==="UI"&&ve(Ce),cr(()=>{be==="field"&&Y.open&&(B(!1),setTimeout(()=>{var xt,zt;(xt=ue==null?void 0:ue.current)==null||xt.setSelectedSections(Ce),(zt=ue==null?void 0:ue.current)==null||zt.focusField(Ce)}))},[Ce]),cr(()=>{if(!Y.open)return;let xt=Ce;be==="field"&&pe!=null&&(xt=pe),xt!==we&&Ue[xt]==="UI"&&Ue[we]==="UI"&&(xt=we),xt!==Ce&&ae(xt),ge(xt,!0)},[Y.open]);const ke=S.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(H,oe,n.emptyValue),isPickerOpen:Y.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:Z,pickerVariant:o}),[H,n,oe,Y.open,Z,o,t.disabled,t.readOnly]),xe=S.useMemo(()=>C||!Le?"hidden":v||k?"disabled":"enabled",[C,Le,v,k]),Ee=Te(Ae),We=S.useMemo(()=>O&&!ze?[]:["cancel","nextOrAccept"],[O,ze]),Qe=S.useMemo(()=>({setValue:K,setOpen:B,clearValue:Xe,setValueToToday:Fe,acceptValueChanges:Be,cancelValueChanges:fe,setView:ae,goToNextStep:Ee}),[K,B,Xe,Fe,Be,fe,ae,Ee]),bt=S.useMemo(()=>T({},Qe,{value:oe,timezone:X,open:Y.open,views:p,view:pe,initialView:ne,disabled:v??!1,readOnly:k??!1,autoFocus:W??!1,variant:o,orientation:Z,popupRef:Q,reduceAnimations:z,triggerRef:se,triggerStatus:xe,hasNextStep:Me,fieldFormat:$??"",name:j,label:I,rootSx:P,rootRef:q,rootClassName:F}),[Qe,oe,q,o,Z,z,v,k,$,F,j,I,P,xe,Me,X,Y.open,pe,p,ne,W]),sn=S.useMemo(()=>({dismissViews:Oe,ownerState:ke,hasUIView:Le,getCurrentViewMode:le,rootRefObject:_,labelId:L,triggerElement:J,viewContainerRole:d,defaultActionBarActions:We,onPopperExited:a}),[Oe,ke,Le,le,L,J,d,We,a]),Ot=S.useMemo(()=>({formatDensity:E,enableAccessibleFieldDOMStructure:M,selectedSections:D,onSelectedSectionsChange:A,fieldRef:ue}),[E,M,D,A,ue]);return{providerProps:{localeText:u,contextValue:bt,privateContextValue:sn,actionsContextValue:Qe,fieldPrivateContextValue:Ot,isValidContextValue:xt=>{const zt=i({adapter:V,value:xt,timezone:X,props:t});return!n.hasError(zt)}},renderCurrentView:()=>{if(pe==null)return null;const xt=b[pe];if(xt==null)return null;const zt=T({},N,{views:p,timezone:X,value:ce,onChange:$e,view:pe,onViewChange:ae,showViewSwitcher:it>1,timeViewsCount:it},d==="tooltip"?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:me,onFocusedViewChange:ge});return c?g.jsx(c,{viewRenderers:b,popperView:pe,rendererProps:zt}):xt(zt)},ownerState:ke}};function $2(e){return Lt("MuiPickersLayout",e)}const bo=Vt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Q9=["actions"],e4=G(El,{name:"MuiPickersLayout",slot:"ActionBar",overridesResolver:(e,t)=>t.actionBar})({});function _2(e){const{actions:t}=e,n=re(e,Q9),r=qr(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:l,goToNextStep:c,hasNextStep:u}=Cs();if(t==null||t.length===0)return null;const d=t==null?void 0:t.map(f=>{switch(f){case"clear":return g.jsx(Hn,{onClick:o,children:r.clearButtonLabel},f);case"cancel":return g.jsx(Hn,{onClick:l,children:r.cancelButtonLabel},f);case"accept":return g.jsx(Hn,{onClick:a,children:r.okButtonLabel},f);case"today":return g.jsx(Hn,{onClick:i,children:r.todayButtonLabel},f);case"next":return g.jsx(Hn,{onClick:c,children:r.nextStepButtonLabel},f);case"nextOrAccept":return u?g.jsx(Hn,{onClick:c,children:r.nextStepButtonLabel},f):g.jsx(Hn,{onClick:a,children:r.okButtonLabel},f);default:return null}});return g.jsx(e4,T({},n,{children:d}))}process.env.NODE_ENV!=="production"&&(_2.propTypes={actions:s.arrayOf(s.oneOf(["accept","cancel","clear","next","nextOrAccept","today"]).isRequired),disableSpacing:s.bool,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const t4=S.memo(_2),na=36,dc=2,fc=320,n4=280,Gf=336,r4=["items","changeImportance"],o4=["getValue"],s4=G(Fr,{name:"MuiPickersLayout",slot:"Shortcuts",overridesResolver:(e,t)=>t.shortcuts})({});function F2(e){const{items:t,changeImportance:n="accept"}=e,r=re(e,r4),{setValue:o}=E9(),i=c9();if(t==null||t.length===0)return null;const a=t.map(l=>{let{getValue:c}=l,u=re(l,o4);const d=c({isValid:i});return T({},u,{label:u.label,onClick:()=>{o(d,{changeImportance:n,shortcut:u})},disabled:!i(d)})});return g.jsx(s4,T({dense:!0,sx:[{maxHeight:Gf,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(l=>g.jsx(og,{children:g.jsx(Qu,T({},l))},l.id??l.label))}))}process.env.NODE_ENV!=="production"&&(F2.propTypes={changeImportance:s.oneOf(["accept","set"]),className:s.string,component:s.elementType,dense:s.bool,disablePadding:s.bool,items:s.arrayOf(s.shape({getValue:s.func.isRequired,id:s.string,label:s.string.isRequired})),style:s.object,subheader:s.node,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});const i4=["ownerState"];function a4(e){return e.view!==null}const l4=(e,t)=>{const{pickerOrientation:n}=t;return At({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},$2,e)},c4=e=>{const{ownerState:t,defaultActionBarActions:n}=Yt(),{view:r}=Cs(),o=dn(),{children:i,slots:a,slotProps:l,classes:c}=e,u=S.useMemo(()=>T({},t,{layoutDirection:o?"rtl":"ltr"}),[t,o]),d=l4(c,u),f=(a==null?void 0:a.actionBar)??t4,p=dt({elementType:f,externalSlotProps:l==null?void 0:l.actionBar,additionalProps:{actions:n},className:d.actionBar,ownerState:u}),h=re(p,i4),y=g.jsx(f,T({},h)),m=a==null?void 0:a.toolbar,b=dt({elementType:m,externalSlotProps:l==null?void 0:l.toolbar,className:d.toolbar,ownerState:u}),x=a4(b)&&m?g.jsx(m,T({},b)):null,w=i,C=a==null?void 0:a.tabs,O=r&&C?g.jsx(C,T({className:d.tabs},l==null?void 0:l.tabs)):null,v=(a==null?void 0:a.shortcuts)??F2,k=dt({elementType:v,externalSlotProps:l==null?void 0:l.shortcuts,className:d.shortcuts,ownerState:u}),E=r&&v?g.jsx(v,T({},k)):null;return{toolbar:x,content:w,tabs:O,actionBar:y,shortcuts:E,ownerState:u}},u4=(e,t)=>{const{pickerOrientation:n}=t;return At({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},$2,e)},d4=G("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${bo.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${bo.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${bo.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${bo.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${bo.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${bo.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${bo.shortcuts}`]:{gridColumn:3}}}]}),f4=G("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),Kf=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:l,shortcuts:c,ownerState:u}=c4(r),{orientation:d,variant:f}=Cs(),{sx:p,className:h,classes:y}=r,m=u4(y,u);return g.jsxs(d4,{ref:n,sx:p,className:de(m.root,h),ownerState:u,children:[d==="landscape"?c:o,d==="landscape"?o:c,g.jsx(f4,{className:m.contentWrapper,ownerState:u,children:f==="desktop"?g.jsxs(S.Fragment,{children:[i,a]}):g.jsxs(S.Fragment,{children:[a,i]})}),l]})});process.env.NODE_ENV!=="production"&&(Kf.propTypes={children:s.node,classes:s.object,className:s.string,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object])});function Xf(e){const{ownerState:t}=Yt(),n=dn();return S.useMemo(()=>T({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}const p4=$t(g.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),h4=$t(g.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),m4=$t(g.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),g4=$t(g.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");$t(g.jsxs(S.Fragment,{children:[g.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),$t(g.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),$t(g.jsxs(S.Fragment,{children:[g.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const y4=$t(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function b4(e){return Lt("MuiPickersTextField",e)}Vt("MuiPickersTextField",["root","focused","disabled","error","required"]);function v4(e){return Lt("MuiPickersInputBase",e)}const Ts=Vt("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function x4(e){return Lt("MuiPickersSectionList",e)}const ra=Vt("MuiPickersSectionList",["root","section","sectionContent"]),w4=["slots","slotProps","elements","sectionListRef","classes"],B2=G("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),L2=G("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),V2=G("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),W2=G("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),C4=e=>At({root:["root"],section:["section"],sectionContent:["sectionContent"]},x4,e);function z2(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=Yt(),a=(t==null?void 0:t.section)??L2,l=dt({elementType:a,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),c=(t==null?void 0:t.sectionContent)??W2,u=dt({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),d=(t==null?void 0:t.sectionSeparator)??V2,f=dt({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:T({},i,{separatorPosition:"before"})}),p=dt({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:T({},i,{separatorPosition:"after"})});return g.jsxs(a,T({},l,{children:[g.jsx(d,T({},f)),g.jsx(c,T({},u)),g.jsx(d,T({},p))]}))}process.env.NODE_ENV!=="production"&&(z2.propTypes={classes:s.object.isRequired,element:s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired}).isRequired,slotProps:s.object,slots:s.object});const U2=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:l,classes:c}=r,u=re(r,w4),d=C4(c),{ownerState:f}=Yt(),p=S.useRef(null),h=mn(n,p),y=x=>{if(!p.current)throw new Error(`MUI X: Cannot call sectionListRef.${x} before the mount of the component.`);return p.current};S.useImperativeHandle(l,()=>({getRoot(){return y("getRoot")},getSectionContainer(x){return y("getSectionContainer").querySelector(`.${ra.section}[data-sectionindex="${x}"]`)},getSectionContent(x){return y("getSectionContent").querySelector(`.${ra.section}[data-sectionindex="${x}"] .${ra.sectionContent}`)},getSectionIndexFromDOMElement(x){const w=y("getSectionIndexFromDOMElement");if(x==null||!w.contains(x))return null;let C=null;return x.classList.contains(ra.section)?C=x:x.classList.contains(ra.sectionContent)&&(C=x.parentElement),C==null?null:Number(C.dataset.sectionindex)}}));const m=(o==null?void 0:o.root)??B2,b=dt({elementType:m,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:u,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:d.root,ownerState:f});return g.jsx(m,T({},b,{children:b.contentEditable?a.map(({content:x,before:w,after:C})=>`${w.children}${x.children}${C.children}`).join(""):g.jsx(S.Fragment,{children:a.map((x,w)=>g.jsx(z2,{slots:o,slotProps:i,element:x,classes:d},w))})}))});process.env.NODE_ENV!=="production"&&(U2.propTypes={classes:s.object,contentEditable:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object});const H2=S.createContext(null),pc=()=>{const e=S.useContext(H2);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
315
315
  `));return e},S4=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],T4=e=>Math.round(e*1e5)/1e5,hc=G("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>T({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${T4(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),Zf=G(B2,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{textAlign:"right /*! @noflip */"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),O4=G(L2,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),k4=G(W2,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),E4=G(V2,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),P4=G("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(T({},I6)),M4=G("div",{name:"MuiPickersInputBase",slot:"ActiveBar",overridesResolver:(e,t)=>t.activeBar})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),R4=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:l,inputColor:c,hasStartAdornment:u,hasEndAdornment:d}=t,f={root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",l&&"fullWidth",`color${E6(c)}`,a==="small"&&"inputSizeSmall",u&&"adornedStart",d&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]};return At(f,v4,e)};function q2(e,t,n,r){var o;if(e.content.id){const i=(o=t.current)==null?void 0:o.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(i)return Array.from(i).reduce((a,l)=>a+l.offsetWidth,0)}return 0}function D4(e,t){var o,i,a,l,c;let n=0;if(((o=t.current)==null?void 0:o.getAttribute("data-active-range-position"))==="end")for(let u=e.length-1;u>=e.length/2;u-=1)n+=q2(e[u],t,u,"end");else for(let u=0;u<e.length/2;u+=1)n+=q2(e[u],t,u,"start");return{activeBarWidth:n,sectionOffsets:[((a=(i=t.current)==null?void 0:i.querySelector('[data-sectionindex="0"]'))==null?void 0:a.offsetLeft)||0,((c=(l=t.current)==null?void 0:l.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:c.offsetLeft)||0]}}const mc=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:l,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:h,contentEditable:y,tabIndex:m,onInput:b,onPaste:x,onKeyDown:w,name:C,readOnly:O,inputProps:v,inputRef:k,sectionListRef:E,onFocus:M,onBlur:D,classes:A,ownerState:$}=r,I=re(r,S4),W=pc(),j=S.useRef(null),F=S.useRef(null),P=S.useRef([]),N=mn(n,j),L=mn(v==null?void 0:v.ref,k),H=sr();if(!H)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const V=$??W,z=X=>{var Y;(Y=H.onFocus)==null||Y.call(H,X),M==null||M(X)},Z=X=>{z(X)},ne=X=>{var Y,B;if(w==null||w(X),X.key==="Enter"&&!X.defaultMuiPrevented){if((Y=j.current)!=null&&Y.dataset.multiInput)return;const K=(B=j.current)==null?void 0:B.closest("form"),ee=K==null?void 0:K.querySelector('[type="submit"]');if(!K||!ee)return;X.preventDefault(),K.requestSubmit(ee)}},J=X=>{var Y;(Y=H.onBlur)==null||Y.call(H,X),D==null||D(X)};S.useEffect(()=>{H&&H.setAdornedStart(!!d)},[H,d]),S.useEffect(()=>{H&&(i?H.onEmpty():H.onFilled())},[H,i]);const se=R4(A,V),Q=(p==null?void 0:p.root)||hc,ue=dt({elementType:Q,externalSlotProps:h==null?void 0:h.root,externalForwardedProps:I,additionalProps:{"aria-invalid":H.error,ref:N},className:se.root,ownerState:V}),_=(p==null?void 0:p.input)||Zf,q=o.some(X=>X.content["data-range-position"]!==void 0);return S.useEffect(()=>{if(!q||!V.isPickerOpen)return;const{activeBarWidth:X,sectionOffsets:Y}=D4(o,j);P.current=[Y[0],Y[1]],F.current&&(F.current.style.width=`${X}px`)},[o,q,V.isPickerOpen]),g.jsxs(Q,T({},ue,{children:[d,g.jsx(U2,{sectionListRef:E,elements:o,contentEditable:y,tabIndex:m,className:se.sectionsContainer,onFocus:z,onBlur:J,onInput:b,onPaste:x,onKeyDown:ne,slots:{root:_,section:O4,sectionContent:k4,sectionSeparator:E4},slotProps:{root:T({},h==null?void 0:h.input,{ownerState:V}),sectionContent:{className:Ts.sectionContent},sectionSeparator:({separatorPosition:X})=>({className:X==="before"?Ts.sectionBefore:Ts.sectionAfter})}}),u,f?f(T({},H)):null,g.jsx(P4,T({name:C,className:se.input,value:a,onChange:l,id:c,"aria-hidden":"true",tabIndex:-1,readOnly:O,required:H.required,disabled:H.disabled,onFocus:Z},v,{ref:L})),q&&g.jsx(M4,{className:se.activeBar,ref:F,ownerState:{sectionOffsets:P.current}})]}))});process.env.NODE_ENV!=="production"&&(mc.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired});function I4(e){return Lt("MuiPickersOutlinedInput",e)}const Gn=T({},Ts,Vt("MuiPickersOutlinedInput",["root","notchedOutline","input"])),A4=["children","className","label","notched","shrink"],j4=G("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Y2=G("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),N4=G("legend",{shouldForwardProp:e=>ti(e)&&e!=="notched"})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function $4(e){const{className:t,label:n,notched:r}=e,o=re(e,A4),i=pc();return g.jsx(j4,T({"aria-hidden":!0,className:t},o,{ownerState:i,children:g.jsx(N4,{ownerState:i,notched:r,children:n?g.jsx(Y2,{children:n}):g.jsx(Y2,{className:"notranslate",children:"​"})})}))}const _4=["label","autoFocus","ownerState","classes","notched"],F4=G(hc,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Gn.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Gn.focused} .${Gn.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Gn.disabled}`]:{[`& .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Gn.error} .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{inputColor:n},style:{[`&.${Gn.focused}:not(.${Gn.error}) .${Gn.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),B4=G(Zf,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),L4=e=>{const n=At({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},I4,e);return T({},e,n)},Jf=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,classes:i,notched:a}=r,l=re(r,_4),c=sr(),u=L4(i);return g.jsx(mc,T({slots:{root:F4,input:B4},renderSuffix:d=>g.jsx($4,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(c!=null&&c.required)?g.jsxs(S.Fragment,{children:[o," ","*"]}):o})},l,{label:o,classes:u,ref:n}))});process.env.NODE_ENV!=="production"&&(Jf.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,notched:s.bool,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),Jf.muiName="Input";function V4(e){return Lt("MuiPickersFilledInput",e)}const vo=T({},Ts,Vt("MuiPickersFilledInput",["root","underline","input"])),W4=["label","autoFocus","disableUnderline","hiddenLabel","classes"],z4=G(hc,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ks(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${vo.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${vo.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var l;return{props:{inputColor:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(l=(e.vars||e).palette[a])==null?void 0:l.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${vo.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${vo.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${vo.disabled}, .${vo.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${vo.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),U4=G(Zf,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer,shouldForwardProp:e=>Ks(e)&&e!=="hiddenLabel"})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),H4=(e,t)=>{const{inputHasUnderline:n}=t,o=At({root:["root",n&&"underline"],input:["input"]},V4,e);return T({},e,o)},Qf=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,hiddenLabel:a=!1,classes:l}=r,c=re(r,W4),u=pc(),d=T({},u,{inputHasUnderline:!i}),f=H4(l,d);return g.jsx(mc,T({slots:{root:z4,input:U4},slotProps:{root:{disableUnderline:i},input:{hiddenLabel:a}}},c,{label:o,classes:f,ref:n,ownerState:d}))});process.env.NODE_ENV!=="production"&&(Qf.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,hiddenLabel:s.bool,id:s.string,inputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),Qf.muiName="Input";function q4(e){return Lt("MuiPickersFilledInput",e)}const oa=T({},Ts,Vt("MuiPickersInput",["root","underline","input"])),Y4=["label","autoFocus","disableUnderline","ownerState","classes"],G4=G(hc,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ti(e)&&e!=="disableUnderline"})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{inputColor:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oa.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oa.disabled}, .${oa.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${oa.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),K4=(e,t)=>{const{inputHasUnderline:n}=t,o=At({root:["root",!n&&"underline"],input:["input"]},q4,e);return T({},e,o)},ep=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,classes:a}=r,l=re(r,Y4),c=pc(),u=T({},c,{inputHasUnderline:!i}),d=K4(a,u);return g.jsx(mc,T({slots:{root:G4},slotProps:{root:{disableUnderline:i}}},l,{label:o,classes:d,ref:n}))});process.env.NODE_ENV!=="production"&&(ep.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,component:s.elementType,contentEditable:s.bool.isRequired,"data-multi-input":s.string,disableUnderline:s.bool,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,fullWidth:s.bool,id:s.string,inputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onChange:s.func.isRequired,onClick:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,ownerState:s.any,readOnly:s.bool,renderSuffix:s.func,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),slotProps:s.object,slots:s.object,startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired}),ep.muiName="Input";const X4=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],Z4={standard:ep,filled:Qf,outlined:Jf},J4=G(ad,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Q4=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return At({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},b4,e)},tp=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,classes:l,color:c="primary",disabled:u=!1,error:d=!1,variant:f="outlined",required:p=!1,InputProps:h,inputProps:y,inputRef:m,sectionListRef:b,elements:x,areAllSectionsEmpty:w,onClick:C,onKeyDown:O,onKeyUp:v,onPaste:k,onInput:E,endAdornment:M,startAdornment:D,tabIndex:A,contentEditable:$,focused:I,value:W,onChange:j,fullWidth:F,id:P,name:N,helperText:L,FormHelperTextProps:H,label:V,InputLabelProps:z,"data-active-range-position":Z}=r,ne=re(r,X4),J=S.useRef(null),se=mn(n,J),Q=ic(P),ue=L&&Q?`${Q}-helper-text`:void 0,_=V&&Q?`${Q}-label`:void 0,q=Xf({disabled:r.disabled,required:r.required,readOnly:h==null?void 0:h.readOnly}),X=S.useMemo(()=>T({},q,{isFieldValueEmpty:w,isFieldFocused:I??!1,hasFieldError:d??!1,inputSize:r.size??"medium",inputColor:c??"primary",isInputInFullWidth:F??!1,hasStartAdornment:!!(D??(h==null?void 0:h.startAdornment)),hasEndAdornment:!!(M??(h==null?void 0:h.endAdornment)),inputHasLabel:!!V}),[q,w,I,d,r.size,c,F,D,M,h==null?void 0:h.startAdornment,h==null?void 0:h.endAdornment,V]),Y=Q4(l,X),B=Z4[f];return g.jsx(H2.Provider,{value:X,children:g.jsxs(J4,T({className:de(Y.root,a),ref:se,focused:I,disabled:u,variant:f,error:d,color:c,fullWidth:F,required:p,ownerState:X},ne,{children:[V!=null&&V!==""&&g.jsx(fd,T({htmlFor:Q,id:_},z,{children:V})),g.jsx(B,T({elements:x,areAllSectionsEmpty:w,onClick:C,onKeyDown:O,onKeyUp:v,onInput:E,onPaste:k,onFocus:o,onBlur:i,endAdornment:M,startAdornment:D,tabIndex:A,contentEditable:$,value:W,onChange:j,id:Q,fullWidth:F,inputProps:y,inputRef:m,sectionListRef:b,label:V,name:N,role:"group","aria-labelledby":_,"aria-describedby":ue,"aria-live":ue?"polite":void 0,"data-active-range-position":Z},h)),L&&g.jsx(ld,T({id:ue},H,{children:L}))]}))})});process.env.NODE_ENV!=="production"&&(tp.propTypes={areAllSectionsEmpty:s.bool.isRequired,className:s.string,color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,contentEditable:s.bool.isRequired,disabled:s.bool.isRequired,elements:s.arrayOf(s.shape({after:s.object.isRequired,before:s.object.isRequired,container:s.object.isRequired,content:s.object.isRequired})).isRequired,endAdornment:s.node,error:s.bool.isRequired,focused:s.bool,FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),name:s.string,onBlur:s.func.isRequired,onChange:s.func.isRequired,onClick:s.func.isRequired,onFocus:s.func.isRequired,onInput:s.func.isRequired,onKeyDown:s.func.isRequired,onPaste:s.func.isRequired,readOnly:s.bool,required:s.bool,sectionListRef:s.oneOfType([s.func,s.shape({current:s.shape({getRoot:s.func.isRequired,getSectionContainer:s.func.isRequired,getSectionContent:s.func.isRequired,getSectionIndexFromDOMElement:s.func.isRequired})})]),size:s.oneOf(["medium","small"]),startAdornment:s.node,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),value:s.string.isRequired,variant:s.oneOf(["filled","outlined","standard"])});const e$=["enableAccessibleFieldDOMStructure"],t$=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],n$=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],r$=["ownerState"],o$=["ownerState"],s$=["ownerState"],i$=["ownerState"],a$=["InputProps","inputProps"],l$=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=re(e,e$);if(t){const{InputProps:b,readOnly:x,onClear:w,clearable:C,clearButtonPosition:O,openPickerButtonPosition:v,openPickerAriaLabel:k}=n,E=re(n,t$);return{clearable:C,onClear:w,clearButtonPosition:O,openPickerButtonPosition:v,openPickerAriaLabel:k,textFieldProps:T({},E,{InputProps:T({},b??{},{readOnly:x})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:l,inputProps:c,inputRef:u,onClear:d,clearable:f,clearButtonPosition:p,openPickerButtonPosition:h,openPickerAriaLabel:y}=n,m=re(n,n$);return{clearable:f,onClear:d,clearButtonPosition:p,openPickerButtonPosition:h,openPickerAriaLabel:y,textFieldProps:T({},m,{InputProps:T({},l??{},{readOnly:a}),inputProps:T({},c??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})}},np=S.createContext({slots:{},slotProps:{},inputRef:void 0});function c$(e){var H,V;const{slots:t,slotProps:n,fieldResponse:r,defaultOpenPickerIcon:o}=e,i=qr(),a=qf(),l=S.useContext(np),{textFieldProps:c,onClear:u,clearable:d,openPickerAriaLabel:f,clearButtonPosition:p="end",openPickerButtonPosition:h="end"}=l$(r),y=Xf(c),m=Te(z=>{z.preventDefault(),a==null||a.setOpen(Z=>!Z)}),b=a?a.triggerStatus:"hidden",x=d?p:null,w=b!=="hidden"?h:null,C=(t==null?void 0:t.textField)??l.slots.textField??(r.enableAccessibleFieldDOMStructure===!1?Fl:tp),O=(t==null?void 0:t.inputAdornment)??l.slots.inputAdornment??wi,v=dt({elementType:O,externalSlotProps:gc(l.slotProps.inputAdornment,n==null?void 0:n.inputAdornment),additionalProps:{position:"start"},ownerState:T({},y,{position:"start"})}),k=re(v,r$),E=dt({elementType:O,externalSlotProps:n==null?void 0:n.inputAdornment,additionalProps:{position:"end"},ownerState:T({},y,{position:"end"})}),M=re(E,o$),D=l.slots.openPickerButton??Ir,A=dt({elementType:D,externalSlotProps:l.slotProps.openPickerButton,additionalProps:{disabled:b==="disabled",onClick:m,"aria-label":f,edge:c.variant!=="standard"?w:!1},ownerState:y}),$=re(A,s$),I=l.slots.openPickerIcon??o,W=dt({elementType:I,externalSlotProps:l.slotProps.openPickerIcon,ownerState:y}),j=(t==null?void 0:t.clearButton)??l.slots.clearButton??Ir,F=dt({elementType:j,externalSlotProps:gc(l.slotProps.clearButton,n==null?void 0:n.clearButton),className:"clearButton",additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:u,disabled:r.disabled||r.readOnly,edge:c.variant!=="standard"&&x!==w?x:!1},ownerState:y}),P=re(F,i$),N=(t==null?void 0:t.clearIcon)??l.slots.clearIcon??y4,L=dt({elementType:N,externalSlotProps:gc(l.slotProps.clearIcon,n==null?void 0:n.clearIcon),additionalProps:{fontSize:"small"},ownerState:y});return c.ref=mn(c.ref,a==null?void 0:a.rootRef),c.InputProps||(c.InputProps={}),a&&(c.InputProps.ref=a.triggerRef),!((H=c.InputProps)!=null&&H.startAdornment)&&(x==="start"||w==="start")&&(c.InputProps.startAdornment=g.jsxs(O,T({},k,{children:[w==="start"&&g.jsx(D,T({},$,{children:g.jsx(I,T({},W))})),x==="start"&&g.jsx(j,T({},P,{children:g.jsx(N,T({},L))}))]}))),!((V=c.InputProps)!=null&&V.endAdornment)&&(x==="end"||w==="end")&&(c.InputProps.endAdornment=g.jsxs(O,T({},M,{children:[x==="end"&&g.jsx(j,T({},P,{children:g.jsx(N,T({},L))})),w==="end"&&g.jsx(D,T({},$,{children:g.jsx(I,T({},W))}))]}))),x!=null&&(c.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(c.sx)?c.sx:[c.sx]]),g.jsx(C,T({},c))}function gc(e,t){return e?t?n=>T({},Ki(t,n),Ki(e,n)):e:t}function u$(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=S.useContext(np),i=qf(),a=Xf(n),{InputProps:l,inputProps:c}=n,u=re(n,a$),d=dt({elementType:tp,externalSlotProps:gc(o.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:u,additionalProps:{ref:t,sx:i==null?void 0:i.rootSx,label:i==null?void 0:i.label,name:i==null?void 0:i.name,className:i==null?void 0:i.rootClassName,inputRef:o.inputRef},ownerState:a});return d.inputProps=T({},c,d.inputProps),d.InputProps=T({},l,d.InputProps),d}function G2(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=S.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return g.jsx(np.Provider,{value:i,children:o})}function K2(e){const{steps:t}=e;return K9({steps:t,isViewMatchingStep:(n,r)=>r.views==null||r.views.includes(n),onStepChange:({step:n,defaultView:r,setView:o,view:i,views:a})=>{const l=n.views==null?r:n.views.find(c=>a.includes(c));l!==i&&o(l)}})}const d$=["props","steps"],f$=["ownerState"],p$=e=>{var k;let{props:t,steps:n}=e,r=re(e,d$);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=K2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=N2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((k=i==null?void 0:i.toolbar)==null?void 0:k.hidden)??!1,m=o.field,b=dt({elementType:m,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=re(b,f$),w=o.layout??Kf;let C=h;y&&(a?C=`${h}-label`:C=void 0);const O=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),popper:T({"aria-labelledby":C},i==null?void 0:i.popper)});return{renderPicker:()=>g.jsx(v2,T({},d,{children:g.jsxs(G2,{slots:o,slotProps:O,inputRef:l,children:[g.jsx(m,T({},x)),g.jsx(q9,{slots:o,slotProps:O,children:g.jsx(w,T({},O==null?void 0:O.layout,{slots:o,slotProps:O,children:f()}))})]})}))}},Os=e=>e.saveQuery!=null,X2=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const l=Ct(),c=({keyPressed:f,sectionIndex:p},h,y)=>{const m=f.toLowerCase(),b=n.sections[p];if(n.characterQuery!=null&&(!y||y(n.characterQuery.value))&&n.characterQuery.sectionIndex===p){const w=`${n.characterQuery.value}${m}`,C=h(w,b);if(!Os(C))return o({sectionIndex:p,value:w,sectionType:b.type}),C}const x=h(m,b);return Os(x)&&!x.saveQuery?(o(null),null):(o({sectionIndex:p,value:m,sectionType:b.type}),Os(x)?null:x)},u=f=>{const p=(m,b,x)=>{const w=b.filter(C=>C.toLowerCase().startsWith(x));return w.length===0?{saveQuery:!1}:{sectionValue:w[0],shouldGoToNextSection:w.length===1}},h=(m,b,x,w)=>{const C=O=>r2(l,r,b.type,O);if(b.contentType==="letter")return p(b.format,C(b.format),m);if(x&&w!=null&&Ff(l,x).contentType==="letter"){const O=C(x),v=p(x,O,m);return Os(v)?{saveQuery:!1}:T({},v,{sectionValue:w(v.sectionValue,O)})}return{saveQuery:!1}};return c(f,(m,b)=>{switch(b.type){case"month":{const x=w=>a2(l,w,l.formats.month,b.format);return h(m,b,l.formats.month,x)}case"weekDay":{const x=(w,C)=>C.indexOf(w).toString();return h(m,b,l.formats.weekday,x)}case"meridiem":return h(m,b);default:return{saveQuery:!1}}})},d=f=>{const p=(y,m)=>{const b=go(y,e),x=Number(b),w=t[m.type]({currentDate:null,format:m.format,contentType:m.contentType});if(x>w.maximum)return{saveQuery:!1};if(x<w.minimum)return{saveQuery:!0};const C=x*10>w.maximum||b.length===w.maximum.toString().length;return{sectionValue:i2(l,x,w,e,m),shouldGoToNextSection:C}};return c(f,(y,m)=>{if(m.contentType==="digit"||m.contentType==="digit-with-letter")return p(y,m);if(m.type==="month"){l2(l,"digit","month","MM");const b=p(y,{type:m.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Os(b))return b;const x=a2(l,b.sectionValue,"MM",m.format);return T({},b,{sectionValue:x})}if(m.type==="weekDay"){const b=p(y,m);if(Os(b))return b;const x=lc(l,m.format)[Number(b.sectionValue)-1];return T({},b,{sectionValue:x})}return{saveQuery:!1}},y=>s2(y,e))};return Te(f=>{const p=n.sections[f.sectionIndex],y=s2(f.keyPressed,e)?d(T({},f,{keyPressed:Bf(f.keyPressed,e)})):u(f);if(y==null){i(null);return}a({section:p,newSectionValue:y.sectionValue,shouldGoToNextSection:y.shouldGoToNextSection})})},h$=5e3,Z2=e=>{var Ce;const t=Ct(),n=qr(),r=yo(),o=dn(),{manager:{validator:i,valueType:a,internal_valueManager:l,internal_fieldValueManager:c},internalPropsWithDefaults:u,internalPropsWithDefaults:{value:d,defaultValue:f,referenceDate:p,onChange:h,format:y,formatDensity:m="dense",selectedSections:b,onSelectedSectionsChange:x,shouldRespectLeadingZeros:w=!1,timezone:C,enableAccessibleFieldDOMStructure:O=!0},forwardedProps:{error:v}}=e,{value:k,handleValueChange:E,timezone:M}=ta({name:"a field component",timezone:C,value:d,defaultValue:f,referenceDate:p,onChange:h,valueManager:l}),D=S.useRef(k);S.useEffect(()=>{D.current=k},[k]);const{hasValidationError:A}=E2({props:u,validator:i,timezone:M,value:k,onError:u.onError}),$=S.useMemo(()=>v!==void 0?v:A,[A,v]),I=S.useMemo(()=>X6(t),[t]),W=S.useMemo(()=>t9(t,I,M),[t,I,M]),j=S.useCallback(ae=>c.getSectionsFromValue(ae,we=>O2({utils:t,localeText:n,localizedDigits:I,format:y,date:we,formatDensity:m,shouldRespectLeadingZeros:w,enableAccessibleFieldDOMStructure:O,isRtl:o})),[c,y,n,I,o,w,t,m,O]),[F,P]=S.useState(()=>{const ae=j(k);u2(ae,a);const we={sections:ae,lastExternalValue:k,lastSectionsDependencies:{format:y,isRtl:o,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},me=Y6(ae),ge=l.getInitialReferenceValue({referenceDate:p,value:k,utils:t,props:u,granularity:me,timezone:M});return T({},we,{referenceValue:ge})}),[N,L]=xs({controlled:b,default:null,name:"useField",state:"selectedSections"}),H=ae=>{L(ae),x==null||x(ae)},V=S.useMemo(()=>Wf(N,F.sections),[N,F.sections]),z=V==="all"?0:V,Z=S.useMemo(()=>o9(F.sections,o&&!O),[F.sections,o,O]),ne=S.useMemo(()=>F.sections.every(ae=>ae.value===""),[F.sections]),J=ae=>{const we={validationError:i({adapter:r,value:ae,timezone:M,props:u})};E(ae,we)},se=(ae,we)=>{const me=[...F.sections];return me[ae]=T({},me[ae],{value:we,modified:!0}),me},Q=S.useRef(null),ue=ws(),_=ae=>{z!=null&&(Q.current={sectionIndex:z,value:ae},ue.start(0,()=>{Q.current=null}))},q=()=>{l.areValuesEqual(t,k,l.emptyValue)?P(ae=>T({},ae,{sections:ae.sections.map(we=>T({},we,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(P(ae=>T({},ae,{characterQuery:null})),J(l.emptyValue))},X=()=>{if(z==null)return;const ae=F.sections[z];ae.value!==""&&(_(""),c.getDateFromSection(k,ae)===null?P(we=>T({},we,{sections:se(z,""),tempValueStrAndroid:null,characterQuery:null})):(P(we=>T({},we,{characterQuery:null})),J(c.updateDateInValue(k,ae,null))))},Y=ae=>{const we=(ge,$e)=>{const Ae=t.parse(ge,y);if(!t.isValid(Ae))return null;const Me=O2({utils:t,localeText:n,localizedDigits:I,format:y,date:Ae,formatDensity:m,shouldRespectLeadingZeros:w,enableAccessibleFieldDOMStructure:O,isRtl:o});return f2(t,Ae,Me,$e,!1)},me=c.parseValueStr(ae,F.referenceValue,we);J(me)},B=ws(),K=({section:ae,newSectionValue:we,shouldGoToNextSection:me})=>{ue.clear(),B.clear();const ge=c.getDateFromSection(k,ae);me&&z<F.sections.length-1&&H(z+1);const $e=se(z,we),Ae=c.getDateSectionsFromValue($e,ae),Me=J6(t,Ae,I);if(t.isValid(Me)){const ze=f2(t,Me,Ae,c.getDateFromSection(F.referenceValue,ae),!0);return ge==null&&B.start(0,()=>{D.current===k&&P(Xe=>T({},Xe,{sections:c.clearDateSections(F.sections,ae),tempValueStrAndroid:null}))}),J(c.updateDateInValue(k,ae,ze))}return Ae.every(ze=>ze.value!=="")?(_(we),J(c.updateDateInValue(k,ae,Me))):ge!=null?(_(we),J(c.updateDateInValue(k,ae,null))):P(ze=>T({},ze,{sections:$e,tempValueStrAndroid:null}))},ee=ae=>P(we=>T({},we,{tempValueStrAndroid:ae})),oe=Te(ae=>{P(we=>T({},we,{characterQuery:ae}))});if(k!==F.lastExternalValue){let ae;Q.current!=null&&!t.isValid(c.getDateFromSection(k,F.sections[Q.current.sectionIndex]))?ae=se(Q.current.sectionIndex,Q.current.value):ae=j(k),P(we=>T({},we,{lastExternalValue:k,sections:ae,sectionsDependencies:{format:y,isRtl:o,locale:t.locale},referenceValue:c.updateReferenceValue(t,k,we.referenceValue),tempValueStrAndroid:null}))}if(o!==F.lastSectionsDependencies.isRtl||y!==F.lastSectionsDependencies.format||t.locale!==F.lastSectionsDependencies.locale){const ae=j(k);u2(ae,a),P(we=>T({},we,{lastSectionsDependencies:{format:y,isRtl:o,locale:t.locale},sections:ae,tempValueStrAndroid:null,characterQuery:null}))}F.characterQuery!=null&&!$&&z==null&&oe(null),F.characterQuery!=null&&((Ce=F.sections[F.characterQuery.sectionIndex])==null?void 0:Ce.type)!==F.characterQuery.sectionType&&oe(null),S.useEffect(()=>{Q.current!=null&&(Q.current=null)});const ce=ws();return S.useEffect(()=>(F.characterQuery!=null&&ce.start(h$,()=>oe(null)),()=>{}),[F.characterQuery,oe,ce]),S.useEffect(()=>{F.tempValueStrAndroid!=null&&z!=null&&X()},[F.sections]),{activeSectionIndex:z,areAllSectionsEmpty:ne,error:$,localizedDigits:I,parsedSelectedSections:V,sectionOrder:Z,sectionsValueBoundaries:W,state:F,timezone:M,value:k,clearValue:q,clearActiveSection:X,setCharacterQuery:oe,setSelectedSections:H,setTempAndroidValueStr:ee,updateSectionValue:K,updateValueFromValueStr:Y,getSectionsFromValue:j}};function J2(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=qf(),i=g2(),a=mn(n.unstableFieldRef,r?null:i==null?void 0:i.fieldRef),l=o==null?void 0:o.setValue,c=S.useCallback((d,f)=>l==null?void 0:l(d,{validationError:f.validationError,shouldClose:!1}),[l]),u=S.useMemo(()=>i!=null&&o!=null?T({value:o.value,onChange:c,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:o.open?!0:void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,c,a]);return t(u)}function rp(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=document.getSelection();if(!i)return;if(r==null){i.rangeCount>0&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Jt(document)))return;const a=new window.Range;let l;r==="all"?l=n.getRoot():o.sections[r].type==="empty"?l=n.getSectionContainer(r):l=n.getSectionContent(r),a.selectNodeContents(l),l.focus(),i.removeAllRanges(),i.addRange(a)}function Q2(e){const t=Ct(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:l,activeSectionIndex:c,parsedSelectedSections:u,sectionsValueBoundaries:d,localizedDigits:f,timezone:p,sectionOrder:h,clearValue:y,clearActiveSection:m,setSelectedSections:b,updateSectionValue:x}}=e;return Te(w=>{if(!o)switch(!0){case((w.ctrlKey||w.metaKey)&&String.fromCharCode(w.keyCode)==="A"&&!w.shiftKey&&!w.altKey):{w.preventDefault(),b("all");break}case w.key==="ArrowRight":{if(w.preventDefault(),u==null)b(h.startIndex);else if(u==="all")b(h.endIndex);else{const C=h.neighbors[u].rightIndex;C!==null&&b(C)}break}case w.key==="ArrowLeft":{if(w.preventDefault(),u==null)b(h.endIndex);else if(u==="all")b(h.startIndex);else{const C=h.neighbors[u].leftIndex;C!==null&&b(C)}break}case w.key==="Delete":{if(w.preventDefault(),i)break;u==null||u==="all"?y():m();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(w.key):{if(w.preventDefault(),i||c==null)break;u==="all"&&b(c);const C=a.sections[c],O=g$(t,p,C,w.key,d,f,n.getDateFromSection(l,C),{minutesStep:r});x({section:C,newSectionValue:O,shouldGoToNextSection:!1});break}}})}function m$(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function g$(e,t,n,r,o,i,a,l){const c=m$(r),u=r==="Home",d=r==="End",f=n.value===""||u||d,p=()=>{const y=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),m=w=>i2(e,w,y,i,n),b=n.type==="minutes"&&(l!=null&&l.minutesStep)?l.minutesStep:1;let x;if(f){if(n.type==="year"&&!d&&!u)return e.formatByString(e.date(void 0,t),n.format);c>0||u?x=y.minimum:x=y.maximum}else x=parseInt(go(n.value,i),10)+c*b;return x%b!==0&&((c<0||u)&&(x+=b-(b+x)%b),(c>0||d)&&(x-=x%b)),x>y.maximum?m(y.minimum+(x-y.maximum-1)%(y.maximum-y.minimum+1)):x<y.minimum?m(y.maximum-(y.minimum-x-1)%(y.maximum-y.minimum+1)):m(x)},h=()=>{const y=r2(e,t,n.type,n.format);if(y.length===0)return n.value;if(f)return c>0||u?y[0]:y[y.length-1];const x=((y.indexOf(n.value)+c)%y.length+y.length)%y.length;return y[x]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?p():h()}function y$(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:l,stateResponse:{parsedSelectedSections:c,sectionOrder:u,state:d,clearValue:f,setCharacterQuery:p,setSelectedSections:h,updateValueFromValueStr:y},internalPropsWithDefaults:{disabled:m=!1,readOnly:b=!1}}=e,x=Q2({manager:t,internalPropsWithDefaults:l,stateResponse:i}),w=ws(),C=Te(M=>{m||!o.isReady()||(r(!0),c==="all"?w.start(0,()=>{const D=document.getSelection().getRangeAt(0).startOffset;if(D===0){h(u.startIndex);return}let A=0,$=0;for(;$<D&&A<d.sections.length;){const I=d.sections[A];A+=1,$+=`${I.startSeparator}${I.value||I.placeholder}${I.endSeparator}`.length}h(A-1)}):n?o.getRoot().contains(M.target)||h(u.startIndex):(r(!0),h(u.startIndex)))}),O=Te(M=>{if(!o.isReady()||c!=="all")return;const A=M.target.textContent??"";o.getRoot().innerHTML=d.sections.map($=>`${$.startSeparator}${$.value||$.placeholder}${$.endSeparator}`).join(""),rp({focused:n,domGetters:o,stateResponse:i}),A.length===0||A.charCodeAt(0)===10?(f(),h("all")):A.length>1?y(A):(c==="all"&&h(0),a({keyPressed:A,sectionIndex:0}))}),v=Te(M=>{if(b||c!=="all"){M.preventDefault();return}const D=M.clipboardData.getData("text");M.preventDefault(),p(null),y(D)}),k=Te(()=>{if(n||m||!o.isReady())return;const M=Jt(document);r(!0),o.getSectionIndexFromDOMElement(M)!=null||h(u.startIndex)}),E=Te(()=>{setTimeout(()=>{if(!o.isReady())return;const M=Jt(document);!o.getRoot().contains(M)&&(r(!1),h(null))})});return{onKeyDown:x,onBlur:E,onFocus:k,onClick:C,onPaste:v,onInput:O,contentEditable:c==="all",tabIndex:c===0?-1:0}}function b$(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=Te(l=>{o(l.target.value)});return{value:S.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}function v$(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=Te(o=>i=>{n||i.isDefaultPrevented()||t(o)});return S.useCallback(o=>({"data-sectionindex":o,onClick:r(o)}),[r])}function x$(e){const t=Ct(),n=qr(),r=ic(),{focused:o,domGetters:i,stateResponse:a,applyCharacterEditing:l,manager:{internal_fieldValueManager:c},stateResponse:{parsedSelectedSections:u,sectionsValueBoundaries:d,state:f,value:p,clearActiveSection:h,setCharacterQuery:y,setSelectedSections:m,updateSectionValue:b,updateValueFromValueStr:x},internalPropsWithDefaults:{disabled:w=!1,readOnly:C=!1}}=e,O=u==="all",v=!O&&!w&&!C,k=Te(I=>{if(!i.isReady())return;const W=f.sections[I];i.getSectionContent(I).innerHTML=W.value||W.placeholder,rp({focused:o,domGetters:i,stateResponse:a})}),E=Te(I=>{if(!i.isReady())return;const W=I.target,j=W.textContent??"",F=i.getSectionIndexFromDOMElement(W),P=f.sections[F];if(C){k(F);return}if(j.length===0){if(P.value===""){k(F);return}const N=I.nativeEvent.inputType;if(N==="insertParagraph"||N==="insertLineBreak"){k(F);return}k(F),h();return}l({keyPressed:j,sectionIndex:F}),k(F)}),M=Te(I=>{I.preventDefault()}),D=Te(I=>{if(I.preventDefault(),C||w||typeof u!="number")return;const W=f.sections[u],j=I.clipboardData.getData("text"),F=/^[a-zA-Z]+$/.test(j),P=/^[0-9]+$/.test(j),N=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(j);W.contentType==="letter"&&F||W.contentType==="digit"&&P||W.contentType==="digit-with-letter"&&N?(y(null),b({section:W,newSectionValue:j,shouldGoToNextSection:!0})):!F&&!P&&(y(null),x(j))}),A=Te(I=>{I.preventDefault(),I.dataTransfer.dropEffect="none"}),$=Te(I=>()=>{w||m(I)});return S.useCallback((I,W)=>{const j=d[I.type]({currentDate:c.getDateFromSection(p,I),contentType:I.contentType,format:I.format});return{onInput:E,onPaste:D,onMouseUp:M,onDragOver:A,onFocus:$(W),"aria-labelledby":`${r}-${I.type}`,"aria-readonly":C,"aria-valuenow":C$(I,t),"aria-valuemin":j.minimum,"aria-valuemax":j.maximum,"aria-valuetext":I.value?w$(I,t):n.empty,"aria-label":n[I.type],"aria-disabled":w,tabIndex:O||W>0?-1:0,contentEditable:!O&&!w&&!C,role:"spinbutton",id:`${r}-${I.type}`,"data-range-position":I.dateName||void 0,spellCheck:v?!1:void 0,autoCapitalize:v?"off":void 0,autoCorrect:v?"off":void 0,children:I.value||I.placeholder,inputMode:I.contentType==="letter"?"text":"numeric"}},[d,r,O,w,C,v,n,t,E,D,M,A,$,c,p])}function w$(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function C$(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const S$=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:l}=T2(t,o),c=J2({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:u,onBlur:d,onClick:f,onFocus:p,onInput:h,onPaste:y,onKeyDown:m,onClear:b,clearable:x}=l,{disabled:w=!1,readOnly:C=!1,autoFocus:O=!1,focused:v,unstableFieldRef:k}=c,E=S.useRef(null),M=mn(u,E),D=S.useMemo(()=>({isReady:()=>E.current!=null,getRoot:()=>E.current.getRoot(),getSectionContainer:ce=>E.current.getSectionContainer(ce),getSectionContent:ce=>E.current.getSectionContent(ce),getSectionIndexFromDOMElement:ce=>E.current.getSectionIndexFromDOMElement(ce)}),[E]),A=Z2({manager:n,internalPropsWithDefaults:c,forwardedProps:l}),{areAllSectionsEmpty:$,error:I,parsedSelectedSections:W,sectionOrder:j,state:F,value:P,clearValue:N,setSelectedSections:L}=A,H=X2({stateResponse:A}),V=i(P),[z,Z]=S.useState(!1);function ne(ce=0){if(w||!E.current||ex(E)!=null)return;const Ce=Wf(ce,F.sections);Z(!0),E.current.getSectionContent(Ce).focus()}const J=y$({manager:n,internalPropsWithDefaults:c,stateResponse:A,applyCharacterEditing:H,focused:z,setFocused:Z,domGetters:D}),se=b$({manager:n,stateResponse:A}),Q=v$({stateResponse:A,internalPropsWithDefaults:c}),ue=x$({manager:n,stateResponse:A,applyCharacterEditing:H,internalPropsWithDefaults:c,domGetters:D,focused:z}),_=Te(ce=>{m==null||m(ce),J.onKeyDown(ce)}),q=Te(ce=>{d==null||d(ce),J.onBlur(ce)}),X=Te(ce=>{p==null||p(ce),J.onFocus(ce)}),Y=Te(ce=>{ce.isDefaultPrevented()||(f==null||f(ce),J.onClick(ce))}),B=Te(ce=>{y==null||y(ce),J.onPaste(ce)}),K=Te(ce=>{h==null||h(ce),J.onInput(ce)}),ee=Te((ce,...Ce)=>{ce.preventDefault(),b==null||b(ce,...Ce),N(),tx(E)?L(j.startIndex):ne(0)}),oe=S.useMemo(()=>F.sections.map((ce,Ce)=>{const ae=ue(ce,Ce);return{container:Q(Ce),content:ue(ce,Ce),before:{children:ce.startSeparator},after:{children:ce.endSeparator,"data-range-position":ce.isEndFormatSeparator?ae["data-range-position"]:void 0}}}),[F.sections,Q,ue]);return S.useEffect(()=>{if(E.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
316
- `));O&&!w&&E.current&&E.current.getSectionContent(j.startIndex).focus()},[]),cr(()=>{if(!(!z||!E.current)){if(W==="all")E.current.getRoot().focus();else if(typeof W=="number"){const ce=E.current.getSectionContent(W);ce&&ce.focus()}}},[W,z]),cr(()=>{rp({focused:z,domGetters:D,stateResponse:A})}),S.useImperativeHandle(k,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>ex(E),setSelectedSections:ce=>{if(w||!E.current)return;const Ce=Wf(ce,F.sections);Z((Ce==="all"?0:Ce)!==null),L(ce)},focusField:ne,isFieldFocused:()=>tx(E)})),T({},l,J,{onBlur:q,onClick:Y,onFocus:X,onInput:K,onPaste:B,onKeyDown:_,onClear:ee},se,{error:I,clearable:!!(x&&!$&&!C&&!w),focused:v??z,sectionListRef:M,enableAccessibleFieldDOMStructure:!0,elements:oe,areAllSectionsEmpty:$,disabled:w,readOnly:C,autoFocus:O,openPickerAriaLabel:V})};function ex(e){const t=Jt(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function tx(e){const t=Jt(document);return!!e.current&&e.current.getRoot().contains(t)}const ks=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),T$=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],c=Vf(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${c}${l.endSeparator}`,d=ks(u).length,f=u.length,p=ks(c),h=o+(p===""?0:c.indexOf(p[0]))+l.startSeparator.length,y=h+p.length;i.push(T({},l,{start:r,end:r+d,startInInput:h,endInInput:y})),r+=d,o+=f}return i},O$=e=>{const t=dn(),n=ws(),r=ws(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:l,internal_valueManager:c,internal_fieldValueManager:u,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:f,forwardedProps:p}=T2(o,l),h=J2({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:y,onClick:m,onPaste:b,onBlur:x,onKeyDown:w,onClear:C,clearable:O,inputRef:v,placeholder:k}=p,{readOnly:E=!1,disabled:M=!1,autoFocus:D=!1,focused:A,unstableFieldRef:$}=h,I=S.useRef(null),W=mn(v,I),j=Z2({manager:i,internalPropsWithDefaults:h,forwardedProps:p}),{activeSectionIndex:F,areAllSectionsEmpty:P,error:N,localizedDigits:L,parsedSelectedSections:H,sectionOrder:V,state:z,value:Z,clearValue:ne,clearActiveSection:J,setCharacterQuery:se,setSelectedSections:Q,setTempAndroidValueStr:ue,updateSectionValue:_,updateValueFromValueStr:q,getSectionsFromValue:X}=j,Y=X2({stateResponse:j}),B=d(Z),K=S.useMemo(()=>T$(z.sections,L,t),[z.sections,L,t]);function ee(){const fe=I.current.selectionStart??0;let Oe;fe<=K[0].startInInput||fe>=K[K.length-1].endInInput?Oe=1:Oe=K.findIndex(Ue=>Ue.startInInput-Ue.startSeparator.length>fe);const Le=Oe===-1?K.length-1:Oe-1;Q(Le)}function oe(fe=0){var Oe;Jt(document)!==I.current&&((Oe=I.current)==null||Oe.focus(),Q(fe))}const ce=Te(fe=>{y==null||y(fe);const Oe=I.current;n.start(0,()=>{!Oe||Oe!==I.current||F==null&&(Oe.value.length&&Number(Oe.selectionEnd)-Number(Oe.selectionStart)===Oe.value.length?Q("all"):ee())})}),Ce=Te((fe,...Oe)=>{fe.isDefaultPrevented()||(m==null||m(fe,...Oe),ee())}),ae=Te(fe=>{if(b==null||b(fe),fe.preventDefault(),E||M)return;const Oe=fe.clipboardData.getData("text");if(typeof H=="number"){const Le=z.sections[H],Ue=/^[a-zA-Z]+$/.test(Oe),it=/^[0-9]+$/.test(Oe),be=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Oe);if(Le.contentType==="letter"&&Ue||Le.contentType==="digit"&&it||Le.contentType==="digit-with-letter"&&be){se(null),_({section:Le,newSectionValue:Oe,shouldGoToNextSection:!0});return}if(Ue||it)return}se(null),q(Oe)}),we=Te(fe=>{x==null||x(fe),Q(null)}),me=Te(fe=>{if(E)return;const Oe=fe.target.value;if(Oe===""){ne();return}const Le=fe.nativeEvent.data,Ue=Le&&Le.length>1,it=Ue?Le:Oe,be=ks(it);if(H==="all"&&Q(F),F==null||Ue){q(Ue?Le:be);return}let le;if(H==="all"&&be.length===1)le=be;else{const pe=ks(u.getV6InputValueFromSections(K,L,t));let ve=-1,ke=-1;for(let Qe=0;Qe<pe.length;Qe+=1)ve===-1&&pe[Qe]!==be[Qe]&&(ve=Qe),ke===-1&&pe[pe.length-Qe-1]!==be[be.length-Qe-1]&&(ke=Qe);const xe=K[F];if(ve<xe.start||pe.length-ke-1>xe.end)return;const We=be.length-pe.length+xe.end-ks(xe.endSeparator||"").length;le=be.slice(xe.start+ks(xe.startSeparator||"").length,We)}if(le.length===0){r9()&&ue(it),J();return}Y({keyPressed:le,sectionIndex:F})}),ge=Te((fe,...Oe)=>{fe.preventDefault(),C==null||C(fe,...Oe),ne(),nx(I)?Q(V.startIndex):oe(0)}),$e=Q2({manager:i,internalPropsWithDefaults:h,stateResponse:j}),Ae=Te(fe=>{w==null||w(fe),$e(fe)}),Me=S.useMemo(()=>k!==void 0?k:u.getV6InputValueFromSections(X(c.emptyValue),L,t),[k,u,X,c.emptyValue,L,t]),ze=S.useMemo(()=>z.tempValueStrAndroid??u.getV6InputValueFromSections(z.sections,L,t),[z.sections,u,z.tempValueStrAndroid,L,t]);S.useEffect(()=>{I.current&&I.current===Jt(document)&&Q("all")},[]),cr(()=>{function fe(){if(!I.current)return;if(H==null){I.current.scrollLeft&&(I.current.scrollLeft=0);return}if(I.current!==Jt(document))return;const Oe=I.current.scrollTop;if(H==="all")I.current.select();else{const Le=K[H],Ue=Le.type==="empty"?Le.startInInput-Le.startSeparator.length:Le.startInInput,it=Le.type==="empty"?Le.endInInput+Le.endSeparator.length:Le.endInInput;(Ue!==I.current.selectionStart||it!==I.current.selectionEnd)&&I.current===Jt(document)&&I.current.setSelectionRange(Ue,it),r.start(0,()=>{I.current&&I.current===Jt(document)&&I.current.selectionStart===I.current.selectionEnd&&(I.current.selectionStart!==Ue||I.current.selectionEnd!==it)&&fe()})}I.current.scrollTop=Oe}fe()});const Xe=S.useMemo(()=>F==null||z.sections[F].contentType==="letter"?"text":"numeric",[F,z.sections]),Be=!(I.current&&I.current===Jt(document))&&P;return S.useImperativeHandle($,()=>({getSections:()=>z.sections,getActiveSectionIndex:()=>{const fe=I.current.selectionStart??0,Oe=I.current.selectionEnd??0;if(fe===0&&Oe===0)return null;const Le=fe<=K[0].startInInput?1:K.findIndex(Ue=>Ue.startInInput-Ue.startSeparator.length>fe);return Le===-1?K.length-1:Le-1},setSelectedSections:fe=>Q(fe),focusField:oe,isFieldFocused:()=>nx(I)})),T({},p,{error:N,clearable:!!(O&&!P&&!E&&!M),onBlur:we,onClick:Ce,onFocus:ce,onPaste:ae,onKeyDown:Ae,onClear:ge,inputRef:W,enableAccessibleFieldDOMStructure:!1,placeholder:Me,inputMode:Xe,autoComplete:"off",value:Be?"":ze,onChange:me,focused:A,disabled:M,readOnly:E,autoFocus:D,openPickerAriaLabel:B})};function nx(e){return e.current===Jt(document)}const k$=e=>{const t=g2();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?S$:O$)(e)},E$=e=>{const t=I9(e);return k$({manager:t,props:e})},P$=["slots","slotProps"],op=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=re(r,P$),l=u$({slotProps:i,ref:n,externalForwardedProps:a}),c=E$(l);return g.jsx(c$,{slots:o,slotProps:i,fieldResponse:c,defaultOpenPickerIcon:g4})});process.env.NODE_ENV!=="production"&&(op.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,clearButtonPosition:s.oneOf(["end","start"]),color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,openPickerButtonPosition:s.oneOf(["end","start"]),readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const rx=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:l})=>{const c=yo();return S.useCallback(u=>Qi({adapter:c,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[c,e,t,n,r,o,i,a,l])},M$=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return T({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),T({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return T({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},R$=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:l,onYearChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:f,getCurrentMonthFromVisibleDate:p}=e,h=Ct(),y=S.useRef(M$(!!u,h)).current,m=S.useMemo(()=>dr.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:ur.day}),[n,f]),[b,x]=S.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"}),w=rx({shouldDisableDate:d,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});S.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const C=Te(({target:v,reason:k})=>{if(k==="cell-interaction"&&b.focusedDay!=null&&h.isSameDay(v,b.focusedDay))return;const E=k==="cell-interaction";let M,D;if(k==="cell-interaction")M=p(v,b.currentMonth),D=v;else if(M=h.isSameMonth(v,b.currentMonth)?b.currentMonth:h.startOfMonth(v),D=v,w(D)){const I=h.startOfMonth(v),W=h.endOfMonth(v);D=Zi({utils:h,date:D,minDate:h.isBefore(a,I)?I:a,maxDate:h.isAfter(i,W)?W:i,disablePast:o,disableFuture:r,isDateDisabled:w,timezone:f})}const A=!h.isSameMonth(b.currentMonth,M),$=!h.isSameYear(b.currentMonth,M);A&&(l==null||l(M)),$&&(c==null||c(h.startOfYear(M))),x({type:"setVisibleDate",month:M,direction:h.isAfterDay(M,b.currentMonth)?"left":"right",focusedDay:b.focusedDay!=null&&D!=null&&h.isSameDay(D,b.focusedDay)?b.focusedDay:D,skipAnimation:E})}),O=S.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:m,calendarState:b,setVisibleDate:C,isDateDisabled:w,onMonthSwitchingAnimationEnd:O}},D$=e=>Lt("MuiPickersFadeTransitionGroup",e);Vt("MuiPickersFadeTransitionGroup",["root"]);const I$=e=>At({root:["root"]},D$,e),A$=G(ri,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ox(e){const t=kt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i,classes:a}=t,l=I$(a),c=It();return o?n:g.jsx(A$,{className:de(l.root,r),children:g.jsx(Nr,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:n},i)})}function j$(e){return Lt("MuiPickersDay",e)}const xo=Vt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function sx(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=e,u=Ct(),{ownerState:d}=Yt();return S.useMemo(()=>T({},d,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:u.isSameDay(i,u.startOfWeek(i)),isDayEndOfWeek:u.isSameDay(i,u.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:l??!1,showDaysOutsideCurrentMonth:c??!1}),[u,d,i,n,t,r,o,a,l,c])}const N$=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],$$=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=t,u=i&&!c;return At({root:["root",n&&!u&&"selected",r&&"disabled",!a&&"dayWithMargin",!l&&o&&"today",i&&c&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},j$,e)},ix=({theme:e})=>T({},e.typography.caption,{width:na,height:na,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:eo(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${xo.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xo.disabled}:not(.${xo.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${xo.disabled}&.${xo.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${dc}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${xo.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),ax=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},_$=G(An,{name:"MuiPickersDay",slot:"Root",overridesResolver:ax})(ix),F$=G("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:ax})(({theme:e})=>T({},ix({theme:e}),{opacity:0,pointerEvents:"none"})),sa=()=>{},lx=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=sa,onBlur:f=sa,onKeyDown:p=sa,onMouseDown:h=sa,onMouseEnter:y=sa,children:m,day:b,selected:x,disabled:w,today:C,outsideCurrentMonth:O,disableMargin:v,disableHighlightToday:k,showDaysOutsideCurrentMonth:E}=r,M=re(r,N$),D=sx({day:b,selected:x,disabled:w,today:C,outsideCurrentMonth:O,disableMargin:v,disableHighlightToday:k,showDaysOutsideCurrentMonth:E}),A=$$(a,D),$=Ct(),I=S.useRef(null),W=mn(I,n);cr(()=>{o&&!w&&!l&&!O&&I.current.focus()},[o,w,l,O]);const j=P=>{h(P),O&&P.preventDefault()},F=P=>{w||u(b),O&&P.currentTarget.focus(),c&&c(P)};return O&&!E?g.jsx(F$,{className:de(A.root,A.hiddenDaySpacingFiller,i),ownerState:D,role:M.role}):g.jsx(_$,T({className:de(A.root,i),ref:W,centerRipple:!0,disabled:w,tabIndex:x?0:-1,onKeyDown:P=>p(P,b),onFocus:P=>d(P,b),onBlur:P=>f(P,b),onMouseEnter:P=>y(P,b),onClick:F,onMouseDown:j},M,{ownerState:D,children:m||$.format(b,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(lx.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const B$=S.memo(lx),L$=e=>Lt("MuiPickersSlideTransition",e),Wn=Vt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),V$=["children","className","reduceAnimations","slideDirection","transKey","classes"],W$=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return At(r,L$,e)},z$=G(ri,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Wn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Wn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Wn.slideEnterActive}`]:t.slideEnterActive},{[`.${Wn.slideExit}`]:t.slideExit},{[`.${Wn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Wn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Wn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Wn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Wn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Wn.slideExit}`]:{transform:"translate(0%)"},[`& .${Wn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Wn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function U$(e){const t=kt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:l}=t,c=re(t,V$),{ownerState:u}=Yt(),d=T({},u,{slideDirection:i}),f=W$(l,d),p=It();if(o)return g.jsx("div",{className:de(f.root,r),children:n});const h={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return g.jsx(z$,{className:de(f.root,r),childFactory:y=>S.cloneElement(y,{classNames:h}),role:"presentation",children:g.jsx(Lu,T({mountOnEnter:!0,unmountOnExit:!0,timeout:p.transitions.duration.complex,classNames:h},c,{children:n}),a)})}const H$=e=>Lt("MuiDayCalendar",e);Vt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const q$=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Y$=["ownerState"],G$=e=>At({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},H$,e),cx=(na+dc*2)*6,K$=G("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),X$=G("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Z$=G(nt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),J$=G(nt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),Q$=G(nt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>T({},e.typography.caption,{width:na,height:na,padding:0,margin:`0 ${dc}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),e_=G("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:cx}),t_=G(U$,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:cx}),n_=G("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),r_=G("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${dc}px 0`,display:"flex",justifyContent:"center"});function o_(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,c=re(e,q$);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:p,slots:h,slotProps:y,timezone:m}=t,b=Ct(),x=uc(m),w=r!=null&&b.isSameDay(n,r),C=l&&w,O=o.some(j=>b.isSameDay(j,n)),v=b.isSameDay(n,x),k=S.useMemo(()=>u||i(n),[u,i,n]),E=S.useMemo(()=>b.getMonth(n)!==a,[b,n,a]),M=sx({day:n,selected:O,disabled:k,today:v,outsideCurrentMonth:E,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:p}),D=(h==null?void 0:h.day)??B$,A=dt({elementType:D,externalSlotProps:y==null?void 0:y.day,additionalProps:T({disableHighlightToday:d,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:f,"data-timestamp":b.toJsDate(n).valueOf()},c),ownerState:T({},M,{day:n,isDayDisabled:k,isDaySelected:O})}),$=re(A,Y$),I=S.useMemo(()=>{const j=b.startOfMonth(b.setMonth(n,a));return p?b.isSameDay(n,b.startOfWeek(j)):b.isSameDay(n,j)},[a,n,p,b]),W=S.useMemo(()=>{const j=b.endOfMonth(b.setMonth(n,a));return p?b.isSameDay(n,b.endOfWeek(j)):b.isSameDay(n,j)},[a,n,p,b]);return g.jsx(D,T({},$,{day:n,disabled:k,autoFocus:!E&&C,today:v,outsideCurrentMonth:E,isFirstVisibleCell:I,isLastVisibleCell:W,selected:O,tabIndex:w?0:-1,"aria-selected":O,"aria-current":v?"date":void 0}))}function s_(e){const t=kt({props:e,name:"MuiDayCalendar"}),n=Ct(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:l,focusedDay:c,loading:u,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:h,renderLoading:y=()=>g.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:b,disablePast:x,disableFuture:w,minDate:C,maxDate:O,shouldDisableDate:v,shouldDisableMonth:k,shouldDisableYear:E,dayOfWeekFormatter:M=Y=>n.format(Y,"weekdayShort").charAt(0).toUpperCase(),hasFocus:D,onFocusedViewChange:A,gridLabelId:$,displayWeekNumber:I,fixedWeekNumber:W,timezone:j}=t,F=uc(j),P=G$(i),N=dn(),L=rx({shouldDisableDate:v,shouldDisableMonth:k,shouldDisableYear:E,minDate:C,maxDate:O,disablePast:x,disableFuture:w,timezone:j}),H=qr(),V=Te(Y=>{p||d(Y)}),z=Y=>{L(Y)||(r(Y),A==null||A(!0))},Z=Te((Y,B)=>{switch(Y.key){case"ArrowUp":z(n.addDays(B,-7)),Y.preventDefault();break;case"ArrowDown":z(n.addDays(B,7)),Y.preventDefault();break;case"ArrowLeft":{const K=n.addDays(B,N?1:-1),ee=n.addMonths(B,N?1:-1),oe=Zi({utils:n,date:K,minDate:N?K:n.startOfMonth(ee),maxDate:N?n.endOfMonth(ee):K,isDateDisabled:L,timezone:j});z(oe||K),Y.preventDefault();break}case"ArrowRight":{const K=n.addDays(B,N?-1:1),ee=n.addMonths(B,N?-1:1),oe=Zi({utils:n,date:K,minDate:N?n.startOfMonth(ee):K,maxDate:N?K:n.endOfMonth(ee),isDateDisabled:L,timezone:j});z(oe||K),Y.preventDefault();break}case"Home":z(n.startOfWeek(B)),Y.preventDefault();break;case"End":z(n.endOfWeek(B)),Y.preventDefault();break;case"PageUp":z(n.addMonths(B,1)),Y.preventDefault();break;case"PageDown":z(n.addMonths(B,-1)),Y.preventDefault();break}}),ne=Te((Y,B)=>z(B)),J=Te((Y,B)=>{c!=null&&n.isSameDay(c,B)&&(A==null||A(!1))}),se=n.getMonth(a),Q=n.getYear(a),ue=S.useMemo(()=>l.filter(Y=>!!Y).map(Y=>n.startOfDay(Y)),[n,l]),_=`${Q}-${se}`,q=S.useMemo(()=>S.createRef(),[_]),X=S.useMemo(()=>{const Y=n.getWeekArray(a);let B=n.addMonths(a,1);for(;W&&Y.length<W;){const K=n.getWeekArray(B),ee=n.isSameDay(Y[Y.length-1][0],K[0][0]);K.slice(ee?1:0).forEach(oe=>{Y.length<W&&Y.push(oe)}),B=n.addMonths(B,1)}return Y},[a,W,n]);return g.jsxs(K$,{role:"grid","aria-labelledby":$,className:P.root,children:[g.jsxs(X$,{role:"row",className:P.header,children:[I&&g.jsx(J$,{variant:"caption",role:"columnheader","aria-label":H.calendarWeekNumberHeaderLabel,className:P.weekNumberLabel,children:H.calendarWeekNumberHeaderText}),z6(n,F).map((Y,B)=>g.jsx(Z$,{variant:"caption",role:"columnheader","aria-label":n.format(Y,"weekday"),className:P.weekDayLabel,children:M(Y)},B.toString()))]}),u?g.jsx(e_,{className:P.loadingContainer,children:y()}):g.jsx(t_,T({transKey:_,onExited:f,reduceAnimations:h,slideDirection:m,className:de(o,P.slideTransition)},b,{nodeRef:q,children:g.jsx(n_,{ref:q,role:"rowgroup",className:P.monthContainer,children:X.map((Y,B)=>g.jsxs(r_,{role:"row",className:P.weekContainer,"aria-rowindex":B+1,children:[I&&g.jsx(Q$,{className:P.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(Y[0])),children:H.calendarWeekNumberText(n.getWeekNumber(Y[0]))}),Y.map((K,ee)=>g.jsx(o_,{parentProps:t,day:K,selectedDays:ue,isViewFocused:D,focusedDay:c,onKeyDown:Z,onFocus:ne,onBlur:J,onDaySelect:V,isDateDisabled:L,currentMonthNumber:se,"aria-colindex":ee+1},K.toString()))]},`week-${Y[0]}`))})}))]})}function ux(e){return Lt("MuiMonthCalendar",e)}const yc=Vt("MuiMonthCalendar",["root","button","disabled","selected"]),i_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],a_=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return At(n,ux,e)},l_=G("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${yc.disabled}`]:t.disabled},{[`&.${yc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${yc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${yc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),c_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=re(t,i_),y=S.useRef(null),{ownerState:m}=Yt(),b=T({},m,{isMonthDisabled:o,isMonthSelected:i}),x=a_(r,b);cr(()=>{var O;n&&((O=y.current)==null||O.focus())},[n]);const w=(f==null?void 0:f.monthButton)??l_,C=dt({elementType:w,externalSlotProps:p==null?void 0:p.monthButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:O=>l(O,a),onKeyDown:O=>c(O,a),onFocus:O=>u(O,a),onBlur:O=>d(O,a)},ownerState:b,className:x.button});return g.jsx(w,T({},C))}),u_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],d_=e=>At({root:["root"]},ux,e);function f_(e,t){const n=kt({props:e,name:t}),r=ea(n);return T({},n,r,{monthsPerRow:n.monthsPerRow??3})}const p_=G("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ti(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:fc,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),dx=S.forwardRef(function(t,n){const r=f_(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:m,shouldDisableMonth:b,readOnly:x,onMonthFocus:w,hasFocus:C,onFocusedViewChange:O,monthsPerRow:v,timezone:k,gridLabelId:E,slots:M,slotProps:D}=r,A=re(r,u_),{value:$,handleValueChange:I,timezone:W}=ta({name:"MonthCalendar",timezone:k,value:l,defaultValue:c,referenceDate:u,onChange:m,valueManager:dr}),j=uc(W),F=dn(),P=Ct(),{ownerState:N}=Yt(),L=S.useMemo(()=>dr.getInitialReferenceValue({value:$,utils:P,props:r,timezone:W,referenceDate:u,granularity:ur.month}),[]),H=d_(a),V=S.useMemo(()=>P.getMonth(j),[P,j]),z=S.useMemo(()=>$!=null?P.getMonth($):null,[$,P]),[Z,ne]=S.useState(()=>z||P.getMonth(L)),[J,se]=xs({name:"MonthCalendar",state:"hasFocus",controlled:C,default:o??!1}),Q=Te(K=>{se(K),O&&O(K)}),ue=S.useCallback(K=>{const ee=P.startOfMonth(p&&P.isAfter(j,y)?j:y),oe=P.startOfMonth(f&&P.isBefore(j,h)?j:h),ce=P.startOfMonth(K);return P.isBefore(ce,ee)||P.isAfter(ce,oe)?!0:b?b(ce):!1},[f,p,h,y,j,b,P]),_=Te((K,ee)=>{if(x)return;const oe=P.setMonth($??L,ee);I(oe)}),q=Te(K=>{ue(P.setMonth($??L,K))||(ne(K),Q(!0),w&&w(K))});S.useEffect(()=>{ne(K=>z!==null&&K!==z?z:K)},[z]);const X=Te((K,ee)=>{switch(K.key){case"ArrowUp":q((12+ee-3)%12),K.preventDefault();break;case"ArrowDown":q((12+ee+3)%12),K.preventDefault();break;case"ArrowLeft":q((12+ee+(F?1:-1))%12),K.preventDefault();break;case"ArrowRight":q((12+ee+(F?-1:1))%12),K.preventDefault();break}}),Y=Te((K,ee)=>{q(ee)}),B=Te((K,ee)=>{Z===ee&&Q(!1)});return g.jsx(p_,T({ref:n,className:de(H.root,i),ownerState:N,role:"radiogroup","aria-labelledby":E,monthsPerRow:v},A,{children:$f(P,$??L).map(K=>{const ee=P.getMonth(K),oe=P.format(K,"monthShort"),ce=P.format(K,"month"),Ce=ee===z,ae=d||ue(K);return g.jsx(c_,{selected:Ce,value:ee,onClick:_,onKeyDown:X,autoFocus:J&&ee===Z,disabled:ae,tabIndex:ee===Z&&!ae?0:-1,onFocus:Y,onBlur:B,"aria-current":V===ee?"date":void 0,"aria-label":ce,slots:M,slotProps:D,classes:a,children:oe},oe)})}))});process.env.NODE_ENV!=="production"&&(dx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function fx(e){return Lt("MuiYearCalendar",e)}const bc=Vt("MuiYearCalendar",["root","button","disabled","selected"]),h_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],m_=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return At(n,fx,e)},g_=G("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${bc.disabled}`]:t.disabled},{[`&.${bc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:eo(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${bc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${bc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),y_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=re(t,h_),y=S.useRef(null),{ownerState:m}=Yt(),b=T({},m,{isYearDisabled:o,isYearSelected:i}),x=m_(r,b);cr(()=>{var O;n&&((O=y.current)==null||O.focus())},[n]);const w=(f==null?void 0:f.yearButton)??g_,C=dt({elementType:w,externalSlotProps:p==null?void 0:p.yearButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:O=>l(O,a),onKeyDown:O=>c(O,a),onFocus:O=>u(O,a),onBlur:O=>d(O,a)},ownerState:b,className:x.button});return g.jsx(w,T({},C))}),b_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],v_=e=>At({root:["root"]},fx,e);function x_(e,t){const n=kt({props:e,name:t}),r=ea(n);return T({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const w_=G("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>ti(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:fc,maxHeight:n4,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),C_=G("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),px=S.forwardRef(function(t,n){const r=x_(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:m,readOnly:b,shouldDisableYear:x,onYearFocus:w,hasFocus:C,onFocusedViewChange:O,yearsOrder:v,yearsPerRow:k,timezone:E,gridLabelId:M,slots:D,slotProps:A}=r,$=re(r,b_),{value:I,handleValueChange:W,timezone:j}=ta({name:"YearCalendar",timezone:E,value:l,defaultValue:c,referenceDate:u,onChange:m,valueManager:dr}),F=uc(j),P=dn(),N=Ct(),{ownerState:L}=Yt(),H=S.useMemo(()=>dr.getInitialReferenceValue({value:I,utils:N,props:r,timezone:j,referenceDate:u,granularity:ur.year}),[]),V=v_(a),z=S.useMemo(()=>N.getYear(F),[N,F]),Z=S.useMemo(()=>I!=null?N.getYear(I):null,[I,N]),[ne,J]=S.useState(()=>Z||N.getYear(H)),[se,Q]=xs({name:"YearCalendar",state:"hasFocus",controlled:C,default:o??!1}),ue=Te(me=>{Q(me),O&&O(me)}),_=S.useCallback(me=>{if(p&&N.isBeforeYear(me,F)||f&&N.isAfterYear(me,F)||y&&N.isBeforeYear(me,y)||h&&N.isAfterYear(me,h))return!0;if(!x)return!1;const ge=N.startOfYear(me);return x(ge)},[f,p,h,y,F,x,N]),q=Te((me,ge)=>{if(b)return;const $e=N.setYear(I??H,ge);W($e)}),X=Te(me=>{_(N.setYear(I??H,me))||(J(me),ue(!0),w==null||w(me))});S.useEffect(()=>{J(me=>Z!==null&&me!==Z?Z:me)},[Z]);const Y=v!=="desc"?k*1:k*-1,B=P&&v==="asc"||!P&&v==="desc"?-1:1,K=Te((me,ge)=>{switch(me.key){case"ArrowUp":X(ge-Y),me.preventDefault();break;case"ArrowDown":X(ge+Y),me.preventDefault();break;case"ArrowLeft":X(ge-B),me.preventDefault();break;case"ArrowRight":X(ge+B),me.preventDefault();break}}),ee=Te((me,ge)=>{X(ge)}),oe=Te((me,ge)=>{ne===ge&&ue(!1)}),ce=S.useRef(null),Ce=mn(n,ce);S.useEffect(()=>{if(o||ce.current===null)return;const me=ce.current.querySelector('[tabindex="0"]');if(!me)return;const ge=me.offsetHeight,$e=me.offsetTop,Ae=ce.current.clientHeight,Me=ce.current.scrollTop,ze=$e+ge;ge>Ae||$e<Me||(ce.current.scrollTop=ze-Ae/2-ge/2)},[o]);const ae=N.getYearRange([y,h]);v==="desc"&&ae.reverse();let we=k-ae.length%k;return we===k&&(we=0),g.jsxs(w_,T({ref:Ce,className:de(V.root,i),ownerState:L,role:"radiogroup","aria-labelledby":M,yearsPerRow:k},$,{children:[ae.map(me=>{const ge=N.getYear(me),$e=ge===Z,Ae=d||_(me);return g.jsx(y_,{selected:$e,value:ge,onClick:q,onKeyDown:K,autoFocus:se&&ge===ne,disabled:Ae,tabIndex:ge===ne&&!Ae?0:-1,onFocus:ee,onBlur:oe,"aria-current":z===ge?"date":void 0,slots:D,slotProps:A,classes:a,children:N.format(me,"year")},N.format(me,"year"))}),Array.from({length:we},(me,ge)=>g.jsx(C_,{},ge))]}))});process.env.NODE_ENV!=="production"&&(px.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const S_=e=>Lt("MuiPickersCalendarHeader",e),T_=Vt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function O_(e){return Lt("MuiPickersArrowSwitcher",e)}Vt("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const k_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],E_=["ownerState"],P_=["ownerState"],M_=G("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),R_=G("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),hx=G(Ir,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),D_=e=>At({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},O_,e),I_=S.forwardRef(function(t,n){const r=dn(),o=kt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:c,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:y,onGoToPrevious:m,previousLabel:b,labelId:x,classes:w}=o,C=re(o,k_),{ownerState:O}=Yt(),v=D_(w),k={isDisabled:u,isHidden:d,goTo:f,label:p},E={isDisabled:h,isHidden:y,goTo:m,label:b},M=(l==null?void 0:l.previousIconButton)??hx,D=dt({elementType:M,externalSlotProps:c==null?void 0:c.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:T({},O,{isButtonHidden:E.isHidden??!1}),className:de(v.button,v.previousIconButton)}),A=(l==null?void 0:l.nextIconButton)??hx,$=dt({elementType:A,externalSlotProps:c==null?void 0:c.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:T({},O,{isButtonHidden:k.isHidden??!1}),className:de(v.button,v.nextIconButton)}),I=(l==null?void 0:l.leftArrowIcon)??h4,W=dt({elementType:I,externalSlotProps:c==null?void 0:c.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:O,className:v.leftArrowIcon}),j=re(W,E_),F=(l==null?void 0:l.rightArrowIcon)??m4,P=dt({elementType:F,externalSlotProps:c==null?void 0:c.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:O,className:v.rightArrowIcon}),N=re(P,P_);return g.jsxs(M_,T({ref:n,className:de(v.root,a),ownerState:O},C,{children:[g.jsx(M,T({},D,{children:r?g.jsx(F,T({},N)):g.jsx(I,T({},j))})),i?g.jsx(nt,{variant:"subtitle1",component:"span",id:x,children:i}):g.jsx(R_,{className:v.spacer,ownerState:O}),g.jsx(A,T({},$,{children:r?g.jsx(I,T({},j)):g.jsx(F,T({},N))}))]}))});function A_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=Ct();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function j_(e,{disablePast:t,minDate:n,timezone:r}){const o=Ct();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const N_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],$_=["ownerState"],__=e=>At({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},S_,e),F_=G("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),B_=G("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>T({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),L_=G("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),V_=G(Ir,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${T_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),W_=G(p4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),mx=S.forwardRef(function(t,n){const r=qr(),o=Ct(),i=kt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onMonthChange:y,onViewChange:m,view:b,reduceAnimations:x,views:w,labelId:C,className:O,classes:v,timezone:k,format:E=`${o.formats.month} ${o.formats.year}`}=i,M=re(i,N_),{ownerState:D}=Yt(),A=__(v),$=(a==null?void 0:a.switchViewButton)??V_,I=dt({elementType:$,externalSlotProps:l==null?void 0:l.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(b)},ownerState:D,className:A.switchViewButton}),W=(a==null?void 0:a.switchViewIcon)??W_,j=dt({elementType:W,externalSlotProps:l==null?void 0:l.switchViewIcon,ownerState:D,className:A.switchViewIcon}),F=re(j,$_),P=()=>y(o.addMonths(c,1)),N=()=>y(o.addMonths(c,-1)),L=A_(c,{disableFuture:d,maxDate:p,timezone:k}),H=j_(c,{disablePast:f,minDate:h,timezone:k}),V=()=>{if(!(w.length===1||!m||u))if(w.length===2)m(w.find(Z=>Z!==b)||w[0]);else{const Z=w.indexOf(b)!==0?0:1;m(w[Z])}};if(w.length===1&&w[0]==="year")return null;const z=o.formatByString(c,E);return g.jsxs(F_,T({},M,{ownerState:D,className:de(A.root,O),ref:n,children:[g.jsxs(B_,{role:"presentation",onClick:V,ownerState:D,"aria-live":"polite",className:A.labelContainer,children:[g.jsx(ox,{reduceAnimations:x,transKey:z,children:g.jsx(L_,{id:C,ownerState:D,className:A.label,children:z})}),w.length>1&&!u&&g.jsx($,T({},I,{children:g.jsx(W,T({},F))}))]}),g.jsx(Nr,{in:b==="day",appear:!x,enter:!x,children:g.jsx(I_,{slots:a,slotProps:l,onGoToPrevious:N,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:P,isNextDisabled:L,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(mx.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const z_=G("div")({overflow:"hidden",width:fc,maxHeight:Gf,display:"flex",flexDirection:"column",margin:"0 auto"}),U_=e=>Lt("MuiDateCalendar",e);Vt("MuiDateCalendar",["root","viewTransitionContainer"]);const H_=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],q_=e=>At({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},U_,e);function Y_(e,t){const n=kt({props:e,name:t}),r=D2(n.reduceAnimations),o=ea(n);return T({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>g.jsx("span",{children:"..."}))})}const G_=G(z_,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Gf}),K_=G(ox,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),gx=S.forwardRef(function(t,n){const r=Ct(),{ownerState:o}=Yt(),i=ic(),a=Y_(t,"MuiDateCalendar"),{autoFocus:l,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:p,disablePast:h,onChange:y,onMonthChange:m,reduceAnimations:b,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:C,view:O,views:v,openTo:k,className:E,classes:M,disabled:D,readOnly:A,minDate:$,maxDate:I,disableHighlightToday:W,focusedView:j,onFocusedViewChange:F,showDaysOutsideCurrentMonth:P,fixedWeekNumber:N,dayOfWeekFormatter:L,slots:H,slotProps:V,loading:z,renderLoading:Z,displayWeekNumber:ne,yearsOrder:J,yearsPerRow:se,monthsPerRow:Q,timezone:ue}=a,_=re(a,H_),{value:q,handleValueChange:X,timezone:Y}=ta({name:"DateCalendar",timezone:ue,value:u,defaultValue:d,referenceDate:f,onChange:y,valueManager:dr}),{view:B,setView:K,focusedView:ee,setFocusedView:oe,goToNextView:ce,setValueAndGoToNextView:Ce}=A2({view:O,views:v,openTo:k,onChange:X,onViewChange:c,autoFocus:l,focusedView:j,onFocusedViewChange:F}),{referenceDate:ae,calendarState:we,setVisibleDate:me,isDateDisabled:ge,onMonthSwitchingAnimationEnd:$e}=R$({value:q,referenceDate:f,reduceAnimations:b,onMonthChange:m,minDate:$,maxDate:I,shouldDisableDate:x,disablePast:h,disableFuture:p,timezone:Y,getCurrentMonthFromVisibleDate:(ve,ke)=>r.isSameMonth(ve,ke)?ke:r.startOfMonth(ve)}),Ae=D&&q||$,Me=D&&q||I,ze=`${i}-grid-label`,Xe=ee!==null,Fe=(H==null?void 0:H.calendarHeader)??mx,Be=dt({elementType:Fe,externalSlotProps:V==null?void 0:V.calendarHeader,additionalProps:{views:v,view:B,currentMonth:we.currentMonth,onViewChange:K,onMonthChange:ve=>me({target:ve,reason:"header-navigation"}),minDate:Ae,maxDate:Me,disabled:D,disablePast:h,disableFuture:p,reduceAnimations:b,timezone:Y,labelId:ze},ownerState:o}),fe=Te(ve=>{const ke=r.startOfMonth(ve),xe=r.endOfMonth(ve),Ee=ge(ve)?Zi({utils:r,date:ve,minDate:r.isBefore($,ke)?ke:$,maxDate:r.isAfter(I,xe)?xe:I,disablePast:h,disableFuture:p,isDateDisabled:ge,timezone:Y}):ve;Ee?(Ce(Ee,"finish"),me({target:Ee,reason:"cell-interaction"})):(ce(),me({target:ke,reason:"cell-interaction"}))}),Oe=Te(ve=>{const ke=r.startOfYear(ve),xe=r.endOfYear(ve),Ee=ge(ve)?Zi({utils:r,date:ve,minDate:r.isBefore($,ke)?ke:$,maxDate:r.isAfter(I,xe)?xe:I,disablePast:h,disableFuture:p,isDateDisabled:ge,timezone:Y}):ve;Ee?(Ce(Ee,"finish"),me({target:Ee,reason:"cell-interaction"})):(ce(),me({target:ke,reason:"cell-interaction"}))}),Le=Te(ve=>X(ve&&ac(r,ve,q??ae),"finish",B));S.useEffect(()=>{r.isValid(q)&&me({target:q,reason:"controlled-value-change"})},[q]);const Ue=q_(M),it={disablePast:h,disableFuture:p,maxDate:I,minDate:$},be={disableHighlightToday:W,readOnly:A,disabled:D,timezone:Y,gridLabelId:ze,slots:H,slotProps:V},le=S.useRef(B);S.useEffect(()=>{le.current!==B&&(ee===le.current&&oe(B,!0),le.current=B)},[ee,oe,B]);const pe=S.useMemo(()=>[q],[q]);return g.jsxs(G_,T({ref:n,className:de(Ue.root,E),ownerState:o},_,{children:[g.jsx(Fe,T({},Be,{slots:H,slotProps:V})),g.jsx(K_,{reduceAnimations:b,className:Ue.viewTransitionContainer,transKey:B,ownerState:o,children:g.jsxs("div",{children:[B==="year"&&g.jsx(px,T({},it,be,{value:q,onChange:Oe,shouldDisableYear:C,hasFocus:Xe,onFocusedViewChange:ve=>oe("year",ve),yearsOrder:J,yearsPerRow:se,referenceDate:ae})),B==="month"&&g.jsx(dx,T({},it,be,{hasFocus:Xe,className:E,value:q,onChange:fe,shouldDisableMonth:w,onFocusedViewChange:ve=>oe("month",ve),monthsPerRow:Q,referenceDate:ae})),B==="day"&&g.jsx(s_,T({},we,it,be,{onMonthSwitchingAnimationEnd:$e,hasFocus:Xe,onFocusedDayChange:ve=>me({target:ve,reason:"cell-interaction"}),reduceAnimations:b,selectedDays:pe,onSelectedDaysChange:Le,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:C,onFocusedViewChange:ve=>oe("day",ve),showDaysOutsideCurrentMonth:P,fixedWeekNumber:N,dayOfWeekFormatter:L,displayWeekNumber:ne,loading:z,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(gx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Es=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:m,shouldDisableMonth:b,shouldDisableYear:x,reduceAnimations:w,onMonthChange:C,monthsPerRow:O,onYearChange:v,yearsOrder:k,yearsPerRow:E,slots:M,slotProps:D,loading:A,renderLoading:$,disableHighlightToday:I,readOnly:W,disabled:j,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:P,sx:N,autoFocus:L,fixedWeekNumber:H,displayWeekNumber:V,timezone:z})=>g.jsx(gx,{view:e,onViewChange:t,views:n.filter(t2),focusedView:r&&t2(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:m,shouldDisableMonth:b,shouldDisableYear:x,reduceAnimations:w,onMonthChange:C,monthsPerRow:O,onYearChange:v,yearsOrder:k,yearsPerRow:E,slots:M,slotProps:D,loading:A,renderLoading:$,disableHighlightToday:I,readOnly:W,disabled:j,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:P,sx:N,autoFocus:L,fixedWeekNumber:H,displayWeekNumber:V,timezone:z}),yx=S.forwardRef(function(t,n){var c;const r=Ct(),o=P2(t,"MuiDesktopDatePicker"),i=T({day:Es,month:Es,year:Es},o.viewRenderers),a=T({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:_f(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:T({field:op},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},Ki((d=o.slotProps)==null?void 0:d.field,u),S2(o))},toolbar:T({hidden:!0},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=p$({ref:n,props:a,valueManager:dr,valueType:"date",validator:Qi,steps:null});return l()});yx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const X_=G(kl)({[`& .${gi.container}`]:{outline:0},[`& .${gi.paper}`]:{outline:0,minWidth:fc}}),Z_=G(Pl)({"&:first-of-type":{padding:0}});function J_(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=Cs(),{dismissViews:i}=Yt(),a=(n==null?void 0:n.dialog)??X_,l=(n==null?void 0:n.mobileTransition)??Nr;return g.jsx(a,T({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:l,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:g.jsx(Z_,{children:t})}))}const Q_=["props","steps"],eF=["ownerState"],tF=e=>{var k;let{props:t,steps:n}=e,r=re(e,Q_);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=K2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=N2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((k=i==null?void 0:i.toolbar)==null?void 0:k.hidden)??!1,m=o.field,b=dt({elementType:m,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=re(b,eF),w=o.layout??Kf;let C=h;y&&(a?C=`${h}-label`:C=void 0);const O=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),mobilePaper:T({"aria-labelledby":C},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>g.jsx(v2,T({},d,{children:g.jsxs(G2,{slots:o,slotProps:O,inputRef:l,children:[g.jsx(m,T({},x)),g.jsx(J_,{slots:o,slotProps:O,children:g.jsx(w,T({},O==null?void 0:O.layout,{slots:o,slotProps:O,children:f()}))})]})}))}},bx=S.forwardRef(function(t,n){var c;const r=Ct(),o=P2(t,"MuiMobileDatePicker"),i=T({day:Es,month:Es,year:Es},o.viewRenderers),a=T({},o,{viewRenderers:i,format:_f(r,o,!1),slots:T({field:op},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},Ki((d=o.slotProps)==null?void 0:d.field,u),S2(o))},toolbar:T({hidden:!1},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=tF({ref:n,props:a,valueManager:dr,valueType:"date",validator:Qi,steps:null});return l()});bx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const nF=["desktopModeMediaQuery"],vx=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=F9}=r,i=re(r,nF);return dm(o,{defaultMatches:!0})?g.jsx(yx,T({ref:n},i)):g.jsx(bx,T({ref:n},i))});process.env.NODE_ENV!=="production"&&(vx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const xx=6048e5,rF=864e5,wx=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&wx in e?e[wx](t):e instanceof Date?new e.constructor(t):new Date(t)}function yt(e,t){return Wt(t||e,e)}function Cx(e,t,n){const r=yt(e,n==null?void 0:n.in);return isNaN(t)?Wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Sx(e,t,n){const r=yt(e,n==null?void 0:n.in);if(isNaN(t))return Wt(e,NaN);if(!t)return r;const o=r.getDate(),i=Wt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let oF={};function ia(){return oF}function Ps(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=yt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function aa(e,t){return Ps(e,{...t,weekStartsOn:1})}function Tx(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Wt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=aa(o),a=Wt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=aa(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ox(e){const t=yt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ms(e,...t){const n=Wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function la(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function kx(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t),i=la(r),a=la(o),l=+i-Ox(i),c=+a-Ox(a);return Math.round((l-c)/rF)}function sF(e,t){const n=Tx(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),aa(r)}function iF(e,t,n){return Cx(e,t*7,n)}function aF(e,t,n){return Sx(e,t*12,n)}function lF(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Wt.bind(null,o));const i=yt(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function cF(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Wt.bind(null,o));const i=yt(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function uF(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return+la(r)==+la(o)}function Ex(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dF(e){return!(!Ex(e)&&typeof e!="number"||isNaN(+yt(e)))}function fF(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t),i=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return i*12+a}function pF(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function hF(e,t){const[n,r]=Ms(e,t.start,t.end);return{start:n,end:r}}function mF(e,t){const{start:n,end:r}=hF(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=i;)c.push(Wt(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function gF(e,t){const n=yt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function yF(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Px(e,t){const n=yt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Mx(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=yt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function bF(e,t){return Mx(e,{...t,weekStartsOn:1})}const vF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xF=(e,t,n)=>{let r;const o=vF[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function sp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},CF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},SF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TF={date:sp({formats:wF,defaultWidth:"full"}),time:sp({formats:CF,defaultWidth:"full"}),dateTime:sp({formats:SF,defaultWidth:"full"})},OF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kF=(e,t,n,r)=>OF[e];function ca(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const EF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},MF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},RF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},DF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},IF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},AF={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ca({values:EF,defaultWidth:"wide"}),quarter:ca({values:PF,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ca({values:MF,defaultWidth:"wide"}),day:ca({values:RF,defaultWidth:"wide"}),dayPeriod:ca({values:DF,defaultWidth:"wide",formattingValues:IF,defaultFormattingWidth:"wide"})};function ua(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?NF(l,f=>f.test(a)):jF(l,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function jF(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function NF(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function $F(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const _F=/^(\d+)(th|st|nd|rd)?/i,FF=/\d+/i,BF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LF={any:[/^b/i,/^(a|c)/i]},VF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WF={any:[/1/i,/2/i,/3/i,/4/i]},zF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},UF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},qF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},YF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},GF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KF={ordinalNumber:$F({matchPattern:_F,parsePattern:FF,valueCallback:e=>parseInt(e,10)}),era:ua({matchPatterns:BF,defaultMatchWidth:"wide",parsePatterns:LF,defaultParseWidth:"any"}),quarter:ua({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:WF,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ua({matchPatterns:zF,defaultMatchWidth:"wide",parsePatterns:UF,defaultParseWidth:"any"}),day:ua({matchPatterns:HF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any"}),dayPeriod:ua({matchPatterns:YF,defaultMatchWidth:"any",parsePatterns:GF,defaultParseWidth:"any"})},ip={code:"en-US",formatDistance:xF,formatLong:TF,formatRelative:kF,localize:AF,match:KF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XF(e,t){const n=yt(e,t==null?void 0:t.in);return kx(n,Px(n))+1}function Rx(e,t){const n=yt(e,t==null?void 0:t.in),r=+aa(n)-+sF(n);return Math.round(r/xx)+1}function Dx(e,t){var d,f,p,h;const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=ia(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=Wt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Ps(a,t),c=Wt((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Ps(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function ZF(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=Dx(e,t),i=Wt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ps(i,t)}function Ix(e,t){const n=yt(e,t==null?void 0:t.in),r=+Ps(n,t)-+ZF(n,t);return Math.round(r/xx)+1}function pt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Yr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pt(n+1,2)},d(e,t){return pt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pt(e.getHours()%12||12,t.length)},H(e,t){return pt(e.getHours(),t.length)},m(e,t){return pt(e.getMinutes(),t.length)},s(e,t){return pt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return pt(o,t.length)}},Rs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ax={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Yr.y(e,t)},Y:function(e,t,n,r){const o=Dx(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return pt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):pt(i,t.length)},R:function(e,t){const n=Tx(e);return pt(n,t.length)},u:function(e,t){const n=e.getFullYear();return pt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Yr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Ix(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):pt(o,t.length)},I:function(e,t,n){const r=Rx(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Yr.d(e,t)},D:function(e,t,n){const r=XF(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return pt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return pt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return pt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Rs.noon:r===0?o=Rs.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Rs.evening:r>=12?o=Rs.afternoon:r>=4?o=Rs.morning:o=Rs.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Yr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Yr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Yr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Yr.s(e,t)},S:function(e,t){return Yr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Nx(r);case"XXXX":case"XX":return wo(r);case"XXXXX":case"XXX":default:return wo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Nx(r);case"xxxx":case"xx":return wo(r);case"xxxxx":case"xxx":default:return wo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jx(r,":");case"OOOO":default:return"GMT"+wo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jx(r,":");case"zzzz":default:return"GMT"+wo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return pt(r,t.length)},T:function(e,t,n){return pt(+e,t.length)}};function jx(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+pt(i,2)}function Nx(e,t){return e%60===0?(e>0?"-":"+")+pt(Math.abs(e)/60,2):wo(e,t)}function wo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=pt(Math.trunc(r/60),2),i=pt(r%60,2);return n+o+t+i}const $x=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},_x=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},JF={p:_x,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $x(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$x(r,t)).replace("{{time}}",_x(o,t))}},QF=/^D+$/,eB=/^Y+$/,tB=["D","DD","YY","YYYY"];function nB(e){return QF.test(e)}function rB(e){return eB.test(e)}function oB(e,t,n){const r=sB(e,t,n);if(console.warn(r),tB.includes(e))throw new RangeError(r)}function sB(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lB=/^'([^]*?)'?$/,cB=/''/g,uB=/[a-zA-Z]/;function da(e,t,n){var d,f,p,h,y,m,b,x;const r=ia(),o=(n==null?void 0:n.locale)??r.locale??ip,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((m=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((x=(b=r.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0,l=yt(e,n==null?void 0:n.in);if(!dF(l))throw new RangeError("Invalid time value");let c=t.match(aB).map(w=>{const C=w[0];if(C==="p"||C==="P"){const O=JF[C];return O(w,o.formatLong)}return w}).join("").match(iB).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const C=w[0];if(C==="'")return{isToken:!1,value:dB(w)};if(Ax[C])return{isToken:!0,value:w};if(C.match(uB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const C=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&rB(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&nB(C))&&oB(C,t,String(e));const O=Ax[C[0]];return O(l,C,o.localize,u)}).join("")}function dB(e){const t=e.match(lB);return t?t[1].replace(cB,"'"):e}function fB(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=Wt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function pB(e,t){return yt(e,t==null?void 0:t.in).getMonth()}function hB(e,t){return yt(e,t==null?void 0:t.in).getFullYear()}function mB(e,t){return+yt(e)>+yt(t)}function gB(e,t){return+yt(e)<+yt(t)}function yB(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function bB(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function vB(e,t,n){const r=yt(e,n==null?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=Wt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=fB(a);return r.setMonth(t,Math.min(i,l)),r}function xB(e,t,n){const r=yt(e,n==null?void 0:n.in);return isNaN(+r)?Wt(e,NaN):(r.setFullYear(t),r)}const ap={},fa={};function pa(e,t){try{const r=(ap[e]||(ap[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in fa?fa[r]:Fx(r,r.split(":"))}catch{if(e in fa)return fa[e];const n=e==null?void 0:e.match(wB);return n?Fx(e,n.slice(1)):NaN}}const wB=/([+-]\d\d):?(\d\d)?/;function Fx(e,t){const n=+t[0],r=+(t[1]||0);return fa[e]=n>0?n*60+r:n*60-r}class fr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(pa(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Lx(this),lp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new fr(...n,t):new fr(Date.now(),t)}withTimeZone(t){return new fr(+this,t)}getTimezoneOffset(){return-pa(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),lp(this),+this}[Symbol.for("constructDateFrom")](t){return new fr(+new Date(t),this.timeZone)}}const Bx=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Bx.test(e))return;const t=e.replace(Bx,"$1UTC");fr.prototype[t]&&(e.startsWith("get")?fr.prototype[e]=function(){return this.internal[t]()}:(fr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),CB(this),+this},fr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lp(this),+this}))});function lp(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function CB(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Lx(e)}function Lx(e){const t=pa(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),i=r-o,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=r-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=pa(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,f=c!==t,p=d-l;if(f&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=pa(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class Qt extends fr{static tz(t,...n){return n.length?new Qt(...n,t):new Qt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${SB(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Qt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Qt(+new Date(t),this.timeZone)}}function SB(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var Re;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Re||(Re={}));var Mt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Mt||(Mt={}));var Kn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Kn||(Kn={}));var On;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(On||(On={}));const Vx=5,TB=4;function OB(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),i=t.addDays(o,Vx*7-1);return t.getMonth(e)===t.getMonth(i)?Vx:TB}function Wx(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function kB(e,t){const n=Wx(e,t),r=OB(e,t);return t.addDays(n,r*7-1)}class Er{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Qt.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,o,i):this.options.timeZone?new Qt(r,o,i,this.options.timeZone):new Date(r,o,i)},this.addDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,o):Cx(r,o)},this.addMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,o):Sx(r,o)},this.addWeeks=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,o):iF(r,o)},this.addYears=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,o):aF(r,o)},this.differenceInCalendarDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):kx(r,o)},this.differenceInCalendarMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):fF(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):mF(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):kB(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):bF(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):pF(r)},this.endOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,o):Mx(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):yF(r)},this.format=(r,o,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,o,this.options):da(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Rx(r)},this.getMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):pB(r,this.options)},this.getYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):hB(r,this.options)},this.getWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):Ix(r,this.options)},this.isAfter=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,o):mB(r,o)},this.isBefore=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,o):gB(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Ex(r)},this.isSameDay=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,o):uF(r,o)},this.isSameMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,o):yB(r,o)},this.isSameYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,o):bB(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):lF(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):cF(r)},this.setMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,o):vB(r,o)},this.setYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,o):xB(r,o)},this.startOfBroadcastWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Wx(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):la(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):aa(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):gF(r)},this.startOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Ps(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Px(r)},this.options={locale:ip,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const pr=new Er;class zx{constructor(t,n,r=pr){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class EB{constructor(t,n){this.date=t,this.weeks=n}}class PB{constructor(t,n){this.days=n,this.weekNumber=t}}function Pr(e,t,n=!1,r=pr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&o?l(o,t):!1}function Ux(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function cp(e){return!!(e&&typeof e=="object"&&"from"in e)}function Hx(e){return!!(e&&typeof e=="object"&&"after"in e)}function qx(e){return!!(e&&typeof e=="object"&&"before"in e)}function Yx(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Gx(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Mr(e,t,n=pr){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(Gx(l,n))return l.includes(e);if(cp(l))return Pr(l,e,!1,n);if(Yx(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(Ux(l)){const c=i(l.before,e),u=i(l.after,e),d=c>0,f=u<0;return a(l.before,l.after)?f&&d:d||f}return Hx(l)?i(e,l.after)>0:qx(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function MB(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,broadcastCalendar:l,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:f,isBefore:p,endOfMonth:h,isAfter:y}=n,m=t.startMonth&&f(t.startMonth),b=t.endMonth&&h(t.endMonth),x={[Mt.focused]:[],[Mt.outside]:[],[Mt.disabled]:[],[Mt.hidden]:[],[Mt.today]:[]},w={};for(const C of e){const{date:O,displayMonth:v}=C,k=!!(v&&!d(O,v)),E=!!(m&&p(O,m)),M=!!(b&&y(O,b)),D=!!(r&&Mr(O,r,n)),A=!!(o&&Mr(O,o,n))||E||M||!l&&!a&&k||l&&a===!1&&k,$=u(O,c??n.today());k&&x.outside.push(C),D&&x.disabled.push(C),A&&x.hidden.push(C),$&&x.today.push(C),i&&Object.keys(i).forEach(I=>{const W=i==null?void 0:i[I];W&&Mr(O,W,n)&&(w[I]?w[I].push(C):w[I]=[C])})}return C=>{const O={[Mt.focused]:!1,[Mt.disabled]:!1,[Mt.hidden]:!1,[Mt.outside]:!1,[Mt.today]:!1},v={};for(const k in x){const E=x[k];O[k]=E.some(M=>M===C)}for(const k in w)v[k]=w[k].some(E=>E===C);return{...O,...v}}}function RB(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(n[i]?o.push(n[i]):t[Mt[i]]?o.push(t[Mt[i]]):t[Kn[i]]&&o.push(t[Kn[i]]),o),[t[Re.Day]])}function DB(e){return R.createElement("button",{...e})}function IB(e){return R.createElement("span",{...e})}function AB(e){const{size:t=24,orientation:n="left",className:r}=e;return R.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&R.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&R.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&R.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&R.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function jB(e){const{day:t,modifiers:n,...r}=e;return R.createElement("td",{...r})}function NB(e){const{day:t,modifiers:n,...r}=e,o=R.useRef(null);return R.useEffect(()=>{var i;n.focused&&((i=o.current)==null||i.focus())},[n.focused]),R.createElement("button",{ref:o,...r})}function $B(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[Re.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===i.value);return R.createElement("span",{"data-disabled":i.disabled,className:o[Re.DropdownRoot]},R.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>R.createElement(r.Option,{key:c,value:c,disabled:d},u))),R.createElement("span",{className:o[Re.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,R.createElement(r.Chevron,{orientation:"down",size:18,className:o[Re.Chevron]})))}function _B(e){return R.createElement("div",{...e})}function FB(e){return R.createElement("div",{...e})}function BB(e){const{calendarMonth:t,displayIndex:n,...r}=e;return R.createElement("div",{...r},e.children)}function LB(e){const{calendarMonth:t,displayIndex:n,...r}=e;return R.createElement("div",{...r})}function VB(e){return R.createElement("table",{...e})}function WB(e){return R.createElement("div",{...e})}const Kx=R.createContext(void 0);function ha(){const e=R.useContext(Kx);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function zB(e){const{components:t}=ha();return R.createElement(t.Dropdown,{...e})}function UB(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ha(),d=R.useCallback(p=>{o&&(n==null||n(p))},[o,n]),f=R.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return R.createElement("nav",{...i},R.createElement(a.PreviousMonthButton,{type:"button",className:l[Re.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},R.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[Re.Chevron],orientation:"left"})),R.createElement(a.NextMonthButton,{type:"button",className:l[Re.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},R.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[Re.Chevron]})))}function HB(e){const{components:t}=ha();return R.createElement(t.Button,{...e})}function qB(e){return R.createElement("option",{...e})}function YB(e){const{components:t}=ha();return R.createElement(t.Button,{...e})}function GB(e){const{rootRef:t,...n}=e;return R.createElement("div",{...n,ref:t})}function KB(e){return R.createElement("select",{...e})}function XB(e){const{week:t,...n}=e;return R.createElement("tr",{...n})}function ZB(e){return R.createElement("th",{...e})}function JB(e){return R.createElement("thead",{"aria-hidden":!0},R.createElement("tr",{...e}))}function QB(e){const{week:t,...n}=e;return R.createElement("th",{...n})}function eL(e){return R.createElement("th",{...e})}function tL(e){return R.createElement("tbody",{...e})}function nL(e){const{components:t}=ha();return R.createElement(t.Dropdown,{...e})}const rL=Object.freeze(Object.defineProperty({__proto__:null,Button:DB,CaptionLabel:IB,Chevron:AB,Day:jB,DayButton:NB,Dropdown:$B,DropdownNav:_B,Footer:FB,Month:BB,MonthCaption:LB,MonthGrid:VB,Months:WB,MonthsDropdown:zB,Nav:UB,NextMonthButton:HB,Option:qB,PreviousMonthButton:YB,Root:GB,Select:KB,Week:XB,WeekNumber:QB,WeekNumberHeader:eL,Weekday:ZB,Weekdays:JB,Weeks:tL,YearsDropdown:nL},Symbol.toStringTag,{value:"Module"}));function oL(e){return{...rL,...e}}function sL(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function iL(){const e={};for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;for(const t in Mt)e[Mt[t]]=`rdp-${Mt[t]}`;for(const t in Kn)e[Kn[t]]=`rdp-${Kn[t]}`;for(const t in On)e[On[t]]=`rdp-${On[t]}`;return e}function Xx(e,t,n){return(n??new Er(t)).format(e,"LLLL y")}const aL=Xx;function lL(e,t,n){return(n??new Er(t)).format(e,"d")}function cL(e,t=pr){return t.format(e,"LLLL")}function uL(e,t=pr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function dL(){return""}function fL(e,t,n){return(n??new Er(t)).format(e,"cccccc")}function Zx(e,t=pr){return t.format(e,"yyyy")}const pL=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Xx,formatDay:lL,formatMonthCaption:aL,formatMonthDropdown:cL,formatWeekNumber:uL,formatWeekNumberHeader:dL,formatWeekdayName:fL,formatYearCaption:Zx,formatYearDropdown:Zx},Symbol.toStringTag,{value:"Module"}));function hL(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...pL,...e}}function mL(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),m=t&&p<i(t)||n&&p>i(n)||!1;return{value:y,label:h,disabled:m}})}function gL(e,t={},n={}){let r={...t==null?void 0:t[Re.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function yL(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let a=0;a<7;a++){const l=e.addDays(o,a);i.push(l)}return i}function bL(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:i,addYears:a,getYear:l,isBefore:c,isSameYear:u}=r,d=o(e),f=i(t),p=[];let h=d;for(;c(h,f)||u(h,f);)p.push(h),h=a(h,1);return p.map(y=>{const m=n.formatYearDropdown(y,r);return{value:l(y),label:m,disabled:!1}})}function Jx(e,t,n){return(n??new Er(t)).format(e,"LLLL y")}const vL=Jx;function xL(e,t,n,r){let o=(r??new Er(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Qx(e,t,n,r){let o=(r??new Er(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const wL=Qx;function CL(){return""}function SL(e){return"Choose the Month"}function TL(e){return"Go to the Next Month"}function OL(e){return"Go to the Previous Month"}function kL(e,t,n){return(n??new Er(t)).format(e,"cccc")}function EL(e,t){return`Week ${e}`}function PL(e){return"Week Number"}function ML(e){return"Choose the Year"}const RL=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:vL,labelDay:wL,labelDayButton:Qx,labelGrid:Jx,labelGridcell:xL,labelMonthDropdown:SL,labelNav:CL,labelNext:TL,labelPrevious:OL,labelWeekNumber:EL,labelWeekNumberHeader:PL,labelWeekday:kL,labelYearDropdown:ML},Symbol.toStringTag,{value:"Module"})),ma=e=>e instanceof HTMLElement?e:null,up=e=>[...e.querySelectorAll("[data-animated-month]")??[]],DL=e=>ma(e.querySelector("[data-animated-month]")),dp=e=>ma(e.querySelector("[data-animated-caption]")),fp=e=>ma(e.querySelector("[data-animated-weeks]")),IL=e=>ma(e.querySelector("[data-animated-nav]")),AL=e=>ma(e.querySelector("[data-animated-weekdays]"));function jL(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const a=R.useRef(null),l=R.useRef(r),c=R.useRef(!1);R.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=i.isSameMonth(r[0].date,u[0].date),f=i.isAfter(r[0].date,u[0].date),p=f?n[On.caption_after_enter]:n[On.caption_before_enter],h=f?n[On.weeks_after_enter]:n[On.weeks_before_enter],y=a.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(up(m).forEach(C=>{if(!(C instanceof HTMLElement))return;const O=DL(C);O&&C.contains(O)&&C.removeChild(O);const v=dp(C);v&&v.classList.remove(p);const k=fp(C);k&&k.classList.remove(h)}),a.current=m):a.current=null,c.current||d||o)return;const b=y instanceof HTMLElement?up(y):[],x=up(e.current);if(x&&x.every(w=>w instanceof HTMLElement)&&b&&b.every(w=>w instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const w=IL(e.current);w&&(w.style.zIndex="1"),x.forEach((C,O)=>{const v=b[O];if(!v)return;C.style.position="relative",C.style.overflow="hidden";const k=dp(C);k&&k.classList.add(p);const E=fp(C);E&&E.classList.add(h);const M=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),k&&k.classList.remove(p),E&&E.classList.remove(h),C.style.position="",C.style.overflow="",C.contains(v)&&C.removeChild(v)};v.style.pointerEvents="none",v.style.position="absolute",v.style.overflow="hidden",v.setAttribute("aria-hidden","true");const D=AL(v);D&&(D.style.opacity="0");const A=dp(v);A&&(A.classList.add(f?n[On.caption_before_exit]:n[On.caption_after_exit]),A.addEventListener("animationend",M));const $=fp(v);$&&$.classList.add(f?n[On.weeks_before_exit]:n[On.weeks_after_exit]),C.insertBefore(v,C.firstChild)})}})}function NL(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:m,isAfter:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:C}=r,O=c?x(o,r):a?w(o):C(o),v=c?p(i):a?h(y(i)):m(y(i)),k=d(v,O),E=f(i,o)+1,M=[];for(let $=0;$<=k;$++){const I=u(O,$);if(t&&b(I,t))break;M.push(I)}const A=(c?35:42)*E;if(l&&M.length<A){const $=A-M.length;for(let I=0;I<$;I++){const W=u(M[M.length-1],1);M.push(W)}}return M}function $L(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((i,a)=>[...i,...a.days],t);return[...n,...o]},t)}function _L(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function e1(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:i=1,endMonth:a,startMonth:l}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=t;if(a&&u(a,c)<0){const p=-1*(i-1);c=d(a,p)}return l&&u(c,l)<0&&(c=l),f(c)}function FL(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((m,b)=>{const x=n.broadcastCalendar?f(b,r):n.ISOWeek?p(b):h(b),w=n.broadcastCalendar?i(b):n.ISOWeek?a(l(b)):c(l(b)),C=t.filter(E=>E>=x&&E<=w),O=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<O){const E=t.filter(M=>{const D=O-C.length;return M>w&&M<=o(w,D)});C.push(...E)}const v=C.reduce((E,M)=>{const D=n.ISOWeek?u(M):d(M),A=E.find(I=>I.weekNumber===D),$=new zx(M,b,r);return A?A.days.push($):E.push(new PB(D,[$])),E},[]),k=new EB(b,v);return m.push(k),m},[]);return n.reverseMonths?y.reverse():y}function BL(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:f}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:m}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&m&&(r=m),!r&&h&&(r=d(h,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=d(p,0,1):!n&&b&&(n=o(c(e.today??f(),-100))),r?r=l(r):h?r=d(h,11,31):!r&&b&&(r=u(e.today??f())),[n&&i(n),r&&i(r)]}function LL(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i:1,d=a(e);if(!t)return l(d,u);if(!(c(t,e)<i))return l(d,u)}function VL(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i??1:1,d=a(e);if(!t)return l(d,-u);if(!(c(d,t)<=0))return l(d,-u)}function WL(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function vc(e,t){const[n,r]=R.useState(e);return[t===void 0?n:t,r]}function zL(e,t){const[n,r]=BL(e,t),{startOfMonth:o,endOfMonth:i}=t,a=e1(e,t),[l,c]=vc(a,e.month?a:void 0);R.useEffect(()=>{const k=e1(e,t);c(k)},[e.timeZone]);const u=_L(l,r,e,t),d=NL(u,e.endMonth?i(e.endMonth):void 0,e,t),f=FL(u,d,e,t),p=WL(f),h=$L(f),y=VL(l,n,e,t),m=LL(l,r,e,t),{disableNavigation:b,onMonthChange:x}=e,w=k=>p.some(E=>E.days.some(M=>M.isEqualTo(k))),C=k=>{if(b)return;let E=o(k);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x==null||x(E)};return{months:f,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:m,goToMonth:C,goToDay:k=>{w(k)||C(k.date)}}}var hr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(hr||(hr={}));function t1(e){return!e[Mt.disabled]&&!e[Mt.hidden]&&!e[Mt.outside]}function UL(e,t,n,r){let o,i=-1;for(const a of e){const l=t(a);t1(l)&&(l[Mt.focused]&&i<hr.FocusedModifier?(o=a,i=hr.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<hr.LastFocused?(o=a,i=hr.LastFocused):n(a.date)&&i<hr.Selected?(o=a,i=hr.Selected):l[Mt.today]&&i<hr.Today&&(o=a,i=hr.Today))}return o||(o=e.find(a=>t1(t(a)))),o}function HL(e,t,n,r,o,i,a){const{ISOWeek:l,broadcastCalendar:c}=i,{addDays:u,addMonths:d,addWeeks:f,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:m,max:b,min:x,startOfBroadcastWeek:w,startOfISOWeek:C,startOfWeek:O}=a;let k={day:u,week:f,month:d,year:p,startOfWeek:E=>c?w(E,a):l?C(E):O(E),endOfWeek:E=>c?h(E):l?y(E):m(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=b([r,k]):t==="after"&&o&&(k=x([o,k])),k}function n1(e,t,n,r,o,i,a,l=0){if(l>365)return;const c=HL(e,t,n.date,r,o,i,a),u=!!(i.disabled&&Mr(c,i.disabled,a)),d=!!(i.hidden&&Mr(c,i.hidden,a)),f=c,p=new zx(c,f,a);return!u&&!d?p:n1(e,t,p,r,o,i,a,l+1)}function qL(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=R.useState(),c=UL(t.days,n,r||(()=>!1),a),[u,d]=R.useState(i?c:void 0);return{isFocusTarget:m=>!!(c!=null&&c.isEqualTo(m)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(m,b)=>{if(!u)return;const x=n1(m,b,u,t.navStart,t.navEnd,e,o);x&&(t.goToDay(x),d(x))}}}function YL(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=vc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t,u=h=>(l==null?void 0:l.some(y=>c(y,h)))??!1,{min:d,max:f}=e;return{selected:l,select:(h,y,m)=>{let b=[...l??[]];if(u(h)){if((l==null?void 0:l.length)===d||r&&(l==null?void 0:l.length)===1)return;b=l==null?void 0:l.filter(x=>!c(x,h))}else(l==null?void 0:l.length)===f?b=[h]:b=[...b,h];return o||a(b),o==null||o(b,h,y,m),b},isSelected:u}}function GL(e,t,n=0,r=0,o=!1,i=pr){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?o?f={from:a,to:void 0}:f=void 0:d(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?f={from:a,to:l}:f=void 0;else if(c(a,e))f={from:a,to:n>0?void 0:e};else if(c(l,e))f={from:e,to:n>0?void 0:e};else if(d(e,a))f={from:e,to:l};else if(u(e,a))f={from:a,to:e};else if(u(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const p=i.differenceInCalendarDays(f.to,f.from);r>0&&p>r?f={from:e,to:void 0}:n>1&&p<n&&(f={from:e,to:void 0})}return f}function KL(e,t,n=pr){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function r1(e,t,n=pr){return Pr(e,t.from,!1,n)||Pr(e,t.to,!1,n)||Pr(t,e.from,!1,n)||Pr(t,e.to,!1,n)}function XL(e,t,n=pr){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?Pr(e,l,!1,n):Gx(l,n)?l.some(c=>Pr(e,c,!1,n)):cp(l)?l.from&&l.to?r1(e,{from:l.from,to:l.to},n):!1:Yx(l)?KL(e,l.dayOfWeek,n):Ux(l)?n.isAfter(l.before,l.after)?r1(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Mr(e.from,l,n)||Mr(e.to,l,n):Hx(l)||qx(l)?Mr(e.from,l,n)||Mr(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(l)))return!0;l=n.addDays(l,1)}}return!1}function ZL(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[l,c]=vc(o,a?o:void 0),u=a?o:l;return{selected:u,select:(p,h,y)=>{const{min:m,max:b}=e,x=p?GL(p,u,m,b,i,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&XL({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||c(x),a==null||a(x,p,h,y),x},isSelected:p=>u&&Pr(u,p,!1,t)}}function JL(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=vc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t;return{selected:l,select:(f,p,h)=>{let y=f;return!r&&l&&l&&c(f,l)&&(y=void 0),o||a(y),o==null||o(y,f,p,h),y},isSelected:f=>l?c(l,f):!1}}function QL(e,t){const n=JL(e,t),r=YL(e,t),o=ZL(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function e8(e){var ke;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Qt(t.today,t.timeZone)),t.month&&(t.month=new Qt(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Qt(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Qt(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Qt(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Qt(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(ke=t.selected)==null?void 0:ke.map(xe=>new Qt(xe,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Qt(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Qt(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:i,locale:a,classNames:l}=R.useMemo(()=>{const xe={...ip,...t.locale};return{dateLib:new Er({locale:xe,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:oL(t.components),formatters:hL(t.formatters),labels:{...RL,...t.labels},locale:xe,classNames:{...iL(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:m,onDayMouseEnter:b,onDayMouseLeave:x,onNextClick:w,onPrevClick:C,showWeekNumber:O,styles:v}=t,{formatCaption:k,formatDay:E,formatMonthDropdown:M,formatWeekNumber:D,formatWeekNumberHeader:A,formatWeekdayName:$,formatYearDropdown:I}=r,W=zL(t,i),{days:j,months:F,navStart:P,navEnd:N,previousMonth:L,nextMonth:H,goToMonth:V}=W,z=MB(j,t,i),{isSelected:Z,select:ne,selected:J}=QL(t,i)??{},{blur:se,focused:Q,isFocusTarget:ue,moveFocus:_,setFocused:q}=qL(t,W,z,Z??(()=>!1),i),{labelDayButton:X,labelGridcell:Y,labelGrid:B,labelMonthDropdown:K,labelNav:ee,labelPrevious:oe,labelNext:ce,labelWeekday:Ce,labelWeekNumber:ae,labelWeekNumberHeader:we,labelYearDropdown:me}=o,ge=R.useMemo(()=>yL(i,t.ISOWeek),[i,t.ISOWeek]),$e=u!==void 0||h!==void 0,Ae=R.useCallback(()=>{L&&(V(L),C==null||C(L))},[L,V,C]),Me=R.useCallback(()=>{H&&(V(H),w==null||w(H))},[V,H,w]),ze=R.useCallback((xe,Ee)=>We=>{We.preventDefault(),We.stopPropagation(),q(xe),ne==null||ne(xe.date,Ee,We),h==null||h(xe.date,Ee,We)},[ne,h,q]),Xe=R.useCallback((xe,Ee)=>We=>{q(xe),y==null||y(xe.date,Ee,We)},[y,q]),Fe=R.useCallback((xe,Ee)=>We=>{se(),p==null||p(xe.date,Ee,We)},[se,p]),Be=R.useCallback((xe,Ee)=>We=>{const Qe={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[We.shiftKey?"year":"month","before"],PageDown:[We.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Qe[We.key]){We.preventDefault(),We.stopPropagation();const[bt,sn]=Qe[We.key];_(bt,sn)}m==null||m(xe.date,Ee,We)},[_,m,t.dir]),fe=R.useCallback((xe,Ee)=>We=>{b==null||b(xe.date,Ee,We)},[b]),Oe=R.useCallback((xe,Ee)=>We=>{x==null||x(xe.date,Ee,We)},[x]),Le=R.useCallback(xe=>Ee=>{const We=Number(Ee.target.value),Qe=i.setMonth(i.startOfMonth(xe),We);V(Qe)},[i,V]),Ue=R.useCallback(xe=>Ee=>{const We=Number(Ee.target.value),Qe=i.setYear(i.startOfMonth(xe),We);V(Qe)},[i,V]),{className:it,style:be}=R.useMemo(()=>({className:[l[Re.Root],t.className].filter(Boolean).join(" "),style:{...v==null?void 0:v[Re.Root],...t.style}}),[l,t.className,t.style,v]),le=sL(t),pe=R.useRef(null);jL(pe,!!t.animate,{classNames:l,months:F,focused:Q,dateLib:i});const ve={dayPickerProps:t,selected:J,select:ne,isSelected:Z,months:F,nextMonth:H,previousMonth:L,goToMonth:V,getModifiers:z,components:n,classNames:l,styles:v,labels:o,formatters:r};return R.createElement(Kx.Provider,{value:ve},R.createElement(n.Root,{rootRef:t.animate?pe:void 0,className:it,style:be,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...le},R.createElement(n.Months,{className:l[Re.Months],style:v==null?void 0:v[Re.Months]},!t.hideNavigation&&!d&&R.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Re.Nav],style:v==null?void 0:v[Re.Nav],"aria-label":ee(),onPreviousClick:Ae,onNextClick:Me,previousMonth:L,nextMonth:H}),F.map((xe,Ee)=>{const We=mL(xe.date,P,N,r,i),Qe=bL(P,N,r,i);return R.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[Re.Month],style:v==null?void 0:v[Re.Month],key:Ee,displayIndex:Ee,calendarMonth:xe},d==="around"&&!t.hideNavigation&&Ee===0&&R.createElement(n.PreviousMonthButton,{type:"button",className:l[Re.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":oe(L),onClick:Ae,"data-animated-button":t.animate?"true":void 0},R.createElement(n.Chevron,{disabled:L?void 0:!0,className:l[Re.Chevron],orientation:t.dir==="rtl"?"right":"left"})),R.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[Re.MonthCaption],style:v==null?void 0:v[Re.MonthCaption],calendarMonth:xe,displayIndex:Ee},c!=null&&c.startsWith("dropdown")?R.createElement(n.DropdownNav,{className:l[Re.Dropdowns],style:v==null?void 0:v[Re.Dropdowns]},c==="dropdown"||c==="dropdown-months"?R.createElement(n.MonthsDropdown,{className:l[Re.MonthsDropdown],"aria-label":K(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:Le(xe.date),options:We,style:v==null?void 0:v[Re.Dropdown],value:i.getMonth(xe.date)}):R.createElement("span",null,M(xe.date,i)),c==="dropdown"||c==="dropdown-years"?R.createElement(n.YearsDropdown,{className:l[Re.YearsDropdown],"aria-label":me(i.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:Ue(xe.date),options:Qe,style:v==null?void 0:v[Re.Dropdown],value:i.getYear(xe.date)}):R.createElement("span",null,I(xe.date,i)),R.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},k(xe.date,i.options,i))):R.createElement(n.CaptionLabel,{className:l[Re.CaptionLabel],role:"status","aria-live":"polite"},k(xe.date,i.options,i))),d==="around"&&!t.hideNavigation&&Ee===f-1&&R.createElement(n.NextMonthButton,{type:"button",className:l[Re.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":ce(H),onClick:Me,"data-animated-button":t.animate?"true":void 0},R.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[Re.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ee===f-1&&d==="after"&&!t.hideNavigation&&R.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Re.Nav],style:v==null?void 0:v[Re.Nav],"aria-label":ee(),onPreviousClick:Ae,onNextClick:Me,previousMonth:L,nextMonth:H}),R.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":B(xe.date,i.options,i)||void 0,className:l[Re.MonthGrid],style:v==null?void 0:v[Re.MonthGrid]},!t.hideWeekdays&&R.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[Re.Weekdays],style:v==null?void 0:v[Re.Weekdays]},O&&R.createElement(n.WeekNumberHeader,{"aria-label":we(i.options),className:l[Re.WeekNumberHeader],style:v==null?void 0:v[Re.WeekNumberHeader],scope:"col"},A()),ge.map((bt,sn)=>R.createElement(n.Weekday,{"aria-label":Ce(bt,i.options,i),className:l[Re.Weekday],key:sn,style:v==null?void 0:v[Re.Weekday],scope:"col"},$(bt,i.options,i)))),R.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[Re.Weeks],style:v==null?void 0:v[Re.Weeks]},xe.weeks.map((bt,sn)=>R.createElement(n.Week,{className:l[Re.Week],key:bt.weekNumber,style:v==null?void 0:v[Re.Week],week:bt},O&&R.createElement(n.WeekNumber,{week:bt,style:v==null?void 0:v[Re.WeekNumber],"aria-label":ae(bt.weekNumber,{locale:a}),className:l[Re.WeekNumber],scope:"row",role:"rowheader"},D(bt.weekNumber,i)),bt.days.map(Ot=>{const{date:an}=Ot,Je=z(Ot);if(Je[Mt.focused]=!Je.hidden&&!!(Q!=null&&Q.isEqualTo(Ot)),Je[Kn.selected]=(Z==null?void 0:Z(an))||Je.selected,cp(J)){const{from:zn,to:gr}=J;Je[Kn.range_start]=!!(zn&&gr&&i.isSameDay(an,zn)),Je[Kn.range_end]=!!(zn&&gr&&i.isSameDay(an,gr)),Je[Kn.range_middle]=Pr(J,an,!0,i)}const xt=gL(Je,v,t.modifiersStyles),zt=RB(Je,l,t.modifiersClassNames),Kr=!$e&&!Je.hidden?Y(an,Je,i.options,i):void 0;return R.createElement(n.Day,{key:`${i.format(an,"yyyy-MM-dd")}_${i.format(Ot.displayMonth,"yyyy-MM")}`,day:Ot,modifiers:Je,className:zt.join(" "),style:xt,role:"gridcell","aria-selected":Je.selected||void 0,"aria-label":Kr,"data-day":i.format(an,"yyyy-MM-dd"),"data-month":Ot.outside?i.format(an,"yyyy-MM"):void 0,"data-selected":Je.selected||void 0,"data-disabled":Je.disabled||void 0,"data-hidden":Je.hidden||void 0,"data-outside":Ot.outside||void 0,"data-focused":Je.focused||void 0,"data-today":Je.today||void 0},!Je.hidden&&$e?R.createElement(n.DayButton,{className:l[Re.DayButton],style:v==null?void 0:v[Re.DayButton],type:"button",day:Ot,modifiers:Je,disabled:Je.disabled||void 0,tabIndex:ue(Ot)?0:-1,"aria-label":X(an,Je,i.options,i),onClick:ze(Ot,Je),onBlur:Fe(Ot,Je),onFocus:Xe(Ot,Je),onKeyDown:Be(Ot,Je),onMouseEnter:fe(Ot,Je),onMouseLeave:Oe(Ot,Je)},E(an,i.options,i)):!Je.hidden&&E(Ot.date,i.options,i))}))))))})),t.footer&&R.createElement(n.Footer,{className:l[Re.Footer],style:v==null?void 0:v[Re.Footer],role:"status","aria-live":"polite"},t.footer)))}const t8=({color:e})=>g.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M5.5 9.96346L1.82547 6.28893C1.39151 5.85497 1.39151 5.14487 1.82547 4.71091L5.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),n8=({color:e})=>g.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M1.5 9.96346L5.17453 6.28893C5.60849 5.85498 5.60849 5.14487 5.17453 4.71091L1.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),o1=({color:e})=>g.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M9 0.595703L5.50126 4.09444C5.08807 4.50763 4.41193 4.50763 3.99874 4.09444L0.5 0.595703",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),r8=({color:e})=>g.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M9 4.4043L5.50126 0.90556C5.08807 0.492365 4.41193 0.492365 3.99874 0.90556L0.5 4.4043",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),o8=G(Fl)(({theme:e})=>({width:"100%!important","& .MuiFormHelperText-root":{margin:0},"& .MuiInputBase-root.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.brandColor.red},"& .MuiInputLabel-root.Mui-error":{color:e.palette.brandColor.red},"& .MuiFilledInput-root":{borderRadius:"0.8rem"},"& .MuiOutlinedInput-root":{fontSize:"1.1rem",color:e.palette.primary.notifyTextColor,borderRadius:"0.8rem",backgroundColor:`${e.palette.primary.notifyBackground}`,padding:"0.3rem","& fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&:hover fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&.Mui-focused fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`,borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:`${e.palette.primary.notifyBorderColor}`}},"& .MuiInputBase-input":{color:e.palette.primary.notifyActiveText,fontSize:"1.1rem",height:"2.6rem",padding:"0.3rem 1rem"},"& .MuiInputBase-input.Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,cursor:"not-allowed","-webkit-text-fill-color":`${e.palette.primary.notifyTextColor} !important`,opacity:1},"& .Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,overflow:"hidden",opacity:1},"& .Mui-disabled:before":{border:"none !important"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"},"& .MuiInputLabel-root":{paddingLeft:"0.5rem",backgroundColor:`${e.palette.primary.notifyBackground}!important`,color:e.palette.primary.notifyTextColor,fontSize:"1.1rem",top:"1.1rem",left:"1rem",transform:"none","&.Mui-focused":{color:e.palette.primary.notifyTextColor}},"& .MuiInputLabel-shrink":{top:"0",backgroundColor:`${e.palette.primary.notifyBackground}!important`,padding:"0 0.4rem",transform:"translateY(-50%) translateX(0rem)"},"& .MuiFormHelperText-root.Mui-error":{color:e.palette.brandColor.red,paddingLeft:"0.8rem",paddingTop:"0.2rem",fontSize:"0.9rem"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,opacity:1},"& .MuiFormLabel-asterisk":{color:e.palette.brandColor.red},"& input:-webkit-autofill":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`,caretColor:e.palette.primary.notifyActiveText,transition:"background-color 9999s ease-in-out 0s !important"},"& input:-webkit-autofill:hover ":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`}})),xc=({showBorder:e=!0,...t})=>g.jsx(Fn,{children:g.jsx(o8,{variant:"outlined",inputProps:{style:{cursor:t!=null&&t.disabled?"not-allowed":"pointer"}},sx:{cursor:t!=null&&t.disabled?"not-allowed":"pointer",opacity:t!=null&&t.disabled?.6:1,...!e&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}},...t.styles},...t})}),s8=["January","February","March","April","May","June","July","August","September","October","November","December"],i8=Array.from({length:36},(e,t)=>2e3+t),a8=({label:e,mode:t="single",value:n,onChange:r,disabled:o,readOnly:i,formatString:a,error:l,errorText:c,openCalendar:u,inputProps:d,minDate:f=new Date(new Date().getFullYear()-10,0,1),maxDate:p=new Date(new Date().getFullYear()+10,11,31),...h})=>{const y=It(),m=R.useRef(null),[b,x]=R.useState(null),[w,C]=R.useState(t==="range"&&(n!=null&&n.from)?n.from:n||new Date),[O,v]=R.useState("calendar"),k=!!b,E=k?"date-picker-popover":void 0,M=N=>x(N.currentTarget),D=()=>{x(null),v("calendar")},A=N=>{C(new Date(w.getFullYear(),N)),v("calendar")},$=N=>{C(new Date(N,w.getMonth())),v("month")},I=N=>{if(!N){D();return}t==="range"?r==null||r(N):(r==null||r(N),D())},W=({orientation:N,className:L,disabled:H})=>g.jsx(ye,{className:L,sx:{opacity:H?.5:1,pointerEvents:H?"none":"auto"},children:{left:g.jsx(t8,{color:y.palette.primary.notifyIconColor}),right:g.jsx(n8,{color:y.palette.primary.notifyIconColor}),down:g.jsx(o1,{color:y.palette.primary.notifyIconColor}),up:g.jsx(r8,{color:y.palette.primary.notifyIconColor})}[N]}),j=N=>{var ne;const{options:L,value:H}=N??{},V=(L==null?void 0:L.length)!==12,z=(ne=L==null?void 0:L.find(J=>(J==null?void 0:J.value)===H))==null?void 0:ne.label,Z=()=>{v(t==="range"?"month":"year")};return g.jsxs(ft,{direction:"row",sx:{cursor:"pointer",justifyContent:"center",alignItems:"center",gap:"0.5rem"},onClick:Z,children:[g.jsx(nt,{sx:{color:y.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},children:z}),V&&g.jsx(o1,{color:y.palette.primary.notifyIconColor})]})},F=()=>{const N=w.getFullYear(),L=w.getMonth();if(O==="month")return g.jsx(ye,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:s8.map((H,V)=>{const z=new Date(N,V,1),Z=f&&z<new Date(f.getFullYear(),f.getMonth(),1);return g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:Z?"not-allowed":"pointer",opacity:Z?.5:1},onClick:()=>!Z&&A(V),children:g.jsx(ye,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:V===L&&!Z&&y.palette.brandColor.orange,color:V===L&&!Z?y.palette.brandColor.white:y.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:H})},H)})});if(O==="year")return g.jsx(ye,{sx:{maxHeight:"30rem",overflowY:"auto",pr:1},children:g.jsx(ye,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:i8.map(H=>{const V=f&&H<f.getFullYear();return g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:V?"not-allowed":"pointer",opacity:V?.5:1},onClick:()=>!V&&$(H),children:g.jsx(ye,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:H===N&&!V&&y.palette.brandColor.orange,color:H===N&&!V?y.palette.brandColor.white:y.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:H})},H)})})})},P=n?t==="range"&&(n!=null&&n.from)&&(n!=null&&n.to)?`${da(n.from,a)} - ${da(n.to,a)}`:t==="range"&&(n!=null&&n.from)?`${da(n.from,a)} - `:da(n,a):"";return g.jsxs(ye,{ref:m,children:[!u&&g.jsx(xc,{label:e,value:P,onClick:o?void 0:M,disabled:o,InputLabelProps:{shrink:!!n},error:l,helperText:c,inputProps:{readOnly:!0,style:{cursor:o?"not-allowed":"pointer"}},InputProps:{endAdornment:g.jsx(wi,{position:"start",children:g.jsx(hn,{url:Ke.Calendar})})},sx:{cursor:o?"not-allowed":"pointer",opacity:o?.6:1,"& .MuiInputBase-root":{cursor:o?"not-allowed":"pointer"},...d&&!(d!=null&&d.showBorder)&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}}}}),g.jsx(ye,{component:u?ye:Si,id:E,open:u?!0:k,anchorEl:b,onClose:u?void 0:D,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:u?{width:"max-content",border:`0.1rem solid ${y.palette.primary.notifyBorderColor}`,borderRadius:"0.8rem"}:{"& .MuiPopover-paper":{backgroundColor:"transparent",borderRadius:"1rem"}},children:g.jsxs(ye,{sx:{backgroundColor:y.palette.primary.notifyBackground,p:"2rem 1.5rem",boxShadow:"none",borderRadius:"1rem","& .rdp-selected .rdp-day_button":{border:"none",backgroundColor:y.palette.brandColor.orange,color:y.palette.brandColor.white},"& .rdp-weekday":{color:y.palette.primary.notifyTextColor,fontSize:"1.2rem",textTransform:"uppercase"},"& .rdp-month_grid ":{my:"1.5rem"},"& .rdp-month_caption":{pl:"1rem"},"& .rdp-range_start":{backgroundImage:`linear-gradient(90deg, transparent 50%, ${y.palette.brandColor.lightOrange} 50%)`},"& .rdp-range_middle":{backgroundColor:y.palette.brandColor.lightOrange,"& .rdp-day_button":{backgroundColor:"transparent"}},"& .rdp-range_end":{backgroundImage:`linear-gradient(90deg, ${y.palette.brandColor.lightOrange} 50%, transparent 50%)`},"& .rdp-caption_label":{color:y.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},"& .rdp-day_button:disabled":{color:y.palette.primary.notifyTextColor}},children:[F(),O==="calendar"&&g.jsx(e8,{mode:t,disabled:u?!0:{before:f,after:p},selected:n,onSelect:u?void 0:I,month:w,onMonthChange:C,startMonth:f,endMonth:p,captionLayout:u?"label":"dropdown",hideNavigation:!!u,...h,styles:{day:{fontSize:"1.5rem",fontWeight:"300",border:"none",boxShadow:"none",outline:"none",color:y.palette.primary.notifyActiveText}},modifiersStyles:{today:{fontWeight:"bold",color:y.palette.brandColor.orange},disabled:{color:y.palette.primary.notifyBorderColor,opacity:.5,backgroundColor:"transparent",cursor:"not-allowed"}},components:{Chevron:W,Dropdown:j}})]})})]})};G(vx)(({theme:e})=>({"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyTextColor}!important`,fontSize:"1.1rem",backgroundColor:`${e.palette.primary.notifyBackground}`,zIndex:1,padding:"0 0.25rem",transform:"translate(14px, 12px) scale(1)",transition:"all 0.2s ease"},"& .MuiInputLabel-shrink":{fontSize:"1.1rem !important",transform:"translate(14px, -6px) scale(1)"},"& .Mui-focused":{color:`${e.palette.primary.notifyTextColor} !important`},"& .MuiPickersOutlinedInput-root":{backgroundColor:`${e.palette.primary.notifyBackground}`,borderRadius:"0.6rem",color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem",padding:"0.6rem 1.2rem",minHeight:"3.8rem",height:"3.8rem",boxSizing:"border-box"},"& .MuiOutlinedInput-notchedOutline":{border:"unset"},"& .MuiInputLabel-input":{color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem"},"& .MuiPickersOutlinedInput-notchedOutline":{border:"none!important"},"& .MuiPickersSectionList-root":{padding:"0!important"}}));const l8=e=>g.jsx(Fn,{children:g.jsx(a8,{...e})}),c8=({iconUrl:e,...t})=>{const[n,r]=R.useState(!1),o=It();return g.jsxs(ye,{sx:{display:"flex",alignItems:"center",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",backgroundColor:o.palette.primary.notifyBackground,height:"3.17rem",paddingLeft:"0.5rem",overflow:"hidden"},children:[e&&g.jsx(ye,{component:hn,url:e,sx:{width:"1.3rem",height:"1.3rem",margin:"0 0.5rem 0.2rem 0.5rem",userSelect:"none",pointerEvents:"none",objectFit:"contain"},draggable:!1}),g.jsx(Gi.input,{type:"text",onFocus:()=>r(!0),onBlur:()=>r(!1),initial:{width:"10rem"},animate:{width:n?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3.007rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:"none",backgroundColor:"transparent",padding:0,color:o.palette.primary.notifyTextColor,flex:1,transition:"height 0.1s ease"},...t})]})};function s1({...e}){return g.jsx(Fn,{children:g.jsx(c8,{...e})})}const wc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},u8=e=>{const t=new Date,n=new Date(e);let r=t-n;r<0&&(r=0);const o=Math.floor(r/1e3),i=Math.floor(o/60);return o<60?`${o} sec ago`:i<60?`${i} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},Cc=e=>e.sort((n,r)=>{let o=new Date(n.createdAt),i=new Date(r.createdAt);return o===i?0:o>i?-1:1}).sort((n,r)=>n.isRead===r.isRead?0:r.isRead?-1:1),i1=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},d8=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},f8=(e,t,n)=>e.filter(o=>t.some(i=>{var a,l,c;return(c=(a=o[i])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),p8=(e,t,n)=>e.sort((o,i)=>n==="asc"?o[t].toLowerCase().localeCompare(i[t].toLowerCase()):i[t].toLowerCase().localeCompare(o[t].toLowerCase())),pp=(e,t,n)=>e.slice((t-1)*n,t*n),h8=e=>{const t=e.reduce((r,o)=>{const i=new Date(o==null?void 0:o.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(i);return r[a]||(r[a]=[]),r[a].push(o),r},{});return Object.fromEntries(Object.entries(t).sort(([r],[o])=>new Date(o)-new Date(r)))},m8=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e,g8=(e,t)=>{var r;if(!Array.isArray(e))return[];const n=(r=t==null?void 0:t.toLowerCase)==null?void 0:r.call(t).trim();return n?e.filter(o=>{var i,a;return(a=(i=o==null?void 0:o.label)==null?void 0:i.toLowerCase)==null?void 0:a.call(i).includes(n)}):e},qe={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},Gr={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",NRF:"No Records found"},ga=R.createContext(null),ya=R.createContext(null);function a1({children:e}){const[t,n]=R.useReducer(y8,b8);return g.jsx(ga.Provider,{value:t,children:g.jsx(ya.Provider,{value:n,children:g.jsx(Fn,{children:e})})})}function y8(e,t){switch(t.type){case qe.SET_GRID_DATA:return{...e,...t.payload};case qe.HAS_SETTING_CHANGE:return{...e,...t.payload};case qe.TRIGGER_API:return{...e,...t.payload};default:throw new Error(`${Gr.UNHANDLED}: ${t}`)}}const b8={visibleGridColumns:[],hasChange:!1,triggerApi:!1};a1.propTypes={children:s.node.isRequired};const v8=({options:e,isDraggable:t})=>{const n=R.useRef(null),[r,o]=R.useState(!1),[i,a]=R.useState(null),[l,c]=R.useState(e),[u,d]=R.useState(!1),f=t?R.useContext(ya):null,{hasChange:p,visibleGridColumns:h}=t?R.useContext(ga):{hasChange:!1,visibleGridColumns:[]};R.useEffect(()=>{c(e.sort((w,C)=>w.sequenceId-C.sequenceId))},[e]);const y=w=>{t&&a(w)},m=w=>{t&&w.preventDefault()},b=w=>{if(!t||i===null||i===w)return;const C=[...l],[O]=C.splice(i,1);C.splice(w,0,O);const v=l.slice().sort((D,A)=>D.sequenceId-A.sequenceId).map(D=>D.sequenceId),k=C.map((D,A)=>({...D,sequenceId:v[A]??D.sequenceId}));c(k);const E=new Map(k.map(D=>[D.id,D.sequenceId])),M=h.map(D=>({...D,sequenceId:E.get(D.id)??D.sequenceId})).sort((D,A)=>D.sequenceId-A.sequenceId);f==null||f({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:M}}),f==null||f({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),a(null)},x=()=>{t&&p&&(f==null||f({type:qe.TRIGGER_API,payload:{triggerApi:!0}}))};return R.useEffect(()=>{if(n.current){const w=n.current.getBoundingClientRect(),C=window.innerHeight-w.bottom;d(C<200)}},[r]),{hasChange:p,closeDropdown:x,handleDragStart:y,handleDragOver:m,handleDrop:b}},Sc=({isDraggable:e=!1,showSearch:t=!1,options:n=[],value:r,isMulti:o=!1,selectAll:i=!1,selectOnClose:a=!1,...l})=>{var W,j,F;const[c,u]=R.useState(!1),[d,f]=R.useState(null),[p,h]=R.useState(""),[y,m]=R.useState([]),[b,x]=R.useState("bottom-start"),w=R.useRef(null),C=R.useRef(null),O=R.useRef(null),v=R.useRef(!1),{closeDropdown:k,hasChange:E,handleDragStart:M,handleDragOver:D,handleDrop:A}=v8({options:n,isDraggable:e});R.useEffect(()=>{m(n)},[n]);const $=(P,N)=>{var H,V,z;if(h(""),!o){(H=l==null?void 0:l.onChange)==null||H.call(l,P),u(!1);return}let L=[...r];if(!P)L=n.every(ne=>r.some(J=>J.id===ne.id))?[]:n;else if(N){const Z=L.findIndex(se=>se.id===N.id),ne=((V=L[Z])==null?void 0:V.children)||[],J=ne.some(se=>se.id===P.id);if(Z>-1){const se=J?ne.filter(Q=>Q.id!==P.id):[...ne,P];se.length?L[Z]={...N,children:se}:L.splice(Z,1)}else L.push({...N,children:[P]})}else L=L.some(Z=>Z.id===P.id)?L.filter(Z=>Z.id!==P.id):[...L,P];f(L),(z=l==null?void 0:l.onChange)==null||z.call(l,L)};R.useEffect(()=>{const P=g8(n,p);m(P)},[p,n]);const I=P=>{h(P.target.value)};return R.useEffect(()=>{const P=N=>{var L,H,V;O.current&&!O.current.contains(N.target)&&!((L=w.current)!=null&&L.contains(N.target))&&!((H=C.current)!=null&&H.contains(N.target))&&(u(!1),h(""),k(),a&&((V=l==null?void 0:l.onChange)==null||V.call(l,d,"closed")),v.current=!0,setTimeout(()=>{v.current=!1},150))};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[c,E,d]),g.jsxs(g.Fragment,{children:[g.jsx(ye,{ref:C,sx:{position:"relative",display:"inline-block",width:"100%"},children:g.jsx(xc,{inputProps:{readOnly:!0,style:{cursor:l!=null&&l.disabled?"not-allowed":"pointer"}},InputLabelProps:{shrink:(r==null?void 0:r.length)&&!(l!=null&&l.placeholder)},InputProps:{endAdornment:g.jsx(wi,{position:"start",children:g.jsx(ft,{direction:"row",alignItems:"center",gap:"0.5rem",children:g.jsx(ye,{component:"img",src:c?Ke.ArrowSelectDown:Ke.ArrowSelectUp})})}),startAdornment:((W=l==null?void 0:l.styles)==null?void 0:W.icon)&&g.jsx(wi,{position:"start",sx:{pl:1},children:g.jsx(hn,{url:(j=l==null?void 0:l.styles)==null?void 0:j.icon})})},sx:{opacity:l!=null&&l.disabled?.6:1,"& .MuiOutlinedInput-root":{borderBottomLeftRadius:c&&b.startsWith("bottom")?0:"0.7rem",borderBottomRightRadius:c&&b.startsWith("bottom")?0:"0.7rem",borderTopLeftRadius:c&&b.startsWith("top")?0:"0.7rem",borderTopRightRadius:c&&b.startsWith("top")?0:"0.7rem"},"& .MuiInputBase-input":{color:P=>`${l!=null&&l.placeholder?P.palette.primary.notifyTextColor:P.palette.primary.notifyActiveText}!important`}},onClick:P=>{var N;P.preventDefault(),k(),a&&((N=l==null?void 0:l.onChange)==null||N.call(l,d,"closed")),!v.current&&u(L=>!L)},...l!=null&&l.placeholder?{}:{value:Array.isArray(r)?Array.isArray(n)&&r.length===n.length?"All Selected":r.map(P=>P==null?void 0:P.label).filter(Boolean).join(", "):(r==null?void 0:r.label)||r||""},...l})}),g.jsx(rs,{open:c,anchorEl:C.current,placement:"bottom-start",style:{zIndex:99999},ref:O,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"updatePlacement",enabled:!0,phase:"afterWrite",fn({state:P}){x(P.placement)}}],children:g.jsxs(ye,{sx:{background:P=>P.palette.primary.appBackground,border:P=>`1px solid ${P.palette.primary.notifyBorderColor}`,borderTop:"none",borderRadius:b.startsWith("bottom")?"0 0 0.7rem 0.7rem":"0.7rem 0.7rem 0 0",width:((F=C.current)==null?void 0:F.offsetWidth)||"auto",maxHeight:"20rem",overflowY:"auto"},children:[t&&g.jsx(xc,{type:"text",placeholder:"Search",value:p,variant:"standard",autoFocus:!0,size:"small",InputProps:{disableUnderline:!0},onChange:I,sx:{position:"sticky",top:0,zIndex:1,backgroundColor:P=>P.palette.primary.appBackground,fontSize:"1.1rem",borderBottom:P=>`1px solid ${P.palette.primary.notifyBorderColor}`,"& .MuiInputBase-input":{padding:"0.3rem 1.3rem!important"}}}),(y==null?void 0:y.length)>0?g.jsxs(g.Fragment,{children:[o&&i&&g.jsx(Fr,{sx:{padding:"0.8rem 1.2rem",cursor:"pointer"},onClick:P=>{P.stopPropagation(),$()},children:g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",children:[g.jsx(sc,{sx:{p:0},checked:(n==null?void 0:n.length)>0&&(r==null?void 0:r.length)===(n==null?void 0:n.length)}),g.jsx(nt,{component:"h3",sx:{color:P=>P.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"Select All"})]})}),y.map((P,N)=>{var L,H,V;return g.jsxs(R.Fragment,{children:[g.jsx(Fr,{sx:{opacity:P!=null&&P.isMandatory||P!=null&&P.disabled?.5:1,cursor:e?"grab":"pointer",pointerEvents:P!=null&&P.isMandatory||P!=null&&P.disabled?"none":"auto",padding:"0.8rem 1.2rem",borderTop:N!==0||i?z=>`0.1rem solid ${z.palette.primary.notifyBorderColor}`:"none"},draggable:!(P!=null&&P.isMandatory)&&e,onDragStart:()=>M(N),onDragOver:D,onDrop:()=>A(N),onClick:z=>{var Z;z.stopPropagation(),(!((Z=P==null?void 0:P.children)!=null&&Z.length)||P!=null&&P.showCheckbox)&&$(P)},children:g.jsxs(ft,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:"1rem",width:"100%",children:[g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",sx:{minWidth:0,flex:1},children:[o&&(!((L=P==null?void 0:P.children)!=null&&L.length)||(P==null?void 0:P.showCheckbox))&&g.jsx(sc,{sx:{p:0},checked:r==null?void 0:r.some(z=>z.id===P.id)}),g.jsx(nt,{component:"h3",noWrap:!0,sx:{color:z=>{var Z;return(Z=P==null?void 0:P.children)!=null&&Z.length&&!(P!=null&&P.showCheckbox)?z.palette.primary.notifyActiveText:z.palette.primary.notifyTextColor},fontWeight:(H=P==null?void 0:P.children)!=null&&H.length&&!(P!=null&&P.showCheckbox)?"500":"300",fontSize:"1.1rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:P.label})]}),!(P!=null&&P.isMandatory)&&e&&g.jsx(ye,{component:"img",src:Ke.Drag,draggable:!1})]})}),(V=P.children)==null?void 0:V.map((z,Z)=>g.jsx(Fr,{sx:{cursor:"pointer",opacity:z!=null&&z.isMandatory||z!=null&&z.disabled?.5:1,pointerEvents:z!=null&&z.isMandatory||z!=null&&z.disabled?"none":"auto",padding:"0.8rem 1.2rem",pl:"1.5rem",borderTop:ne=>`0.1rem solid ${ne.palette.primary.notifyBorderColor}`},draggable:!(z!=null&&z.isMandatory)&&e,onDragStart:()=>M(N,Z),onDragOver:D,onDrop:()=>A(N,Z),onClick:ne=>{ne.stopPropagation(),$(z,P)},children:g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",children:[o&&(P==null?void 0:P.showChildCheckbox)&&g.jsx(sc,{sx:{p:0},checked:r.some(ne=>{var J;return(J=ne.children)==null?void 0:J.some(se=>se.id===z.id)})}),g.jsx(nt,{component:"h4",sx:{color:ne=>ne.palette.primary.notifyTextColor,fontSize:"1.05rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:z.label})]})},`${N}-${Z}`))]},N)})]}):g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0.1rem 1rem",height:"3rem"},children:g.jsx(nt,{component:"h3",sx:{color:P=>P.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"No options"})})]})})]})};function l1({...e}){return g.jsx(Fn,{children:g.jsx(Sc,{...e})})}var hp={},mp={};const x8=yr(sk);var c1;function w8(){return c1||(c1=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=x8}(mp)),mp}var C8=Eu;Object.defineProperty(hp,"__esModule",{value:!0});var u1=hp.default=void 0,S8=C8(w8()),T8=g;u1=hp.default=(0,S8.default)((0,T8.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const O8=({progress:e=0,status:t})=>{const r=Math.max(0,Math.min(e,100))/2-4,o={SUCCESS:"#2A9D8F",QUEUED:"#E9C46A",FAILED:"#E76F51"},i={SUCCESS:"rgba(42, 157, 143, 0.3)",QUEUED:"rgba(233, 196, 106, 0.3)",FAILED:"rgba(231, 111, 81, 0.3)"};return g.jsxs(ye,{sx:{height:"0.2rem",width:"100%",position:"relative",overflow:"hidden",backgroundColor:"transparent"},children:[g.jsx(ye,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",transform:"translateX(-99%)",backgroundColor:o[t],borderTopLeftRadius:"1rem",borderBottomLeftRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}}),g.jsx(ye,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",backgroundColor:o[t],borderTopRightRadius:"1rem",borderBottomRightRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}})]})},gp={showToast:()=>{throw new Error("ToastProvider is not mounted")}},k8={success:e=>gp.showToast(e,"SUCCESS"),error:e=>gp.showToast(e,"FAILED")},E8=G(Si)(({theme:e})=>({"& .MuiPopover-paper":{backgroundColor:"transparent!important",right:"0!important",boxShadow:"none"},"& .MuiPaper-root":{pointerEvents:"auto",maxHeight:"40vh",boxShadow:"none"}})),P8=({message:e,status:t})=>{const[n,r]=R.useState(0),[o,i]=R.useState(!0),[a,l]=R.useState("entering"),[c,u]=R.useState(!0);R.useEffect(()=>{let p=setInterval(()=>{r(h=>o?h>=98?(i(!1),99):h+2:h)},100);return()=>clearInterval(p)},[o]),R.useEffect(()=>{let p=null,h=null;return a==="entering"&&(p=setTimeout(()=>{l("visible"),h=setTimeout(()=>{l("exiting")},8e3)},100)),()=>{clearTimeout(p),clearTimeout(h)}},[]),R.useEffect(()=>{const p=h=>{var y;(y=h.detail)!=null&&y.logout&&u(!1)};return window.addEventListener(Bl.LOGOUT,p),()=>{window.removeEventListener(Bl.LOGOUT,p)}},[]);const d=()=>{setTimeout(()=>{l("exiting")},200)},f={entering:"translateX(100%)",visible:"translateX(-100%)",exiting:"translateX(100%)"};return g.jsx(E8,{anchorPosition:{top:118,right:0},id:"scai-toast-popover",open:c,anchorReference:"anchorPosition",disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,hideBackdrop:!0,sx:{padding:"0.5rem",pointerEvents:"none",overflow:"hidden"},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:g.jsx(ye,{position:"fixed",sx:{transform:f[a],opacity:a==="exiting"?0:1,transition:"transform 0.6s ease, opacity 1s ease",mb:0},children:g.jsxs(Jo,{elevation:6,sx:{display:"flex",justifyContent:"space-between",filter:"drop-shadow(rgba(0, 0, 0, 0.16) 0px 1px 4px)",width:"25rem",minHeight:"4rem",borderRadius:"1rem",cursor:"default",position:"relative",border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`,backgroundColor:p=>p.palette.primary.notifyBackground,color:p=>p.palette.primary.notifyActiveText,"&:hover .close-icon":{opacity:1,color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>`${p.palette.primary.notifyBackground}!important`,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`}},children:[g.jsx(Ir,{size:"small",onClick:p=>{p.stopPropagation(),d()},className:"close-icon",sx:{position:"absolute",top:"-0.7rem",left:"-0.7rem",padding:"2px",opacity:0,transition:"opacity 0.3s ease",color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>p.palette.primary.notifyBackground,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}`},children:g.jsx(u1,{fontSize:"small"})}),g.jsxs(ft,{sx:{width:"100%"},direction:"column",children:[g.jsx(nt,{sx:{flexGrow:1,padding:"1.2rem 1rem 1rem 1rem",fontSize:"1.1rem",whiteSpace:"normal"},children:e}),g.jsx(O8,{progress:n,status:t})]})]})})})},M8=({message:e,status:t})=>g.jsx(Fn,{children:g.jsx(P8,{message:e,status:t})}),R8=({children:e})=>{const[t,n]=R.useState(null),r=R.useCallback((o,i)=>{n({message:o,status:i,key:Date.now()})},[]);return gp.showToast=r,g.jsxs(g.Fragment,{children:[e,t&&g.jsx(M8,{message:t.message,status:t.status},t.key)]})},D8=G(ye)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),I8=G(ye)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),d1=G(Hn)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),A8=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:r})=>{const[o,i]=R.useState(0),[a,l]=R.useState(0),c=R.useRef(null),u=R.useRef(null);return R.useEffect(()=>{if(c.current&&u.current){const d=e?u.current:c.current;i(d.offsetWidth),l(d.offsetLeft)}},[e]),g.jsx(ye,{sx:{display:"flex"},children:g.jsxs(D8,{children:[g.jsx(I8,{sx:{width:o,transform:`translateX(${a}px)`,height:"2.5rem"}}),g.jsx(d1,{ref:c,disableRipple:!0,sx:d=>({color:e?d.palette.brandColor.grey1:d.palette.primary.notifyActiveText}),onClick:()=>t(!1),children:n}),g.jsx(d1,{ref:u,disableRipple:!0,sx:d=>({color:e?d.palette.primary.notifyActiveText:d.palette.brandColor.grey1}),onClick:()=>t(!0),children:r})]})})};function f1({...e}){return g.jsx(Fn,{children:g.jsx(A8,{...e})})}const j8=vr`
316
+ `));O&&!w&&E.current&&E.current.getSectionContent(j.startIndex).focus()},[]),cr(()=>{if(!(!z||!E.current)){if(W==="all")E.current.getRoot().focus();else if(typeof W=="number"){const ce=E.current.getSectionContent(W);ce&&ce.focus()}}},[W,z]),cr(()=>{rp({focused:z,domGetters:D,stateResponse:A})}),S.useImperativeHandle(k,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>ex(E),setSelectedSections:ce=>{if(w||!E.current)return;const Ce=Wf(ce,F.sections);Z((Ce==="all"?0:Ce)!==null),L(ce)},focusField:ne,isFieldFocused:()=>tx(E)})),T({},l,J,{onBlur:q,onClick:Y,onFocus:X,onInput:K,onPaste:B,onKeyDown:_,onClear:ee},se,{error:I,clearable:!!(x&&!$&&!C&&!w),focused:v??z,sectionListRef:M,enableAccessibleFieldDOMStructure:!0,elements:oe,areAllSectionsEmpty:$,disabled:w,readOnly:C,autoFocus:O,openPickerAriaLabel:V})};function ex(e){const t=Jt(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function tx(e){const t=Jt(document);return!!e.current&&e.current.getRoot().contains(t)}const ks=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),T$=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const l=e[a],c=Vf(l,n?"input-rtl":"input-ltr",t),u=`${l.startSeparator}${c}${l.endSeparator}`,d=ks(u).length,f=u.length,p=ks(c),h=o+(p===""?0:c.indexOf(p[0]))+l.startSeparator.length,y=h+p.length;i.push(T({},l,{start:r,end:r+d,startInInput:h,endInInput:y})),r+=d,o+=f}return i},O$=e=>{const t=dn(),n=ws(),r=ws(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:l,internal_valueManager:c,internal_fieldValueManager:u,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:f,forwardedProps:p}=T2(o,l),h=J2({manager:i,internalProps:f,skipContextFieldRefAssignment:a}),{onFocus:y,onClick:m,onPaste:b,onBlur:x,onKeyDown:w,onClear:C,clearable:O,inputRef:v,placeholder:k}=p,{readOnly:E=!1,disabled:M=!1,autoFocus:D=!1,focused:A,unstableFieldRef:$}=h,I=S.useRef(null),W=mn(v,I),j=Z2({manager:i,internalPropsWithDefaults:h,forwardedProps:p}),{activeSectionIndex:F,areAllSectionsEmpty:P,error:N,localizedDigits:L,parsedSelectedSections:H,sectionOrder:V,state:z,value:Z,clearValue:ne,clearActiveSection:J,setCharacterQuery:se,setSelectedSections:Q,setTempAndroidValueStr:ue,updateSectionValue:_,updateValueFromValueStr:q,getSectionsFromValue:X}=j,Y=X2({stateResponse:j}),B=d(Z),K=S.useMemo(()=>T$(z.sections,L,t),[z.sections,L,t]);function ee(){const fe=I.current.selectionStart??0;let Oe;fe<=K[0].startInInput||fe>=K[K.length-1].endInInput?Oe=1:Oe=K.findIndex(Ue=>Ue.startInInput-Ue.startSeparator.length>fe);const Le=Oe===-1?K.length-1:Oe-1;Q(Le)}function oe(fe=0){var Oe;Jt(document)!==I.current&&((Oe=I.current)==null||Oe.focus(),Q(fe))}const ce=Te(fe=>{y==null||y(fe);const Oe=I.current;n.start(0,()=>{!Oe||Oe!==I.current||F==null&&(Oe.value.length&&Number(Oe.selectionEnd)-Number(Oe.selectionStart)===Oe.value.length?Q("all"):ee())})}),Ce=Te((fe,...Oe)=>{fe.isDefaultPrevented()||(m==null||m(fe,...Oe),ee())}),ae=Te(fe=>{if(b==null||b(fe),fe.preventDefault(),E||M)return;const Oe=fe.clipboardData.getData("text");if(typeof H=="number"){const Le=z.sections[H],Ue=/^[a-zA-Z]+$/.test(Oe),it=/^[0-9]+$/.test(Oe),be=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Oe);if(Le.contentType==="letter"&&Ue||Le.contentType==="digit"&&it||Le.contentType==="digit-with-letter"&&be){se(null),_({section:Le,newSectionValue:Oe,shouldGoToNextSection:!0});return}if(Ue||it)return}se(null),q(Oe)}),we=Te(fe=>{x==null||x(fe),Q(null)}),me=Te(fe=>{if(E)return;const Oe=fe.target.value;if(Oe===""){ne();return}const Le=fe.nativeEvent.data,Ue=Le&&Le.length>1,it=Ue?Le:Oe,be=ks(it);if(H==="all"&&Q(F),F==null||Ue){q(Ue?Le:be);return}let le;if(H==="all"&&be.length===1)le=be;else{const pe=ks(u.getV6InputValueFromSections(K,L,t));let ve=-1,ke=-1;for(let Qe=0;Qe<pe.length;Qe+=1)ve===-1&&pe[Qe]!==be[Qe]&&(ve=Qe),ke===-1&&pe[pe.length-Qe-1]!==be[be.length-Qe-1]&&(ke=Qe);const xe=K[F];if(ve<xe.start||pe.length-ke-1>xe.end)return;const We=be.length-pe.length+xe.end-ks(xe.endSeparator||"").length;le=be.slice(xe.start+ks(xe.startSeparator||"").length,We)}if(le.length===0){r9()&&ue(it),J();return}Y({keyPressed:le,sectionIndex:F})}),ge=Te((fe,...Oe)=>{fe.preventDefault(),C==null||C(fe,...Oe),ne(),nx(I)?Q(V.startIndex):oe(0)}),$e=Q2({manager:i,internalPropsWithDefaults:h,stateResponse:j}),Ae=Te(fe=>{w==null||w(fe),$e(fe)}),Me=S.useMemo(()=>k!==void 0?k:u.getV6InputValueFromSections(X(c.emptyValue),L,t),[k,u,X,c.emptyValue,L,t]),ze=S.useMemo(()=>z.tempValueStrAndroid??u.getV6InputValueFromSections(z.sections,L,t),[z.sections,u,z.tempValueStrAndroid,L,t]);S.useEffect(()=>{I.current&&I.current===Jt(document)&&Q("all")},[]),cr(()=>{function fe(){if(!I.current)return;if(H==null){I.current.scrollLeft&&(I.current.scrollLeft=0);return}if(I.current!==Jt(document))return;const Oe=I.current.scrollTop;if(H==="all")I.current.select();else{const Le=K[H],Ue=Le.type==="empty"?Le.startInInput-Le.startSeparator.length:Le.startInInput,it=Le.type==="empty"?Le.endInInput+Le.endSeparator.length:Le.endInInput;(Ue!==I.current.selectionStart||it!==I.current.selectionEnd)&&I.current===Jt(document)&&I.current.setSelectionRange(Ue,it),r.start(0,()=>{I.current&&I.current===Jt(document)&&I.current.selectionStart===I.current.selectionEnd&&(I.current.selectionStart!==Ue||I.current.selectionEnd!==it)&&fe()})}I.current.scrollTop=Oe}fe()});const Xe=S.useMemo(()=>F==null||z.sections[F].contentType==="letter"?"text":"numeric",[F,z.sections]),Be=!(I.current&&I.current===Jt(document))&&P;return S.useImperativeHandle($,()=>({getSections:()=>z.sections,getActiveSectionIndex:()=>{const fe=I.current.selectionStart??0,Oe=I.current.selectionEnd??0;if(fe===0&&Oe===0)return null;const Le=fe<=K[0].startInInput?1:K.findIndex(Ue=>Ue.startInInput-Ue.startSeparator.length>fe);return Le===-1?K.length-1:Le-1},setSelectedSections:fe=>Q(fe),focusField:oe,isFieldFocused:()=>nx(I)})),T({},p,{error:N,clearable:!!(O&&!P&&!E&&!M),onBlur:we,onClick:Ce,onFocus:ce,onPaste:ae,onKeyDown:Ae,onClear:ge,inputRef:W,enableAccessibleFieldDOMStructure:!1,placeholder:Me,inputMode:Xe,autoComplete:"off",value:Be?"":ze,onChange:me,focused:A,disabled:M,readOnly:E,autoFocus:D,openPickerAriaLabel:B})};function nx(e){return e.current===Jt(document)}const k$=e=>{const t=g2();return(e.props.enableAccessibleFieldDOMStructure??(t==null?void 0:t.enableAccessibleFieldDOMStructure)??!0?S$:O$)(e)},E$=e=>{const t=I9(e);return k$({manager:t,props:e})},P$=["slots","slotProps"],op=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i}=r,a=re(r,P$),l=u$({slotProps:i,ref:n,externalForwardedProps:a}),c=E$(l);return g.jsx(c$,{slots:o,slotProps:i,fieldResponse:c,defaultOpenPickerIcon:g4})});process.env.NODE_ENV!=="production"&&(op.propTypes={autoFocus:s.bool,className:s.string,clearable:s.bool,clearButtonPosition:s.oneOf(["end","start"]),color:s.oneOf(["error","info","primary","secondary","success","warning"]),component:s.elementType,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,enableAccessibleFieldDOMStructure:s.bool,focused:s.bool,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),FormHelperTextProps:s.object,fullWidth:s.bool,helperText:s.node,hiddenLabel:s.bool,id:s.string,InputLabelProps:s.object,inputProps:s.object,InputProps:s.object,inputRef:kr,label:s.node,margin:s.oneOf(["dense","none","normal"]),maxDate:s.object,minDate:s.object,name:s.string,onBlur:s.func,onChange:s.func,onClear:s.func,onError:s.func,onFocus:s.func,onSelectedSectionsChange:s.func,openPickerButtonPosition:s.oneOf(["end","start"]),readOnly:s.bool,referenceDate:s.object,required:s.bool,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,shouldRespectLeadingZeros:s.bool,size:s.oneOf(["medium","small"]),slotProps:s.object,slots:s.object,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,unstableFieldRef:s.oneOfType([s.func,s.object]),value:s.object,variant:s.oneOf(["filled","outlined","standard"])});const rx=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:l})=>{const c=yo();return S.useCallback(u=>Qi({adapter:c,value:u,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[c,e,t,n,r,o,i,a,l])},M$=(e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return T({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const o=r.newTimezone;if(t.getTimezone(n.currentMonth)===o)return n;let i=t.setTimezone(n.currentMonth,o);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),T({},n,{currentMonth:i})}case"finishMonthSwitchingAnimation":return T({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},R$=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:l,onYearChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:f,getCurrentMonthFromVisibleDate:p}=e,h=Ct(),y=S.useRef(M$(!!u,h)).current,m=S.useMemo(()=>dr.getInitialReferenceValue({value:t,utils:h,timezone:f,props:e,referenceDate:n,granularity:ur.day}),[n,f]),[b,x]=S.useReducer(y,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:h.startOfMonth(m),slideDirection:"left"}),w=rx({shouldDisableDate:d,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:f});S.useEffect(()=>{x({type:"changeMonthTimezone",newTimezone:h.getTimezone(m)})},[m,h]);const C=Te(({target:v,reason:k})=>{if(k==="cell-interaction"&&b.focusedDay!=null&&h.isSameDay(v,b.focusedDay))return;const E=k==="cell-interaction";let M,D;if(k==="cell-interaction")M=p(v,b.currentMonth),D=v;else if(M=h.isSameMonth(v,b.currentMonth)?b.currentMonth:h.startOfMonth(v),D=v,w(D)){const I=h.startOfMonth(v),W=h.endOfMonth(v);D=Zi({utils:h,date:D,minDate:h.isBefore(a,I)?I:a,maxDate:h.isAfter(i,W)?W:i,disablePast:o,disableFuture:r,isDateDisabled:w,timezone:f})}const A=!h.isSameMonth(b.currentMonth,M),$=!h.isSameYear(b.currentMonth,M);A&&(l==null||l(M)),$&&(c==null||c(h.startOfYear(M))),x({type:"setVisibleDate",month:M,direction:h.isAfterDay(M,b.currentMonth)?"left":"right",focusedDay:b.focusedDay!=null&&D!=null&&h.isSameDay(D,b.focusedDay)?b.focusedDay:D,skipAnimation:E})}),O=S.useCallback(()=>{x({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:m,calendarState:b,setVisibleDate:C,isDateDisabled:w,onMonthSwitchingAnimationEnd:O}},D$=e=>Lt("MuiPickersFadeTransitionGroup",e);Vt("MuiPickersFadeTransitionGroup",["root"]);const I$=e=>At({root:["root"]},D$,e),A$=G(ri,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function ox(e){const t=kt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i,classes:a}=t,l=I$(a),c=It();return o?n:g.jsx(A$,{className:de(l.root,r),children:g.jsx(Nr,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:n},i)})}function j$(e){return Lt("MuiPickersDay",e)}const xo=Vt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function sx(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=e,u=Ct(),{ownerState:d}=Yt();return S.useMemo(()=>T({},d,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:u.isSameDay(i,u.startOfWeek(i)),isDayEndOfWeek:u.isSameDay(i,u.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:l??!1,showDaysOutsideCurrentMonth:c??!1}),[u,d,i,n,t,r,o,a,l,c])}const N$=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],$$=(e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:l,showDaysOutsideCurrentMonth:c}=t,u=i&&!c;return At({root:["root",n&&!u&&"selected",r&&"disabled",!a&&"dayWithMargin",!l&&o&&"today",i&&c&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},j$,e)},ix=({theme:e})=>T({},e.typography.caption,{width:na,height:na,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:eo(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${xo.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${xo.disabled}:not(.${xo.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${xo.disabled}&.${xo.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${dc}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${xo.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),ax=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,!n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},_$=G(An,{name:"MuiPickersDay",slot:"Root",overridesResolver:ax})(ix),F$=G("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:ax})(({theme:e})=>T({},ix({theme:e}),{opacity:0,pointerEvents:"none"})),sa=()=>{},lx=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,classes:a,isAnimating:l,onClick:c,onDaySelect:u,onFocus:d=sa,onBlur:f=sa,onKeyDown:p=sa,onMouseDown:h=sa,onMouseEnter:y=sa,children:m,day:b,selected:x,disabled:w,today:C,outsideCurrentMonth:O,disableMargin:v,disableHighlightToday:k,showDaysOutsideCurrentMonth:E}=r,M=re(r,N$),D=sx({day:b,selected:x,disabled:w,today:C,outsideCurrentMonth:O,disableMargin:v,disableHighlightToday:k,showDaysOutsideCurrentMonth:E}),A=$$(a,D),$=Ct(),I=S.useRef(null),W=mn(I,n);cr(()=>{o&&!w&&!l&&!O&&I.current.focus()},[o,w,l,O]);const j=P=>{h(P),O&&P.preventDefault()},F=P=>{w||u(b),O&&P.currentTarget.focus(),c&&c(P)};return O&&!E?g.jsx(F$,{className:de(A.root,A.hiddenDaySpacingFiller,i),ownerState:D,role:M.role}):g.jsx(_$,T({className:de(A.root,i),ref:W,centerRipple:!0,disabled:w,tabIndex:x?0:-1,onKeyDown:P=>p(P,b),onFocus:P=>d(P,b),onBlur:P=>f(P,b),onMouseEnter:P=>y(P,b),onClick:F,onMouseDown:j},M,{ownerState:D,children:m||$.format(b,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(lx.propTypes={action:s.oneOfType([s.func,s.shape({current:s.shape({focusVisible:s.func.isRequired})})]),centerRipple:s.bool,classes:s.object,className:s.string,component:s.elementType,day:s.object.isRequired,disabled:s.bool,disableHighlightToday:s.bool,disableMargin:s.bool,disableRipple:s.bool,disableTouchRipple:s.bool,focusRipple:s.bool,focusVisibleClassName:s.string,isAnimating:s.bool,isFirstVisibleCell:s.bool.isRequired,isLastVisibleCell:s.bool.isRequired,onBlur:s.func,onDaySelect:s.func.isRequired,onFocus:s.func,onFocusVisible:s.func,onKeyDown:s.func,onMouseEnter:s.func,outsideCurrentMonth:s.bool.isRequired,selected:s.bool,showDaysOutsideCurrentMonth:s.bool,style:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,today:s.bool,TouchRippleProps:s.object,touchRippleRef:s.oneOfType([s.func,s.shape({current:s.shape({pulsate:s.func.isRequired,start:s.func.isRequired,stop:s.func.isRequired})})])});const B$=S.memo(lx),L$=e=>Lt("MuiPickersSlideTransition",e),Wn=Vt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),V$=["children","className","reduceAnimations","slideDirection","transKey","classes"],W$=(e,t)=>{const{slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return At(r,L$,e)},z$=G(ri,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Wn["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Wn["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Wn.slideEnterActive}`]:t.slideEnterActive},{[`.${Wn.slideExit}`]:t.slideExit},{[`.${Wn["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Wn["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Wn["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Wn["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Wn.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Wn.slideExit}`]:{transform:"translate(0%)"},[`& .${Wn["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Wn["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function U$(e){const t=kt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:l}=t,c=re(t,V$),{ownerState:u}=Yt(),d=T({},u,{slideDirection:i}),f=W$(l,d),p=It();if(o)return g.jsx("div",{className:de(f.root,r),children:n});const h={exit:f.exit,enterActive:f.enterActive,enter:f.enter,exitActive:f.exitActive};return g.jsx(z$,{className:de(f.root,r),childFactory:y=>S.cloneElement(y,{classNames:h}),role:"presentation",children:g.jsx(Lu,T({mountOnEnter:!0,unmountOnExit:!0,timeout:p.transitions.duration.complex,classNames:h},c,{children:n}),a)})}const H$=e=>Lt("MuiDayCalendar",e);Vt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const q$=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Y$=["ownerState"],G$=e=>At({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},H$,e),cx=(na+dc*2)*6,K$=G("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),X$=G("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Z$=G(nt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),J$=G(nt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),Q$=G(nt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>T({},e.typography.caption,{width:na,height:na,padding:0,margin:`0 ${dc}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),e_=G("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:cx}),t_=G(U$,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:cx}),n_=G("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),r_=G("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${dc}px 0`,display:"flex",justifyContent:"center"});function o_(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:l}=e,c=re(e,q$);const{disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:p,slots:h,slotProps:y,timezone:m}=t,b=Ct(),x=uc(m),w=r!=null&&b.isSameDay(n,r),C=l&&w,O=o.some(j=>b.isSameDay(j,n)),v=b.isSameDay(n,x),k=S.useMemo(()=>u||i(n),[u,i,n]),E=S.useMemo(()=>b.getMonth(n)!==a,[b,n,a]),M=sx({day:n,selected:O,disabled:k,today:v,outsideCurrentMonth:E,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:p}),D=(h==null?void 0:h.day)??B$,A=dt({elementType:D,externalSlotProps:y==null?void 0:y.day,additionalProps:T({disableHighlightToday:d,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:f,"data-timestamp":b.toJsDate(n).valueOf()},c),ownerState:T({},M,{day:n,isDayDisabled:k,isDaySelected:O})}),$=re(A,Y$),I=S.useMemo(()=>{const j=b.startOfMonth(b.setMonth(n,a));return p?b.isSameDay(n,b.startOfWeek(j)):b.isSameDay(n,j)},[a,n,p,b]),W=S.useMemo(()=>{const j=b.endOfMonth(b.setMonth(n,a));return p?b.isSameDay(n,b.endOfWeek(j)):b.isSameDay(n,j)},[a,n,p,b]);return g.jsx(D,T({},$,{day:n,disabled:k,autoFocus:!E&&C,today:v,outsideCurrentMonth:E,isFirstVisibleCell:I,isLastVisibleCell:W,selected:O,tabIndex:w?0:-1,"aria-selected":O,"aria-current":v?"date":void 0}))}function s_(e){const t=kt({props:e,name:"MuiDayCalendar"}),n=Ct(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:l,focusedDay:c,loading:u,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:f,readOnly:p,reduceAnimations:h,renderLoading:y=()=>g.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:b,disablePast:x,disableFuture:w,minDate:C,maxDate:O,shouldDisableDate:v,shouldDisableMonth:k,shouldDisableYear:E,dayOfWeekFormatter:M=Y=>n.format(Y,"weekdayShort").charAt(0).toUpperCase(),hasFocus:D,onFocusedViewChange:A,gridLabelId:$,displayWeekNumber:I,fixedWeekNumber:W,timezone:j}=t,F=uc(j),P=G$(i),N=dn(),L=rx({shouldDisableDate:v,shouldDisableMonth:k,shouldDisableYear:E,minDate:C,maxDate:O,disablePast:x,disableFuture:w,timezone:j}),H=qr(),V=Te(Y=>{p||d(Y)}),z=Y=>{L(Y)||(r(Y),A==null||A(!0))},Z=Te((Y,B)=>{switch(Y.key){case"ArrowUp":z(n.addDays(B,-7)),Y.preventDefault();break;case"ArrowDown":z(n.addDays(B,7)),Y.preventDefault();break;case"ArrowLeft":{const K=n.addDays(B,N?1:-1),ee=n.addMonths(B,N?1:-1),oe=Zi({utils:n,date:K,minDate:N?K:n.startOfMonth(ee),maxDate:N?n.endOfMonth(ee):K,isDateDisabled:L,timezone:j});z(oe||K),Y.preventDefault();break}case"ArrowRight":{const K=n.addDays(B,N?-1:1),ee=n.addMonths(B,N?-1:1),oe=Zi({utils:n,date:K,minDate:N?n.startOfMonth(ee):K,maxDate:N?K:n.endOfMonth(ee),isDateDisabled:L,timezone:j});z(oe||K),Y.preventDefault();break}case"Home":z(n.startOfWeek(B)),Y.preventDefault();break;case"End":z(n.endOfWeek(B)),Y.preventDefault();break;case"PageUp":z(n.addMonths(B,1)),Y.preventDefault();break;case"PageDown":z(n.addMonths(B,-1)),Y.preventDefault();break}}),ne=Te((Y,B)=>z(B)),J=Te((Y,B)=>{c!=null&&n.isSameDay(c,B)&&(A==null||A(!1))}),se=n.getMonth(a),Q=n.getYear(a),ue=S.useMemo(()=>l.filter(Y=>!!Y).map(Y=>n.startOfDay(Y)),[n,l]),_=`${Q}-${se}`,q=S.useMemo(()=>S.createRef(),[_]),X=S.useMemo(()=>{const Y=n.getWeekArray(a);let B=n.addMonths(a,1);for(;W&&Y.length<W;){const K=n.getWeekArray(B),ee=n.isSameDay(Y[Y.length-1][0],K[0][0]);K.slice(ee?1:0).forEach(oe=>{Y.length<W&&Y.push(oe)}),B=n.addMonths(B,1)}return Y},[a,W,n]);return g.jsxs(K$,{role:"grid","aria-labelledby":$,className:P.root,children:[g.jsxs(X$,{role:"row",className:P.header,children:[I&&g.jsx(J$,{variant:"caption",role:"columnheader","aria-label":H.calendarWeekNumberHeaderLabel,className:P.weekNumberLabel,children:H.calendarWeekNumberHeaderText}),z6(n,F).map((Y,B)=>g.jsx(Z$,{variant:"caption",role:"columnheader","aria-label":n.format(Y,"weekday"),className:P.weekDayLabel,children:M(Y)},B.toString()))]}),u?g.jsx(e_,{className:P.loadingContainer,children:y()}):g.jsx(t_,T({transKey:_,onExited:f,reduceAnimations:h,slideDirection:m,className:de(o,P.slideTransition)},b,{nodeRef:q,children:g.jsx(n_,{ref:q,role:"rowgroup",className:P.monthContainer,children:X.map((Y,B)=>g.jsxs(r_,{role:"row",className:P.weekContainer,"aria-rowindex":B+1,children:[I&&g.jsx(Q$,{className:P.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(Y[0])),children:H.calendarWeekNumberText(n.getWeekNumber(Y[0]))}),Y.map((K,ee)=>g.jsx(o_,{parentProps:t,day:K,selectedDays:ue,isViewFocused:D,focusedDay:c,onKeyDown:Z,onFocus:ne,onBlur:J,onDaySelect:V,isDateDisabled:L,currentMonthNumber:se,"aria-colindex":ee+1},K.toString()))]},`week-${Y[0]}`))})}))]})}function ux(e){return Lt("MuiMonthCalendar",e)}const yc=Vt("MuiMonthCalendar",["root","button","disabled","selected"]),i_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],a_=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return At(n,ux,e)},l_=G("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${yc.disabled}`]:t.disabled},{[`&.${yc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${yc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${yc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),c_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=re(t,i_),y=S.useRef(null),{ownerState:m}=Yt(),b=T({},m,{isMonthDisabled:o,isMonthSelected:i}),x=a_(r,b);cr(()=>{var O;n&&((O=y.current)==null||O.focus())},[n]);const w=(f==null?void 0:f.monthButton)??l_,C=dt({elementType:w,externalSlotProps:p==null?void 0:p.monthButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:O=>l(O,a),onKeyDown:O=>c(O,a),onFocus:O=>u(O,a),onBlur:O=>d(O,a)},ownerState:b,className:x.button});return g.jsx(w,T({},C))}),u_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],d_=e=>At({root:["root"]},ux,e);function f_(e,t){const n=kt({props:e,name:t}),r=ea(n);return T({},n,r,{monthsPerRow:n.monthsPerRow??3})}const p_=G("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ti(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:fc,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),dx=S.forwardRef(function(t,n){const r=f_(t,"MuiMonthCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:m,shouldDisableMonth:b,readOnly:x,onMonthFocus:w,hasFocus:C,onFocusedViewChange:O,monthsPerRow:v,timezone:k,gridLabelId:E,slots:M,slotProps:D}=r,A=re(r,u_),{value:$,handleValueChange:I,timezone:W}=ta({name:"MonthCalendar",timezone:k,value:l,defaultValue:c,referenceDate:u,onChange:m,valueManager:dr}),j=uc(W),F=dn(),P=Ct(),{ownerState:N}=Yt(),L=S.useMemo(()=>dr.getInitialReferenceValue({value:$,utils:P,props:r,timezone:W,referenceDate:u,granularity:ur.month}),[]),H=d_(a),V=S.useMemo(()=>P.getMonth(j),[P,j]),z=S.useMemo(()=>$!=null?P.getMonth($):null,[$,P]),[Z,ne]=S.useState(()=>z||P.getMonth(L)),[J,se]=xs({name:"MonthCalendar",state:"hasFocus",controlled:C,default:o??!1}),Q=Te(K=>{se(K),O&&O(K)}),ue=S.useCallback(K=>{const ee=P.startOfMonth(p&&P.isAfter(j,y)?j:y),oe=P.startOfMonth(f&&P.isBefore(j,h)?j:h),ce=P.startOfMonth(K);return P.isBefore(ce,ee)||P.isAfter(ce,oe)?!0:b?b(ce):!1},[f,p,h,y,j,b,P]),_=Te((K,ee)=>{if(x)return;const oe=P.setMonth($??L,ee);I(oe)}),q=Te(K=>{ue(P.setMonth($??L,K))||(ne(K),Q(!0),w&&w(K))});S.useEffect(()=>{ne(K=>z!==null&&K!==z?z:K)},[z]);const X=Te((K,ee)=>{switch(K.key){case"ArrowUp":q((12+ee-3)%12),K.preventDefault();break;case"ArrowDown":q((12+ee+3)%12),K.preventDefault();break;case"ArrowLeft":q((12+ee+(F?1:-1))%12),K.preventDefault();break;case"ArrowRight":q((12+ee+(F?-1:1))%12),K.preventDefault();break}}),Y=Te((K,ee)=>{q(ee)}),B=Te((K,ee)=>{Z===ee&&Q(!1)});return g.jsx(p_,T({ref:n,className:de(H.root,i),ownerState:N,role:"radiogroup","aria-labelledby":E,monthsPerRow:v},A,{children:$f(P,$??L).map(K=>{const ee=P.getMonth(K),oe=P.format(K,"monthShort"),ce=P.format(K,"month"),Ce=ee===z,ae=d||ue(K);return g.jsx(c_,{selected:Ce,value:ee,onClick:_,onKeyDown:X,autoFocus:J&&ee===Z,disabled:ae,tabIndex:ee===Z&&!ae?0:-1,onFocus:Y,onBlur:B,"aria-current":V===ee?"date":void 0,"aria-label":ce,slots:M,slotProps:D,classes:a,children:oe},oe)})}))});process.env.NODE_ENV!=="production"&&(dx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableMonth:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object});function fx(e){return Lt("MuiYearCalendar",e)}const bc=Vt("MuiYearCalendar",["root","button","disabled","selected"]),h_=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],m_=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return At(n,fx,e)},g_=G("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${bc.disabled}`]:t.disabled},{[`&.${bc.selected}`]:t.selected}]})(({theme:e})=>T({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:eo(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:eo(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${bc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${bc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),y_=S.memo(function(t){const{autoFocus:n,classes:r,disabled:o,selected:i,value:a,onClick:l,onKeyDown:c,onFocus:u,onBlur:d,slots:f,slotProps:p}=t,h=re(t,h_),y=S.useRef(null),{ownerState:m}=Yt(),b=T({},m,{isYearDisabled:o,isYearSelected:i}),x=m_(r,b);cr(()=>{var O;n&&((O=y.current)==null||O.focus())},[n]);const w=(f==null?void 0:f.yearButton)??g_,C=dt({elementType:w,externalSlotProps:p==null?void 0:p.yearButton,externalForwardedProps:h,additionalProps:{disabled:o,ref:y,type:"button",role:"radio","aria-checked":i,onClick:O=>l(O,a),onKeyDown:O=>c(O,a),onFocus:O=>u(O,a),onBlur:O=>d(O,a)},ownerState:b,className:x.button});return g.jsx(w,T({},C))}),b_=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],v_=e=>At({root:["root"]},fx,e);function x_(e,t){const n=kt({props:e,name:t}),r=ea(n);return T({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const w_=G("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>ti(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:fc,maxHeight:n4,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),C_=G("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),px=S.forwardRef(function(t,n){const r=x_(t,"MuiYearCalendar"),{autoFocus:o,className:i,classes:a,value:l,defaultValue:c,referenceDate:u,disabled:d,disableFuture:f,disablePast:p,maxDate:h,minDate:y,onChange:m,readOnly:b,shouldDisableYear:x,onYearFocus:w,hasFocus:C,onFocusedViewChange:O,yearsOrder:v,yearsPerRow:k,timezone:E,gridLabelId:M,slots:D,slotProps:A}=r,$=re(r,b_),{value:I,handleValueChange:W,timezone:j}=ta({name:"YearCalendar",timezone:E,value:l,defaultValue:c,referenceDate:u,onChange:m,valueManager:dr}),F=uc(j),P=dn(),N=Ct(),{ownerState:L}=Yt(),H=S.useMemo(()=>dr.getInitialReferenceValue({value:I,utils:N,props:r,timezone:j,referenceDate:u,granularity:ur.year}),[]),V=v_(a),z=S.useMemo(()=>N.getYear(F),[N,F]),Z=S.useMemo(()=>I!=null?N.getYear(I):null,[I,N]),[ne,J]=S.useState(()=>Z||N.getYear(H)),[se,Q]=xs({name:"YearCalendar",state:"hasFocus",controlled:C,default:o??!1}),ue=Te(me=>{Q(me),O&&O(me)}),_=S.useCallback(me=>{if(p&&N.isBeforeYear(me,F)||f&&N.isAfterYear(me,F)||y&&N.isBeforeYear(me,y)||h&&N.isAfterYear(me,h))return!0;if(!x)return!1;const ge=N.startOfYear(me);return x(ge)},[f,p,h,y,F,x,N]),q=Te((me,ge)=>{if(b)return;const $e=N.setYear(I??H,ge);W($e)}),X=Te(me=>{_(N.setYear(I??H,me))||(J(me),ue(!0),w==null||w(me))});S.useEffect(()=>{J(me=>Z!==null&&me!==Z?Z:me)},[Z]);const Y=v!=="desc"?k*1:k*-1,B=P&&v==="asc"||!P&&v==="desc"?-1:1,K=Te((me,ge)=>{switch(me.key){case"ArrowUp":X(ge-Y),me.preventDefault();break;case"ArrowDown":X(ge+Y),me.preventDefault();break;case"ArrowLeft":X(ge-B),me.preventDefault();break;case"ArrowRight":X(ge+B),me.preventDefault();break}}),ee=Te((me,ge)=>{X(ge)}),oe=Te((me,ge)=>{ne===ge&&ue(!1)}),ce=S.useRef(null),Ce=mn(n,ce);S.useEffect(()=>{if(o||ce.current===null)return;const me=ce.current.querySelector('[tabindex="0"]');if(!me)return;const ge=me.offsetHeight,$e=me.offsetTop,Ae=ce.current.clientHeight,Me=ce.current.scrollTop,ze=$e+ge;ge>Ae||$e<Me||(ce.current.scrollTop=ze-Ae/2-ge/2)},[o]);const ae=N.getYearRange([y,h]);v==="desc"&&ae.reverse();let we=k-ae.length%k;return we===k&&(we=0),g.jsxs(w_,T({ref:Ce,className:de(V.root,i),ownerState:L,role:"radiogroup","aria-labelledby":M,yearsPerRow:k},$,{children:[ae.map(me=>{const ge=N.getYear(me),$e=ge===Z,Ae=d||_(me);return g.jsx(y_,{selected:$e,value:ge,onClick:q,onKeyDown:K,autoFocus:se&&ge===ne,disabled:Ae,tabIndex:ge===ne&&!Ae?0:-1,onFocus:ee,onBlur:oe,"aria-current":z===ge?"date":void 0,slots:D,slotProps:A,classes:a,children:N.format(me,"year")},N.format(me,"year"))}),Array.from({length:we},(me,ge)=>g.jsx(C_,{},ge))]}))});process.env.NODE_ENV!=="production"&&(px.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,gridLabelId:s.string,hasFocus:s.bool,maxDate:s.object,minDate:s.object,onChange:s.func,onFocusedViewChange:s.func,onYearFocus:s.func,readOnly:s.bool,referenceDate:s.object,shouldDisableYear:s.func,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const S_=e=>Lt("MuiPickersCalendarHeader",e),T_=Vt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function O_(e){return Lt("MuiPickersArrowSwitcher",e)}Vt("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const k_=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],E_=["ownerState"],P_=["ownerState"],M_=G("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),R_=G("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),hx=G(Ir,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),D_=e=>At({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},O_,e),I_=S.forwardRef(function(t,n){const r=dn(),o=kt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:l,slotProps:c,isNextDisabled:u,isNextHidden:d,onGoToNext:f,nextLabel:p,isPreviousDisabled:h,isPreviousHidden:y,onGoToPrevious:m,previousLabel:b,labelId:x,classes:w}=o,C=re(o,k_),{ownerState:O}=Yt(),v=D_(w),k={isDisabled:u,isHidden:d,goTo:f,label:p},E={isDisabled:h,isHidden:y,goTo:m,label:b},M=(l==null?void 0:l.previousIconButton)??hx,D=dt({elementType:M,externalSlotProps:c==null?void 0:c.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:T({},O,{isButtonHidden:E.isHidden??!1}),className:de(v.button,v.previousIconButton)}),A=(l==null?void 0:l.nextIconButton)??hx,$=dt({elementType:A,externalSlotProps:c==null?void 0:c.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:T({},O,{isButtonHidden:k.isHidden??!1}),className:de(v.button,v.nextIconButton)}),I=(l==null?void 0:l.leftArrowIcon)??h4,W=dt({elementType:I,externalSlotProps:c==null?void 0:c.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:O,className:v.leftArrowIcon}),j=re(W,E_),F=(l==null?void 0:l.rightArrowIcon)??m4,P=dt({elementType:F,externalSlotProps:c==null?void 0:c.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:O,className:v.rightArrowIcon}),N=re(P,P_);return g.jsxs(M_,T({ref:n,className:de(v.root,a),ownerState:O},C,{children:[g.jsx(M,T({},D,{children:r?g.jsx(F,T({},N)):g.jsx(I,T({},j))})),i?g.jsx(nt,{variant:"subtitle1",component:"span",id:x,children:i}):g.jsx(R_,{className:v.spacer,ownerState:O}),g.jsx(A,T({},$,{children:r?g.jsx(I,T({},j)):g.jsx(F,T({},N))}))]}))});function A_(e,{disableFuture:t,maxDate:n,timezone:r}){const o=Ct();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function j_(e,{disablePast:t,minDate:n,timezone:r}){const o=Ct();return S.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}const N_=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],$_=["ownerState"],__=e=>At({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},S_,e),F_=G("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),B_=G("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>T({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),L_=G("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),V_=G(Ir,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${T_.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),W_=G(p4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),mx=S.forwardRef(function(t,n){const r=qr(),o=Ct(),i=kt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:l,currentMonth:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onMonthChange:y,onViewChange:m,view:b,reduceAnimations:x,views:w,labelId:C,className:O,classes:v,timezone:k,format:E=`${o.formats.month} ${o.formats.year}`}=i,M=re(i,N_),{ownerState:D}=Yt(),A=__(v),$=(a==null?void 0:a.switchViewButton)??V_,I=dt({elementType:$,externalSlotProps:l==null?void 0:l.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(b)},ownerState:D,className:A.switchViewButton}),W=(a==null?void 0:a.switchViewIcon)??W_,j=dt({elementType:W,externalSlotProps:l==null?void 0:l.switchViewIcon,ownerState:D,className:A.switchViewIcon}),F=re(j,$_),P=()=>y(o.addMonths(c,1)),N=()=>y(o.addMonths(c,-1)),L=A_(c,{disableFuture:d,maxDate:p,timezone:k}),H=j_(c,{disablePast:f,minDate:h,timezone:k}),V=()=>{if(!(w.length===1||!m||u))if(w.length===2)m(w.find(Z=>Z!==b)||w[0]);else{const Z=w.indexOf(b)!==0?0:1;m(w[Z])}};if(w.length===1&&w[0]==="year")return null;const z=o.formatByString(c,E);return g.jsxs(F_,T({},M,{ownerState:D,className:de(A.root,O),ref:n,children:[g.jsxs(B_,{role:"presentation",onClick:V,ownerState:D,"aria-live":"polite",className:A.labelContainer,children:[g.jsx(ox,{reduceAnimations:x,transKey:z,children:g.jsx(L_,{id:C,ownerState:D,className:A.label,children:z})}),w.length>1&&!u&&g.jsx($,T({},I,{children:g.jsx(W,T({},F))}))]}),g.jsx(Nr,{in:b==="day",appear:!x,enter:!x,children:g.jsx(I_,{slots:a,slotProps:l,onGoToPrevious:N,isPreviousDisabled:H,previousLabel:r.previousMonth,onGoToNext:P,isNextDisabled:L,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(mx.propTypes={classes:s.object,className:s.string,currentMonth:s.object.isRequired,disabled:s.bool,disableFuture:s.bool,disablePast:s.bool,format:s.string,labelId:s.string,maxDate:s.object.isRequired,minDate:s.object.isRequired,onMonthChange:s.func.isRequired,onViewChange:s.func,reduceAnimations:s.bool.isRequired,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string.isRequired,view:s.oneOf(["day","month","year"]).isRequired,views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired).isRequired});const z_=G("div")({overflow:"hidden",width:fc,maxHeight:Gf,display:"flex",flexDirection:"column",margin:"0 auto"}),U_=e=>Lt("MuiDateCalendar",e);Vt("MuiDateCalendar",["root","viewTransitionContainer"]);const H_=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],q_=e=>At({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},U_,e);function Y_(e,t){const n=kt({props:e,name:t}),r=D2(n.reduceAnimations),o=ea(n);return T({},n,o,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:r,renderLoading:n.renderLoading??(()=>g.jsx("span",{children:"..."}))})}const G_=G(z_,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Gf}),K_=G(ox,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),gx=S.forwardRef(function(t,n){const r=Ct(),{ownerState:o}=Yt(),i=ic(),a=Y_(t,"MuiDateCalendar"),{autoFocus:l,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:p,disablePast:h,onChange:y,onMonthChange:m,reduceAnimations:b,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:C,view:O,views:v,openTo:k,className:E,classes:M,disabled:D,readOnly:A,minDate:$,maxDate:I,disableHighlightToday:W,focusedView:j,onFocusedViewChange:F,showDaysOutsideCurrentMonth:P,fixedWeekNumber:N,dayOfWeekFormatter:L,slots:H,slotProps:V,loading:z,renderLoading:Z,displayWeekNumber:ne,yearsOrder:J,yearsPerRow:se,monthsPerRow:Q,timezone:ue}=a,_=re(a,H_),{value:q,handleValueChange:X,timezone:Y}=ta({name:"DateCalendar",timezone:ue,value:u,defaultValue:d,referenceDate:f,onChange:y,valueManager:dr}),{view:B,setView:K,focusedView:ee,setFocusedView:oe,goToNextView:ce,setValueAndGoToNextView:Ce}=A2({view:O,views:v,openTo:k,onChange:X,onViewChange:c,autoFocus:l,focusedView:j,onFocusedViewChange:F}),{referenceDate:ae,calendarState:we,setVisibleDate:me,isDateDisabled:ge,onMonthSwitchingAnimationEnd:$e}=R$({value:q,referenceDate:f,reduceAnimations:b,onMonthChange:m,minDate:$,maxDate:I,shouldDisableDate:x,disablePast:h,disableFuture:p,timezone:Y,getCurrentMonthFromVisibleDate:(ve,ke)=>r.isSameMonth(ve,ke)?ke:r.startOfMonth(ve)}),Ae=D&&q||$,Me=D&&q||I,ze=`${i}-grid-label`,Xe=ee!==null,Fe=(H==null?void 0:H.calendarHeader)??mx,Be=dt({elementType:Fe,externalSlotProps:V==null?void 0:V.calendarHeader,additionalProps:{views:v,view:B,currentMonth:we.currentMonth,onViewChange:K,onMonthChange:ve=>me({target:ve,reason:"header-navigation"}),minDate:Ae,maxDate:Me,disabled:D,disablePast:h,disableFuture:p,reduceAnimations:b,timezone:Y,labelId:ze},ownerState:o}),fe=Te(ve=>{const ke=r.startOfMonth(ve),xe=r.endOfMonth(ve),Ee=ge(ve)?Zi({utils:r,date:ve,minDate:r.isBefore($,ke)?ke:$,maxDate:r.isAfter(I,xe)?xe:I,disablePast:h,disableFuture:p,isDateDisabled:ge,timezone:Y}):ve;Ee?(Ce(Ee,"finish"),me({target:Ee,reason:"cell-interaction"})):(ce(),me({target:ke,reason:"cell-interaction"}))}),Oe=Te(ve=>{const ke=r.startOfYear(ve),xe=r.endOfYear(ve),Ee=ge(ve)?Zi({utils:r,date:ve,minDate:r.isBefore($,ke)?ke:$,maxDate:r.isAfter(I,xe)?xe:I,disablePast:h,disableFuture:p,isDateDisabled:ge,timezone:Y}):ve;Ee?(Ce(Ee,"finish"),me({target:Ee,reason:"cell-interaction"})):(ce(),me({target:ke,reason:"cell-interaction"}))}),Le=Te(ve=>X(ve&&ac(r,ve,q??ae),"finish",B));S.useEffect(()=>{r.isValid(q)&&me({target:q,reason:"controlled-value-change"})},[q]);const Ue=q_(M),it={disablePast:h,disableFuture:p,maxDate:I,minDate:$},be={disableHighlightToday:W,readOnly:A,disabled:D,timezone:Y,gridLabelId:ze,slots:H,slotProps:V},le=S.useRef(B);S.useEffect(()=>{le.current!==B&&(ee===le.current&&oe(B,!0),le.current=B)},[ee,oe,B]);const pe=S.useMemo(()=>[q],[q]);return g.jsxs(G_,T({ref:n,className:de(Ue.root,E),ownerState:o},_,{children:[g.jsx(Fe,T({},Be,{slots:H,slotProps:V})),g.jsx(K_,{reduceAnimations:b,className:Ue.viewTransitionContainer,transKey:B,ownerState:o,children:g.jsxs("div",{children:[B==="year"&&g.jsx(px,T({},it,be,{value:q,onChange:Oe,shouldDisableYear:C,hasFocus:Xe,onFocusedViewChange:ve=>oe("year",ve),yearsOrder:J,yearsPerRow:se,referenceDate:ae})),B==="month"&&g.jsx(dx,T({},it,be,{hasFocus:Xe,className:E,value:q,onChange:fe,shouldDisableMonth:w,onFocusedViewChange:ve=>oe("month",ve),monthsPerRow:Q,referenceDate:ae})),B==="day"&&g.jsx(s_,T({},we,it,be,{onMonthSwitchingAnimationEnd:$e,hasFocus:Xe,onFocusedDayChange:ve=>me({target:ve,reason:"cell-interaction"}),reduceAnimations:b,selectedDays:pe,onSelectedDaysChange:Le,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:C,onFocusedViewChange:ve=>oe("day",ve),showDaysOutsideCurrentMonth:P,fixedWeekNumber:N,dayOfWeekFormatter:L,displayWeekNumber:ne,loading:z,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(gx.propTypes={autoFocus:s.bool,classes:s.object,className:s.string,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,fixedWeekNumber:s.number,focusedView:s.oneOf(["day","month","year"]),loading:s.bool,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),onChange:s.func,onFocusedViewChange:s.func,onMonthChange:s.func,onViewChange:s.func,onYearChange:s.func,openTo:s.oneOf(["day","month","year"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const Es=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:m,shouldDisableMonth:b,shouldDisableYear:x,reduceAnimations:w,onMonthChange:C,monthsPerRow:O,onYearChange:v,yearsOrder:k,yearsPerRow:E,slots:M,slotProps:D,loading:A,renderLoading:$,disableHighlightToday:I,readOnly:W,disabled:j,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:P,sx:N,autoFocus:L,fixedWeekNumber:H,displayWeekNumber:V,timezone:z})=>g.jsx(gx,{view:e,onViewChange:t,views:n.filter(t2),focusedView:r&&t2(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:l,onChange:c,className:u,classes:d,disableFuture:f,disablePast:p,minDate:h,maxDate:y,shouldDisableDate:m,shouldDisableMonth:b,shouldDisableYear:x,reduceAnimations:w,onMonthChange:C,monthsPerRow:O,onYearChange:v,yearsOrder:k,yearsPerRow:E,slots:M,slotProps:D,loading:A,renderLoading:$,disableHighlightToday:I,readOnly:W,disabled:j,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:P,sx:N,autoFocus:L,fixedWeekNumber:H,displayWeekNumber:V,timezone:z}),yx=S.forwardRef(function(t,n){var c;const r=Ct(),o=P2(t,"MuiDesktopDatePicker"),i=T({day:Es,month:Es,year:Es},o.viewRenderers),a=T({},o,{closeOnSelect:o.closeOnSelect??!0,viewRenderers:i,format:_f(r,o,!1),yearsPerRow:o.yearsPerRow??4,slots:T({field:op},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},Ki((d=o.slotProps)==null?void 0:d.field,u),S2(o))},toolbar:T({hidden:!0},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=p$({ref:n,props:a,valueManager:dr,valueType:"date",validator:Qi,steps:null});return l()});yx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const X_=G(kl)({[`& .${gi.container}`]:{outline:0},[`& .${gi.paper}`]:{outline:0,minWidth:fc}}),Z_=G(Pl)({"&:first-of-type":{padding:0}});function J_(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=Cs(),{dismissViews:i}=Yt(),a=(n==null?void 0:n.dialog)??X_,l=(n==null?void 0:n.mobileTransition)??Nr;return g.jsx(a,T({open:o,onClose:i},r==null?void 0:r.dialog,{TransitionComponent:l,TransitionProps:r==null?void 0:r.mobileTransition,PaperComponent:n==null?void 0:n.mobilePaper,PaperProps:r==null?void 0:r.mobilePaper,children:g.jsx(Z_,{children:t})}))}const Q_=["props","steps"],eF=["ownerState"],tF=e=>{var k;let{props:t,steps:n}=e,r=re(e,Q_);const{slots:o,slotProps:i,label:a,inputRef:l,localeText:c}=t,u=K2({steps:n}),{providerProps:d,renderCurrentView:f,ownerState:p}=N2(T({},r,{props:t,localeText:c,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:u})),h=d.privateContextValue.labelId,y=((k=i==null?void 0:i.toolbar)==null?void 0:k.hidden)??!1,m=o.field,b=dt({elementType:m,externalSlotProps:i==null?void 0:i.field,additionalProps:T({},y&&{id:h}),ownerState:p}),x=re(b,eF),w=o.layout??Kf;let C=h;y&&(a?C=`${h}-label`:C=void 0);const O=T({},i,{toolbar:T({},i==null?void 0:i.toolbar,{titleId:h}),mobilePaper:T({"aria-labelledby":C},i==null?void 0:i.mobilePaper)});return{renderPicker:()=>g.jsx(v2,T({},d,{children:g.jsxs(G2,{slots:o,slotProps:O,inputRef:l,children:[g.jsx(m,T({},x)),g.jsx(J_,{slots:o,slotProps:O,children:g.jsx(w,T({},O==null?void 0:O.layout,{slots:o,slotProps:O,children:f()}))})]})}))}},bx=S.forwardRef(function(t,n){var c;const r=Ct(),o=P2(t,"MuiMobileDatePicker"),i=T({day:Es,month:Es,year:Es},o.viewRenderers),a=T({},o,{viewRenderers:i,format:_f(r,o,!1),slots:T({field:op},o.slots),slotProps:T({},o.slotProps,{field:u=>{var d;return T({},Ki((d=o.slotProps)==null?void 0:d.field,u),S2(o))},toolbar:T({hidden:!1},(c=o.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=tF({ref:n,props:a,valueManager:dr,valueType:"date",validator:Qi,steps:null});return l()});bx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])};const nF=["desktopModeMediaQuery"],vx=S.forwardRef(function(t,n){const r=kt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=F9}=r,i=re(r,nF);return dm(o,{defaultMatches:!0})?g.jsx(yx,T({ref:n},i)):g.jsx(bx,T({ref:n},i))});process.env.NODE_ENV!=="production"&&(vx.propTypes={autoFocus:s.bool,className:s.string,closeOnSelect:s.bool,dayOfWeekFormatter:s.func,defaultValue:s.object,desktopModeMediaQuery:s.string,disabled:s.bool,disableFuture:s.bool,disableHighlightToday:s.bool,disableOpenPicker:s.bool,disablePast:s.bool,displayWeekNumber:s.bool,enableAccessibleFieldDOMStructure:s.any,fixedWeekNumber:s.number,format:s.string,formatDensity:s.oneOf(["dense","spacious"]),inputRef:kr,label:s.node,loading:s.bool,localeText:s.object,maxDate:s.object,minDate:s.object,monthsPerRow:s.oneOf([3,4]),name:s.string,onAccept:s.func,onChange:s.func,onClose:s.func,onError:s.func,onMonthChange:s.func,onOpen:s.func,onSelectedSectionsChange:s.func,onViewChange:s.func,onYearChange:s.func,open:s.bool,openTo:s.oneOf(["day","month","year"]),orientation:s.oneOf(["landscape","portrait"]),readOnly:s.bool,reduceAnimations:s.bool,referenceDate:s.object,renderLoading:s.func,selectedSections:s.oneOfType([s.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),s.number]),shouldDisableDate:s.func,shouldDisableMonth:s.func,shouldDisableYear:s.func,showDaysOutsideCurrentMonth:s.bool,slotProps:s.object,slots:s.object,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),timezone:s.string,value:s.object,view:s.oneOf(["day","month","year"]),viewRenderers:s.shape({day:s.func,month:s.func,year:s.func}),views:s.arrayOf(s.oneOf(["day","month","year"]).isRequired),yearsOrder:s.oneOf(["asc","desc"]),yearsPerRow:s.oneOf([3,4])});const xx=6048e5,rF=864e5,wx=Symbol.for("constructDateFrom");function Wt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&wx in e?e[wx](t):e instanceof Date?new e.constructor(t):new Date(t)}function yt(e,t){return Wt(t||e,e)}function Cx(e,t,n){const r=yt(e,n==null?void 0:n.in);return isNaN(t)?Wt(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Sx(e,t,n){const r=yt(e,n==null?void 0:n.in);if(isNaN(t))return Wt(e,NaN);if(!t)return r;const o=r.getDate(),i=Wt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let oF={};function ia(){return oF}function Ps(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=yt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function aa(e,t){return Ps(e,{...t,weekStartsOn:1})}function Tx(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Wt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=aa(o),a=Wt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=aa(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ox(e){const t=yt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ms(e,...t){const n=Wt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function la(e,t){const n=yt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function kx(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t),i=la(r),a=la(o),l=+i-Ox(i),c=+a-Ox(a);return Math.round((l-c)/rF)}function sF(e,t){const n=Tx(e,t),r=Wt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),aa(r)}function iF(e,t,n){return Cx(e,t*7,n)}function aF(e,t,n){return Sx(e,t*12,n)}function lF(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Wt.bind(null,o));const i=yt(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function cF(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Wt.bind(null,o));const i=yt(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),Wt(r,n||NaN)}function uF(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return+la(r)==+la(o)}function Ex(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dF(e){return!(!Ex(e)&&typeof e!="number"||isNaN(+yt(e)))}function fF(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t),i=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return i*12+a}function pF(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function hF(e,t){const[n,r]=Ms(e,t.start,t.end);return{start:n,end:r}}function mF(e,t){const{start:n,end:r}=hF(t==null?void 0:t.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=i;)c.push(Wt(n,a)),a.setMonth(a.getMonth()+l);return o?c.reverse():c}function gF(e,t){const n=yt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function yF(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Px(e,t){const n=yt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Mx(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=yt(e,t==null?void 0:t.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function bF(e,t){return Mx(e,{...t,weekStartsOn:1})}const vF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xF=(e,t,n)=>{let r;const o=vF[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function sp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},CF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},SF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TF={date:sp({formats:wF,defaultWidth:"full"}),time:sp({formats:CF,defaultWidth:"full"}),dateTime:sp({formats:SF,defaultWidth:"full"})},OF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kF=(e,t,n,r)=>OF[e];function ca(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;o=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const EF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},MF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},RF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},DF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},IF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},AF={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ca({values:EF,defaultWidth:"wide"}),quarter:ca({values:PF,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ca({values:MF,defaultWidth:"wide"}),day:ca({values:RF,defaultWidth:"wide"}),dayPeriod:ca({values:DF,defaultWidth:"wide",formattingValues:IF,defaultFormattingWidth:"wide"})};function ua(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?NF(l,f=>f.test(a)):jF(l,f=>f.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function jF(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function NF(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function $F(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(o.length);return{value:a,rest:l}}}const _F=/^(\d+)(th|st|nd|rd)?/i,FF=/\d+/i,BF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LF={any:[/^b/i,/^(a|c)/i]},VF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WF={any:[/1/i,/2/i,/3/i,/4/i]},zF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},UF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},qF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},YF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},GF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},KF={ordinalNumber:$F({matchPattern:_F,parsePattern:FF,valueCallback:e=>parseInt(e,10)}),era:ua({matchPatterns:BF,defaultMatchWidth:"wide",parsePatterns:LF,defaultParseWidth:"any"}),quarter:ua({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:WF,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ua({matchPatterns:zF,defaultMatchWidth:"wide",parsePatterns:UF,defaultParseWidth:"any"}),day:ua({matchPatterns:HF,defaultMatchWidth:"wide",parsePatterns:qF,defaultParseWidth:"any"}),dayPeriod:ua({matchPatterns:YF,defaultMatchWidth:"any",parsePatterns:GF,defaultParseWidth:"any"})},ip={code:"en-US",formatDistance:xF,formatLong:TF,formatRelative:kF,localize:AF,match:KF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XF(e,t){const n=yt(e,t==null?void 0:t.in);return kx(n,Px(n))+1}function Rx(e,t){const n=yt(e,t==null?void 0:t.in),r=+aa(n)-+sF(n);return Math.round(r/xx)+1}function Dx(e,t){var d,f,p,h;const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=ia(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=Wt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=Ps(a,t),c=Wt((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Ps(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function ZF(e,t){var l,c,u,d;const n=ia(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=Dx(e,t),i=Wt((t==null?void 0:t.in)||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Ps(i,t)}function Ix(e,t){const n=yt(e,t==null?void 0:t.in),r=+Ps(n,t)-+ZF(n,t);return Math.round(r/xx)+1}function pt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Yr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pt(n+1,2)},d(e,t){return pt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pt(e.getHours()%12||12,t.length)},H(e,t){return pt(e.getHours(),t.length)},m(e,t){return pt(e.getMinutes(),t.length)},s(e,t){return pt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return pt(o,t.length)}},Rs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ax={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Yr.y(e,t)},Y:function(e,t,n,r){const o=Dx(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return pt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):pt(i,t.length)},R:function(e,t){const n=Tx(e);return pt(n,t.length)},u:function(e,t){const n=e.getFullYear();return pt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Yr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Ix(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):pt(o,t.length)},I:function(e,t,n){const r=Rx(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Yr.d(e,t)},D:function(e,t,n){const r=XF(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return pt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return pt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return pt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Rs.noon:r===0?o=Rs.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Rs.evening:r>=12?o=Rs.afternoon:r>=4?o=Rs.morning:o=Rs.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Yr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Yr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Yr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Yr.s(e,t)},S:function(e,t){return Yr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Nx(r);case"XXXX":case"XX":return wo(r);case"XXXXX":case"XXX":default:return wo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Nx(r);case"xxxx":case"xx":return wo(r);case"xxxxx":case"xxx":default:return wo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jx(r,":");case"OOOO":default:return"GMT"+wo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jx(r,":");case"zzzz":default:return"GMT"+wo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return pt(r,t.length)},T:function(e,t,n){return pt(+e,t.length)}};function jx(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+pt(i,2)}function Nx(e,t){return e%60===0?(e>0?"-":"+")+pt(Math.abs(e)/60,2):wo(e,t)}function wo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=pt(Math.trunc(r/60),2),i=pt(r%60,2);return n+o+t+i}const $x=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},_x=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},JF={p:_x,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return $x(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",$x(r,t)).replace("{{time}}",_x(o,t))}},QF=/^D+$/,eB=/^Y+$/,tB=["D","DD","YY","YYYY"];function nB(e){return QF.test(e)}function rB(e){return eB.test(e)}function oB(e,t,n){const r=sB(e,t,n);if(console.warn(r),tB.includes(e))throw new RangeError(r)}function sB(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lB=/^'([^]*?)'?$/,cB=/''/g,uB=/[a-zA-Z]/;function da(e,t,n){var d,f,p,h,y,m,b,x;const r=ia(),o=(n==null?void 0:n.locale)??r.locale??ip,i=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((m=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((x=(b=r.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0,l=yt(e,n==null?void 0:n.in);if(!dF(l))throw new RangeError("Invalid time value");let c=t.match(aB).map(w=>{const C=w[0];if(C==="p"||C==="P"){const O=JF[C];return O(w,o.formatLong)}return w}).join("").match(iB).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const C=w[0];if(C==="'")return{isToken:!1,value:dB(w)};if(Ax[C])return{isToken:!0,value:w};if(C.match(uB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const C=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&rB(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&nB(C))&&oB(C,t,String(e));const O=Ax[C[0]];return O(l,C,o.localize,u)}).join("")}function dB(e){const t=e.match(lB);return t?t[1].replace(cB,"'"):e}function fB(e,t){const n=yt(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),i=Wt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function pB(e,t){return yt(e,t==null?void 0:t.in).getMonth()}function hB(e,t){return yt(e,t==null?void 0:t.in).getFullYear()}function mB(e,t){return+yt(e)>+yt(t)}function gB(e,t){return+yt(e)<+yt(t)}function yB(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function bB(e,t,n){const[r,o]=Ms(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function vB(e,t,n){const r=yt(e,n==null?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=Wt(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const l=fB(a);return r.setMonth(t,Math.min(i,l)),r}function xB(e,t,n){const r=yt(e,n==null?void 0:n.in);return isNaN(+r)?Wt(e,NaN):(r.setFullYear(t),r)}const ap={},fa={};function pa(e,t){try{const r=(ap[e]||(ap[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in fa?fa[r]:Fx(r,r.split(":"))}catch{if(e in fa)return fa[e];const n=e==null?void 0:e.match(wB);return n?Fx(e,n.slice(1)):NaN}}const wB=/([+-]\d\d):?(\d\d)?/;function Fx(e,t){const n=+t[0],r=+(t[1]||0);return fa[e]=n>0?n*60+r:n*60-r}class fr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(pa(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Lx(this),lp(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new fr(...n,t):new fr(Date.now(),t)}withTimeZone(t){return new fr(+this,t)}getTimezoneOffset(){return-pa(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),lp(this),+this}[Symbol.for("constructDateFrom")](t){return new fr(+new Date(t),this.timeZone)}}const Bx=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Bx.test(e))return;const t=e.replace(Bx,"$1UTC");fr.prototype[t]&&(e.startsWith("get")?fr.prototype[e]=function(){return this.internal[t]()}:(fr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),CB(this),+this},fr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lp(this),+this}))});function lp(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function CB(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Lx(e)}function Lx(e){const t=pa(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),i=r-o,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const l=r-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const c=pa(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,f=c!==t,p=d-l;if(f&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=pa(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class Qt extends fr{static tz(t,...n){return n.length?new Qt(...n,t):new Qt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${SB(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Qt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Qt(+new Date(t),this.timeZone)}}function SB(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var Re;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Re||(Re={}));var Mt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Mt||(Mt={}));var Kn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Kn||(Kn={}));var On;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(On||(On={}));const Vx=5,TB=4;function OB(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),i=t.addDays(o,Vx*7-1);return t.getMonth(e)===t.getMonth(i)?Vx:TB}function Wx(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function kB(e,t){const n=Wx(e,t),r=OB(e,t);return t.addDays(n,r*7-1)}class Er{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Qt.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,o,i):this.options.timeZone?new Qt(r,o,i,this.options.timeZone):new Date(r,o,i)},this.addDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,o):Cx(r,o)},this.addMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,o):Sx(r,o)},this.addWeeks=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,o):iF(r,o)},this.addYears=(r,o)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,o):aF(r,o)},this.differenceInCalendarDays=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):kx(r,o)},this.differenceInCalendarMonths=(r,o)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):fF(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):mF(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):kB(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):bF(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):pF(r)},this.endOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,o):Mx(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):yF(r)},this.format=(r,o,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,o,this.options):da(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Rx(r)},this.getMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):pB(r,this.options)},this.getYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):hB(r,this.options)},this.getWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):Ix(r,this.options)},this.isAfter=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,o):mB(r,o)},this.isBefore=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,o):gB(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Ex(r)},this.isSameDay=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,o):uF(r,o)},this.isSameMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,o):yB(r,o)},this.isSameYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,o):bB(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):lF(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):cF(r)},this.setMonth=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,o):vB(r,o)},this.setYear=(r,o)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,o):xB(r,o)},this.startOfBroadcastWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Wx(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):la(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):aa(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):gF(r)},this.startOfWeek=(r,o)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Ps(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Px(r)},this.options={locale:ip,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const pr=new Er;class zx{constructor(t,n,r=pr){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class EB{constructor(t,n){this.date=t,this.weeks=n}}class PB{constructor(t,n){this.days=n,this.weekNumber=t}}function Pr(e,t,n=!1,r=pr){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&o?l(o,t):!1}function Ux(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function cp(e){return!!(e&&typeof e=="object"&&"from"in e)}function Hx(e){return!!(e&&typeof e=="object"&&"after"in e)}function qx(e){return!!(e&&typeof e=="object"&&"before"in e)}function Yx(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Gx(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Mr(e,t,n=pr){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return o(e,l);if(Gx(l,n))return l.includes(e);if(cp(l))return Pr(l,e,!1,n);if(Yx(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(Ux(l)){const c=i(l.before,e),u=i(l.after,e),d=c>0,f=u<0;return a(l.before,l.after)?f&&d:d||f}return Hx(l)?i(e,l.after)>0:qx(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function MB(e,t,n){const{disabled:r,hidden:o,modifiers:i,showOutsideDays:a,broadcastCalendar:l,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:f,isBefore:p,endOfMonth:h,isAfter:y}=n,m=t.startMonth&&f(t.startMonth),b=t.endMonth&&h(t.endMonth),x={[Mt.focused]:[],[Mt.outside]:[],[Mt.disabled]:[],[Mt.hidden]:[],[Mt.today]:[]},w={};for(const C of e){const{date:O,displayMonth:v}=C,k=!!(v&&!d(O,v)),E=!!(m&&p(O,m)),M=!!(b&&y(O,b)),D=!!(r&&Mr(O,r,n)),A=!!(o&&Mr(O,o,n))||E||M||!l&&!a&&k||l&&a===!1&&k,$=u(O,c??n.today());k&&x.outside.push(C),D&&x.disabled.push(C),A&&x.hidden.push(C),$&&x.today.push(C),i&&Object.keys(i).forEach(I=>{const W=i==null?void 0:i[I];W&&Mr(O,W,n)&&(w[I]?w[I].push(C):w[I]=[C])})}return C=>{const O={[Mt.focused]:!1,[Mt.disabled]:!1,[Mt.hidden]:!1,[Mt.outside]:!1,[Mt.today]:!1},v={};for(const k in x){const E=x[k];O[k]=E.some(M=>M===C)}for(const k in w)v[k]=w[k].some(E=>E===C);return{...O,...v}}}function RB(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[i])=>(n[i]?o.push(n[i]):t[Mt[i]]?o.push(t[Mt[i]]):t[Kn[i]]&&o.push(t[Kn[i]]),o),[t[Re.Day]])}function DB(e){return R.createElement("button",{...e})}function IB(e){return R.createElement("span",{...e})}function AB(e){const{size:t=24,orientation:n="left",className:r}=e;return R.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&R.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&R.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&R.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&R.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function jB(e){const{day:t,modifiers:n,...r}=e;return R.createElement("td",{...r})}function NB(e){const{day:t,modifiers:n,...r}=e,o=R.useRef(null);return R.useEffect(()=>{var i;n.focused&&((i=o.current)==null||i.focus())},[n.focused]),R.createElement("button",{ref:o,...r})}function $B(e){const{options:t,className:n,components:r,classNames:o,...i}=e,a=[o[Re.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===i.value);return R.createElement("span",{"data-disabled":i.disabled,className:o[Re.DropdownRoot]},R.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>R.createElement(r.Option,{key:c,value:c,disabled:d},u))),R.createElement("span",{className:o[Re.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,R.createElement(r.Chevron,{orientation:"down",size:18,className:o[Re.Chevron]})))}function _B(e){return R.createElement("div",{...e})}function FB(e){return R.createElement("div",{...e})}function BB(e){const{calendarMonth:t,displayIndex:n,...r}=e;return R.createElement("div",{...r},e.children)}function LB(e){const{calendarMonth:t,displayIndex:n,...r}=e;return R.createElement("div",{...r})}function VB(e){return R.createElement("table",{...e})}function WB(e){return R.createElement("div",{...e})}const Kx=R.createContext(void 0);function ha(){const e=R.useContext(Kx);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function zB(e){const{components:t}=ha();return R.createElement(t.Dropdown,{...e})}function UB(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=ha(),d=R.useCallback(p=>{o&&(n==null||n(p))},[o,n]),f=R.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return R.createElement("nav",{...i},R.createElement(a.PreviousMonthButton,{type:"button",className:l[Re.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:f},R.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[Re.Chevron],orientation:"left"})),R.createElement(a.NextMonthButton,{type:"button",className:l[Re.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},R.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:l[Re.Chevron]})))}function HB(e){const{components:t}=ha();return R.createElement(t.Button,{...e})}function qB(e){return R.createElement("option",{...e})}function YB(e){const{components:t}=ha();return R.createElement(t.Button,{...e})}function GB(e){const{rootRef:t,...n}=e;return R.createElement("div",{...n,ref:t})}function KB(e){return R.createElement("select",{...e})}function XB(e){const{week:t,...n}=e;return R.createElement("tr",{...n})}function ZB(e){return R.createElement("th",{...e})}function JB(e){return R.createElement("thead",{"aria-hidden":!0},R.createElement("tr",{...e}))}function QB(e){const{week:t,...n}=e;return R.createElement("th",{...n})}function eL(e){return R.createElement("th",{...e})}function tL(e){return R.createElement("tbody",{...e})}function nL(e){const{components:t}=ha();return R.createElement(t.Dropdown,{...e})}const rL=Object.freeze(Object.defineProperty({__proto__:null,Button:DB,CaptionLabel:IB,Chevron:AB,Day:jB,DayButton:NB,Dropdown:$B,DropdownNav:_B,Footer:FB,Month:BB,MonthCaption:LB,MonthGrid:VB,Months:WB,MonthsDropdown:zB,Nav:UB,NextMonthButton:HB,Option:qB,PreviousMonthButton:YB,Root:GB,Select:KB,Week:XB,WeekNumber:QB,WeekNumberHeader:eL,Weekday:ZB,Weekdays:JB,Weeks:tL,YearsDropdown:nL},Symbol.toStringTag,{value:"Module"}));function oL(e){return{...rL,...e}}function sL(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function iL(){const e={};for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;for(const t in Mt)e[Mt[t]]=`rdp-${Mt[t]}`;for(const t in Kn)e[Kn[t]]=`rdp-${Kn[t]}`;for(const t in On)e[On[t]]=`rdp-${On[t]}`;return e}function Xx(e,t,n){return(n??new Er(t)).format(e,"LLLL y")}const aL=Xx;function lL(e,t,n){return(n??new Er(t)).format(e,"d")}function cL(e,t=pr){return t.format(e,"LLLL")}function uL(e,t=pr){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function dL(){return""}function fL(e,t,n){return(n??new Er(t)).format(e,"cccccc")}function Zx(e,t=pr){return t.format(e,"yyyy")}const pL=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Xx,formatDay:lL,formatMonthCaption:aL,formatMonthDropdown:cL,formatWeekNumber:uL,formatWeekNumberHeader:dL,formatWeekdayName:fL,formatYearCaption:Zx,formatYearDropdown:Zx},Symbol.toStringTag,{value:"Module"}));function hL(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...pL,...e}}function mL(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=o;return c({start:a(e),end:l(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),m=t&&p<i(t)||n&&p>i(n)||!1;return{value:y,label:h,disabled:m}})}function gL(e,t={},n={}){let r={...t==null?void 0:t[Re.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function yL(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),i=[];for(let a=0;a<7;a++){const l=e.addDays(o,a);i.push(l)}return i}function bL(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:i,addYears:a,getYear:l,isBefore:c,isSameYear:u}=r,d=o(e),f=i(t),p=[];let h=d;for(;c(h,f)||u(h,f);)p.push(h),h=a(h,1);return p.map(y=>{const m=n.formatYearDropdown(y,r);return{value:l(y),label:m,disabled:!1}})}function Jx(e,t,n){return(n??new Er(t)).format(e,"LLLL y")}const vL=Jx;function xL(e,t,n,r){let o=(r??new Er(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Qx(e,t,n,r){let o=(r??new Er(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const wL=Qx;function CL(){return""}function SL(e){return"Choose the Month"}function TL(e){return"Go to the Next Month"}function OL(e){return"Go to the Previous Month"}function kL(e,t,n){return(n??new Er(t)).format(e,"cccc")}function EL(e,t){return`Week ${e}`}function PL(e){return"Week Number"}function ML(e){return"Choose the Year"}const RL=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:vL,labelDay:wL,labelDayButton:Qx,labelGrid:Jx,labelGridcell:xL,labelMonthDropdown:SL,labelNav:CL,labelNext:TL,labelPrevious:OL,labelWeekNumber:EL,labelWeekNumberHeader:PL,labelWeekday:kL,labelYearDropdown:ML},Symbol.toStringTag,{value:"Module"})),ma=e=>e instanceof HTMLElement?e:null,up=e=>[...e.querySelectorAll("[data-animated-month]")??[]],DL=e=>ma(e.querySelector("[data-animated-month]")),dp=e=>ma(e.querySelector("[data-animated-caption]")),fp=e=>ma(e.querySelector("[data-animated-weeks]")),IL=e=>ma(e.querySelector("[data-animated-nav]")),AL=e=>ma(e.querySelector("[data-animated-weekdays]"));function jL(e,t,{classNames:n,months:r,focused:o,dateLib:i}){const a=R.useRef(null),l=R.useRef(r),c=R.useRef(!1);R.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=i.isSameMonth(r[0].date,u[0].date),f=i.isAfter(r[0].date,u[0].date),p=f?n[On.caption_after_enter]:n[On.caption_before_enter],h=f?n[On.weeks_after_enter]:n[On.weeks_before_enter],y=a.current,m=e.current.cloneNode(!0);if(m instanceof HTMLElement?(up(m).forEach(C=>{if(!(C instanceof HTMLElement))return;const O=DL(C);O&&C.contains(O)&&C.removeChild(O);const v=dp(C);v&&v.classList.remove(p);const k=fp(C);k&&k.classList.remove(h)}),a.current=m):a.current=null,c.current||d||o)return;const b=y instanceof HTMLElement?up(y):[],x=up(e.current);if(x&&x.every(w=>w instanceof HTMLElement)&&b&&b.every(w=>w instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const w=IL(e.current);w&&(w.style.zIndex="1"),x.forEach((C,O)=>{const v=b[O];if(!v)return;C.style.position="relative",C.style.overflow="hidden";const k=dp(C);k&&k.classList.add(p);const E=fp(C);E&&E.classList.add(h);const M=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),k&&k.classList.remove(p),E&&E.classList.remove(h),C.style.position="",C.style.overflow="",C.contains(v)&&C.removeChild(v)};v.style.pointerEvents="none",v.style.position="absolute",v.style.overflow="hidden",v.setAttribute("aria-hidden","true");const D=AL(v);D&&(D.style.opacity="0");const A=dp(v);A&&(A.classList.add(f?n[On.caption_before_exit]:n[On.caption_after_exit]),A.addEventListener("animationend",M));const $=fp(v);$&&$.classList.add(f?n[On.weeks_before_exit]:n[On.weeks_after_exit]),C.insertBefore(v,C.firstChild)})}})}function NL(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:f,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:m,isAfter:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:C}=r,O=c?x(o,r):a?w(o):C(o),v=c?p(i):a?h(y(i)):m(y(i)),k=d(v,O),E=f(i,o)+1,M=[];for(let $=0;$<=k;$++){const I=u(O,$);if(t&&b(I,t))break;M.push(I)}const A=(c?35:42)*E;if(l&&M.length<A){const $=A-M.length;for(let I=0;I<$;I++){const W=u(M[M.length-1],1);M.push(W)}}return M}function $L(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((i,a)=>[...i,...a.days],t);return[...n,...o]},t)}function _L(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let a=0;a<o;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function e1(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:i=1,endMonth:a,startMonth:l}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:f}=t;if(a&&u(a,c)<0){const p=-1*(i-1);c=d(a,p)}return l&&u(c,l)<0&&(c=l),f(c)}function FL(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:f,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((m,b)=>{const x=n.broadcastCalendar?f(b,r):n.ISOWeek?p(b):h(b),w=n.broadcastCalendar?i(b):n.ISOWeek?a(l(b)):c(l(b)),C=t.filter(E=>E>=x&&E<=w),O=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<O){const E=t.filter(M=>{const D=O-C.length;return M>w&&M<=o(w,D)});C.push(...E)}const v=C.reduce((E,M)=>{const D=n.ISOWeek?u(M):d(M),A=E.find(I=>I.weekNumber===D),$=new zx(M,b,r);return A?A.days.push($):E.push(new PB(D,[$])),E},[]),k=new EB(b,v);return m.push(k),m},[]);return n.reverseMonths?y.reverse():y}function BL(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:f}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:m}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&m&&(r=m),!r&&h&&(r=d(h,11,31));const b=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):p?n=d(p,0,1):!n&&b&&(n=o(c(e.today??f(),-100))),r?r=l(r):h?r=d(h,11,31):!r&&b&&(r=u(e.today??f())),[n&&i(n),r&&i(r)]}function LL(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i:1,d=a(e);if(!t)return l(d,u);if(!(c(t,e)<i))return l(d,u)}function VL(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=o?i??1:1,d=a(e);if(!t)return l(d,-u);if(!(c(d,t)<=0))return l(d,-u)}function WL(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function vc(e,t){const[n,r]=R.useState(e);return[t===void 0?n:t,r]}function zL(e,t){const[n,r]=BL(e,t),{startOfMonth:o,endOfMonth:i}=t,a=e1(e,t),[l,c]=vc(a,e.month?a:void 0);R.useEffect(()=>{const k=e1(e,t);c(k)},[e.timeZone]);const u=_L(l,r,e,t),d=NL(u,e.endMonth?i(e.endMonth):void 0,e,t),f=FL(u,d,e,t),p=WL(f),h=$L(f),y=VL(l,n,e,t),m=LL(l,r,e,t),{disableNavigation:b,onMonthChange:x}=e,w=k=>p.some(E=>E.days.some(M=>M.isEqualTo(k))),C=k=>{if(b)return;let E=o(k);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),x==null||x(E)};return{months:f,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:m,goToMonth:C,goToDay:k=>{w(k)||C(k.date)}}}var hr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(hr||(hr={}));function t1(e){return!e[Mt.disabled]&&!e[Mt.hidden]&&!e[Mt.outside]}function UL(e,t,n,r){let o,i=-1;for(const a of e){const l=t(a);t1(l)&&(l[Mt.focused]&&i<hr.FocusedModifier?(o=a,i=hr.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<hr.LastFocused?(o=a,i=hr.LastFocused):n(a.date)&&i<hr.Selected?(o=a,i=hr.Selected):l[Mt.today]&&i<hr.Today&&(o=a,i=hr.Today))}return o||(o=e.find(a=>t1(t(a)))),o}function HL(e,t,n,r,o,i,a){const{ISOWeek:l,broadcastCalendar:c}=i,{addDays:u,addMonths:d,addWeeks:f,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:m,max:b,min:x,startOfBroadcastWeek:w,startOfISOWeek:C,startOfWeek:O}=a;let k={day:u,week:f,month:d,year:p,startOfWeek:E=>c?w(E,a):l?C(E):O(E),endOfWeek:E=>c?h(E):l?y(E):m(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=b([r,k]):t==="after"&&o&&(k=x([o,k])),k}function n1(e,t,n,r,o,i,a,l=0){if(l>365)return;const c=HL(e,t,n.date,r,o,i,a),u=!!(i.disabled&&Mr(c,i.disabled,a)),d=!!(i.hidden&&Mr(c,i.hidden,a)),f=c,p=new zx(c,f,a);return!u&&!d?p:n1(e,t,p,r,o,i,a,l+1)}function qL(e,t,n,r,o){const{autoFocus:i}=e,[a,l]=R.useState(),c=UL(t.days,n,r||(()=>!1),a),[u,d]=R.useState(i?c:void 0);return{isFocusTarget:m=>!!(c!=null&&c.isEqualTo(m)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(m,b)=>{if(!u)return;const x=n1(m,b,u,t.navStart,t.navEnd,e,o);x&&(t.goToDay(x),d(x))}}}function YL(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=vc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t,u=h=>(l==null?void 0:l.some(y=>c(y,h)))??!1,{min:d,max:f}=e;return{selected:l,select:(h,y,m)=>{let b=[...l??[]];if(u(h)){if((l==null?void 0:l.length)===d||r&&(l==null?void 0:l.length)===1)return;b=l==null?void 0:l.filter(x=>!c(x,h))}else(l==null?void 0:l.length)===f?b=[h]:b=[...b,h];return o||a(b),o==null||o(b,h,y,m),b},isSelected:u}}function GL(e,t,n=0,r=0,o=!1,i=pr){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=i;let f;if(!a&&!l)f={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?o?f={from:a,to:void 0}:f=void 0:d(e,a)?f={from:e,to:a}:f={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))o?f={from:a,to:l}:f=void 0;else if(c(a,e))f={from:a,to:n>0?void 0:e};else if(c(l,e))f={from:e,to:n>0?void 0:e};else if(d(e,a))f={from:e,to:l};else if(u(e,a))f={from:a,to:e};else if(u(e,l))f={from:a,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const p=i.differenceInCalendarDays(f.to,f.from);r>0&&p>r?f={from:e,to:void 0}:n>1&&p<n&&(f={from:e,to:void 0})}return f}function KL(e,t,n=pr){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function r1(e,t,n=pr){return Pr(e,t.from,!1,n)||Pr(e,t.to,!1,n)||Pr(t,e.from,!1,n)||Pr(t,e.to,!1,n)}function XL(e,t,n=pr){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?Pr(e,l,!1,n):Gx(l,n)?l.some(c=>Pr(e,c,!1,n)):cp(l)?l.from&&l.to?r1(e,{from:l.from,to:l.to},n):!1:Yx(l)?KL(e,l.dayOfWeek,n):Ux(l)?n.isAfter(l.before,l.after)?r1(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):Mr(e.from,l,n)||Mr(e.to,l,n):Hx(l)||qx(l)?Mr(e.from,l,n)||Mr(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(l)))return!0;l=n.addDays(l,1)}}return!1}function ZL(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[l,c]=vc(o,a?o:void 0),u=a?o:l;return{selected:u,select:(p,h,y)=>{const{min:m,max:b}=e,x=p?GL(p,u,m,b,i,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&XL({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||c(x),a==null||a(x,p,h,y),x},isSelected:p=>u&&Pr(u,p,!1,t)}}function JL(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=vc(n,o?n:void 0),l=o?n:i,{isSameDay:c}=t;return{selected:l,select:(f,p,h)=>{let y=f;return!r&&l&&l&&c(f,l)&&(y=void 0),o||a(y),o==null||o(y,f,p,h),y},isSelected:f=>l?c(l,f):!1}}function QL(e,t){const n=JL(e,t),r=YL(e,t),o=ZL(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function e8(e){var ke;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Qt(t.today,t.timeZone)),t.month&&(t.month=new Qt(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Qt(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Qt(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Qt(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Qt(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(ke=t.selected)==null?void 0:ke.map(xe=>new Qt(xe,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Qt(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Qt(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:i,locale:a,classNames:l}=R.useMemo(()=>{const xe={...ip,...t.locale};return{dateLib:new Er({locale:xe,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:oL(t.components),formatters:hL(t.formatters),labels:{...RL,...t.labels},locale:xe,classNames:{...iL(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:m,onDayMouseEnter:b,onDayMouseLeave:x,onNextClick:w,onPrevClick:C,showWeekNumber:O,styles:v}=t,{formatCaption:k,formatDay:E,formatMonthDropdown:M,formatWeekNumber:D,formatWeekNumberHeader:A,formatWeekdayName:$,formatYearDropdown:I}=r,W=zL(t,i),{days:j,months:F,navStart:P,navEnd:N,previousMonth:L,nextMonth:H,goToMonth:V}=W,z=MB(j,t,i),{isSelected:Z,select:ne,selected:J}=QL(t,i)??{},{blur:se,focused:Q,isFocusTarget:ue,moveFocus:_,setFocused:q}=qL(t,W,z,Z??(()=>!1),i),{labelDayButton:X,labelGridcell:Y,labelGrid:B,labelMonthDropdown:K,labelNav:ee,labelPrevious:oe,labelNext:ce,labelWeekday:Ce,labelWeekNumber:ae,labelWeekNumberHeader:we,labelYearDropdown:me}=o,ge=R.useMemo(()=>yL(i,t.ISOWeek),[i,t.ISOWeek]),$e=u!==void 0||h!==void 0,Ae=R.useCallback(()=>{L&&(V(L),C==null||C(L))},[L,V,C]),Me=R.useCallback(()=>{H&&(V(H),w==null||w(H))},[V,H,w]),ze=R.useCallback((xe,Ee)=>We=>{We.preventDefault(),We.stopPropagation(),q(xe),ne==null||ne(xe.date,Ee,We),h==null||h(xe.date,Ee,We)},[ne,h,q]),Xe=R.useCallback((xe,Ee)=>We=>{q(xe),y==null||y(xe.date,Ee,We)},[y,q]),Fe=R.useCallback((xe,Ee)=>We=>{se(),p==null||p(xe.date,Ee,We)},[se,p]),Be=R.useCallback((xe,Ee)=>We=>{const Qe={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[We.shiftKey?"year":"month","before"],PageDown:[We.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Qe[We.key]){We.preventDefault(),We.stopPropagation();const[bt,sn]=Qe[We.key];_(bt,sn)}m==null||m(xe.date,Ee,We)},[_,m,t.dir]),fe=R.useCallback((xe,Ee)=>We=>{b==null||b(xe.date,Ee,We)},[b]),Oe=R.useCallback((xe,Ee)=>We=>{x==null||x(xe.date,Ee,We)},[x]),Le=R.useCallback(xe=>Ee=>{const We=Number(Ee.target.value),Qe=i.setMonth(i.startOfMonth(xe),We);V(Qe)},[i,V]),Ue=R.useCallback(xe=>Ee=>{const We=Number(Ee.target.value),Qe=i.setYear(i.startOfMonth(xe),We);V(Qe)},[i,V]),{className:it,style:be}=R.useMemo(()=>({className:[l[Re.Root],t.className].filter(Boolean).join(" "),style:{...v==null?void 0:v[Re.Root],...t.style}}),[l,t.className,t.style,v]),le=sL(t),pe=R.useRef(null);jL(pe,!!t.animate,{classNames:l,months:F,focused:Q,dateLib:i});const ve={dayPickerProps:t,selected:J,select:ne,isSelected:Z,months:F,nextMonth:H,previousMonth:L,goToMonth:V,getModifiers:z,components:n,classNames:l,styles:v,labels:o,formatters:r};return R.createElement(Kx.Provider,{value:ve},R.createElement(n.Root,{rootRef:t.animate?pe:void 0,className:it,style:be,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...le},R.createElement(n.Months,{className:l[Re.Months],style:v==null?void 0:v[Re.Months]},!t.hideNavigation&&!d&&R.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Re.Nav],style:v==null?void 0:v[Re.Nav],"aria-label":ee(),onPreviousClick:Ae,onNextClick:Me,previousMonth:L,nextMonth:H}),F.map((xe,Ee)=>{const We=mL(xe.date,P,N,r,i),Qe=bL(P,N,r,i);return R.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[Re.Month],style:v==null?void 0:v[Re.Month],key:Ee,displayIndex:Ee,calendarMonth:xe},d==="around"&&!t.hideNavigation&&Ee===0&&R.createElement(n.PreviousMonthButton,{type:"button",className:l[Re.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":oe(L),onClick:Ae,"data-animated-button":t.animate?"true":void 0},R.createElement(n.Chevron,{disabled:L?void 0:!0,className:l[Re.Chevron],orientation:t.dir==="rtl"?"right":"left"})),R.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[Re.MonthCaption],style:v==null?void 0:v[Re.MonthCaption],calendarMonth:xe,displayIndex:Ee},c!=null&&c.startsWith("dropdown")?R.createElement(n.DropdownNav,{className:l[Re.Dropdowns],style:v==null?void 0:v[Re.Dropdowns]},c==="dropdown"||c==="dropdown-months"?R.createElement(n.MonthsDropdown,{className:l[Re.MonthsDropdown],"aria-label":K(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:Le(xe.date),options:We,style:v==null?void 0:v[Re.Dropdown],value:i.getMonth(xe.date)}):R.createElement("span",null,M(xe.date,i)),c==="dropdown"||c==="dropdown-years"?R.createElement(n.YearsDropdown,{className:l[Re.YearsDropdown],"aria-label":me(i.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:Ue(xe.date),options:Qe,style:v==null?void 0:v[Re.Dropdown],value:i.getYear(xe.date)}):R.createElement("span",null,I(xe.date,i)),R.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},k(xe.date,i.options,i))):R.createElement(n.CaptionLabel,{className:l[Re.CaptionLabel],role:"status","aria-live":"polite"},k(xe.date,i.options,i))),d==="around"&&!t.hideNavigation&&Ee===f-1&&R.createElement(n.NextMonthButton,{type:"button",className:l[Re.NextMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":ce(H),onClick:Me,"data-animated-button":t.animate?"true":void 0},R.createElement(n.Chevron,{disabled:H?void 0:!0,className:l[Re.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ee===f-1&&d==="after"&&!t.hideNavigation&&R.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[Re.Nav],style:v==null?void 0:v[Re.Nav],"aria-label":ee(),onPreviousClick:Ae,onNextClick:Me,previousMonth:L,nextMonth:H}),R.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":B(xe.date,i.options,i)||void 0,className:l[Re.MonthGrid],style:v==null?void 0:v[Re.MonthGrid]},!t.hideWeekdays&&R.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[Re.Weekdays],style:v==null?void 0:v[Re.Weekdays]},O&&R.createElement(n.WeekNumberHeader,{"aria-label":we(i.options),className:l[Re.WeekNumberHeader],style:v==null?void 0:v[Re.WeekNumberHeader],scope:"col"},A()),ge.map((bt,sn)=>R.createElement(n.Weekday,{"aria-label":Ce(bt,i.options,i),className:l[Re.Weekday],key:sn,style:v==null?void 0:v[Re.Weekday],scope:"col"},$(bt,i.options,i)))),R.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[Re.Weeks],style:v==null?void 0:v[Re.Weeks]},xe.weeks.map((bt,sn)=>R.createElement(n.Week,{className:l[Re.Week],key:bt.weekNumber,style:v==null?void 0:v[Re.Week],week:bt},O&&R.createElement(n.WeekNumber,{week:bt,style:v==null?void 0:v[Re.WeekNumber],"aria-label":ae(bt.weekNumber,{locale:a}),className:l[Re.WeekNumber],scope:"row",role:"rowheader"},D(bt.weekNumber,i)),bt.days.map(Ot=>{const{date:an}=Ot,Je=z(Ot);if(Je[Mt.focused]=!Je.hidden&&!!(Q!=null&&Q.isEqualTo(Ot)),Je[Kn.selected]=(Z==null?void 0:Z(an))||Je.selected,cp(J)){const{from:zn,to:gr}=J;Je[Kn.range_start]=!!(zn&&gr&&i.isSameDay(an,zn)),Je[Kn.range_end]=!!(zn&&gr&&i.isSameDay(an,gr)),Je[Kn.range_middle]=Pr(J,an,!0,i)}const xt=gL(Je,v,t.modifiersStyles),zt=RB(Je,l,t.modifiersClassNames),Kr=!$e&&!Je.hidden?Y(an,Je,i.options,i):void 0;return R.createElement(n.Day,{key:`${i.format(an,"yyyy-MM-dd")}_${i.format(Ot.displayMonth,"yyyy-MM")}`,day:Ot,modifiers:Je,className:zt.join(" "),style:xt,role:"gridcell","aria-selected":Je.selected||void 0,"aria-label":Kr,"data-day":i.format(an,"yyyy-MM-dd"),"data-month":Ot.outside?i.format(an,"yyyy-MM"):void 0,"data-selected":Je.selected||void 0,"data-disabled":Je.disabled||void 0,"data-hidden":Je.hidden||void 0,"data-outside":Ot.outside||void 0,"data-focused":Je.focused||void 0,"data-today":Je.today||void 0},!Je.hidden&&$e?R.createElement(n.DayButton,{className:l[Re.DayButton],style:v==null?void 0:v[Re.DayButton],type:"button",day:Ot,modifiers:Je,disabled:Je.disabled||void 0,tabIndex:ue(Ot)?0:-1,"aria-label":X(an,Je,i.options,i),onClick:ze(Ot,Je),onBlur:Fe(Ot,Je),onFocus:Xe(Ot,Je),onKeyDown:Be(Ot,Je),onMouseEnter:fe(Ot,Je),onMouseLeave:Oe(Ot,Je)},E(an,i.options,i)):!Je.hidden&&E(Ot.date,i.options,i))}))))))})),t.footer&&R.createElement(n.Footer,{className:l[Re.Footer],style:v==null?void 0:v[Re.Footer],role:"status","aria-live":"polite"},t.footer)))}const t8=({color:e})=>g.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M5.5 9.96346L1.82547 6.28893C1.39151 5.85497 1.39151 5.14487 1.82547 4.71091L5.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),n8=({color:e})=>g.jsx("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M1.5 9.96346L5.17453 6.28893C5.60849 5.85498 5.60849 5.14487 5.17453 4.71091L1.5 1.03638",stroke:e,"stroke-width":"1.2","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),o1=({color:e})=>g.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M9 0.595703L5.50126 4.09444C5.08807 4.50763 4.41193 4.50763 3.99874 4.09444L0.5 0.595703",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),r8=({color:e})=>g.jsx("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M9 4.4043L5.50126 0.90556C5.08807 0.492365 4.41193 0.492365 3.99874 0.90556L0.5 4.4043",stroke:e,"stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})}),o8=G(Fl)(({theme:e})=>({width:"100%!important","& .MuiFormHelperText-root":{margin:0},"& .MuiInputBase-root.MuiOutlinedInput-root.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.brandColor.red},"& .MuiInputLabel-root.Mui-error":{color:e.palette.brandColor.red},"& .MuiFilledInput-root":{borderRadius:"0.8rem"},"& .MuiOutlinedInput-root":{fontSize:"1.1rem",color:e.palette.primary.notifyTextColor,borderRadius:"0.8rem",backgroundColor:`${e.palette.primary.notifyBackground}`,padding:"0.3rem","& fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&:hover fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`},"&.Mui-focused fieldset":{borderColor:`${e.palette.primary.notifyBorderColor}`,borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:`${e.palette.primary.notifyBorderColor}`}},"& .MuiInputBase-input":{color:e.palette.primary.notifyActiveText,fontSize:"1.1rem",height:"2.6rem",padding:"0.3rem 1rem"},"& .MuiInputBase-input.Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,cursor:"not-allowed","-webkit-text-fill-color":`${e.palette.primary.notifyTextColor} !important`,opacity:1},"& .Mui-disabled":{color:`${e.palette.primary.notifyTextColor} !important`,overflow:"hidden",opacity:1},"& .Mui-disabled:before":{border:"none !important"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"},"& .MuiInputLabel-root":{paddingLeft:"0.5rem",backgroundColor:`${e.palette.primary.notifyBackground}!important`,color:e.palette.primary.notifyTextColor,fontSize:"1.1rem",top:"1.1rem",left:"1rem",transform:"none","&.Mui-focused":{color:e.palette.primary.notifyTextColor}},"& .MuiInputLabel-shrink":{top:"0",backgroundColor:`${e.palette.primary.notifyBackground}!important`,padding:"0 0.4rem",transform:"translateY(-50%) translateX(0rem)"},"& .MuiFormHelperText-root.Mui-error":{color:e.palette.brandColor.red,paddingLeft:"0.8rem",paddingTop:"0.2rem",fontSize:"0.9rem"},"& .MuiInputBase-input::placeholder":{color:e.palette.primary.notifyTextColor,opacity:1},"& .MuiFormLabel-asterisk":{color:e.palette.brandColor.red},"& input:-webkit-autofill":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`,caretColor:e.palette.primary.notifyActiveText,transition:"background-color 9999s ease-in-out 0s !important"},"& input:-webkit-autofill:hover ":{WebkitBoxShadow:"0 0 0 10rem transparent inset !important",WebkitTextFillColor:`${e.palette.primary.notifyActiveText}!important`}})),xc=({showBorder:e=!0,...t})=>g.jsx(Fn,{children:g.jsx(o8,{variant:"outlined",inputProps:{style:{cursor:t!=null&&t.disabled?"not-allowed":"pointer"}},sx:{cursor:t!=null&&t.disabled?"not-allowed":"pointer",opacity:t!=null&&t.disabled?.6:1,...!e&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}},...t.styles},...t})}),s8=["January","February","March","April","May","June","July","August","September","October","November","December"],i8=Array.from({length:36},(e,t)=>2e3+t),a8=({label:e,mode:t="single",value:n,onChange:r,disabled:o,readOnly:i,formatString:a,error:l,errorText:c,openCalendar:u,inputProps:d,minDate:f=new Date(new Date().getFullYear()-10,0,1),maxDate:p=new Date(new Date().getFullYear()+10,11,31),...h})=>{const y=It(),m=R.useRef(null),[b,x]=R.useState(null),[w,C]=R.useState(t==="range"&&(n!=null&&n.from)?n.from:n||new Date),[O,v]=R.useState("calendar"),k=!!b,E=k?"date-picker-popover":void 0,M=N=>x(N.currentTarget),D=()=>{x(null),v("calendar")},A=N=>{C(new Date(w.getFullYear(),N)),v("calendar")},$=N=>{C(new Date(N,w.getMonth())),v("month")},I=N=>{if(!N){D();return}t==="range"?r==null||r(N):(r==null||r(N),D())},W=({orientation:N,className:L,disabled:H})=>g.jsx(ye,{className:L,sx:{opacity:H?.5:1,pointerEvents:H?"none":"auto"},children:{left:g.jsx(t8,{color:y.palette.primary.notifyIconColor}),right:g.jsx(n8,{color:y.palette.primary.notifyIconColor}),down:g.jsx(o1,{color:y.palette.primary.notifyIconColor}),up:g.jsx(r8,{color:y.palette.primary.notifyIconColor})}[N]}),j=N=>{var ne;const{options:L,value:H}=N??{},V=(L==null?void 0:L.length)!==12,z=(ne=L==null?void 0:L.find(J=>(J==null?void 0:J.value)===H))==null?void 0:ne.label,Z=()=>{v(t==="range"?"month":"year")};return g.jsxs(ft,{direction:"row",sx:{cursor:"pointer",justifyContent:"center",alignItems:"center",gap:"0.5rem"},onClick:Z,children:[g.jsx(nt,{sx:{color:y.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},children:z}),V&&g.jsx(o1,{color:y.palette.primary.notifyIconColor})]})},F=()=>{const N=w.getFullYear(),L=w.getMonth();if(O==="month")return g.jsx(ye,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:s8.map((H,V)=>{const z=new Date(N,V,1),Z=f&&z<new Date(f.getFullYear(),f.getMonth(),1);return g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:Z?"not-allowed":"pointer",opacity:Z?.5:1},onClick:()=>!Z&&A(V),children:g.jsx(ye,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:V===L&&!Z&&y.palette.brandColor.orange,color:V===L&&!Z?y.palette.brandColor.white:y.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:H})},H)})});if(O==="year")return g.jsx(ye,{sx:{maxHeight:"30rem",overflowY:"auto",pr:1},children:g.jsx(ye,{sx:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:1,justifyContent:"center",mb:2,height:"30rem",width:"30rem"},children:i8.map(H=>{const V=f&&H<f.getFullYear();return g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:V?"not-allowed":"pointer",opacity:V?.5:1},onClick:()=>!V&&$(H),children:g.jsx(ye,{sx:{p:"0.8rem 1.2rem",borderRadius:"2rem",bgcolor:H===N&&!V&&y.palette.brandColor.orange,color:H===N&&!V?y.palette.brandColor.white:y.palette.primary.notifyActiveText,fontSize:"1.1rem"},children:H})},H)})})})},P=n?t==="range"&&(n!=null&&n.from)&&(n!=null&&n.to)?`${da(n.from,a)} - ${da(n.to,a)}`:t==="range"&&(n!=null&&n.from)?`${da(n.from,a)} - `:da(n,a):"";return g.jsxs(ye,{ref:m,children:[!u&&g.jsx(xc,{label:e,value:P,onClick:o?void 0:M,disabled:o,InputLabelProps:{shrink:!!n},error:l,helperText:c,inputProps:{readOnly:!0,style:{cursor:o?"not-allowed":"pointer"}},InputProps:{endAdornment:g.jsx(wi,{position:"start",children:g.jsx(hn,{url:Ke.Calendar})})},sx:{cursor:o?"not-allowed":"pointer",opacity:o?.6:1,"& .MuiInputBase-root":{cursor:o?"not-allowed":"pointer"},...d&&!(d!=null&&d.showBorder)&&{"& .MuiOutlinedInput-root":{borderRadius:0,"& fieldset":{borderColor:"transparent"},"&:hover fieldset":{borderColor:"transparent"},"&.Mui-focused fieldset":{borderColor:"transparent",borderWidth:"0.1rem"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"}}}}}),g.jsx(ye,{component:u?ye:Si,id:E,open:u?!0:k,anchorEl:b,onClose:u?void 0:D,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:u?{width:"max-content",border:`0.1rem solid ${y.palette.primary.notifyBorderColor}`,borderRadius:"0.8rem"}:{"& .MuiPopover-paper":{backgroundColor:"transparent",borderRadius:"1rem"}},children:g.jsxs(ye,{sx:{backgroundColor:y.palette.primary.notifyBackground,p:"2rem 1.5rem",boxShadow:"none",borderRadius:"1rem","& .rdp-selected .rdp-day_button":{border:"none",backgroundColor:y.palette.brandColor.orange,color:y.palette.brandColor.white},"& .rdp-weekday":{color:y.palette.primary.notifyTextColor,fontSize:"1.2rem",textTransform:"uppercase"},"& .rdp-month_grid ":{my:"1.5rem"},"& .rdp-month_caption":{pl:"1rem"},"& .rdp-range_start":{backgroundImage:`linear-gradient(90deg, transparent 50%, ${y.palette.brandColor.lightOrange} 50%)`},"& .rdp-range_middle":{backgroundColor:y.palette.brandColor.lightOrange,"& .rdp-day_button":{backgroundColor:"transparent"}},"& .rdp-range_end":{backgroundImage:`linear-gradient(90deg, ${y.palette.brandColor.lightOrange} 50%, transparent 50%)`},"& .rdp-caption_label":{color:y.palette.primary.notifyActiveText,fontSize:"1.7rem",fontWeight:"500"},"& .rdp-day_button:disabled":{color:y.palette.primary.notifyTextColor}},children:[F(),O==="calendar"&&g.jsx(e8,{mode:t,disabled:u?!0:{before:f,after:p},selected:n,onSelect:u?void 0:I,month:w,onMonthChange:C,startMonth:f,endMonth:p,captionLayout:u?"label":"dropdown",hideNavigation:!!u,...h,styles:{day:{fontSize:"1.5rem",fontWeight:"300",border:"none",boxShadow:"none",outline:"none",color:y.palette.primary.notifyActiveText}},modifiersStyles:{today:{fontWeight:"bold",color:y.palette.brandColor.orange},disabled:{color:y.palette.primary.notifyBorderColor,opacity:.5,backgroundColor:"transparent",cursor:"not-allowed"}},components:{Chevron:W,Dropdown:j}})]})})]})};G(vx)(({theme:e})=>({"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyTextColor}!important`,fontSize:"1.1rem",backgroundColor:`${e.palette.primary.notifyBackground}`,zIndex:1,padding:"0 0.25rem",transform:"translate(14px, 12px) scale(1)",transition:"all 0.2s ease"},"& .MuiInputLabel-shrink":{fontSize:"1.1rem !important",transform:"translate(14px, -6px) scale(1)"},"& .Mui-focused":{color:`${e.palette.primary.notifyTextColor} !important`},"& .MuiPickersOutlinedInput-root":{backgroundColor:`${e.palette.primary.notifyBackground}`,borderRadius:"0.6rem",color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem",padding:"0.6rem 1.2rem",minHeight:"3.8rem",height:"3.8rem",boxSizing:"border-box"},"& .MuiOutlinedInput-notchedOutline":{border:"unset"},"& .MuiInputLabel-input":{color:`${e.palette.primary.notifyTextColor}`,fontSize:"1.1rem"},"& .MuiPickersOutlinedInput-notchedOutline":{border:"none!important"},"& .MuiPickersSectionList-root":{padding:"0!important"}}));const l8=e=>g.jsx(Fn,{children:g.jsx(a8,{...e})}),c8=({iconUrl:e,...t})=>{const[n,r]=R.useState(!1),o=It();return g.jsxs(ye,{sx:{display:"flex",alignItems:"center",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",backgroundColor:o.palette.primary.notifyBackground,height:"3.2rem",paddingLeft:"0.5rem",overflow:"hidden"},children:[e&&g.jsx(ye,{component:hn,url:e,sx:{width:"1.3rem",height:"1.3rem",margin:"0 0.5rem 0.2rem 0.5rem",userSelect:"none",pointerEvents:"none",objectFit:"contain"},draggable:!1}),g.jsx(Gi.input,{type:"text",onFocus:()=>r(!0),onBlur:()=>r(!1),initial:{width:"10rem"},animate:{width:n?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3.007rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:"none",backgroundColor:"transparent",padding:0,color:o.palette.primary.notifyTextColor,flex:1,transition:"height 0.1s ease"},...t})]})};function s1({...e}){return g.jsx(Fn,{children:g.jsx(c8,{...e})})}const wc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},u8=e=>{const t=new Date,n=new Date(e);let r=t-n;r<0&&(r=0);const o=Math.floor(r/1e3),i=Math.floor(o/60);return o<60?`${o} sec ago`:i<60?`${i} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},Cc=e=>e.sort((n,r)=>{let o=new Date(n.createdAt),i=new Date(r.createdAt);return o===i?0:o>i?-1:1}).sort((n,r)=>n.isRead===r.isRead?0:r.isRead?-1:1),i1=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},d8=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},f8=(e,t,n)=>e.filter(o=>t.some(i=>{var a,l,c;return(c=(a=o[i])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),p8=(e,t,n)=>e.sort((o,i)=>n==="asc"?o[t].toLowerCase().localeCompare(i[t].toLowerCase()):i[t].toLowerCase().localeCompare(o[t].toLowerCase())),pp=(e,t,n)=>e.slice((t-1)*n,t*n),h8=e=>{const t=e.reduce((r,o)=>{const i=new Date(o==null?void 0:o.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(i);return r[a]||(r[a]=[]),r[a].push(o),r},{});return Object.fromEntries(Object.entries(t).sort(([r],[o])=>new Date(o)-new Date(r)))},m8=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e,g8=(e,t)=>{var r;if(!Array.isArray(e))return[];const n=(r=t==null?void 0:t.toLowerCase)==null?void 0:r.call(t).trim();return n?e.filter(o=>{var i,a;return(a=(i=o==null?void 0:o.label)==null?void 0:i.toLowerCase)==null?void 0:a.call(i).includes(n)}):e},qe={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},Gr={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",NRF:"No Records found"},ga=R.createContext(null),ya=R.createContext(null);function a1({children:e}){const[t,n]=R.useReducer(y8,b8);return g.jsx(ga.Provider,{value:t,children:g.jsx(ya.Provider,{value:n,children:g.jsx(Fn,{children:e})})})}function y8(e,t){switch(t.type){case qe.SET_GRID_DATA:return{...e,...t.payload};case qe.HAS_SETTING_CHANGE:return{...e,...t.payload};case qe.TRIGGER_API:return{...e,...t.payload};default:throw new Error(`${Gr.UNHANDLED}: ${t}`)}}const b8={visibleGridColumns:[],hasChange:!1,triggerApi:!1};a1.propTypes={children:s.node.isRequired};const v8=({options:e,isDraggable:t})=>{const n=R.useRef(null),[r,o]=R.useState(!1),[i,a]=R.useState(null),[l,c]=R.useState(e),[u,d]=R.useState(!1),f=t?R.useContext(ya):null,{hasChange:p,visibleGridColumns:h}=t?R.useContext(ga):{hasChange:!1,visibleGridColumns:[]};R.useEffect(()=>{c(e.sort((w,C)=>w.sequenceId-C.sequenceId))},[e]);const y=w=>{t&&a(w)},m=w=>{t&&w.preventDefault()},b=w=>{if(!t||i===null||i===w)return;const C=[...l],[O]=C.splice(i,1);C.splice(w,0,O);const v=l.slice().sort((D,A)=>D.sequenceId-A.sequenceId).map(D=>D.sequenceId),k=C.map((D,A)=>({...D,sequenceId:v[A]??D.sequenceId}));c(k);const E=new Map(k.map(D=>[D.id,D.sequenceId])),M=h.map(D=>({...D,sequenceId:E.get(D.id)??D.sequenceId})).sort((D,A)=>D.sequenceId-A.sequenceId);f==null||f({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:M}}),f==null||f({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),a(null)},x=()=>{t&&p&&(f==null||f({type:qe.TRIGGER_API,payload:{triggerApi:!0}}))};return R.useEffect(()=>{if(n.current){const w=n.current.getBoundingClientRect(),C=window.innerHeight-w.bottom;d(C<200)}},[r]),{hasChange:p,closeDropdown:x,handleDragStart:y,handleDragOver:m,handleDrop:b}},Sc=({isDraggable:e=!1,showSearch:t=!1,options:n=[],value:r,isMulti:o=!1,selectAll:i=!1,selectOnClose:a=!1,...l})=>{var W,j,F;const[c,u]=R.useState(!1),[d,f]=R.useState(null),[p,h]=R.useState(""),[y,m]=R.useState([]),[b,x]=R.useState("bottom-start"),w=R.useRef(null),C=R.useRef(null),O=R.useRef(null),v=R.useRef(!1),{closeDropdown:k,hasChange:E,handleDragStart:M,handleDragOver:D,handleDrop:A}=v8({options:n,isDraggable:e});R.useEffect(()=>{m(n)},[n]);const $=(P,N)=>{var H,V,z;if(h(""),!o){(H=l==null?void 0:l.onChange)==null||H.call(l,P),u(!1);return}let L=[...r];if(!P)L=n.every(ne=>r.some(J=>J.id===ne.id))?[]:n;else if(N){const Z=L.findIndex(se=>se.id===N.id),ne=((V=L[Z])==null?void 0:V.children)||[],J=ne.some(se=>se.id===P.id);if(Z>-1){const se=J?ne.filter(Q=>Q.id!==P.id):[...ne,P];se.length?L[Z]={...N,children:se}:L.splice(Z,1)}else L.push({...N,children:[P]})}else L=L.some(Z=>Z.id===P.id)?L.filter(Z=>Z.id!==P.id):[...L,P];f(L),(z=l==null?void 0:l.onChange)==null||z.call(l,L)};R.useEffect(()=>{const P=g8(n,p);m(P)},[p,n]);const I=P=>{h(P.target.value)};return R.useEffect(()=>{const P=N=>{var L,H,V;O.current&&!O.current.contains(N.target)&&!((L=w.current)!=null&&L.contains(N.target))&&!((H=C.current)!=null&&H.contains(N.target))&&(u(!1),h(""),k(),a&&((V=l==null?void 0:l.onChange)==null||V.call(l,d,"closed")),v.current=!0,setTimeout(()=>{v.current=!1},150))};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[c,E,d]),g.jsxs(g.Fragment,{children:[g.jsx(ye,{ref:C,sx:{position:"relative",display:"inline-block",width:"100%"},children:g.jsx(xc,{inputProps:{readOnly:!0,style:{cursor:l!=null&&l.disabled?"not-allowed":"pointer"}},InputLabelProps:{shrink:(r==null?void 0:r.length)&&!(l!=null&&l.placeholder)},InputProps:{endAdornment:g.jsx(wi,{position:"start",children:g.jsx(ft,{direction:"row",alignItems:"center",gap:"0.5rem",children:g.jsx(ye,{component:"img",src:c?Ke.ArrowSelectDown:Ke.ArrowSelectUp})})}),startAdornment:((W=l==null?void 0:l.styles)==null?void 0:W.icon)&&g.jsx(wi,{position:"start",sx:{pl:1},children:g.jsx(hn,{url:(j=l==null?void 0:l.styles)==null?void 0:j.icon})})},sx:{opacity:l!=null&&l.disabled?.6:1,"& .MuiOutlinedInput-root":{borderBottomLeftRadius:c&&b.startsWith("bottom")?0:"0.7rem",borderBottomRightRadius:c&&b.startsWith("bottom")?0:"0.7rem",borderTopLeftRadius:c&&b.startsWith("top")?0:"0.7rem",borderTopRightRadius:c&&b.startsWith("top")?0:"0.7rem"},"& .MuiInputBase-input":{color:P=>`${l!=null&&l.placeholder?P.palette.primary.notifyTextColor:P.palette.primary.notifyActiveText}!important`}},onClick:P=>{var N;P.preventDefault(),k(),a&&((N=l==null?void 0:l.onChange)==null||N.call(l,d,"closed")),!v.current&&u(L=>!L)},...l!=null&&l.placeholder?{}:{value:Array.isArray(r)?Array.isArray(n)&&r.length===n.length?"All Selected":r.map(P=>P==null?void 0:P.label).filter(Boolean).join(", "):(r==null?void 0:r.label)||r||""},...l})}),g.jsx(rs,{open:c,anchorEl:C.current,placement:"bottom-start",style:{zIndex:99999},ref:O,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"updatePlacement",enabled:!0,phase:"afterWrite",fn({state:P}){x(P.placement)}}],children:g.jsxs(ye,{sx:{background:P=>P.palette.primary.appBackground,border:P=>`1px solid ${P.palette.primary.notifyBorderColor}`,borderTop:"none",borderRadius:b.startsWith("bottom")?"0 0 0.7rem 0.7rem":"0.7rem 0.7rem 0 0",width:((F=C.current)==null?void 0:F.offsetWidth)||"auto",maxHeight:"20rem",overflowY:"auto"},children:[t&&g.jsx(xc,{type:"text",placeholder:"Search",value:p,variant:"standard",autoFocus:!0,size:"small",InputProps:{disableUnderline:!0},onChange:I,sx:{position:"sticky",top:0,zIndex:1,backgroundColor:P=>P.palette.primary.appBackground,fontSize:"1.1rem",borderBottom:P=>`1px solid ${P.palette.primary.notifyBorderColor}`,"& .MuiInputBase-input":{padding:"0.3rem 1.3rem!important"}}}),(y==null?void 0:y.length)>0?g.jsxs(g.Fragment,{children:[o&&i&&g.jsx(Fr,{sx:{padding:"0.8rem 1.2rem",cursor:"pointer"},onClick:P=>{P.stopPropagation(),$()},children:g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",children:[g.jsx(sc,{sx:{p:0},checked:(n==null?void 0:n.length)>0&&(r==null?void 0:r.length)===(n==null?void 0:n.length)}),g.jsx(nt,{component:"h3",sx:{color:P=>P.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"Select All"})]})}),y.map((P,N)=>{var L,H,V;return g.jsxs(R.Fragment,{children:[g.jsx(Fr,{sx:{opacity:P!=null&&P.isMandatory||P!=null&&P.disabled?.5:1,cursor:e?"grab":"pointer",pointerEvents:P!=null&&P.isMandatory||P!=null&&P.disabled?"none":"auto",padding:"0.8rem 1.2rem",borderTop:N!==0||i?z=>`0.1rem solid ${z.palette.primary.notifyBorderColor}`:"none"},draggable:!(P!=null&&P.isMandatory)&&e,onDragStart:()=>M(N),onDragOver:D,onDrop:()=>A(N),onClick:z=>{var Z;z.stopPropagation(),(!((Z=P==null?void 0:P.children)!=null&&Z.length)||P!=null&&P.showCheckbox)&&$(P)},children:g.jsxs(ft,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:"1rem",width:"100%",children:[g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",sx:{minWidth:0,flex:1},children:[o&&(!((L=P==null?void 0:P.children)!=null&&L.length)||(P==null?void 0:P.showCheckbox))&&g.jsx(sc,{sx:{p:0},checked:r==null?void 0:r.some(z=>z.id===P.id)}),g.jsx(nt,{component:"h3",noWrap:!0,sx:{color:z=>{var Z;return(Z=P==null?void 0:P.children)!=null&&Z.length&&!(P!=null&&P.showCheckbox)?z.palette.primary.notifyActiveText:z.palette.primary.notifyTextColor},fontWeight:(H=P==null?void 0:P.children)!=null&&H.length&&!(P!=null&&P.showCheckbox)?"500":"300",fontSize:"1.1rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:P.label})]}),!(P!=null&&P.isMandatory)&&e&&g.jsx(ye,{component:"img",src:Ke.Drag,draggable:!1})]})}),(V=P.children)==null?void 0:V.map((z,Z)=>g.jsx(Fr,{sx:{cursor:"pointer",opacity:z!=null&&z.isMandatory||z!=null&&z.disabled?.5:1,pointerEvents:z!=null&&z.isMandatory||z!=null&&z.disabled?"none":"auto",padding:"0.8rem 1.2rem",pl:"1.5rem",borderTop:ne=>`0.1rem solid ${ne.palette.primary.notifyBorderColor}`},draggable:!(z!=null&&z.isMandatory)&&e,onDragStart:()=>M(N,Z),onDragOver:D,onDrop:()=>A(N,Z),onClick:ne=>{ne.stopPropagation(),$(z,P)},children:g.jsxs(ft,{direction:"row",alignItems:"center",gap:"1rem",children:[o&&(P==null?void 0:P.showChildCheckbox)&&g.jsx(sc,{sx:{p:0},checked:r.some(ne=>{var J;return(J=ne.children)==null?void 0:J.some(se=>se.id===z.id)})}),g.jsx(nt,{component:"h4",sx:{color:ne=>ne.palette.primary.notifyTextColor,fontSize:"1.05rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:z.label})]})},`${N}-${Z}`))]},N)})]}):g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0.1rem 1rem",height:"3rem"},children:g.jsx(nt,{component:"h3",sx:{color:P=>P.palette.primary.notifyTextColor,fontSize:"1.1rem"},children:"No options"})})]})})]})};function l1({...e}){return g.jsx(Fn,{children:g.jsx(Sc,{...e})})}var hp={},mp={};const x8=yr(sk);var c1;function w8(){return c1||(c1=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=x8}(mp)),mp}var C8=Eu;Object.defineProperty(hp,"__esModule",{value:!0});var u1=hp.default=void 0,S8=C8(w8()),T8=g;u1=hp.default=(0,S8.default)((0,T8.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const O8=({progress:e=0,status:t})=>{const r=Math.max(0,Math.min(e,100))/2-4,o={SUCCESS:"#2A9D8F",QUEUED:"#E9C46A",FAILED:"#E76F51"},i={SUCCESS:"rgba(42, 157, 143, 0.3)",QUEUED:"rgba(233, 196, 106, 0.3)",FAILED:"rgba(231, 111, 81, 0.3)"};return g.jsxs(ye,{sx:{height:"0.2rem",width:"100%",position:"relative",overflow:"hidden",backgroundColor:"transparent"},children:[g.jsx(ye,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",transform:"translateX(-99%)",backgroundColor:o[t],borderTopLeftRadius:"1rem",borderBottomLeftRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}}),g.jsx(ye,{sx:{position:"absolute",bottom:0,left:"50%",width:`${r}%`,height:"100%",backgroundColor:o[t],borderTopRightRadius:"1rem",borderBottomRightRadius:"1rem",filter:`drop-shadow(0px 4px 10px ${i[t]})`,transition:"width 1s ease-in-out"}})]})},gp={showToast:()=>{throw new Error("ToastProvider is not mounted")}},k8={success:e=>gp.showToast(e,"SUCCESS"),error:e=>gp.showToast(e,"FAILED")},E8=G(Si)(({theme:e})=>({"& .MuiPopover-paper":{backgroundColor:"transparent!important",right:"0!important",boxShadow:"none"},"& .MuiPaper-root":{pointerEvents:"auto",maxHeight:"40vh",boxShadow:"none"}})),P8=({message:e,status:t})=>{const[n,r]=R.useState(0),[o,i]=R.useState(!0),[a,l]=R.useState("entering"),[c,u]=R.useState(!0);R.useEffect(()=>{let p=setInterval(()=>{r(h=>o?h>=98?(i(!1),99):h+2:h)},100);return()=>clearInterval(p)},[o]),R.useEffect(()=>{let p=null,h=null;return a==="entering"&&(p=setTimeout(()=>{l("visible"),h=setTimeout(()=>{l("exiting")},8e3)},100)),()=>{clearTimeout(p),clearTimeout(h)}},[]),R.useEffect(()=>{const p=h=>{var y;(y=h.detail)!=null&&y.logout&&u(!1)};return window.addEventListener(Bl.LOGOUT,p),()=>{window.removeEventListener(Bl.LOGOUT,p)}},[]);const d=()=>{setTimeout(()=>{l("exiting")},200)},f={entering:"translateX(100%)",visible:"translateX(-100%)",exiting:"translateX(100%)"};return g.jsx(E8,{anchorPosition:{top:118,right:0},id:"scai-toast-popover",open:c,anchorReference:"anchorPosition",disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,hideBackdrop:!0,sx:{padding:"0.5rem",pointerEvents:"none",overflow:"hidden"},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:g.jsx(ye,{position:"fixed",sx:{transform:f[a],opacity:a==="exiting"?0:1,transition:"transform 0.6s ease, opacity 1s ease",mb:0},children:g.jsxs(Jo,{elevation:6,sx:{display:"flex",justifyContent:"space-between",filter:"drop-shadow(rgba(0, 0, 0, 0.16) 0px 1px 4px)",width:"25rem",minHeight:"4rem",borderRadius:"1rem",cursor:"default",position:"relative",border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`,backgroundColor:p=>p.palette.primary.notifyBackground,color:p=>p.palette.primary.notifyActiveText,"&:hover .close-icon":{opacity:1,color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>`${p.palette.primary.notifyBackground}!important`,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}!important`}},children:[g.jsx(Ir,{size:"small",onClick:p=>{p.stopPropagation(),d()},className:"close-icon",sx:{position:"absolute",top:"-0.7rem",left:"-0.7rem",padding:"2px",opacity:0,transition:"opacity 0.3s ease",color:p=>p.palette.primary.notifyActiveText,backgroundColor:p=>p.palette.primary.notifyBackground,border:p=>`0.1rem solid ${p.palette.primary.notifyBorderColor}`},children:g.jsx(u1,{fontSize:"small"})}),g.jsxs(ft,{sx:{width:"100%"},direction:"column",children:[g.jsx(nt,{sx:{flexGrow:1,padding:"1.2rem 1rem 1rem 1rem",fontSize:"1.1rem",whiteSpace:"normal"},children:e}),g.jsx(O8,{progress:n,status:t})]})]})})})},M8=({message:e,status:t})=>g.jsx(Fn,{children:g.jsx(P8,{message:e,status:t})}),R8=({children:e})=>{const[t,n]=R.useState(null),r=R.useCallback((o,i)=>{n({message:o,status:i,key:Date.now()})},[]);return gp.showToast=r,g.jsxs(g.Fragment,{children:[e,t&&g.jsx(M8,{message:t.message,status:t.status},t.key)]})},D8=G(ye)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),I8=G(ye)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),d1=G(Hn)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),A8=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:r})=>{const[o,i]=R.useState(0),[a,l]=R.useState(0),c=R.useRef(null),u=R.useRef(null);return R.useEffect(()=>{if(c.current&&u.current){const d=e?u.current:c.current;i(d.offsetWidth),l(d.offsetLeft)}},[e]),g.jsx(ye,{sx:{display:"flex"},children:g.jsxs(D8,{children:[g.jsx(I8,{sx:{width:o,transform:`translateX(${a}px)`,height:"2.5rem"}}),g.jsx(d1,{ref:c,disableRipple:!0,sx:d=>({color:e?d.palette.brandColor.grey1:d.palette.primary.notifyActiveText}),onClick:()=>t(!1),children:n}),g.jsx(d1,{ref:u,disableRipple:!0,sx:d=>({color:e?d.palette.primary.notifyActiveText:d.palette.brandColor.grey1}),onClick:()=>t(!0),children:r})]})})};function f1({...e}){return g.jsx(Fn,{children:g.jsx(A8,{...e})})}const j8=vr`
317
317
  0% {background-position: 0 0,100% 0 ,100% 100%,0 100%}
318
318
  33% {background-position: 0 0,100% 0 ,100% 100%,0 100%; width:60px; height: 60px}
319
319
  66% {background-position: 100% 0,100% 100%,0 100%,0 0 ; width:60px; height: 60px}
@@ -323,5 +323,5 @@ const theme2 = createTheme({ palette: {
323
323
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[D1]=this[D1]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=wa(a);r[l]||(_V(o,a),r[l]=!0)}return te.isArray(t)?t.forEach(i):i(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),te.freezeMethods(gn);function Tp(e,t){const n=this||xa,r=t||n,o=gn.from(r.headers);let i=r.data;return te.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function I1(e){return!!(e&&e.__CANCEL__)}function Is(e,t,n){He.call(this,e??"canceled",He.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(Is,He,{__CANCEL__:!0});function A1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function FV(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function BV(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[i];a||(a=u),n[o]=c,r[o]=u;let f=i,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a<t)return;const h=d&&u-d;return h?Math.round(p*1e3/h):void 0}}function LV(e,t){let n=0,r=1e3/t,o,i;const a=(u,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?a(u,d):(o=u,i||(i=setTimeout(()=>{i=null,a(o)},r-f)))},()=>o&&a(o)]}const Rc=(e,t,n=3)=>{let r=0;const o=BV(50,250);return LV(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,c=a-r,u=o(c),d=a<=l;r=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},j1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},N1=e=>(...t)=>te.asap(()=>e(...t)),VV=en.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,en.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(en.origin),en.navigator&&/(msie|trident)/i.test(en.navigator.userAgent)):()=>!0,WV=en.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];te.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),te.isString(r)&&a.push("path="+r),te.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function UV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $1(e,t,n){let r=!zV(t);return e&&(r||n==!1)?UV(e,t):t}const _1=e=>e instanceof gn?{...e}:e;function So(e,t){t=t||{};const n={};function r(u,d,f,p){return te.isPlainObject(u)&&te.isPlainObject(d)?te.merge.call({caseless:p},u,d):te.isPlainObject(d)?te.merge({},d):te.isArray(d)?d.slice():d}function o(u,d,f,p){if(te.isUndefined(d)){if(!te.isUndefined(u))return r(void 0,u,f,p)}else return r(u,d,f,p)}function i(u,d){if(!te.isUndefined(d))return r(void 0,d)}function a(u,d){if(te.isUndefined(d)){if(!te.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function l(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,f)=>o(_1(u),_1(d),f,!0)};return te.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||o,p=f(e[d],t[d],d);te.isUndefined(p)&&f!==l||(n[d]=p)}),n}const F1=e=>{const t=So({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=gn.from(a),t.url=E1($1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(te.isFormData(n)){if(en.hasStandardBrowserEnv||en.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(en.hasStandardBrowserEnv&&(r&&te.isFunction(r)&&(r=r(t)),r||r!==!1&&VV(t.url))){const u=o&&i&&WV.read(i);u&&a.set(o,u)}return t},HV=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=F1(e);let i=o.data;const a=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,d,f,p,h,y;function m(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function x(){if(!b)return;const C=gn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),v={data:!l||l==="text"||l==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:C,config:e,request:b};A1(function(E){n(E),m()},function(E){r(E),m()},v),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(r(new He("Request aborted",He.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new He("Network Error",He.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||M1;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),r(new He(O,v.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,b)),b=null},i===void 0&&a.setContentType(null),"setRequestHeader"in b&&te.forEach(a.toJSON(),function(O,v){b.setRequestHeader(v,O)}),te.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),l&&l!=="json"&&(b.responseType=o.responseType),u&&([p,y]=Rc(u,!0),b.addEventListener("progress",p)),c&&b.upload&&([f,h]=Rc(c),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(d=C=>{b&&(r(!C||C.type?new Is(null,e,b):C),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=FV(o.url);if(w&&en.protocols.indexOf(w)===-1){r(new He("Unsupported protocol "+w+":",He.ERR_BAD_REQUEST,e));return}b.send(i||null)})},qV=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,l();const d=u instanceof Error?u:this.reason;r.abort(d instanceof He?d:new Is(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,i(new He(`timeout ${t} of ms exceeded`,He.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>te.asap(l),c}},YV=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},GV=async function*(e,t){for await(const n of KV(e))yield*YV(n,t)},KV=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},B1=(e,t,n,r)=>{const o=GV(e,t);let i=0,a,l=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await o.next();if(u){l(),c.close();return}let f=d.byteLength;if(n){let p=i+=f;n(p)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Dc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",L1=Dc&&typeof ReadableStream=="function",XV=Dc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),V1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ZV=L1&&V1(()=>{let e=!1;const t=new Request(en.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),W1=64*1024,Op=L1&&V1(()=>te.isReadableStream(new Response("").body)),Ic={stream:Op&&(e=>e.body)};Dc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ic[t]&&(Ic[t]=te.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new He(`Response type '${t}' is not supported`,He.ERR_NOT_SUPPORT,r)})})})(new Response);const JV=async e=>{if(e==null)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e))return(await new Request(en.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(te.isArrayBufferView(e)||te.isArrayBuffer(e))return e.byteLength;if(te.isURLSearchParams(e)&&(e=e+""),te.isString(e))return(await XV(e)).byteLength},QV=async(e,t)=>{const n=te.toFiniteNumber(e.getContentLength());return n??JV(t)},kp={http:xV,xhr:HV,fetch:Dc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:p}=F1(e);u=u?(u+"").toLowerCase():"text";let h=qV([o,i&&i.toAbortSignal()],a),y;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(c&&ZV&&n!=="get"&&n!=="head"&&(b=await QV(d,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(te.isFormData(r)&&(k=v.headers.get("content-type"))&&d.setContentType(k),v.body){const[E,M]=j1(b,Rc(N1(c)));r=B1(v.body,W1,E,M)}}te.isString(f)||(f=f?"include":"omit");const x="credentials"in Request.prototype;y=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?f:void 0});let w=await fetch(y);const C=Op&&(u==="stream"||u==="response");if(Op&&(l||C&&m)){const v={};["status","statusText","headers"].forEach(D=>{v[D]=w[D]});const k=te.toFiniteNumber(w.headers.get("content-length")),[E,M]=l&&j1(k,Rc(N1(l),!0))||[];w=new Response(B1(w.body,W1,E,()=>{M&&M(),m&&m()}),v)}u=u||"text";let O=await Ic[te.findKey(Ic,u)||"text"](w,e);return!C&&m&&m(),await new Promise((v,k)=>{A1(v,k,{data:O,headers:gn.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:y})})}catch(x){throw m&&m(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,e,y),{cause:x.cause||x}):He.from(x,x&&x.code,e,y)}})};te.forEach(kp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const z1=e=>`- ${e}`,e7=e=>te.isFunction(e)||e===null||e===!1,U1={getAdapter:e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!e7(n)&&(r=kp[(a=String(n)).toLowerCase()],r===void 0))throw new He(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
324
324
  `+i.map(z1).join(`
325
325
  `):" "+z1(i[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:kp};function Ep(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Is(null,e)}function H1(e){return Ep(e),e.headers=gn.from(e.headers),e.data=Tp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),U1.getAdapter(e.adapter||xa.adapter)(e).then(function(r){return Ep(e),r.data=Tp.call(e,e.transformResponse,r),r.headers=gn.from(r.headers),r},function(r){return I1(r)||(Ep(e),r&&r.response&&(r.response.data=Tp.call(e,e.transformResponse,r.response),r.response.headers=gn.from(r.response.headers))),Promise.reject(r)})}const q1="1.8.4",Ac={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ac[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Y1={};Ac.transitional=function(t,n,r){function o(i,a){return"[Axios v"+q1+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,l)=>{if(t===!1)throw new He(o(a," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!Y1[a]&&(Y1[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}},Ac.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function t7(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const l=e[i],c=l===void 0||a(l,i,e);if(c!==!0)throw new He("option "+i+" must be "+c,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+i,He.ERR_BAD_OPTION)}}const jc={assertOptions:t7,validators:Ac},mr=jc.validators;let To=class{constructor(t){this.defaults=t,this.interceptors={request:new P1,response:new P1}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
326
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=So(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&jc.assertOptions(r,{silentJSONParsing:mr.transitional(mr.boolean),forcedJSONParsing:mr.transitional(mr.boolean),clarifyTimeoutError:mr.transitional(mr.boolean)},!1),o!=null&&(te.isFunction(o)?n.paramsSerializer={serialize:o}:jc.assertOptions(o,{encode:mr.function,serialize:mr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jc.assertOptions(n,{baseUrl:mr.spelling("baseURL"),withXsrfToken:mr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&te.merge(i.common,i[n.method]);i&&te.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=gn.concat(a,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,p;if(!c){const y=[H1.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,d=Promise.resolve(n);f<p;)d=d.then(y[f++],y[f++]);return d}p=l.length;let h=n;for(f=0;f<p;){const y=l[f++],m=l[f++];try{h=y(h)}catch(b){m.call(this,b);break}}try{d=H1.call(this,h)}catch(y){return Promise.reject(y)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=So(this.defaults,t);const n=$1(t.baseURL,t.url,t.allowAbsoluteUrls);return E1(n,t.params,t.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(t){To.prototype[t]=function(n,r){return this.request(So(r||{},{method:t,url:n,data:(r||{}).data}))}}),te.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(So(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}To.prototype[t]=n(),To.prototype[t+"Form"]=n(!0)});let n7=class Mw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Is(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mw(function(o){t=o}),cancel:t}}};function r7(e){return function(n){return e.apply(null,n)}}function o7(e){return te.isObject(e)&&e.isAxiosError===!0}const Pp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pp).forEach(([e,t])=>{Pp[t]=e});function G1(e){const t=new To(e),n=p1(To.prototype.request,t);return te.extend(n,To.prototype,t,{allOwnKeys:!0}),te.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return G1(So(e,o))},n}const St=G1(xa);St.Axios=To,St.CanceledError=Is,St.CancelToken=n7,St.isCancel=I1,St.VERSION=q1,St.toFormData=Pc,St.AxiosError=He,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=r7,St.isAxiosError=o7,St.mergeConfig=So,St.AxiosHeaders=gn,St.formToJSON=e=>R1(te.isHTMLForm(e)?new FormData(e):e),St.getAdapter=U1.getAdapter,St.HttpStatusCode=Pp,St.default=St;const{Axios:KW,AxiosError:XW,CanceledError:ZW,isCancel:JW,CancelToken:QW,VERSION:ez,all:tz,Cancel:nz,isAxiosError:rz,spread:oz,toFormData:sz,AxiosHeaders:iz,HttpStatusCode:az,formToJSON:lz,getAdapter:cz,mergeConfig:uz}=St,Mp={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function Nc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var s7={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Rp(e,t){function n(o,i,a){if(!(typeof document>"u")){a=Nc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],a={},l=0;l<i.length;l++){var c=i[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",Nc({},i,{expires:-1}))},withAttributes:function(o){return Rp(this.converter,Nc({},this.attributes,o))},withConverter:function(o){return Rp(Nc({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var i7=Rp(s7,{path:"/"});const Rr={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},Dp={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},a7=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),l7=[10,25,50,100],K1={MARK_ALL_READ:"MARK_ALL_READ"},c7=l7.map(e=>({label:e,value:e})),X1={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Ip=wc(Rr.SNOP),Ap=wc(Rr.SELECTED_BU),jp=wc(Rr.USER),u7=wc(Rr.SETTINGS),Ca={BU_IDS:Ap==null?void 0:Ap.business_unit_id,TOKEN:JSON.parse(i7.get(Rr.TOKEN)||null),TENANT_IDS:jp==null?void 0:jp.tenant_id,SNOP_IDS:Ip==null?void 0:Ip.snop_id,GRID_SETTINGS:u7},Sa={headers:{"Content-Type":"application/json",Authorization:`${Dp.BEARER} ${Ca.TOKEN}`}},Z1=St.create({baseURL:Mp.BASE_URL,axiosConfig:Sa});Z1.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Z1.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const $c={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:d7,BU_ID:f7}=Dp,{TENANT_IDS:p7,BU_IDS:h7}=Ca,_c=async({baseUrl:e,payload:t})=>{try{const n=`${e}${$c.SETTING}/v1?${d7}=${p7}&${f7}=${h7}`;return await St.post(n,t,Sa)}catch(n){return n}},m7=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:r,pageSize:o})=>{var m,b;let{definitions:i,defaultUserSettings:a,labels:l}=e;const c=t.split("/").filter(Boolean),u=JSON.parse(localStorage.getItem(Rr.SETTINGS));let d=c.reduce((x,w)=>x==null?void 0:x[w],u)||null;if(!r&&t){a=J1({definitions:i});const x=new Set((m=d==null?void 0:d.column)==null?void 0:m.map(C=>C.id)),w=a.filter(C=>!x.has(C.id));(!d||(w==null?void 0:w.length)>0)&&(async()=>{try{const O={...Ca.GRID_SETTINGS||{platform:{theme:"light"}}},v=(d==null?void 0:d.pageSize)??o;let k=O;for(let E=0;E<c.length;E++){const M=c[E];E===c.length-1?k[M]={columns:a,pageSize:v}:(k[M]={...k[M]||{}},k=k[M])}localStorage.setItem(Rr.SETTINGS,JSON.stringify(O)),await _c({baseUrl:n,payload:O})}catch(C){console.error(C)}})()}a=(d==null?void 0:d.columns)??a??J1({definitions:i});const f=a.reduce((x,w)=>(x[w.id]=w,x),{}),p=l.reduce((x,w)=>(x[w.id]=w,x),{}),h=[];for(const x of i){const w=f[x.id]||{},C=p[x.id]||{};let O={...x,...w,...C};if((b=x.children)!=null&&b.length){const v=w.children||[],k=C.children||[];O.children=x.children.map((E,M)=>({...E,...v[M],...k[M]}))}h.push(O)}return h.sort((x,w)=>x.sequenceId-w.sequenceId)},g7=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),J1=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:t.id,isHidden:!1,style:t.style||{}})),y7=()=>({definitions:[{id:1,key:"sku_name",isSortable:!0,isMandatory:!0},{id:2,key:"node",isSortable:!0,isMandatory:!0},{id:3,key:"channel_name",isSortable:!0,isMandatory:!0}],defaultUserSettings:[{id:1,key:"sku_name",sequenceId:1,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:2,key:"node",sequenceId:2,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:3,key:"channel_name",sequenceId:3,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}}],labels:[{id:1,key:"sku_name",label:"SKU",isLocalizable:!1},{id:2,key:"node",label:"Node",isLocalizable:!1},{id:3,key:"channel_name",label:"Channel",isLocalizable:!1}]});class Np extends R.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=R.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,r=this.startPos-this.mouseX;let o=this.startWidthPrev-r;(!this.props.minWidth||o>=this.props.minWidth)&&(!this.props.maxWidth||o<=this.props.maxWidth)&&(n.previousSibling.style.width=o+"px",n.previousSibling.style.minWidth=o+"px",n.previousSibling.style.maxWidth=o+"px",n.previousSibling.style.setProperty("--column_resize_before_width",o+"px"),this.lastDraggedWidth=o)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),R.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Np.defaultProps={disabled:!1,minWidth:0,className:""},Np.propTypes={disabled:"boolean",minWidth:"number",className:"string"};var Q1,ew;function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(null,arguments)}var b7=function(t){return S.createElement("svg",$p({xmlns:"http://www.w3.org/2000/svg",width:17,height:7,fill:"none"},t),Q1||(Q1=S.createElement("path",{fill:"#0582CA",d:"M4.652.5.676 3.493l3.976 2.981V4.051h8.354V2.859H4.652z"})),ew||(ew=S.createElement("path",{fill:"#0582CA",d:"M12.36.5v2.384H4.008v1.193h8.352v2.396l.956-.716 3.022-2.265z"})))};const v7=(e,t,n,r,o)=>{const[i,a]=R.useState({isOpen:!1,column:null}),l=(f,p,h)=>{a({isOpen:f.currentTarget,column:p,isChild:!!h})},c=()=>{a({isOpen:!1,column:null,isChild:!1})},u=async()=>{c();const f=e.map(p=>{var h,y;if(i!=null&&i.isChild&&Array.isArray(p.children)){const m=p.children.map(x=>{var w;return x.id===i.column.id&&x.key===((w=i.column)==null?void 0:w.key)?{...x,isHidden:!0}:x}),b=m.every(x=>x.isHidden);return{...p,isHidden:b?!0:p.isHidden,children:m}}return p.id===((h=i==null?void 0:i.column)==null?void 0:h.id)&&p.key===((y=i.column)==null?void 0:y.key)?{...p,isHidden:!0}:p});d({updatedColumns:f})},d=async({updatedColumns:f})=>{t({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:f}});const p=r.split("/").filter(Boolean),m={...JSON.parse(localStorage.getItem(Rr.SETTINGS))||{platform:{theme:"light"}}},b=p.reduce((C,O)=>C==null?void 0:C[O],Ca.GRID_SETTINGS)||null,x=(b==null?void 0:b.pageSize)??o;let w=m;for(let C=0;C<p.length;C++){const O=p[C];C===p.length-1?w[O]={columns:f,pageSize:x}:(w[O]={...w[O]||{}},w=w[O])}localStorage.setItem(Rr.SETTINGS,JSON.stringify(m)),await _c({baseUrl:n,payload:m})};return{selectedColumn:i,handleMenuClick:l,handleClose:c,handleHideClick:u,columnUpdaterFunction:d}},tw=({pagination:e,gridPath:t,baseUrl:n})=>{const{selectedPage:r,rowPerPage:o,totalRecords:i,onPageChange:a,onPageSizeChange:l}=e,c=It(),u=async(d,f)=>{if(!f)return;const p=f.split("/").filter(Boolean),h="settings",m={...JSON.parse(localStorage.getItem(h))||{}};let b=m;for(let x=0;x<p.length;x++){const w=p[x];x===p.length-1?b[w]={...b[w]||{},pageSize:d}:(b[w]={...b[w]||{}},b=b[w])}localStorage.setItem(h,JSON.stringify(m)),await _c({baseUrl:n,payload:m})};return g.jsxs(ye,{sx:{display:"flex",p:"1rem 2rem"},children:[g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[g.jsx(nt,{sx:{fontSize:"1.1rem",color:c.palette.primary.notifyTextColor},children:`Showing ${(r-1)*o+1} to ${Math.min(r*o,i)} of ${i} rows`}),g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"6rem"},children:g.jsx(Sc,{options:c7,value:o,onChange:async d=>{l(d),u(d==null?void 0:d.value,t)}})}),g.jsx(nt,{sx:{fontSize:"1.1rem",color:c.palette.primary.notifyTextColor},children:"records per page"})]}),g.jsx(Tg,{count:Math.ceil(i/o),page:r,onChange:async(d,f)=>{a(f)},siblingCount:0,shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,color:c.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,color:c.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:c.palette.primary.notifyActiveText,backgroundColor:`${c.palette.brandColor.paginationBc} !important`}}})]})};tw.propTypes={pagination:s.object.isRequired};function _p({isRenderCellContent:e,column:t,row:n,parent:r}){const o=n[t.key];return g.jsx(g.Fragment,{children:e?g.jsx(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},children:t==null?void 0:t.cellRenderer(n,{column:t,parent:r})}):g.jsx(Ag,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:g.jsx(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},id:t.key,component:"label",children:m8(o)})})})}_p.propTypes={isRenderCellContent:s.bool,column:s.object,row:s.object};const nw=({menuOpen:e,handleClose:t,onHideClick:n})=>{const r=It();return g.jsx(Si,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(ye,{sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:g.jsx(Hn,{onClick:n,disableRipple:!0,sx:{textTransform:"none",fontSize:"1.1rem",p:"0.4rem 1rem",minHeight:"unset",fontWeight:500,color:r.palette.primary.notifyTextColor,backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"},"&:active":{backgroundColor:"transparent"},"&:focus":{backgroundColor:"transparent"}},children:"Hide Column"})})})};nw.propTypes={menuOpen:s.object,handleClose:s.func,onHideClick:s.func},G(kl)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}}));const Oo=G(nt)(({theme:e})=>({color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"})),x7=G(jg)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),w7=G(yi)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),C7=G(nd)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:1.8,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));G(Fl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const S7=G(Jg)(({theme:e})=>({minHeight:"2rem","& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveText}})),Fp=G(Ng)(({theme:e})=>({color:e.palette.primary.notifyActiveText,textTransform:"none",fontWeight:"normal",padding:0,fontSize:"1rem",minHeight:"2rem",paddingBottom:"1rem","&.Mui-selected":{fontWeight:"bold",color:e.palette.primary.notifyActiveText}})),Fc=G(Qu)(({theme:e})=>({"&.MuiChip-outlined":{borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText},height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem","&:hover":{backgroundColor:`${e.palette.brandColor.orange} !important`,color:`${e.palette.brandColor.white} !important`}})),rw=({sortKey:e,sortField:t,sortDir:n,handleSortClick:r})=>{const o=i=>g.jsx(Ir,{onClick:r,sx:{padding:"0.5rem"},children:g.jsx(hn,{url:i})});return g.jsx(g.Fragment,{children:o(t===e?n==="asc"?Ke.AscSort:Ke.DescSort:Ke.Unsort)})};rw.propTypes={sortKey:s.string.isRequired,sortField:s.string,sortDir:s.string,handleSortClick:s.func};function ow({parent:e,column:t,sort:n,handleMenuClick:r,isManageable:o}){const i=t==null?void 0:t.isMandatory,a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return g.jsxs(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem",textAlign:"center",whiteSpace:"normal"},children:[a,g.jsxs(ye,{sx:{display:"flex",alignItems:"center"},children:[l&&g.jsx(rw,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),o&&!i&&g.jsx(Ir,{onClick:f=>r(f,t,e),sx:{padding:"0.5rem 0.2rem"},children:g.jsx(hn,{url:Ke.Menu})})]})]})}ow.propTypes={column:s.object.isRequired,sort:s.object.isRequired,handleMenuClick:s.func,isManageable:s.bool};const T7=G($l)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${vd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 0.5rem",textAlign:"center"},[`&.${vd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 0.5rem",textAlign:"center"}}));function Ta({children:e,...t}){return g.jsx(T7,{...t,children:e})}Ta.propTypes={children:s.node};const O7=G(Hg)(()=>({"&:last-child td":{borderBottom:0}}));function As({children:e,...t}){return g.jsx(O7,{...t,children:e})}As.propTypes={children:s.node};function sw({rows:e,sort:t,data:n,pagination:r,columns:o,nested:i,baseUrl:a,gridPath:l}){var ue;const c=It(),{visibleGridColumns:u}=R.useContext(ga),d=R.useContext(ya),{selectedColumn:f,handleMenuClick:p,handleClose:h,handleHideClick:y,columnUpdaterFunction:m}=v7(u,d,a,l,r==null?void 0:r.rowPerPage),b=o==null?void 0:o.isManageable,x=o==null?void 0:o.isResizable,w=(n==null?void 0:n.length)>0,C=R.useRef(null),[O,v]=R.useState(null),[k,E]=R.useState(null),[M,D]=R.useState(null);let A=null;const $=R.useRef(0),I=R.useRef(!1),W=R.useRef(null),j=g7(((ue=i==null?void 0:i.column)==null?void 0:ue.definitions)||[]),F=i==null?void 0:i.isNested,P=(i==null?void 0:i.data)||[],N=i==null?void 0:i.hashKey;if(R.useEffect(()=>{const _=C.current,q=_==null?void 0:_.querySelector("thead");if(!q)return;const X=()=>{D(null)};return q==null||q.addEventListener("mousedown",X),()=>{q==null||q.removeEventListener("mousedown",X)}},[]),!w)return g.jsx(Oo,{sx:{textAlign:"center"},children:Gr.NRF});const L=(_,q)=>{var oe,ce;if(I.current){_.preventDefault();return}v(q),D(null),_.dataTransfer.setData("colIndex",q);const X=u[q],Y=X==null?void 0:X.label,B=document.createElement("div");B.textContent=Y,Object.assign(B.style,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem 2.5rem",minWidth:(oe=X==null?void 0:X.style)==null?void 0:oe.minWidth,maxWidth:(ce=X==null?void 0:X.style)==null?void 0:ce.maxWidth,fontSize:"1.2rem",fontWeight:"500",color:c.palette.primary.notifyTextColor,background:c.palette.primary.notifyBackground,border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"0rem",pointerEvents:"none",position:"absolute",top:"0",left:"0",zIndex:"-1",textAlign:"center",boxSizing:"border-box",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.2)"}),document.body.appendChild(B);const{offsetWidth:K,offsetHeight:ee}=B;_.dataTransfer.setDragImage(B,K/2,ee/2),requestAnimationFrame(()=>{document.body.removeChild(B)})},H=(_,q)=>{_.preventDefault(),E(q),Q(_)},V=async(_,q)=>{if(_.preventDefault(),clearInterval(A),O===null||O===q)return;const X=[...u],[Y]=X.splice(O,1);X.splice(q,0,Y);const B=u.slice().sort((ee,oe)=>ee.sequenceId-oe.sequenceId).map(ee=>ee.sequenceId),K=X.map((ee,oe)=>({...ee,sequenceId:B[oe]??ee.sequenceId}));m({updatedColumns:K}),v(null),E(null)},z=()=>{v(null),E(null)},Z=(_,q,X,Y)=>{var me,ge,$e,Ae,Me,ze,Xe;if(!_)return null;const B=(_==null?void 0:_.isMandatory)&&(_==null?void 0:_.isSticky),K=parseFloat((ge=(me=_==null?void 0:_.style)==null?void 0:me.minWidth)==null?void 0:ge.toString().replace("rem",""))||7.5;q===0&&($.current=0);const ee=B?q===0?0:`${$.current}rem`:void 0;B&&($.current+=K);const oe=O===q,ce=k==q||(($e=u==null?void 0:u[k])==null?void 0:$e.isMandatory),Ce=Fe=>{_.isMandatory?(Fe.preventDefault(),Fe.dataTransfer.dropEffect="none"):(Fe.preventDefault(),Fe.dataTransfer.dropEffect="move"),H==null||H(Fe,q)},ae=Fe=>{_.isMandatory||V==null||V(Fe,q)},we=Y?`${Y==null?void 0:Y.key}_${_==null?void 0:_.key}_${q}`:q;return g.jsx(Ta,{rowSpan:_!=null&&_.children?1:2,colSpan:x?((Me=(Ae=_==null?void 0:_.children)==null?void 0:Ae.filter(Fe=>!(Fe!=null&&Fe.isHidden)))==null?void 0:Me.length)*2-1:(Xe=(ze=_==null?void 0:_.children)==null?void 0:ze.filter(Fe=>!(Fe!=null&&Fe.isHidden)))==null?void 0:Xe.length,style:_==null?void 0:_.style,onMouseEnter:()=>{M!==we&&D(we)},draggable:X&&!Y&&!(_!=null&&_.isMandatory),onDragStart:X?Fe=>L(Fe,q):void 0,onDragOver:X?Ce:void 0,onDrop:X?ae:void 0,onDragEnd:X?z:void 0,sx:{...oe&&{border:`0.1rem solid ${c.palette.brandColor.lightBlue}!important`},...B&&{borderRadius:"0rem!important",position:"sticky",left:ee,zIndex:3},..._!=null&&_.children?{}:{borderLeft:Fe=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${Fe.palette.primary.notifyBorderColor}`,borderRight:Fe=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${Fe.palette.primary.notifyBorderColor}`},cursor:ce?"not-allowed":X&&!(_!=null&&_.isMandatory)?"grab":"default"},children:g.jsx(ow,{parent:Y,column:_,sort:t,handleMenuClick:p,isManageable:X})},q)},ne=(_,q,X,Y)=>{var oe,ce,Ce;if(!_)return null;const B=(_==null?void 0:_.isMandatory)&&(_==null?void 0:_.isSticky),K=parseFloat((ce=(oe=_==null?void 0:_.style)==null?void 0:oe.minWidth)==null?void 0:ce.toString().replace("rem",""))||7.5;X===0&&($.current=0);const ee=B?X===0?0:`${$.current}rem`:void 0;return B&&($.current+=K),g.jsxs(Ta,{colSpan:1,style:_==null?void 0:_.style,className:`${_==null?void 0:_.label}`,sx:{position:"relative",...B&&{position:"sticky",left:ee,zIndex:2,backgroundColor:ae=>{var we;return e!=null&&e.selectedRow&&((we=e==null?void 0:e.selectedRow)==null?void 0:we.fhi)===(q==null?void 0:q.fhi)||q!=null&&q.isHigh?ae.palette.primary.appBackground:ae.palette.primary.notifyBackground}},...Y?{p:"0rem!important"}:{px:"0rem!important",borderLeft:ae=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${ae.palette.primary.notifyBorderColor}`,borderRight:ae=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${ae.palette.primary.notifyBorderColor}`}},children:[((e==null?void 0:e.selectedRow)&&((Ce=e==null?void 0:e.selectedRow)==null?void 0:Ce.fhi)===(q==null?void 0:q.fhi)||(q==null?void 0:q.isHigh))&&g.jsx(ye,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}}),g.jsx(_p,{isRenderCellContent:!!(_!=null&&_.cellRenderer),column:_,row:q,parent:Y})]},X)},J=(_,q,X,Y)=>{var K;const B=Y?`${Y==null?void 0:Y.key}_${_==null?void 0:_.key}_${q}`:q;return(K=[...u].map((ee,oe)=>({col:ee,index:oe})).reverse().find(({col:ee})=>Array.isArray(ee.children)&&ee.children.length>0))==null||K.index,g.jsx(g.Fragment,{children:_&&!(_!=null&&_.isMandatory)&&X?g.jsx(ye,{resizeStart:()=>{I.current=!0},resizeEnd:()=>{I.current=!1},component:_!=null&&_.children?$l:Np,rowSpan:_!=null&&_.children?1:2,colSpan:1,id:q,sx:{width:"2rem",maxWidth:"2rem",minWidth:"2rem",padding:0,position:"relative",background:c.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:0,transform:"translateX(-50%)",width:"0.15rem",height:"calc(100% + 0.1rem)",backgroundColor:M===B&&!(_!=null&&_.children)?c.palette.brandColor.lightBlue:Y||_!=null&&_.children?c.palette.primary.notifyBorderColor:"transparent",transition:"background-color 0.2s ease",zIndex:1}},disabled:!X}):null})},se=(_,q,X,Y,B,K)=>{var oe;const ee=K?`${K==null?void 0:K.key}_${q==null?void 0:q.key}_${X}`:X;return g.jsx(g.Fragment,{children:q&&!(q!=null&&q.isMandatory)&&Y?g.jsxs($l,{className:"column_resizer_body",sx:{padding:0,position:"relative",borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:0,transform:"translateX(-50%)",width:"0.15rem",height:"calc(100% + 0.1rem)",backgroundColor:M===ee?c.palette.brandColor.lightBlue:K||q!=null&&q.children?c.palette.primary.notifyBorderColor:"transparent",transition:"background-color 0.2s ease",zIndex:1}},children:[B===0&&M===ee&&g.jsx(ye,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1,pointerEvents:"none"},children:g.jsx(b7,{})}),((e==null?void 0:e.selectedRow)&&((oe=e==null?void 0:e.selectedRow)==null?void 0:oe.fhi)===(_==null?void 0:_.fhi)||(_==null?void 0:_.isHigh))&&g.jsx(ye,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}})]},`resize-${X}`):null})},Q=_=>{const q=C.current,{left:X,right:Y}=q.getBoundingClientRect(),B=50,K=_.clientX>Y-B?1:_.clientX<X+B?-1:0;K!==0?(W.current&&clearInterval(W.current),W.current=setInterval(()=>{q.scrollLeft+=K*10},50)):W.current&&(clearInterval(W.current),W.current=null)};return g.jsxs(g.Fragment,{children:[g.jsx(Lg,{sx:{maxHeight:"100%",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem"},children:g.jsxs(_g,{ref:C,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:_=>_.palette.primary.notifyBackground},children:[g.jsxs(Wg,{children:[g.jsx(As,{children:u.map((_,q)=>_!=null&&_.isHidden?null:g.jsxs(R.Fragment,{children:[Z(_,q,b),x&&J(_,q,b)]},q))}),g.jsx(As,{children:u.flatMap((_,q)=>_!=null&&_.isHidden||!(_!=null&&_.children)?[]:_.children.map((X,Y)=>X!=null&&X.isHidden?null:g.jsxs(R.Fragment,{children:[Z(X,Y,b,_),x&&J(X,Y,b,_)]},`${q}-${Y}`)))})]}),g.jsx(Bg,{children:n.map((_,q)=>{const X=_[N],Y=P==null?void 0:P[X],B=(Y==null?void 0:Y.length)>0;return g.jsxs(R.Fragment,{children:[g.jsx(As,{sx:{backgroundColor:K=>{var ee;return e&&((ee=e==null?void 0:e.selectedRow)==null?void 0:ee.fhi)===(_==null?void 0:_.fhi)||_!=null&&_.isHigh?K.palette.primary.appBackground:K.palette.primary.notifyBackground}},onClick:()=>e==null?void 0:e.onRowClick(_),children:u.map((K,ee)=>K!=null&&K.isHidden?null:K!=null&&K.children?K.children.map((oe,ce)=>oe!=null&&oe.isHidden?null:g.jsxs(R.Fragment,{children:[ne(oe,_,ce,K),x&&se(_,oe,ce,b,q,K)]},`${ee}-${ce}`)):g.jsxs(R.Fragment,{children:[ne(K,_,ee),x&&se(_,K,ee,b,q)]},ee))}),F&&Y&&g.jsx(g.Fragment,{children:B?Y.map((K,ee)=>g.jsx(As,{children:j.map((oe,ce)=>g.jsx(Ta,{style:oe==null?void 0:oe.style,children:g.jsx(_p,{isRenderCellContent:!!(oe!=null&&oe.cellRenderer),column:oe,row:K})},ce))},`nested-${ee}`)):g.jsx(As,{children:g.jsx(Ta,{colSpan:j.length,children:g.jsx(Oo,{sx:{textAlign:"center"},children:Gr.NRF})})})})]},q)})})]})}),r&&g.jsx(tw,{pagination:r,gridPath:l,baseUrl:a}),g.jsx(nw,{menuOpen:f==null?void 0:f.isOpen,handleClose:h,onHideClick:y})]})}sw.propTypes={sort:s.object,data:s.array,pagination:s.object,columns:s.object,nested:s.object};function iw({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:r}){var u;const{columns:o}=e,{visibleGridColumns:i=[]}=R.useContext(ga)??{},a=R.useContext(ya),l=R.useMemo(()=>{var d;return m7({columns:o,gridPath:n,baseUrl:r,isDefaultConfig:t,pageSize:(d=e==null?void 0:e.pagination)==null?void 0:d.rowPerPage})},[o,n,r,t,(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage]),c=R.useMemo(()=>{const d=new Map(i.map(f=>[f.key,f]));return l.map(f=>{const p=d.get(f.key);return{...f,...p&&{isHidden:p.isHidden,sequenceId:p.sequenceId}}}).sort((f,p)=>f.sequenceId-p.sequenceId)},[l,i]);return R.useEffect(()=>{a({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:i.length?c:l}})},[l]),g.jsx(sw,{...e,gridPath:n,baseUrl:r})}iw.propTypes={tableProps:s.object.isRequired,mergedColumns:s.array.isRequired};const aw=({type:e})=>{const t=It(),r=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:g.jsxs(ye,{sx:{borderRadius:2,overflow:"hidden"},children:[g.jsx(Tr,{variant:"text",width:"100%",height:60,sx:r}),Array.from({length:10}).map((i,a)=>g.jsx(ye,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>g.jsx(ye,{sx:{flex:1},children:g.jsx(Tr,{variant:"text",height:45,sx:r})},c))},a))]}),toolbar:g.jsx(g.Fragment,{children:g.jsxs(ft,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[g.jsxs(ft,{direction:"row",gap:"1rem",children:[g.jsx(Tr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"15.2rem",height:"5rem",sx:r})]}),g.jsxs(ft,{direction:"row",gap:"1rem",children:[g.jsx(Tr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r})]})]})})}[e]},k7=e=>{if(!e)return null;const{options:t,...n}=e,r=t?"select":"button",o={button:i=>{var a;return g.jsx(mo,{...i,styles:{...i.styles,iconPrimary:((a=i==null?void 0:i.styles)==null?void 0:a.variant)=="filled"}})},select:i=>{var a;return g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=i.styles)==null?void 0:a.width},children:g.jsx(l1,{...i,options:t})})}};return o[r]?o[r](n):null},E7=({presentSetting:e,gridSetting:t,gridPath:n})=>{var a;if(!n)return e;const r=n.split("/").filter(Boolean),o=(a=t==null?void 0:t.grid)==null?void 0:a.map(({id:l,isHidden:c,isSortable:u,key:d,sequenceId:f})=>({id:l,isHidden:c,isSortable:u,key:d,sequenceId:f}));let i=e;for(let l=0;l<r.length;l++){const c=r[l];l===r.length-1?i[c]={columns:o,pageSize:(t==null?void 0:t.pageSize)??null}:(i[c]=i[c]||{},i=i[c])}return{settingObject:e,defaultUserSettings:o}},P7=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const r=JSON.parse(localStorage.getItem("settings")),{settingObject:o,defaultUserSettings:i}=E7({presentSetting:r,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(o)),await _c({baseUrl:e,payload:o}),i}catch(r){console.error(r)}},M7=({customTools:e})=>{var r,o;const t=(r=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===X1.PRIMARY))==null?void 0:r.sort((i,a)=>i.sequenceId-a.sequenceId),n=(o=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===X1.SECONDARY))==null?void 0:o.sort((i,a)=>i.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},lw=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:r,secondaryButtons:o}=M7({customTools:e}),[i,a]=R.useState(r),l=(o==null?void 0:o.length)>0,c=d=>{d?a([...r,...o]):setTimeout(()=>{a(r)},100)},u=()=>{const d=!t;n(d),c(d)};return R.useEffect(()=>{c(t)},[e]),g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),g.jsxs(ye,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[g.jsx(Q5,{mode:"popLayout",children:i.map((d,f)=>g.jsx(Gi.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:g.jsx(ye,{sx:{flexShrink:0,minWidth:"fit-content"},children:k7(d)})},`${d.id}_${f}`))}),l&&g.jsx(ye,{sx:{paddingLeft:t?"0.5rem":0},children:g.jsx(mo,{label:t?"":"More Actions",styles:{iconPrimary:!0,icon:t?Ke.CrossWhite:Ke.More,colorType:t?"danger":""},onClick:u})})]})]})};lw.propTypes={customTools:s.array.isRequired};const cw=({defaultTools:e,isManageable:t,customTools:n,baseUrl:r,gridPath:o,managableColumns:i=[],pageSize:a})=>{var b,x,w,C,O,v;const l=R.useContext(ya),{visibleGridColumns:c,triggerApi:u}=R.useContext(ga),[d,f]=R.useState([]),[p,h]=R.useState(!1);R.useEffect(()=>{if(i.length){const k=i.length?c.filter(E=>i.includes(E.id)):c;f(k)}},[i,c]);const y=async k=>{try{await P7({baseUrl:r,gridPath:o,gridSetting:{grid:k,pageSize:a}})}catch(E){console.error(E)}finally{l({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),l({type:qe.TRIGGER_API,payload:{triggerApi:!1}})}};R.useEffect(()=>{u&&y(c)},[u]);const m=k=>{const E=k.map(D=>D.id),M=c.map(D=>{if(!d.some(I=>I.id===D.id))return D;const $=E.includes(D.id);if(Array.isArray(D.children)&&D.children.length>0){const I=D.children.map(j=>d.some(P=>P.id===j.id)?{...j,isHidden:$?!1:!E.includes(j.id)}:j),W=I.filter(j=>d.some(F=>F.id===j.id)).every(j=>j.isHidden);return{...D,isHidden:$?!1:W,children:I}}return{...D,isHidden:!E.includes(D.id)}});l({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:M}}),l({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!0}})};return g.jsxs(ye,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((b=e==null?void 0:e.search)==null?void 0:b.isRequired)&&g.jsx(s1,{...e==null?void 0:e.search,iconUrl:Ke.Search}),((x=e==null?void 0:e.groupBy)==null?void 0:x.isRequired)&&g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(Sc,{styles:{icon:Ke.Group},...e.groupBy})}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&g.jsx(mo,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Ke.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),t&&g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(Sc,{placeholder:"Manage Columns",options:d,value:d.filter(k=>!k.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:m,styles:{icon:Ke.Manage}})})]}),g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&g.jsx(lw,{customTools:n,setIsExpanded:h,isExpanded:p}),((C=e==null?void 0:e.save)==null?void 0:C.isRequired)&&g.jsx(ye,{sx:{px:"0.5rem"},children:g.jsx(mo,{label:p?"":"Save",styles:{icon:Ke.Save,colorType:"empty"},...e==null?void 0:e.save})}),((O=e==null?void 0:e.upload)==null?void 0:O.isRequired)&&g.jsx(mo,{...e==null?void 0:e.upload,styles:{variant:p?"outlined":"filled",icon:p?Ke.UploadDark:Ke.Upload,iconPrimary:!0,colorType:"secondary",isAnimate:!0}}),((v=e==null?void 0:e.download)==null?void 0:v.isRequired)&&g.jsx(mo,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Ke.Download,isAnimate:!0}})]})]})};cw.propTypes={defaultTools:s.object.isRequired,customTools:s.array,isManageable:s.bool,baseUrl:s.string,gridPath:s.gridPath};function Bp({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:r}){var i,a;const o=(i=e.columns)==null?void 0:i.isManageable;return g.jsx(a1,{children:r?g.jsxs(g.Fragment,{children:[g.jsx(aw,{type:"toolbar"}),g.jsx(aw,{type:"grid"})]}):g.jsxs(ye,{sx:{position:"sticky"},children:[t&&g.jsx(cw,{...t,isManageable:o,pageSize:(a=e==null?void 0:e.pagination)==null?void 0:a.rowPerPage}),g.jsx(iw,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})})}Bp.propTypes={tableProps:s.object.isRequired,toolbarProps:s.object,isDefaultConfig:s.bool};const uw=({list:e,handleLinkClick:t})=>{const n=It(),r=({list:o})=>{var i;return(i=o==null?void 0:o.sort((a,l)=>a.order-l.order))==null?void 0:i.map((a,l)=>a!=null&&a.link?g.jsx(Fr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):g.jsx(nt,{component:"h3",sx:{fontSize:"1rem",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return g.jsx(L0,{separator:g.jsx(hn,{url:Ke.ArrowRight}),children:r({list:e})})};uw.propTypes={list:s.array.isRequired,handleLinkClick:s.func};const dw=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var o,i,a,l,c,u;const r=It();return g.jsxs(g.Fragment,{children:[g.jsxs(ft,{sx:{background:r.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[g.jsx(uw,{...e}),g.jsxs(ft,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&g.jsx(f1,{...t}),(n==null?void 0:n.filterBtnProps)&&g.jsxs(ft,{direction:"row",children:[g.jsx(yi,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:r.palette.primary.notifyBorderColor}}),g.jsxs(ft,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(o=n==null?void 0:n.filterBtnProps)==null?void 0:o.onFilterClick,sx:{cursor:"pointer"},children:[g.jsx(hn,{url:Ke.Filter}),g.jsx(nt,{sx:{fontSize:"1.1rem",color:r.palette.primary.notifyActiveText},children:(i=n==null?void 0:n.filterBtnProps)==null?void 0:i.label})]})]})]})]}),g.jsx(Gi.div,{layout:!0,initial:{height:"0rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:r.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:g.jsxs(ft,{sx:{background:r.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[g.jsx(nt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:r.palette.primary.notifyActiveText},children:"Filters:"}),g.jsx(ye,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:g.jsx(ft,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,f)=>g.jsx(g.Fragment,{children:g.jsxs(ye,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,background:r.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[g.jsx(ye,{component:"img",src:Ke.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),g.jsx(nt,{sx:{fontSize:"1rem",color:r.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},f)}))})}),g.jsx(ye,{component:nt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:r.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};dw.propTypes={breadcrumbProps:s.object.isRequired,switchProps:s.object};function fw({headerProps:e}){return g.jsx(Fn,{children:g.jsx(dw,{...e})})}fw.propTypes={headerProps:s.object.isRequired};const Lp=R.createContext(null),pw=R.createContext(null);function R7({children:e}){const[t,n]=R.useReducer(D7,I7);return g.jsx(Lp.Provider,{value:t,children:g.jsx(pw.Provider,{value:n,children:e})})}function D7(e,t){var n;switch(t.type){case qe.LOADING:return{...e,loading:t.loading};case qe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((r,o)=>new Date(o.createdAt)-new Date(r.createdAt))};case qe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case qe.ERROR:return{...e,error:t.error};default:throw new Error(`${Gr.UNHANDLED}: ${t}`)}}const I7={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Vp,BU_ID:Wp,SNOP_ID:hw}=Dp,{TENANT_IDS:zp,BU_IDS:Up}=Ca,A7=async e=>{try{const t=`${e}${$c.NOTIFICATION}/v1?${Vp}=${zp}&${Wp}=${Up}`;return await St.get(t,Sa)}catch(t){return t}},mw=async(e,t,n)=>{try{const r=n===K1.MARK_ALL_READ?"":`&${hw}=${n}&`,o=`${e}${$c.NOTIFICATION}${Mp.VERSION}?${Vp}=${zp}&${Wp}=${Up}${r}`;return await St.put(o,t,Sa)}catch(r){return r}},j7=async({baseUrl:e,id:t,snopId:n})=>{try{const r=`${e}${$c.NOTIFICATION}${Mp.VERSION}?${Vp}=${zp}&${Wp}=${Up}&${hw}=${n}&id=${t}`;return await St.get(r,Sa)}catch(r){return r}},Bc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},gw=({baseUrl:e})=>{const t=R.useContext(pw),[n,r]=R.useState(!1),[o,i]=R.useState(!1),[a,l]=R.useState(!1),[c,u]=R.useState({}),[d,f]=R.useState(null),[p,h]=R.useState(1),[y,m]=R.useState(!1),[b,x]=R.useState(0),{loading:w,data:C,isMarkAllAsRead:O}=R.useContext(Lp),[v,k]=R.useState([]);R.useEffect(()=>{k(C)},[C]);const E=R.useCallback(async()=>{var j,F;try{t({type:qe.LOADING,loading:!0}),t({type:qe.SUCCESS,data:[]});const P=await A7(e);if(P.status===Bc.OK){const N=((F=(j=P.data)==null?void 0:j.responseData)==null?void 0:F.response)||[],L=Cc(N);t({type:qe.SUCCESS,data:Cc(L)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:i1(N),boo:i1(N)>0}})}}catch{t({type:qe.ERROR,error:Gr.SWR})}finally{t({type:qe.LOADING,loading:!1})}},[e,t]);R.useEffect(()=>{E();const j=setInterval(E,3e5);return()=>clearInterval(j)},[E]);const M=async(j,F)=>{var P,N,L;if(j){f(j);try{const H=await j7({baseUrl:e,id:j,snopId:F});if(H.status===Bc.OK){const V=((L=(N=(P=H.data)==null?void 0:P.responseData)==null?void 0:N.response)==null?void 0:L[0])||{};u(V||{}),l(!0)}else throw new Error}catch{t({type:qe.ERROR,error:Gr.SWR})}finally{f(null)}}},D=async(j,F)=>{if(j.length){t({type:qe.LOADING,loading:!0});try{if((await mw(e,j,F)).status===Bc.OK){const N=C.map(H=>j.includes(H.id)?{...H,isRead:!0}:H),L=N.filter(H=>!H.isRead).length;t({type:qe.SUCCESS,data:Cc(N)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:L,boo:L>0}}),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},200)}}catch{t({type:qe.ERROR,error:Gr.SWR}),t({type:qe.LOADING,loading:!1})}}},A=async()=>{t({type:qe.LOADING,loading:!0});try{const j=d8(C);if((await mw(e,j,K1.MARK_ALL_READ)).status===Bc.OK){const P=C.map(N=>({...N,isRead:!0}));t({type:qe.SUCCESS,data:Cc(P)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}}),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},200)}}catch{t({type:qe.ERROR,error:Gr.SWR}),t({type:qe.LOADING,loading:!1})}},$=(j,F)=>{t({type:qe.LOADING,loading:!0}),x(F),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},400)},I=j=>{const F=j||C||[];return{0:F,1:F.filter(P=>(P==null?void 0:P.type)==="INFO"),2:F.filter(P=>(P==null?void 0:P.type)==="ERROR")}},W=()=>{t({type:qe.LOADING,loading:!0});const j=!y,F=j?(v||[]).filter(P=>!P.isRead):C||[];m(j),k(F),h(1),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},400)};return{fetchNotification:E,showDetailsProps:{open:a,handleClose:()=>l(!1),setOpen:l,data:c,clickId:d},alertDialogProps:{open:n,handleClose:()=>r(!1),onRefresh:E,handleRead:D,handleMarkAllAsRead:A,setOpen:r,handleShowDetails:M,clickId:d,isMainDialog:!0},activeTab:b,loading:w,tabData:I(v)[b],data:v,mode:y,handleTabChange:$,toggleAlertMode:W,page:p,setPage:h,isMarkAllAsRead:O}};var yw,bw,vw;function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(null,arguments)}var N7=function(t){return S.createElement("svg",Hp({xmlns:"http://www.w3.org/2000/svg",width:16,height:17,fill:"none"},t),yw||(yw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 2.19c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V6.19c0-2.2-1.8-4-4-4Z"})),bw||(bw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 2.383a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),vw||(vw=S.createElement("path",{stroke:"#909090",strokeMiterlimit:10,d:"M10.013 12.957c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})))};const $7=({count:e})=>(It(),g.jsxs(g.Fragment,{children:[g.jsx(ye,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center","& svg":{transform:"scale(1)"}},children:g.jsx(N7,{style:{scale:2}})}),g.jsx(C7,{badgeContent:e!=0?"":null,color:"error"})]}));function xw({children:e,handleClose:t,open:n,isMainDialog:r}){return g.jsx(kl,{open:n,onClose:t,...r?{scroll:"paper",PaperProps:{sx:{position:"fixed",top:30,right:30,m:0,width:400,height:450,display:"flex",flexDirection:"column",borderRadius:2,boxShadow:6,backgroundColor:o=>o.palette.primary.notifyBackground}}}:{fullWidth:!0,maxWidth:"md",sx:{"& .MuiPaper-root":{minHeight:250,maxHeight:500,borderRadius:"1.5rem",boxShadow:6,backgroundColor:o=>o.palette.primary.appBackground}}},children:e})}var ww;function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qp.apply(null,arguments)}var _7=function(t){return S.createElement("svg",qp({xmlns:"http://www.w3.org/2000/svg",width:14,height:9,fill:"none",viewBox:"0 0 13 9"},t),ww||(ww=S.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))},Cw,Sw;function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yp.apply(null,arguments)}var F7=function(t){return S.createElement("svg",Yp({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),Cw||(Cw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),Sw||(Sw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},Tw;function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gp.apply(null,arguments)}var B7=function(t){return S.createElement("svg",Gp({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),Tw||(Tw=S.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const Ow=({type:e,item:t,handleShowDetails:n,handleRead:r,handleCTAClicked:o,clickId:i})=>{var c,u;const a=It(),l=(u=(c=JSON.parse(localStorage.getItem("settings")))==null?void 0:c.platform)==null?void 0:u.theme;return g.jsxs(ye,{className:"cards",sx:{pt:" 0.8rem"},children:[g.jsx(ft,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:g.jsx(nd,{sx:{width:"calc(100% - 2%)","& .MuiBadge-badge":{backgroundColor:"#6041EA",height:"0.5rem",minWidth:"0.5rem"}},variant:"dot",invisible:t==null?void 0:t.isRead,children:g.jsx(Oo,{sx:{color:a.palette.primary.notifyActiveText,whiteSpace:"normal",wordBreak:"break-word"},component:"p",className:["title-card",(t==null?void 0:t.isRead)&&"read"].join(" "),children:t==null?void 0:t.message})})}),g.jsx(ft,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:g.jsxs(ft,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[(t==null?void 0:t.isNotificationDetails)&&g.jsx(Fc,{icon:g.jsx(F7,{className:`${l==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:n,label:i===(t==null?void 0:t.id)?g.jsx(Ol,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{backgroundColor:a.palette.brandColor.orange,color:a.palette.brandColor.white}}),!(t!=null&&t.isRead)&&g.jsx(Fc,{icon:g.jsx(B7,{className:`${l==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.primaryCTAURL)&&g.jsx(Fc,{disabled:t==null?void 0:t.isPrimaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isPrimaryCTARedirect,isClicked:t==null?void 0:t.isPrimaryCTAClicked,url:t==null?void 0:t.primaryCTAURL}),label:t==null?void 0:t.primaryCTALabel,component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.secondaryCTAURL)&&g.jsx(Fc,{disabled:t==null?void 0:t.isSecondaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isSecondaryCTARedirect,isClicked:t==null?void 0:t.isSecondaryCTAClicked,url:t==null?void 0:t.secondaryCTAURL}),label:t==null?void 0:t.secondaryCTALabel,component:"button",variant:"outlined",clickable:!0,size:"small"})]})}),g.jsxs(ft,{display:"flex",flexDirection:"row",alignItems:"center",gap:.35,children:[g.jsx(Oo,{sx:{fontSize:"0.8rem"},children:t==null?void 0:t.product}),g.jsx(Oo,{color:a.palette.primary.notifyTextColor,children:"•"}),g.jsx(Oo,{sx:{fontSize:"0.8rem"},children:u8(t==null?void 0:t.createdAt)})]})]})};Ow.propTypes={type:s.string,title:s.string,subTitle:s.string,isRead:s.bool,handleShowDetails:s.func,handleRead:s.func};const kw=({data:e,handleRead:t,handleShowDetails:n,clickId:r,mode:o,page:i,setPage:a})=>{const{isMarkAllAsRead:l}=R.useContext(Lp),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,f]=R.useState([]),[p,h]=R.useState(!1),[y,m]=R.useState(!0),b=R.useRef(null),x=async C=>{h(!0);const O=e.slice((C-1)*10,C*10);await new Promise(v=>setTimeout(v,1e3)),f(v=>{const k=O.filter(E=>!v.some(M=>M.id===E.id));return[...v,...k]}),h(!1),(d==null?void 0:d.length)>=(e==null?void 0:e.length)&&m(!1)};R.useEffect(()=>{var O;let C=[];o?l!=null&&l.count?C=(O=e==null?void 0:e.filter(v=>!v.isRead))==null?void 0:O.slice(0,10):C=[]:C=e.slice(0,10),(C==null?void 0:C.length)<10&&m(!1),f(C)},[e,o,l]),R.useEffect(()=>{y&&i!==1&&x(i)},[i,e]),R.useEffect(()=>{f([...e])},[e]),R.useEffect(()=>{const C=new IntersectionObserver(O=>{O[0].isIntersecting&&!p&&y&&a(v=>v+1)},{threshold:1});return b.current&&C.observe(b.current),()=>{b.current&&C.unobserve(b.current)}},[p,y]);const w=({redirect:C,isClicked:O,url:v})=>{window.open(v,"_blank")};return g.jsxs(ye,{sx:{width:"100%"},children:[Object.entries(h8(d)).map(([C,O])=>g.jsxs(R.Fragment,{children:[C!==u&&g.jsx(w7,{children:C}),O.map((v,k)=>g.jsx(R.Fragment,{children:g.jsx(Ow,{item:v,handleCTAClicked:w,handleShowDetails:()=>n(v.id,v.snopId),handleRead:()=>t([v.id],v.snopId),clickId:r})},`${k}_${v.id}`))]},C)),p&&i>1&&!!(d!=null&&d.length)&&g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:g.jsx(Ol,{size:20,sx:{color:C=>C.palette.primary.notifyIconColor}})}),!(d!=null&&d.length)&&g.jsx(nt,{sx:{fontSize:"1.1rem",color:C=>C.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),g.jsx(ye,{ref:b,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};kw.propTypes={data:s.array,handleRead:s.func,handleShowDetails:s.func};const L7=({onRefresh:e,handleShowDetails:t,clickId:n,handleRead:r,handleMarkAllAsRead:o})=>{var y,m,b,x;const{loading:i,activeTab:a,data:l,tabData:c,mode:u,page:d,setPage:f,handleTabChange:p,toggleAlertMode:h}=gw({});return g.jsxs(g.Fragment,{children:[g.jsxs(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,pt:2},children:[g.jsx(nt,{variant:"h2",sx:{fontSize:"1.2rem",color:w=>w.palette.primary.notifyTextColor},children:"Notifications"}),g.jsx(ye,{onClick:e,children:g.jsx(hn,{url:Ke.Refresh,alt:"refresh",sx:{cursor:"pointer"}})})]}),g.jsx(ye,{sx:{borderBottom:1,m:"1.2rem 1.2rem 0 1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},children:g.jsxs(S7,{value:a,onChange:p,children:[g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["All (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((y=l==null?void 0:l.filter(w=>!(w!=null&&w.isRead)))==null?void 0:y.length)||0}),")"]})}),g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["Info (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((m=l==null?void 0:l.filter(w=>(w==null?void 0:w.type)==="INFO"&&!(w!=null&&w.isRead)))==null?void 0:m.length)||0}),")"]}),sx:{color:w=>w.palette.brandColor.blue}}),g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["Error (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((b=l==null?void 0:l.filter(w=>(w==null?void 0:w.type)==="ERROR"&&!(w!=null&&w.isRead)))==null?void 0:b.length)||0}),")"]}),sx:{color:w=>w.palette.brandColor.red}})]})}),g.jsx(Pl,{dividers:!0,sx:{p:0,...i&&!c.length&&{alignItems:"center",justifyContent:"center"},flexGrow:1,overflowY:"auto",mx:"1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},tabIndex:-1,children:i?g.jsx(Ol,{size:30,sx:{color:w=>w.palette.primary.notifyIconColor}}):g.jsx(g.Fragment,{children:g.jsx(kw,{data:c,handleShowDetails:t,handleRead:r,clickId:n,page:d,setPage:f,mode:u})})}),g.jsxs(El,{sx:{justifyContent:"space-between",px:"1.2rem"},children:[g.jsxs(ft,{direction:"row",gap:1,children:[g.jsx(Oo,{sx:{fontSize:"1rem"},children:"Only show unread"}),g.jsx(x7,{disabled:i,checked:u,onChange:h})]}),g.jsx(Hn,{variant:"outlined",className:"view-all",onClick:o,startIcon:g.jsx(_7,{}),disabled:!((x=l==null?void 0:l.filter(w=>!(w!=null&&w.isRead)))!=null&&x.length),style:{backgroundColor:"transparent"},sx:{fontSize:"1rem",fontWeight:"300",p:0,border:"none",textTransform:"none",color:w=>w.palette.primary.notifyTextColor,"&:hover":{color:w=>w.palette.primary.notifyActiveText,background:"transparent",boxShadow:"none",border:"none"},"&.Mui-disabled":{opacity:.5,color:w=>`${w.palette.primary.notifyActiveText}!important`,background:"transparent",boxShadow:"none",border:"none"}},children:"Mark all as read"})]})]})},V7=({data:e,handleClose:t})=>{var b;const[n,r]=R.useState(1),[o,i]=R.useState(10),[a,l]=R.useState(((b=e==null?void 0:e.notificationDetails)==null?void 0:b.length)||0),[c,u]=R.useState("sku_name"),[d,f]=R.useState("asc"),[p,h]=R.useState([]),[y,m]=R.useState("");return R.useEffect(()=>{var x;if(y||c){const w=f8(e==null?void 0:e.notificationDetails,a7,y);if(c){const C=p8(w,c,d?"asc":"desc");h(pp(C,n,o)),l(C.length);return}h(pp(w,n,o)),l(w.length);return}h(pp(e==null?void 0:e.notificationDetails,n,o)),l((x=e==null?void 0:e.notificationDetails)==null?void 0:x.length)},[y,e==null?void 0:e.notificationDetails,n,o,d,c]),g.jsxs(g.Fragment,{children:[g.jsxs(ft,{direction:"row",justifyContent:"space-between",sx:{padding:"1.5rem 2rem",borderBottom:"0.1rem solid",borderColor:x=>x.palette.primary.notifyBorderColor},children:[g.jsx(nt,{component:"h2",sx:{fontSize:"1.4rem",color:x=>x.palette.primary.notifyActiveText},children:(e==null?void 0:e.message)||""}),g.jsx(ye,{onClick:t,sx:{cursor:"pointer"},children:g.jsx(hn,{url:Ke.CloseCircle})})]}),g.jsx(Pl,{children:g.jsx(Bp,{tableProps:{data:p,columns:{...y7(),isManageable:!1},sort:{sortField:c,sortDir:d,onSort:x=>{var C;const w=(C=x==null?void 0:x.column)==null?void 0:C.key;f(O=>c===w&&O==="asc"?"desc":"asc"),u(w)}},pagination:{selectedPage:n,rowPerPage:o,totalRecords:a,onPageChange:x=>{r(x)},onPageSizeChange:x=>{i(x==null?void 0:x.value),r(1)}}},toolbarProps:{defaultTools:{search:{isRequired:!0,onChange:x=>{const w=x.target.value;w&&r(1),m(w)},placeholder:"Search..."}}}})}),g.jsx(El,{sx:{padding:"1.5rem 2rem"}})]})},W7=({baseUrl:e})=>{const{alertDialogProps:t,showDetailsProps:n,fetchNotification:r,isMarkAllAsRead:o}=gw({baseUrl:e});return g.jsxs(g.Fragment,{children:[g.jsx(ye,{sx:{display:"flex",justifyContent:"center",cursor:"pointer",marginTop:"0.6rem"},onClick:()=>{var i;r(),(i=t==null?void 0:t.setOpen)==null||i.call(t,!0)},children:g.jsx($7,{count:o.count})}),g.jsx(xw,{...t,children:g.jsx(L7,{...t})}),g.jsx(xw,{...n,children:g.jsx(V7,{...n})})]})},z7=({baseUrl:e})=>g.jsx(Fn,{children:g.jsx(R7,{children:g.jsx(W7,{baseUrl:e})})}),U7=({rightChild:e,leftChild:t,isDrawerMerged:n,isDrawerOpen:r,drawerTitle:o,showExpand:i,onCloseClick:a,onMergeClick:l,onExpandClick:c,isDrawerExpanded:u,styles:d,showMerge:f})=>{const p=It();return g.jsx(ye,{sx:{position:"relative",overflow:"hidden"},children:g.jsxs(ao,{container:!0,sx:{height:"100%"},children:[g.jsx(ao,{item:!0,sx:{width:n?d!=null&&d.drawerWidth?`calc(${"100%"-(d==null?void 0:d.drawerWidth)})`:"75%":"100%",position:"relative",zIndex:3,height:"calc(100vh - 7rem)",p:"0rem 1.5rem",overflow:"auto"},children:t}),r&&!n&&g.jsxs(g.Fragment,{children:[g.jsx(ye,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#07080B80",backdropFilter:"blur(3px)",zIndex:3,transition:"opacity 0.3s ease-in-out"}}),g.jsx(ye,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"transparent",zIndex:4}})]}),e&&g.jsxs(ao,{item:!0,sx:{width:u?"90%":(d==null?void 0:d.drawerWidth)||"25%",position:n?"relative":"absolute",top:0,right:0,height:"calc(100vh - 7rem)",backgroundColor:p.palette.primary.notifyBackground,transform:r?"translateX(0)":"translateX(100%)",transition:"transform 0.4s ease-in-out , width 0.4s ease-in-out",zIndex:4,borderLeft:`0.1rem solid ${p.palette.primary.notifyBorderColor}`,display:"flex",flexDirection:"column"},children:[g.jsxs(ft,{direction:"row",alignItems:"center",sx:{width:"100%",flexShrink:0,paddingBottom:"0.8rem",px:2,pt:"0.8rem",borderBottom:h=>`0.1rem solid ${h.palette.primary.notifyBorderColor}`},children:[!u&&f&&g.jsxs(g.Fragment,{children:[g.jsx(ye,{component:"img",src:Ke.Merge,sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:l}),g.jsx(yi,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"auto!important",borderColor:p.palette.primary.notifyBorderColor}})]}),g.jsxs(ft,{direction:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1,children:[g.jsxs(ft,{direction:"row",gap:"0.5rem",alignItems:"center",onClick:a,sx:{cursor:"pointer"},children:[g.jsx(hn,{url:Ke.CrossLight}),g.jsx(nt,{sx:{fontSize:"1.2rem",color:p.palette.primary.notifyTextColor},children:o})]}),g.jsx(ft,{direction:"row",gap:"0.5rem",alignItems:"center",children:i&&g.jsx(ye,{onClick:c,sx:{cursor:"pointer"},children:g.jsx(ye,{component:"img",src:u?Ke.Collapse:Ke.Expand})})})]})]}),g.jsx(ye,{sx:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},overflow:"auto",px:2},children:e})]})]})})},Ew=({layoutChildren:e,layoutProps:t})=>g.jsx(Fn,{children:g.jsx(U7,{...e,...t})});Ew.propTypes={layoutChildren:s.object.isRequired,layoutProps:s.object.isRequired},vt.Button=mo,vt.Checkbox=sc,vt.DatePicker=l8,vt.Grid=Bp,vt.Header=fw,vt.InputField=s1,vt.Loader=N8,vt.Notification=z7,vt.Select=l1,vt.SliderLayout=Ew,vt.Switch=f1,vt.TextField=xc,vt.ToastProvider=R8,vt.toast=k8,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});
326
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=So(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&jc.assertOptions(r,{silentJSONParsing:mr.transitional(mr.boolean),forcedJSONParsing:mr.transitional(mr.boolean),clarifyTimeoutError:mr.transitional(mr.boolean)},!1),o!=null&&(te.isFunction(o)?n.paramsSerializer={serialize:o}:jc.assertOptions(o,{encode:mr.function,serialize:mr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jc.assertOptions(n,{baseUrl:mr.spelling("baseURL"),withXsrfToken:mr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&te.merge(i.common,i[n.method]);i&&te.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=gn.concat(a,i);const l=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,p;if(!c){const y=[H1.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,d=Promise.resolve(n);f<p;)d=d.then(y[f++],y[f++]);return d}p=l.length;let h=n;for(f=0;f<p;){const y=l[f++],m=l[f++];try{h=y(h)}catch(b){m.call(this,b);break}}try{d=H1.call(this,h)}catch(y){return Promise.reject(y)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=So(this.defaults,t);const n=$1(t.baseURL,t.url,t.allowAbsoluteUrls);return E1(n,t.params,t.paramsSerializer)}};te.forEach(["delete","get","head","options"],function(t){To.prototype[t]=function(n,r){return this.request(So(r||{},{method:t,url:n,data:(r||{}).data}))}}),te.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(So(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}To.prototype[t]=n(),To.prototype[t+"Form"]=n(!0)});let n7=class Mw{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Is(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Mw(function(o){t=o}),cancel:t}}};function r7(e){return function(n){return e.apply(null,n)}}function o7(e){return te.isObject(e)&&e.isAxiosError===!0}const Pp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pp).forEach(([e,t])=>{Pp[t]=e});function G1(e){const t=new To(e),n=p1(To.prototype.request,t);return te.extend(n,To.prototype,t,{allOwnKeys:!0}),te.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return G1(So(e,o))},n}const St=G1(xa);St.Axios=To,St.CanceledError=Is,St.CancelToken=n7,St.isCancel=I1,St.VERSION=q1,St.toFormData=Pc,St.AxiosError=He,St.Cancel=St.CanceledError,St.all=function(t){return Promise.all(t)},St.spread=r7,St.isAxiosError=o7,St.mergeConfig=So,St.AxiosHeaders=gn,St.formToJSON=e=>R1(te.isHTMLForm(e)?new FormData(e):e),St.getAdapter=U1.getAdapter,St.HttpStatusCode=Pp,St.default=St;const{Axios:KW,AxiosError:XW,CanceledError:ZW,isCancel:JW,CancelToken:QW,VERSION:ez,all:tz,Cancel:nz,isAxiosError:rz,spread:oz,toFormData:sz,AxiosHeaders:iz,HttpStatusCode:az,formToJSON:lz,getAdapter:cz,mergeConfig:uz}=St,Mp={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function Nc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var s7={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Rp(e,t){function n(o,i,a){if(!(typeof document>"u")){a=Nc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=o+"="+e.write(i,o)+l}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],a={},l=0;l<i.length;l++){var c=i[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),o===d)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",Nc({},i,{expires:-1}))},withAttributes:function(o){return Rp(this.converter,Nc({},this.attributes,o))},withConverter:function(o){return Rp(Nc({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var i7=Rp(s7,{path:"/"});const Rr={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},Dp={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},a7=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),l7=[10,25,50,100],K1={MARK_ALL_READ:"MARK_ALL_READ"},c7=l7.map(e=>({label:e,value:e})),X1={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Ip=wc(Rr.SNOP),Ap=wc(Rr.SELECTED_BU),jp=wc(Rr.USER),u7=wc(Rr.SETTINGS),Ca={BU_IDS:Ap==null?void 0:Ap.business_unit_id,TOKEN:JSON.parse(i7.get(Rr.TOKEN)||null),TENANT_IDS:jp==null?void 0:jp.tenant_id,SNOP_IDS:Ip==null?void 0:Ip.snop_id,GRID_SETTINGS:u7},Sa={headers:{"Content-Type":"application/json",Authorization:`${Dp.BEARER} ${Ca.TOKEN}`}},Z1=St.create({baseURL:Mp.BASE_URL,axiosConfig:Sa});Z1.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Z1.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const $c={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:d7,BU_ID:f7}=Dp,{TENANT_IDS:p7,BU_IDS:h7}=Ca,_c=async({baseUrl:e,payload:t})=>{try{const n=`${e}${$c.SETTING}/v1?${d7}=${p7}&${f7}=${h7}`;return await St.post(n,t,Sa)}catch(n){return n}},m7=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:r,pageSize:o})=>{var m,b;let{definitions:i,defaultUserSettings:a,labels:l}=e;const c=t.split("/").filter(Boolean),u=JSON.parse(localStorage.getItem(Rr.SETTINGS));let d=c.reduce((x,w)=>x==null?void 0:x[w],u)||null;if(!r&&t){a=J1({definitions:i});const x=new Set((m=d==null?void 0:d.column)==null?void 0:m.map(C=>C.id)),w=a.filter(C=>!x.has(C.id));(!d||(w==null?void 0:w.length)>0)&&(async()=>{try{const O={...Ca.GRID_SETTINGS||{platform:{theme:"light"}}},v=(d==null?void 0:d.pageSize)??o;let k=O;for(let E=0;E<c.length;E++){const M=c[E];E===c.length-1?k[M]={columns:a,pageSize:v}:(k[M]={...k[M]||{}},k=k[M])}localStorage.setItem(Rr.SETTINGS,JSON.stringify(O)),await _c({baseUrl:n,payload:O})}catch(C){console.error(C)}})()}a=(d==null?void 0:d.columns)??a??J1({definitions:i});const f=a.reduce((x,w)=>(x[w.id]=w,x),{}),p=l.reduce((x,w)=>(x[w.id]=w,x),{}),h=[];for(const x of i){const w=f[x.id]||{},C=p[x.id]||{};let O={...x,...w,...C};if((b=x.children)!=null&&b.length){const v=w.children||[],k=C.children||[];O.children=x.children.map((E,M)=>({...E,...v[M],...k[M]}))}h.push(O)}return h.sort((x,w)=>x.sequenceId-w.sequenceId)},g7=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),J1=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:t.id,isHidden:!1,style:t.style||{}})),y7=()=>({definitions:[{id:1,key:"sku_name",isSortable:!0,isMandatory:!0},{id:2,key:"node",isSortable:!0,isMandatory:!0},{id:3,key:"channel_name",isSortable:!0,isMandatory:!0}],defaultUserSettings:[{id:1,key:"sku_name",sequenceId:1,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:2,key:"node",sequenceId:2,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}},{id:3,key:"channel_name",sequenceId:3,isHidden:!1,style:{width:"20rem",minWidth:"20rem",maxWidth:"20rem"}}],labels:[{id:1,key:"sku_name",label:"SKU",isLocalizable:!1},{id:2,key:"node",label:"Node",isLocalizable:!1},{id:3,key:"channel_name",label:"Channel",isLocalizable:!1}]});class Np extends R.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=R.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,r=this.startPos-this.mouseX;let o=this.startWidthPrev-r;(!this.props.minWidth||o>=this.props.minWidth)&&(!this.props.maxWidth||o<=this.props.maxWidth)&&(n.previousSibling.style.width=o+"px",n.previousSibling.style.minWidth=o+"px",n.previousSibling.style.maxWidth=o+"px",n.previousSibling.style.setProperty("--column_resize_before_width",o+"px"),this.lastDraggedWidth=o)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),R.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Np.defaultProps={disabled:!1,minWidth:0,className:""},Np.propTypes={disabled:"boolean",minWidth:"number",className:"string"};var Q1,ew;function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(null,arguments)}var b7=function(t){return S.createElement("svg",$p({xmlns:"http://www.w3.org/2000/svg",width:17,height:7,fill:"none"},t),Q1||(Q1=S.createElement("path",{fill:"#0582CA",d:"M4.652.5.676 3.493l3.976 2.981V4.051h8.354V2.859H4.652z"})),ew||(ew=S.createElement("path",{fill:"#0582CA",d:"M12.36.5v2.384H4.008v1.193h8.352v2.396l.956-.716 3.022-2.265z"})))};const v7=(e,t,n,r,o)=>{const[i,a]=R.useState({isOpen:!1,column:null}),l=(f,p,h)=>{a({isOpen:f.currentTarget,column:p,isChild:!!h})},c=()=>{a({isOpen:!1,column:null,isChild:!1})},u=async()=>{c();const f=e.map(p=>{var h,y;if(i!=null&&i.isChild&&Array.isArray(p.children)){const m=p.children.map(x=>{var w;return x.id===i.column.id&&x.key===((w=i.column)==null?void 0:w.key)?{...x,isHidden:!0}:x}),b=m.every(x=>x.isHidden);return{...p,isHidden:b?!0:p.isHidden,children:m}}return p.id===((h=i==null?void 0:i.column)==null?void 0:h.id)&&p.key===((y=i.column)==null?void 0:y.key)?{...p,isHidden:!0}:p});d({updatedColumns:f})},d=async({updatedColumns:f})=>{t({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:f}});const p=r.split("/").filter(Boolean),m={...JSON.parse(localStorage.getItem(Rr.SETTINGS))||{platform:{theme:"light"}}},b=p.reduce((C,O)=>C==null?void 0:C[O],Ca.GRID_SETTINGS)||null,x=(b==null?void 0:b.pageSize)??o;let w=m;for(let C=0;C<p.length;C++){const O=p[C];C===p.length-1?w[O]={columns:f,pageSize:x}:(w[O]={...w[O]||{}},w=w[O])}localStorage.setItem(Rr.SETTINGS,JSON.stringify(m)),await _c({baseUrl:n,payload:m})};return{selectedColumn:i,handleMenuClick:l,handleClose:c,handleHideClick:u,columnUpdaterFunction:d}},tw=({pagination:e,gridPath:t,baseUrl:n})=>{const{selectedPage:r,rowPerPage:o,totalRecords:i,onPageChange:a,onPageSizeChange:l}=e,c=It(),u=async(d,f)=>{if(!f)return;const p=f.split("/").filter(Boolean),h="settings",m={...JSON.parse(localStorage.getItem(h))||{}};let b=m;for(let x=0;x<p.length;x++){const w=p[x];x===p.length-1?b[w]={...b[w]||{},pageSize:d}:(b[w]={...b[w]||{}},b=b[w])}localStorage.setItem(h,JSON.stringify(m)),await _c({baseUrl:n,payload:m})};return g.jsxs(ye,{sx:{display:"flex",p:"1rem 2rem"},children:[g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[g.jsx(nt,{sx:{fontSize:"1.1rem",color:c.palette.primary.notifyTextColor},children:`Showing ${(r-1)*o+1} to ${Math.min(r*o,i)} of ${i} rows`}),g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"6rem"},children:g.jsx(Sc,{options:c7,value:o,onChange:async d=>{l(d),u(d==null?void 0:d.value,t)}})}),g.jsx(nt,{sx:{fontSize:"1.1rem",color:c.palette.primary.notifyTextColor},children:"records per page"})]}),g.jsx(Tg,{count:Math.ceil(i/o),page:r,onChange:async(d,f)=>{a(f)},siblingCount:0,shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,color:c.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,color:c.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:c.palette.primary.notifyActiveText,backgroundColor:`${c.palette.brandColor.paginationBc} !important`}}})]})};tw.propTypes={pagination:s.object.isRequired};function _p({isRenderCellContent:e,column:t,row:n,parent:r}){const o=n[t.key];return g.jsx(g.Fragment,{children:e?g.jsx(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},children:t==null?void 0:t.cellRenderer(n,{column:t,parent:r})}):g.jsx(Ag,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:g.jsx(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},id:t.key,component:"label",children:m8(o)})})})}_p.propTypes={isRenderCellContent:s.bool,column:s.object,row:s.object};const nw=({menuOpen:e,handleClose:t,onHideClick:n})=>{const r=It();return g.jsx(Si,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(ye,{sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:g.jsx(Hn,{onClick:n,disableRipple:!0,sx:{textTransform:"none",fontSize:"1.1rem",p:"0.4rem 1rem",minHeight:"unset",fontWeight:500,color:r.palette.primary.notifyTextColor,backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"},"&:active":{backgroundColor:"transparent"},"&:focus":{backgroundColor:"transparent"}},children:"Hide Column"})})})};nw.propTypes={menuOpen:s.object,handleClose:s.func,onHideClick:s.func},G(kl)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}}));const Oo=G(nt)(({theme:e})=>({color:e.palette.primary.notifyTextColor,fontSize:"1.1rem"})),x7=G(jg)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),w7=G(yi)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),C7=G(nd)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:1.8,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));G(Fl)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const S7=G(Jg)(({theme:e})=>({minHeight:"2rem","& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveText}})),Fp=G(Ng)(({theme:e})=>({color:e.palette.primary.notifyActiveText,textTransform:"none",fontWeight:"normal",padding:0,fontSize:"1rem",minHeight:"2rem",paddingBottom:"1rem","&.Mui-selected":{fontWeight:"bold",color:e.palette.primary.notifyActiveText}})),Fc=G(Qu)(({theme:e})=>({"&.MuiChip-outlined":{borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText},height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:e.palette.primary.notifyBorderColor,color:e.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem","&:hover":{backgroundColor:`${e.palette.brandColor.orange} !important`,color:`${e.palette.brandColor.white} !important`}})),rw=({sortKey:e,sortField:t,sortDir:n,handleSortClick:r})=>{const o=i=>g.jsx(Ir,{onClick:r,sx:{padding:"0.5rem"},children:g.jsx(hn,{url:i})});return g.jsx(g.Fragment,{children:o(t===e?n==="asc"?Ke.AscSort:Ke.DescSort:Ke.Unsort)})};rw.propTypes={sortKey:s.string.isRequired,sortField:s.string,sortDir:s.string,handleSortClick:s.func};function ow({parent:e,column:t,sort:n,handleMenuClick:r,isManageable:o}){const i=t==null?void 0:t.isMandatory,a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return g.jsxs(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem",textAlign:"center",whiteSpace:"normal"},children:[a,g.jsxs(ye,{sx:{display:"flex",alignItems:"center"},children:[l&&g.jsx(rw,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),o&&!i&&g.jsx(Ir,{onClick:f=>r(f,t,e),sx:{padding:"0.5rem 0.2rem"},children:g.jsx(hn,{url:Ke.Menu})})]})]})}ow.propTypes={column:s.object.isRequired,sort:s.object.isRequired,handleMenuClick:s.func,isManageable:s.bool};const T7=G($l)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${vd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 0.5rem",textAlign:"center"},[`&.${vd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 0.5rem",textAlign:"center"}}));function Ta({children:e,...t}){return g.jsx(T7,{...t,children:e})}Ta.propTypes={children:s.node};const O7=G(Hg)(()=>({"&:last-child td":{borderBottom:0}}));function As({children:e,...t}){return g.jsx(O7,{...t,children:e})}As.propTypes={children:s.node};function sw({rows:e,sort:t,data:n,pagination:r,columns:o,nested:i,baseUrl:a,gridPath:l}){var ue;const c=It(),{visibleGridColumns:u}=R.useContext(ga),d=R.useContext(ya),{selectedColumn:f,handleMenuClick:p,handleClose:h,handleHideClick:y,columnUpdaterFunction:m}=v7(u,d,a,l,r==null?void 0:r.rowPerPage),b=o==null?void 0:o.isManageable,x=o==null?void 0:o.isResizable,w=(n==null?void 0:n.length)>0,C=R.useRef(null),[O,v]=R.useState(null),[k,E]=R.useState(null),[M,D]=R.useState(null);let A=null;const $=R.useRef(0),I=R.useRef(!1),W=R.useRef(null),j=g7(((ue=i==null?void 0:i.column)==null?void 0:ue.definitions)||[]),F=i==null?void 0:i.isNested,P=(i==null?void 0:i.data)||[],N=i==null?void 0:i.hashKey;if(R.useEffect(()=>{const _=C.current,q=_==null?void 0:_.querySelector("thead");if(!q)return;const X=()=>{D(null)};return q==null||q.addEventListener("mousedown",X),()=>{q==null||q.removeEventListener("mousedown",X)}},[]),!w)return g.jsx(Oo,{sx:{textAlign:"center"},children:Gr.NRF});const L=(_,q)=>{var oe,ce;if(I.current){_.preventDefault();return}v(q),D(null),_.dataTransfer.setData("colIndex",q);const X=u[q],Y=X==null?void 0:X.label,B=document.createElement("div");B.textContent=Y,Object.assign(B.style,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem 2.5rem",minWidth:(oe=X==null?void 0:X.style)==null?void 0:oe.minWidth,maxWidth:(ce=X==null?void 0:X.style)==null?void 0:ce.maxWidth,fontSize:"1.2rem",fontWeight:"500",color:c.palette.primary.notifyTextColor,background:c.palette.primary.notifyBackground,border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"0rem",pointerEvents:"none",position:"absolute",top:"0",left:"0",zIndex:"-1",textAlign:"center",boxSizing:"border-box",boxShadow:"0 1px 4px rgba(0, 0, 0, 0.2)"}),document.body.appendChild(B);const{offsetWidth:K,offsetHeight:ee}=B;_.dataTransfer.setDragImage(B,K/2,ee/2),requestAnimationFrame(()=>{document.body.removeChild(B)})},H=(_,q)=>{_.preventDefault(),E(q),Q(_)},V=async(_,q)=>{if(_.preventDefault(),clearInterval(A),O===null||O===q)return;const X=[...u],[Y]=X.splice(O,1);X.splice(q,0,Y);const B=u.slice().sort((ee,oe)=>ee.sequenceId-oe.sequenceId).map(ee=>ee.sequenceId),K=X.map((ee,oe)=>({...ee,sequenceId:B[oe]??ee.sequenceId}));m({updatedColumns:K}),v(null),E(null)},z=()=>{v(null),E(null)},Z=(_,q,X,Y)=>{var me,ge,$e,Ae,Me,ze,Xe;if(!_)return null;const B=(_==null?void 0:_.isMandatory)&&(_==null?void 0:_.isSticky),K=parseFloat((ge=(me=_==null?void 0:_.style)==null?void 0:me.minWidth)==null?void 0:ge.toString().replace("rem",""))||7.5;q===0&&($.current=0);const ee=B?q===0?0:`${$.current}rem`:void 0;B&&($.current+=K);const oe=O===q,ce=k==q||(($e=u==null?void 0:u[k])==null?void 0:$e.isMandatory),Ce=Fe=>{_.isMandatory?(Fe.preventDefault(),Fe.dataTransfer.dropEffect="none"):(Fe.preventDefault(),Fe.dataTransfer.dropEffect="move"),H==null||H(Fe,q)},ae=Fe=>{_.isMandatory||V==null||V(Fe,q)},we=Y?`${Y==null?void 0:Y.key}_${_==null?void 0:_.key}_${q}`:q;return g.jsx(Ta,{rowSpan:_!=null&&_.children?1:2,colSpan:x?((Me=(Ae=_==null?void 0:_.children)==null?void 0:Ae.filter(Fe=>!(Fe!=null&&Fe.isHidden)))==null?void 0:Me.length)*2-1:(Xe=(ze=_==null?void 0:_.children)==null?void 0:ze.filter(Fe=>!(Fe!=null&&Fe.isHidden)))==null?void 0:Xe.length,style:_==null?void 0:_.style,onMouseEnter:()=>{M!==we&&D(we)},draggable:X&&!Y&&!(_!=null&&_.isMandatory),onDragStart:X?Fe=>L(Fe,q):void 0,onDragOver:X?Ce:void 0,onDrop:X?ae:void 0,onDragEnd:X?z:void 0,sx:{...oe&&{border:`0.1rem solid ${c.palette.brandColor.lightBlue}!important`},...B&&{borderRadius:"0rem!important",position:"sticky",left:ee,zIndex:3},..._!=null&&_.children?{}:{borderLeft:Fe=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${Fe.palette.primary.notifyBorderColor}`,borderRight:Fe=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${Fe.palette.primary.notifyBorderColor}`},cursor:ce?"not-allowed":X&&!(_!=null&&_.isMandatory)?"grab":"default"},children:g.jsx(ow,{parent:Y,column:_,sort:t,handleMenuClick:p,isManageable:X})},q)},ne=(_,q,X,Y)=>{var oe,ce,Ce;if(!_)return null;const B=(_==null?void 0:_.isMandatory)&&(_==null?void 0:_.isSticky),K=parseFloat((ce=(oe=_==null?void 0:_.style)==null?void 0:oe.minWidth)==null?void 0:ce.toString().replace("rem",""))||7.5;X===0&&($.current=0);const ee=B?X===0?0:`${$.current}rem`:void 0;return B&&($.current+=K),g.jsxs(Ta,{colSpan:1,style:_==null?void 0:_.style,className:`${_==null?void 0:_.label}`,sx:{position:"relative",...B&&{position:"sticky",left:ee,zIndex:2,backgroundColor:ae=>{var we;return e!=null&&e.selectedRow&&((we=e==null?void 0:e.selectedRow)==null?void 0:we.fhi)===(q==null?void 0:q.fhi)||q!=null&&q.isHigh?ae.palette.primary.appBackground:ae.palette.primary.notifyBackground}},...Y?{p:"0rem!important"}:{px:"0rem!important",borderLeft:ae=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${ae.palette.primary.notifyBorderColor}`,borderRight:ae=>(_==null?void 0:_.key)==="volume_value"&&`0.1rem solid ${ae.palette.primary.notifyBorderColor}`}},children:[((e==null?void 0:e.selectedRow)&&((Ce=e==null?void 0:e.selectedRow)==null?void 0:Ce.fhi)===(q==null?void 0:q.fhi)||(q==null?void 0:q.isHigh))&&g.jsx(ye,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}}),g.jsx(_p,{isRenderCellContent:!!(_!=null&&_.cellRenderer),column:_,row:q,parent:Y})]},X)},J=(_,q,X,Y)=>{var K;const B=Y?`${Y==null?void 0:Y.key}_${_==null?void 0:_.key}_${q}`:q;return(K=[...u].map((ee,oe)=>({col:ee,index:oe})).reverse().find(({col:ee})=>Array.isArray(ee.children)&&ee.children.length>0))==null||K.index,g.jsx(g.Fragment,{children:_&&!(_!=null&&_.isMandatory)&&X?g.jsx(ye,{resizeStart:()=>{I.current=!0},resizeEnd:()=>{I.current=!1},component:_!=null&&_.children?$l:Np,rowSpan:_!=null&&_.children?1:2,colSpan:1,id:q,sx:{width:"2rem",maxWidth:"2rem",minWidth:"2rem",padding:0,position:"relative",background:c.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:0,transform:"translateX(-50%)",width:"0.15rem",height:"calc(100% + 0.1rem)",backgroundColor:M===B&&!(_!=null&&_.children)?c.palette.brandColor.lightBlue:Y||_!=null&&_.children?c.palette.primary.notifyBorderColor:"transparent",transition:"background-color 0.2s ease",zIndex:1}},disabled:!X}):null})},se=(_,q,X,Y,B,K)=>{var oe;const ee=K?`${K==null?void 0:K.key}_${q==null?void 0:q.key}_${X}`:X;return g.jsx(g.Fragment,{children:q&&!(q!=null&&q.isMandatory)&&Y?g.jsxs($l,{className:"column_resizer_body",sx:{padding:0,position:"relative",borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:0,transform:"translateX(-50%)",width:"0.15rem",height:"calc(100% + 0.1rem)",backgroundColor:M===ee?c.palette.brandColor.lightBlue:K||q!=null&&q.children?c.palette.primary.notifyBorderColor:"transparent",transition:"background-color 0.2s ease",zIndex:1}},children:[B===0&&M===ee&&g.jsx(ye,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1,pointerEvents:"none"},children:g.jsx(b7,{})}),((e==null?void 0:e.selectedRow)&&((oe=e==null?void 0:e.selectedRow)==null?void 0:oe.fhi)===(_==null?void 0:_.fhi)||(_==null?void 0:_.isHigh))&&g.jsx(ye,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.08rem",background:"linear-gradient(#F9B16E, #F68080)",pointerEvents:"none"}})]},`resize-${X}`):null})},Q=_=>{const q=C.current,{left:X,right:Y}=q.getBoundingClientRect(),B=50,K=_.clientX>Y-B?1:_.clientX<X+B?-1:0;K!==0?(W.current&&clearInterval(W.current),W.current=setInterval(()=>{q.scrollLeft+=K*10},50)):W.current&&(clearInterval(W.current),W.current=null)};return g.jsxs(g.Fragment,{children:[g.jsx(Lg,{sx:{maxHeight:"100%",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem"},children:g.jsxs(_g,{ref:C,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:_=>_.palette.primary.notifyBackground},children:[g.jsxs(Wg,{children:[g.jsx(As,{children:u.map((_,q)=>_!=null&&_.isHidden?null:g.jsxs(R.Fragment,{children:[Z(_,q,b),x&&J(_,q,b)]},q))}),g.jsx(As,{children:u.flatMap((_,q)=>_!=null&&_.isHidden||!(_!=null&&_.children)?[]:_.children.map((X,Y)=>X!=null&&X.isHidden?null:g.jsxs(R.Fragment,{children:[Z(X,Y,b,_),x&&J(X,Y,b,_)]},`${q}-${Y}`)))})]}),g.jsx(Bg,{children:n.map((_,q)=>{const X=_[N],Y=P==null?void 0:P[X],B=(Y==null?void 0:Y.length)>0;return g.jsxs(R.Fragment,{children:[g.jsx(As,{sx:{backgroundColor:K=>{var ee;return e&&((ee=e==null?void 0:e.selectedRow)==null?void 0:ee.fhi)===(_==null?void 0:_.fhi)||_!=null&&_.isHigh?K.palette.primary.appBackground:K.palette.primary.notifyBackground}},onClick:()=>e==null?void 0:e.onRowClick(_),children:u.map((K,ee)=>K!=null&&K.isHidden?null:K!=null&&K.children?K.children.map((oe,ce)=>oe!=null&&oe.isHidden?null:g.jsxs(R.Fragment,{children:[ne(oe,_,ce,K),x&&se(_,oe,ce,b,q,K)]},`${ee}-${ce}`)):g.jsxs(R.Fragment,{children:[ne(K,_,ee),x&&se(_,K,ee,b,q)]},ee))}),F&&Y&&g.jsx(g.Fragment,{children:B?Y.map((K,ee)=>g.jsx(As,{children:j.map((oe,ce)=>g.jsx(Ta,{style:oe==null?void 0:oe.style,children:g.jsx(_p,{isRenderCellContent:!!(oe!=null&&oe.cellRenderer),column:oe,row:K})},ce))},`nested-${ee}`)):g.jsx(As,{children:g.jsx(Ta,{colSpan:j.length,children:g.jsx(Oo,{sx:{textAlign:"center"},children:Gr.NRF})})})})]},q)})})]})}),r&&g.jsx(tw,{pagination:r,gridPath:l,baseUrl:a}),g.jsx(nw,{menuOpen:f==null?void 0:f.isOpen,handleClose:h,onHideClick:y})]})}sw.propTypes={sort:s.object,data:s.array,pagination:s.object,columns:s.object,nested:s.object};function iw({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:r}){var u;const{columns:o}=e,{visibleGridColumns:i=[]}=R.useContext(ga)??{},a=R.useContext(ya),l=R.useMemo(()=>{var d;return m7({columns:o,gridPath:n,baseUrl:r,isDefaultConfig:t,pageSize:(d=e==null?void 0:e.pagination)==null?void 0:d.rowPerPage})},[o,n,r,t,(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage]),c=R.useMemo(()=>{const d=new Map(i.map(f=>[f.key,f]));return l.map(f=>{const p=d.get(f.key);return{...f,...p&&{isHidden:p.isHidden,sequenceId:p.sequenceId}}}).sort((f,p)=>f.sequenceId-p.sequenceId)},[l,i]);return R.useEffect(()=>{a({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:i.length?c:l}})},[l]),g.jsx(sw,{...e,gridPath:n,baseUrl:r})}iw.propTypes={tableProps:s.object.isRequired,mergedColumns:s.array.isRequired};const aw=({type:e})=>{const t=It(),r=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:g.jsxs(ye,{sx:{borderRadius:2,overflow:"hidden"},children:[g.jsx(Tr,{variant:"text",width:"100%",height:60,sx:r}),Array.from({length:10}).map((i,a)=>g.jsx(ye,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>g.jsx(ye,{sx:{flex:1},children:g.jsx(Tr,{variant:"text",height:45,sx:r})},c))},a))]}),toolbar:g.jsx(g.Fragment,{children:g.jsxs(ft,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[g.jsxs(ft,{direction:"row",gap:"1rem",children:[g.jsx(Tr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"15.2rem",height:"5rem",sx:r})]}),g.jsxs(ft,{direction:"row",gap:"1rem",children:[g.jsx(Tr,{variant:"text",width:"10.2rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r}),g.jsx(Tr,{variant:"text",width:"3.5rem",height:"5rem",sx:r})]})]})})}[e]},k7=e=>{if(!e)return null;const{options:t,...n}=e,r=t?"select":"button",o={button:i=>{var a;return g.jsx(mo,{...i,styles:{...i.styles,iconPrimary:((a=i==null?void 0:i.styles)==null?void 0:a.variant)=="filled"}})},select:i=>{var a;return g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=i.styles)==null?void 0:a.width},children:g.jsx(l1,{...i,options:t})})}};return o[r]?o[r](n):null},E7=({presentSetting:e,gridSetting:t,gridPath:n})=>{var a;if(!n)return e;const r=n.split("/").filter(Boolean),o=(a=t==null?void 0:t.grid)==null?void 0:a.map(({id:l,isHidden:c,isSortable:u,key:d,sequenceId:f})=>({id:l,isHidden:c,isSortable:u,key:d,sequenceId:f}));let i=e;for(let l=0;l<r.length;l++){const c=r[l];l===r.length-1?i[c]={columns:o,pageSize:(t==null?void 0:t.pageSize)??null}:(i[c]=i[c]||{},i=i[c])}return{settingObject:e,defaultUserSettings:o}},P7=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const r=JSON.parse(localStorage.getItem("settings")),{settingObject:o,defaultUserSettings:i}=E7({presentSetting:r,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(o)),await _c({baseUrl:e,payload:o}),i}catch(r){console.error(r)}},M7=({customTools:e})=>{var r,o;const t=(r=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===X1.PRIMARY))==null?void 0:r.sort((i,a)=>i.sequenceId-a.sequenceId),n=(o=e==null?void 0:e.filter(i=>(i==null?void 0:i.type)===X1.SECONDARY))==null?void 0:o.sort((i,a)=>i.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},lw=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:r,secondaryButtons:o}=M7({customTools:e}),[i,a]=R.useState(r),l=(o==null?void 0:o.length)>0,c=d=>{d?a([...r,...o]):setTimeout(()=>{a(r)},100)},u=()=>{const d=!t;n(d),c(d)};return R.useEffect(()=>{c(t)},[e]),g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),g.jsxs(ye,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[g.jsx(Q5,{mode:"popLayout",children:i.map((d,f)=>g.jsx(Gi.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:g.jsx(ye,{sx:{flexShrink:0,minWidth:"fit-content"},children:k7(d)})},`${d.id}_${f}`))}),l&&g.jsx(ye,{sx:{paddingLeft:t?"0.5rem":0},children:g.jsx(mo,{label:t?"":"More Actions",styles:{iconPrimary:!0,icon:t?Ke.CrossWhite:Ke.More,colorType:t?"danger":""},onClick:u})})]})]})};lw.propTypes={customTools:s.array.isRequired};const cw=({defaultTools:e,isManageable:t,customTools:n,baseUrl:r,gridPath:o,managableColumns:i=[],pageSize:a})=>{var b,x,w,C,O,v;const l=R.useContext(ya),{visibleGridColumns:c,triggerApi:u}=R.useContext(ga),[d,f]=R.useState([]),[p,h]=R.useState(!1);R.useEffect(()=>{if(i.length){const k=i.length?c.filter(E=>i.includes(E.id)):c;f(k)}},[i,c]);const y=async k=>{try{await P7({baseUrl:r,gridPath:o,gridSetting:{grid:k,pageSize:a}})}catch(E){console.error(E)}finally{l({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),l({type:qe.TRIGGER_API,payload:{triggerApi:!1}})}};R.useEffect(()=>{u&&y(c)},[u]);const m=k=>{const E=k.map(D=>D.id),M=c.map(D=>{if(!d.some(I=>I.id===D.id))return D;const $=E.includes(D.id);if(Array.isArray(D.children)&&D.children.length>0){const I=D.children.map(j=>d.some(P=>P.id===j.id)?{...j,isHidden:$?!1:!E.includes(j.id)}:j),W=I.filter(j=>d.some(F=>F.id===j.id)).every(j=>j.isHidden);return{...D,isHidden:$?!1:W,children:I}}return{...D,isHidden:!E.includes(D.id)}});l({type:qe.SET_GRID_DATA,payload:{visibleGridColumns:M}}),l({type:qe.HAS_SETTING_CHANGE,payload:{hasChange:!0}})};return g.jsxs(ye,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((b=e==null?void 0:e.search)==null?void 0:b.isRequired)&&g.jsx(s1,{...e==null?void 0:e.search,iconUrl:Ke.Search}),((x=e==null?void 0:e.groupBy)==null?void 0:x.isRequired)&&g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(Sc,{styles:{icon:Ke.Group},...e.groupBy})}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&g.jsx(mo,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Ke.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),t&&g.jsx(ye,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(Sc,{placeholder:"Manage Columns",options:d,value:d.filter(k=>!k.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:m,styles:{icon:Ke.Manage}})})]}),g.jsxs(ye,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&g.jsx(lw,{customTools:n,setIsExpanded:h,isExpanded:p}),((C=e==null?void 0:e.save)==null?void 0:C.isRequired)&&g.jsx(ye,{sx:{px:"0.5rem"},children:g.jsx(mo,{label:p?"":"Save",styles:{icon:Ke.Save,colorType:"empty"},...e==null?void 0:e.save})}),((O=e==null?void 0:e.upload)==null?void 0:O.isRequired)&&g.jsx(mo,{...e==null?void 0:e.upload,styles:{variant:p?"outlined":"filled",icon:p?Ke.UploadDark:Ke.Upload,iconPrimary:!p,colorType:"secondary",isAnimate:!0}}),((v=e==null?void 0:e.download)==null?void 0:v.isRequired)&&g.jsx(mo,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Ke.Download,isAnimate:!0}})]})]})};cw.propTypes={defaultTools:s.object.isRequired,customTools:s.array,isManageable:s.bool,baseUrl:s.string,gridPath:s.gridPath};function Bp({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:r}){var i,a;const o=(i=e.columns)==null?void 0:i.isManageable;return g.jsx(a1,{children:r?g.jsxs(g.Fragment,{children:[g.jsx(aw,{type:"toolbar"}),g.jsx(aw,{type:"grid"})]}):g.jsxs(ye,{sx:{position:"sticky"},children:[t&&g.jsx(cw,{...t,isManageable:o,pageSize:(a=e==null?void 0:e.pagination)==null?void 0:a.rowPerPage}),g.jsx(iw,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})})}Bp.propTypes={tableProps:s.object.isRequired,toolbarProps:s.object,isDefaultConfig:s.bool};const uw=({list:e,handleLinkClick:t})=>{const n=It(),r=({list:o})=>{var i;return(i=o==null?void 0:o.sort((a,l)=>a.order-l.order))==null?void 0:i.map((a,l)=>a!=null&&a.link?g.jsx(Fr,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):g.jsx(nt,{component:"h3",sx:{fontSize:"1rem",color:l===(o==null?void 0:o.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return g.jsx(L0,{separator:g.jsx(hn,{url:Ke.ArrowRight}),children:r({list:e})})};uw.propTypes={list:s.array.isRequired,handleLinkClick:s.func};const dw=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var o,i,a,l,c,u;const r=It();return g.jsxs(g.Fragment,{children:[g.jsxs(ft,{sx:{background:r.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[g.jsx(uw,{...e}),g.jsxs(ft,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&g.jsx(f1,{...t}),(n==null?void 0:n.filterBtnProps)&&g.jsxs(ft,{direction:"row",children:[g.jsx(yi,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:r.palette.primary.notifyBorderColor}}),g.jsxs(ft,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(o=n==null?void 0:n.filterBtnProps)==null?void 0:o.onFilterClick,sx:{cursor:"pointer"},children:[g.jsx(hn,{url:Ke.Filter}),g.jsx(nt,{sx:{fontSize:"1.1rem",color:r.palette.primary.notifyActiveText},children:(i=n==null?void 0:n.filterBtnProps)==null?void 0:i.label})]})]})]})]}),g.jsx(Gi.div,{layout:!0,initial:{height:"0rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:r.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:g.jsxs(ft,{sx:{background:r.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[g.jsx(nt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:r.palette.primary.notifyActiveText},children:"Filters:"}),g.jsx(ye,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:g.jsx(ft,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,f)=>g.jsx(g.Fragment,{children:g.jsxs(ye,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,background:r.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[g.jsx(ye,{component:"img",src:Ke.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),g.jsx(nt,{sx:{fontSize:"1rem",color:r.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},f)}))})}),g.jsx(ye,{component:nt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:r.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};dw.propTypes={breadcrumbProps:s.object.isRequired,switchProps:s.object};function fw({headerProps:e}){return g.jsx(Fn,{children:g.jsx(dw,{...e})})}fw.propTypes={headerProps:s.object.isRequired};const Lp=R.createContext(null),pw=R.createContext(null);function R7({children:e}){const[t,n]=R.useReducer(D7,I7);return g.jsx(Lp.Provider,{value:t,children:g.jsx(pw.Provider,{value:n,children:e})})}function D7(e,t){var n;switch(t.type){case qe.LOADING:return{...e,loading:t.loading};case qe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((r,o)=>new Date(o.createdAt)-new Date(r.createdAt))};case qe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case qe.ERROR:return{...e,error:t.error};default:throw new Error(`${Gr.UNHANDLED}: ${t}`)}}const I7={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Vp,BU_ID:Wp,SNOP_ID:hw}=Dp,{TENANT_IDS:zp,BU_IDS:Up}=Ca,A7=async e=>{try{const t=`${e}${$c.NOTIFICATION}/v1?${Vp}=${zp}&${Wp}=${Up}`;return await St.get(t,Sa)}catch(t){return t}},mw=async(e,t,n)=>{try{const r=n===K1.MARK_ALL_READ?"":`&${hw}=${n}&`,o=`${e}${$c.NOTIFICATION}${Mp.VERSION}?${Vp}=${zp}&${Wp}=${Up}${r}`;return await St.put(o,t,Sa)}catch(r){return r}},j7=async({baseUrl:e,id:t,snopId:n})=>{try{const r=`${e}${$c.NOTIFICATION}${Mp.VERSION}?${Vp}=${zp}&${Wp}=${Up}&${hw}=${n}&id=${t}`;return await St.get(r,Sa)}catch(r){return r}},Bc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500},gw=({baseUrl:e})=>{const t=R.useContext(pw),[n,r]=R.useState(!1),[o,i]=R.useState(!1),[a,l]=R.useState(!1),[c,u]=R.useState({}),[d,f]=R.useState(null),[p,h]=R.useState(1),[y,m]=R.useState(!1),[b,x]=R.useState(0),{loading:w,data:C,isMarkAllAsRead:O}=R.useContext(Lp),[v,k]=R.useState([]);R.useEffect(()=>{k(C)},[C]);const E=R.useCallback(async()=>{var j,F;try{t({type:qe.LOADING,loading:!0}),t({type:qe.SUCCESS,data:[]});const P=await A7(e);if(P.status===Bc.OK){const N=((F=(j=P.data)==null?void 0:j.responseData)==null?void 0:F.response)||[],L=Cc(N);t({type:qe.SUCCESS,data:Cc(L)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:i1(N),boo:i1(N)>0}})}}catch{t({type:qe.ERROR,error:Gr.SWR})}finally{t({type:qe.LOADING,loading:!1})}},[e,t]);R.useEffect(()=>{E();const j=setInterval(E,3e5);return()=>clearInterval(j)},[E]);const M=async(j,F)=>{var P,N,L;if(j){f(j);try{const H=await j7({baseUrl:e,id:j,snopId:F});if(H.status===Bc.OK){const V=((L=(N=(P=H.data)==null?void 0:P.responseData)==null?void 0:N.response)==null?void 0:L[0])||{};u(V||{}),l(!0)}else throw new Error}catch{t({type:qe.ERROR,error:Gr.SWR})}finally{f(null)}}},D=async(j,F)=>{if(j.length){t({type:qe.LOADING,loading:!0});try{if((await mw(e,j,F)).status===Bc.OK){const N=C.map(H=>j.includes(H.id)?{...H,isRead:!0}:H),L=N.filter(H=>!H.isRead).length;t({type:qe.SUCCESS,data:Cc(N)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:L,boo:L>0}}),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},200)}}catch{t({type:qe.ERROR,error:Gr.SWR}),t({type:qe.LOADING,loading:!1})}}},A=async()=>{t({type:qe.LOADING,loading:!0});try{const j=d8(C);if((await mw(e,j,K1.MARK_ALL_READ)).status===Bc.OK){const P=C.map(N=>({...N,isRead:!0}));t({type:qe.SUCCESS,data:Cc(P)}),t({type:qe.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}}),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},200)}}catch{t({type:qe.ERROR,error:Gr.SWR}),t({type:qe.LOADING,loading:!1})}},$=(j,F)=>{t({type:qe.LOADING,loading:!0}),x(F),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},400)},I=j=>{const F=j||C||[];return{0:F,1:F.filter(P=>(P==null?void 0:P.type)==="INFO"),2:F.filter(P=>(P==null?void 0:P.type)==="ERROR")}},W=()=>{t({type:qe.LOADING,loading:!0});const j=!y,F=j?(v||[]).filter(P=>!P.isRead):C||[];m(j),k(F),h(1),setTimeout(()=>{t({type:qe.LOADING,loading:!1})},400)};return{fetchNotification:E,showDetailsProps:{open:a,handleClose:()=>l(!1),setOpen:l,data:c,clickId:d},alertDialogProps:{open:n,handleClose:()=>r(!1),onRefresh:E,handleRead:D,handleMarkAllAsRead:A,setOpen:r,handleShowDetails:M,clickId:d,isMainDialog:!0},activeTab:b,loading:w,tabData:I(v)[b],data:v,mode:y,handleTabChange:$,toggleAlertMode:W,page:p,setPage:h,isMarkAllAsRead:O}};var yw,bw,vw;function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(null,arguments)}var N7=function(t){return S.createElement("svg",Hp({xmlns:"http://www.w3.org/2000/svg",width:16,height:17,fill:"none"},t),yw||(yw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 2.19c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V6.19c0-2.2-1.8-4-4-4Z"})),bw||(bw=S.createElement("path",{stroke:"#909090",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 2.383a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),vw||(vw=S.createElement("path",{stroke:"#909090",strokeMiterlimit:10,d:"M10.013 12.957c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})))};const $7=({count:e})=>(It(),g.jsxs(g.Fragment,{children:[g.jsx(ye,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center","& svg":{transform:"scale(1)"}},children:g.jsx(N7,{style:{scale:2}})}),g.jsx(C7,{badgeContent:e!=0?"":null,color:"error"})]}));function xw({children:e,handleClose:t,open:n,isMainDialog:r}){return g.jsx(kl,{open:n,onClose:t,...r?{scroll:"paper",PaperProps:{sx:{position:"fixed",top:30,right:30,m:0,width:400,height:450,display:"flex",flexDirection:"column",borderRadius:2,boxShadow:6,backgroundColor:o=>o.palette.primary.notifyBackground}}}:{fullWidth:!0,maxWidth:"md",sx:{"& .MuiPaper-root":{minHeight:250,maxHeight:500,borderRadius:"1.5rem",boxShadow:6,backgroundColor:o=>o.palette.primary.appBackground}}},children:e})}var ww;function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qp.apply(null,arguments)}var _7=function(t){return S.createElement("svg",qp({xmlns:"http://www.w3.org/2000/svg",width:14,height:9,fill:"none",viewBox:"0 0 13 9"},t),ww||(ww=S.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))},Cw,Sw;function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yp.apply(null,arguments)}var F7=function(t){return S.createElement("svg",Yp({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),Cw||(Cw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),Sw||(Sw=S.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},Tw;function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gp.apply(null,arguments)}var B7=function(t){return S.createElement("svg",Gp({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),Tw||(Tw=S.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const Ow=({type:e,item:t,handleShowDetails:n,handleRead:r,handleCTAClicked:o,clickId:i})=>{var c,u;const a=It(),l=(u=(c=JSON.parse(localStorage.getItem("settings")))==null?void 0:c.platform)==null?void 0:u.theme;return g.jsxs(ye,{className:"cards",sx:{pt:" 0.8rem"},children:[g.jsx(ft,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:g.jsx(nd,{sx:{width:"calc(100% - 2%)","& .MuiBadge-badge":{backgroundColor:"#6041EA",height:"0.5rem",minWidth:"0.5rem"}},variant:"dot",invisible:t==null?void 0:t.isRead,children:g.jsx(Oo,{sx:{color:a.palette.primary.notifyActiveText,whiteSpace:"normal",wordBreak:"break-word"},component:"p",className:["title-card",(t==null?void 0:t.isRead)&&"read"].join(" "),children:t==null?void 0:t.message})})}),g.jsx(ft,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:g.jsxs(ft,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[(t==null?void 0:t.isNotificationDetails)&&g.jsx(Fc,{icon:g.jsx(F7,{className:`${l==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:n,label:i===(t==null?void 0:t.id)?g.jsx(Ol,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{backgroundColor:a.palette.brandColor.orange,color:a.palette.brandColor.white}}),!(t!=null&&t.isRead)&&g.jsx(Fc,{icon:g.jsx(B7,{className:`${l==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:i,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.primaryCTAURL)&&g.jsx(Fc,{disabled:t==null?void 0:t.isPrimaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isPrimaryCTARedirect,isClicked:t==null?void 0:t.isPrimaryCTAClicked,url:t==null?void 0:t.primaryCTAURL}),label:t==null?void 0:t.primaryCTALabel,component:"button",variant:"outlined",clickable:!0,size:"small"}),(t==null?void 0:t.secondaryCTAURL)&&g.jsx(Fc,{disabled:t==null?void 0:t.isSecondaryCTAClicked,onClick:()=>o({redirect:t==null?void 0:t.isSecondaryCTARedirect,isClicked:t==null?void 0:t.isSecondaryCTAClicked,url:t==null?void 0:t.secondaryCTAURL}),label:t==null?void 0:t.secondaryCTALabel,component:"button",variant:"outlined",clickable:!0,size:"small"})]})}),g.jsxs(ft,{display:"flex",flexDirection:"row",alignItems:"center",gap:.35,children:[g.jsx(Oo,{sx:{fontSize:"0.8rem"},children:t==null?void 0:t.product}),g.jsx(Oo,{color:a.palette.primary.notifyTextColor,children:"•"}),g.jsx(Oo,{sx:{fontSize:"0.8rem"},children:u8(t==null?void 0:t.createdAt)})]})]})};Ow.propTypes={type:s.string,title:s.string,subTitle:s.string,isRead:s.bool,handleShowDetails:s.func,handleRead:s.func};const kw=({data:e,handleRead:t,handleShowDetails:n,clickId:r,mode:o,page:i,setPage:a})=>{const{isMarkAllAsRead:l}=R.useContext(Lp),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,f]=R.useState([]),[p,h]=R.useState(!1),[y,m]=R.useState(!0),b=R.useRef(null),x=async C=>{h(!0);const O=e.slice((C-1)*10,C*10);await new Promise(v=>setTimeout(v,1e3)),f(v=>{const k=O.filter(E=>!v.some(M=>M.id===E.id));return[...v,...k]}),h(!1),(d==null?void 0:d.length)>=(e==null?void 0:e.length)&&m(!1)};R.useEffect(()=>{var O;let C=[];o?l!=null&&l.count?C=(O=e==null?void 0:e.filter(v=>!v.isRead))==null?void 0:O.slice(0,10):C=[]:C=e.slice(0,10),(C==null?void 0:C.length)<10&&m(!1),f(C)},[e,o,l]),R.useEffect(()=>{y&&i!==1&&x(i)},[i,e]),R.useEffect(()=>{f([...e])},[e]),R.useEffect(()=>{const C=new IntersectionObserver(O=>{O[0].isIntersecting&&!p&&y&&a(v=>v+1)},{threshold:1});return b.current&&C.observe(b.current),()=>{b.current&&C.unobserve(b.current)}},[p,y]);const w=({redirect:C,isClicked:O,url:v})=>{window.open(v,"_blank")};return g.jsxs(ye,{sx:{width:"100%"},children:[Object.entries(h8(d)).map(([C,O])=>g.jsxs(R.Fragment,{children:[C!==u&&g.jsx(w7,{children:C}),O.map((v,k)=>g.jsx(R.Fragment,{children:g.jsx(Ow,{item:v,handleCTAClicked:w,handleShowDetails:()=>n(v.id,v.snopId),handleRead:()=>t([v.id],v.snopId),clickId:r})},`${k}_${v.id}`))]},C)),p&&i>1&&!!(d!=null&&d.length)&&g.jsx(ye,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:g.jsx(Ol,{size:20,sx:{color:C=>C.palette.primary.notifyIconColor}})}),!(d!=null&&d.length)&&g.jsx(nt,{sx:{fontSize:"1.1rem",color:C=>C.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),g.jsx(ye,{ref:b,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};kw.propTypes={data:s.array,handleRead:s.func,handleShowDetails:s.func};const L7=({onRefresh:e,handleShowDetails:t,clickId:n,handleRead:r,handleMarkAllAsRead:o})=>{var y,m,b,x;const{loading:i,activeTab:a,data:l,tabData:c,mode:u,page:d,setPage:f,handleTabChange:p,toggleAlertMode:h}=gw({});return g.jsxs(g.Fragment,{children:[g.jsxs(ye,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,pt:2},children:[g.jsx(nt,{variant:"h2",sx:{fontSize:"1.2rem",color:w=>w.palette.primary.notifyTextColor},children:"Notifications"}),g.jsx(ye,{onClick:e,children:g.jsx(hn,{url:Ke.Refresh,alt:"refresh",sx:{cursor:"pointer"}})})]}),g.jsx(ye,{sx:{borderBottom:1,m:"1.2rem 1.2rem 0 1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},children:g.jsxs(S7,{value:a,onChange:p,children:[g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["All (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((y=l==null?void 0:l.filter(w=>!(w!=null&&w.isRead)))==null?void 0:y.length)||0}),")"]})}),g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["Info (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((m=l==null?void 0:l.filter(w=>(w==null?void 0:w.type)==="INFO"&&!(w!=null&&w.isRead)))==null?void 0:m.length)||0}),")"]}),sx:{color:w=>w.palette.brandColor.blue}}),g.jsx(Fp,{label:g.jsxs(ye,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["Error (",g.jsx(nt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((b=l==null?void 0:l.filter(w=>(w==null?void 0:w.type)==="ERROR"&&!(w!=null&&w.isRead)))==null?void 0:b.length)||0}),")"]}),sx:{color:w=>w.palette.brandColor.red}})]})}),g.jsx(Pl,{dividers:!0,sx:{p:0,...i&&!c.length&&{alignItems:"center",justifyContent:"center"},flexGrow:1,overflowY:"auto",mx:"1.2rem",borderColor:w=>w.palette.primary.notifyBorderColor},tabIndex:-1,children:i?g.jsx(Ol,{size:30,sx:{color:w=>w.palette.primary.notifyIconColor}}):g.jsx(g.Fragment,{children:g.jsx(kw,{data:c,handleShowDetails:t,handleRead:r,clickId:n,page:d,setPage:f,mode:u})})}),g.jsxs(El,{sx:{justifyContent:"space-between",px:"1.2rem"},children:[g.jsxs(ft,{direction:"row",gap:1,children:[g.jsx(Oo,{sx:{fontSize:"1rem"},children:"Only show unread"}),g.jsx(x7,{disabled:i,checked:u,onChange:h})]}),g.jsx(Hn,{variant:"outlined",className:"view-all",onClick:o,startIcon:g.jsx(_7,{}),disabled:!((x=l==null?void 0:l.filter(w=>!(w!=null&&w.isRead)))!=null&&x.length),style:{backgroundColor:"transparent"},sx:{fontSize:"1rem",fontWeight:"300",p:0,border:"none",textTransform:"none",color:w=>w.palette.primary.notifyTextColor,"&:hover":{color:w=>w.palette.primary.notifyActiveText,background:"transparent",boxShadow:"none",border:"none"},"&.Mui-disabled":{opacity:.5,color:w=>`${w.palette.primary.notifyActiveText}!important`,background:"transparent",boxShadow:"none",border:"none"}},children:"Mark all as read"})]})]})},V7=({data:e,handleClose:t})=>{var b;const[n,r]=R.useState(1),[o,i]=R.useState(10),[a,l]=R.useState(((b=e==null?void 0:e.notificationDetails)==null?void 0:b.length)||0),[c,u]=R.useState("sku_name"),[d,f]=R.useState("asc"),[p,h]=R.useState([]),[y,m]=R.useState("");return R.useEffect(()=>{var x;if(y||c){const w=f8(e==null?void 0:e.notificationDetails,a7,y);if(c){const C=p8(w,c,d?"asc":"desc");h(pp(C,n,o)),l(C.length);return}h(pp(w,n,o)),l(w.length);return}h(pp(e==null?void 0:e.notificationDetails,n,o)),l((x=e==null?void 0:e.notificationDetails)==null?void 0:x.length)},[y,e==null?void 0:e.notificationDetails,n,o,d,c]),g.jsxs(g.Fragment,{children:[g.jsxs(ft,{direction:"row",justifyContent:"space-between",sx:{padding:"1.5rem 2rem",borderBottom:"0.1rem solid",borderColor:x=>x.palette.primary.notifyBorderColor},children:[g.jsx(nt,{component:"h2",sx:{fontSize:"1.4rem",color:x=>x.palette.primary.notifyActiveText},children:(e==null?void 0:e.message)||""}),g.jsx(ye,{onClick:t,sx:{cursor:"pointer"},children:g.jsx(hn,{url:Ke.CloseCircle})})]}),g.jsx(Pl,{children:g.jsx(Bp,{tableProps:{data:p,columns:{...y7(),isManageable:!1},sort:{sortField:c,sortDir:d,onSort:x=>{var C;const w=(C=x==null?void 0:x.column)==null?void 0:C.key;f(O=>c===w&&O==="asc"?"desc":"asc"),u(w)}},pagination:{selectedPage:n,rowPerPage:o,totalRecords:a,onPageChange:x=>{r(x)},onPageSizeChange:x=>{i(x==null?void 0:x.value),r(1)}}},toolbarProps:{defaultTools:{search:{isRequired:!0,onChange:x=>{const w=x.target.value;w&&r(1),m(w)},placeholder:"Search..."}}}})}),g.jsx(El,{sx:{padding:"1.5rem 2rem"}})]})},W7=({baseUrl:e})=>{const{alertDialogProps:t,showDetailsProps:n,fetchNotification:r,isMarkAllAsRead:o}=gw({baseUrl:e});return g.jsxs(g.Fragment,{children:[g.jsx(ye,{sx:{display:"flex",justifyContent:"center",cursor:"pointer",marginTop:"0.6rem"},onClick:()=>{var i;r(),(i=t==null?void 0:t.setOpen)==null||i.call(t,!0)},children:g.jsx($7,{count:o.count})}),g.jsx(xw,{...t,children:g.jsx(L7,{...t})}),g.jsx(xw,{...n,children:g.jsx(V7,{...n})})]})},z7=({baseUrl:e})=>g.jsx(Fn,{children:g.jsx(R7,{children:g.jsx(W7,{baseUrl:e})})}),U7=({rightChild:e,leftChild:t,isDrawerMerged:n,isDrawerOpen:r,drawerTitle:o,showExpand:i,onCloseClick:a,onMergeClick:l,onExpandClick:c,isDrawerExpanded:u,styles:d,showMerge:f})=>{const p=It();return g.jsx(ye,{sx:{position:"relative",overflow:"hidden"},children:g.jsxs(ao,{container:!0,sx:{height:"100%"},children:[g.jsx(ao,{item:!0,sx:{width:n?d!=null&&d.drawerWidth?`calc(${"100%"-(d==null?void 0:d.drawerWidth)})`:"75%":"100%",position:"relative",zIndex:3,height:"calc(100vh - 7rem)",p:"0rem 1.5rem",overflow:"auto"},children:t}),r&&!n&&g.jsxs(g.Fragment,{children:[g.jsx(ye,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#07080B80",backdropFilter:"blur(3px)",zIndex:3,transition:"opacity 0.3s ease-in-out"}}),g.jsx(ye,{onClick:a,sx:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"transparent",zIndex:4}})]}),e&&g.jsxs(ao,{item:!0,sx:{width:u?"90%":(d==null?void 0:d.drawerWidth)||"25%",position:n?"relative":"absolute",top:0,right:0,height:"calc(100vh - 7rem)",backgroundColor:p.palette.primary.notifyBackground,transform:r?"translateX(0)":"translateX(100%)",transition:"transform 0.4s ease-in-out , width 0.4s ease-in-out",zIndex:4,borderLeft:`0.1rem solid ${p.palette.primary.notifyBorderColor}`,display:"flex",flexDirection:"column"},children:[g.jsxs(ft,{direction:"row",alignItems:"center",sx:{width:"100%",flexShrink:0,paddingBottom:"0.8rem",px:2,pt:"0.8rem",borderBottom:h=>`0.1rem solid ${h.palette.primary.notifyBorderColor}`},children:[!u&&f&&g.jsxs(g.Fragment,{children:[g.jsx(ye,{component:"img",src:Ke.Merge,sx:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"},onClick:l}),g.jsx(yi,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"auto!important",borderColor:p.palette.primary.notifyBorderColor}})]}),g.jsxs(ft,{direction:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1,children:[g.jsxs(ft,{direction:"row",gap:"0.5rem",alignItems:"center",onClick:a,sx:{cursor:"pointer"},children:[g.jsx(hn,{url:Ke.CrossLight}),g.jsx(nt,{sx:{fontSize:"1.2rem",color:p.palette.primary.notifyTextColor},children:o})]}),g.jsx(ft,{direction:"row",gap:"0.5rem",alignItems:"center",children:i&&g.jsx(ye,{onClick:c,sx:{cursor:"pointer"},children:g.jsx(ye,{component:"img",src:u?Ke.Collapse:Ke.Expand})})})]})]}),g.jsx(ye,{sx:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},overflow:"auto",px:2},children:e})]})]})})},Ew=({layoutChildren:e,layoutProps:t})=>g.jsx(Fn,{children:g.jsx(U7,{...e,...t})});Ew.propTypes={layoutChildren:s.object.isRequired,layoutProps:s.object.isRequired},vt.Button=mo,vt.Checkbox=sc,vt.DatePicker=l8,vt.Grid=Bp,vt.Header=fw,vt.InputField=s1,vt.Loader=N8,vt.Notification=z7,vt.Select=l1,vt.SliderLayout=Ew,vt.Switch=f1,vt.TextField=xc,vt.ToastProvider=R8,vt.toast=k8,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});
327
327
  //# sourceMappingURL=index.umd.js.map