groovinads-ui 1.9.832 → 1.9.834
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.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import t,{createContext as n,useEffect as r,useRef as a,useContext as o,useState as i,useLayoutEffect as s,useId as l,useCallback as c,useMemo as u,Fragment as d,createElement as p,useInsertionEffect as h,forwardRef as m,Component as f,cloneElement as g,createRef as y}from"react";import v from"react-bootstrap/Dropdown";import{jsxs as w,jsx as b}from"react/jsx-runtime";import x from"js-cookie";import k from"axios";import{Dropdown as E,Modal as D,ToastContainer as S,ProgressBar as C,Toast as T,Offcanvas as M,Row as P,Col as N,DropdownItem as O,Collapse as L,Nav as R}from"react-bootstrap";import*as A from"react-dom";import _,{findDOMNode as F}from"react-dom";import I from"react-bootstrap/Toast";import Y from"react-bootstrap/Container";function V(){}function B(){}B.resetWarningCache=V;var W,j,H=(W=function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:B,resetWarningCache:V};return n.PropTypes=n,n}()},W(j={exports:{}},j.exports),j.exports),$=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,q=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,U=/^(?:(min|max)-)?(.+)/,K=/(em|rem|px|cm|mm|in|pt|pc)?$/,z=/(dpi|dpcm|dppx)?$/;function Q(e){return e.split(",").map((function(e){var t=(e=e.trim()).match($),n=t[1],r=t[2],a=t[3]||"",o={};return o.inverse=!!n&&"not"===n.toLowerCase(),o.type=r?r.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map((function(e){var t=e.match(q),n=t[1].toLowerCase().match(U);return{modifier:n[1],feature:n[2],value:t[2]}})),o}))}function X(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function G(e){var t=parseFloat(e);switch(String(e).match(z)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function Z(e){var t=parseFloat(e);switch(String(e).match(K)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}var J={match:function(e,t){return Q(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var a=e.expressions.every((function(e){var n=e.feature,r=e.modifier,a=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===a.toLowerCase();case"width":case"height":case"device-width":case"device-height":a=Z(a),o=Z(o);break;case"resolution":a=G(a),o=G(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=X(a),o=X(o);break;case"grid":case"color":case"color-index":case"monochrome":a=parseInt(a,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=a;case"max":return o<=a;default:return o===a}}));return a&&!n||!a&&n}))},parse:Q}.match,ee="undefined"!=typeof window?window.matchMedia:null;function te(e,t,n){var r,a=this;function o(e){a.matches=e.matches,a.media=e.media}ee&&!n&&(r=ee.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(o)):(this.matches=J(e,t),this.media=e),this.addListener=function(e){r&&r.addListener(e)},this.removeListener=function(e){r&&r.removeListener(e)},this.dispose=function(){r&&r.removeListener(o)}}var ne=function(e,t,n){return new te(e,t,n)},re=/[A-Z]/g,ae=/^ms-/,oe={};function ie(e){return"-"+e.toLowerCase()}function se(e){if(oe.hasOwnProperty(e))return oe[e];var t=e.replace(re,ie);return oe[e]=ae.test(t)?"-"+t:t}const le=H.oneOfType([H.string,H.number]),ce={all:H.bool,grid:H.bool,aural:H.bool,braille:H.bool,handheld:H.bool,print:H.bool,projection:H.bool,screen:H.bool,tty:H.bool,tv:H.bool,embossed:H.bool},ue={orientation:H.oneOf(["portrait","landscape"]),scan:H.oneOf(["progressive","interlace"]),aspectRatio:H.string,deviceAspectRatio:H.string,height:le,deviceHeight:le,width:le,deviceWidth:le,color:H.bool,colorIndex:H.bool,monochrome:H.bool,resolution:le,type:Object.keys(ce)},{type:de,...pe}=ue,he={minAspectRatio:H.string,maxAspectRatio:H.string,minDeviceAspectRatio:H.string,maxDeviceAspectRatio:H.string,minHeight:le,maxHeight:le,minDeviceHeight:le,maxDeviceHeight:le,minWidth:le,maxWidth:le,minDeviceWidth:le,maxDeviceWidth:le,minColor:H.number,maxColor:H.number,minColorIndex:H.number,maxColorIndex:H.number,minMonochrome:H.number,maxMonochrome:H.number,minResolution:le,maxResolution:le,...pe};var me={all:{...ce,...he},types:ce,matchers:ue,features:he};const fe=e=>{const t=[];return Object.keys(me.all).forEach((n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=se(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))})),t.join(" and ")},ge=n(void 0),ye=e=>{if(!e)return;return Object.keys(e).reduce(((t,n)=>(t[se(n)]=e[n],t)),{})},ve=()=>{const e=a(!1);return r((()=>{e.current=!0}),[]),e.current},we=e=>{const t=o(ge),n=()=>ye(e)||ye(t),[a,s]=i(n);return r((()=>{const e=n();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),a=n.length;if(r.length!==a)return!1;for(let r=0;r<a;r++){const a=n[r];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0})(a,e)||s(e)}),[e,t]),a},be=e=>{const t=()=>(e=>e.query||fe(e))(e),[n,a]=i(t);return r((()=>{const e=t();n!==e&&a(e)}),[e]),n},xe=(e,t,n)=>{const a=we(t),o=be(e);if(!o)throw new Error("Invalid or missing MediaQuery!");const s=((e,t)=>{const n=()=>ne(e,t||{},!!t),[a,o]=i(n),s=ve();return r((()=>{if(s){const e=n();return o(e),()=>{e&&e.dispose()}}}),[e,t]),a})(o,a),l=(e=>{const[t,n]=i(e.matches);return r((()=>{const t=e=>{n(e.matches)};return e.addListener(t),n(e.matches),()=>{e.removeListener(t)}}),[e]),t})(s),c=ve();return r((()=>{c&&n&&n(l)}),[l]),r((()=>()=>{s&&s.dispose()}),[]),l},ke=({animation:e="",className:n="",name:r="font-awesome",scale:a=1,style:o="solid"})=>{const i=`fa-${o}`,s=`fa-${r}`;let l,c;switch(a){case.7:l="icon-07x";break;case 1:l="icon-1x";break;case 2:l="icon-2x";break;case 3:l="icon-3x";break;case 4:l="icon-4x";break;default:l=""}switch(e){case"beat":c="fa-beat";break;case"fade":c="fa-fade";break;case"beat-fade":c="fa-beat-fade";break;case"bounce":c="fa-bounce";break;case"flip":c="fa-flip";break;case"shake":c="fa-shake";break;case"spin":c="fa-spin";break;case"spin-reverse":c="fa-spin fa-spin-reverse";break;default:c=""}return t.createElement("i",{className:`${i} ${s} ${l} ${c} ${n}`,"aria-hidden":"true"})};ke.propTypes={animation:H.oneOf(["beat","fade","beat-fade","bounce","flip","shake","spin","spin-reverse"]),className:H.string,name:H.string,scale:H.oneOf([.7,1,2,3,4]),style:H.oneOf(["light","solid","regular","thin","duotone","sharp","brands"])};const Ee=({animation:e=!1,children:n,className:r="",icon:a=!0,onClose:o=null,size:i="md",type:s="info"})=>t.createElement("div",{className:`alert ${e?"alert-animation":""} alert-${s} alert-${i} ${r}`,role:"alert"},t.createElement("div",{className:"alert-wrapper"},a&&t.createElement(ke,{style:"solid",name:{info:"circle-info",success:"check",warning:"triangle-exclamation",danger:"circle-xmark"}[s]}),t.createElement("span",null,n)),o&&t.createElement("button",{onClick:o,className:"btn-close"},t.createElement(ke,{style:"solid",name:"xmark"})));Ee.propTypes={animation:H.bool,children:H.node.isRequired,className:H.string,icon:H.bool,onClose:H.func,size:H.oneOf(["xs","md","lg"]),type:H.oneOf(["warning","danger","success","info"]).isRequired};const De=({as:e="",className:n="",onChange:o,onSave:s,value:l})=>{const[c,u]=i(!1),[d,p]=i(l),[h,m]=i(!1),[f,g]=i(!1),[y,v]=i({}),w=a(null),b=a(null),x=async e=>{try{if(""===e.trim())return o(d),void u(!1);await s(e),m(!0),u(!1),setTimeout((()=>{m(!1)}),2e3)}catch(e){throw g(!0),u(!1),setTimeout((()=>{g(!1)}),2e3),e}};r((()=>{c&&w.current&&w.current.focus()}),[c]),r((()=>{if(b.current&&!c){const e=window.getComputedStyle(b.current),t=parseFloat(e.width)+2*parseFloat(e.fontSize);v({fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,width:`${t}px`})}}),[c]);const k=()=>t.createElement("svg",{className:"success-check-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("circle",{cx:"8",cy:"8",r:"7.07",stroke:"currentColor",strokeWidth:"1.4",className:"success-circle"}),t.createElement("polyline",{points:"5.34 9.23 7.03 10.94 10.71 5.82",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",className:"success-check"}));return t.createElement("div",{className:`editable-content ${h?"success":""} ${n}`,onClick:()=>{h||(p(l),u(!0))}},c?t.createElement("input",{type:"text",value:l,ref:w,onBlur:()=>{u(!1),l!==d&&x(l)},onChange:({target:e})=>{o(e.value)},onKeyDown:e=>{"Enter"===e.key?(x(l),u(!1)):"Escape"===e.key&&(o(d),u(!1))},style:y}):t.createElement("div",{className:"editable-content-display",style:{fontSize:y.fontSize}},t.createElement(e,{className:f?"error":"",ref:b},l),h&&t.createElement("div",{className:"success-animation"},t.createElement(k,null))))};De.propTypes={as:H.string.isRequired,className:H.string,onChange:H.func.isRequired,onSave:H.func.isRequired,value:H.string};const Se=({logo:e="groovinads",className:n=""})=>t.createElement("div",{className:`login-source ${e||""} ${n}`,"aria-label":`${e} logo`});Se.propTypes={className:H.string,logo:H.oneOf(["groovinads","google","microsoft","linkedin","slack"])};const Ce=({children:e,className:n="",closeButton:r=!1,color:a="neutral",disabled:o=!1,onClick:i})=>t.createElement("div",{className:`pill ${a} ${n} ${o?"disabled":""}`},t.createElement("span",null,e),r&&t.createElement("button",{onClick:i},t.createElement(ke,{style:"solid",name:"xmark",scale:.7})));Ce.propTypes={className:H.string,closeButton:H.bool,color:H.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),disabled:H.bool,onClick:H.func};const Te=({className:e="",scale:n=1})=>t.createElement(ke,{name:"spinner-third",scale:n,animation:"spin",className:e});Te.propTypes={className:H.string,scale:H.oneOf([.7,1,2,3,4])};const Me=({animated:e=!1,className:n="",status:r=0})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:3===r?"0 0 24 16":"0 0 16 16",className:`status-icon ${(e=>{switch(e){case 1:return"active";case 3:return"active-warning";case 4:return"warning";case 5:return"danger";default:return""}})(r)} ${n} ${e?"animated":""}`},t.createElement("circle",{cx:3===r?"12":"8",cy:"8",r:"8"}),(()=>{switch(r){case 1:return t.createElement(t.Fragment,null,t.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),t.createElement("polyline",{className:"line-front",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}));case 3:return t.createElement(t.Fragment,null,t.createElement("path",{d:"M3.5304 1.14718C4.00269 1.4241 4.13257 1.9886 3.83739 2.37202C2.69207 4.0229 2.01906 5.94004 2.01906 7.96369C2.01906 9.98735 2.69207 11.979 3.83739 13.5873C4.14438 14.0133 4.00269 14.5778 3.5304 14.8548C3.0581 15.1317 2.43231 15.0039 2.13713 14.5459C0.779285 12.682 0 10.424 0 7.96369C0 5.50336 0.779285 3.31995 2.12532 1.41345C2.43231 0.998071 3.0581 0.870262 3.5304 1.14718Z"}),t.createElement("path",{d:"M20.4682 1.14658C20.9391 0.869859 21.5631 0.997576 21.8692 1.4233C23.223 3.31777 24 5.5741 24 7.96879C24 10.3635 23.223 12.6837 21.8692 14.5462C21.5631 15.0039 20.9391 15.1316 20.4682 14.8549C19.9973 14.5781 19.8678 14.0141 20.1621 13.5883C21.3158 11.9812 21.9751 10.0655 21.9751 7.96879C21.9751 5.87211 21.3158 4.03085 20.1621 2.38118C19.856 1.98738 19.9973 1.4233 20.4682 1.15722V1.14658Z"}),t.createElement("path",{d:"M12 12C12.5523 12 13 11.5523 13 11C13 10.4477 12.5523 10 12 10C11.4477 10 11 10.4477 11 11C11 11.5523 11.4477 12 12 12Z"}),t.createElement("path",{d:"M12 3C12.5465 3 13 3.3986 13 3.9021V8.0979C13 8.59091 12.5581 9 12 9C11.4419 9 11 8.6014 11 8.0979V3.9021C11 3.40909 11.4419 3 12 3Z"}));default:return null}})());Me.propTypes={animated:H.bool,className:H.string,status:H.number.isRequired};const Pe=({children:e,className:n="",disabled:r=!1,endIcon:a,hideLabelOnMobile:o=!1,onClick:i,processing:s=!1,size:l="md",startIcon:c,style:u="default",variant:d="primary"})=>{const p=xe({query:"(max-width: 768px)"}),h=s?t.createElement(t.Fragment,null,t.createElement(Te,{scale:1}),e&&t.createElement("span",null,e,"…")):t.createElement(t.Fragment,null,c&&t.createElement(ke,{style:"solid",name:c,scale:1}),e&&!(p&&o)&&t.createElement("span",null,e),a&&t.createElement(ke,{style:"solid",name:a,scale:1}));return t.createElement("button",{className:`btn ${n}\n btn-${d}\n btn-${u}\n btn-${l}\n ${s?"btn-processing":""}\n ${r?"disabled":""}`,onClick:i},h)};function Ne(){return Ne=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},Ne.apply(null,arguments)}Pe.propTypes={children:H.node,className:H.string,disabled:H.bool,endIcon:H.string,hideLabelOnMobile:H.bool,onClick:H.func,processing:H.bool,size:H.oneOf(["xs","md","lg"]),startIcon:H.string,style:H.oneOf(["default","success","danger","warning","link"]),variant:H.oneOf(["primary","secondary","terciary","outline"])};const Oe=n({});const Le="undefined"!=typeof window,Re=Le?s:r,Ae=n(null);function _e(e,t){-1===e.indexOf(t)&&e.push(t)}function Fe(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ie=(e,t,n)=>n>t?t:n<e?e:n;let Ye=()=>{};const Ve={},Be=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function We(e){return"object"==typeof e&&null!==e}const je=e=>/^0[^.\s]+$/u.test(e);function He(e){let t;return()=>(void 0===t&&(t=e()),t)}const $e=e=>e,qe=(e,t)=>n=>t(e(n)),Ue=(...e)=>e.reduce(qe),Ke=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class ze{constructor(){this.subscriptions=[]}add(e){return _e(this.subscriptions,e),()=>Fe(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qe=e=>1e3*e,Xe=e=>e/1e3;function Ge(e,t){return t?e*(1e3/t):0}const Ze=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Je=1e-7,et=12;function tt(e,t,n,r){if(e===t&&n===r)return $e;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=Ze(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>Je&&++s<et);return i}(t,0,1,e,n);return e=>0===e||1===e?e:Ze(a(e),t,r)}const nt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rt=e=>t=>1-e(1-t),at=tt(.33,1.53,.69,.99),ot=rt(at),it=nt(ot),st=e=>(e*=2)<1?.5*ot(e):.5*(2-Math.pow(2,-10*(e-1))),lt=e=>1-Math.sin(Math.acos(e)),ct=rt(lt),ut=nt(lt),dt=tt(.42,0,1,1),pt=tt(0,0,.58,1),ht=tt(.42,0,.58,1),mt=e=>Array.isArray(e)&&"number"==typeof e[0],ft={linear:$e,easeIn:dt,easeInOut:ht,easeOut:pt,circIn:lt,circInOut:ut,circOut:ct,backIn:ot,backInOut:it,backOut:at,anticipate:st},gt=e=>{if(mt(e)){Ye(4===e.length);const[t,n,r,a]=e;return tt(t,n,r,a)}return"string"==typeof e?(Ye(void 0!==ft[e]),ft[e]):e},yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],vt={value:null,addProjectionMetrics:null};function wt(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=yt.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,a=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){i.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,o=!1)=>{const s=o&&a?n:r;return t&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{s=e,a?o=!0:(a=!0,[n,r]=[r,n],n.forEach(c),t&&vt.value&&vt.value.frameloop[t].push(l),l=0,n.clear(),a=!1,o&&(o=!1,u.process(e)))}};return u}(o,t?n:void 0),e)),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:h,postRender:m}=i,f=()=>{const o=Ve.useManualTiming?a.timestamp:performance.now();n=!1,Ve.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(o-a.timestamp,40),1)),a.timestamp=o,a.isProcessing=!0,s.process(a),l.process(a),c.process(a),u.process(a),d.process(a),p.process(a),h.process(a),m.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:yt.reduce(((t,o)=>{const s=i[o];return t[o]=(t,o=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(f)),s.schedule(t,o,i)),t}),{}),cancel:e=>{for(let t=0;t<yt.length;t++)i[yt[t]].cancel(e)},state:a,steps:i}}const{schedule:bt,cancel:xt,state:kt,steps:Et}=wt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:$e,!0);let Dt;function St(){Dt=void 0}const Ct={now:()=>(void 0===Dt&&Ct.set(kt.isProcessing||Ve.useManualTiming?kt.timestamp:performance.now()),Dt),set:e=>{Dt=e,queueMicrotask(St)}},Tt=e=>t=>"string"==typeof t&&t.startsWith(e),Mt=Tt("--"),Pt=Tt("var(--"),Nt=e=>!!Pt(e)&&Ot.test(e.split("/*")[0].trim()),Ot=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Rt={...Lt,transform:e=>Ie(0,1,e)},At={...Lt,default:1},_t=e=>Math.round(1e5*e)/1e5,Ft=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const It=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yt=(e,t)=>n=>Boolean("string"==typeof n&&It.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Vt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(Ft);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Bt={...Lt,transform:e=>Math.round((e=>Ie(0,255,e))(e))},Wt={test:Yt("rgb","red"),parse:Vt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bt.transform(e)+", "+Bt.transform(t)+", "+Bt.transform(n)+", "+_t(Rt.transform(r))+")"};const jt={test:Yt("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Wt.transform},Ht=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Ht("deg"),qt=Ht("%"),Ut=Ht("px"),Kt=Ht("vh"),zt=Ht("vw"),Qt=(()=>({...qt,parse:e=>qt.parse(e)/100,transform:e=>qt.transform(100*e)}))(),Xt={test:Yt("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qt.transform(_t(t))+", "+qt.transform(_t(n))+", "+_t(Rt.transform(r))+")"},Gt={test:e=>Wt.test(e)||jt.test(e)||Xt.test(e),parse:e=>Wt.test(e)?Wt.parse(e):Xt.test(e)?Xt.parse(e):jt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Wt.transform(e):Xt.transform(e),getAnimatableNone:e=>{const t=Gt.parse(e);return t.alpha=0,Gt.transform(t)}},Zt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Jt="number",en="color",tn="var",nn="var(",rn="${}",an=/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 on(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const i=t.replace(an,(e=>(Gt.test(e)?(r.color.push(o),a.push(en),n.push(Gt.parse(e))):e.startsWith(nn)?(r.var.push(o),a.push(tn),n.push(e)):(r.number.push(o),a.push(Jt),n.push(parseFloat(e))),++o,rn))).split(rn);return{values:n,split:i,indexes:r,types:a}}function sn(e){return on(e).values}function ln(e){const{split:t,types:n}=on(e),r=t.length;return e=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],void 0!==e[o]){const t=n[o];a+=t===Jt?_t(e[o]):t===en?Gt.transform(e[o]):e[o]}return a}}const cn=e=>"number"==typeof e?0:Gt.test(e)?Gt.getAnimatableNone(e):e;const un={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Ft)?.length||0)+(e.match(Zt)?.length||0)>0},parse:sn,createTransformer:ln,getAnimatableNone:function(e){const t=sn(e);return ln(e)(t.map(cn))}};function dn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pn(e,t){return n=>n>0?t:e}const hn=(e,t,n)=>e+(t-e)*n,mn=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},fn=[jt,Wt,Xt];function gn(e){const t=(n=e,fn.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Xt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;a=dn(s,r,e+1/3),o=dn(s,r,e),i=dn(s,r,e-1/3)}else a=o=i=n;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}const yn=(e,t)=>{const n=gn(e),r=gn(t);if(!n||!r)return pn(e,t);const a={...n};return e=>(a.red=mn(n.red,r.red,e),a.green=mn(n.green,r.green,e),a.blue=mn(n.blue,r.blue,e),a.alpha=hn(n.alpha,r.alpha,e),Wt.transform(a))},vn=new Set(["none","hidden"]);function wn(e,t){return n=>hn(e,t,n)}function bn(e){return"number"==typeof e?wn:"string"==typeof e?Nt(e)?pn:Gt.test(e)?yn:En:Array.isArray(e)?xn:"object"==typeof e?Gt.test(e)?yn:kn:pn}function xn(e,t){const n=[...e],r=n.length,a=e.map(((e,n)=>bn(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function kn(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=bn(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const En=(e,t)=>{const n=un.createTransformer(t),r=on(e),a=on(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?vn.has(e)&&!a.values.length||vn.has(t)&&!r.values.length?function(e,t){return vn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Ue(xn(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],i=e.indexes[o][r[o]],s=e.values[i]??0;n[a]=s,r[o]++}return n}(r,a),a.values),n):pn(e,t)};function Dn(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return hn(e,t,n);return bn(e)(e,t)}const Sn=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>bt.update(t,e),stop:()=>xt(t),now:()=>kt.isProcessing?kt.timestamp:Ct.now()}},Cn=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let t=0;t<a;t++)r+=Math.round(1e4*e(t/(a-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tn=2e4;function Mn(e){let t=0;let n=e.next(t);for(;!n.done&&t<Tn;)t+=50,n=e.next(t);return t>=Tn?1/0:t}const Pn=5;function Nn(e,t,n){const r=Math.max(t-Pn,0);return Ge(n-e(r),t-r)}const On={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},Ln=.001;function Rn({duration:e=On.duration,bounce:t=On.bounce,velocity:n=On.velocity,mass:r=On.mass}){let a,o,i=1-t;i=Ie(On.minDamping,On.maxDamping,i),e=Ie(On.minDuration,On.maxDuration,Xe(e)),i<1?(a=t=>{const r=t*i,a=r*e,o=r-n,s=_n(t,i),l=Math.exp(-a);return Ln-o/s*l},o=t=>{const r=t*i*e,o=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=_n(Math.pow(t,2),i);return(-a(t)+Ln>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-Ln,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<An;n++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=Qe(e),isNaN(s))return{stiffness:On.stiffness,damping:On.damping,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}const An=12;function _n(e,t){return e*Math.sqrt(1-t*t)}const Fn=["duration","bounce"],In=["stiffness","damping","mass"];function Yn(e,t){return t.some((t=>void 0!==e[t]))}function Vn(e=On.visualDuration,t=On.bounce){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:h}=function(e){let t={velocity:On.velocity,stiffness:On.stiffness,damping:On.damping,mass:On.mass,isResolvedFromDuration:!1,...e};if(!Yn(e,In)&&Yn(e,Fn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*Ie(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:On.mass,stiffness:a,damping:o}}else{const n=Rn(e);t={...t,...n,mass:On.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Xe(n.velocity||0)}),m=p||0,f=c/(2*Math.sqrt(l*u)),g=i-o,y=Xe(Math.sqrt(l/u)),v=Math.abs(g)<5;let w;if(r||(r=v?On.restSpeed.granular:On.restSpeed.default),a||(a=v?On.restDelta.granular:On.restDelta.default),f<1){const e=_n(y,f);w=t=>{const n=Math.exp(-f*y*t);return i-n*((m+f*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)w=e=>i-Math.exp(-y*e)*(g+(m+y*g)*e);else{const e=y*Math.sqrt(f*f-1);w=t=>{const n=Math.exp(-f*y*t),r=Math.min(e*t,300);return i-n*((m+f*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:h&&d||null,next:e=>{const t=w(e);if(h)s.done=e>=d;else{let n=0===e?m:0;f<1&&(n=0===e?Qe(m):Nn(w,e,t));const o=Math.abs(n)<=r,l=Math.abs(i-t)<=a;s.done=o&&l}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(Mn(b),Tn),t=Cn((t=>b.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return b}function Bn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const f=d+m,g=void 0===i?f:i(f);g!==f&&(m=g-d);const y=e=>-m*Math.exp(-e/r),v=e=>g+y(e),w=e=>{const t=y(e),n=v(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let b,x;const k=e=>{var t;(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(b=e,x=Vn({keyframes:[p.value,h(p.value)],velocity:Nn(v,e,p.value),damping:a,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==b||(t=!0,w(e),k(e)),void 0!==b&&e>=b?x.next(e-b):(!t&&w(e),p)}}}function Wn(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(Ye(o===t.length),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],a=n||Ve.mix||Dn,o=e.length-1;for(let n=0;n<o;n++){let o=a(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||$e:t;o=Ue(e,o)}r.push(o)}return r}(t,r,a),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=Ke(e[r],e[r+1],n);return s[r](a)};return n?t=>c(Ie(e[0],e[o-1],t)):c}function jn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Ke(0,t,r);e.push(hn(n,1,a))}}(t,e.length-1),t}function Hn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gt):gt(r),o={done:!1,value:t[0]},i=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:jn(t),e),s=Wn(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map((()=>c||ht)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}Vn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Mn(r),Tn);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:Xe(a)}}(e,100,Vn);return e.ease=t.ease,e.duration=Qe(t.duration),e.type="keyframes",e};const $n=e=>null!==e;function qn(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter($n),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const Un={decay:Bn,inertia:Bn,tween:Hn,keyframes:Hn,spring:Vn};function Kn(e){"string"==typeof e.type&&(e.type=Un[e.type])}class zn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise((e=>{this.resolve=e}))}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Qn=e=>e/100;class Xn extends zn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Kn(e);const{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||Hn;s!==Hn&&"number"!=typeof i[0]&&(this.mixKeyframes=Ue(Qn,Dn(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Mn(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,w=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,p&&(n-=p/i)):"mirror"===d&&(w=o)),v=Ie(0,1,n)*i}const b=y?{done:!1,value:c[0]}:w.next(v);a&&(b.value=a(b.value));let{done:x}=b;y||null===s||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return k&&h!==Bn&&(b.value=qn(c,this.options,f,this.speed)),m&&m(b.value),k&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Xe(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xe(e)}get time(){return Xe(this.currentTime)}set time(e){e=Qe(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Ct.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Xe(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Sn,startTime:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ct.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Gn=e=>180*e/Math.PI,Zn=e=>{const t=Gn(Math.atan2(e[1],e[0]));return er(t)},Jn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zn,rotateZ:Zn,skewX:e=>Gn(Math.atan(e[1])),skewY:e=>Gn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},er=e=>((e%=360)<0&&(e+=360),e),tr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tr,scaleY:nr,scale:e=>(tr(e)+nr(e))/2,rotateX:e=>er(Gn(Math.atan2(e[6],e[5]))),rotateY:e=>er(Gn(Math.atan2(-e[2],e[0]))),rotateZ:Zn,rotate:Zn,skewX:e=>Gn(Math.atan(e[4])),skewY:e=>Gn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes("scale")?1:0}function or(e,t){if(!e||"none"===e)return ar(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=rr,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Jn,a=t}if(!a)return ar(t);const o=r[t],i=a[1].split(",").map(ir);return"function"==typeof o?o(i):i[o]}function ir(e){return parseFloat(e.trim())}const sr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lr=(()=>new Set(sr))(),cr=e=>e===Lt||e===Ut,ur=new Set(["x","y","z"]),dr=sr.filter((e=>!ur.has(e)));const pr={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})=>or(t,"x"),y:(e,{transform:t})=>or(t,"y")};pr.translateX=pr.x,pr.translateY=pr.y;const hr=new Set;let mr=!1,fr=!1,gr=!1;function yr(){if(fr){const e=Array.from(hr).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return dr.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{e.getValue(t)?.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}fr=!1,mr=!1,hr.forEach((e=>e.complete(gr))),hr.clear()}function vr(){hr.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(fr=!0)}))}class wr{constructor(e,t,n,r,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(hr.add(this),mr||(mr=!0,bt.read(vr),bt.resolveKeyframes(yr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hr.delete(this)}cancel(){"scheduled"===this.state&&(hr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const br=He((()=>void 0!==window.ScrollTimeline)),xr={};function kr(e,t){const n=He(e);return()=>xr[t]??n()}const Er=kr((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Sr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function Cr(e,t){return e?"function"==typeof e?Er()?Cn(e,t):"ease-out":mt(e)?Dr(e):Array.isArray(e)?e.map((e=>Cr(e,t)||Sr.easeOut)):Sr[e]:void 0}function Tr(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Cr(s,a);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};c&&(p.pseudoElement=c);return e.animate(u,p)}function Mr(e){return"function"==typeof e&&"applyToOptions"in e}class Pr extends zn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=e,Ye("string"!=typeof e.type);const l=function({type:e,...t}){return Mr(e)&&Er()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Tr(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=qn(r,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Xe(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xe(e)}get time(){return Xe(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Qe(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&br()?(this.animation.timeline=e,$e):t(this)}}const Nr={anticipate:st,backInOut:it,circInOut:ut};function Or(e){"string"==typeof e.ease&&e.ease in Nr&&(e.ease=Nr[e.ease])}class Lr extends Pr{constructor(e){Or(e),Kn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new Xn({...o,autoplay:!1}),s=Qe(this.finishedTime??this.time);t.setWithVelocity(i.sample(s-10).value,i.sample(s).value,10),i.stop()}}const Rr=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!un.test(e)&&"0"!==e||e.startsWith("url(")));function Ar(e){e.duration=0,e.type="keyframes"}const _r=new Set(["opacity","clipPath","filter","transform"]),Fr=He((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Ir extends zn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ct.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:c,...u},p=c?.KeyframeResolver||wr;this.keyframeResolver=new p(i,((e,t,n)=>this.onKeyframesResolved(e,t,d,!n)),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ct.now(),function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],i=Rr(a,t),s=Rr(o,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Mr(n))&&r)}(e,a,o,i)||(!Ve.instantAnimations&&s||c?.(qn(e,n,t)),e[0]=e[e.length-1],Ar(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:i}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Fr()&&n&&_r.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}(u)?new Lr({...u,element:u.motionValue.owner.current}):new Xn(u);d.finished.then((()=>this.notifyFinished())).catch($e),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||(this.keyframeResolver?.resume(),gr=!0,vr(),yr(),gr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Yr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vr(e,t,n=1){const[r,a]=function(e){const t=Yr.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Be(e)?parseFloat(e):e}return Nt(a)?Vr(a,t,n+1):a}function Br(e,t){return e?.[t]??e?.default??e}const Wr=new Set(["width","height","top","left","right","bottom",...sr]),jr=e=>t=>t.test(e),Hr=[Lt,Ut,qt,$t,zt,Kt,{test:e=>"auto"===e,parse:e=>e}],$r=e=>Hr.find(jr(e));const qr=new Set(["brightness","contrast","saturate","opacity"]);function Ur(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ft)||[];if(!r)return e;const a=n.replace(r,"");let o=qr.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const Kr=/\b([a-z-]*)\(.*?\)/gu,zr={...un,getAnimatableNone:e=>{const t=e.match(Kr);return t?t.map(Ur).join(" "):e}},Qr={...Lt,transform:Math.round},Xr={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,radius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Rt,originX:Qt,originY:Qt,originZ:Ut},zIndex:Qr,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Qr},Gr={...Xr,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:zr,WebkitFilter:zr},Zr=e=>Gr[e];function Jr(e,t){let n=Zr(e);return n!==zr&&(n=un),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ea=new Set(["auto","none","0"]);class ta extends wr{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Nt(r))){const a=Vr(r,t.current);void 0!==a&&(e[n]=a),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Wr.has(n)||2!==e.length)return;const[r,a]=e,o=$r(r),i=$r(a);if(o!==i)if(cr(o)&&cr(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else pr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||je(r)))&&n.push(t);var r;n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!ea.has(t)&&on(t).values.length&&(r=e[a]),a++}if(r&&n)for(const a of t)e[a]=Jr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=pr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}const na=(e,t)=>t&&"number"==typeof e?t.transform(e):e;class ra{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Ct.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ct.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ze);const n=this.events[e].add(t);return"change"===e?()=>{n(),bt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ct.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ge(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function aa(e,t){return new ra(e,t)}const{schedule:oa,cancel:ia}=wt(queueMicrotask,!1),sa={x:!1,y:!1};function la(){return sa.x||sa.y}function ca(e,t){const n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ua(e){return!("touch"===e.pointerType||la())}const da=(e,t)=>!!t&&(e===t||da(e,t.parentElement)),pa=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,ha=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ma=new WeakSet;function fa(e){return t=>{"Enter"===t.key&&e(t)}}function ga(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ya(e){return pa(e)&&!la()}function va(e,t,n={}){const[r,a,o]=ca(e,n),i=e=>{const r=e.currentTarget;if(!ya(e))return;ma.add(r);const o=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),ma.has(r)&&ma.delete(r),ya(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||da(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",l,a)};return r.forEach((e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),We(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=fa((()=>{if(ma.has(n))return;ga(n,"down");const e=fa((()=>{ga(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>ga(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,a))),function(e){return ha.has(e.tagName)||-1!==e.tabIndex}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}function wa(e){return We(e)&&"ownerSVGElement"in e}const ba=e=>Boolean(e&&e.getVelocity),xa=[...Hr,Gt,un],ka=n({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});const Ea=n({strict:!1}),Da={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"]},Sa={};for(const e in Da)Sa[e]={isEnabled:t=>Da[e].some((e=>!!t[e]))};const Ca=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 Ta(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ca.has(e)}let Ma=e=>!Ta(e);try{"function"==typeof(Pa=require("@emotion/is-prop-valid").default)&&(Ma=e=>e.startsWith("on")?!Ta(e):Pa(e))}catch{}var Pa;const Na=n({});function Oa(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function La(e){return"string"==typeof e||Array.isArray(e)}const Ra=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Aa=["initial",...Ra];function _a(e){return Oa(e.animate)||Aa.some((t=>La(e[t])))}function Fa(e){return Boolean(_a(e)||e.variants)}function Ia(e){const{initial:t,animate:n}=function(e,t){if(_a(e)){const{initial:t,animate:n}=e;return{initial:!1===t||La(t)?t:void 0,animate:La(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,o(Na));return u((()=>({initial:t,animate:n})),[Ya(t),Ya(n)])}function Ya(e){return Array.isArray(e)?e.join(" "):e}const Va={};function Ba(e,{layout:t,layoutId:n}){return lr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Va[e]||"opacity"===e)}const Wa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ja=sr.length;function Ha(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let i=!1,s=!1;for(const e in t){const n=t[e];if(lr.has(e))i=!0;else if(Mt(e))a[e]=n;else{const t=na(n,Xr[e]);e.startsWith("origin")?(s=!0,o[e]=t):r[e]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let o=0;o<ja;o++){const i=sr[o],s=e[i];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(i.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=na(s,Xr[i]);l||(a=!1,r+=`${Wa[i]||i}(${e}) `),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}const $a=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qa(e,t,n){for(const r in t)ba(t[r])||Ba(r,n)||(e[r]=t[r])}function Ua(e,t){const n={};return qa(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return u((()=>{const n=$a();return Ha(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function Ka(e,t){const n={},r=Ua(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const za={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qa={offset:"strokeDashoffset",array:"strokeDasharray"};function Xa(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,u){if(Ha(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?za:Qa;e[o.offset]=Ut.transform(-r);const i=Ut.transform(t),s=Ut.transform(n);e[o.array]=`${i} ${s}`}(d,a,o,i,!1)}const Ga=()=>({...$a(),attrs:{}}),Za=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ja(e,t,n,r){const a=u((()=>{const n=Ga();return Xa(n,t,Za(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};qa(t,e.style,e),a.style={...t,...a.style}}return a}const eo=["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 to(e){return"string"==typeof e&&!e.includes("-")&&!!(eo.indexOf(e)>-1||/[A-Z]/u.test(e))}function no(e,t,n,{latestValues:r},a,o=!1){const i=(to(e)?Ja:Ka)(t,r,a,e),s=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(Ma(a)||!0===n&&Ta(a)||!t&&!Ta(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,o),l=e!==d?{...s,...i,ref:n}:{},{children:c}=t,h=u((()=>ba(c)?c.get():c),[c]);return p(e,{...l,children:h})}function ro(e){const t=[{},{}];return e?.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function ao(e,t,n,r){if("function"==typeof t){const[a,o]=ro(r);t=t(void 0!==n?n:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,o]=ro(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function oo(e){return ba(e)?e.get():e}function io(e,t,n,r){const a={},o=r(e,{});for(const e in o)a[e]=oo(o[e]);let{initial:i,animate:s}=e;const l=_a(e),c=Fa(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?s:i;if(d&&"boolean"!=typeof d&&!Oa(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ao(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(a[e]=t)}for(const t in e)a[t]=e[t]}}}return a}const so=e=>(t,n)=>{const r=o(Na),i=o(Ae),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:io(n,r,a,e),renderState:t()}}(e,t,r,i);return n?s():function(e){const t=a(null);return null===t.current&&(t.current=e()),t.current}(s)};function lo(e,t,n){const{style:r}=e,a={};for(const o in r)(ba(r[o])||t.style&&ba(t.style[o])||Ba(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}const co=so({scrapeMotionValuesFromProps:lo,createRenderState:$a});function uo(e,t,n){const r=lo(e,t,n);for(const n in e)if(ba(e[n])||ba(t[n])){r[-1!==sr.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}const po=so({scrapeMotionValuesFromProps:uo,createRenderState:Ga}),ho=Symbol.for("motionComponentSymbol");function mo(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function fo(e,t,n){return c((r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):mo(n)&&(n.current=r))}),[t])}const go=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yo="data-"+go("framerAppearId"),vo=n({});function wo(e,t,n,i,s){const{visualElement:l}=o(Na),c=o(Ea),u=o(Ae),d=o(ka).reducedMotion,p=a(null);i=i||c.renderer,!p.current&&i&&(p.current=i(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const m=p.current,f=o(vo);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bo(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&mo(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=a(!1);h((()=>{m&&g.current&&m.update(n,u)}));const y=n[yo],v=a(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Re((()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())})),r((()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(y)})),v.current=!1),m.enteringChildren=void 0)})),m}function bo(e){if(e)return!1!==e.options.allowProjection?e.projection:bo(e.parent)}function xo(e,{forwardMotionProps:t=!1}={},n,r){n&&function(e){for(const t in e)Sa[t]={...Sa[t],...e[t]}}(n);const a=to(e)?po:co;function i(n,i){let s;const l={...o(ka),...n,layoutId:ko(n)},{isStatic:c}=l,u=Ia(n),d=a(n,c);if(!c&&Le){o(Ea).strict;const t=function(e){const{drag:t,layout:n}=Sa;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=wo(e,d,l,r,t.ProjectionNode)}return w(Na.Provider,{value:u,children:[s&&u.visualElement?b(s,{visualElement:u.visualElement,...l}):null,no(e,n,fo(d,u.visualElement,i),d,c,t)]})}i.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const s=m(i);return s[ho]=e,s}function ko({layoutId:e}){const t=o(Oe).id;return t&&void 0!==e?t+"-"+e:e}function Eo(e,t){if("undefined"==typeof Proxy)return xo;const n=new Map,r=(n,r)=>xo(n,r,e,t);return new Proxy(((e,t)=>r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,xo(o,void 0,e,t)),n.get(o))})}function Do({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function So(e){return void 0===e||1===e}function Co({scale:e,scaleX:t,scaleY:n}){return!So(e)||!So(t)||!So(n)}function To(e){return Co(e)||Mo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mo(e){return Po(e.x)||Po(e.y)}function Po(e){return e&&"0%"!==e}function No(e,t,n){return n+t*(e-n)}function Oo(e,t,n,r,a){return void 0!==a&&(e=No(e,a,r)),No(e,n,r)+t}function Lo(e,t=0,n=1,r,a){e.min=Oo(e.min,t,n,r,a),e.max=Oo(e.max,t,n,r,a)}function Ro(e,{x:t,y:n}){Lo(e.x,t.translate,t.scale,t.originPoint),Lo(e.y,n.translate,n.scale,n.originPoint)}const Ao=.999999999999,_o=1.0000000000001;function Fo(e,t){e.min=e.min+t,e.max=e.max+t}function Io(e,t,n,r,a=.5){Lo(e,t,n,hn(e.min,e.max,a),r)}function Yo(e,t){Io(e.x,t.x,t.scaleX,t.scale,t.originX),Io(e.y,t.y,t.scaleY,t.scale,t.originY)}function Vo(e,t){return Do(function(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}}(e.getBoundingClientRect(),t))}const Bo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Wo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),jo={current:null},Ho={current:!1};const $o=new WeakMap;const qo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uo{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:a,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wr,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 e=Ct.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,bt.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=_a(t),this.isVariantNode=Fa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&ba(t)&&t.set(s[e])}}mount(e){this.current=e,$o.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Ho.current||function(){if(Ho.current=!0,Le)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jo.current=e.matches;e.addEventListener("change",t),t()}else jo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||jo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=lr.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&bt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}));let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),a&&a(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Sa){const t=Sa[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wo()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<qo.length;t++){const n=qo[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],o=n[r];if(ba(a))e.addValue(r,a);else if(ba(o))e.addValue(r,aa(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,aa(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=aa(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Be(n)||je(n))?n=parseFloat(n):(r=n,!xa.find(jr(r))&&un.test(t)&&(n=Jr(e,t))),this.setBaseTarget(e,ba(n)?n.get():n)),ba(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=ao(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ba(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ze),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){oa.render(this.render)}}class Ko extends Uo{constructor(){super(...arguments),this.KeyframeResolver=ta}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ba(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function zo(e,{style:t,vars:n},r,a){const o=e.style;let i;for(i in t)o[i]=t[i];for(i in a?.applyProjectionStyles(o,r),n)o.setProperty(i,n[i])}class Qo extends Ko{constructor(){super(...arguments),this.type="html",this.renderInstance=zo}readValueFromInstance(e,t){if(lr.has(t))return this.projection?.isProjecting?ar(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return or(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(Mt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Vo(e,t)}build(e,t,n){Ha(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return lo(e,t,n)}}const Xo=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"]);class Go extends Ko{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wo}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(lr.has(t)){const e=Zr(t);return e&&e.default||0}return t=Xo.has(t)?t:go(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return uo(e,t,n)}build(e,t,n){Xa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){zo(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Xo.has(n)?n:go(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Za(e.tagName),super.mount(e)}}const Zo=(e,t)=>to(e)?new Go(t):new Qo(t,{allowProjection:e!==d});function Jo(e,t,n){const r=e.getProps();return ao(r,t,void 0!==n?n:r.custom,e)}const ei=e=>Array.isArray(e);function ti(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,aa(n))}function ni(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ba(r)&&r.add))return n.add(t);if(!n&&Ve.WillChange){const n=new Ve.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function ri(e){return e.props[yo]}const ai=e=>null!==e;const oi={type:"spring",stiffness:500,damping:25,restSpeed:10},ii={type:"keyframes",duration:.8},si={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},li=(e,{keyframes:t})=>t.length>2?ii:lr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:oi:si;const ci=(e,t,n,r={},a,o)=>i=>{const s=Br(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Qe(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:o,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||Object.assign(u,li(e,u)),u.duration&&(u.duration=Qe(u.duration)),u.repeatDelay&&(u.repeatDelay=Qe(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Ar(u),0===u.delay&&(d=!0)),(Ve.instantAnimations||Ve.skipAnimations)&&(d=!0,Ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(ai),o=t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}(u.keyframes,s);if(void 0!==e)return void bt.update((()=>{u.onUpdate(e),u.onComplete()}))}return s.isSync?new Xn(u):new Ir(u)};function ui({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function di(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...s}=t;r&&(o=r);const l=[],c=a&&e.animationState&&e.animationState.getState()[a];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),a=s[t];if(void 0===a||c&&ui(c,t))continue;const i={delay:n,...Br(o||{},t)},u=r.get();if(void 0!==u&&!r.isAnimating&&!Array.isArray(a)&&a===u&&!i.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=ri(e);if(n){const e=window.MotionHandoffAnimation(n,t,bt);null!==e&&(i.startTime=e,d=!0)}}ni(e,t),r.start(ci(t,r,a,e.shouldReduceMotion&&Wr.has(t)?{type:!1}:i,e,d));const p=r.animation;p&&l.push(p)}return i&&Promise.all(l).then((()=>{bt.update((()=>{i&&function(e,t){const n=Jo(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const t in o)ti(e,t,(i=o[t],ei(i)?i[i.length-1]||0:i));var i}(e,i)}))})),l}function pi(e,t,n,r=0,a=1){const o=Array.from(e).sort(((e,t)=>e.sortNodePosition(t))).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(o,i):1===a?o*r:s-o*r}function hi(e,t,n={}){const r=Jo(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(di(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,a=0,o=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(hi(l,t,{...i,delay:n+("function"==typeof r?0:r)+pi(e.variantChildren,l,r,a,o)}).then((()=>l.notify("AnimationComplete",t))));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then((()=>t()))}return Promise.all([o(),i(n.delay)])}function mi(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 fi=Aa.length;function gi(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&gi(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<fi;n++){const r=Aa[n],a=e.props[r];(La(a)||!1===a)&&(t[r]=a)}return t}const yi=[...Ra].reverse(),vi=Ra.length;function wi(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map((t=>hi(e,t,n)));r=Promise.all(a)}else if("string"==typeof t)r=hi(e,t,n);else{const a="function"==typeof t?Jo(e,t,n.custom):t;r=Promise.all(di(e,a,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function bi(e){let t=wi(e),n=Ei(),r=!0;const a=t=>(n,r)=>{const a=Jo(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function o(o){const{props:i}=e,s=gi(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<vi;t++){const p=yi[t],h=n[p],m=void 0!==i[p]?i[p]:s[p],f=La(m),g=p===o?h.isActive:null;!1===g&&(d=t);let y=m===s[p]&&m!==i[p]&&f;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...u},!h.isActive&&null===g||!m&&!h.prevProp||Oa(m)||"boolean"==typeof m)continue;const v=xi(h.prevProp,m);let w=v||p===o&&h.isActive&&!y&&f||t>d&&f,b=!1;const x=Array.isArray(m)?m:[m];let k=x.reduce(a(p),{});!1===g&&(k={});const{prevResolvedValues:E={}}=h,D={...E,...k},S=t=>{w=!0,c.has(t)&&(b=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in D){const t=k[e],n=E[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ei(t)&&ei(n)?!mi(t,n):t!==n,r?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=k,h.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(w=!1);const C=y&&v;w&&(!C||b)&&l.push(...x.map((t=>{const n={type:p};if("string"==typeof t&&r&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=Jo(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=pi(r.enteringChildren,e,t)}}return{animation:t,options:n}})))}if(c.size){const t={};if("boolean"!=typeof i.initial){const n=Jo(e,Array.isArray(i.initial)?i.initial[0]:i.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach((n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==i.initial&&i.initial!==i.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach((e=>e.animationState?.setActive(t,r))),n[t].isActive=r;const a=o(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ei()}}}function xi(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!mi(t,e)}function ki(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ei(){return{animate:ki(!0),whileInView:ki(),whileHover:ki(),whileTap:ki(),whileDrag:ki(),whileFocus:ki(),exit:ki()}}class Di{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Si=0;const Ci={animation:{Feature:class extends Di{constructor(e){super(e),e.animationState||(e.animationState=bi(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Oa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Di{constructor(){super(...arguments),this.id=Si++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mi(e){return{point:{x:e.pageX,y:e.pageY}}}function Pi(e,t,n,r){return Ti(e,t,(e=>t=>pa(t)&&e(t,Mi(t)))(n),r)}const Ni=.9999,Oi=1.0001,Li=-.01,Ri=.01;function Ai(e){return e.max-e.min}function _i(e,t,n,r=.5){e.origin=r,e.originPoint=hn(t.min,t.max,e.origin),e.scale=Ai(n)/Ai(t),e.translate=hn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ni&&e.scale<=Oi||isNaN(e.scale))&&(e.scale=1),(e.translate>=Li&&e.translate<=Ri||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){_i(e.x,t.x,n.x,r?r.originX:void 0),_i(e.y,t.y,n.y,r?r.originY:void 0)}function Ii(e,t,n){e.min=n.min+t.min,e.max=e.min+Ai(t)}function Yi(e,t,n){e.min=t.min-n.min,e.max=e.min+Ai(t)}function Vi(e,t,n){Yi(e.x,t.x,n.x),Yi(e.y,t.y,n.y)}function Bi(e){return[e("x"),e("y")]}const Wi=({current:e})=>e?e.ownerDocument.defaultView:null,ji=(e,t)=>Math.abs(e-t);class Hi{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ui(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ji(e.x,t.x),r=ji(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=kt;this.history.push({...r,timestamp:a});const{onStart:o,onMove:i}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=$i(t,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(this.dragSnapToOrigin&&a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ui("pointercancel"===e.type?this.lastMoveEventInfo:$i(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!pa(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const i=$i(Mi(e),this.transformPagePoint),{point:s}=i,{timestamp:l}=kt;this.history=[{...s,timestamp:l}];const{onSessionStart:c}=t;c&&c(e,Ui(i,this.history)),this.removeListeners=Ue(Pi(this.contextWindow,"pointermove",this.handlePointerMove),Pi(this.contextWindow,"pointerup",this.handlePointerUp),Pi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),xt(this.updatePoint)}}function $i(e,t){return t?{point:t(e.point)}:e}function qi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ui({point:e},t){return{point:e,delta:qi(e,zi(t)),offset:qi(e,Ki(t)),velocity:Qi(t,.1)}}function Ki(e){return e[0]}function zi(e){return e[e.length-1]}function Qi(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=zi(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Qe(t)));)n--;if(!r)return{x:0,y:0};const o=Xe(a.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Xi(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Gi(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}}const Zi=.35;function Ji(e,t,n){return{min:es(e,t),max:es(e,n)}}function es(e,t){return"number"==typeof e?e:e[t]||0}const ts=new WeakMap;class ns{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wo(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new Hi(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Mi(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?sa[o]?null:(sa[o]=!0,()=>{sa[o]=!1}):sa.x||sa.y?null:(sa.x=sa.y=!0,()=>{sa.x=sa.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(qt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ai(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),a&&bt.postRender((()=>a(e,t))),ni(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Bi((e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:Wi(this.visualElement)})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&bt.postRender((()=>i(n,r)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!rs(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?hn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?hn(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&mo(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:Xi(e.x,n,a),y:Xi(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Zi){return!1===e?e=0:!0===e&&(e=Zi),{x:Ji(e,"left","right"),y:Ji(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Bi((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!mo(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const a=function(e,t,n){const r=Vo(e,n),{scroll:a}=t;return a&&(Fo(r.x,a.offset.x),Fo(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Gi(e.x,t.x),y:Gi(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Do(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Bi((i=>{if(!rs(i,t,this.currentDirection))return;let l=s&&s[i]||{};o&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,d)}));return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return ni(this.visualElement,e),n.start(ci(e,n,0,t,this.visualElement,!1))}stopAnimation(){Bi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Bi((e=>this.getAxisMotionValue(e).animation?.pause()))}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Bi((t=>{const{drag:n}=this.getProps();if(!rs(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];a.set(e[t]-hn(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!mo(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Bi((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ai(e),a=Ai(t);return a>r?n=Ke(t.min,t.max-r,e.min):r>a&&(n=Ke(e.min,e.max-a,t.min)),Ie(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Bi((t=>{if(!rs(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(hn(a,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;ts.set(this.visualElement,this);const e=Pi(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();mo(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),bt.read(t);const a=Ti(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Bi((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{a(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:o=Zi,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function rs(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const as=e=>(t,n)=>{e&&bt.postRender((()=>e(t,n)))};const os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function is(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ss={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ut.test(e))return e;e=parseFloat(e)}return`${is(e,t.target.x)}% ${is(e,t.target.y)}%`}},ls={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=un.parse(e);if(a.length>5)return r;const o=un.createTransformer(e),i="number"!=typeof a[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=s,a[1+i]/=l;const c=hn(s,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),o(a)}};let cs=!1;class us extends f{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;!function(e){for(const t in e)Va[t]=e[t],Mt(t)&&(Va[t].isCSSVariable=!0)}(ps),a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),cs&&a.root.didUpdate(),a.addEventListener("animationComplete",(()=>{this.safeToRemove()})),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,cs=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||bt.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),oa.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;cs=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ds(e){const[t,n]=function(e=!0){const t=o(Ae);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:a,register:i}=t,s=l();r((()=>{if(e)return i(s)}),[e]);const u=c((()=>e&&a&&a(s)),[s,a,e]);return!n&&a?[!1,u]:[!0]}(),a=o(Oe);return b(us,{...e,layoutGroup:a,switchLayoutGroup:o(vo),isPresent:t,safeToRemove:n})}const ps={borderRadius:{...ss,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ss,borderTopRightRadius:ss,borderBottomLeftRadius:ss,borderBottomRightRadius:ss,boxShadow:ls};const hs=(e,t)=>e.depth-t.depth;class ms{constructor(){this.children=[],this.isDirty=!1}add(e){_e(this.children,e),this.isDirty=!0}remove(e){Fe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(hs),this.isDirty=!1,this.children.forEach(e)}}const fs=["TopLeft","TopRight","BottomLeft","BottomRight"],gs=fs.length,ys=e=>"string"==typeof e?parseFloat(e):e,vs=e=>"number"==typeof e||Ut.test(e);function ws(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const bs=ks(0,.5,ct),xs=ks(.5,.95,$e);function ks(e,t,n){return r=>r<e?0:r>t?1:n(Ke(e,t,r))}function Es(e,t){e.min=t.min,e.max=t.max}function Ds(e,t){Es(e.x,t.x),Es(e.y,t.y)}function Ss(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cs(e,t,n,r,a){return e=No(e-=t,1/n,r),void 0!==a&&(e=No(e,1/a,r)),e}function Ts(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){qt.test(t)&&(t=parseFloat(t),t=hn(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=hn(o.min,o.max,r);e===o&&(s-=t),e.min=Cs(e.min,t,n,s,a),e.max=Cs(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}const Ms=["x","scaleX","originX"],Ps=["y","scaleY","originY"];function Ns(e,t,n,r){Ts(e.x,t,Ms,n?n.x:void 0,r?r.x:void 0),Ts(e.y,t,Ps,n?n.y:void 0,r?r.y:void 0)}function Os(e){return 0===e.translate&&1===e.scale}function Ls(e){return Os(e.x)&&Os(e.y)}function Rs(e,t){return e.min===t.min&&e.max===t.max}function As(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _s(e,t){return As(e.x,t.x)&&As(e.y,t.y)}function Fs(e){return Ai(e.x)/Ai(e.y)}function Is(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ys{constructor(){this.members=[]}add(e){_e(this.members,e),e.scheduleRender()}remove(e){if(Fe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Vs=["","X","Y","Z"];let Bs=0;function Ws(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function js(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ri(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&js(r)}function Hs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=Bs++,this.animationId=0,this.animationCommitId=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(Us),this.nodes.forEach(Js),this.nodes.forEach(el),this.nodes.forEach(Ks)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ms)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ze),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=wa(t)&&!(wa(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;bt.read((()=>{r=window.innerWidth})),e(t,(()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ct.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(xt(r),e(o-t))};return bt.setup(r,!0),()=>xt(r)}(a,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Zs)))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||o.getDefaultTransition()||il,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!_s(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Br(a,"layout"),onPlay:i,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Zs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(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(tl),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&js(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Qs);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Xs);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gs),this.nodes.forEach($s),this.nodes.forEach(qs)):this.nodes.forEach(Xs),this.clearAllSnapshots();const e=Ct.now();kt.delta=Ie(0,1e3/60,e-kt.timestamp),kt.timestamp=e,kt.isProcessing=!0,Et.update.process(kt),Et.preRender.process(kt),Et.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zs),this.sharedNodes.forEach(nl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ai(this.snapshot.measuredBox.x)||Ai(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wo(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ls(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||To(this.latestValues)||o)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),cl((r=n).x),cl(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return Wo();const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dl))){const{scroll:e}=this.root;e&&(Fo(t.x,e.offset.x),Fo(t.y,e.offset.y))}return t}removeElementScroll(e){const t=Wo();if(Ds(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:o}=r;r!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&Ds(t,e),Fo(t.x,a.offset.x),Fo(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n=Wo();Ds(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Yo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),To(r.latestValues)&&Yo(n,r.latestValues)}return To(this.latestValues)&&Yo(n,this.latestValues),n}removeTransform(e){const t=Wo();Ds(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!To(n.latestValues))continue;Co(n.latestValues)&&n.updateSnapshot();const r=Wo();Ds(r,n.measurePageBox()),Ns(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return To(this.latestValues)&&Ns(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(this.layout&&(r||a)){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wo(),this.relativeTargetOrigin=Wo(),Vi(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ds(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,i,s;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target=Wo(),this.targetWithTransforms=Wo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,i=this.relativeTarget,s=this.relativeParent.target,Ii(o.x,i.x,s.x),Ii(o.y,i.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ds(this.target,this.layout.layoutBox),Ro(this.target,this.targetDelta)):Ds(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wo(),this.relativeTargetOrigin=Wo(),Vi(this.relativeTargetOrigin,this.target,e.target),Ds(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Co(this.parent.latestValues)&&!Mo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Ds(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let o,i;t.x=t.y=1;for(let s=0;s<a;s++){o=n[s],i=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Yo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Ro(e,i)),r&&To(o.latestValues)&&Yo(e,o.latestValues))}t.x<_o&&t.x>Ao&&(t.x=1),t.y<_o&&t.y>Ao&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Wo());const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Ss(this.prevProjectionDelta.x,this.projectionDelta.x),Ss(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Fi(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&Is(this.projectionDelta.x,this.prevProjectionDelta.x)&&Is(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bo(),this.projectionDelta=Bo(),this.projectionDeltaWithTransform=Bo()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},o=Bo();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i=Wo(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(ol));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,h,m,f,g;rl(o.x,e.x,n),rl(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,m=this.relativeTargetOrigin,f=i,g=n,al(h.x,m.x,f.x,g),al(h.y,m.y,f.y,g),d&&(l=this.relativeTarget,p=d,Rs(l.x,p.x)&&Rs(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d=Wo()),Ds(d,this.relativeTarget)),s&&(this.animationValues=a,function(e,t,n,r,a,o){a?(e.opacity=hn(0,n.opacity??1,bs(r)),e.opacityExit=hn(t.opacity??1,0,xs(r))):o&&(e.opacity=hn(t.opacity??1,n.opacity??1,r));for(let a=0;a<gs;a++){const o=`border${fs[a]}Radius`;let i=ws(t,o),s=ws(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||vs(i)===vs(s)?(e[o]=Math.max(hn(ys(i),ys(s),r),0),(qt.test(s)||qt.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=hn(t.rotate||0,n.rotate||0,r))}(a,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update((()=>{os.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=aa(0)),this.currentAnimation=function(e,t,n){const r=ba(e)?e:aa(e);return r.start(ci("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ul(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Wo();const t=Ai(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ai(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ds(t,n),Yo(t,a),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ys);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Ws("z",e,r,this.animationValues);for(let t=0;t<Vs.length;t++)Ws(`rotate${Vs[t]}`,e,r,this.animationValues),Ws(`skew${Vs[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=oo(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=oo(t?.pointerEvents)||""),void(this.hasProjected&&!To(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,i=n?.z||0;if((a||o||i)&&(r=`translate3d(${a}px, ${o}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:a,rotateY:o,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in Va){if(void 0===a[t])continue;const{correct:n,applyTo:i,isCSSVariable:s}=Va[t],l="none"===o?a[t]:n(a[t],r);if(i){const t=i.length;for(let n=0;n<t;n++)e[i[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?oo(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>e.currentAnimation?.stop())),this.root.nodes.forEach(Qs),this.root.sharedNodes.clear()}}}function $s(e){e.updateLayout()}function qs(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;"size"===a?Bi((e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=Ai(r);r.min=n[e].min,r.max=r.min+a})):ul(a,t.layoutBox,n)&&Bi((r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=Ai(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)}));const i=Bo();Fi(i,n,t.layoutBox);const s=Bo();o?Fi(s,e.applyTransform(r,!0),t.measuredBox):Fi(s,n,t.layoutBox);const l=!Ls(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:o}=r;if(a&&o){const i=Wo();Vi(i,t.layoutBox,a.layoutBox);const s=Wo();Vi(s,n,o.layoutBox),_s(i,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=i,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Us(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ks(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zs(e){e.clearSnapshot()}function Qs(e){e.clearMeasurements()}function Xs(e){e.isLayoutDirty=!1}function Gs(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Js(e){e.resolveTargetDelta()}function el(e){e.calcProjection()}function tl(e){e.resetSkewAndRotation()}function nl(e){e.removeLeadSnapshot()}function rl(e,t,n){e.translate=hn(t.translate,0,n),e.scale=hn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function al(e,t,n,r){e.min=hn(t.min,n.min,r),e.max=hn(t.max,n.max,r)}function ol(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const il={duration:.45,ease:[.4,0,.1,1]},sl=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ll=sl("applewebkit/")&&!sl("chrome/")?Math.round:$e;function cl(e){e.min=ll(e.min),e.max=ll(e.max)}function ul(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Fs(t),a=Fs(n),o=.2,!(Math.abs(r-a)<=o));var r,a,o}function dl(e){return e!==e.root&&e.scroll?.wasRoot}const pl=Hs({attachResizeListener:(e,t)=>Ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hl={current:void 0},ml=Hs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hl.current){const e=new pl({});e.mount(window),e.setOptions({layoutScroll:!0}),hl.current=e}return hl.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),fl={pan:{Feature:class extends Di{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(e){this.session=new Hi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:as(e),onStart:as(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&bt.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Pi(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Di{constructor(e){super(e),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new ns(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ml,MeasureLayout:ds}};function gl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&bt.postRender((()=>a(t,Mi(t))))}function yl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&bt.postRender((()=>a(t,Mi(t))))}const vl=new WeakMap,wl=new WeakMap,bl=e=>{const t=vl.get(e.target);t&&t(e)},xl=e=>{e.forEach(bl)};function kl(e,t,n){const r=function({root:e,...t}){const n=e||document;wl.has(n)||wl.set(n,{});const r=wl.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(xl,{root:e,...t})),r[a]}(t);return vl.set(e,n),r.observe(e),()=>{vl.delete(e),r.unobserve(e)}}const El={some:0,all:1};const Dl=Eo({...Ci,...{inView:{Feature:class extends Di{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:El[r]};return kl(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Di{mount(){const{current:e}=this.node;e&&(this.unmount=va(e,((e,t)=>(yl(this.node,t,"Start"),(e,{success:t})=>yl(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Di{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ue(Ti(this.node.current,"focus",(()=>this.onFocus())),Ti(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Di{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,a,o]=ca(e,n),i=e=>{if(!ua(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{ua(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,a)};return r.forEach((e=>{e.addEventListener("pointerenter",i,a)})),o}(e,((e,t)=>(gl(this.node,t,"Start"),e=>gl(this.node,e,"End")))))}unmount(){}}}},...fl,...{layout:{ProjectionNode:ml,MeasureLayout:ds}}},Zo),Sl=n(null),Cl={up:"angle-up",end:"angle-right",start:"angle-left",down:"angle-down"},Tl=({align:e="start",autoClose:n=!1,children:s,className:l="",disabled:d=!1,drop:p,fullWidth:h=!1,icon:m,isChild:f=!1,label:g,onToggle:y,overflow:w=!1,requiredText:b,selectedValue:x,setShow:k,show:E,showError:D=!1,size:S="md",style:C="default",variant:T="primary"})=>{const[M,P]=i(!!E),[N,O]=i(!1),[L,R]=i(null),[A,_]=i(0),[F,I]=i(0),[Y,V]=i({top:0,left:0}),B=a(null),W=a(null),j=a(M),H=o(Sl),$=c((()=>{if(!W.current)return;const e=W.current.offsetWidth,t=W.current.offsetHeight;if(h&&R((t=>t!==e?e:t)),_((e=>e!==t?t:e)),I((t=>t!==e?e:t)),w){const e=W.current.getBoundingClientRect();V((t=>Math.abs(t.top-e.top)>1||Math.abs(t.left-e.left)>1?{top:e.top,left:e.left}:t))}}),[h,w]),q=c(((e,t)=>{e!==j.current&&(O(!0),j.current=e),P(e),k&&k(e),y&&y(e,t),$()}),[k,y,$]),U=u((()=>{const e=s?.props?.children;if(!e)return null;const n=(e,n)=>{if(!t.isValidElement(e))return e;const r=e.type===t.Fragment,a="DropdownDivider"===e.type?.displayName||e.props?.className?.includes("dropdown-divider"),o=void 0!==e.props?.as;return r||a||o?t.cloneElement(e,{key:e.key||`${n}`}):t.cloneElement(e,{as:"li",key:e.key||`${n}`})};return Array.isArray(e)?e.map(((e,t)=>n(e,t))):n(e,0)}),[s]);r((()=>{E!==j.current&&(P(E),O(!0),j.current=E)}),[E]),r((()=>{H&&!H.isOpen&&M&&(P(!1),j.current=!1,k&&k(!1))}),[H?.isOpen,M,k,H]),r((()=>{$()}),[$]),r((()=>{if(!w||!M)return;$();let e=null,t=!0;const n=()=>{t&&($(),e=requestAnimationFrame(n))},r=()=>{$()};window.addEventListener("scroll",r,!0),window.addEventListener("resize",r);let a=W.current?.parentElement;const o=[];for(;a;){const e=window.getComputedStyle(a).overflowY,t=window.getComputedStyle(a).overflowX;"auto"!==e&&"scroll"!==e&&"auto"!==t&&"scroll"!==t||(o.push(a),a.addEventListener("scroll",r)),a=a.parentElement}return e=requestAnimationFrame(n),()=>{t=!1,e&&cancelAnimationFrame(e),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r),o.forEach((e=>e.removeEventListener("scroll",r)))}}),[w,M,$]);const K=Cl[p]||Cl.down,z=u((()=>"up"===p?"end"===e?"bottom right":"bottom left":"start"===p?"center right":"end"===p?"center left":"end"===e?"top right":"top left"),[p,e]),Q=u((()=>{const e={};return w?"up"===p?(e.bottom=window.innerHeight-Y.top+"px",e.left=`${Y.left}px`):"start"===p?(e.right=window.innerWidth-Y.left+"px",e.top=`${Y.top}px`):"end"===p?(e.left=`${Y.left+F}px`,e.top=`${Y.top}px`):(e.top=`${Y.top+A}px`,e.left=`${Y.left}px`):"up"===p?e.bottom=`${A}px`:"start"===p?(e.right=`${F}px`,e.top="0"):"end"===p?(e.left=`${F}px`,e.top="0"):e.top=`${A}px`,e}),[p,A,F,w,Y]),X=u((()=>N?h?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:h?{initial:!1,animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[N,h]),G=u((()=>"start"===p||"end"===p?{}:w?"end"===e?{left:"auto",right:window.innerWidth-Y.left-F+"px"}:{}:{left:"end"===e?"auto":"0",right:"end"===e?"0":"auto"}),[p,e,w,Y,F]),Z=c((()=>{N&&O(!1)}),[N]),J=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:w?"fixed":"absolute",...Q,...G,transformOrigin:z};return t.createElement(Dl.ul,Ne({},o,{ref:n},X,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:Z}))}));return e.displayName="MotionMenu",e}),[X,Q,G,z,Z,w]),ee=u((()=>({strategy:w?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...w&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[w]),te=u((()=>({isOpen:M})),[M]),ne=u((()=>{if(f)return"";return["w-100",`btn btn-${T}`,`btn-${C}`,`btn-${S}`,D&&"not-validated",d&&"disabled"].filter(Boolean).join(" ")}),[f,T,C,S,D,d]);return t.createElement(Sl.Provider,{value:te},t.createElement(v,{autoClose:n,show:M,onToggle:q,className:l,align:e,drop:p,disabled:f?void 0:d,"data-error":b,style:{position:"relative"}},t.createElement(v.Toggle,{ref:W,as:f?"div":void 0,bsPrefix:f?"":void 0,className:ne},(()=>{const e=t.createElement(t.Fragment,null,t.createElement("span",{className:"dropdown-label"},g),t.createElement("span",null,x)),n=m&&t.createElement(ke,{style:"solid",name:m,scale:1}),r=g&&t.createElement(ke,{name:K,className:"caret"}),a="input"===T?e:g&&t.createElement("span",null,g);return"start"===p?t.createElement(t.Fragment,null,r,a,n):t.createElement(t.Fragment,null,n,a,r)})()),t.createElement(v.Menu,{as:J,align:e,ref:B,style:h?{width:L}:void 0,popperConfig:ee},U)))};Tl.propTypes={align:H.oneOf(["start","end"]),autoClose:H.oneOfType([H.bool,H.oneOf(["inside","outside"])]),children:H.node,className:H.string,disabled:H.bool,drop:H.oneOf(["up","down","start","end"]),fullWidth:H.bool,icon:H.string,isChild:H.bool,label:H.node,onToggle:H.func,overflow:H.bool,requiredText:H.string,selectedValue:H.node,setShow:H.func,show:H.bool,showError:H.bool,size:H.oneOf(["xs","md","lg"]),style:H.oneOf(["default","success","danger","warning","link"]),variant:H.oneOf(["primary","secondary","terciary","outline","input"])};const Ml=()=>{const e=c((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[]);return{toCamelCase:e,highlightText:(e,n)=>{if(!n)return e;const r=e.split(new RegExp(`(${n})`,"gi"));return t.createElement("span",null,r.map(((e,r)=>t.createElement("span",{className:[e.toLowerCase()===n.toLowerCase()&&"highligthed-search"],key:r},e))))},capitalice:e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:""}},Pl=({children:e,className:n="",disabled:r=!1,id:a,name:o,setStatus:i,size:s="md",status:l=!1})=>{const{toCamelCase:c}=Ml();let u=a;a||"string"!=typeof e||(u=c(e));return t.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},t.createElement("label",{className:"checkbox "+("lg"===s?"checkbox-lg":"xs"===s?"checkbox-xs":"")},t.createElement("input",{type:"checkbox",checked:l,onChange:e=>{i(e.target.checked)},minLength:"1",id:u,name:o}),e))};Pl.propTypes={className:H.string,disabled:H.bool,id:H.string,name:H.string,setStatus:H.func,size:H.oneOf(["xs","md","lg"]),status:H.bool};const Nl=({autoFocus:e=!1,className:n="",disabled:o=!1,focus:i=!1,helpText:s,icon:l,label:c="Input label",max:u,maxLength:d,min:p,name:h,onChange:m,prefix:f,requiredText:g,setShowError:y,showError:v,size:w="md",suffix:b,type:x="text",value:k})=>{const{toCamelCase:E}=Ml(),D=a(null),S=E(c);r((()=>{v&&setTimeout((()=>{y(!1)}),3e3)}),[v]),r((()=>{D.current&&i&&D.current.focus()}),[i]);const C=(()=>{switch(x){case"email":return"email";case"tel":return"tel";case"number":return"numeric";default:return}})();return t.createElement("div",{className:`position-relative ${n} ${o?"disabled":""}`},f||b||l?t.createElement("div",{className:"input-group "+(v?"not-validated":""),"data-error":g},l&&t.createElement("span",{className:"input-group-text"},t.createElement(ke,{style:"solid",name:l,scale:1})),f&&t.createElement("span",{className:"input-group-text"},f),t.createElement("div",{className:"form-floating"},t.createElement("input",{type:x,className:"form-control "+("md"!==w?`form-control-${w}`:""),value:k,id:S,name:h,placeholder:c,onChange:m,required:!!g,autoFocus:e,ref:D,min:p,max:u,inputMode:C}),t.createElement("label",{htmlFor:S},c)),b&&t.createElement("span",{className:"input-group-text"},b)):t.createElement("div",{className:"form-floating "+(v?"not-validated":""),"data-error":g},t.createElement("input",{type:x,className:"form-control "+("md"!==w?`form-control-${w}`:""),value:k,id:S,placeholder:c,onChange:m,required:!!g,name:h,autoFocus:e,ref:D,min:p,max:u,maxLength:d,inputMode:C}),t.createElement("label",{htmlFor:S},c)),s&&t.createElement("small",{className:"text-muted"},s))};Nl.propTypes={autoFocus:H.bool,className:H.string,disabled:H.bool,focus:H.bool,helpText:H.string,icon:H.string,label:H.string,max:H.oneOfType([H.string,H.number]),maxLength:H.number,min:H.oneOfType([H.string,H.number]),name:H.string,onChange:H.func,prefix:H.string,requiredText:H.string,size:H.oneOf(["xs","md","lg"]),showError:H.bool,setShowError:H.func,suffix:H.string,type:H.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:H.oneOfType([H.string,H.number])};const Ol=({children:e,className:n="",disabled:r=!1,fullWidth:a=!1,id:o,name:i,setStatus:s,size:l="md",status:c=!0})=>{const{toCamelCase:u}=Ml();let d=o;o||"string"!=typeof e||(d=u(e));return t.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},t.createElement("label",{className:`radio ${a?"w-100":""} ${"lg"===l?"radio-lg":"xs"===l?"radio-xs":""}`},t.createElement("input",{type:"radio",checked:c,onChange:e=>{s(e.target.checked)},minLength:"1",id:d,name:i}),e))};Ol.propTypes={className:H.string,disabled:H.bool,fullWidth:H.bool,id:H.string,name:H.string,setStatus:H.func,size:H.oneOf(["xs","md","lg"]),status:H.bool};const Ll=({children:e,className:n="",disabled:r=!1,icon:a=!1,id:o,name:i,setStatus:s,size:l,status:c=0,switchPosition:u="start"})=>{const{toCamelCase:d}=Ml(),p="lg"===l?"form-switch-lg":"xs"===l?"form-switch-xs":"",h=o||d(e);return t.createElement("div",{className:`form-check form-switch ${p} ${n} ${"end"===u?"switch-end":""} ${a?"switch-icon":""} ${r?"disabled":""}`},t.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:()=>{if("boolean"==typeof c)return s(!c);s(c?0:1)},id:h,name:i,checked:!!c}),e&&t.createElement("label",{className:"form-check-label",htmlFor:h},e))};Ll.propTypes={className:H.string,disabled:H.bool,icon:H.bool,id:H.string,name:H.string,setStatus:H.func,status:H.oneOfType([H.number,H.bool]),size:H.oneOf(["xs","md","lg"]),switchPosition:H.oneOf(["start","end"])};const Rl=({className:e="",disabled:n=!1,helpText:a,label:o="Textarea label",name:i,onChange:s,requiredText:l,showError:c,setShowError:u,size:d="md",value:p=""})=>{const{toCamelCase:h}=Ml(),m="lg"===d?"form-control-lg":"xs"===d?"form-control-xs":"",f=h(o);return r((()=>{c&&setTimeout((()=>{u(!1)}),3e3)}),[c]),t.createElement("div",{className:`position-relative ${e} ${n?"disabled":""}`},t.createElement("div",{className:"form-floating "+(c?"not-validated":""),"data-error":l},t.createElement("textarea",{className:`form-control ${m}`,onChange:s,placeholder:o,id:f,name:i,required:!!l,value:p||""}),t.createElement("label",{htmlFor:f},o),a&&t.createElement("small",{className:"text-muted"},a)))};Rl.propTypes={className:H.string,disabled:H.bool,helpText:H.string,label:H.string,name:H.string,onChange:H.func,requiredText:H.string,showError:H.bool,setShowError:H.func,size:H.oneOf(["xs","md","lg"]),value:H.string};const Al=({autoFocus:e=!1,className:n="",counter:a=!1,disabled:o=!1,duplicateKeywordErrorText:s="Duplicate keyword.",keywordsList:l=[],maxKeywords:c,maxKeywordLength:u,pillColor:d="neutral",placeholder:p="Add keywords…",recomendedKeywords:h,requiredText:m,setKeywordsList:f})=>{const[g,y]=i(""),[v,w]=i(""),[b,x]=i(!1);return r((()=>{l.length===c&&(x(!0),setTimeout((()=>{x(!1)}),3e3))}),[l]),t.createElement(t.Fragment,null,t.createElement("div",{className:`position-relative ${n} ${o?"disabled":""}`},t.createElement("div",{className:"input-chip "+(b?"not-validated":""),"data-error":m},t.createElement("div",{className:"wrapper"},l.map(((e,n)=>t.createElement(Ce,{key:n,closeButton:!0,color:d,onClick:()=>(e=>{const t=l.filter((t=>t!==e));f(t)})(e)},e)))),t.createElement("input",{type:"text",value:g,onKeyDown:e=>{if("Enter"===e.key&&""!==g.trim()&&l.length<c){if(g.length>u)return w(`Each keyword must be ${u} characters or less.`),setTimeout((()=>w("")),2e3),void y("");if(l.includes(g.trim()))return w(s),setTimeout((()=>w("")),2e3),void y("");const e=[...l,g.trim()];f(e),y("")}},onChange:e=>{y(e.target.value)},placeholder:p,autoFocus:e}),a&&l.length>=h&&t.createElement("div",{className:"progress-counter-wrapper "+(l.length>=c?"progress-value-error":l.length>=h?"progress-value-warning":"")},t.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"progress-counter"},t.createElement("circle",{className:"progress-bg",cx:"10",cy:"10",r:"9",fill:"none"}),t.createElement("circle",{className:"progress-value",cx:"10",cy:"10",r:"9",strokeDasharray:56.55,strokeDashoffset:56.55*(1-l.length/c),strokeLinecap:"round",fill:"none"})),t.createElement("span",{className:"progress-counter-text"},l.length))),v&&t.createElement("small",{className:"text-muted"},v)))};Al.propTypes={autoFocus:H.bool,className:H.string,counter:H.bool,disabled:H.bool,duplicateKeywordErrorText:H.string,keywordsList:H.array.isRequired,maxKeywords:H.number.isRequired,maxKeywordLength:H.number.isRequired,pillColor:H.oneOf(["blue","danger","dark","green","light","midtone","neutral","red","yellow"]),placeholder:H.string.isRequired,recomendedKeywords:H.number.isRequired,requiredText:H.string.isRequired,setKeywordsList:H.func.isRequired};const _l=import.meta.env.MODE,Fl="production"===_l?"https://api.groovinads.com/":"localdev"===_l?"https://api-test.groovinads.com/":"https://api-dev.groovinads.com/";var Il={authStatus:Fl+"v2/auth/status",authLogout:Fl+"v2/auth/logout",applications:Fl+"v2/applications",favApps:Fl+"v2/applications/favorite",clients:Fl+"v2/auth/clients",clientsLogin:Fl+"v2/auth/clients/login",headers:{headers:{"Content-Type":"application/json",Authorization:"Bearer "+x.get("groovinadsAuthToken"),"Accept-Language":"en"}}};k.defaults.withCredentials=!0;const Yl=async({url:e})=>await k.get(e,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),Vl=async({url:e,data:t})=>await k.post(e,t,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),Bl=async e=>await Yl({url:`${Fl}${e}`}),Wl=async(e,t)=>await Vl({url:`${Fl}${e}`,data:t}),jl=async e=>await(async({url:e})=>await k.delete(e,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))))({url:`${Il.favApps}/${e}`}),Hl=({apiGetEmail:e,apiPostEmail:n,disabled:a=!1,label:o="Email addresses",showModal:s=!0,textButton:l="Add",textError:c="You must enter a valid email address",titleList:u="Added emails"})=>{const[d,p]=i([]),[h,m]=i(""),[f,g]=i([]),[y,v]=i(!1),w=/^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/;return r((()=>{s?(async()=>{const t=await Bl(e);p(t||[])})():d.length&&p([])}),[s]),t.createElement(t.Fragment,null,t.createElement("div",{className:"mb-3"},t.createElement("div",{className:`mb-3 input-group w-100 mb-4 ${y?"not-validated":""} ${a?"disabled":""}`,"data-error":c},t.createElement(Nl,{label:o,value:h,onChange:e=>{(e=>{const t=e.target.value.replace(/\. +/g," ");m(t),t.trim()&&!w.test(t)||v(!1)})(e)}}),t.createElement(Pe,{onClick:async()=>{const e=h.split(/[;, ]+/).map((e=>e.trim())).filter((e=>e.length>0)),t=e.filter((e=>!w.test(e))),r=e.filter((e=>w.test(e)));if(t.length&&(m(t.join(" ")),v(!0),setTimeout((()=>{v(!1)}),3e3)),r.length){const e=await Wl(n,[...d,...r]);p(e)}m(t.join(" "))},className:""+(h.trim()?"":"disabled")},l))),d?.length?t.createElement("div",{className:"shared-users-list"},t.createElement("h3",null,u),d?.map(((e,r)=>t.createElement("div",{key:`email${r}`,className:"shared-user-item"},t.createElement("div",{className:"shared-user"},t.createElement(ke,{name:"user-circle",scale:2}),t.createElement("span",null,e)),f.some((t=>t===e))?t.createElement("div",{className:"spinner-wrapper"},t.createElement(Te,{scale:1})):t.createElement(Pe,{variant:"terciary",style:"danger",startIcon:"trash-can",onClick:()=>(async e=>{g([...f,e]);const t=d.filter((t=>t!==e)),r=await Wl(n,t);setTimeout((()=>{g(f.filter((t=>t!==e))),p(r)}),1e3)})(e)}))))):null)};Hl.propTypes={apiGetEmail:H.string.isRequired,apiPostEmail:H.string.isRequired,disabled:H.bool,label:H.string,showModal:H.bool,textButton:H.string,textError:H.string,titleList:H.string};const $l=({autoClose:e=!1,className:n="",disabled:o=!1,locked:s=!1,menuType:l="simple",onRemoveFilter:d,onToggle:p,overflow:h=!1,requiredText:m,searchLabel:f="Search",setShow:g,setValuesSelected:y,show:w,showError:b=!1,title:x,values:k=[],valuesSelected:E=[]})=>{const[D,S]=i(""),[C,T]=i(!!w),[M,P]=i(!1),[N,O]=i(0),[L,R]=i(0),[A,_]=i({top:0,left:0}),F=a(null),I=a(null),Y=a(C),V=()=>t.createElement("div",{className:"dropdown-filter-empty-space"},t.createElement("img",{src:"https://ui.groovinads.com/assets/not-found.svg",alt:"Sad magnifier on abstract background"}),t.createElement("div",null,t.createElement("h5",null,"Value not found"),t.createElement("p",null,"It looks like this value does not exist."))),B=(e,t)=>{y(e?[...E,t]:E.filter((e=>e!==t)))},W=c((()=>{if(!I.current)return;const e=I.current.offsetHeight,t=I.current.offsetWidth;if(O(e),R(t),h){const e=I.current.getBoundingClientRect();_({top:e.top,left:e.left})}}),[h]);r((()=>{w!==Y.current&&(T(w),P(!0),Y.current=w)}),[w]);const j=c((t=>{!F?.current||F?.current.contains(t?.target)||!0!==e&&"outside"!==e||(!1!==Y.current&&(P(!0),Y.current=!1),T(!1),g(!1))}),[e,g]);r((()=>(document.addEventListener("click",j),()=>{document.removeEventListener("click",j)})),[j]),r((()=>{W()}),[W]);const H=u((()=>{const e={};return h?(e.top=`${A.top+N}px`,e.left=`${A.left}px`):e.top=`${N}px`,e}),[N,h,A]),$=u((()=>M?{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[M]),q=c((()=>{M&&P(!1)}),[M]),U=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:h?"fixed":"absolute",...H,left:h?H.left:"0",...h&&L&&{width:`${L}px`},transformOrigin:"top left"};return t.createElement(Dl.ul,Ne({},o,{ref:n},$,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:q}))}));return e.displayName="MotionMenu",e}),[$,q,h,H,L]),K=u((()=>({strategy:h?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...h&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[h]);return t.createElement(v,{onToggle:p,className:`dropdown-filter ${s?"locked":""} ${n} ${o?"disabled":""}`,autoClose:e,show:C,ref:F,"data-error":m,style:{position:"relative"}},t.createElement(v.Toggle,{ref:I,variant:"toggle-filter",className:b?"not-validated":"",onClick:e=>{e.stopPropagation();const t=!C;t!==Y.current&&(P(!0),Y.current=t),T(t),g(t),W()}},t.createElement("div",{className:"filter-heading"},t.createElement("div",{className:"filter-title"},t.createElement("span",{className:"filter-title-text"},x),E.length>0&&t.createElement("span",{className:"filter-title-count"},` (${E.length})`),s&&t.createElement(ke,{style:"solid",name:"lock-keyhole",scale:.7})),t.createElement(ke,{style:"solid",name:"chevron-down",scale:1,className:"caret"})),t.createElement("div",{className:"filter-values"},E.length===k.length?"All selected":E.length?E.join("; "):"None")),!s&&t.createElement(Pe,{variant:"terciary",endIcon:"xmark",size:"md",className:"remove-filter",onClick:d}),"simple"===l&&t.createElement(v.Menu,{as:U,className:"dropdown-menu-simple",popperConfig:K},t.createElement("div",{className:"dropdown-menu-wrapper"},t.createElement(Nl,{size:"xs",label:f,icon:"magnifying-glass",className:"w-100",value:D,onChange:({target:e})=>S(e.value),customRef:w}),k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).length>0?t.createElement("ul",{className:"dropdown-filter-list"},k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).map(((e,n)=>t.createElement(Pl,{setStatus:t=>{B(t,e)},status:E.includes(e),key:"Dropdown.Simple.Checkbox"+n},e)))):t.createElement(V,null))),"selection"===l&&t.createElement(v.Menu,{as:U,className:"dropdown-menu-selection",popperConfig:K},t.createElement("div",{className:"dropdown-menu-wrapper"},t.createElement("div",{className:"dropdown-filter-list-wrapper"},t.createElement(Nl,{size:"xs",label:f,icon:"magnifying-glass",className:"w-100",value:D,onChange:({target:e})=>S(e.value),customRef:w}),t.createElement("h4",null,"All values (",k.length,")"),k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).length>0?t.createElement(t.Fragment,null,t.createElement("ul",{className:"dropdown-filter-list"},k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).map(((e,n)=>t.createElement(Pl,{setStatus:t=>{B(t,e)},status:E.includes(e),key:"Dropdown.Selection.Checkbox"+n},e))))):t.createElement(V,null)),t.createElement("div",{className:"dropdown-filter-values-wrapper"},t.createElement("div",{className:"dropdown-filter-buttons-wrapper"},t.createElement(Pe,{startIcon:"check",size:"xs",variant:"terciary",onClick:()=>{y([...k])}},"Select all"),t.createElement(Pe,{startIcon:"xmark",size:"xs",variant:"terciary",onClick:()=>{y([])}},"Clear selection")),t.createElement("h4",null,"Selected values (",E.length,")"),t.createElement("div",{className:"dropdown-filter-selected-list"},E.map(((e,n)=>t.createElement(Ce,{color:"light",closeButton:!0,onClick:()=>{(e=>{y(E.filter(((t,n)=>n!==e)))})(n)},key:"Dropdown.PillComponent"+n},e))))))))};$l.propTypes={autoClose:H.oneOfType([H.bool,H.oneOf(["outside"])]),className:H.string,disabled:H.bool,locked:H.bool,menuType:H.oneOf(["simple","selection"]),onRemoveFilter:H.func,onToggle:H.func,overflow:H.bool,requiredText:H.string,searchLabel:H.string,setShow:H.func,setValuesSelected:H.func,show:H.bool,showError:H.bool,title:H.string,values:H.array,valuesSelected:H.array};const ql=({autoClose:e=!1,buttonVariant:n="input",className:o="",customKey:s,disabled:l=!1,drop:d,focus:p=!1,hasId:h=!0,idInPill:m=!1,idKey:f,inputLabel:g="",nameKey:y,notMatchedText:w="No match found",nowrap:b=!1,object:x=!1,onToggle:k,overflow:E=!1,requiredText:D="Required",searchLabel:S="Search",setValuesSelected:C,setShow:T,show:M,showError:P=!1,showStatus:N="",values:O=[],valuesSelected:L=[]})=>{const[R,A]=i(""),[_,F]=i(!!M),[I,Y]=i(!1),[V,B]=i(0),[W,j]=i(0),[H,$]=i({top:0,left:0}),q=a(null),U=a(null),K=a(null),z=a(_),{highlightText:Q}=Ml(),X=c(((e,t)=>{const n=O.findIndex((e=>(x?e[f]:e)===(x?t[f]:t)));C(e?e=>[...e,O[n]]:e=>e.filter((e=>(x?e[f]:e)!==(x?O[n][f]:O[n]))))}),[O,x,f,C]),G=c((e=>{C((t=>t.filter(((t,n)=>n!==e))))}),[C]),Z=u((()=>O.filter((e=>(x?`${e[f]} ${e[y]} ${e[s]}`:e).toLowerCase().includes(R.toLowerCase())&&(!N||parseInt(e.status)===parseInt(N))))),[O,x,f,y,s,R,N]),J=c((()=>{if(!U.current)return;const e=U.current.offsetHeight,t=U.current.offsetWidth;if(B(e),j(t),E){const e=U.current.getBoundingClientRect();$({top:e.top,left:e.left})}}),[E]),ee=c((t=>{!q?.current||q?.current.contains(t?.target)||!0!==e&&"outside"!==e||(!1!==z.current&&(Y(!0),z.current=!1),F(!1),T(!1))}),[e,T]);r((()=>{M!==z.current&&(F(M),Y(!0),z.current=M)}),[M]),r((()=>(document.addEventListener("click",ee),()=>{document.removeEventListener("click",ee)})),[ee]),r((()=>{J()}),[J]);const te="up"===d?"bottom left":"top left",ne=u((()=>{const e={};return E?"up"===d?(e.bottom=window.innerHeight-H.top+"px",e.left=`${H.left}px`):(e.top=`${H.top+V}px`,e.left=`${H.left}px`):"up"===d?e.bottom=`${V}px`:e.top=`${V}px`,e}),[d,V,E,H]),re=u((()=>I?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scaleY:1,opacity:1}}),[I]),ae=c((()=>{I&&Y(!1)}),[I]),oe=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:E?"fixed":"absolute",...ne,left:E?ne.left:"0",...E&&W&&{width:`${W}px`},transformOrigin:te};return t.createElement(Dl.ul,Ne({},o,{ref:n},re,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:ae}))}));return e.displayName="MotionMenu",e}),[re,ae,E,ne,W,d]),ie=u((()=>({strategy:E?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...E&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[E]),se=u((()=>["btn",`btn-${n}`,b&&"nowrap",P&&"not-validated",l&&"disabled"].filter(Boolean).join(" ")),[n,b,P,l]),le=c((e=>s?`${e[y]} - ${e[s]}`:m?`#${e[f]} - ${e[y]}`:e[y]||e),[s,m,y,f]),ce=c((e=>{const t=x?s?`${e[y]} - ${e[s]}`:`${h?`#${e[f]} - `:""}${e[y]}`:e[y]||e;return Q(t,R)}),[x,s,h,y,f,Q,R]);return t.createElement(v,{className:o,autoClose:e,show:_,ref:q,onToggle:k,drop:d,"data-error":D,style:{position:"relative"}},t.createElement(v.Toggle,{as:"div",ref:U,className:se,onClick:e=>{e.stopPropagation();const t=!_;t!==z.current&&(Y(!0),z.current=t),F(t),J()}},L.length>0&&"input"===n&&t.createElement("div",{className:"wrapper"},L.map(((e,n)=>t.createElement(Ce,{color:"neutral",closeButton:!0,onClick:e=>{e.stopPropagation(),G(n)},key:`Dropdown.PillComponent.${n}`},le(e))))),t.createElement("span",{className:"label"},g),t.createElement(ke,{style:"solid",name:"angle-down",scale:1,className:"caret"})),t.createElement(v.Menu,{as:oe,className:"w-100",ref:K,popperConfig:ie},t.createElement(v.Item,{onClick:e=>e.stopPropagation(),as:"div"},t.createElement(Nl,{label:S,value:R,onChange:({target:e})=>A(e.value),icon:"magnifying-glass",size:"xs",className:"w-100",focus:p})),t.createElement(v.Item,{onClick:e=>e.stopPropagation(),as:"div"},Z.length>0?t.createElement("ul",{className:"dropdown-checks"},Z.map(((e,n)=>t.createElement(Pl,{setStatus:t=>X(t,e),status:x?L.some((t=>t[f]===e[f])):L.includes(e),key:`Dropdown.Input.Checkbox.${n}`},ce(e))))):t.createElement("div",{className:"not-matched"},t.createElement("p",null,w)))))};ql.propTypes={autoClose:H.oneOfType([H.bool,H.string]),buttonVariant:H.oneOf(["input","primary","secondary","terciary","outline"]),className:H.string,customKey:H.string,disabled:H.bool,drop:H.oneOf(["up","down"]),focus:H.bool,hasId:H.bool,idInPill:H.bool,idKey:H.string,inputLabel:H.string,nameKey:H.string,notMatchedText:H.string,nowrap:H.bool,object:H.bool,onToggle:H.func,overflow:H.bool,requiredText:H.string,searchLabel:H.string,setValuesSelected:H.func,setShow:H.func,show:H.bool,showError:H.bool,showStatus:H.string,values:H.array,valuesSelected:H.array};const Ul=6048e5,Kl=864e5,zl=Symbol.for("constructDateFrom");function Ql(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&zl in e?e[zl](t):e instanceof Date?new e.constructor(t):new Date(t)}function Xl(e,t){return Ql(t||e,e)}let Gl={};function Zl(){return Gl}function Jl(e,t){const n=Zl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Xl(e,t?.in),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function ec(e,t){return Jl(e,{...t,weekStartsOn:1})}function tc(e,t){const n=Xl(e,t?.in),r=n.getFullYear(),a=Ql(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=ec(a),i=Ql(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=ec(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function nc(e){const t=Xl(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 rc(e,t){const n=Xl(e,t?.in);return n.setHours(0,0,0,0),n}function ac(e,t,n){const[r,a]=function(e,...t){const n=Ql.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}(0,e,t),o=rc(r),i=rc(a),s=+o-nc(o),l=+i-nc(i);return Math.round((s-l)/Kl)}function oc(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Xl(e)));var t}const ic={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"}};function sc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lc={date:sc({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sc({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sc({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},cc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function uc(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const dc={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:uc({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:uc({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:uc({values:{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"]},defaultWidth:"wide"}),day:uc({values:{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"]},defaultWidth:"wide"}),dayPeriod:uc({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function pc(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const hc={ordinalNumber:(mc={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(mc.matchPattern);if(!n)return null;const r=n[0],a=e.match(mc.parsePattern);if(!a)return null;let o=mc.valueCallback?mc.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:pc({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:pc({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})};var mc;const fc={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=ic[e];return r="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:lc,formatRelative:(e,t,n,r)=>cc[e],localize:dc,match:hc,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gc(e,t){const n=Xl(e,t?.in),r=ac(n,function(e,t){const n=Xl(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return r+1}function yc(e,t){const n=Xl(e,t?.in),r=+ec(n)-+function(e,t){const n=tc(e,t),r=Ql(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ec(r)}(n);return Math.round(r/Ul)+1}function vc(e,t){const n=Xl(e,t?.in),r=n.getFullYear(),a=Zl(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=Ql(t?.in||e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Jl(i,t),l=Ql(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Jl(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function wc(e,t){const n=Xl(e,t?.in),r=+Jl(n,t)-+function(e,t){const n=Zl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=vc(e,t),o=Ql(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Jl(o,t)}(n,t);return Math.round(r/Ul)+1}function bc(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const xc={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return bc("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):bc(n+1,2)},d:(e,t)=>bc(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>bc(e.getHours()%12||12,t.length),H:(e,t)=>bc(e.getHours(),t.length),m:(e,t)=>bc(e.getMinutes(),t.length),s:(e,t)=>bc(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return bc(Math.trunc(r*Math.pow(10,n-3)),t.length)}},kc="midnight",Ec="noon",Dc="morning",Sc="afternoon",Cc="evening",Tc="night",Mc={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return xc.y(e,t)},Y:function(e,t,n,r){const a=vc(e,r),o=a>0?a:1-a;if("YY"===t){return bc(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):bc(o,t.length)},R:function(e,t){return bc(tc(e),t.length)},u:function(e,t){return bc(e.getFullYear(),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 bc(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"});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 bc(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"});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 xc.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"});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 bc(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=wc(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):bc(a,t.length)},I:function(e,t,n){const r=yc(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):bc(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):xc.d(e,t)},D:function(e,t,n){const r=gc(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):bc(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return bc(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return bc(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return bc(a,t.length);case"io":return n.ordinalNumber(a,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(a=12===r?Ec:0===r?kc:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(a=r>=17?Cc:r>=12?Sc:r>=4?Dc:Tc,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return xc.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):xc.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):bc(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):bc(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xc.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xc.s(e,t)},S:function(e,t){return xc.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Nc(r);case"XXXX":case"XX":return Oc(r);default:return Oc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Nc(r);case"xxxx":case"xx":return Oc(r);default:return Oc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pc(r,":");default:return"GMT"+Oc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pc(r,":");default:return"GMT"+Oc(r,":")}},t:function(e,t,n){return bc(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return bc(+e,t.length)}};function Pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+t+bc(o,2)}function Nc(e,t){if(e%60==0){return(e>0?"-":"+")+bc(Math.abs(e)/60,2)}return Oc(e,t)}function Oc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+bc(Math.trunc(r/60),2)+t+bc(r%60,2)}const Lc=(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"});default:return t.date({width:"full"})}},Rc=(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"});default:return t.time({width:"full"})}},Ac={p:Rc,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Lc(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Lc(r,t)).replace("{{time}}",Rc(a,t))}},_c=/^D+$/,Fc=/^Y+$/,Ic=["D","DD","YY","YYYY"];const Yc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bc=/^'([^]*?)'?$/,Wc=/''/g,jc=/[a-zA-Z]/;function Hc(e,t,n){const r=Zl(),a=r.locale??fc,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Xl(e,n?.in);if(!oc(s))throw new RangeError("Invalid time value");let l=t.match(Vc).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ac[t])(e,a.formatLong)}return e})).join("").match(Yc).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:$c(e)};if(Mc[t])return{isToken:!0,value:e};if(t.match(jc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return Fc.test(e)}(r)||function(e){return _c.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),Ic.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,Mc[r[0]])(s,r,a.localize,c)})).join("")}function $c(e){const t=e.match(Bc);return t?t[1].replace(Wc,"'"):e}function qc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=qc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Uc(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=qc(e))&&(r&&(r+=" "),r+=t);return r}function Kc(e,t){return Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kc(e,t)}function zc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qc(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var Xc,Gc,Zc=(void 0===Xc&&(Xc=0),function(){return++Xc}),Jc={},eu={},tu=["touchstart","touchmove"];function nu(e,t){var n={};return-1!==tu.indexOf(t)&&Gc&&(n.passive=!e.props.preventDefault),n}function ru(e,t){var n,r,a=e.displayName||e.name||"Component";return r=n=function(t){var n,r;function o(e){var n;return(n=t.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof n.__clickOutsideHandlerProp){var t=n.getInstance();if("function"!=typeof t.props.handleClickOutside){if("function"!=typeof t.handleClickOutside)throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else n.__clickOutsideHandlerProp(e)},n.__getComponentNode=function(){var e=n.getInstance();return"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():F(e)},n.enableOnClickOutside=function(){if("undefined"!=typeof document&&!eu[n._uid]){void 0===Gc&&(Gc=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),eu[n._uid]=!0;var e=n.props.eventTypes;e.forEach||(e=[e]),Jc[n._uid]=function(e){var t;null!==n.componentNode&&(n.initTimeStamp>e.timeStamp||(n.props.preventDefault&&e.preventDefault(),n.props.stopPropagation&&e.stopPropagation(),n.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Qc(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,n.componentNode,n.props.outsideClickIgnoreClass)===document&&n.__outsideClickHandler(e)))},e.forEach((function(e){document.addEventListener(e,Jc[n._uid],nu(zc(n),e))}))}},n.disableOnClickOutside=function(){delete eu[n._uid];var e=Jc[n._uid];if(e&&"undefined"!=typeof document){var t=n.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,nu(zc(n),t))})),delete Jc[n._uid]}},n.getRef=function(e){return n.instanceRef=e},n._uid=Zc(),n.initTimeStamp=performance.now(),n}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,Kc(n,r);var i=o.prototype;return i.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},i.componentDidMount=function(){"undefined"!=typeof document&&document.createElement&&(this.getInstance(),this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside())},i.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},i.componentWillUnmount=function(){this.disableOnClickOutside()},i.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,p(e,n)},o}(f),n.displayName="OnClickOutside("+a+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function au(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function ou(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function iu(e,t){const n=au(e);return isNaN(t)?ou(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function su(e,t){return ou(e,+au(e)+t)}const lu=6048e5,cu=864e5,uu=6e4,du=36e5;function pu(e,t){return su(e,t*uu)}function hu(e,t){const n=au(e);if(isNaN(t))return ou(e,NaN);if(!t)return n;const r=n.getDate(),a=ou(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);return r>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function mu(e,t){return hu(e,3*t)}function fu(e,t){return su(e,1e3*t)}function gu(e,t){return iu(e,7*t)}function yu(e,t){return hu(e,12*t)}function vu(e){const t=au(e);return t.setHours(0,0,0,0),t}function wu(e){const t=au(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 bu(e,t){const n=vu(e),r=vu(t),a=+n-wu(n),o=+r-wu(r);return Math.round((a-o)/cu)}function xu(e,t){const n=au(e),r=au(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function ku(e){const t=au(e);return Math.trunc(t.getMonth()/3)+1}function Eu(e,t){const n=au(e),r=au(t);return 4*(n.getFullYear()-r.getFullYear())+(ku(n)-ku(r))}function Du(e,t){const n=au(e),r=au(t);return n.getFullYear()-r.getFullYear()}function Su(e){const t=au(e);return t.setHours(23,59,59,999),t}function Cu(e){const t=au(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}let Tu={};function Mu(){return Tu}function Pu(e){const t=au(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}const Nu={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"}};function Ou(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Lu={date:Ou({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ou({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ou({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ru={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Au(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const _u={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:Au({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Au({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Au({values:{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"]},defaultWidth:"wide"}),day:Au({values:{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"]},defaultWidth:"wide"}),dayPeriod:Au({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function Fu(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const Iu={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fu({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:Fu({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})},Yu={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=Nu[e];return r="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Lu,formatRelative:(e,t,n,r)=>Ru[e],localize:_u,match:Iu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vu(e){const t=au(e),n=ou(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Bu(e,t){const n=Mu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=au(e),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function Wu(e){return Bu(e,{weekStartsOn:1})}function ju(e){const t=au(e),n=t.getFullYear(),r=ou(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=Wu(r),o=ou(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=Wu(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Hu(e){const t=au(e),n=+Wu(t)-+function(e){const t=ju(e),n=ou(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wu(n)}(t);return Math.round(n/lu)+1}function $u(e,t){const n=au(e),r=n.getFullYear(),a=Mu(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=ou(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Bu(i,t),l=ou(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Bu(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function qu(e,t){const n=au(e),r=+Bu(n,t)-+function(e,t){const n=Mu(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=$u(e,t),o=ou(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Bu(o,t)}(n,t);return Math.round(r/lu)+1}function Uu(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Uu("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Uu(n+1,2)},d:(e,t)=>Uu(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Uu(e.getHours()%12||12,t.length),H:(e,t)=>Uu(e.getHours(),t.length),m:(e,t)=>Uu(e.getMinutes(),t.length),s:(e,t)=>Uu(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Uu(Math.trunc(r*Math.pow(10,n-3)),t.length)}},zu="midnight",Qu="noon",Xu="morning",Gu="afternoon",Zu="evening",Ju="night",ed={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const a=$u(e,r),o=a>0?a:1-a;if("YY"===t){return Uu(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Uu(o,t.length)},R:function(e,t){return Uu(ju(e),t.length)},u:function(e,t){return Uu(e.getFullYear(),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 Uu(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"});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 Uu(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"});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 Ku.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"});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 Uu(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=qu(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):Uu(a,t.length)},I:function(e,t,n){const r=Hu(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Uu(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=function(e){const t=au(e);return bu(t,Vu(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Uu(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Uu(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Uu(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return Uu(a,t.length);case"io":return n.ordinalNumber(a,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(a=12===r?Qu:0===r?zu:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(a=r>=17?Zu:r>=12?Gu:r>=4?Xu:Ju,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Uu(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Uu(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return nd(r);case"XXXX":case"XX":return rd(r);default:return rd(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nd(r);case"xxxx":case"xx":return rd(r);default:return rd(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+td(r,":");default:return"GMT"+rd(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+td(r,":");default:return"GMT"+rd(r,":")}},t:function(e,t,n){return Uu(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return Uu(e.getTime(),t.length)}};function td(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+t+Uu(o,2)}function nd(e,t){if(e%60==0){return(e>0?"-":"+")+Uu(Math.abs(e)/60,2)}return rd(e,t)}function rd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Uu(Math.trunc(r/60),2)+t+Uu(r%60,2)}const ad=(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"});default:return t.date({width:"full"})}},od=(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"});default:return t.time({width:"full"})}},id={p:od,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return ad(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",ad(r,t)).replace("{{time}}",od(a,t))}},sd=/^D+$/,ld=/^Y+$/,cd=["D","DD","YY","YYYY"];function ud(e){return sd.test(e)}function dd(e){return ld.test(e)}function pd(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),cd.includes(e))throw new RangeError(r)}function hd(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function md(e){if(!hd(e)&&"number"!=typeof e)return!1;const t=au(e);return!isNaN(Number(t))}const fd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yd=/^'([^]*?)'?$/,vd=/''/g,wd=/[a-zA-Z]/;function bd(e,t,n){const r=Mu(),a=n?.locale??r.locale??Yu,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=au(e);if(!md(s))throw new RangeError("Invalid time value");let l=t.match(gd).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,id[t])(e,a.formatLong)}return e})).join("").match(fd).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:xd(e)};if(ed[t])return{isToken:!0,value:e};if(t.match(wd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map((r=>{if(!r.isToken)return r.value;const o=r.value;(!n?.useAdditionalWeekYearTokens&&dd(o)||!n?.useAdditionalDayOfYearTokens&&ud(o))&&pd(o,t,String(e));return(0,ed[o[0]])(s,o,a.localize,c)})).join("")}function xd(e){const t=e.match(yd);return t?t[1].replace(vd,"'"):e}function kd(e){return au(e).getDate()}function Ed(e){return au(e).getHours()}function Dd(e){return au(e).getMinutes()}function Sd(e){return au(e).getMonth()}function Cd(e){return au(e).getSeconds()}function Td(e){return au(e).getTime()}function Md(e){return au(e).getFullYear()}function Pd(e,t){const n=au(e),r=au(t);return n.getTime()>r.getTime()}function Nd(e,t){return+au(e)<+au(t)}function Od(e){const t=au(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Ld(e,t){const n=+au(e),[r,a]=[+au(t.start),+au(t.end)].sort(((e,t)=>e-t));return n>=r&&n<=a}function Rd(e){let t;return e.forEach((function(e){const n=au(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}function Ad(e){let t;return e.forEach((e=>{const n=au(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}class _d{subPriority=0;validate(e,t){return!0}}class Fd extends _d{constructor(e,t,n,r,a){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class Id extends _d{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:ou(e,function(e,t){const n=t instanceof Date?ou(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,Date))}}class Yd{run(e,t,n,r){const a=this.parse(e,t,n,r);return a?{setter:new Fd(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,n){return!0}}const Vd=/^(1[0-2]|0?\d)/,Bd=/^(3[0-1]|[0-2]?\d)/,Wd=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,jd=/^(5[0-3]|[0-4]?\d)/,Hd=/^(2[0-3]|[0-1]?\d)/,$d=/^(2[0-4]|[0-1]?\d)/,qd=/^(1[0-1]|0?\d)/,Ud=/^(1[0-2]|0?\d)/,Kd=/^[0-5]?\d/,zd=/^[0-5]?\d/,Qd=/^\d/,Xd=/^\d{1,2}/,Gd=/^\d{1,3}/,Zd=/^\d{1,4}/,Jd=/^-?\d+/,ep=/^-?\d/,tp=/^-?\d{1,2}/,np=/^-?\d{1,3}/,rp=/^-?\d{1,4}/,ap=/^([+-])(\d{2})(\d{2})?|Z/,op=/^([+-])(\d{2})(\d{2})|Z/,ip=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,sp=/^([+-])(\d{2}):(\d{2})|Z/,lp=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cp(e,t){return e?{value:t(e.value),rest:e.rest}:e}function up(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function dp(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,a=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(a*du+o*uu+1e3*i),rest:t.slice(n[0].length)}}function pp(e){return up(Jd,e)}function hp(e,t){switch(e){case 1:return up(Qd,t);case 2:return up(Xd,t);case 3:return up(Gd,t);case 4:return up(Zd,t);default:return up(new RegExp("^\\d{1,"+e+"}"),t)}}function mp(e,t){switch(e){case 1:return up(ep,t);case 2:return up(tp,t);case 3:return up(np,t);case 4:return up(rp,t);default:return up(new RegExp("^-?\\d{1,"+e+"}"),t)}}function fp(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gp(e,t){const n=t>0,r=n?t:1-t;let a;if(r<=50)a=e||100;else{const t=r+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?a:1-a}function yp(e){return e%400==0||e%4==0&&e%100!=0}const vp=[31,28,31,30,31,30,31,31,30,31,30,31],wp=[31,29,31,30,31,30,31,31,30,31,30,31];function bp(e,t,n){const r=Mu(),a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=au(e),i=o.getDay(),s=7-a;return iu(o,t<0||t>6?t-(i+s)%7:((t%7+7)%7+s)%7-(i+s)%7)}function xp(e,t){const n=au(e),r=function(e){let t=au(e).getDay();return 0===t&&(t=7),t}(n);return iu(n,t-r)}const kp={G:new class extends Yd{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends Yd{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return cp(hp(4,e),r);case"yo":return cp(n.ordinalNumber(e,{unit:"year"}),r);default:return cp(hp(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=gp(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends Yd{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return cp(hp(4,e),r);case"Yo":return cp(n.ordinalNumber(e,{unit:"year"}),r);default:return cp(hp(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const a=$u(e,r);if(n.isTwoDigitYear){const t=gp(n.year,a);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bu(e,r)}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bu(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Yd{priority=130;parse(e,t){return mp("R"===t?4:t.length,e)}set(e,t,n){const r=ou(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wu(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Yd{priority=130;parse(e,t){return mp("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends Yd{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return hp(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends Yd{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return hp(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends Yd{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return cp(up(Vd,e),r);case"MM":return cp(hp(2,e),r);case"Mo":return cp(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends Yd{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return cp(up(Vd,e),r);case"LL":return cp(hp(2,e),r);case"Lo":return cp(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends Yd{priority=100;parse(e,t,n){switch(t){case"w":return up(jd,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Bu(function(e,t,n){const r=au(e),a=qu(r,n)-t;return r.setDate(r.getDate()-7*a),r}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends Yd{priority=100;parse(e,t,n){switch(t){case"I":return up(jd,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Wu(function(e,t){const n=au(e),r=Hu(n)-t;return n.setDate(n.getDate()-7*r),n}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends Yd{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return up(Bd,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return hp(t.length,e)}}validate(e,t){const n=yp(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=wp[r]:t>=1&&t<=vp[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends Yd{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return up(Wd,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return hp(t.length,e)}}validate(e,t){return yp(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends Yd{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Yd{priority=90;parse(e,t,n,r){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return cp(hp(t.length,e),a);case"eo":return cp(n.ordinalNumber(e,{unit:"day"}),a);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends Yd{priority=90;parse(e,t,n,r){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return cp(hp(t.length,e),a);case"co":return cp(n.ordinalNumber(e,{unit:"day"}),a);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends Yd{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return hp(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return cp(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return cp(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return cp(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return cp(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=xp(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"h":return up(Ud,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"H":return up(Hd,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"K":return up(qd,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"k":return up($d,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends Yd{priority=60;parse(e,t,n){switch(t){case"m":return up(Kd,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends Yd{priority=50;parse(e,t,n){switch(t){case"s":return up(zd,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends Yd{priority=30;parse(e,t){return cp(hp(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends Yd{priority=10;parse(e,t){switch(t){case"X":return dp(ap,e);case"XX":return dp(op,e);case"XXXX":return dp(ip,e);case"XXXXX":return dp(lp,e);default:return dp(sp,e)}}set(e,t,n){return t.timestampIsSet?e:ou(e,e.getTime()-wu(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends Yd{priority=10;parse(e,t){switch(t){case"x":return dp(ap,e);case"xx":return dp(op,e);case"xxxx":return dp(ip,e);case"xxxxx":return dp(lp,e);default:return dp(sp,e)}}set(e,t,n){return t.timestampIsSet?e:ou(e,e.getTime()-wu(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends Yd{priority=40;parse(e){return pp(e)}set(e,t,n){return[ou(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Yd{priority=20;parse(e){return pp(e)}set(e,t,n){return[ou(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Ep=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sp=/^'([^]*?)'?$/,Cp=/''/g,Tp=/\S/,Mp=/[a-zA-Z]/;function Pp(e,t,n,r){const a=Object.assign({},Mu()),o=r?.locale??a.locale??Yu,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?au(n):ou(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o},c=[new Id],u=t.match(Dp).map((e=>{const t=e[0];if(t in id){return(0,id[t])(e,o.formatLong)}return e})).join("").match(Ep),d=[];for(let a of u){!r?.useAdditionalWeekYearTokens&&dd(a)&&pd(a,t,e),!r?.useAdditionalDayOfYearTokens&&ud(a)&&pd(a,t,e);const i=a[0],s=kp[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=d.find((e=>t.includes(e.token)||e.token===i));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===s.incompatibleTokens&&d.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);d.push({token:i,fullToken:a});const r=s.run(e,a,o.match,l);if(!r)return ou(n,NaN);c.push(r.setter),e=r.rest}else{if(i.match(Mp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===a?a="'":"'"===i&&(a=a.match(Sp)[1].replace(Cp,"'")),0!==e.indexOf(a))return ou(n,NaN);e=e.slice(a.length)}}if(e.length>0&&Tp.test(e))return ou(n,NaN);const p=c.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>c.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let h=au(n);if(isNaN(h.getTime()))return ou(n,NaN);const m={};for(const e of p){if(!e.validate(h,l))return ou(n,NaN);const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return ou(n,h)}function Np(e,t){const n=function(e){const t={},n=e.split(Op.dateTimeDelimiter);let r;if(n.length>2)return t;/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Op.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Op.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length)));if(r){const e=Op.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let r;if(n.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(n.date,2);r=function(e,t){if(null===t)return new Date(NaN);const n=e.match(Lp);if(!n)return new Date(NaN);const r=!!n[4],a=_p(n[1]),o=_p(n[2])-1,i=_p(n[3]),s=_p(n[4]),l=_p(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const a=r.getUTCDay()||7,o=7*(t-1)+n+1-a;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,l):new Date(NaN);{const e=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ip[t]||(Yp(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(Yp(e)?366:365)}(t,a)?(e.setUTCFullYear(t,o,Math.max(a,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const a=r.getTime();let o,i=0;if(n.time&&(i=function(e){const t=e.match(Rp);if(!t)return NaN;const n=Fp(t[1]),r=Fp(t[2]),a=Fp(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,a))return NaN;return n*du+r*uu+1e3*a}(n.time),isNaN(i)))return new Date(NaN);if(!n.timezone){const e=new Date(a+i),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return o=function(e){if("Z"===e)return 0;const t=e.match(Ap);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,a))return NaN;return n*(r*du+a*uu)}(n.timezone),isNaN(o)?new Date(NaN):new Date(a+i+o)}const Op={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Lp=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rp=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ap=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _p(e){return e?parseInt(e):1}function Fp(e){return e&&parseFloat(e.replace(",","."))||0}const Ip=[31,null,31,30,31,30,31,31,30,31,30,31];function Yp(e){return e%400==0||e%4==0&&e%100!=0}function Vp(e,t){const n=au(e),r=n.getFullYear(),a=n.getDate(),o=ou(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const i=function(e){const t=au(e),n=t.getFullYear(),r=t.getMonth(),a=ou(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}(o);return n.setMonth(t,Math.min(a,i)),n}function Bp(e,t){const n=au(e);return n.setHours(t),n}function Wp(e,t){const n=au(e);return n.setMinutes(t),n}function jp(e,t){const n=au(e),r=t-(Math.trunc(n.getMonth()/3)+1);return Vp(n,n.getMonth()+3*r)}function Hp(e,t){const n=au(e);return n.setSeconds(t),n}function $p(e,t){const n=au(e);return isNaN(+n)?ou(e,NaN):(n.setFullYear(t),n)}function qp(e){const t=au(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Up(e,t){return hu(e,-t)}function Kp(e,t){return mu(e,-t)}function zp(e,t){return gu(e,-t)}function Qp(e,t){return yu(e,-t)}function Xp(e){return Jp(e)?(e.nodeName||"").toLowerCase():"#document"}function Gp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Zp(e){var t;return null==(t=(Jp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Jp(e){return e instanceof Node||e instanceof Gp(e).Node}function eh(e){return e instanceof Element||e instanceof Gp(e).Element}function th(e){return e instanceof HTMLElement||e instanceof Gp(e).HTMLElement}function nh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Gp(e).ShadowRoot)}function rh(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ch(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function ah(e){return["table","td","th"].includes(Xp(e))}function oh(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ih(e){const t=sh(),n=ch(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function sh(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function lh(e){return["html","body","#document"].includes(Xp(e))}function ch(e){return Gp(e).getComputedStyle(e)}function uh(e){return eh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dh(e){if("html"===Xp(e))return e;const t=e.assignedSlot||e.parentNode||nh(e)&&e.host||Zp(e);return nh(t)?t.host:t}function ph(e){const t=dh(e);return lh(t)?e.ownerDocument?e.ownerDocument.body:e.body:th(t)&&rh(t)?t:ph(t)}function hh(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=ph(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Gp(a);return o?t.concat(i,i.visualViewport||[],rh(a)?a:[],i.frameElement&&n?hh(i.frameElement):[]):t.concat(a,hh(a,[],n))}const mh=Math.min,fh=Math.max,gh=Math.round,yh=Math.floor,vh=e=>({x:e,y:e}),wh={left:"right",right:"left",bottom:"top",top:"bottom"},bh={start:"end",end:"start"};function xh(e,t,n){return fh(e,mh(t,n))}function kh(e,t){return"function"==typeof e?e(t):e}function Eh(e){return e.split("-")[0]}function Dh(e){return e.split("-")[1]}function Sh(e){return"y"===e?"height":"width"}function Ch(e){return["top","bottom"].includes(Eh(e))?"y":"x"}function Th(e){return"x"===Ch(e)?"y":"x"}function Mh(e){return e.replace(/start|end/g,(e=>bh[e]))}function Ph(e){return e.replace(/left|right|bottom|top/g,(e=>wh[e]))}function Nh(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Oh(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Lh(e,t,n){let{reference:r,floating:a}=e;const o=Ch(t),i=Th(t),s=Sh(i),l=Eh(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-a.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-a.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Dh(t)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1)}return h}function Rh(e){const t=ch(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=th(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=gh(n)!==o||gh(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function Ah(e){return eh(e)?e:e.contextElement}function _h(e){const t=Ah(e);if(!th(t))return vh(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=Rh(t);let i=(o?gh(n.width):n.width)/r,s=(o?gh(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Fh=vh(0);function Ih(e){const t=Gp(e);return sh()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fh}function Yh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Ah(e);let i=vh(1);t&&(r?eh(r)&&(i=_h(r)):i=_h(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Gp(e))&&t}(o,n,r)?Ih(o):vh(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=Gp(o),t=r&&eh(r)?Gp(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){const e=_h(a),t=a.getBoundingClientRect(),r=ch(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=Gp(a),a=n.frameElement}}return Oh({width:u,height:d,x:l,y:c})}function Vh(e){return Yh(Zp(e)).left+uh(e).scrollLeft}function Bh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Gp(e),r=Zp(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=sh();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Zp(e),n=uh(e),r=e.ownerDocument.body,a=fh(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=fh(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Vh(e);const s=-n.scrollTop;return"rtl"===ch(r).direction&&(i+=fh(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(Zp(e));else if(eh(t))r=function(e,t){const n=Yh(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=th(e)?_h(e):vh(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=Ih(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Oh(r)}function Wh(e,t){const n=dh(e);return!(n===t||!eh(n)||lh(n))&&("fixed"===ch(n).position||Wh(n,t))}function jh(e,t,n){const r=th(t),a=Zp(t),o="fixed"===n,i=Yh(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=vh(0);if(r||!r&&!o)if(("body"!==Xp(t)||rh(a))&&(s=uh(t)),r){const e=Yh(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=Vh(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function Hh(e){return"static"===ch(e).position}function $h(e,t){return th(e)&&"fixed"!==ch(e).position?t?t(e):e.offsetParent:null}function qh(e,t){const n=Gp(e);if(oh(e))return n;if(!th(e)){let t=dh(e);for(;t&&!lh(t);){if(eh(t)&&!Hh(t))return t;t=dh(t)}return n}let r=$h(e,t);for(;r&&ah(r)&&Hh(r);)r=$h(r,t);return r&&lh(r)&&Hh(r)&&!ih(r)?n:r||function(e){let t=dh(e);for(;th(t)&&!lh(t);){if(oh(t))return null;if(ih(t))return t;t=dh(t)}return null}(e)||n}const Uh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=Zp(r),s=!!t&&oh(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=vh(1);const u=vh(0),d=th(r);if((d||!d&&!o)&&(("body"!==Xp(r)||rh(i))&&(l=uh(r)),th(r))){const e=Yh(r);c=_h(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Zp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o="clippingAncestors"===n?oh(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=hh(e,[],!1).filter((e=>eh(e)&&"body"!==Xp(e))),a=null;const o="fixed"===ch(e).position;let i=o?dh(e):e;for(;eh(i)&&!lh(i);){const t=ch(i),n=ih(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||rh(i)&&!n&&Wh(e,i))?r=r.filter((e=>e!==i)):a=t,i=dh(i)}return t.set(e,r),r}(t,this._c):[].concat(n),i=[...o,r],s=i[0],l=i.reduce(((e,n)=>{const r=Bh(t,n,a);return e.top=fh(r.top,e.top),e.right=mh(r.right,e.right),e.bottom=mh(r.bottom,e.bottom),e.left=fh(r.left,e.left),e}),Bh(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:qh,getElementRects:async function(e){const t=this.getOffsetParent||qh,n=this.getDimensions,r=await n(e.floating);return{reference:jh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Rh(e);return{width:t,height:n}},getScale:_h,isElement:eh,isRTL:function(e){return"rtl"===ch(e).direction}};function Kh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ah(e),u=a||o?[...c?hh(c):[],...hh(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=Zp(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-yh(u)+"px "+-yh(a.clientWidth-(c+d))+"px "+-yh(a.clientHeight-(u+p))+"px "+-yh(c)+"px",threshold:fh(0,mh(1,l))||1};let m=!0;function f(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(f,{...h,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(f,h)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,m=null;i&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let f=l?Yh(e):null;return l&&function t(){const r=Yh(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n();f=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const zh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Eh(n),s=Dh(n),l="y"===Ch(n),c=["left","top"].includes(i)?-1:1,u=o&&l?-1:1,d=kh(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(h="end"===s?-1*m:m),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},Qh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...g}=kh(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Eh(a),v=Ch(s),w=Eh(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!f?[Ph(s)]:function(e){const t=Ph(e);return[Mh(e),t,Mh(t)]}(s)),k="none"!==m;!p&&k&&x.push(...function(e,t,n,r){const a=Dh(e);let o=function(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:i;default:return[]}}(Eh(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(Mh)))),o}(s,f,m,b));const E=[s,...x],D=await async function(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=kh(t,e),m=Nh(h),f=s[p?"floating"===d?"reference":"floating":d],g=Oh(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(f)))||n?f:f.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),w=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},b=Oh(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}(t,g),S=[];let C=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(D[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Dh(e),a=Th(e),o=Sh(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ph(i)),[i,Ph(i)]}(a,i,b);S.push(D[e[0]],D[e[1]])}if(C=[...C,{placement:a,overflows:S}],!S.every((e=>e<=0))){var T,M;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(M=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Ch(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},Xh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=kh(e,t)||{};if(null==c)return{};const d=Nh(u),p={x:n,y:r},h=Th(a),m=Sh(h),f=await i.getDimensions(c),g="y"===h,y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=o.reference[m]+o.reference[h]-p[h]-o.floating[m],x=p[h]-o.reference[h],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=k?k[w]:0;E&&await(null==i.isElement?void 0:i.isElement(k))||(E=s.floating[w]||o.floating[m]);const D=b/2-x/2,S=E/2-f[m]/2-1,C=mh(d[y],S),T=mh(d[v],S),M=C,P=E-f[m]-T,N=E/2-f[m]/2+D,O=xh(M,N,P),L=!l.arrow&&null!=Dh(a)&&N!==O&&o.reference[m]/2-(N<M?C:T)-f[m]/2<0,R=L?N<M?N-M:N-P:0;return{[h]:p[h]+R,data:{[h]:O,centerOffset:N-O-R,...L&&{alignmentOffset:R}},reset:L}}}),Gh=(e,t,n)=>{const r=new Map,a={platform:Uh,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Lh(c,r,l),p=r,h={},m=0;for(let n=0;n<s.length;n++){const{name:o,fn:f}=s[n],{x:g,y:y,data:v,reset:w}=await f({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[o]:{...h[o],...v}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:u,y:d}=Lh(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var Zh="undefined"!=typeof document?s:r;function Jh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Jh(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!Jh(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function em(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tm(e,t){const n=em(e);return Math.round(t*n)/n}function nm(t){const n=e.useRef(t);return Zh((()=>{n.current=t})),n}const rm=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?Xh({element:n.current,padding:r}).fn(t):{}:n?Xh({element:n,padding:r}).fn(t):{};var a}}),am=(e,t)=>({...zh(e),options:[e,t]}),om=(e,t)=>({...rm(e),options:[e,t]}),im={...e},sm=im.useInsertionEffect||(e=>e());var lm="undefined"!=typeof document?s:r;function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cm.apply(this,arguments)}let um=!1,dm=0;const pm=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dm++;const hm=im.useId||function(){const[t,n]=e.useState((()=>um?pm():void 0));return lm((()=>{null==t&&n(pm())}),[]),e.useEffect((()=>{um=!0}),[]),t},mm=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:a},middlewareData:{arrow:o}},width:i=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:h,...m}={},...f}=t,g=hm(),[y,v]=e.useState(!1);if(lm((()=>{if(!a)return;"rtl"===ch(a).direction&&v(!0)}),[a]),!a)return null;const w=2*c,b=w/2,x=i/2*(l/-8+1),k=s/2*l/4,[E,D]=r.split("-"),S=!!p,C="top"===E||"bottom"===E,T=u&&"end"===D?"bottom":"top";let M=u&&"end"===D?"right":"left";u&&y&&(M="end"===D?"left":"right");const P=null!=(null==o?void 0:o.x)?u||o.x:"",N=null!=(null==o?void 0:o.y)?u||o.y:"",O=p||"M0,0 H"+i+" L"+(i-x)+","+(s-k)+" Q"+i/2+","+s+" "+x+","+(s-k)+" Z",L={top:S?"rotate(180deg)":"",left:S?"rotate(90deg)":"rotate(-90deg)",bottom:S?"":"rotate(180deg)",right:S?"rotate(-90deg)":"rotate(90deg)"}[E];return e.createElement("svg",cm({},f,{"aria-hidden":!0,ref:n,width:S?i:i+w,height:i,viewBox:"0 0 "+i+" "+(s>i?s:i),style:{position:"absolute",pointerEvents:"none",[M]:P,[T]:N,[E]:C||S?"100%":"calc(100% - "+w/2+"px)",transform:""+L+(null!=h?h:""),...m}}),w>0&&e.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:w+(p?0:1),d:O}),e.createElement("path",{stroke:w&&!p?f.fill:"none",d:O}),e.createElement("clipPath",{id:g},e.createElement("rect",{x:-b,y:b*(S?-1:1),width:i+w,height:i})))}));const fm=e.createContext(null),gm=e.createContext(null),ym=()=>{var t;return(null==(t=e.useContext(fm))?void 0:t.id)||null},vm=()=>e.useContext(gm);function wm(t){const{open:n=!1,onOpenChange:r,elements:a}=t,o=hm(),i=e.useRef({}),[s]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=ym(),[c,u]=e.useState(a.reference),d=function(t){const n=e.useRef((()=>{}));return sm((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}(((e,t,n)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)})),p=e.useMemo((()=>({setPositionReference:u})),[]),h=e.useMemo((()=>({reference:c||a.reference||null,floating:a.floating||null,domReference:a.reference})),[c,a.reference,a.floating]);return e.useMemo((()=>({dataRef:i,open:n,onOpenChange:d,elements:h,events:s,floatingId:o,refs:p})),[n,d,h,s,o,p])}function bm(t){void 0===t&&(t={});const{nodeId:n}=t,r=wm({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||r,o=a.elements,[i,s]=e.useState(null),[l,c]=e.useState(null),u=(null==o?void 0:o.reference)||i,d=e.useRef(null),p=vm();lm((()=>{u&&(d.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(a);Jh(h,a)||m(a);const[f,g]=e.useState(null),[y,v]=e.useState(null),w=e.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),b=e.useCallback((e=>{e!==D.current&&(D.current=e,v(e))}),[]),x=i||f,k=s||y,E=e.useRef(null),D=e.useRef(null),S=e.useRef(d),C=null!=c,T=nm(c),M=nm(o),P=e.useCallback((()=>{if(!E.current||!D.current)return;const e={placement:n,strategy:r,middleware:h};M.current&&(e.platform=M.current),Gh(E.current,D.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Jh(S.current,t)&&(S.current=t,A.flushSync((()=>{p(t)})))}))}),[h,n,r,M]);Zh((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);Zh((()=>(N.current=!0,()=>{N.current=!1})),[]),Zh((()=>{if(x&&(E.current=x),k&&(D.current=k),x&&k){if(T.current)return T.current(x,k,P);P()}}),[x,k,P,T,C]);const O=e.useMemo((()=>({reference:E,floating:D,setReference:w,setFloating:b})),[w,b]),L=e.useMemo((()=>({reference:x,floating:k})),[x,k]),R=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=tm(L.floating,d.x),n=tm(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...em(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,L.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:P,refs:O,elements:L,floatingStyles:R})),[d,P,O,L,R])}({...t,elements:{...o,...l&&{reference:l}}}),m=e.useCallback((e=>{const t=eh(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),h.refs.setReference(t)}),[h.refs]),f=e.useCallback((e=>{(eh(e)||null===e)&&(d.current=e,s(e)),(eh(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!eh(e))&&h.refs.setReference(e)}),[h.refs]),g=e.useMemo((()=>({...h.refs,setReference:f,setPositionReference:m,domReference:d})),[h.refs,f,m]),y=e.useMemo((()=>({...h.elements,domReference:u})),[h.elements,u]),v=e.useMemo((()=>({...h,...a,refs:g,elements:y,nodeId:n})),[h,g,y,n,a]);return lm((()=>{a.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=v)})),e.useMemo((()=>({...h,context:v,refs:g,elements:y})),[h,g,y,v])}
|
|
1
|
+
import*as e from"react";import t,{createContext as n,useEffect as r,useRef as a,useContext as o,useState as i,useLayoutEffect as s,useId as l,useCallback as c,useMemo as u,Fragment as d,createElement as p,useInsertionEffect as h,forwardRef as m,Component as f,cloneElement as g,createRef as y}from"react";import v from"react-bootstrap/Dropdown";import{jsxs as w,jsx as b}from"react/jsx-runtime";import x from"js-cookie";import k from"axios";import{Dropdown as E,Modal as D,ToastContainer as S,ProgressBar as C,Toast as T,Offcanvas as M,Row as P,Col as N,DropdownItem as O,Collapse as L,Nav as R}from"react-bootstrap";import*as A from"react-dom";import _,{findDOMNode as F}from"react-dom";import I from"react-bootstrap/Toast";import Y from"react-bootstrap/Container";function V(){}function B(){}B.resetWarningCache=V;var W,j,H=(W=function(e){e.exports=function(){function e(e,t,n,r,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:B,resetWarningCache:V};return n.PropTypes=n,n}()},W(j={exports:{}},j.exports),j.exports),$=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,q=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,U=/^(?:(min|max)-)?(.+)/,K=/(em|rem|px|cm|mm|in|pt|pc)?$/,z=/(dpi|dpcm|dppx)?$/;function Q(e){return e.split(",").map((function(e){var t=(e=e.trim()).match($),n=t[1],r=t[2],a=t[3]||"",o={};return o.inverse=!!n&&"not"===n.toLowerCase(),o.type=r?r.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map((function(e){var t=e.match(q),n=t[1].toLowerCase().match(U);return{modifier:n[1],feature:n[2],value:t[2]}})),o}))}function X(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function G(e){var t=parseFloat(e);switch(String(e).match(z)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function Z(e){var t=parseFloat(e);switch(String(e).match(K)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}var J={match:function(e,t){return Q(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var a=e.expressions.every((function(e){var n=e.feature,r=e.modifier,a=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===a.toLowerCase();case"width":case"height":case"device-width":case"device-height":a=Z(a),o=Z(o);break;case"resolution":a=G(a),o=G(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=X(a),o=X(o);break;case"grid":case"color":case"color-index":case"monochrome":a=parseInt(a,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=a;case"max":return o<=a;default:return o===a}}));return a&&!n||!a&&n}))},parse:Q}.match,ee="undefined"!=typeof window?window.matchMedia:null;function te(e,t,n){var r,a=this;function o(e){a.matches=e.matches,a.media=e.media}ee&&!n&&(r=ee.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(o)):(this.matches=J(e,t),this.media=e),this.addListener=function(e){r&&r.addListener(e)},this.removeListener=function(e){r&&r.removeListener(e)},this.dispose=function(){r&&r.removeListener(o)}}var ne=function(e,t,n){return new te(e,t,n)},re=/[A-Z]/g,ae=/^ms-/,oe={};function ie(e){return"-"+e.toLowerCase()}function se(e){if(oe.hasOwnProperty(e))return oe[e];var t=e.replace(re,ie);return oe[e]=ae.test(t)?"-"+t:t}const le=H.oneOfType([H.string,H.number]),ce={all:H.bool,grid:H.bool,aural:H.bool,braille:H.bool,handheld:H.bool,print:H.bool,projection:H.bool,screen:H.bool,tty:H.bool,tv:H.bool,embossed:H.bool},ue={orientation:H.oneOf(["portrait","landscape"]),scan:H.oneOf(["progressive","interlace"]),aspectRatio:H.string,deviceAspectRatio:H.string,height:le,deviceHeight:le,width:le,deviceWidth:le,color:H.bool,colorIndex:H.bool,monochrome:H.bool,resolution:le,type:Object.keys(ce)},{type:de,...pe}=ue,he={minAspectRatio:H.string,maxAspectRatio:H.string,minDeviceAspectRatio:H.string,maxDeviceAspectRatio:H.string,minHeight:le,maxHeight:le,minDeviceHeight:le,maxDeviceHeight:le,minWidth:le,maxWidth:le,minDeviceWidth:le,maxDeviceWidth:le,minColor:H.number,maxColor:H.number,minColorIndex:H.number,maxColorIndex:H.number,minMonochrome:H.number,maxMonochrome:H.number,minResolution:le,maxResolution:le,...pe};var me={all:{...ce,...he},types:ce,matchers:ue,features:he};const fe=e=>{const t=[];return Object.keys(me.all).forEach((n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=se(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))})),t.join(" and ")},ge=n(void 0),ye=e=>{if(!e)return;return Object.keys(e).reduce(((t,n)=>(t[se(n)]=e[n],t)),{})},ve=()=>{const e=a(!1);return r((()=>{e.current=!0}),[]),e.current},we=e=>{const t=o(ge),n=()=>ye(e)||ye(t),[a,s]=i(n);return r((()=>{const e=n();(function(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),a=n.length;if(r.length!==a)return!1;for(let r=0;r<a;r++){const a=n[r];if(e[a]!==t[a]||!Object.prototype.hasOwnProperty.call(t,a))return!1}return!0})(a,e)||s(e)}),[e,t]),a},be=e=>{const t=()=>(e=>e.query||fe(e))(e),[n,a]=i(t);return r((()=>{const e=t();n!==e&&a(e)}),[e]),n},xe=(e,t,n)=>{const a=we(t),o=be(e);if(!o)throw new Error("Invalid or missing MediaQuery!");const s=((e,t)=>{const n=()=>ne(e,t||{},!!t),[a,o]=i(n),s=ve();return r((()=>{if(s){const e=n();return o(e),()=>{e&&e.dispose()}}}),[e,t]),a})(o,a),l=(e=>{const[t,n]=i(e.matches);return r((()=>{const t=e=>{n(e.matches)};return e.addListener(t),n(e.matches),()=>{e.removeListener(t)}}),[e]),t})(s),c=ve();return r((()=>{c&&n&&n(l)}),[l]),r((()=>()=>{s&&s.dispose()}),[]),l},ke=({animation:e="",className:n="",name:r="font-awesome",scale:a=1,style:o="solid"})=>{const i=`fa-${o}`,s=`fa-${r}`;let l,c;switch(a){case.7:l="icon-07x";break;case 1:l="icon-1x";break;case 2:l="icon-2x";break;case 3:l="icon-3x";break;case 4:l="icon-4x";break;default:l=""}switch(e){case"beat":c="fa-beat";break;case"fade":c="fa-fade";break;case"beat-fade":c="fa-beat-fade";break;case"bounce":c="fa-bounce";break;case"flip":c="fa-flip";break;case"shake":c="fa-shake";break;case"spin":c="fa-spin";break;case"spin-reverse":c="fa-spin fa-spin-reverse";break;default:c=""}return t.createElement("i",{className:`${i} ${s} ${l} ${c} ${n}`,"aria-hidden":"true"})};ke.propTypes={animation:H.oneOf(["beat","fade","beat-fade","bounce","flip","shake","spin","spin-reverse"]),className:H.string,name:H.string,scale:H.oneOf([.7,1,2,3,4]),style:H.oneOf(["light","solid","regular","thin","duotone","sharp","brands"])};const Ee=({animation:e=!1,children:n,className:r="",icon:a=!0,onClose:o=null,size:i="md",type:s="info"})=>t.createElement("div",{className:`alert ${e?"alert-animation":""} alert-${s} alert-${i} ${r}`,role:"alert"},t.createElement("div",{className:"alert-wrapper"},a&&t.createElement(ke,{style:"solid",name:{info:"circle-info",success:"check",warning:"triangle-exclamation",danger:"circle-xmark"}[s]}),t.createElement("span",null,n)),o&&t.createElement("button",{onClick:o,className:"btn-close"},t.createElement(ke,{style:"solid",name:"xmark"})));Ee.propTypes={animation:H.bool,children:H.node.isRequired,className:H.string,icon:H.bool,onClose:H.func,size:H.oneOf(["xs","md","lg"]),type:H.oneOf(["warning","danger","success","info"]).isRequired};const De=({as:e="",className:n="",onChange:o,onSave:s,value:l})=>{const[c,u]=i(!1),[d,p]=i(l),[h,m]=i(!1),[f,g]=i(!1),[y,v]=i({}),w=a(null),b=a(null),x=async e=>{try{if(""===e.trim())return o(d),void u(!1);await s(e),m(!0),u(!1),setTimeout((()=>{m(!1)}),2e3)}catch(e){throw g(!0),u(!1),setTimeout((()=>{g(!1)}),2e3),e}};r((()=>{c&&w.current&&w.current.focus()}),[c]),r((()=>{if(b.current&&!c){const e=window.getComputedStyle(b.current),t=parseFloat(e.width)+2*parseFloat(e.fontSize);v({fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,width:`${t}px`})}}),[c]);const k=()=>t.createElement("svg",{className:"success-check-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},t.createElement("circle",{cx:"8",cy:"8",r:"7.07",stroke:"currentColor",strokeWidth:"1.4",className:"success-circle"}),t.createElement("polyline",{points:"5.34 9.23 7.03 10.94 10.71 5.82",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",className:"success-check"}));return t.createElement("div",{className:`editable-content ${h?"success":""} ${n}`,onClick:()=>{h||(p(l),u(!0))}},c?t.createElement("input",{type:"text",value:l,ref:w,onBlur:()=>{u(!1),l!==d&&x(l)},onChange:({target:e})=>{o(e.value)},onKeyDown:e=>{"Enter"===e.key?(x(l),u(!1)):"Escape"===e.key&&(o(d),u(!1))},style:y}):t.createElement("div",{className:"editable-content-display",style:{fontSize:y.fontSize}},t.createElement(e,{className:f?"error":"",ref:b},l),h&&t.createElement("div",{className:"success-animation"},t.createElement(k,null))))};De.propTypes={as:H.string.isRequired,className:H.string,onChange:H.func.isRequired,onSave:H.func.isRequired,value:H.string};const Se=({logo:e="groovinads",className:n=""})=>t.createElement("div",{className:`login-source ${e||""} ${n}`,"aria-label":`${e} logo`});Se.propTypes={className:H.string,logo:H.oneOf(["groovinads","google","microsoft","linkedin","slack"])};const Ce=({children:e,className:n="",closeButton:r=!1,color:a="neutral",disabled:o=!1,onClick:i})=>t.createElement("div",{className:`pill ${a} ${n} ${o?"disabled":""}`},t.createElement("span",null,e),r&&t.createElement("button",{onClick:i},t.createElement(ke,{style:"solid",name:"xmark",scale:.7})));Ce.propTypes={className:H.string,closeButton:H.bool,color:H.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),disabled:H.bool,onClick:H.func};const Te=({className:e="",scale:n=1})=>t.createElement(ke,{name:"spinner-third",scale:n,animation:"spin",className:e});Te.propTypes={className:H.string,scale:H.oneOf([.7,1,2,3,4])};const Me=({animated:e=!1,className:n="",status:r=0})=>t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:3===r?"0 0 24 16":"0 0 16 16",className:`status-icon ${(e=>{switch(e){case 1:return"active";case 3:return"active-warning";case 4:return"warning";case 5:return"danger";default:return""}})(r)} ${n} ${e?"animated":""}`},t.createElement("circle",{cx:3===r?"12":"8",cy:"8",r:"8"}),(()=>{switch(r){case 1:return t.createElement(t.Fragment,null,t.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),t.createElement("polyline",{className:"line-front",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}));case 3:return t.createElement(t.Fragment,null,t.createElement("path",{d:"M3.5304 1.14718C4.00269 1.4241 4.13257 1.9886 3.83739 2.37202C2.69207 4.0229 2.01906 5.94004 2.01906 7.96369C2.01906 9.98735 2.69207 11.979 3.83739 13.5873C4.14438 14.0133 4.00269 14.5778 3.5304 14.8548C3.0581 15.1317 2.43231 15.0039 2.13713 14.5459C0.779285 12.682 0 10.424 0 7.96369C0 5.50336 0.779285 3.31995 2.12532 1.41345C2.43231 0.998071 3.0581 0.870262 3.5304 1.14718Z"}),t.createElement("path",{d:"M20.4682 1.14658C20.9391 0.869859 21.5631 0.997576 21.8692 1.4233C23.223 3.31777 24 5.5741 24 7.96879C24 10.3635 23.223 12.6837 21.8692 14.5462C21.5631 15.0039 20.9391 15.1316 20.4682 14.8549C19.9973 14.5781 19.8678 14.0141 20.1621 13.5883C21.3158 11.9812 21.9751 10.0655 21.9751 7.96879C21.9751 5.87211 21.3158 4.03085 20.1621 2.38118C19.856 1.98738 19.9973 1.4233 20.4682 1.15722V1.14658Z"}),t.createElement("path",{d:"M12 12C12.5523 12 13 11.5523 13 11C13 10.4477 12.5523 10 12 10C11.4477 10 11 10.4477 11 11C11 11.5523 11.4477 12 12 12Z"}),t.createElement("path",{d:"M12 3C12.5465 3 13 3.3986 13 3.9021V8.0979C13 8.59091 12.5581 9 12 9C11.4419 9 11 8.6014 11 8.0979V3.9021C11 3.40909 11.4419 3 12 3Z"}));default:return null}})());Me.propTypes={animated:H.bool,className:H.string,status:H.number.isRequired};const Pe=({children:e,className:n="",disabled:r=!1,endIcon:a,hideLabelOnMobile:o=!1,onClick:i,processing:s=!1,size:l="md",startIcon:c,style:u="default",variant:d="primary"})=>{const p=xe({query:"(max-width: 768px)"}),h=s?t.createElement(t.Fragment,null,t.createElement(Te,{scale:1}),e&&t.createElement("span",null,e,"…")):t.createElement(t.Fragment,null,c&&t.createElement(ke,{style:"solid",name:c,scale:1}),e&&!(p&&o)&&t.createElement("span",null,e),a&&t.createElement(ke,{style:"solid",name:a,scale:1}));return t.createElement("button",{className:`btn ${n}\n btn-${d}\n btn-${u}\n btn-${l}\n ${s?"btn-processing":""}\n ${r?"disabled":""}`,onClick:i},h)};function Ne(){return Ne=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},Ne.apply(null,arguments)}Pe.propTypes={children:H.node,className:H.string,disabled:H.bool,endIcon:H.string,hideLabelOnMobile:H.bool,onClick:H.func,processing:H.bool,size:H.oneOf(["xs","md","lg"]),startIcon:H.string,style:H.oneOf(["default","success","danger","warning","link"]),variant:H.oneOf(["primary","secondary","terciary","outline"])};const Oe=n({});const Le="undefined"!=typeof window,Re=Le?s:r,Ae=n(null);function _e(e,t){-1===e.indexOf(t)&&e.push(t)}function Fe(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ie=(e,t,n)=>n>t?t:n<e?e:n;let Ye=()=>{};const Ve={},Be=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function We(e){return"object"==typeof e&&null!==e}const je=e=>/^0[^.\s]+$/u.test(e);function He(e){let t;return()=>(void 0===t&&(t=e()),t)}const $e=e=>e,qe=(e,t)=>n=>t(e(n)),Ue=(...e)=>e.reduce(qe),Ke=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class ze{constructor(){this.subscriptions=[]}add(e){return _e(this.subscriptions,e),()=>Fe(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qe=e=>1e3*e,Xe=e=>e/1e3;function Ge(e,t){return t?e*(1e3/t):0}const Ze=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Je=1e-7,et=12;function tt(e,t,n,r){if(e===t&&n===r)return $e;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=Ze(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>Je&&++s<et);return i}(t,0,1,e,n);return e=>0===e||1===e?e:Ze(a(e),t,r)}const nt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rt=e=>t=>1-e(1-t),at=tt(.33,1.53,.69,.99),ot=rt(at),it=nt(ot),st=e=>(e*=2)<1?.5*ot(e):.5*(2-Math.pow(2,-10*(e-1))),lt=e=>1-Math.sin(Math.acos(e)),ct=rt(lt),ut=nt(lt),dt=tt(.42,0,1,1),pt=tt(0,0,.58,1),ht=tt(.42,0,.58,1),mt=e=>Array.isArray(e)&&"number"==typeof e[0],ft={linear:$e,easeIn:dt,easeInOut:ht,easeOut:pt,circIn:lt,circInOut:ut,circOut:ct,backIn:ot,backInOut:it,backOut:at,anticipate:st},gt=e=>{if(mt(e)){Ye(4===e.length);const[t,n,r,a]=e;return tt(t,n,r,a)}return"string"==typeof e?(Ye(void 0!==ft[e]),ft[e]):e},yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],vt={value:null,addProjectionMetrics:null};function wt(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=yt.reduce(((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,a=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){i.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,o=!1)=>{const s=o&&a?n:r;return t&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{s=e,a?o=!0:(a=!0,[n,r]=[r,n],n.forEach(c),t&&vt.value&&vt.value.frameloop[t].push(l),l=0,n.clear(),a=!1,o&&(o=!1,u.process(e)))}};return u}(o,t?n:void 0),e)),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:p,render:h,postRender:m}=i,f=()=>{const o=Ve.useManualTiming?a.timestamp:performance.now();n=!1,Ve.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(o-a.timestamp,40),1)),a.timestamp=o,a.isProcessing=!0,s.process(a),l.process(a),c.process(a),u.process(a),d.process(a),p.process(a),h.process(a),m.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(f))};return{schedule:yt.reduce(((t,o)=>{const s=i[o];return t[o]=(t,o=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(f)),s.schedule(t,o,i)),t}),{}),cancel:e=>{for(let t=0;t<yt.length;t++)i[yt[t]].cancel(e)},state:a,steps:i}}const{schedule:bt,cancel:xt,state:kt,steps:Et}=wt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:$e,!0);let Dt;function St(){Dt=void 0}const Ct={now:()=>(void 0===Dt&&Ct.set(kt.isProcessing||Ve.useManualTiming?kt.timestamp:performance.now()),Dt),set:e=>{Dt=e,queueMicrotask(St)}},Tt=e=>t=>"string"==typeof t&&t.startsWith(e),Mt=Tt("--"),Pt=Tt("var(--"),Nt=e=>!!Pt(e)&&Ot.test(e.split("/*")[0].trim()),Ot=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Rt={...Lt,transform:e=>Ie(0,1,e)},At={...Lt,default:1},_t=e=>Math.round(1e5*e)/1e5,Ft=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const It=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yt=(e,t)=>n=>Boolean("string"==typeof n&&It.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Vt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(Ft);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Bt={...Lt,transform:e=>Math.round((e=>Ie(0,255,e))(e))},Wt={test:Yt("rgb","red"),parse:Vt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bt.transform(e)+", "+Bt.transform(t)+", "+Bt.transform(n)+", "+_t(Rt.transform(r))+")"};const jt={test:Yt("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Wt.transform},Ht=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Ht("deg"),qt=Ht("%"),Ut=Ht("px"),Kt=Ht("vh"),zt=Ht("vw"),Qt=(()=>({...qt,parse:e=>qt.parse(e)/100,transform:e=>qt.transform(100*e)}))(),Xt={test:Yt("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qt.transform(_t(t))+", "+qt.transform(_t(n))+", "+_t(Rt.transform(r))+")"},Gt={test:e=>Wt.test(e)||jt.test(e)||Xt.test(e),parse:e=>Wt.test(e)?Wt.parse(e):Xt.test(e)?Xt.parse(e):jt.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Wt.transform(e):Xt.transform(e),getAnimatableNone:e=>{const t=Gt.parse(e);return t.alpha=0,Gt.transform(t)}},Zt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Jt="number",en="color",tn="var",nn="var(",rn="${}",an=/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 on(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const i=t.replace(an,(e=>(Gt.test(e)?(r.color.push(o),a.push(en),n.push(Gt.parse(e))):e.startsWith(nn)?(r.var.push(o),a.push(tn),n.push(e)):(r.number.push(o),a.push(Jt),n.push(parseFloat(e))),++o,rn))).split(rn);return{values:n,split:i,indexes:r,types:a}}function sn(e){return on(e).values}function ln(e){const{split:t,types:n}=on(e),r=t.length;return e=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],void 0!==e[o]){const t=n[o];a+=t===Jt?_t(e[o]):t===en?Gt.transform(e[o]):e[o]}return a}}const cn=e=>"number"==typeof e?0:Gt.test(e)?Gt.getAnimatableNone(e):e;const un={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(Ft)?.length||0)+(e.match(Zt)?.length||0)>0},parse:sn,createTransformer:ln,getAnimatableNone:function(e){const t=sn(e);return ln(e)(t.map(cn))}};function dn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pn(e,t){return n=>n>0?t:e}const hn=(e,t,n)=>e+(t-e)*n,mn=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},fn=[jt,Wt,Xt];function gn(e){const t=(n=e,fn.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Xt&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;a=dn(s,r,e+1/3),o=dn(s,r,e),i=dn(s,r,e-1/3)}else a=o=i=n;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}const yn=(e,t)=>{const n=gn(e),r=gn(t);if(!n||!r)return pn(e,t);const a={...n};return e=>(a.red=mn(n.red,r.red,e),a.green=mn(n.green,r.green,e),a.blue=mn(n.blue,r.blue,e),a.alpha=hn(n.alpha,r.alpha,e),Wt.transform(a))},vn=new Set(["none","hidden"]);function wn(e,t){return n=>hn(e,t,n)}function bn(e){return"number"==typeof e?wn:"string"==typeof e?Nt(e)?pn:Gt.test(e)?yn:En:Array.isArray(e)?xn:"object"==typeof e?Gt.test(e)?yn:kn:pn}function xn(e,t){const n=[...e],r=n.length,a=e.map(((e,n)=>bn(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function kn(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=bn(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const En=(e,t)=>{const n=un.createTransformer(t),r=on(e),a=on(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?vn.has(e)&&!a.values.length||vn.has(t)&&!r.values.length?function(e,t){return vn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Ue(xn(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],i=e.indexes[o][r[o]],s=e.values[i]??0;n[a]=s,r[o]++}return n}(r,a),a.values),n):pn(e,t)};function Dn(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return hn(e,t,n);return bn(e)(e,t)}const Sn=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>bt.update(t,e),stop:()=>xt(t),now:()=>kt.isProcessing?kt.timestamp:Ct.now()}},Cn=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let t=0;t<a;t++)r+=Math.round(1e4*e(t/(a-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tn=2e4;function Mn(e){let t=0;let n=e.next(t);for(;!n.done&&t<Tn;)t+=50,n=e.next(t);return t>=Tn?1/0:t}const Pn=5;function Nn(e,t,n){const r=Math.max(t-Pn,0);return Ge(n-e(r),t-r)}const On={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},Ln=.001;function Rn({duration:e=On.duration,bounce:t=On.bounce,velocity:n=On.velocity,mass:r=On.mass}){let a,o,i=1-t;i=Ie(On.minDamping,On.maxDamping,i),e=Ie(On.minDuration,On.maxDuration,Xe(e)),i<1?(a=t=>{const r=t*i,a=r*e,o=r-n,s=_n(t,i),l=Math.exp(-a);return Ln-o/s*l},o=t=>{const r=t*i*e,o=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=_n(Math.pow(t,2),i);return(-a(t)+Ln>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-Ln,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<An;n++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=Qe(e),isNaN(s))return{stiffness:On.stiffness,damping:On.damping,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}const An=12;function _n(e,t){return e*Math.sqrt(1-t*t)}const Fn=["duration","bounce"],In=["stiffness","damping","mass"];function Yn(e,t){return t.some((t=>void 0!==e[t]))}function Vn(e=On.visualDuration,t=On.bounce){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:h}=function(e){let t={velocity:On.velocity,stiffness:On.stiffness,damping:On.damping,mass:On.mass,isResolvedFromDuration:!1,...e};if(!Yn(e,In)&&Yn(e,Fn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*Ie(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:On.mass,stiffness:a,damping:o}}else{const n=Rn(e);t={...t,...n,mass:On.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Xe(n.velocity||0)}),m=p||0,f=c/(2*Math.sqrt(l*u)),g=i-o,y=Xe(Math.sqrt(l/u)),v=Math.abs(g)<5;let w;if(r||(r=v?On.restSpeed.granular:On.restSpeed.default),a||(a=v?On.restDelta.granular:On.restDelta.default),f<1){const e=_n(y,f);w=t=>{const n=Math.exp(-f*y*t);return i-n*((m+f*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)w=e=>i-Math.exp(-y*e)*(g+(m+y*g)*e);else{const e=y*Math.sqrt(f*f-1);w=t=>{const n=Math.exp(-f*y*t),r=Math.min(e*t,300);return i-n*((m+f*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const b={calculatedDuration:h&&d||null,next:e=>{const t=w(e);if(h)s.done=e>=d;else{let n=0===e?m:0;f<1&&(n=0===e?Qe(m):Nn(w,e,t));const o=Math.abs(n)<=r,l=Math.abs(i-t)<=a;s.done=o&&l}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(Mn(b),Tn),t=Cn((t=>b.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return b}function Bn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const f=d+m,g=void 0===i?f:i(f);g!==f&&(m=g-d);const y=e=>-m*Math.exp(-e/r),v=e=>g+y(e),w=e=>{const t=y(e),n=v(e);p.done=Math.abs(t)<=c,p.value=p.done?g:n};let b,x;const k=e=>{var t;(t=p.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(b=e,x=Vn({keyframes:[p.value,h(p.value)],velocity:Nn(v,e,p.value),damping:a,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==b||(t=!0,w(e),k(e)),void 0!==b&&e>=b?x.next(e-b):(!t&&w(e),p)}}}function Wn(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(Ye(o===t.length),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],a=n||Ve.mix||Dn,o=e.length-1;for(let n=0;n<o;n++){let o=a(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||$e:t;o=Ue(e,o)}r.push(o)}return r}(t,r,a),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=Ke(e[r],e[r+1],n);return s[r](a)};return n?t=>c(Ie(e[0],e[o-1],t)):c}function jn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Ke(0,t,r);e.push(hn(n,1,a))}}(t,e.length-1),t}function Hn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gt):gt(r),o={done:!1,value:t[0]},i=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:jn(t),e),s=Wn(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map((()=>c||ht)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}Vn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(Mn(r),Tn);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:Xe(a)}}(e,100,Vn);return e.ease=t.ease,e.duration=Qe(t.duration),e.type="keyframes",e};const $n=e=>null!==e;function qn(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter($n),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const Un={decay:Bn,inertia:Bn,tween:Hn,keyframes:Hn,spring:Vn};function Kn(e){"string"==typeof e.type&&(e.type=Un[e.type])}class zn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise((e=>{this.resolve=e}))}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Qn=e=>e/100;class Xn extends zn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Ct.now()&&this.tick(Ct.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Kn(e);const{type:t=Hn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||Hn;s!==Hn&&"number"!=typeof i[0]&&(this.mixKeyframes=Ue(Qn,Dn(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Mn(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,w=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,p&&(n-=p/i)):"mirror"===d&&(w=o)),v=Ie(0,1,n)*i}const b=y?{done:!1,value:c[0]}:w.next(v);a&&(b.value=a(b.value));let{done:x}=b;y||null===s||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return k&&h!==Bn&&(b.value=qn(c,this.options,f,this.speed)),m&&m(b.value),k&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Xe(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xe(e)}get time(){return Xe(this.currentTime)}set time(e){e=Qe(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Ct.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Xe(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Sn,startTime:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ct.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Gn=e=>180*e/Math.PI,Zn=e=>{const t=Gn(Math.atan2(e[1],e[0]));return er(t)},Jn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zn,rotateZ:Zn,skewX:e=>Gn(Math.atan(e[1])),skewY:e=>Gn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},er=e=>((e%=360)<0&&(e+=360),e),tr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tr,scaleY:nr,scale:e=>(tr(e)+nr(e))/2,rotateX:e=>er(Gn(Math.atan2(e[6],e[5]))),rotateY:e=>er(Gn(Math.atan2(-e[2],e[0]))),rotateZ:Zn,rotate:Zn,skewX:e=>Gn(Math.atan(e[4])),skewY:e=>Gn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ar(e){return e.includes("scale")?1:0}function or(e,t){if(!e||"none"===e)return ar(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=rr,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Jn,a=t}if(!a)return ar(t);const o=r[t],i=a[1].split(",").map(ir);return"function"==typeof o?o(i):i[o]}function ir(e){return parseFloat(e.trim())}const sr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lr=(()=>new Set(sr))(),cr=e=>e===Lt||e===Ut,ur=new Set(["x","y","z"]),dr=sr.filter((e=>!ur.has(e)));const pr={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})=>or(t,"x"),y:(e,{transform:t})=>or(t,"y")};pr.translateX=pr.x,pr.translateY=pr.y;const hr=new Set;let mr=!1,fr=!1,gr=!1;function yr(){if(fr){const e=Array.from(hr).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return dr.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{e.getValue(t)?.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}fr=!1,mr=!1,hr.forEach((e=>e.complete(gr))),hr.clear()}function vr(){hr.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(fr=!0)}))}class wr{constructor(e,t,n,r,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(hr.add(this),mr||(mr=!0,bt.read(vr),bt.resolveKeyframes(yr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hr.delete(this)}cancel(){"scheduled"===this.state&&(hr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const br=He((()=>void 0!==window.ScrollTimeline)),xr={};function kr(e,t){const n=He(e);return()=>xr[t]??n()}const Er=kr((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Sr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function Cr(e,t){return e?"function"==typeof e?Er()?Cn(e,t):"ease-out":mt(e)?Dr(e):Array.isArray(e)?e.map((e=>Cr(e,t)||Sr.easeOut)):Sr[e]:void 0}function Tr(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Cr(s,a);Array.isArray(d)&&(u.easing=d);const p={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};c&&(p.pseudoElement=c);return e.animate(u,p)}function Mr(e){return"function"==typeof e&&"applyToOptions"in e}class Pr extends zn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=e,Ye("string"!=typeof e.type);const l=function({type:e,...t}){return Mr(e)&&Er()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Tr(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=qn(r,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Xe(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xe(e)}get time(){return Xe(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Qe(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&br()?(this.animation.timeline=e,$e):t(this)}}const Nr={anticipate:st,backInOut:it,circInOut:ut};function Or(e){"string"==typeof e.ease&&e.ease in Nr&&(e.ease=Nr[e.ease])}class Lr extends Pr{constructor(e){Or(e),Kn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new Xn({...o,autoplay:!1}),s=Qe(this.finishedTime??this.time);t.setWithVelocity(i.sample(s-10).value,i.sample(s).value,10),i.stop()}}const Rr=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!un.test(e)&&"0"!==e||e.startsWith("url(")));function Ar(e){e.duration=0,e.type="keyframes"}const _r=new Set(["opacity","clipPath","filter","transform"]),Fr=He((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class Ir extends zn{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ct.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:c,...u},p=c?.KeyframeResolver||wr;this.keyframeResolver=new p(i,((e,t,n)=>this.onKeyframesResolved(e,t,d,!n)),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Ct.now(),function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],i=Rr(a,t),s=Rr(o,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Mr(n))&&r)}(e,a,o,i)||(!Ve.instantAnimations&&s||c?.(qn(e,n,t)),e[0]=e[e.length-1],Ar(n),n.repeat=0);const u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:i}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Fr()&&n&&_r.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}(u)?new Lr({...u,element:u.motionValue.owner.current}):new Xn(u);d.finished.then((()=>this.notifyFinished())).catch($e),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then((()=>{}))}get animation(){return this._animation||(this.keyframeResolver?.resume(),gr=!0,vr(),yr(),gr=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Yr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vr(e,t,n=1){const[r,a]=function(e){const t=Yr.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Be(e)?parseFloat(e):e}return Nt(a)?Vr(a,t,n+1):a}function Br(e,t){return e?.[t]??e?.default??e}const Wr=new Set(["width","height","top","left","right","bottom",...sr]),jr=e=>t=>t.test(e),Hr=[Lt,Ut,qt,$t,zt,Kt,{test:e=>"auto"===e,parse:e=>e}],$r=e=>Hr.find(jr(e));const qr=new Set(["brightness","contrast","saturate","opacity"]);function Ur(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ft)||[];if(!r)return e;const a=n.replace(r,"");let o=qr.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const Kr=/\b([a-z-]*)\(.*?\)/gu,zr={...un,getAnimatableNone:e=>{const t=e.match(Kr);return t?t.map(Ur).join(" "):e}},Qr={...Lt,transform:Math.round},Xr={borderWidth:Ut,borderTopWidth:Ut,borderRightWidth:Ut,borderBottomWidth:Ut,borderLeftWidth:Ut,borderRadius:Ut,radius:Ut,borderTopLeftRadius:Ut,borderTopRightRadius:Ut,borderBottomRightRadius:Ut,borderBottomLeftRadius:Ut,width:Ut,maxWidth:Ut,height:Ut,maxHeight:Ut,top:Ut,right:Ut,bottom:Ut,left:Ut,padding:Ut,paddingTop:Ut,paddingRight:Ut,paddingBottom:Ut,paddingLeft:Ut,margin:Ut,marginTop:Ut,marginRight:Ut,marginBottom:Ut,marginLeft:Ut,backgroundPositionX:Ut,backgroundPositionY:Ut,...{rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:$t,skewX:$t,skewY:$t,distance:Ut,translateX:Ut,translateY:Ut,translateZ:Ut,x:Ut,y:Ut,z:Ut,perspective:Ut,transformPerspective:Ut,opacity:Rt,originX:Qt,originY:Qt,originZ:Ut},zIndex:Qr,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Qr},Gr={...Xr,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:zr,WebkitFilter:zr},Zr=e=>Gr[e];function Jr(e,t){let n=Zr(e);return n!==zr&&(n=un),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ea=new Set(["auto","none","0"]);class ta extends wr{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Nt(r))){const a=Vr(r,t.current);void 0!==a&&(e[n]=a),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Wr.has(n)||2!==e.length)return;const[r,a]=e,o=$r(r),i=$r(a);if(o!==i)if(cr(o)&&cr(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else pr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||je(r)))&&n.push(t);var r;n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!ea.has(t)&&on(t).values.length&&(r=e[a]),a++}if(r&&n)for(const a of t)e[a]=Jr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=pr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}const na=(e,t)=>t&&"number"==typeof e?t.transform(e):e;class ra{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Ct.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ct.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ze);const n=this.events[e].add(t);return"change"===e?()=>{n(),bt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ct.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ge(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function aa(e,t){return new ra(e,t)}const{schedule:oa,cancel:ia}=wt(queueMicrotask,!1),sa={x:!1,y:!1};function la(){return sa.x||sa.y}function ca(e,t){const n=function(e,t,n){if(e instanceof EventTarget)return[e];if("string"==typeof e){const t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ua(e){return!("touch"===e.pointerType||la())}const da=(e,t)=>!!t&&(e===t||da(e,t.parentElement)),pa=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,ha=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ma=new WeakSet;function fa(e){return t=>{"Enter"===t.key&&e(t)}}function ga(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ya(e){return pa(e)&&!la()}function va(e,t,n={}){const[r,a,o]=ca(e,n),i=e=>{const r=e.currentTarget;if(!ya(e))return;ma.add(r);const o=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),ma.has(r)&&ma.delete(r),ya(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||da(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",l,a)};return r.forEach((e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),We(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=fa((()=>{if(ma.has(n))return;ga(n,"down");const e=fa((()=>{ga(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>ga(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,a))),function(e){return ha.has(e.tagName)||-1!==e.tabIndex}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}function wa(e){return We(e)&&"ownerSVGElement"in e}const ba=e=>Boolean(e&&e.getVelocity),xa=[...Hr,Gt,un],ka=n({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});const Ea=n({strict:!1}),Da={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"]},Sa={};for(const e in Da)Sa[e]={isEnabled:t=>Da[e].some((e=>!!t[e]))};const Ca=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 Ta(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ca.has(e)}let Ma=e=>!Ta(e);try{"function"==typeof(Pa=require("@emotion/is-prop-valid").default)&&(Ma=e=>e.startsWith("on")?!Ta(e):Pa(e))}catch{}var Pa;const Na=n({});function Oa(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function La(e){return"string"==typeof e||Array.isArray(e)}const Ra=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Aa=["initial",...Ra];function _a(e){return Oa(e.animate)||Aa.some((t=>La(e[t])))}function Fa(e){return Boolean(_a(e)||e.variants)}function Ia(e){const{initial:t,animate:n}=function(e,t){if(_a(e)){const{initial:t,animate:n}=e;return{initial:!1===t||La(t)?t:void 0,animate:La(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,o(Na));return u((()=>({initial:t,animate:n})),[Ya(t),Ya(n)])}function Ya(e){return Array.isArray(e)?e.join(" "):e}const Va={};function Ba(e,{layout:t,layoutId:n}){return lr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Va[e]||"opacity"===e)}const Wa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ja=sr.length;function Ha(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let i=!1,s=!1;for(const e in t){const n=t[e];if(lr.has(e))i=!0;else if(Mt(e))a[e]=n;else{const t=na(n,Xr[e]);e.startsWith("origin")?(s=!0,o[e]=t):r[e]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let o=0;o<ja;o++){const i=sr[o],s=e[i];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(i.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=na(s,Xr[i]);l||(a=!1,r+=`${Wa[i]||i}(${e}) `),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}const $a=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qa(e,t,n){for(const r in t)ba(t[r])||Ba(r,n)||(e[r]=t[r])}function Ua(e,t){const n={};return qa(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return u((()=>{const n=$a();return Ha(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function Ka(e,t){const n={},r=Ua(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const za={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qa={offset:"strokeDashoffset",array:"strokeDasharray"};function Xa(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,u){if(Ha(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?za:Qa;e[o.offset]=Ut.transform(-r);const i=Ut.transform(t),s=Ut.transform(n);e[o.array]=`${i} ${s}`}(d,a,o,i,!1)}const Ga=()=>({...$a(),attrs:{}}),Za=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ja(e,t,n,r){const a=u((()=>{const n=Ga();return Xa(n,t,Za(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};qa(t,e.style,e),a.style={...t,...a.style}}return a}const eo=["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 to(e){return"string"==typeof e&&!e.includes("-")&&!!(eo.indexOf(e)>-1||/[A-Z]/u.test(e))}function no(e,t,n,{latestValues:r},a,o=!1){const i=(to(e)?Ja:Ka)(t,r,a,e),s=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(Ma(a)||!0===n&&Ta(a)||!t&&!Ta(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,o),l=e!==d?{...s,...i,ref:n}:{},{children:c}=t,h=u((()=>ba(c)?c.get():c),[c]);return p(e,{...l,children:h})}function ro(e){const t=[{},{}];return e?.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function ao(e,t,n,r){if("function"==typeof t){const[a,o]=ro(r);t=t(void 0!==n?n:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,o]=ro(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function oo(e){return ba(e)?e.get():e}function io(e,t,n,r){const a={},o=r(e,{});for(const e in o)a[e]=oo(o[e]);let{initial:i,animate:s}=e;const l=_a(e),c=Fa(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?s:i;if(d&&"boolean"!=typeof d&&!Oa(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ao(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(a[e]=t)}for(const t in e)a[t]=e[t]}}}return a}const so=e=>(t,n)=>{const r=o(Na),i=o(Ae),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:io(n,r,a,e),renderState:t()}}(e,t,r,i);return n?s():function(e){const t=a(null);return null===t.current&&(t.current=e()),t.current}(s)};function lo(e,t,n){const{style:r}=e,a={};for(const o in r)(ba(r[o])||t.style&&ba(t.style[o])||Ba(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}const co=so({scrapeMotionValuesFromProps:lo,createRenderState:$a});function uo(e,t,n){const r=lo(e,t,n);for(const n in e)if(ba(e[n])||ba(t[n])){r[-1!==sr.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}const po=so({scrapeMotionValuesFromProps:uo,createRenderState:Ga}),ho=Symbol.for("motionComponentSymbol");function mo(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function fo(e,t,n){return c((r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):mo(n)&&(n.current=r))}),[t])}const go=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yo="data-"+go("framerAppearId"),vo=n({});function wo(e,t,n,i,s){const{visualElement:l}=o(Na),c=o(Ea),u=o(Ae),d=o(ka).reducedMotion,p=a(null);i=i||c.renderer,!p.current&&i&&(p.current=i(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const m=p.current,f=o(vo);!m||m.projection||!s||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bo(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&mo(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(p.current,n,s,f);const g=a(!1);h((()=>{m&&g.current&&m.update(n,u)}));const y=n[yo],v=a(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Re((()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())})),r((()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(y)})),v.current=!1),m.enteringChildren=void 0)})),m}function bo(e){if(e)return!1!==e.options.allowProjection?e.projection:bo(e.parent)}function xo(e,{forwardMotionProps:t=!1}={},n,r){n&&function(e){for(const t in e)Sa[t]={...Sa[t],...e[t]}}(n);const a=to(e)?po:co;function i(n,i){let s;const l={...o(ka),...n,layoutId:ko(n)},{isStatic:c}=l,u=Ia(n),d=a(n,c);if(!c&&Le){o(Ea).strict;const t=function(e){const{drag:t,layout:n}=Sa;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=wo(e,d,l,r,t.ProjectionNode)}return w(Na.Provider,{value:u,children:[s&&u.visualElement?b(s,{visualElement:u.visualElement,...l}):null,no(e,n,fo(d,u.visualElement,i),d,c,t)]})}i.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const s=m(i);return s[ho]=e,s}function ko({layoutId:e}){const t=o(Oe).id;return t&&void 0!==e?t+"-"+e:e}function Eo(e,t){if("undefined"==typeof Proxy)return xo;const n=new Map,r=(n,r)=>xo(n,r,e,t);return new Proxy(((e,t)=>r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,xo(o,void 0,e,t)),n.get(o))})}function Do({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function So(e){return void 0===e||1===e}function Co({scale:e,scaleX:t,scaleY:n}){return!So(e)||!So(t)||!So(n)}function To(e){return Co(e)||Mo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mo(e){return Po(e.x)||Po(e.y)}function Po(e){return e&&"0%"!==e}function No(e,t,n){return n+t*(e-n)}function Oo(e,t,n,r,a){return void 0!==a&&(e=No(e,a,r)),No(e,n,r)+t}function Lo(e,t=0,n=1,r,a){e.min=Oo(e.min,t,n,r,a),e.max=Oo(e.max,t,n,r,a)}function Ro(e,{x:t,y:n}){Lo(e.x,t.translate,t.scale,t.originPoint),Lo(e.y,n.translate,n.scale,n.originPoint)}const Ao=.999999999999,_o=1.0000000000001;function Fo(e,t){e.min=e.min+t,e.max=e.max+t}function Io(e,t,n,r,a=.5){Lo(e,t,n,hn(e.min,e.max,a),r)}function Yo(e,t){Io(e.x,t.x,t.scaleX,t.scale,t.originX),Io(e.y,t.y,t.scaleY,t.scale,t.originY)}function Vo(e,t){return Do(function(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}}(e.getBoundingClientRect(),t))}const Bo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Wo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),jo={current:null},Ho={current:!1};const $o=new WeakMap;const qo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uo{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:a,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wr,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 e=Ct.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,bt.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=_a(t),this.isVariantNode=Fa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&ba(t)&&t.set(s[e])}}mount(e){this.current=e,$o.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Ho.current||function(){if(Ho.current=!0,Le)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jo.current=e.matches;e.addEventListener("change",t),t()}else jo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||jo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=lr.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&bt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}));let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),a&&a(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Sa){const t=Sa[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wo()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<qo.length;t++){const n=qo[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],o=n[r];if(ba(a))e.addValue(r,a);else if(ba(o))e.addValue(r,aa(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,aa(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=aa(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Be(n)||je(n))?n=parseFloat(n):(r=n,!xa.find(jr(r))&&un.test(t)&&(n=Jr(e,t))),this.setBaseTarget(e,ba(n)?n.get():n)),ba(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=ao(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ba(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new ze),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){oa.render(this.render)}}class Ko extends Uo{constructor(){super(...arguments),this.KeyframeResolver=ta}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ba(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function zo(e,{style:t,vars:n},r,a){const o=e.style;let i;for(i in t)o[i]=t[i];for(i in a?.applyProjectionStyles(o,r),n)o.setProperty(i,n[i])}class Qo extends Ko{constructor(){super(...arguments),this.type="html",this.renderInstance=zo}readValueFromInstance(e,t){if(lr.has(t))return this.projection?.isProjecting?ar(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return or(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(Mt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Vo(e,t)}build(e,t,n){Ha(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return lo(e,t,n)}}const Xo=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"]);class Go extends Ko{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wo}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(lr.has(t)){const e=Zr(t);return e&&e.default||0}return t=Xo.has(t)?t:go(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return uo(e,t,n)}build(e,t,n){Xa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){zo(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Xo.has(n)?n:go(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Za(e.tagName),super.mount(e)}}const Zo=(e,t)=>to(e)?new Go(t):new Qo(t,{allowProjection:e!==d});function Jo(e,t,n){const r=e.getProps();return ao(r,t,void 0!==n?n:r.custom,e)}const ei=e=>Array.isArray(e);function ti(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,aa(n))}function ni(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ba(r)&&r.add))return n.add(t);if(!n&&Ve.WillChange){const n=new Ve.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function ri(e){return e.props[yo]}const ai=e=>null!==e;const oi={type:"spring",stiffness:500,damping:25,restSpeed:10},ii={type:"keyframes",duration:.8},si={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},li=(e,{keyframes:t})=>t.length>2?ii:lr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:oi:si;const ci=(e,t,n,r={},a,o)=>i=>{const s=Br(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Qe(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:o,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||Object.assign(u,li(e,u)),u.duration&&(u.duration=Qe(u.duration)),u.repeatDelay&&(u.repeatDelay=Qe(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Ar(u),0===u.delay&&(d=!0)),(Ve.instantAnimations||Ve.skipAnimations)&&(d=!0,Ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(ai),o=t&&"loop"!==n&&t%2==1?0:a.length-1;return o&&void 0!==r?r:a[o]}(u.keyframes,s);if(void 0!==e)return void bt.update((()=>{u.onUpdate(e),u.onComplete()}))}return s.isSync?new Xn(u):new Ir(u)};function ui({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function di(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...s}=t;r&&(o=r);const l=[],c=a&&e.animationState&&e.animationState.getState()[a];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),a=s[t];if(void 0===a||c&&ui(c,t))continue;const i={delay:n,...Br(o||{},t)},u=r.get();if(void 0!==u&&!r.isAnimating&&!Array.isArray(a)&&a===u&&!i.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=ri(e);if(n){const e=window.MotionHandoffAnimation(n,t,bt);null!==e&&(i.startTime=e,d=!0)}}ni(e,t),r.start(ci(t,r,a,e.shouldReduceMotion&&Wr.has(t)?{type:!1}:i,e,d));const p=r.animation;p&&l.push(p)}return i&&Promise.all(l).then((()=>{bt.update((()=>{i&&function(e,t){const n=Jo(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const t in o)ti(e,t,(i=o[t],ei(i)?i[i.length-1]||0:i));var i}(e,i)}))})),l}function pi(e,t,n,r=0,a=1){const o=Array.from(e).sort(((e,t)=>e.sortNodePosition(t))).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(o,i):1===a?o*r:s-o*r}function hi(e,t,n={}){const r=Jo(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(di(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,a=0,o=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(hi(l,t,{...i,delay:n+("function"==typeof r?0:r)+pi(e.variantChildren,l,r,a,o)}).then((()=>l.notify("AnimationComplete",t))));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then((()=>t()))}return Promise.all([o(),i(n.delay)])}function mi(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 fi=Aa.length;function gi(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&gi(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<fi;n++){const r=Aa[n],a=e.props[r];(La(a)||!1===a)&&(t[r]=a)}return t}const yi=[...Ra].reverse(),vi=Ra.length;function wi(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map((t=>hi(e,t,n)));r=Promise.all(a)}else if("string"==typeof t)r=hi(e,t,n);else{const a="function"==typeof t?Jo(e,t,n.custom):t;r=Promise.all(di(e,a,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function bi(e){let t=wi(e),n=Ei(),r=!0;const a=t=>(n,r)=>{const a=Jo(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function o(o){const{props:i}=e,s=gi(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<vi;t++){const p=yi[t],h=n[p],m=void 0!==i[p]?i[p]:s[p],f=La(m),g=p===o?h.isActive:null;!1===g&&(d=t);let y=m===s[p]&&m!==i[p]&&f;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...u},!h.isActive&&null===g||!m&&!h.prevProp||Oa(m)||"boolean"==typeof m)continue;const v=xi(h.prevProp,m);let w=v||p===o&&h.isActive&&!y&&f||t>d&&f,b=!1;const x=Array.isArray(m)?m:[m];let k=x.reduce(a(p),{});!1===g&&(k={});const{prevResolvedValues:E={}}=h,D={...E,...k},S=t=>{w=!0,c.has(t)&&(b=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in D){const t=k[e],n=E[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ei(t)&&ei(n)?!mi(t,n):t!==n,r?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=k,h.isActive&&(u={...u,...k}),r&&e.blockInitialAnimation&&(w=!1);const C=y&&v;w&&(!C||b)&&l.push(...x.map((t=>{const n={type:p};if("string"==typeof t&&r&&!C&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=Jo(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=pi(r.enteringChildren,e,t)}}return{animation:t,options:n}})))}if(c.size){const t={};if("boolean"!=typeof i.initial){const n=Jo(e,Array.isArray(i.initial)?i.initial[0]:i.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach((n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null})),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==i.initial&&i.initial!==i.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach((e=>e.animationState?.setActive(t,r))),n[t].isActive=r;const a=o(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ei()}}}function xi(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!mi(t,e)}function ki(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ei(){return{animate:ki(!0),whileInView:ki(),whileHover:ki(),whileTap:ki(),whileDrag:ki(),whileFocus:ki(),exit:ki()}}class Di{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Si=0;const Ci={animation:{Feature:class extends Di{constructor(e){super(e),e.animationState||(e.animationState=bi(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Oa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Di{constructor(){super(...arguments),this.id=Si++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mi(e){return{point:{x:e.pageX,y:e.pageY}}}function Pi(e,t,n,r){return Ti(e,t,(e=>t=>pa(t)&&e(t,Mi(t)))(n),r)}const Ni=.9999,Oi=1.0001,Li=-.01,Ri=.01;function Ai(e){return e.max-e.min}function _i(e,t,n,r=.5){e.origin=r,e.originPoint=hn(t.min,t.max,e.origin),e.scale=Ai(n)/Ai(t),e.translate=hn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ni&&e.scale<=Oi||isNaN(e.scale))&&(e.scale=1),(e.translate>=Li&&e.translate<=Ri||isNaN(e.translate))&&(e.translate=0)}function Fi(e,t,n,r){_i(e.x,t.x,n.x,r?r.originX:void 0),_i(e.y,t.y,n.y,r?r.originY:void 0)}function Ii(e,t,n){e.min=n.min+t.min,e.max=e.min+Ai(t)}function Yi(e,t,n){e.min=t.min-n.min,e.max=e.min+Ai(t)}function Vi(e,t,n){Yi(e.x,t.x,n.x),Yi(e.y,t.y,n.y)}function Bi(e){return[e("x"),e("y")]}const Wi=({current:e})=>e?e.ownerDocument.defaultView:null,ji=(e,t)=>Math.abs(e-t);class Hi{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Ui(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ji(e.x,t.x),r=ji(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=kt;this.history.push({...r,timestamp:a});const{onStart:o,onMove:i}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=$i(t,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(this.dragSnapToOrigin&&a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ui("pointercancel"===e.type?this.lastMoveEventInfo:$i(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!pa(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const i=$i(Mi(e),this.transformPagePoint),{point:s}=i,{timestamp:l}=kt;this.history=[{...s,timestamp:l}];const{onSessionStart:c}=t;c&&c(e,Ui(i,this.history)),this.removeListeners=Ue(Pi(this.contextWindow,"pointermove",this.handlePointerMove),Pi(this.contextWindow,"pointerup",this.handlePointerUp),Pi(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),xt(this.updatePoint)}}function $i(e,t){return t?{point:t(e.point)}:e}function qi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ui({point:e},t){return{point:e,delta:qi(e,zi(t)),offset:qi(e,Ki(t)),velocity:Qi(t,.1)}}function Ki(e){return e[0]}function zi(e){return e[e.length-1]}function Qi(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=zi(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Qe(t)));)n--;if(!r)return{x:0,y:0};const o=Xe(a.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Xi(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Gi(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}}const Zi=.35;function Ji(e,t,n){return{min:es(e,t),max:es(e,n)}}function es(e,t){return"number"==typeof e?e:e[t]||0}const ts=new WeakMap;class ns{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wo(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new Hi(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Mi(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?sa[o]?null:(sa[o]=!0,()=>{sa[o]=!1}):sa.x||sa.y?null:(sa.x=sa.y=!0,()=>{sa.x=sa.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(qt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ai(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),a&&bt.postRender((()=>a(e,t))),ni(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Bi((e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:Wi(this.visualElement)})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&bt.postRender((()=>i(n,r)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!rs(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?hn(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?hn(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&mo(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:Xi(e.x,n,a),y:Xi(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Zi){return!1===e?e=0:!0===e&&(e=Zi),{x:Ji(e,"left","right"),y:Ji(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Bi((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!mo(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const a=function(e,t,n){const r=Vo(e,n),{scroll:a}=t;return a&&(Fo(r.x,a.offset.x),Fo(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Gi(e.x,t.x),y:Gi(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=Do(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Bi((i=>{if(!rs(i,t,this.currentDirection))return;let l=s&&s[i]||{};o&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,d)}));return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return ni(this.visualElement,e),n.start(ci(e,n,0,t,this.visualElement,!1))}stopAnimation(){Bi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Bi((e=>this.getAxisMotionValue(e).animation?.pause()))}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Bi((t=>{const{drag:n}=this.getProps();if(!rs(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];a.set(e[t]-hn(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!mo(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Bi((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ai(e),a=Ai(t);return a>r?n=Ke(t.min,t.max-r,e.min):r>a&&(n=Ke(e.min,e.max-a,t.min)),Ie(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Bi((t=>{if(!rs(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(hn(a,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;ts.set(this.visualElement,this);const e=Pi(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();mo(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),bt.read(t);const a=Ti(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Bi((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{a(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:o=Zi,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function rs(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const as=e=>(t,n)=>{e&&bt.postRender((()=>e(t,n)))};const os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function is(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ss={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ut.test(e))return e;e=parseFloat(e)}return`${is(e,t.target.x)}% ${is(e,t.target.y)}%`}},ls={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=un.parse(e);if(a.length>5)return r;const o=un.createTransformer(e),i="number"!=typeof a[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=s,a[1+i]/=l;const c=hn(s,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),o(a)}};let cs=!1;class us extends f{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;!function(e){for(const t in e)Va[t]=e[t],Mt(t)&&(Va[t].isCSSVariable=!0)}(ps),a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),cs&&a.root.didUpdate(),a.addEventListener("animationComplete",(()=>{this.safeToRemove()})),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,cs=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||bt.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),oa.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;cs=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ds(e){const[t,n]=function(e=!0){const t=o(Ae);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:a,register:i}=t,s=l();r((()=>{if(e)return i(s)}),[e]);const u=c((()=>e&&a&&a(s)),[s,a,e]);return!n&&a?[!1,u]:[!0]}(),a=o(Oe);return b(us,{...e,layoutGroup:a,switchLayoutGroup:o(vo),isPresent:t,safeToRemove:n})}const ps={borderRadius:{...ss,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ss,borderTopRightRadius:ss,borderBottomLeftRadius:ss,borderBottomRightRadius:ss,boxShadow:ls};const hs=(e,t)=>e.depth-t.depth;class ms{constructor(){this.children=[],this.isDirty=!1}add(e){_e(this.children,e),this.isDirty=!0}remove(e){Fe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(hs),this.isDirty=!1,this.children.forEach(e)}}const fs=["TopLeft","TopRight","BottomLeft","BottomRight"],gs=fs.length,ys=e=>"string"==typeof e?parseFloat(e):e,vs=e=>"number"==typeof e||Ut.test(e);function ws(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const bs=ks(0,.5,ct),xs=ks(.5,.95,$e);function ks(e,t,n){return r=>r<e?0:r>t?1:n(Ke(e,t,r))}function Es(e,t){e.min=t.min,e.max=t.max}function Ds(e,t){Es(e.x,t.x),Es(e.y,t.y)}function Ss(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cs(e,t,n,r,a){return e=No(e-=t,1/n,r),void 0!==a&&(e=No(e,1/a,r)),e}function Ts(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){qt.test(t)&&(t=parseFloat(t),t=hn(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=hn(o.min,o.max,r);e===o&&(s-=t),e.min=Cs(e.min,t,n,s,a),e.max=Cs(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}const Ms=["x","scaleX","originX"],Ps=["y","scaleY","originY"];function Ns(e,t,n,r){Ts(e.x,t,Ms,n?n.x:void 0,r?r.x:void 0),Ts(e.y,t,Ps,n?n.y:void 0,r?r.y:void 0)}function Os(e){return 0===e.translate&&1===e.scale}function Ls(e){return Os(e.x)&&Os(e.y)}function Rs(e,t){return e.min===t.min&&e.max===t.max}function As(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _s(e,t){return As(e.x,t.x)&&As(e.y,t.y)}function Fs(e){return Ai(e.x)/Ai(e.y)}function Is(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ys{constructor(){this.members=[]}add(e){_e(this.members,e),e.scheduleRender()}remove(e){if(Fe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Vs=["","X","Y","Z"];let Bs=0;function Ws(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function js(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ri(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&js(r)}function Hs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=Bs++,this.animationId=0,this.animationCommitId=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(Us),this.nodes.forEach(Js),this.nodes.forEach(el),this.nodes.forEach(Ks)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ms)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ze),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=wa(t)&&!(wa(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;bt.read((()=>{r=window.innerWidth})),e(t,(()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ct.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(xt(r),e(o-t))};return bt.setup(r,!0),()=>xt(r)}(a,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Zs)))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||o.getDefaultTransition()||il,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!_s(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Br(a,"layout"),onPlay:i,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Zs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(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(tl),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&js(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Qs);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Xs);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gs),this.nodes.forEach($s),this.nodes.forEach(qs)):this.nodes.forEach(Xs),this.clearAllSnapshots();const e=Ct.now();kt.delta=Ie(0,1e3/60,e-kt.timestamp),kt.timestamp=e,kt.isProcessing=!0,Et.update.process(kt),Et.preRender.process(kt),Et.render.process(kt),kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zs),this.sharedNodes.forEach(nl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ai(this.snapshot.measuredBox.x)||Ai(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wo(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ls(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||To(this.latestValues)||o)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),cl((r=n).x),cl(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return Wo();const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dl))){const{scroll:e}=this.root;e&&(Fo(t.x,e.offset.x),Fo(t.y,e.offset.y))}return t}removeElementScroll(e){const t=Wo();if(Ds(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:o}=r;r!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&Ds(t,e),Fo(t.x,a.offset.x),Fo(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n=Wo();Ds(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Yo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),To(r.latestValues)&&Yo(n,r.latestValues)}return To(this.latestValues)&&Yo(n,this.latestValues),n}removeTransform(e){const t=Wo();Ds(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!To(n.latestValues))continue;Co(n.latestValues)&&n.updateSnapshot();const r=Wo();Ds(r,n.measurePageBox()),Ns(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return To(this.latestValues)&&Ns(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(this.layout&&(r||a)){if(this.resolvedRelativeTargetAt=kt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wo(),this.relativeTargetOrigin=Wo(),Vi(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ds(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,i,s;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target=Wo(),this.targetWithTransforms=Wo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,i=this.relativeTarget,s=this.relativeParent.target,Ii(o.x,i.x,s.x),Ii(o.y,i.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ds(this.target,this.layout.layoutBox),Ro(this.target,this.targetDelta)):Ds(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wo(),this.relativeTargetOrigin=Wo(),Vi(this.relativeTargetOrigin,this.target,e.target),Ds(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Co(this.parent.latestValues)&&!Mo(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===kt.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Ds(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let o,i;t.x=t.y=1;for(let s=0;s<a;s++){o=n[s],i=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Yo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Ro(e,i)),r&&To(o.latestValues)&&Yo(e,o.latestValues))}t.x<_o&&t.x>Ao&&(t.x=1),t.y<_o&&t.y>Ao&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Wo());const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Ss(this.prevProjectionDelta.x,this.projectionDelta.x),Ss(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Fi(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&Is(this.projectionDelta.x,this.prevProjectionDelta.x)&&Is(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bo(),this.projectionDelta=Bo(),this.projectionDeltaWithTransform=Bo()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},o=Bo();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i=Wo(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(ol));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,h,m,f,g;rl(o.x,e.x,n),rl(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vi(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,m=this.relativeTargetOrigin,f=i,g=n,al(h.x,m.x,f.x,g),al(h.y,m.y,f.y,g),d&&(l=this.relativeTarget,p=d,Rs(l.x,p.x)&&Rs(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d=Wo()),Ds(d,this.relativeTarget)),s&&(this.animationValues=a,function(e,t,n,r,a,o){a?(e.opacity=hn(0,n.opacity??1,bs(r)),e.opacityExit=hn(t.opacity??1,0,xs(r))):o&&(e.opacity=hn(t.opacity??1,n.opacity??1,r));for(let a=0;a<gs;a++){const o=`border${fs[a]}Radius`;let i=ws(t,o),s=ws(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||vs(i)===vs(s)?(e[o]=Math.max(hn(ys(i),ys(s),r),0),(qt.test(s)||qt.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=hn(t.rotate||0,n.rotate||0,r))}(a,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update((()=>{os.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=aa(0)),this.currentAnimation=function(e,t,n){const r=ba(e)?e:aa(e);return r.start(ci("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ul(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Wo();const t=Ai(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ai(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ds(t,n),Yo(t,a),Fi(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ys);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Ws("z",e,r,this.animationValues);for(let t=0;t<Vs.length;t++)Ws(`rotate${Vs[t]}`,e,r,this.animationValues),Ws(`skew${Vs[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=oo(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=oo(t?.pointerEvents)||""),void(this.hasProjected&&!To(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,i=n?.z||0;if((a||o||i)&&(r=`translate3d(${a}px, ${o}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:a,rotateY:o,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in Va){if(void 0===a[t])continue;const{correct:n,applyTo:i,isCSSVariable:s}=Va[t],l="none"===o?a[t]:n(a[t],r);if(i){const t=i.length;for(let n=0;n<t;n++)e[i[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?oo(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>e.currentAnimation?.stop())),this.root.nodes.forEach(Qs),this.root.sharedNodes.clear()}}}function $s(e){e.updateLayout()}function qs(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;"size"===a?Bi((e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=Ai(r);r.min=n[e].min,r.max=r.min+a})):ul(a,t.layoutBox,n)&&Bi((r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=Ai(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)}));const i=Bo();Fi(i,n,t.layoutBox);const s=Bo();o?Fi(s,e.applyTransform(r,!0),t.measuredBox):Fi(s,n,t.layoutBox);const l=!Ls(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:o}=r;if(a&&o){const i=Wo();Vi(i,t.layoutBox,a.layoutBox);const s=Wo();Vi(s,n,o.layoutBox),_s(i,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=i,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Us(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ks(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zs(e){e.clearSnapshot()}function Qs(e){e.clearMeasurements()}function Xs(e){e.isLayoutDirty=!1}function Gs(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Zs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Js(e){e.resolveTargetDelta()}function el(e){e.calcProjection()}function tl(e){e.resetSkewAndRotation()}function nl(e){e.removeLeadSnapshot()}function rl(e,t,n){e.translate=hn(t.translate,0,n),e.scale=hn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function al(e,t,n,r){e.min=hn(t.min,n.min,r),e.max=hn(t.max,n.max,r)}function ol(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const il={duration:.45,ease:[.4,0,.1,1]},sl=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ll=sl("applewebkit/")&&!sl("chrome/")?Math.round:$e;function cl(e){e.min=ll(e.min),e.max=ll(e.max)}function ul(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Fs(t),a=Fs(n),o=.2,!(Math.abs(r-a)<=o));var r,a,o}function dl(e){return e!==e.root&&e.scroll?.wasRoot}const pl=Hs({attachResizeListener:(e,t)=>Ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hl={current:void 0},ml=Hs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hl.current){const e=new pl({});e.mount(window),e.setOptions({layoutScroll:!0}),hl.current=e}return hl.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),fl={pan:{Feature:class extends Di{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(e){this.session=new Hi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:as(e),onStart:as(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&bt.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Pi(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Di{constructor(e){super(e),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new ns(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ml,MeasureLayout:ds}};function gl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&bt.postRender((()=>a(t,Mi(t))))}function yl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&bt.postRender((()=>a(t,Mi(t))))}const vl=new WeakMap,wl=new WeakMap,bl=e=>{const t=vl.get(e.target);t&&t(e)},xl=e=>{e.forEach(bl)};function kl(e,t,n){const r=function({root:e,...t}){const n=e||document;wl.has(n)||wl.set(n,{});const r=wl.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(xl,{root:e,...t})),r[a]}(t);return vl.set(e,n),r.observe(e),()=>{vl.delete(e),r.unobserve(e)}}const El={some:0,all:1};const Dl=Eo({...Ci,...{inView:{Feature:class extends Di{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:El[r]};return kl(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Di{mount(){const{current:e}=this.node;e&&(this.unmount=va(e,((e,t)=>(yl(this.node,t,"Start"),(e,{success:t})=>yl(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Di{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ue(Ti(this.node.current,"focus",(()=>this.onFocus())),Ti(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Di{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,a,o]=ca(e,n),i=e=>{if(!ua(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{ua(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,a)};return r.forEach((e=>{e.addEventListener("pointerenter",i,a)})),o}(e,((e,t)=>(gl(this.node,t,"Start"),e=>gl(this.node,e,"End")))))}unmount(){}}}},...fl,...{layout:{ProjectionNode:ml,MeasureLayout:ds}}},Zo),Sl=n(null),Cl={up:"angle-up",end:"angle-right",start:"angle-left",down:"angle-down"},Tl=({align:e="start",autoClose:n=!1,children:s,className:l="",disabled:d=!1,drop:p,fullWidth:h=!1,icon:m,isChild:f=!1,label:g,onToggle:y,overflow:w=!1,requiredText:b,selectedValue:x,setShow:k,show:E,showError:D=!1,size:S="md",style:C="default",variant:T="primary"})=>{const[M,P]=i(!!E),[N,O]=i(!1),[L,R]=i(null),[A,_]=i(0),[F,I]=i(0),[Y,V]=i({top:0,left:0}),B=a(null),W=a(null),j=a(M),H=a(null),$=o(Sl);H.current=()=>{if(!W.current)return;if(!document.body.contains(W.current))return;const e=W.current.offsetWidth,t=W.current.offsetHeight;if(0!==e&&0!==t&&(h&&R((t=>t!==e?e:t)),_((e=>e!==t?t:e)),I((t=>t!==e?e:t)),w)){const e=W.current.getBoundingClientRect();if(e.top<-1e4||e.top>1e4||e.left<-1e4||e.left>1e4)return;V((t=>Math.abs(t.top-e.top)>1||Math.abs(t.left-e.left)>1?{top:e.top,left:e.left}:t))}};const q=c((()=>{H.current?.()}),[]),U=c(((e,t)=>{e!==j.current&&(O(!0),j.current=e),P(e),k&&k(e),y&&y(e,t),q()}),[k,y,q]),K=u((()=>{const e=s?.props?.children;if(!e)return null;const n=(e,n)=>{if(!t.isValidElement(e))return e;const r=e.type===t.Fragment,a="DropdownDivider"===e.type?.displayName||e.props?.className?.includes("dropdown-divider"),o=void 0!==e.props?.as;return r||a||o?t.cloneElement(e,{key:e.key||`${n}`}):t.cloneElement(e,{as:"li",key:e.key||`${n}`})};return Array.isArray(e)?e.map(((e,t)=>n(e,t))):n(e,0)}),[s]);r((()=>{E!==j.current&&(P(E),O(!0),j.current=E)}),[E]),r((()=>{$&&!$.isOpen&&M&&(P(!1),j.current=!1,k&&k(!1))}),[$?.isOpen,M,k,$]),r((()=>{q()}),[q]),r((()=>{if(!w||!M)return;q();let e=null,t=!1;const n=()=>{t||(t=!0,e=requestAnimationFrame((()=>{q(),t=!1})))};window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);let r=W.current?.parentElement;const a=[];for(;r;){const e=window.getComputedStyle(r).overflowY,t=window.getComputedStyle(r).overflowX;"auto"!==e&&"scroll"!==e&&"auto"!==t&&"scroll"!==t||(a.push(r),r.addEventListener("scroll",n)),r=r.parentElement}return()=>{e&&cancelAnimationFrame(e),window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n),a.forEach((e=>e.removeEventListener("scroll",n)))}}),[w,M,q]);const z=Cl[p]||Cl.down,Q=u((()=>"up"===p?"end"===e?"bottom right":"bottom left":"start"===p?"center right":"end"===p?"center left":"end"===e?"top right":"top left"),[p,e]),X=u((()=>{const e={};return w?"up"===p?(e.bottom=window.innerHeight-Y.top+"px",e.left=`${Y.left}px`):"start"===p?(e.right=window.innerWidth-Y.left+"px",e.top=`${Y.top}px`):"end"===p?(e.left=`${Y.left+F}px`,e.top=`${Y.top}px`):(e.top=`${Y.top+A}px`,e.left=`${Y.left}px`):"up"===p?e.bottom=`${A}px`:"start"===p?(e.right=`${F}px`,e.top="0"):"end"===p?(e.left=`${F}px`,e.top="0"):e.top=`${A}px`,e}),[p,A,F,w,Y]),G=u((()=>N?h?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:h?{initial:!1,animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[N,h]),Z=u((()=>"start"===p||"end"===p?{}:w?"end"===e?{left:"auto",right:window.innerWidth-Y.left-F+"px"}:{}:{left:"end"===e?"auto":"0",right:"end"===e?"0":"auto"}),[p,e,w,Y,F]),J=c((()=>{N&&O(!1)}),[N]),ee=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:w?"fixed":"absolute",...X,...Z,transformOrigin:Q};return t.createElement(Dl.ul,Ne({},o,{ref:n},G,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:J}))}));return e.displayName="MotionMenu",e}),[G,X,Z,Q,J,w]),te=u((()=>({strategy:w?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...w&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[w]),ne=u((()=>({isOpen:M})),[M]),re=u((()=>{if(f)return"";return["w-100",`btn btn-${T}`,`btn-${C}`,`btn-${S}`,D&&"not-validated",d&&"disabled"].filter(Boolean).join(" ")}),[f,T,C,S,D,d]);return t.createElement(Sl.Provider,{value:ne},t.createElement(v,{autoClose:n,show:M,onToggle:U,className:l,align:e,drop:p,disabled:f?void 0:d,"data-error":b,style:{position:"relative"}},t.createElement(v.Toggle,{ref:W,as:f?"div":void 0,bsPrefix:f?"":void 0,className:re},(()=>{const e=t.createElement(t.Fragment,null,t.createElement("span",{className:"dropdown-label"},g),t.createElement("span",null,x)),n=m&&t.createElement(ke,{style:"solid",name:m,scale:1}),r=g&&t.createElement(ke,{name:z,className:"caret"}),a="input"===T?e:g&&t.createElement("span",null,g);return"start"===p?t.createElement(t.Fragment,null,r,a,n):t.createElement(t.Fragment,null,n,a,r)})()),t.createElement(v.Menu,{as:ee,align:e,ref:B,style:h?{width:L}:void 0,popperConfig:te},K)))};Tl.propTypes={align:H.oneOf(["start","end"]),autoClose:H.oneOfType([H.bool,H.oneOf(["inside","outside"])]),children:H.node,className:H.string,disabled:H.bool,drop:H.oneOf(["up","down","start","end"]),fullWidth:H.bool,icon:H.string,isChild:H.bool,label:H.node,onToggle:H.func,overflow:H.bool,requiredText:H.string,selectedValue:H.node,setShow:H.func,show:H.bool,showError:H.bool,size:H.oneOf(["xs","md","lg"]),style:H.oneOf(["default","success","danger","warning","link"]),variant:H.oneOf(["primary","secondary","terciary","outline","input"])};const Ml=()=>{const e=c((e=>{let t=e?.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(e,t){return 0==+e?"":0===t?e?.toLowerCase():e?.toUpperCase()}));return t=t?.replace(/^\d+/,""),t=t?.replace(/[^a-zA-Z0-9_]/g,""),t}),[]);return{toCamelCase:e,highlightText:(e,n)=>{if(!n)return e;const r=e.split(new RegExp(`(${n})`,"gi"));return t.createElement("span",null,r.map(((e,r)=>t.createElement("span",{className:[e.toLowerCase()===n.toLowerCase()&&"highligthed-search"],key:r},e))))},capitalice:e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:""}},Pl=({children:e,className:n="",disabled:r=!1,id:a,name:o,setStatus:i,size:s="md",status:l=!1})=>{const{toCamelCase:c}=Ml();let u=a;a||"string"!=typeof e||(u=c(e));return t.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},t.createElement("label",{className:"checkbox "+("lg"===s?"checkbox-lg":"xs"===s?"checkbox-xs":"")},t.createElement("input",{type:"checkbox",checked:l,onChange:e=>{i(e.target.checked)},minLength:"1",id:u,name:o}),e))};Pl.propTypes={className:H.string,disabled:H.bool,id:H.string,name:H.string,setStatus:H.func,size:H.oneOf(["xs","md","lg"]),status:H.bool};const Nl=({autoFocus:e=!1,className:n="",disabled:o=!1,focus:i=!1,helpText:s,icon:l,label:c="Input label",max:u,maxLength:d,min:p,name:h,onChange:m,prefix:f,requiredText:g,setShowError:y,showError:v,size:w="md",suffix:b,type:x="text",value:k})=>{const{toCamelCase:E}=Ml(),D=a(null),S=E(c);r((()=>{v&&setTimeout((()=>{y(!1)}),3e3)}),[v]),r((()=>{D.current&&i&&D.current.focus()}),[i]);const C=(()=>{switch(x){case"email":return"email";case"tel":return"tel";case"number":return"numeric";default:return}})();return t.createElement("div",{className:`position-relative ${n} ${o?"disabled":""}`},f||b||l?t.createElement("div",{className:"input-group "+(v?"not-validated":""),"data-error":g},l&&t.createElement("span",{className:"input-group-text"},t.createElement(ke,{style:"solid",name:l,scale:1})),f&&t.createElement("span",{className:"input-group-text"},f),t.createElement("div",{className:"form-floating"},t.createElement("input",{type:x,className:"form-control "+("md"!==w?`form-control-${w}`:""),value:k,id:S,name:h,placeholder:c,onChange:m,required:!!g,autoFocus:e,ref:D,min:p,max:u,inputMode:C}),t.createElement("label",{htmlFor:S},c)),b&&t.createElement("span",{className:"input-group-text"},b)):t.createElement("div",{className:"form-floating "+(v?"not-validated":""),"data-error":g},t.createElement("input",{type:x,className:"form-control "+("md"!==w?`form-control-${w}`:""),value:k,id:S,placeholder:c,onChange:m,required:!!g,name:h,autoFocus:e,ref:D,min:p,max:u,maxLength:d,inputMode:C}),t.createElement("label",{htmlFor:S},c)),s&&t.createElement("small",{className:"text-muted"},s))};Nl.propTypes={autoFocus:H.bool,className:H.string,disabled:H.bool,focus:H.bool,helpText:H.string,icon:H.string,label:H.string,max:H.oneOfType([H.string,H.number]),maxLength:H.number,min:H.oneOfType([H.string,H.number]),name:H.string,onChange:H.func,prefix:H.string,requiredText:H.string,size:H.oneOf(["xs","md","lg"]),showError:H.bool,setShowError:H.func,suffix:H.string,type:H.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:H.oneOfType([H.string,H.number])};const Ol=({children:e,className:n="",disabled:r=!1,fullWidth:a=!1,id:o,name:i,setStatus:s,size:l="md",status:c=!0})=>{const{toCamelCase:u}=Ml();let d=o;o||"string"!=typeof e||(d=u(e));return t.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},t.createElement("label",{className:`radio ${a?"w-100":""} ${"lg"===l?"radio-lg":"xs"===l?"radio-xs":""}`},t.createElement("input",{type:"radio",checked:c,onChange:e=>{s(e.target.checked)},minLength:"1",id:d,name:i}),e))};Ol.propTypes={className:H.string,disabled:H.bool,fullWidth:H.bool,id:H.string,name:H.string,setStatus:H.func,size:H.oneOf(["xs","md","lg"]),status:H.bool};const Ll=({children:e,className:n="",disabled:r=!1,icon:a=!1,id:o,name:i,setStatus:s,size:l,status:c=0,switchPosition:u="start"})=>{const{toCamelCase:d}=Ml(),p="lg"===l?"form-switch-lg":"xs"===l?"form-switch-xs":"",h=o||d(e);return t.createElement("div",{className:`form-check form-switch ${p} ${n} ${"end"===u?"switch-end":""} ${a?"switch-icon":""} ${r?"disabled":""}`},t.createElement("input",{className:"form-check-input",type:"checkbox",role:"switch",onChange:()=>{if("boolean"==typeof c)return s(!c);s(c?0:1)},id:h,name:i,checked:!!c}),e&&t.createElement("label",{className:"form-check-label",htmlFor:h},e))};Ll.propTypes={className:H.string,disabled:H.bool,icon:H.bool,id:H.string,name:H.string,setStatus:H.func,status:H.oneOfType([H.number,H.bool]),size:H.oneOf(["xs","md","lg"]),switchPosition:H.oneOf(["start","end"])};const Rl=({className:e="",disabled:n=!1,helpText:a,label:o="Textarea label",name:i,onChange:s,requiredText:l,showError:c,setShowError:u,size:d="md",value:p=""})=>{const{toCamelCase:h}=Ml(),m="lg"===d?"form-control-lg":"xs"===d?"form-control-xs":"",f=h(o);return r((()=>{c&&setTimeout((()=>{u(!1)}),3e3)}),[c]),t.createElement("div",{className:`position-relative ${e} ${n?"disabled":""}`},t.createElement("div",{className:"form-floating "+(c?"not-validated":""),"data-error":l},t.createElement("textarea",{className:`form-control ${m}`,onChange:s,placeholder:o,id:f,name:i,required:!!l,value:p||""}),t.createElement("label",{htmlFor:f},o),a&&t.createElement("small",{className:"text-muted"},a)))};Rl.propTypes={className:H.string,disabled:H.bool,helpText:H.string,label:H.string,name:H.string,onChange:H.func,requiredText:H.string,showError:H.bool,setShowError:H.func,size:H.oneOf(["xs","md","lg"]),value:H.string};const Al=({autoFocus:e=!1,className:n="",counter:a=!1,disabled:o=!1,duplicateKeywordErrorText:s="Duplicate keyword.",keywordsList:l=[],maxKeywords:c,maxKeywordLength:u,pillColor:d="neutral",placeholder:p="Add keywords…",recomendedKeywords:h,requiredText:m,setKeywordsList:f})=>{const[g,y]=i(""),[v,w]=i(""),[b,x]=i(!1);return r((()=>{l.length===c&&(x(!0),setTimeout((()=>{x(!1)}),3e3))}),[l]),t.createElement(t.Fragment,null,t.createElement("div",{className:`position-relative ${n} ${o?"disabled":""}`},t.createElement("div",{className:"input-chip "+(b?"not-validated":""),"data-error":m},t.createElement("div",{className:"wrapper"},l.map(((e,n)=>t.createElement(Ce,{key:n,closeButton:!0,color:d,onClick:()=>(e=>{const t=l.filter((t=>t!==e));f(t)})(e)},e)))),t.createElement("input",{type:"text",value:g,onKeyDown:e=>{if("Enter"===e.key&&""!==g.trim()&&l.length<c){if(g.length>u)return w(`Each keyword must be ${u} characters or less.`),setTimeout((()=>w("")),2e3),void y("");if(l.includes(g.trim()))return w(s),setTimeout((()=>w("")),2e3),void y("");const e=[...l,g.trim()];f(e),y("")}},onChange:e=>{y(e.target.value)},placeholder:p,autoFocus:e}),a&&l.length>=h&&t.createElement("div",{className:"progress-counter-wrapper "+(l.length>=c?"progress-value-error":l.length>=h?"progress-value-warning":"")},t.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"progress-counter"},t.createElement("circle",{className:"progress-bg",cx:"10",cy:"10",r:"9",fill:"none"}),t.createElement("circle",{className:"progress-value",cx:"10",cy:"10",r:"9",strokeDasharray:56.55,strokeDashoffset:56.55*(1-l.length/c),strokeLinecap:"round",fill:"none"})),t.createElement("span",{className:"progress-counter-text"},l.length))),v&&t.createElement("small",{className:"text-muted"},v)))};Al.propTypes={autoFocus:H.bool,className:H.string,counter:H.bool,disabled:H.bool,duplicateKeywordErrorText:H.string,keywordsList:H.array.isRequired,maxKeywords:H.number.isRequired,maxKeywordLength:H.number.isRequired,pillColor:H.oneOf(["blue","danger","dark","green","light","midtone","neutral","red","yellow"]),placeholder:H.string.isRequired,recomendedKeywords:H.number.isRequired,requiredText:H.string.isRequired,setKeywordsList:H.func.isRequired};const _l=import.meta.env.MODE,Fl="production"===_l?"https://api.groovinads.com/":"localdev"===_l?"https://api-test.groovinads.com/":"https://api-dev.groovinads.com/";var Il={authStatus:Fl+"v2/auth/status",authLogout:Fl+"v2/auth/logout",applications:Fl+"v2/applications",favApps:Fl+"v2/applications/favorite",clients:Fl+"v2/auth/clients",clientsLogin:Fl+"v2/auth/clients/login",headers:{headers:{"Content-Type":"application/json",Authorization:"Bearer "+x.get("groovinadsAuthToken"),"Accept-Language":"en"}}};k.defaults.withCredentials=!0;const Yl=async({url:e})=>await k.get(e,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),Vl=async({url:e,data:t})=>await k.post(e,t,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),Bl=async e=>await Yl({url:`${Fl}${e}`}),Wl=async(e,t)=>await Vl({url:`${Fl}${e}`,data:t}),jl=async e=>await(async({url:e})=>await k.delete(e,Il.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))))({url:`${Il.favApps}/${e}`}),Hl=({apiGetEmail:e,apiPostEmail:n,disabled:a=!1,label:o="Email addresses",showModal:s=!0,textButton:l="Add",textError:c="You must enter a valid email address",titleList:u="Added emails"})=>{const[d,p]=i([]),[h,m]=i(""),[f,g]=i([]),[y,v]=i(!1),w=/^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/;return r((()=>{s?(async()=>{const t=await Bl(e);p(t||[])})():d.length&&p([])}),[s]),t.createElement(t.Fragment,null,t.createElement("div",{className:"mb-3"},t.createElement("div",{className:`mb-3 input-group w-100 mb-4 ${y?"not-validated":""} ${a?"disabled":""}`,"data-error":c},t.createElement(Nl,{label:o,value:h,onChange:e=>{(e=>{const t=e.target.value.replace(/\. +/g," ");m(t),t.trim()&&!w.test(t)||v(!1)})(e)}}),t.createElement(Pe,{onClick:async()=>{const e=h.split(/[;, ]+/).map((e=>e.trim())).filter((e=>e.length>0)),t=e.filter((e=>!w.test(e))),r=e.filter((e=>w.test(e)));if(t.length&&(m(t.join(" ")),v(!0),setTimeout((()=>{v(!1)}),3e3)),r.length){const e=await Wl(n,[...d,...r]);p(e)}m(t.join(" "))},className:""+(h.trim()?"":"disabled")},l))),d?.length?t.createElement("div",{className:"shared-users-list"},t.createElement("h3",null,u),d?.map(((e,r)=>t.createElement("div",{key:`email${r}`,className:"shared-user-item"},t.createElement("div",{className:"shared-user"},t.createElement(ke,{name:"user-circle",scale:2}),t.createElement("span",null,e)),f.some((t=>t===e))?t.createElement("div",{className:"spinner-wrapper"},t.createElement(Te,{scale:1})):t.createElement(Pe,{variant:"terciary",style:"danger",startIcon:"trash-can",onClick:()=>(async e=>{g([...f,e]);const t=d.filter((t=>t!==e)),r=await Wl(n,t);setTimeout((()=>{g(f.filter((t=>t!==e))),p(r)}),1e3)})(e)}))))):null)};Hl.propTypes={apiGetEmail:H.string.isRequired,apiPostEmail:H.string.isRequired,disabled:H.bool,label:H.string,showModal:H.bool,textButton:H.string,textError:H.string,titleList:H.string};const $l=({autoClose:e=!1,className:n="",disabled:o=!1,locked:s=!1,menuType:l="simple",onRemoveFilter:d,onToggle:p,overflow:h=!1,requiredText:m,searchLabel:f="Search",setShow:g,setValuesSelected:y,show:w,showError:b=!1,title:x,values:k=[],valuesSelected:E=[]})=>{const[D,S]=i(""),[C,T]=i(!!w),[M,P]=i(!1),[N,O]=i(0),[L,R]=i(0),[A,_]=i({top:0,left:0}),F=a(null),I=a(null),Y=a(C),V=()=>t.createElement("div",{className:"dropdown-filter-empty-space"},t.createElement("img",{src:"https://ui.groovinads.com/assets/not-found.svg",alt:"Sad magnifier on abstract background"}),t.createElement("div",null,t.createElement("h5",null,"Value not found"),t.createElement("p",null,"It looks like this value does not exist."))),B=(e,t)=>{y(e?[...E,t]:E.filter((e=>e!==t)))},W=c((()=>{if(!I.current)return;const e=I.current.offsetHeight,t=I.current.offsetWidth;if(O(e),R(t),h){const e=I.current.getBoundingClientRect();_({top:e.top,left:e.left})}}),[h]);r((()=>{w!==Y.current&&(T(w),P(!0),Y.current=w)}),[w]);const j=c((t=>{!F?.current||F?.current.contains(t?.target)||!0!==e&&"outside"!==e||(!1!==Y.current&&(P(!0),Y.current=!1),T(!1),g(!1))}),[e,g]);r((()=>(document.addEventListener("click",j),()=>{document.removeEventListener("click",j)})),[j]),r((()=>{W()}),[W]);const H=u((()=>{const e={};return h?(e.top=`${A.top+N}px`,e.left=`${A.left}px`):e.top=`${N}px`,e}),[N,h,A]),$=u((()=>M?{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[M]),q=c((()=>{M&&P(!1)}),[M]),U=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:h?"fixed":"absolute",...H,left:h?H.left:"0",...h&&L&&{width:`${L}px`},transformOrigin:"top left"};return t.createElement(Dl.ul,Ne({},o,{ref:n},$,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:q}))}));return e.displayName="MotionMenu",e}),[$,q,h,H,L]),K=u((()=>({strategy:h?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...h&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[h]);return t.createElement(v,{onToggle:p,className:`dropdown-filter ${s?"locked":""} ${n} ${o?"disabled":""}`,autoClose:e,show:C,ref:F,"data-error":m,style:{position:"relative"}},t.createElement(v.Toggle,{ref:I,variant:"toggle-filter",className:b?"not-validated":"",onClick:e=>{e.stopPropagation();const t=!C;t!==Y.current&&(P(!0),Y.current=t),T(t),g(t),W()}},t.createElement("div",{className:"filter-heading"},t.createElement("div",{className:"filter-title"},t.createElement("span",{className:"filter-title-text"},x),E.length>0&&t.createElement("span",{className:"filter-title-count"},` (${E.length})`),s&&t.createElement(ke,{style:"solid",name:"lock-keyhole",scale:.7})),t.createElement(ke,{style:"solid",name:"chevron-down",scale:1,className:"caret"})),t.createElement("div",{className:"filter-values"},E.length===k.length?"All selected":E.length?E.join("; "):"None")),!s&&t.createElement(Pe,{variant:"terciary",endIcon:"xmark",size:"md",className:"remove-filter",onClick:d}),"simple"===l&&t.createElement(v.Menu,{as:U,className:"dropdown-menu-simple",popperConfig:K},t.createElement("div",{className:"dropdown-menu-wrapper"},t.createElement(Nl,{size:"xs",label:f,icon:"magnifying-glass",className:"w-100",value:D,onChange:({target:e})=>S(e.value),customRef:w}),k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).length>0?t.createElement("ul",{className:"dropdown-filter-list"},k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).map(((e,n)=>t.createElement(Pl,{setStatus:t=>{B(t,e)},status:E.includes(e),key:"Dropdown.Simple.Checkbox"+n},e)))):t.createElement(V,null))),"selection"===l&&t.createElement(v.Menu,{as:U,className:"dropdown-menu-selection",popperConfig:K},t.createElement("div",{className:"dropdown-menu-wrapper"},t.createElement("div",{className:"dropdown-filter-list-wrapper"},t.createElement(Nl,{size:"xs",label:f,icon:"magnifying-glass",className:"w-100",value:D,onChange:({target:e})=>S(e.value),customRef:w}),t.createElement("h4",null,"All values (",k.length,")"),k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).length>0?t.createElement(t.Fragment,null,t.createElement("ul",{className:"dropdown-filter-list"},k.filter((e=>e.toString().toLowerCase().includes(D.toLowerCase()))).map(((e,n)=>t.createElement(Pl,{setStatus:t=>{B(t,e)},status:E.includes(e),key:"Dropdown.Selection.Checkbox"+n},e))))):t.createElement(V,null)),t.createElement("div",{className:"dropdown-filter-values-wrapper"},t.createElement("div",{className:"dropdown-filter-buttons-wrapper"},t.createElement(Pe,{startIcon:"check",size:"xs",variant:"terciary",onClick:()=>{y([...k])}},"Select all"),t.createElement(Pe,{startIcon:"xmark",size:"xs",variant:"terciary",onClick:()=>{y([])}},"Clear selection")),t.createElement("h4",null,"Selected values (",E.length,")"),t.createElement("div",{className:"dropdown-filter-selected-list"},E.map(((e,n)=>t.createElement(Ce,{color:"light",closeButton:!0,onClick:()=>{(e=>{y(E.filter(((t,n)=>n!==e)))})(n)},key:"Dropdown.PillComponent"+n},e))))))))};$l.propTypes={autoClose:H.oneOfType([H.bool,H.oneOf(["outside"])]),className:H.string,disabled:H.bool,locked:H.bool,menuType:H.oneOf(["simple","selection"]),onRemoveFilter:H.func,onToggle:H.func,overflow:H.bool,requiredText:H.string,searchLabel:H.string,setShow:H.func,setValuesSelected:H.func,show:H.bool,showError:H.bool,title:H.string,values:H.array,valuesSelected:H.array};const ql=({autoClose:e=!1,buttonVariant:n="input",className:o="",customKey:s,disabled:l=!1,drop:d,focus:p=!1,hasId:h=!0,idInPill:m=!1,idKey:f,inputLabel:g="",nameKey:y,notMatchedText:w="No match found",nowrap:b=!1,object:x=!1,onToggle:k,overflow:E=!1,requiredText:D="Required",searchLabel:S="Search",setValuesSelected:C,setShow:T,show:M,showError:P=!1,showStatus:N="",values:O=[],valuesSelected:L=[]})=>{const[R,A]=i(""),[_,F]=i(!!M),[I,Y]=i(!1),[V,B]=i(0),[W,j]=i(0),[H,$]=i({top:0,left:0}),q=a(null),U=a(null),K=a(null),z=a(_),{highlightText:Q}=Ml(),X=c(((e,t)=>{const n=O.findIndex((e=>(x?e[f]:e)===(x?t[f]:t)));C(e?e=>[...e,O[n]]:e=>e.filter((e=>(x?e[f]:e)!==(x?O[n][f]:O[n]))))}),[O,x,f,C]),G=c((e=>{C((t=>t.filter(((t,n)=>n!==e))))}),[C]),Z=u((()=>O.filter((e=>(x?`${e[f]} ${e[y]} ${e[s]}`:e).toLowerCase().includes(R.toLowerCase())&&(!N||parseInt(e.status)===parseInt(N))))),[O,x,f,y,s,R,N]),J=c((()=>{if(!U.current)return;const e=U.current.offsetHeight,t=U.current.offsetWidth;if(B(e),j(t),E){const e=U.current.getBoundingClientRect();$({top:e.top,left:e.left})}}),[E]),ee=c((t=>{!q?.current||q?.current.contains(t?.target)||!0!==e&&"outside"!==e||(!1!==z.current&&(Y(!0),z.current=!1),F(!1),T(!1))}),[e,T]);r((()=>{M!==z.current&&(F(M),Y(!0),z.current=M)}),[M]),r((()=>(document.addEventListener("click",ee),()=>{document.removeEventListener("click",ee)})),[ee]),r((()=>{J()}),[J]);const te="up"===d?"bottom left":"top left",ne=u((()=>{const e={};return E?"up"===d?(e.bottom=window.innerHeight-H.top+"px",e.left=`${H.left}px`):(e.top=`${H.top+V}px`,e.left=`${H.left}px`):"up"===d?e.bottom=`${V}px`:e.top=`${V}px`,e}),[d,V,E,H]),re=u((()=>I?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scaleY:1,opacity:1}}),[I]),ae=c((()=>{I&&Y(!1)}),[I]),oe=u((()=>{const e=t.forwardRef(((e,n)=>{const{show:r,close:a,...o}=e,i={...o.style,position:E?"fixed":"absolute",...ne,left:E?ne.left:"0",...E&&W&&{width:`${W}px`},transformOrigin:te};return t.createElement(Dl.ul,Ne({},o,{ref:n},re,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:ae}))}));return e.displayName="MotionMenu",e}),[re,ae,E,ne,W,d]),ie=u((()=>({strategy:E?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...E&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[E]),se=u((()=>["btn",`btn-${n}`,b&&"nowrap",P&&"not-validated",l&&"disabled"].filter(Boolean).join(" ")),[n,b,P,l]),le=c((e=>s?`${e[y]} - ${e[s]}`:m?`#${e[f]} - ${e[y]}`:e[y]||e),[s,m,y,f]),ce=c((e=>{const t=x?s?`${e[y]} - ${e[s]}`:`${h?`#${e[f]} - `:""}${e[y]}`:e[y]||e;return Q(t,R)}),[x,s,h,y,f,Q,R]);return t.createElement(v,{className:o,autoClose:e,show:_,ref:q,onToggle:k,drop:d,"data-error":D,style:{position:"relative"}},t.createElement(v.Toggle,{as:"div",ref:U,className:se,onClick:e=>{e.stopPropagation();const t=!_;t!==z.current&&(Y(!0),z.current=t),F(t),J()}},L.length>0&&"input"===n&&t.createElement("div",{className:"wrapper"},L.map(((e,n)=>t.createElement(Ce,{color:"neutral",closeButton:!0,onClick:e=>{e.stopPropagation(),G(n)},key:`Dropdown.PillComponent.${n}`},le(e))))),t.createElement("span",{className:"label"},g),t.createElement(ke,{style:"solid",name:"angle-down",scale:1,className:"caret"})),t.createElement(v.Menu,{as:oe,className:"w-100",ref:K,popperConfig:ie},t.createElement(v.Item,{onClick:e=>e.stopPropagation(),as:"div"},t.createElement(Nl,{label:S,value:R,onChange:({target:e})=>A(e.value),icon:"magnifying-glass",size:"xs",className:"w-100",focus:p})),t.createElement(v.Item,{onClick:e=>e.stopPropagation(),as:"div"},Z.length>0?t.createElement("ul",{className:"dropdown-checks"},Z.map(((e,n)=>t.createElement(Pl,{setStatus:t=>X(t,e),status:x?L.some((t=>t[f]===e[f])):L.includes(e),key:`Dropdown.Input.Checkbox.${n}`},ce(e))))):t.createElement("div",{className:"not-matched"},t.createElement("p",null,w)))))};ql.propTypes={autoClose:H.oneOfType([H.bool,H.string]),buttonVariant:H.oneOf(["input","primary","secondary","terciary","outline"]),className:H.string,customKey:H.string,disabled:H.bool,drop:H.oneOf(["up","down"]),focus:H.bool,hasId:H.bool,idInPill:H.bool,idKey:H.string,inputLabel:H.string,nameKey:H.string,notMatchedText:H.string,nowrap:H.bool,object:H.bool,onToggle:H.func,overflow:H.bool,requiredText:H.string,searchLabel:H.string,setValuesSelected:H.func,setShow:H.func,show:H.bool,showError:H.bool,showStatus:H.string,values:H.array,valuesSelected:H.array};const Ul=6048e5,Kl=864e5,zl=Symbol.for("constructDateFrom");function Ql(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&zl in e?e[zl](t):e instanceof Date?new e.constructor(t):new Date(t)}function Xl(e,t){return Ql(t||e,e)}let Gl={};function Zl(){return Gl}function Jl(e,t){const n=Zl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Xl(e,t?.in),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function ec(e,t){return Jl(e,{...t,weekStartsOn:1})}function tc(e,t){const n=Xl(e,t?.in),r=n.getFullYear(),a=Ql(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=ec(a),i=Ql(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=ec(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function nc(e){const t=Xl(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 rc(e,t){const n=Xl(e,t?.in);return n.setHours(0,0,0,0),n}function ac(e,t,n){const[r,a]=function(e,...t){const n=Ql.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}(0,e,t),o=rc(r),i=rc(a),s=+o-nc(o),l=+i-nc(i);return Math.round((s-l)/Kl)}function oc(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+Xl(e)));var t}const ic={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"}};function sc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lc={date:sc({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:sc({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:sc({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},cc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function uc(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const dc={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:uc({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:uc({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:uc({values:{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"]},defaultWidth:"wide"}),day:uc({values:{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"]},defaultWidth:"wide"}),dayPeriod:uc({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function pc(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const hc={ordinalNumber:(mc={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(mc.matchPattern);if(!n)return null;const r=n[0],a=e.match(mc.parsePattern);if(!a)return null;let o=mc.valueCallback?mc.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:pc({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:pc({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:pc({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})};var mc;const fc={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=ic[e];return r="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:lc,formatRelative:(e,t,n,r)=>cc[e],localize:dc,match:hc,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gc(e,t){const n=Xl(e,t?.in),r=ac(n,function(e,t){const n=Xl(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return r+1}function yc(e,t){const n=Xl(e,t?.in),r=+ec(n)-+function(e,t){const n=tc(e,t),r=Ql(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ec(r)}(n);return Math.round(r/Ul)+1}function vc(e,t){const n=Xl(e,t?.in),r=n.getFullYear(),a=Zl(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=Ql(t?.in||e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Jl(i,t),l=Ql(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Jl(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function wc(e,t){const n=Xl(e,t?.in),r=+Jl(n,t)-+function(e,t){const n=Zl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=vc(e,t),o=Ql(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Jl(o,t)}(n,t);return Math.round(r/Ul)+1}function bc(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const xc={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return bc("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):bc(n+1,2)},d:(e,t)=>bc(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>bc(e.getHours()%12||12,t.length),H:(e,t)=>bc(e.getHours(),t.length),m:(e,t)=>bc(e.getMinutes(),t.length),s:(e,t)=>bc(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return bc(Math.trunc(r*Math.pow(10,n-3)),t.length)}},kc="midnight",Ec="noon",Dc="morning",Sc="afternoon",Cc="evening",Tc="night",Mc={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return xc.y(e,t)},Y:function(e,t,n,r){const a=vc(e,r),o=a>0?a:1-a;if("YY"===t){return bc(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):bc(o,t.length)},R:function(e,t){return bc(tc(e),t.length)},u:function(e,t){return bc(e.getFullYear(),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 bc(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"});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 bc(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"});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 xc.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"});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 bc(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=wc(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):bc(a,t.length)},I:function(e,t,n){const r=yc(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):bc(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):xc.d(e,t)},D:function(e,t,n){const r=gc(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):bc(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return bc(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return bc(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return bc(a,t.length);case"io":return n.ordinalNumber(a,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(a=12===r?Ec:0===r?kc:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(a=r>=17?Cc:r>=12?Sc:r>=4?Dc:Tc,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return xc.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):xc.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):bc(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):bc(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xc.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xc.s(e,t)},S:function(e,t){return xc.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Nc(r);case"XXXX":case"XX":return Oc(r);default:return Oc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Nc(r);case"xxxx":case"xx":return Oc(r);default:return Oc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pc(r,":");default:return"GMT"+Oc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pc(r,":");default:return"GMT"+Oc(r,":")}},t:function(e,t,n){return bc(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return bc(+e,t.length)}};function Pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+t+bc(o,2)}function Nc(e,t){if(e%60==0){return(e>0?"-":"+")+bc(Math.abs(e)/60,2)}return Oc(e,t)}function Oc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+bc(Math.trunc(r/60),2)+t+bc(r%60,2)}const Lc=(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"});default:return t.date({width:"full"})}},Rc=(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"});default:return t.time({width:"full"})}},Ac={p:Rc,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Lc(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",Lc(r,t)).replace("{{time}}",Rc(a,t))}},_c=/^D+$/,Fc=/^Y+$/,Ic=["D","DD","YY","YYYY"];const Yc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bc=/^'([^]*?)'?$/,Wc=/''/g,jc=/[a-zA-Z]/;function Hc(e,t,n){const r=Zl(),a=r.locale??fc,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Xl(e,n?.in);if(!oc(s))throw new RangeError("Invalid time value");let l=t.match(Vc).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ac[t])(e,a.formatLong)}return e})).join("").match(Yc).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:$c(e)};if(Mc[t])return{isToken:!0,value:e};if(t.match(jc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map((n=>{if(!n.isToken)return n.value;const r=n.value;(function(e){return Fc.test(e)}(r)||function(e){return _c.test(e)}(r))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),Ic.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,Mc[r[0]])(s,r,a.localize,c)})).join("")}function $c(e){const t=e.match(Bc);return t?t[1].replace(Wc,"'"):e}function qc(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=qc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Uc(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=qc(e))&&(r&&(r+=" "),r+=t);return r}function Kc(e,t){return Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kc(e,t)}function zc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qc(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var Xc,Gc,Zc=(void 0===Xc&&(Xc=0),function(){return++Xc}),Jc={},eu={},tu=["touchstart","touchmove"];function nu(e,t){var n={};return-1!==tu.indexOf(t)&&Gc&&(n.passive=!e.props.preventDefault),n}function ru(e,t){var n,r,a=e.displayName||e.name||"Component";return r=n=function(t){var n,r;function o(e){var n;return(n=t.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof n.__clickOutsideHandlerProp){var t=n.getInstance();if("function"!=typeof t.props.handleClickOutside){if("function"!=typeof t.handleClickOutside)throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else n.__clickOutsideHandlerProp(e)},n.__getComponentNode=function(){var e=n.getInstance();return"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():F(e)},n.enableOnClickOutside=function(){if("undefined"!=typeof document&&!eu[n._uid]){void 0===Gc&&(Gc=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),eu[n._uid]=!0;var e=n.props.eventTypes;e.forEach||(e=[e]),Jc[n._uid]=function(e){var t;null!==n.componentNode&&(n.initTimeStamp>e.timeStamp||(n.props.preventDefault&&e.preventDefault(),n.props.stopPropagation&&e.stopPropagation(),n.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Qc(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,n.componentNode,n.props.outsideClickIgnoreClass)===document&&n.__outsideClickHandler(e)))},e.forEach((function(e){document.addEventListener(e,Jc[n._uid],nu(zc(n),e))}))}},n.disableOnClickOutside=function(){delete eu[n._uid];var e=Jc[n._uid];if(e&&"undefined"!=typeof document){var t=n.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,nu(zc(n),t))})),delete Jc[n._uid]}},n.getRef=function(e){return n.instanceRef=e},n._uid=Zc(),n.initTimeStamp=performance.now(),n}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,Kc(n,r);var i=o.prototype;return i.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},i.componentDidMount=function(){"undefined"!=typeof document&&document.createElement&&(this.getInstance(),this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside())},i.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},i.componentWillUnmount=function(){this.disableOnClickOutside()},i.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,p(e,n)},o}(f),n.displayName="OnClickOutside("+a+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}function au(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function ou(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function iu(e,t){const n=au(e);return isNaN(t)?ou(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function su(e,t){return ou(e,+au(e)+t)}const lu=6048e5,cu=864e5,uu=6e4,du=36e5;function pu(e,t){return su(e,t*uu)}function hu(e,t){const n=au(e);if(isNaN(t))return ou(e,NaN);if(!t)return n;const r=n.getDate(),a=ou(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);return r>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function mu(e,t){return hu(e,3*t)}function fu(e,t){return su(e,1e3*t)}function gu(e,t){return iu(e,7*t)}function yu(e,t){return hu(e,12*t)}function vu(e){const t=au(e);return t.setHours(0,0,0,0),t}function wu(e){const t=au(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 bu(e,t){const n=vu(e),r=vu(t),a=+n-wu(n),o=+r-wu(r);return Math.round((a-o)/cu)}function xu(e,t){const n=au(e),r=au(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function ku(e){const t=au(e);return Math.trunc(t.getMonth()/3)+1}function Eu(e,t){const n=au(e),r=au(t);return 4*(n.getFullYear()-r.getFullYear())+(ku(n)-ku(r))}function Du(e,t){const n=au(e),r=au(t);return n.getFullYear()-r.getFullYear()}function Su(e){const t=au(e);return t.setHours(23,59,59,999),t}function Cu(e){const t=au(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}let Tu={};function Mu(){return Tu}function Pu(e){const t=au(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}const Nu={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"}};function Ou(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Lu={date:Ou({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ou({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ou({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Ru={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Au(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const _u={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:Au({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Au({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Au({values:{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"]},defaultWidth:"wide"}),day:Au({values:{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"]},defaultWidth:"wide"}),dayPeriod:Au({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function Fu(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const i=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const Iu={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;return{value:i,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Fu({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:Fu({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:Fu({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})},Yu={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=Nu[e];return r="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Lu,formatRelative:(e,t,n,r)=>Ru[e],localize:_u,match:Iu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vu(e){const t=au(e),n=ou(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Bu(e,t){const n=Mu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=au(e),o=a.getDay(),i=(o<r?7:0)+o-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function Wu(e){return Bu(e,{weekStartsOn:1})}function ju(e){const t=au(e),n=t.getFullYear(),r=ou(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=Wu(r),o=ou(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=Wu(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Hu(e){const t=au(e),n=+Wu(t)-+function(e){const t=ju(e),n=ou(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Wu(n)}(t);return Math.round(n/lu)+1}function $u(e,t){const n=au(e),r=n.getFullYear(),a=Mu(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=ou(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Bu(i,t),l=ou(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Bu(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function qu(e,t){const n=au(e),r=+Bu(n,t)-+function(e,t){const n=Mu(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=$u(e,t),o=ou(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Bu(o,t)}(n,t);return Math.round(r/lu)+1}function Uu(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Uu("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Uu(n+1,2)},d:(e,t)=>Uu(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Uu(e.getHours()%12||12,t.length),H:(e,t)=>Uu(e.getHours(),t.length),m:(e,t)=>Uu(e.getMinutes(),t.length),s:(e,t)=>Uu(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Uu(Math.trunc(r*Math.pow(10,n-3)),t.length)}},zu="midnight",Qu="noon",Xu="morning",Gu="afternoon",Zu="evening",Ju="night",ed={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const a=$u(e,r),o=a>0?a:1-a;if("YY"===t){return Uu(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Uu(o,t.length)},R:function(e,t){return Uu(ju(e),t.length)},u:function(e,t){return Uu(e.getFullYear(),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 Uu(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"});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 Uu(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"});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 Ku.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"});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 Uu(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=qu(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):Uu(a,t.length)},I:function(e,t,n){const r=Hu(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Uu(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=function(e){const t=au(e);return bu(t,Vu(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Uu(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Uu(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Uu(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return Uu(a,t.length);case"io":return n.ordinalNumber(a,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(a=12===r?Qu:0===r?zu:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(a=r>=17?Zu:r>=12?Gu:r>=4?Xu:Ju,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Uu(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Uu(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return nd(r);case"XXXX":case"XX":return rd(r);default:return rd(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nd(r);case"xxxx":case"xx":return rd(r);default:return rd(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+td(r,":");default:return"GMT"+rd(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+td(r,":");default:return"GMT"+rd(r,":")}},t:function(e,t,n){return Uu(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return Uu(e.getTime(),t.length)}};function td(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+t+Uu(o,2)}function nd(e,t){if(e%60==0){return(e>0?"-":"+")+Uu(Math.abs(e)/60,2)}return rd(e,t)}function rd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Uu(Math.trunc(r/60),2)+t+Uu(r%60,2)}const ad=(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"});default:return t.date({width:"full"})}},od=(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"});default:return t.time({width:"full"})}},id={p:od,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return ad(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",ad(r,t)).replace("{{time}}",od(a,t))}},sd=/^D+$/,ld=/^Y+$/,cd=["D","DD","YY","YYYY"];function ud(e){return sd.test(e)}function dd(e){return ld.test(e)}function pd(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),cd.includes(e))throw new RangeError(r)}function hd(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function md(e){if(!hd(e)&&"number"!=typeof e)return!1;const t=au(e);return!isNaN(Number(t))}const fd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yd=/^'([^]*?)'?$/,vd=/''/g,wd=/[a-zA-Z]/;function bd(e,t,n){const r=Mu(),a=n?.locale??r.locale??Yu,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=au(e);if(!md(s))throw new RangeError("Invalid time value");let l=t.match(gd).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,id[t])(e,a.formatLong)}return e})).join("").match(fd).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:xd(e)};if(ed[t])return{isToken:!0,value:e};if(t.match(wd))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));a.localize.preprocessor&&(l=a.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:a};return l.map((r=>{if(!r.isToken)return r.value;const o=r.value;(!n?.useAdditionalWeekYearTokens&&dd(o)||!n?.useAdditionalDayOfYearTokens&&ud(o))&&pd(o,t,String(e));return(0,ed[o[0]])(s,o,a.localize,c)})).join("")}function xd(e){const t=e.match(yd);return t?t[1].replace(vd,"'"):e}function kd(e){return au(e).getDate()}function Ed(e){return au(e).getHours()}function Dd(e){return au(e).getMinutes()}function Sd(e){return au(e).getMonth()}function Cd(e){return au(e).getSeconds()}function Td(e){return au(e).getTime()}function Md(e){return au(e).getFullYear()}function Pd(e,t){const n=au(e),r=au(t);return n.getTime()>r.getTime()}function Nd(e,t){return+au(e)<+au(t)}function Od(e){const t=au(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Ld(e,t){const n=+au(e),[r,a]=[+au(t.start),+au(t.end)].sort(((e,t)=>e-t));return n>=r&&n<=a}function Rd(e){let t;return e.forEach((function(e){const n=au(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}function Ad(e){let t;return e.forEach((e=>{const n=au(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}class _d{subPriority=0;validate(e,t){return!0}}class Fd extends _d{constructor(e,t,n,r,a){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,a&&(this.subPriority=a)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class Id extends _d{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:ou(e,function(e,t){const n=t instanceof Date?ou(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,Date))}}class Yd{run(e,t,n,r){const a=this.parse(e,t,n,r);return a?{setter:new Fd(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,n){return!0}}const Vd=/^(1[0-2]|0?\d)/,Bd=/^(3[0-1]|[0-2]?\d)/,Wd=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,jd=/^(5[0-3]|[0-4]?\d)/,Hd=/^(2[0-3]|[0-1]?\d)/,$d=/^(2[0-4]|[0-1]?\d)/,qd=/^(1[0-1]|0?\d)/,Ud=/^(1[0-2]|0?\d)/,Kd=/^[0-5]?\d/,zd=/^[0-5]?\d/,Qd=/^\d/,Xd=/^\d{1,2}/,Gd=/^\d{1,3}/,Zd=/^\d{1,4}/,Jd=/^-?\d+/,ep=/^-?\d/,tp=/^-?\d{1,2}/,np=/^-?\d{1,3}/,rp=/^-?\d{1,4}/,ap=/^([+-])(\d{2})(\d{2})?|Z/,op=/^([+-])(\d{2})(\d{2})|Z/,ip=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,sp=/^([+-])(\d{2}):(\d{2})|Z/,lp=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cp(e,t){return e?{value:t(e.value),rest:e.rest}:e}function up(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function dp(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,a=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(a*du+o*uu+1e3*i),rest:t.slice(n[0].length)}}function pp(e){return up(Jd,e)}function hp(e,t){switch(e){case 1:return up(Qd,t);case 2:return up(Xd,t);case 3:return up(Gd,t);case 4:return up(Zd,t);default:return up(new RegExp("^\\d{1,"+e+"}"),t)}}function mp(e,t){switch(e){case 1:return up(ep,t);case 2:return up(tp,t);case 3:return up(np,t);case 4:return up(rp,t);default:return up(new RegExp("^-?\\d{1,"+e+"}"),t)}}function fp(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gp(e,t){const n=t>0,r=n?t:1-t;let a;if(r<=50)a=e||100;else{const t=r+50;a=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?a:1-a}function yp(e){return e%400==0||e%4==0&&e%100!=0}const vp=[31,28,31,30,31,30,31,31,30,31,30,31],wp=[31,29,31,30,31,30,31,31,30,31,30,31];function bp(e,t,n){const r=Mu(),a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=au(e),i=o.getDay(),s=7-a;return iu(o,t<0||t>6?t-(i+s)%7:((t%7+7)%7+s)%7-(i+s)%7)}function xp(e,t){const n=au(e),r=function(e){let t=au(e).getDay();return 0===t&&(t=7),t}(n);return iu(n,t-r)}const kp={G:new class extends Yd{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends Yd{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return cp(hp(4,e),r);case"yo":return cp(n.ordinalNumber(e,{unit:"year"}),r);default:return cp(hp(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=gp(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const a="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}},Y:new class extends Yd{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return cp(hp(4,e),r);case"Yo":return cp(n.ordinalNumber(e,{unit:"year"}),r);default:return cp(hp(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const a=$u(e,r);if(n.isTwoDigitYear){const t=gp(n.year,a);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bu(e,r)}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bu(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends Yd{priority=130;parse(e,t){return mp("R"===t?4:t.length,e)}set(e,t,n){const r=ou(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wu(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends Yd{priority=130;parse(e,t){return mp("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends Yd{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return hp(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends Yd{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return hp(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends Yd{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return cp(up(Vd,e),r);case"MM":return cp(hp(2,e),r);case"Mo":return cp(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends Yd{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return cp(up(Vd,e),r);case"LL":return cp(hp(2,e),r);case"Lo":return cp(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends Yd{priority=100;parse(e,t,n){switch(t){case"w":return up(jd,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Bu(function(e,t,n){const r=au(e),a=qu(r,n)-t;return r.setDate(r.getDate()-7*a),r}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends Yd{priority=100;parse(e,t,n){switch(t){case"I":return up(jd,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Wu(function(e,t){const n=au(e),r=Hu(n)-t;return n.setDate(n.getDate()-7*r),n}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends Yd{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return up(Bd,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return hp(t.length,e)}}validate(e,t){const n=yp(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=wp[r]:t>=1&&t<=vp[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends Yd{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return up(Wd,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return hp(t.length,e)}}validate(e,t){return yp(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends Yd{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends Yd{priority=90;parse(e,t,n,r){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return cp(hp(t.length,e),a);case"eo":return cp(n.ordinalNumber(e,{unit:"day"}),a);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends Yd{priority=90;parse(e,t,n,r){const a=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return cp(hp(t.length,e),a);case"co":return cp(n.ordinalNumber(e,{unit:"day"}),a);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=bp(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends Yd{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return hp(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return cp(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return cp(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return cp(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return cp(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=xp(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends Yd{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(fp(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"h":return up(Ud,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"H":return up(Hd,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"K":return up(qd,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends Yd{priority=70;parse(e,t,n){switch(t){case"k":return up($d,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return hp(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends Yd{priority=60;parse(e,t,n){switch(t){case"m":return up(Kd,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends Yd{priority=50;parse(e,t,n){switch(t){case"s":return up(zd,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return hp(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends Yd{priority=30;parse(e,t){return cp(hp(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends Yd{priority=10;parse(e,t){switch(t){case"X":return dp(ap,e);case"XX":return dp(op,e);case"XXXX":return dp(ip,e);case"XXXXX":return dp(lp,e);default:return dp(sp,e)}}set(e,t,n){return t.timestampIsSet?e:ou(e,e.getTime()-wu(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends Yd{priority=10;parse(e,t){switch(t){case"x":return dp(ap,e);case"xx":return dp(op,e);case"xxxx":return dp(ip,e);case"xxxxx":return dp(lp,e);default:return dp(sp,e)}}set(e,t,n){return t.timestampIsSet?e:ou(e,e.getTime()-wu(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends Yd{priority=40;parse(e){return pp(e)}set(e,t,n){return[ou(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends Yd{priority=20;parse(e){return pp(e)}set(e,t,n){return[ou(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Ep=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sp=/^'([^]*?)'?$/,Cp=/''/g,Tp=/\S/,Mp=/[a-zA-Z]/;function Pp(e,t,n,r){const a=Object.assign({},Mu()),o=r?.locale??a.locale??Yu,i=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(""===t)return""===e?au(n):ou(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o},c=[new Id],u=t.match(Dp).map((e=>{const t=e[0];if(t in id){return(0,id[t])(e,o.formatLong)}return e})).join("").match(Ep),d=[];for(let a of u){!r?.useAdditionalWeekYearTokens&&dd(a)&&pd(a,t,e),!r?.useAdditionalDayOfYearTokens&&ud(a)&&pd(a,t,e);const i=a[0],s=kp[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=d.find((e=>t.includes(e.token)||e.token===i));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${a}\` at the same time`)}else if("*"===s.incompatibleTokens&&d.length>0)throw new RangeError(`The format string mustn't contain \`${a}\` and any other token at the same time`);d.push({token:i,fullToken:a});const r=s.run(e,a,o.match,l);if(!r)return ou(n,NaN);c.push(r.setter),e=r.rest}else{if(i.match(Mp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===a?a="'":"'"===i&&(a=a.match(Sp)[1].replace(Cp,"'")),0!==e.indexOf(a))return ou(n,NaN);e=e.slice(a.length)}}if(e.length>0&&Tp.test(e))return ou(n,NaN);const p=c.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>c.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let h=au(n);if(isNaN(h.getTime()))return ou(n,NaN);const m={};for(const e of p){if(!e.validate(h,l))return ou(n,NaN);const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return ou(n,h)}function Np(e,t){const n=function(e){const t={},n=e.split(Op.dateTimeDelimiter);let r;if(n.length>2)return t;/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Op.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Op.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length)));if(r){const e=Op.timezone.exec(r);e?(t.time=r.replace(e[1],""),t.timezone=e[1]):t.time=r}return t}(e);let r;if(n.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(n.date,2);r=function(e,t){if(null===t)return new Date(NaN);const n=e.match(Lp);if(!n)return new Date(NaN);const r=!!n[4],a=_p(n[1]),o=_p(n[2])-1,i=_p(n[3]),s=_p(n[4]),l=_p(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const a=r.getUTCDay()||7,o=7*(t-1)+n+1-a;return r.setUTCDate(r.getUTCDate()+o),r}(t,s,l):new Date(NaN);{const e=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Ip[t]||(Yp(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(Yp(e)?366:365)}(t,a)?(e.setUTCFullYear(t,o,Math.max(a,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);const a=r.getTime();let o,i=0;if(n.time&&(i=function(e){const t=e.match(Rp);if(!t)return NaN;const n=Fp(t[1]),r=Fp(t[2]),a=Fp(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,a))return NaN;return n*du+r*uu+1e3*a}(n.time),isNaN(i)))return new Date(NaN);if(!n.timezone){const e=new Date(a+i),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return o=function(e){if("Z"===e)return 0;const t=e.match(Ap);if(!t)return 0;const n="+"===t[1]?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,a))return NaN;return n*(r*du+a*uu)}(n.timezone),isNaN(o)?new Date(NaN):new Date(a+i+o)}const Op={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Lp=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rp=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ap=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _p(e){return e?parseInt(e):1}function Fp(e){return e&&parseFloat(e.replace(",","."))||0}const Ip=[31,null,31,30,31,30,31,31,30,31,30,31];function Yp(e){return e%400==0||e%4==0&&e%100!=0}function Vp(e,t){const n=au(e),r=n.getFullYear(),a=n.getDate(),o=ou(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const i=function(e){const t=au(e),n=t.getFullYear(),r=t.getMonth(),a=ou(e,0);return a.setFullYear(n,r+1,0),a.setHours(0,0,0,0),a.getDate()}(o);return n.setMonth(t,Math.min(a,i)),n}function Bp(e,t){const n=au(e);return n.setHours(t),n}function Wp(e,t){const n=au(e);return n.setMinutes(t),n}function jp(e,t){const n=au(e),r=t-(Math.trunc(n.getMonth()/3)+1);return Vp(n,n.getMonth()+3*r)}function Hp(e,t){const n=au(e);return n.setSeconds(t),n}function $p(e,t){const n=au(e);return isNaN(+n)?ou(e,NaN):(n.setFullYear(t),n)}function qp(e){const t=au(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Up(e,t){return hu(e,-t)}function Kp(e,t){return mu(e,-t)}function zp(e,t){return gu(e,-t)}function Qp(e,t){return yu(e,-t)}function Xp(e){return Jp(e)?(e.nodeName||"").toLowerCase():"#document"}function Gp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Zp(e){var t;return null==(t=(Jp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Jp(e){return e instanceof Node||e instanceof Gp(e).Node}function eh(e){return e instanceof Element||e instanceof Gp(e).Element}function th(e){return e instanceof HTMLElement||e instanceof Gp(e).HTMLElement}function nh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Gp(e).ShadowRoot)}function rh(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ch(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function ah(e){return["table","td","th"].includes(Xp(e))}function oh(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ih(e){const t=sh(),n=ch(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function sh(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function lh(e){return["html","body","#document"].includes(Xp(e))}function ch(e){return Gp(e).getComputedStyle(e)}function uh(e){return eh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dh(e){if("html"===Xp(e))return e;const t=e.assignedSlot||e.parentNode||nh(e)&&e.host||Zp(e);return nh(t)?t.host:t}function ph(e){const t=dh(e);return lh(t)?e.ownerDocument?e.ownerDocument.body:e.body:th(t)&&rh(t)?t:ph(t)}function hh(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=ph(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Gp(a);return o?t.concat(i,i.visualViewport||[],rh(a)?a:[],i.frameElement&&n?hh(i.frameElement):[]):t.concat(a,hh(a,[],n))}const mh=Math.min,fh=Math.max,gh=Math.round,yh=Math.floor,vh=e=>({x:e,y:e}),wh={left:"right",right:"left",bottom:"top",top:"bottom"},bh={start:"end",end:"start"};function xh(e,t,n){return fh(e,mh(t,n))}function kh(e,t){return"function"==typeof e?e(t):e}function Eh(e){return e.split("-")[0]}function Dh(e){return e.split("-")[1]}function Sh(e){return"y"===e?"height":"width"}function Ch(e){return["top","bottom"].includes(Eh(e))?"y":"x"}function Th(e){return"x"===Ch(e)?"y":"x"}function Mh(e){return e.replace(/start|end/g,(e=>bh[e]))}function Ph(e){return e.replace(/left|right|bottom|top/g,(e=>wh[e]))}function Nh(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Oh(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Lh(e,t,n){let{reference:r,floating:a}=e;const o=Ch(t),i=Th(t),s=Sh(i),l=Eh(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-a.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-a.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Dh(t)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1)}return h}function Rh(e){const t=ch(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=th(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=gh(n)!==o||gh(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function Ah(e){return eh(e)?e:e.contextElement}function _h(e){const t=Ah(e);if(!th(t))return vh(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=Rh(t);let i=(o?gh(n.width):n.width)/r,s=(o?gh(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Fh=vh(0);function Ih(e){const t=Gp(e);return sh()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Fh}function Yh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=Ah(e);let i=vh(1);t&&(r?eh(r)&&(i=_h(r)):i=_h(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Gp(e))&&t}(o,n,r)?Ih(o):vh(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=Gp(o),t=r&&eh(r)?Gp(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){const e=_h(a),t=a.getBoundingClientRect(),r=ch(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=Gp(a),a=n.frameElement}}return Oh({width:u,height:d,x:l,y:c})}function Vh(e){return Yh(Zp(e)).left+uh(e).scrollLeft}function Bh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Gp(e),r=Zp(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=sh();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Zp(e),n=uh(e),r=e.ownerDocument.body,a=fh(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=fh(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Vh(e);const s=-n.scrollTop;return"rtl"===ch(r).direction&&(i+=fh(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(Zp(e));else if(eh(t))r=function(e,t){const n=Yh(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=th(e)?_h(e):vh(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=Ih(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Oh(r)}function Wh(e,t){const n=dh(e);return!(n===t||!eh(n)||lh(n))&&("fixed"===ch(n).position||Wh(n,t))}function jh(e,t,n){const r=th(t),a=Zp(t),o="fixed"===n,i=Yh(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=vh(0);if(r||!r&&!o)if(("body"!==Xp(t)||rh(a))&&(s=uh(t)),r){const e=Yh(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=Vh(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function Hh(e){return"static"===ch(e).position}function $h(e,t){return th(e)&&"fixed"!==ch(e).position?t?t(e):e.offsetParent:null}function qh(e,t){const n=Gp(e);if(oh(e))return n;if(!th(e)){let t=dh(e);for(;t&&!lh(t);){if(eh(t)&&!Hh(t))return t;t=dh(t)}return n}let r=$h(e,t);for(;r&&ah(r)&&Hh(r);)r=$h(r,t);return r&&lh(r)&&Hh(r)&&!ih(r)?n:r||function(e){let t=dh(e);for(;th(t)&&!lh(t);){if(oh(t))return null;if(ih(t))return t;t=dh(t)}return null}(e)||n}const Uh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=Zp(r),s=!!t&&oh(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=vh(1);const u=vh(0),d=th(r);if((d||!d&&!o)&&(("body"!==Xp(r)||rh(i))&&(l=uh(r)),th(r))){const e=Yh(r);c=_h(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:Zp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o="clippingAncestors"===n?oh(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=hh(e,[],!1).filter((e=>eh(e)&&"body"!==Xp(e))),a=null;const o="fixed"===ch(e).position;let i=o?dh(e):e;for(;eh(i)&&!lh(i);){const t=ch(i),n=ih(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||rh(i)&&!n&&Wh(e,i))?r=r.filter((e=>e!==i)):a=t,i=dh(i)}return t.set(e,r),r}(t,this._c):[].concat(n),i=[...o,r],s=i[0],l=i.reduce(((e,n)=>{const r=Bh(t,n,a);return e.top=fh(r.top,e.top),e.right=mh(r.right,e.right),e.bottom=mh(r.bottom,e.bottom),e.left=fh(r.left,e.left),e}),Bh(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:qh,getElementRects:async function(e){const t=this.getOffsetParent||qh,n=this.getDimensions,r=await n(e.floating);return{reference:jh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Rh(e);return{width:t,height:n}},getScale:_h,isElement:eh,isRTL:function(e){return"rtl"===ch(e).direction}};function Kh(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ah(e),u=a||o?[...c?hh(c):[],...hh(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=Zp(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-yh(u)+"px "+-yh(a.clientWidth-(c+d))+"px "+-yh(a.clientHeight-(u+p))+"px "+-yh(c)+"px",threshold:fh(0,mh(1,l))||1};let m=!0;function f(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(f,{...h,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(f,h)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,m=null;i&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let f=l?Yh(e):null;return l&&function t(){const r=Yh(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n();f=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}const zh=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Eh(n),s=Dh(n),l="y"===Ch(n),c=["left","top"].includes(i)?-1:1,u=o&&l?-1:1,d=kh(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(h="end"===s?-1*m:m),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},Qh=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...g}=kh(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Eh(a),v=Ch(s),w=Eh(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!f?[Ph(s)]:function(e){const t=Ph(e);return[Mh(e),t,Mh(t)]}(s)),k="none"!==m;!p&&k&&x.push(...function(e,t,n,r){const a=Dh(e);let o=function(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:i;default:return[]}}(Eh(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(Mh)))),o}(s,f,m,b));const E=[s,...x],D=await async function(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=kh(t,e),m=Nh(h),f=s[p?"floating"===d?"reference":"floating":d],g=Oh(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(f)))||n?f:f.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),w=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},b=Oh(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}(t,g),S=[];let C=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(D[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Dh(e),a=Th(e),o=Sh(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Ph(i)),[i,Ph(i)]}(a,i,b);S.push(D[e[0]],D[e[1]])}if(C=[...C,{placement:a,overflows:S}],!S.every((e=>e<=0))){var T,M;const e=((null==(T=o.flip)?void 0:T.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(M=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Ch(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},Xh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=kh(e,t)||{};if(null==c)return{};const d=Nh(u),p={x:n,y:r},h=Th(a),m=Sh(h),f=await i.getDimensions(c),g="y"===h,y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=o.reference[m]+o.reference[h]-p[h]-o.floating[m],x=p[h]-o.reference[h],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=k?k[w]:0;E&&await(null==i.isElement?void 0:i.isElement(k))||(E=s.floating[w]||o.floating[m]);const D=b/2-x/2,S=E/2-f[m]/2-1,C=mh(d[y],S),T=mh(d[v],S),M=C,P=E-f[m]-T,N=E/2-f[m]/2+D,O=xh(M,N,P),L=!l.arrow&&null!=Dh(a)&&N!==O&&o.reference[m]/2-(N<M?C:T)-f[m]/2<0,R=L?N<M?N-M:N-P:0;return{[h]:p[h]+R,data:{[h]:O,centerOffset:N-O-R,...L&&{alignmentOffset:R}},reset:L}}}),Gh=(e,t,n)=>{const r=new Map,a={platform:Uh,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Lh(c,r,l),p=r,h={},m=0;for(let n=0;n<s.length;n++){const{name:o,fn:f}=s[n],{x:g,y:y,data:v,reset:w}=await f({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[o]:{...h[o],...v}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:u,y:d}=Lh(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var Zh="undefined"!=typeof document?s:r;function Jh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Jh(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!Jh(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function em(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tm(e,t){const n=em(e);return Math.round(t*n)/n}function nm(t){const n=e.useRef(t);return Zh((()=>{n.current=t})),n}const rm=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?Xh({element:n.current,padding:r}).fn(t):{}:n?Xh({element:n,padding:r}).fn(t):{};var a}}),am=(e,t)=>({...zh(e),options:[e,t]}),om=(e,t)=>({...rm(e),options:[e,t]}),im={...e},sm=im.useInsertionEffect||(e=>e());var lm="undefined"!=typeof document?s:r;function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cm.apply(this,arguments)}let um=!1,dm=0;const pm=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dm++;const hm=im.useId||function(){const[t,n]=e.useState((()=>um?pm():void 0));return lm((()=>{null==t&&n(pm())}),[]),e.useEffect((()=>{um=!0}),[]),t},mm=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:a},middlewareData:{arrow:o}},width:i=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:h,...m}={},...f}=t,g=hm(),[y,v]=e.useState(!1);if(lm((()=>{if(!a)return;"rtl"===ch(a).direction&&v(!0)}),[a]),!a)return null;const w=2*c,b=w/2,x=i/2*(l/-8+1),k=s/2*l/4,[E,D]=r.split("-"),S=!!p,C="top"===E||"bottom"===E,T=u&&"end"===D?"bottom":"top";let M=u&&"end"===D?"right":"left";u&&y&&(M="end"===D?"left":"right");const P=null!=(null==o?void 0:o.x)?u||o.x:"",N=null!=(null==o?void 0:o.y)?u||o.y:"",O=p||"M0,0 H"+i+" L"+(i-x)+","+(s-k)+" Q"+i/2+","+s+" "+x+","+(s-k)+" Z",L={top:S?"rotate(180deg)":"",left:S?"rotate(90deg)":"rotate(-90deg)",bottom:S?"":"rotate(180deg)",right:S?"rotate(-90deg)":"rotate(90deg)"}[E];return e.createElement("svg",cm({},f,{"aria-hidden":!0,ref:n,width:S?i:i+w,height:i,viewBox:"0 0 "+i+" "+(s>i?s:i),style:{position:"absolute",pointerEvents:"none",[M]:P,[T]:N,[E]:C||S?"100%":"calc(100% - "+w/2+"px)",transform:""+L+(null!=h?h:""),...m}}),w>0&&e.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:w+(p?0:1),d:O}),e.createElement("path",{stroke:w&&!p?f.fill:"none",d:O}),e.createElement("clipPath",{id:g},e.createElement("rect",{x:-b,y:b*(S?-1:1),width:i+w,height:i})))}));const fm=e.createContext(null),gm=e.createContext(null),ym=()=>{var t;return(null==(t=e.useContext(fm))?void 0:t.id)||null},vm=()=>e.useContext(gm);function wm(t){const{open:n=!1,onOpenChange:r,elements:a}=t,o=hm(),i=e.useRef({}),[s]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=ym(),[c,u]=e.useState(a.reference),d=function(t){const n=e.useRef((()=>{}));return sm((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}(((e,t,n)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)})),p=e.useMemo((()=>({setPositionReference:u})),[]),h=e.useMemo((()=>({reference:c||a.reference||null,floating:a.floating||null,domReference:a.reference})),[c,a.reference,a.floating]);return e.useMemo((()=>({dataRef:i,open:n,onOpenChange:d,elements:h,events:s,floatingId:o,refs:p})),[n,d,h,s,o,p])}function bm(t){void 0===t&&(t={});const{nodeId:n}=t,r=wm({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||r,o=a.elements,[i,s]=e.useState(null),[l,c]=e.useState(null),u=(null==o?void 0:o.reference)||i,d=e.useRef(null),p=vm();lm((()=>{u&&(d.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:a=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(a);Jh(h,a)||m(a);const[f,g]=e.useState(null),[y,v]=e.useState(null),w=e.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),b=e.useCallback((e=>{e!==D.current&&(D.current=e,v(e))}),[]),x=i||f,k=s||y,E=e.useRef(null),D=e.useRef(null),S=e.useRef(d),C=null!=c,T=nm(c),M=nm(o),P=e.useCallback((()=>{if(!E.current||!D.current)return;const e={placement:n,strategy:r,middleware:h};M.current&&(e.platform=M.current),Gh(E.current,D.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Jh(S.current,t)&&(S.current=t,A.flushSync((()=>{p(t)})))}))}),[h,n,r,M]);Zh((()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const N=e.useRef(!1);Zh((()=>(N.current=!0,()=>{N.current=!1})),[]),Zh((()=>{if(x&&(E.current=x),k&&(D.current=k),x&&k){if(T.current)return T.current(x,k,P);P()}}),[x,k,P,T,C]);const O=e.useMemo((()=>({reference:E,floating:D,setReference:w,setFloating:b})),[w,b]),L=e.useMemo((()=>({reference:x,floating:k})),[x,k]),R=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!L.floating)return e;const t=tm(L.floating,d.x),n=tm(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...em(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,L.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:P,refs:O,elements:L,floatingStyles:R})),[d,P,O,L,R])}({...t,elements:{...o,...l&&{reference:l}}}),m=e.useCallback((e=>{const t=eh(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),h.refs.setReference(t)}),[h.refs]),f=e.useCallback((e=>{(eh(e)||null===e)&&(d.current=e,s(e)),(eh(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!eh(e))&&h.refs.setReference(e)}),[h.refs]),g=e.useMemo((()=>({...h.refs,setReference:f,setPositionReference:m,domReference:d})),[h.refs,f,m]),y=e.useMemo((()=>({...h.elements,domReference:u})),[h.elements,u]),v=e.useMemo((()=>({...h,...a,refs:g,elements:y,nodeId:n})),[h,g,y,n,a]);return lm((()=>{a.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=v)})),e.useMemo((()=>({...h,context:v,refs:g,elements:y})),[h,g,y,v])}
|
|
2
2
|
/*!
|
|
3
3
|
react-datepicker v7.3.0
|
|
4
4
|
https://github.com/Hacker0x01/react-datepicker
|