groovinads-ui 1.9.835 → 1.9.836

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.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react"),t=require("react-bootstrap/Dropdown"),n=require("react/jsx-runtime"),r=require("js-cookie"),a=require("axios"),o=require("react-bootstrap"),i=require("react-dom"),s=require("react-bootstrap/Toast"),l=require("react-bootstrap/Container");function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=c(e),d=c(i);function p(){}function h(){}h.resetWarningCache=p;var m,f,g=(m=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:h,resetWarningCache:p};return n.PropTypes=n,n}()},m(f={exports:{}},f.exports),f.exports),y=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,v=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,w=/^(?:(min|max)-)?(.+)/,b=/(em|rem|px|cm|mm|in|pt|pc)?$/,x=/(dpi|dpcm|dppx)?$/;function k(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(y),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(v),n=t[1].toLowerCase().match(w);return{modifier:n[1],feature:n[2],value:t[2]}})),o}))}function E(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function D(e){var t=parseFloat(e);switch(String(e).match(x)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function S(e){var t=parseFloat(e);switch(String(e).match(b)[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 C={match:function(e,t){return k(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=S(a),o=S(o);break;case"resolution":a=D(a),o=D(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=E(a),o=E(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:k}.match,M="undefined"!=typeof window?window.matchMedia:null;function T(e,t,n){var r,a=this;function o(e){a.matches=e.matches,a.media=e.media}M&&!n&&(r=M.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(o)):(this.matches=C(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 P=function(e,t,n){return new T(e,t,n)},N=/[A-Z]/g,R=/^ms-/,O={};function L(e){return"-"+e.toLowerCase()}function A(e){if(O.hasOwnProperty(e))return O[e];var t=e.replace(N,L);return O[e]=R.test(t)?"-"+t:t}const _=g.oneOfType([g.string,g.number]),F={all:g.bool,grid:g.bool,aural:g.bool,braille:g.bool,handheld:g.bool,print:g.bool,projection:g.bool,screen:g.bool,tty:g.bool,tv:g.bool,embossed:g.bool},I={orientation:g.oneOf(["portrait","landscape"]),scan:g.oneOf(["progressive","interlace"]),aspectRatio:g.string,deviceAspectRatio:g.string,height:_,deviceHeight:_,width:_,deviceWidth:_,color:g.bool,colorIndex:g.bool,monochrome:g.bool,resolution:_,type:Object.keys(F)},{type:Y,...V}=I,B={minAspectRatio:g.string,maxAspectRatio:g.string,minDeviceAspectRatio:g.string,maxDeviceAspectRatio:g.string,minHeight:_,maxHeight:_,minDeviceHeight:_,maxDeviceHeight:_,minWidth:_,maxWidth:_,minDeviceWidth:_,maxDeviceWidth:_,minColor:g.number,maxColor:g.number,minColorIndex:g.number,maxColorIndex:g.number,minMonochrome:g.number,maxMonochrome:g.number,minResolution:_,maxResolution:_,...V};var W={all:{...F,...B},types:F,matchers:I,features:B};const j=e=>{const t=[];return Object.keys(W.all).forEach((n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=A(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))})),t.join(" and ")},H=e.createContext(void 0),$=e=>{if(!e)return;return Object.keys(e).reduce(((t,n)=>(t[A(n)]=e[n],t)),{})},q=()=>{const t=e.useRef(!1);return e.useEffect((()=>{t.current=!0}),[]),t.current},U=t=>{const n=e.useContext(H),r=()=>$(t)||$(n),[a,o]=e.useState(r);return e.useEffect((()=>{const e=r();(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)||o(e)}),[t,n]),a},K=t=>{const n=()=>(e=>e.query||j(e))(t),[r,a]=e.useState(n);return e.useEffect((()=>{const e=n();r!==e&&a(e)}),[t]),r},z=(t,n,r)=>{const a=U(n),o=K(t);if(!o)throw new Error("Invalid or missing MediaQuery!");const i=((t,n)=>{const r=()=>P(t,n||{},!!n),[a,o]=e.useState(r),i=q();return e.useEffect((()=>{if(i){const e=r();return o(e),()=>{e&&e.dispose()}}}),[t,n]),a})(o,a),s=(t=>{const[n,r]=e.useState(t.matches);return e.useEffect((()=>{const e=e=>{r(e.matches)};return t.addListener(e),r(t.matches),()=>{t.removeListener(e)}}),[t]),n})(i),l=q();return e.useEffect((()=>{l&&r&&r(s)}),[s]),e.useEffect((()=>()=>{i&&i.dispose()}),[]),s},Q=({animation:t="",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(t){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 e.createElement("i",{className:`${i} ${s} ${l} ${c} ${n}`,"aria-hidden":"true"})};Q.propTypes={animation:g.oneOf(["beat","fade","beat-fade","bounce","flip","shake","spin","spin-reverse"]),className:g.string,name:g.string,scale:g.oneOf([.7,1,2,3,4]),style:g.oneOf(["light","solid","regular","thin","duotone","sharp","brands"])};const X=({animation:t=!1,children:n,className:r="",icon:a=!0,onClose:o=null,size:i="md",type:s="info"})=>e.createElement("div",{className:`alert ${t?"alert-animation":""} alert-${s} alert-${i} ${r}`,role:"alert"},e.createElement("div",{className:"alert-wrapper"},a&&e.createElement(Q,{style:"solid",name:{info:"circle-info",success:"check",warning:"triangle-exclamation",danger:"circle-xmark"}[s]}),e.createElement("span",null,n)),o&&e.createElement("button",{onClick:o,className:"btn-close"},e.createElement(Q,{style:"solid",name:"xmark"})));X.propTypes={animation:g.bool,children:g.node.isRequired,className:g.string,icon:g.bool,onClose:g.func,size:g.oneOf(["xs","md","lg"]),type:g.oneOf(["warning","danger","success","info"]).isRequired};const G=({as:t="",className:n="",onChange:r,onSave:a,value:o})=>{const[i,s]=e.useState(!1),[l,c]=e.useState(o),[u,d]=e.useState(!1),[p,h]=e.useState(!1),[m,f]=e.useState({}),g=e.useRef(null),y=e.useRef(null),v=async e=>{try{if(""===e.trim())return r(l),void s(!1);await a(e),d(!0),s(!1),setTimeout((()=>{d(!1)}),2e3)}catch(e){throw h(!0),s(!1),setTimeout((()=>{h(!1)}),2e3),e}};e.useEffect((()=>{i&&g.current&&g.current.focus()}),[i]),e.useEffect((()=>{if(y.current&&!i){const e=window.getComputedStyle(y.current),t=parseFloat(e.width)+2*parseFloat(e.fontSize);f({fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,width:`${t}px`})}}),[i]);const w=()=>e.createElement("svg",{className:"success-check-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7.07",stroke:"currentColor",strokeWidth:"1.4",className:"success-circle"}),e.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 e.createElement("div",{className:`editable-content ${u?"success":""} ${n}`,onClick:()=>{u||(c(o),s(!0))}},i?e.createElement("input",{type:"text",value:o,ref:g,onBlur:()=>{s(!1),o!==l&&v(o)},onChange:({target:e})=>{r(e.value)},onKeyDown:e=>{"Enter"===e.key?(v(o),s(!1)):"Escape"===e.key&&(r(l),s(!1))},style:m}):e.createElement("div",{className:"editable-content-display",style:{fontSize:m.fontSize}},e.createElement(t,{className:p?"error":"",ref:y},o),u&&e.createElement("div",{className:"success-animation"},e.createElement(w,null))))};G.propTypes={as:g.string.isRequired,className:g.string,onChange:g.func.isRequired,onSave:g.func.isRequired,value:g.string};const Z=({logo:t="groovinads",className:n=""})=>e.createElement("div",{className:`login-source ${t||""} ${n}`,"aria-label":`${t} logo`});Z.propTypes={className:g.string,logo:g.oneOf(["groovinads","google","microsoft","linkedin","slack"])};const J=({children:t,className:n="",closeButton:r=!1,color:a="neutral",disabled:o=!1,onClick:i})=>e.createElement("div",{className:`pill ${a} ${n} ${o?"disabled":""}`},e.createElement("span",null,t),r&&e.createElement("button",{onClick:i},e.createElement(Q,{style:"solid",name:"xmark",scale:.7})));J.propTypes={className:g.string,closeButton:g.bool,color:g.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),disabled:g.bool,onClick:g.func};const ee=({className:t="",scale:n=1})=>e.createElement(Q,{name:"spinner-third",scale:n,animation:"spin",className:t});ee.propTypes={className:g.string,scale:g.oneOf([.7,1,2,3,4])};const te=({animated:t=!1,className:n="",status:r=0})=>e.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} ${t?"animated":""}`},e.createElement("circle",{cx:3===r?"12":"8",cy:"8",r:"8"}),(()=>{switch(r){case 1:return e.createElement(e.Fragment,null,e.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),e.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 e.createElement(e.Fragment,null,e.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"}),e.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"}),e.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"}),e.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}})());te.propTypes={animated:g.bool,className:g.string,status:g.number.isRequired};const ne=({children:t,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=z({query:"(max-width: 768px)"}),h=s?e.createElement(e.Fragment,null,e.createElement(ee,{scale:1}),t&&e.createElement("span",null,t,"…")):e.createElement(e.Fragment,null,c&&e.createElement(Q,{style:"solid",name:c,scale:1}),t&&!(p&&o)&&e.createElement("span",null,t),a&&e.createElement(Q,{style:"solid",name:a,scale:1}));return e.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 re(){return re=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},re.apply(null,arguments)}ne.propTypes={children:g.node,className:g.string,disabled:g.bool,endIcon:g.string,hideLabelOnMobile:g.bool,onClick:g.func,processing:g.bool,size:g.oneOf(["xs","md","lg"]),startIcon:g.string,style:g.oneOf(["default","success","danger","warning","link"]),variant:g.oneOf(["primary","secondary","terciary","outline"])};const ae=e.createContext({});const oe="undefined"!=typeof window,ie=oe?e.useLayoutEffect:e.useEffect,se=e.createContext(null);function le(e,t){-1===e.indexOf(t)&&e.push(t)}function ce(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ue=(e,t,n)=>n>t?t:n<e?e:n;let de=()=>{};const pe={},he=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function me(e){return"object"==typeof e&&null!==e}const fe=e=>/^0[^.\s]+$/u.test(e);function ge(e){let t;return()=>(void 0===t&&(t=e()),t)}const ye=e=>e,ve=(e,t)=>n=>t(e(n)),we=(...e)=>e.reduce(ve),be=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class xe{constructor(){this.subscriptions=[]}add(e){return le(this.subscriptions,e),()=>ce(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 ke=e=>1e3*e,Ee=e=>e/1e3;function De(e,t){return t?e*(1e3/t):0}const Se=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ce=1e-7,Me=12;function Te(e,t,n,r){if(e===t&&n===r)return ye;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=Se(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>Ce&&++s<Me);return i}(t,0,1,e,n);return e=>0===e||1===e?e:Se(a(e),t,r)}const Pe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ne=e=>t=>1-e(1-t),Re=Te(.33,1.53,.69,.99),Oe=Ne(Re),Le=Pe(Oe),Ae=e=>(e*=2)<1?.5*Oe(e):.5*(2-Math.pow(2,-10*(e-1))),_e=e=>1-Math.sin(Math.acos(e)),Fe=Ne(_e),Ie=Pe(_e),Ye=Te(.42,0,1,1),Ve=Te(0,0,.58,1),Be=Te(.42,0,.58,1),We=e=>Array.isArray(e)&&"number"==typeof e[0],je={linear:ye,easeIn:Ye,easeInOut:Be,easeOut:Ve,circIn:_e,circInOut:Ie,circOut:Fe,backIn:Oe,backInOut:Le,backOut:Re,anticipate:Ae},He=e=>{if(We(e)){de(4===e.length);const[t,n,r,a]=e;return Te(t,n,r,a)}return"string"==typeof e?(de(void 0!==je[e]),je[e]):e},$e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],qe={value:null,addProjectionMetrics:null};function Ue(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=$e.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&&qe.value&&qe.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=pe.useManualTiming?a.timestamp:performance.now();n=!1,pe.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:$e.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<$e.length;t++)i[$e[t]].cancel(e)},state:a,steps:i}}const{schedule:Ke,cancel:ze,state:Qe,steps:Xe}=Ue("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ye,!0);let Ge;function Ze(){Ge=void 0}const Je={now:()=>(void 0===Ge&&Je.set(Qe.isProcessing||pe.useManualTiming?Qe.timestamp:performance.now()),Ge),set:e=>{Ge=e,queueMicrotask(Ze)}},et=e=>t=>"string"==typeof t&&t.startsWith(e),tt=et("--"),nt=et("var(--"),rt=e=>!!nt(e)&&at.test(e.split("/*")[0].trim()),at=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ot={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},it={...ot,transform:e=>ue(0,1,e)},st={...ot,default:1},lt=e=>Math.round(1e5*e)/1e5,ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ut=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(e,t)=>n=>Boolean("string"==typeof n&&ut.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),pt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(ct);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},ht={...ot,transform:e=>Math.round((e=>ue(0,255,e))(e))},mt={test:dt("rgb","red"),parse:pt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ht.transform(e)+", "+ht.transform(t)+", "+ht.transform(n)+", "+lt(it.transform(r))+")"};const ft={test:dt("#"),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:mt.transform},gt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),yt=gt("deg"),vt=gt("%"),wt=gt("px"),bt=gt("vh"),xt=gt("vw"),kt=(()=>({...vt,parse:e=>vt.parse(e)/100,transform:e=>vt.transform(100*e)}))(),Et={test:dt("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vt.transform(lt(t))+", "+vt.transform(lt(n))+", "+lt(it.transform(r))+")"},Dt={test:e=>mt.test(e)||ft.test(e)||Et.test(e),parse:e=>mt.test(e)?mt.parse(e):Et.test(e)?Et.parse(e):ft.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?mt.transform(e):Et.transform(e),getAnimatableNone:e=>{const t=Dt.parse(e);return t.alpha=0,Dt.transform(t)}},St=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Ct="number",Mt="color",Tt="var",Pt="var(",Nt="${}",Rt=/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 Ot(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const i=t.replace(Rt,(e=>(Dt.test(e)?(r.color.push(o),a.push(Mt),n.push(Dt.parse(e))):e.startsWith(Pt)?(r.var.push(o),a.push(Tt),n.push(e)):(r.number.push(o),a.push(Ct),n.push(parseFloat(e))),++o,Nt))).split(Nt);return{values:n,split:i,indexes:r,types:a}}function Lt(e){return Ot(e).values}function At(e){const{split:t,types:n}=Ot(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===Ct?lt(e[o]):t===Mt?Dt.transform(e[o]):e[o]}return a}}const _t=e=>"number"==typeof e?0:Dt.test(e)?Dt.getAnimatableNone(e):e;const Ft={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ct)?.length||0)+(e.match(St)?.length||0)>0},parse:Lt,createTransformer:At,getAnimatableNone:function(e){const t=Lt(e);return At(e)(t.map(_t))}};function It(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 Yt(e,t){return n=>n>0?t:e}const Vt=(e,t,n)=>e+(t-e)*n,Bt=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},Wt=[ft,mt,Et];function jt(e){const t=(n=e,Wt.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Et&&(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=It(s,r,e+1/3),o=It(s,r,e),i=It(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 Ht=(e,t)=>{const n=jt(e),r=jt(t);if(!n||!r)return Yt(e,t);const a={...n};return e=>(a.red=Bt(n.red,r.red,e),a.green=Bt(n.green,r.green,e),a.blue=Bt(n.blue,r.blue,e),a.alpha=Vt(n.alpha,r.alpha,e),mt.transform(a))},$t=new Set(["none","hidden"]);function qt(e,t){return n=>Vt(e,t,n)}function Ut(e){return"number"==typeof e?qt:"string"==typeof e?rt(e)?Yt:Dt.test(e)?Ht:Qt:Array.isArray(e)?Kt:"object"==typeof e?Dt.test(e)?Ht:zt:Yt}function Kt(e,t){const n=[...e],r=n.length,a=e.map(((e,n)=>Ut(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function zt(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=Ut(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Qt=(e,t)=>{const n=Ft.createTransformer(t),r=Ot(e),a=Ot(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?$t.has(e)&&!a.values.length||$t.has(t)&&!r.values.length?function(e,t){return $t.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):we(Kt(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):Yt(e,t)};function Xt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Vt(e,t,n);return Ut(e)(e,t)}const Gt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ke.update(t,e),stop:()=>ze(t),now:()=>Qe.isProcessing?Qe.timestamp:Je.now()}},Zt=(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)})`},Jt=2e4;function en(e){let t=0;let n=e.next(t);for(;!n.done&&t<Jt;)t+=50,n=e.next(t);return t>=Jt?1/0:t}const tn=5;function nn(e,t,n){const r=Math.max(t-tn,0);return De(n-e(r),t-r)}const rn={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},an=.001;function on({duration:e=rn.duration,bounce:t=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let a,o,i=1-t;i=ue(rn.minDamping,rn.maxDamping,i),e=ue(rn.minDuration,rn.maxDuration,Ee(e)),i<1?(a=t=>{const r=t*i,a=r*e,o=r-n,s=ln(t,i),l=Math.exp(-a);return an-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=ln(Math.pow(t,2),i);return(-a(t)+an>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-an,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<sn;n++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=ke(e),isNaN(s))return{stiffness:rn.stiffness,damping:rn.damping,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}const sn=12;function ln(e,t){return e*Math.sqrt(1-t*t)}const cn=["duration","bounce"],un=["stiffness","damping","mass"];function dn(e,t){return t.some((t=>void 0!==e[t]))}function pn(e=rn.visualDuration,t=rn.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:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...e};if(!dn(e,un)&&dn(e,cn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*ue(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:rn.mass,stiffness:a,damping:o}}else{const n=on(e);t={...t,...n,mass:rn.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ee(n.velocity||0)}),m=p||0,f=c/(2*Math.sqrt(l*u)),g=i-o,y=Ee(Math.sqrt(l/u)),v=Math.abs(g)<5;let w;if(r||(r=v?rn.restSpeed.granular:rn.restSpeed.default),a||(a=v?rn.restDelta.granular:rn.restDelta.default),f<1){const e=ln(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?ke(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(en(b),Jt),t=Zt((t=>b.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return b}function hn({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=pn({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 mn(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(de(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||pe.mix||Xt,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]||ye:t;o=we(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=be(e[r],e[r+1],n);return s[r](a)};return n?t=>c(ue(e[0],e[o-1],t)):c}function fn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=be(0,t,r);e.push(Vt(n,1,a))}}(t,e.length-1),t}function gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(He):He(r),o={done:!1,value:t[0]},i=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:fn(t),e),s=mn(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map((()=>c||Be)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}pn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(en(r),Jt);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:Ee(a)}}(e,100,pn);return e.ease=t.ease,e.duration=ke(t.duration),e.type="keyframes",e};const yn=e=>null!==e;function vn(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(yn),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const wn={decay:hn,inertia:hn,tween:gn,keyframes:gn,spring:pn};function bn(e){"string"==typeof e.type&&(e.type=wn[e.type])}class xn{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 kn=e=>e/100;class En extends xn{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!==Je.now()&&this.tick(Je.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;bn(e);const{type:t=gn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||gn;s!==gn&&"number"!=typeof i[0]&&(this.mixKeyframes=we(kn,Xt(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=en(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=ue(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!==hn&&(b.value=vn(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 Ee(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ee(e)}get time(){return Ee(this.currentTime)}set time(e){e=ke(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(Je.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ee(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Gt,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(Je.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 Dn=e=>180*e/Math.PI,Sn=e=>{const t=Dn(Math.atan2(e[1],e[0]));return Mn(t)},Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sn,rotateZ:Sn,skewX:e=>Dn(Math.atan(e[1])),skewY:e=>Dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Mn=e=>((e%=360)<0&&(e+=360),e),Tn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Pn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Nn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:Pn,scale:e=>(Tn(e)+Pn(e))/2,rotateX:e=>Mn(Dn(Math.atan2(e[6],e[5]))),rotateY:e=>Mn(Dn(Math.atan2(-e[2],e[0]))),rotateZ:Sn,rotate:Sn,skewX:e=>Dn(Math.atan(e[4])),skewY:e=>Dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Rn(e){return e.includes("scale")?1:0}function On(e,t){if(!e||"none"===e)return Rn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Nn,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Cn,a=t}if(!a)return Rn(t);const o=r[t],i=a[1].split(",").map(Ln);return"function"==typeof o?o(i):i[o]}function Ln(e){return parseFloat(e.trim())}const An=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_n=(()=>new Set(An))(),Fn=e=>e===ot||e===wt,In=new Set(["x","y","z"]),Yn=An.filter((e=>!In.has(e)));const Vn={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})=>On(t,"x"),y:(e,{transform:t})=>On(t,"y")};Vn.translateX=Vn.x,Vn.translateY=Vn.y;const Bn=new Set;let Wn=!1,jn=!1,Hn=!1;function $n(){if(jn){const e=Array.from(Bn).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 Yn.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)}))}jn=!1,Wn=!1,Bn.forEach((e=>e.complete(Hn))),Bn.clear()}function qn(){Bn.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(jn=!0)}))}class Un{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?(Bn.add(this),Wn||(Wn=!0,Ke.read(qn),Ke.resolveKeyframes($n))):(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),Bn.delete(this)}cancel(){"scheduled"===this.state&&(Bn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Kn=ge((()=>void 0!==window.ScrollTimeline)),zn={};function Qn(e,t){const n=ge(e);return()=>zn[t]??n()}const Xn=Qn((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function Jn(e,t){return e?"function"==typeof e?Xn()?Zt(e,t):"ease-out":We(e)?Gn(e):Array.isArray(e)?e.map((e=>Jn(e,t)||Zn.easeOut)):Zn[e]:void 0}function er(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=Jn(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 tr(e){return"function"==typeof e&&"applyToOptions"in e}class nr extends xn{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,de("string"!=typeof e.type);const l=function({type:e,...t}){return tr(e)&&Xn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=er(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=vn(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 Ee(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ee(e)}get time(){return Ee(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ke(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&&Kn()?(this.animation.timeline=e,ye):t(this)}}const rr={anticipate:Ae,backInOut:Le,circInOut:Ie};function ar(e){"string"==typeof e.ease&&e.ease in rr&&(e.ease=rr[e.ease])}class or extends nr{constructor(e){ar(e),bn(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 En({...o,autoplay:!1}),s=ke(this.finishedTime??this.time);t.setWithVelocity(i.sample(s-10).value,i.sample(s).value,10),i.stop()}}const ir=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ft.test(e)&&"0"!==e||e.startsWith("url(")));function sr(e){e.duration=0,e.type="keyframes"}const lr=new Set(["opacity","clipPath","filter","transform"]),cr=ge((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class ur extends xn{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=Je.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||Un;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=Je.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=ir(a,t),s=ir(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||tr(n))&&r)}(e,a,o,i)||(!pe.instantAnimations&&s||c?.(vn(e,n,t)),e[0]=e[e.length-1],sr(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 cr()&&n&&lr.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}(u)?new or({...u,element:u.motionValue.owner.current}):new En(u);d.finished.then((()=>this.notifyFinished())).catch(ye),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(),Hn=!0,qn(),$n(),Hn=!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 dr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pr(e,t,n=1){const[r,a]=function(e){const t=dr.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 he(e)?parseFloat(e):e}return rt(a)?pr(a,t,n+1):a}function hr(e,t){return e?.[t]??e?.default??e}const mr=new Set(["width","height","top","left","right","bottom",...An]),fr=e=>t=>t.test(e),gr=[ot,wt,vt,yt,xt,bt,{test:e=>"auto"===e,parse:e=>e}],yr=e=>gr.find(fr(e));const vr=new Set(["brightness","contrast","saturate","opacity"]);function wr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ct)||[];if(!r)return e;const a=n.replace(r,"");let o=vr.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const br=/\b([a-z-]*)\(.*?\)/gu,xr={...Ft,getAnimatableNone:e=>{const t=e.match(br);return t?t.map(wr).join(" "):e}},kr={...ot,transform:Math.round},Er={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,backgroundPositionX:wt,backgroundPositionY:wt,...{rotate:yt,rotateX:yt,rotateY:yt,rotateZ:yt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:yt,skewX:yt,skewY:yt,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:it,originX:kt,originY:kt,originZ:wt},zIndex:kr,fillOpacity:it,strokeOpacity:it,numOctaves:kr},Dr={...Er,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:xr,WebkitFilter:xr},Sr=e=>Dr[e];function Cr(e,t){let n=Sr(e);return n!==xr&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Mr=new Set(["auto","none","0"]);class Tr extends Un{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(),rt(r))){const a=pr(r,t.current);void 0!==a&&(e[n]=a),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!mr.has(n)||2!==e.length)return;const[r,a]=e,o=yr(r),i=yr(a);if(o!==i)if(Fn(o)&&Fn(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else Vn[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||fe(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&&!Mr.has(t)&&Ot(t).values.length&&(r=e[a]),a++}if(r&&n)for(const a of t)e[a]=Cr(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=Vn[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]=Vn[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 Pr=(e,t)=>t&&"number"==typeof e?t.transform(e):e;class Nr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Je.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=Je.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 xe);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ke.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=Je.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return De(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 Rr(e,t){return new Nr(e,t)}const{schedule:Or,cancel:Lr}=Ue(queueMicrotask,!1),Ar={x:!1,y:!1};function _r(){return Ar.x||Ar.y}function Fr(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 Ir(e){return!("touch"===e.pointerType||_r())}const Yr=(e,t)=>!!t&&(e===t||Yr(e,t.parentElement)),Vr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Br=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Wr=new WeakSet;function jr(e){return t=>{"Enter"===t.key&&e(t)}}function Hr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function $r(e){return Vr(e)&&!_r()}function qr(e,t,n={}){const[r,a,o]=Fr(e,n),i=e=>{const r=e.currentTarget;if(!$r(e))return;Wr.add(r);const o=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Wr.has(r)&&Wr.delete(r),$r(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Yr(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),me(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=jr((()=>{if(Wr.has(n))return;Hr(n,"down");const e=jr((()=>{Hr(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Hr(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,a))),function(e){return Br.has(e.tagName)||-1!==e.tabIndex}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}function Ur(e){return me(e)&&"ownerSVGElement"in e}const Kr=e=>Boolean(e&&e.getVelocity),zr=[...gr,Dt,Ft],Qr=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});const Xr=e.createContext({strict:!1}),Gr={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"]},Zr={};for(const e in Gr)Zr[e]={isEnabled:t=>Gr[e].some((e=>!!t[e]))};const Jr=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 ea(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Jr.has(e)}let ta=e=>!ea(e);try{"function"==typeof(na=require("@emotion/is-prop-valid").default)&&(ta=e=>e.startsWith("on")?!ea(e):na(e))}catch{}var na;const ra=e.createContext({});function aa(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function oa(e){return"string"==typeof e||Array.isArray(e)}const ia=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sa=["initial",...ia];function la(e){return aa(e.animate)||sa.some((t=>oa(e[t])))}function ca(e){return Boolean(la(e)||e.variants)}function ua(t){const{initial:n,animate:r}=function(e,t){if(la(e)){const{initial:t,animate:n}=e;return{initial:!1===t||oa(t)?t:void 0,animate:oa(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(ra));return e.useMemo((()=>({initial:n,animate:r})),[da(n),da(r)])}function da(e){return Array.isArray(e)?e.join(" "):e}const pa={};function ha(e,{layout:t,layoutId:n}){return _n.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!pa[e]||"opacity"===e)}const ma={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fa=An.length;function ga(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(_n.has(e))i=!0;else if(tt(e))a[e]=n;else{const t=Pr(n,Er[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<fa;o++){const i=An[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=Pr(s,Er[i]);l||(a=!1,r+=`${ma[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 ya=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function va(e,t,n){for(const r in t)Kr(t[r])||ha(r,n)||(e[r]=t[r])}function wa(t,n){const r={};return va(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo((()=>{const e=ya();return ga(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}function ba(e,t){const n={},r=wa(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 xa={offset:"stroke-dashoffset",array:"stroke-dasharray"},ka={offset:"strokeDashoffset",array:"strokeDasharray"};function Ea(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,u){if(ga(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?xa:ka;e[o.offset]=wt.transform(-r);const i=wt.transform(t),s=wt.transform(n);e[o.array]=`${i} ${s}`}(d,a,o,i,!1)}const Da=()=>({...ya(),attrs:{}}),Sa=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ca(t,n,r,a){const o=e.useMemo((()=>{const e=Da();return Ea(e,n,Sa(a),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};va(e,t.style,t),o.style={...e,...o.style}}return o}const Ma=["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 Ta(e){return"string"==typeof e&&!e.includes("-")&&!!(Ma.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pa(t,n,r,{latestValues:a},o,i=!1){const s=(Ta(t)?Ca:ba)(n,a,o,t),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(ta(a)||!0===n&&ea(a)||!t&&!ea(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(n,"string"==typeof t,i),c=t!==e.Fragment?{...l,...s,ref:r}:{},{children:u}=n,d=e.useMemo((()=>Kr(u)?u.get():u),[u]);return e.createElement(t,{...c,children:d})}function Na(e){const t=[{},{}];return e?.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Ra(e,t,n,r){if("function"==typeof t){const[a,o]=Na(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]=Na(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function Oa(e){return Kr(e)?e.get():e}function La(e,t,n,r){const a={},o=r(e,{});for(const e in o)a[e]=Oa(o[e]);let{initial:i,animate:s}=e;const l=la(e),c=ca(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&&!aa(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ra(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 Aa=t=>(n,r)=>{const a=e.useContext(ra),o=e.useContext(se),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:La(n,r,a,e),renderState:t()}}(t,n,a,o);return r?i():function(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}(i)};function _a(e,t,n){const{style:r}=e,a={};for(const o in r)(Kr(r[o])||t.style&&Kr(t.style[o])||ha(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}const Fa=Aa({scrapeMotionValuesFromProps:_a,createRenderState:ya});function Ia(e,t,n){const r=_a(e,t,n);for(const n in e)if(Kr(e[n])||Kr(t[n])){r[-1!==An.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}const Ya=Aa({scrapeMotionValuesFromProps:Ia,createRenderState:Da}),Va=Symbol.for("motionComponentSymbol");function Ba(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Wa(t,n,r){return e.useCallback((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):Ba(r)&&(r.current=e))}),[n])}const ja=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ha="data-"+ja("framerAppearId"),$a=e.createContext({});function qa(t,n,r,a,o){const{visualElement:i}=e.useContext(ra),s=e.useContext(Xr),l=e.useContext(se),c=e.useContext(Qr).reducedMotion,u=e.useRef(null);a=a||s.renderer,!u.current&&a&&(u.current=a(t,{visualState:n,parent:i,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const d=u.current,p=e.useContext($a);!d||d.projection||!o||"html"!==d.type&&"svg"!==d.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:Ua(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&Ba(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(u.current,r,o,p);const h=e.useRef(!1);e.useInsertionEffect((()=>{d&&h.current&&d.update(r,l)}));const m=r[Ha],f=e.useRef(Boolean(m)&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ie((()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),f.current&&d.animationState&&d.animationState.animateChanges())})),e.useEffect((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(m)})),f.current=!1),d.enteringChildren=void 0)})),d}function Ua(e){if(e)return!1!==e.options.allowProjection?e.projection:Ua(e.parent)}function Ka(t,{forwardMotionProps:r=!1}={},a,o){a&&function(e){for(const t in e)Zr[t]={...Zr[t],...e[t]}}(a);const i=Ta(t)?Ya:Fa;function s(a,s){let l;const c={...e.useContext(Qr),...a,layoutId:za(a)},{isStatic:u}=c,d=ua(a),p=i(a,u);if(!u&&oe){e.useContext(Xr).strict;const n=function(e){const{drag:t,layout:n}=Zr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=n.MeasureLayout,d.visualElement=qa(t,p,c,o,n.ProjectionNode)}return n.jsxs(ra.Provider,{value:d,children:[l&&d.visualElement?n.jsx(l,{visualElement:d.visualElement,...c}):null,Pa(t,a,Wa(p,d.visualElement,s),p,u,r)]})}s.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const l=e.forwardRef(s);return l[Va]=t,l}function za({layoutId:t}){const n=e.useContext(ae).id;return n&&void 0!==t?n+"-"+t:t}function Qa(e,t){if("undefined"==typeof Proxy)return Ka;const n=new Map,r=(n,r)=>Ka(n,r,e,t);return new Proxy(((e,t)=>r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,Ka(o,void 0,e,t)),n.get(o))})}function Xa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ga(e){return void 0===e||1===e}function Za({scale:e,scaleX:t,scaleY:n}){return!Ga(e)||!Ga(t)||!Ga(n)}function Ja(e){return Za(e)||eo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eo(e){return to(e.x)||to(e.y)}function to(e){return e&&"0%"!==e}function no(e,t,n){return n+t*(e-n)}function ro(e,t,n,r,a){return void 0!==a&&(e=no(e,a,r)),no(e,n,r)+t}function ao(e,t=0,n=1,r,a){e.min=ro(e.min,t,n,r,a),e.max=ro(e.max,t,n,r,a)}function oo(e,{x:t,y:n}){ao(e.x,t.translate,t.scale,t.originPoint),ao(e.y,n.translate,n.scale,n.originPoint)}const io=.999999999999,so=1.0000000000001;function lo(e,t){e.min=e.min+t,e.max=e.max+t}function co(e,t,n,r,a=.5){ao(e,t,n,Vt(e.min,e.max,a),r)}function uo(e,t){co(e.x,t.x,t.scaleX,t.scale,t.originX),co(e.y,t.y,t.scaleY,t.scale,t.originY)}function po(e,t){return Xa(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 ho=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),mo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),fo={current:null},go={current:!1};const yo=new WeakMap;const vo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class wo{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=Un,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=Je.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ke.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=la(t),this.isVariantNode=ca(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]&&Kr(t)&&t.set(s[e])}}mount(e){this.current=e,yo.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))),go.current||function(){if(go.current=!0,oe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fo.current=e.matches;e.addEventListener("change",t),t()}else fo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ze(this.notifyUpdate),ze(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=_n.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ke.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 Zr){const t=Zr[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):mo()}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<vo.length;t++){const n=vo[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(Kr(a))e.addValue(r,a);else if(Kr(o))e.addValue(r,Rr(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,Rr(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=Rr(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&&(he(n)||fe(n))?n=parseFloat(n):(r=n,!zr.find(fr(r))&&Ft.test(t)&&(n=Cr(e,t))),this.setBaseTarget(e,Kr(n)?n.get():n)),Kr(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=Ra(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||Kr(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 xe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Or.render(this.render)}}class bo extends wo{constructor(){super(...arguments),this.KeyframeResolver=Tr}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;Kr(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function xo(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 ko extends bo{constructor(){super(...arguments),this.type="html",this.renderInstance=xo}readValueFromInstance(e,t){if(_n.has(t))return this.projection?.isProjecting?Rn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return On(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(tt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return po(e,t)}build(e,t,n){ga(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _a(e,t,n)}}const Eo=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 Do extends bo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mo}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_n.has(t)){const e=Sr(t);return e&&e.default||0}return t=Eo.has(t)?t:ja(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ia(e,t,n)}build(e,t,n){Ea(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){xo(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Eo.has(n)?n:ja(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Sa(e.tagName),super.mount(e)}}const So=(t,n)=>Ta(t)?new Do(n):new ko(n,{allowProjection:t!==e.Fragment});function Co(e,t,n){const r=e.getProps();return Ra(r,t,void 0!==n?n:r.custom,e)}const Mo=e=>Array.isArray(e);function To(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rr(n))}function Po(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Kr(r)&&r.add))return n.add(t);if(!n&&pe.WillChange){const n=new pe.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function No(e){return e.props[Ha]}const Ro=e=>null!==e;const Oo={type:"spring",stiffness:500,damping:25,restSpeed:10},Lo={type:"keyframes",duration:.8},Ao={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_o=(e,{keyframes:t})=>t.length>2?Lo:_n.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Oo:Ao;const Fo=(e,t,n,r={},a,o)=>i=>{const s=hr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=ke(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,_o(e,u)),u.duration&&(u.duration=ke(u.duration)),u.repeatDelay&&(u.repeatDelay=ke(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(sr(u),0===u.delay&&(d=!0)),(pe.instantAnimations||pe.skipAnimations)&&(d=!0,sr(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(Ro),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 Ke.update((()=>{u.onUpdate(e),u.onComplete()}))}return s.isSync?new En(u):new ur(u)};function Io({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Yo(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&&Io(c,t))continue;const i={delay:n,...hr(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=No(e);if(n){const e=window.MotionHandoffAnimation(n,t,Ke);null!==e&&(i.startTime=e,d=!0)}}Po(e,t),r.start(Fo(t,r,a,e.shouldReduceMotion&&mr.has(t)?{type:!1}:i,e,d));const p=r.animation;p&&l.push(p)}return i&&Promise.all(l).then((()=>{Ke.update((()=>{i&&function(e,t){const n=Co(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const t in o)To(e,t,(i=o[t],Mo(i)?i[i.length-1]||0:i));var i}(e,i)}))})),l}function Vo(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 Bo(e,t,n={}){const r=Co(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(Yo(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(Bo(l,t,{...i,delay:n+("function"==typeof r?0:r)+Vo(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 Wo(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 jo=sa.length;function Ho(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ho(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<jo;n++){const r=sa[n],a=e.props[r];(oa(a)||!1===a)&&(t[r]=a)}return t}const $o=[...ia].reverse(),qo=ia.length;function Uo(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=>Bo(e,t,n)));r=Promise.all(a)}else if("string"==typeof t)r=Bo(e,t,n);else{const a="function"==typeof t?Co(e,t,n.custom):t;r=Promise.all(Yo(e,a,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Ko(e){let t=Uo(e),n=Xo(),r=!0;const a=t=>(n,r)=>{const a=Co(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=Ho(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<qo;t++){const p=$o[t],h=n[p],m=void 0!==i[p]?i[p]:s[p],f=oa(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||aa(m)||"boolean"==typeof m)continue;const v=zo(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=Mo(t)&&Mo(n)?!Wo(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=Co(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Vo(r.enteringChildren,e,t)}}return{animation:t,options:n}})))}if(c.size){const t={};if("boolean"!=typeof i.initial){const n=Co(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=Xo()}}}function zo(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Wo(t,e)}function Qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xo(){return{animate:Qo(!0),whileInView:Qo(),whileHover:Qo(),whileTap:Qo(),whileDrag:Qo(),whileFocus:Qo(),exit:Qo()}}class Go{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Zo=0;const Jo={animation:{Feature:class extends Go{constructor(e){super(e),e.animationState||(e.animationState=Ko(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();aa(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 Go{constructor(){super(...arguments),this.id=Zo++}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 ei(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ti(e){return{point:{x:e.pageX,y:e.pageY}}}function ni(e,t,n,r){return ei(e,t,(e=>t=>Vr(t)&&e(t,ti(t)))(n),r)}const ri=.9999,ai=1.0001,oi=-.01,ii=.01;function si(e){return e.max-e.min}function li(e,t,n,r=.5){e.origin=r,e.originPoint=Vt(t.min,t.max,e.origin),e.scale=si(n)/si(t),e.translate=Vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ri&&e.scale<=ai||isNaN(e.scale))&&(e.scale=1),(e.translate>=oi&&e.translate<=ii||isNaN(e.translate))&&(e.translate=0)}function ci(e,t,n,r){li(e.x,t.x,n.x,r?r.originX:void 0),li(e.y,t.y,n.y,r?r.originY:void 0)}function ui(e,t,n){e.min=n.min+t.min,e.max=e.min+si(t)}function di(e,t,n){e.min=t.min-n.min,e.max=e.min+si(t)}function pi(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function hi(e){return[e("x"),e("y")]}const mi=({current:e})=>e?e.ownerDocument.defaultView:null,fi=(e,t)=>Math.abs(e-t);class gi{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=wi(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=fi(e.x,t.x),r=fi(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}=Qe;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=yi(t,this.transformPagePoint),Ke.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=wi("pointercancel"===e.type?this.lastMoveEventInfo:yi(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Vr(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const i=yi(ti(e),this.transformPagePoint),{point:s}=i,{timestamp:l}=Qe;this.history=[{...s,timestamp:l}];const{onSessionStart:c}=t;c&&c(e,wi(i,this.history)),this.removeListeners=we(ni(this.contextWindow,"pointermove",this.handlePointerMove),ni(this.contextWindow,"pointerup",this.handlePointerUp),ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ze(this.updatePoint)}}function yi(e,t){return t?{point:t(e.point)}:e}function vi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wi({point:e},t){return{point:e,delta:vi(e,xi(t)),offset:vi(e,bi(t)),velocity:ki(t,.1)}}function bi(e){return e[0]}function xi(e){return e[e.length-1]}function ki(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=xi(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>ke(t)));)n--;if(!r)return{x:0,y:0};const o=Ee(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 Ei(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 Di(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 Si=.35;function Ci(e,t,n){return{min:Mi(e,t),max:Mi(e,n)}}function Mi(e,t){return"number"==typeof e?e:e[t]||0}const Ti=new WeakMap;class Pi{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=mo(),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 gi(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ti(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?Ar[o]?null:(Ar[o]=!0,()=>{Ar[o]=!1}):Ar.x||Ar.y?null:(Ar.x=Ar.y=!0,()=>{Ar.x=Ar.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),hi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(vt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=si(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),a&&Ke.postRender((()=>a(e,t))),Po(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:()=>hi((e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:mi(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&&Ke.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||!Ni(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?Vt(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Vt(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&&Ba(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:Ei(e.x,n,a),y:Ei(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Si){return!1===e?e=0:!0===e&&(e=Si),{x:Ci(e,"left","right"),y:Ci(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hi((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||!Ba(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=po(e,n),{scroll:a}=t;return a&&(lo(r.x,a.offset.x),lo(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Di(e.x,t.x),y:Di(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=Xa(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=hi((i=>{if(!Ni(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 Po(this.visualElement,e),n.start(Fo(e,n,0,t,this.visualElement,!1))}stopAnimation(){hi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){hi((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){hi((t=>{const{drag:n}=this.getProps();if(!Ni(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]-Vt(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ba(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};hi((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=si(e),a=si(t);return a>r?n=be(t.min,t.max-r,e.min):r>a&&(n=be(e.min,e.max-a,t.min)),ue(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(),hi((t=>{if(!Ni(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(Vt(a,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Ti.set(this.visualElement,this);const e=ni(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Ba(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()),Ke.read(t);const a=ei(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(hi((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=Si,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function Ni(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Ri=e=>(t,n)=>{e&&Ke.postRender((()=>e(t,n)))};const Oi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Li(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ai={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!wt.test(e))return e;e=parseFloat(e)}return`${Li(e,t.target.x)}% ${Li(e,t.target.y)}%`}},_i={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ft.parse(e);if(a.length>5)return r;const o=Ft.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=Vt(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 Fi=!1;class Ii extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;!function(e){for(const t in e)pa[t]=e[t],tt(t)&&(pa[t].isCSSVariable=!0)}(Vi),a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),Fi&&a.root.didUpdate(),a.addEventListener("animationComplete",(()=>{this.safeToRemove()})),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Oi.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,Fi=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Ke.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Or.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Fi=!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 Yi(t){const[r,a]=function(t=!0){const n=e.useContext(se);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:a,register:o}=n,i=e.useId();e.useEffect((()=>{if(t)return o(i)}),[t]);const s=e.useCallback((()=>t&&a&&a(i)),[i,a,t]);return!r&&a?[!1,s]:[!0]}(),o=e.useContext(ae);return n.jsx(Ii,{...t,layoutGroup:o,switchLayoutGroup:e.useContext($a),isPresent:r,safeToRemove:a})}const Vi={borderRadius:{...Ai,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ai,borderTopRightRadius:Ai,borderBottomLeftRadius:Ai,borderBottomRightRadius:Ai,boxShadow:_i};const Bi=(e,t)=>e.depth-t.depth;class Wi{constructor(){this.children=[],this.isDirty=!1}add(e){le(this.children,e),this.isDirty=!0}remove(e){ce(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bi),this.isDirty=!1,this.children.forEach(e)}}const ji=["TopLeft","TopRight","BottomLeft","BottomRight"],Hi=ji.length,$i=e=>"string"==typeof e?parseFloat(e):e,qi=e=>"number"==typeof e||wt.test(e);function Ui(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Ki=Qi(0,.5,Fe),zi=Qi(.5,.95,ye);function Qi(e,t,n){return r=>r<e?0:r>t?1:n(be(e,t,r))}function Xi(e,t){e.min=t.min,e.max=t.max}function Gi(e,t){Xi(e.x,t.x),Xi(e.y,t.y)}function Zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ji(e,t,n,r,a){return e=no(e-=t,1/n,r),void 0!==a&&(e=no(e,1/a,r)),e}function es(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){vt.test(t)&&(t=parseFloat(t),t=Vt(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=Vt(o.min,o.max,r);e===o&&(s-=t),e.min=Ji(e.min,t,n,s,a),e.max=Ji(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}const ts=["x","scaleX","originX"],ns=["y","scaleY","originY"];function rs(e,t,n,r){es(e.x,t,ts,n?n.x:void 0,r?r.x:void 0),es(e.y,t,ns,n?n.y:void 0,r?r.y:void 0)}function as(e){return 0===e.translate&&1===e.scale}function os(e){return as(e.x)&&as(e.y)}function is(e,t){return e.min===t.min&&e.max===t.max}function ss(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ls(e,t){return ss(e.x,t.x)&&ss(e.y,t.y)}function cs(e){return si(e.x)/si(e.y)}function us(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ds{constructor(){this.members=[]}add(e){le(this.members,e),e.scheduleRender()}remove(e){if(ce(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 ps=["","X","Y","Z"];let hs=0;function ms(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=No(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fs(r)}function gs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=hs++,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(ws),this.nodes.forEach(Cs),this.nodes.forEach(Ms),this.nodes.forEach(bs)},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 Wi)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new xe),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=Ur(t)&&!(Ur(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;Ke.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=Je.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(ze(r),e(o-t))};return Ke.setup(r,!0),()=>ze(r)}(a,250),Oi.hasAnimatedSinceResize&&(Oi.hasAnimatedSinceResize=!1,this.nodes.forEach(Ss)))}))}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()||Ls,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!ls(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={...hr(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||Ss(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(),ze(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(Ts),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&&fs(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(ks);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Es);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ds),this.nodes.forEach(ys),this.nodes.forEach(vs)):this.nodes.forEach(Es),this.clearAllSnapshots();const e=Je.now();Qe.delta=ue(0,1e3/60,e-Qe.timestamp),Qe.timestamp=e,Qe.isProcessing=!0,Xe.update.process(Qe),Xe.preRender.process(Qe),Xe.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Or.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xs),this.sharedNodes.forEach(Ps)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||si(this.snapshot.measuredBox.x)||si(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=mo(),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&&!os(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ja(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)),Fs((r=n).x),Fs(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return mo();const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ys))){const{scroll:e}=this.root;e&&(lo(t.x,e.offset.x),lo(t.y,e.offset.y))}return t}removeElementScroll(e){const t=mo();if(Gi(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&&Gi(t,e),lo(t.x,a.offset.x),lo(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n=mo();Gi(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&&uo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Ja(r.latestValues)&&uo(n,r.latestValues)}return Ja(this.latestValues)&&uo(n,this.latestValues),n}removeTransform(e){const t=mo();Gi(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Ja(n.latestValues))continue;Za(n.latestValues)&&n.updateSnapshot();const r=mo();Gi(r,n.measurePageBox()),rs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Ja(this.latestValues)&&rs(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!==Qe.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=Qe.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mo(),this.relativeTargetOrigin=mo(),pi(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Gi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,i,s;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target=mo(),this.targetWithTransforms=mo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,i=this.relativeTarget,s=this.relativeParent.target,ui(o.x,i.x,s.x),ui(o.y,i.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Gi(this.target,this.layout.layoutBox),oo(this.target,this.targetDelta)):Gi(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=mo(),this.relativeTargetOrigin=mo(),pi(this.relativeTargetOrigin,this.target,e.target),Gi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Za(this.parent.latestValues)&&!eo(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===Qe.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;Gi(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&&uo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,oo(e,i)),r&&Ja(o.latestValues)&&uo(e,o.latestValues))}t.x<so&&t.x>io&&(t.x=1),t.y<so&&t.y>io&&(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=mo());const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Zi(this.prevProjectionDelta.x,this.projectionDelta.x),Zi(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ci(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&us(this.projectionDelta.x,this.prevProjectionDelta.x)&&us(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=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},o=ho();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i=mo(),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(Os));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,h,m,f,g;Ns(o.x,e.x,n),Ns(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pi(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,m=this.relativeTargetOrigin,f=i,g=n,Rs(h.x,m.x,f.x,g),Rs(h.y,m.y,f.y,g),d&&(l=this.relativeTarget,p=d,is(l.x,p.x)&&is(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d=mo()),Gi(d,this.relativeTarget)),s&&(this.animationValues=a,function(e,t,n,r,a,o){a?(e.opacity=Vt(0,n.opacity??1,Ki(r)),e.opacityExit=Vt(t.opacity??1,0,zi(r))):o&&(e.opacity=Vt(t.opacity??1,n.opacity??1,r));for(let a=0;a<Hi;a++){const o=`border${ji[a]}Radius`;let i=Ui(t,o),s=Ui(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||qi(i)===qi(s)?(e[o]=Math.max(Vt($i(i),$i(s),r),0),(vt.test(s)||vt.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=Vt(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&&(ze(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update((()=>{Oi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rr(0)),this.currentAnimation=function(e,t,n){const r=Kr(e)?e:Rr(e);return r.start(Fo("",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&&Is(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||mo();const t=si(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=si(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Gi(t,n),uo(t,a),ci(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ds);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&&ms("z",e,r,this.animationValues);for(let t=0;t<ps.length;t++)ms(`rotate${ps[t]}`,e,r,this.animationValues),ms(`skew${ps[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=Oa(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=Oa(t?.pointerEvents)||""),void(this.hasProjected&&!Ja(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 pa){if(void 0===a[t])continue;const{correct:n,applyTo:i,isCSSVariable:s}=pa[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?Oa(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>e.currentAnimation?.stop())),this.root.nodes.forEach(ks),this.root.sharedNodes.clear()}}}function ys(e){e.updateLayout()}function vs(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?hi((e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=si(r);r.min=n[e].min,r.max=r.min+a})):Is(a,t.layoutBox,n)&&hi((r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=si(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=ho();ci(i,n,t.layoutBox);const s=ho();o?ci(s,e.applyTransform(r,!0),t.measuredBox):ci(s,n,t.layoutBox);const l=!os(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=mo();pi(i,t.layoutBox,a.layoutBox);const s=mo();pi(s,n,o.layoutBox),ls(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 ws(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 bs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xs(e){e.clearSnapshot()}function ks(e){e.clearMeasurements()}function Es(e){e.isLayoutDirty=!1}function Ds(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ss(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Cs(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ts(e){e.resetSkewAndRotation()}function Ps(e){e.removeLeadSnapshot()}function Ns(e,t,n){e.translate=Vt(t.translate,0,n),e.scale=Vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Rs(e,t,n,r){e.min=Vt(t.min,n.min,r),e.max=Vt(t.max,n.max,r)}function Os(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ls={duration:.45,ease:[.4,0,.1,1]},As=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_s=As("applewebkit/")&&!As("chrome/")?Math.round:ye;function Fs(e){e.min=_s(e.min),e.max=_s(e.max)}function Is(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=cs(t),a=cs(n),o=.2,!(Math.abs(r-a)<=o));var r,a,o}function Ys(e){return e!==e.root&&e.scroll?.wasRoot}const Vs=gs({attachResizeListener:(e,t)=>ei(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bs={current:void 0},Ws=gs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bs.current){const e=new Vs({});e.mount(window),e.setOptions({layoutScroll:!0}),Bs.current=e}return Bs.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),js={pan:{Feature:class extends Go{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(e){this.session=new gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ri(e),onStart:Ri(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ke.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=ni(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 Go{constructor(e){super(e),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new Pi(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ws,MeasureLayout:Yi}};function Hs(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Ke.postRender((()=>a(t,ti(t))))}function $s(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&&Ke.postRender((()=>a(t,ti(t))))}const qs=new WeakMap,Us=new WeakMap,Ks=e=>{const t=qs.get(e.target);t&&t(e)},zs=e=>{e.forEach(Ks)};function Qs(e,t,n){const r=function({root:e,...t}){const n=e||document;Us.has(n)||Us.set(n,{});const r=Us.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(zs,{root:e,...t})),r[a]}(t);return qs.set(e,n),r.observe(e),()=>{qs.delete(e),r.unobserve(e)}}const Xs={some:0,all:1};const Gs=Qa({...Jo,...{inView:{Feature:class extends Go{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:Xs[r]};return Qs(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 Go{mount(){const{current:e}=this.node;e&&(this.unmount=qr(e,((e,t)=>($s(this.node,t,"Start"),(e,{success:t})=>$s(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Go{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=we(ei(this.node.current,"focus",(()=>this.onFocus())),ei(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Go{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,a,o]=Fr(e,n),i=e=>{if(!Ir(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{Ir(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)=>(Hs(this.node,t,"Start"),e=>Hs(this.node,e,"End")))))}unmount(){}}}},...js,...{layout:{ProjectionNode:Ws,MeasureLayout:Yi}}},So),Zs=e.createContext(null),Js={up:"angle-up",end:"angle-right",start:"angle-left",down:"angle-down"},el=({align:n="start",autoClose:r=!1,children:a,className:o="",disabled:i=!1,drop:s,fullWidth:l=!1,icon:c,isChild:u=!1,label:d,onToggle:p,overflow:h=!1,requiredText:m,selectedValue:f,setShow:g,show:y,showError:v=!1,size:w="md",style:b="default",variant:x="primary"})=>{const[k,E]=e.useState(!!y),[D,S]=e.useState(!1),[C,M]=e.useState(null),[T,P]=e.useState(0),[N,R]=e.useState(0),[O,L]=e.useState({top:0,left:0}),A=e.useRef(null),_=e.useRef(null),F=e.useRef(k),I=e.useRef(null),Y=e.useContext(Zs);I.current=()=>{if(!_.current)return;if(!document.body.contains(_.current))return;const e=_.current.offsetWidth,t=_.current.offsetHeight;if(0!==e&&0!==t&&(l&&M((t=>t!==e?e:t)),P((e=>e!==t?t:e)),R((t=>t!==e?e:t)),h)){const e=_.current.getBoundingClientRect();if(e.top<-1e4||e.top>1e4||e.left<-1e4||e.left>1e4)return;L((t=>Math.abs(t.top-e.top)>1||Math.abs(t.left-e.left)>1?{top:e.top,left:e.left}:t))}};const V=e.useCallback((()=>{I.current?.()}),[]),B=e.useCallback(((e,t)=>{e!==F.current&&(S(!0),F.current=e),E(e),g&&g(e),p&&p(e,t),V()}),[g,p,V]),W=e.useMemo((()=>{const t=a?.props?.children;if(!t)return null;const n=(t,n)=>{if(!e.isValidElement(t))return t;const r=t.type===e.Fragment,a="DropdownDivider"===t.type?.displayName||t.props?.className?.includes("dropdown-divider"),o=void 0!==t.props?.as;return r||a||o?e.cloneElement(t,{key:t.key||`${n}`}):e.cloneElement(t,{as:"li",key:t.key||`${n}`})};return Array.isArray(t)?t.map(((e,t)=>n(e,t))):n(t,0)}),[a]);e.useEffect((()=>{y!==F.current&&(E(y),S(!0),F.current=y)}),[y]),e.useEffect((()=>{Y&&!Y.isOpen&&k&&(E(!1),F.current=!1,g&&g(!1))}),[Y?.isOpen,k,g,Y]),e.useEffect((()=>{V()}),[V]),e.useEffect((()=>{if(!h||!k)return;V();let e=null,t=!1;const n=()=>{t||(t=!0,e=requestAnimationFrame((()=>{V(),t=!1})))};window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);let r=_.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)))}}),[h,k,V]);const j=Js[s]||Js.down,H=e.useMemo((()=>"up"===s?"end"===n?"bottom right":"bottom left":"start"===s?"center right":"end"===s?"center left":"end"===n?"top right":"top left"),[s,n]),$=e.useMemo((()=>{const e={};return h?"up"===s?(e.bottom=window.innerHeight-O.top+"px",e.left=`${O.left}px`):"start"===s?(e.right=window.innerWidth-O.left+"px",e.top=`${O.top}px`):"end"===s?(e.left=`${O.left+N}px`,e.top=`${O.top}px`):(e.top=`${O.top+T}px`,e.left=`${O.left}px`):"up"===s?e.bottom=`${T}px`:"start"===s?(e.right=`${N}px`,e.top="0"):"end"===s?(e.left=`${N}px`,e.top="0"):e.top=`${T}px`,e}),[s,T,N,h,O]),q=e.useMemo((()=>D?l?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:l?{initial:!1,animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[D,l]),U=e.useMemo((()=>"start"===s||"end"===s?{}:h?"end"===n?{left:"auto",right:window.innerWidth-O.left-N+"px"}:{}:{left:"end"===n?"auto":"0",right:"end"===n?"0":"auto"}),[s,n,h,O,N]),K=e.useCallback((()=>{D&&S(!1)}),[D]),z=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:h?"fixed":"absolute",...$,...U,transformOrigin:H,...h&&{zIndex:9999}};return e.createElement(Gs.ul,re({},o,{ref:n},q,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:K}))}));return t.displayName="MotionMenu",t}),[q,$,U,H,K,h]),X=e.useMemo((()=>({strategy:h?"fixed":"absolute",modifiers:h?[{name:"offset",enabled:!1},{name:"preventOverflow",enabled:!1},{name:"flip",enabled:!1},{name:"computeStyles",enabled:!1}]:[{name:"offset",enabled:!1}]})),[h]),G=e.useMemo((()=>({isOpen:k})),[k]),Z=e.useMemo((()=>{if(u)return"";return["w-100",`btn btn-${x}`,`btn-${b}`,`btn-${w}`,v&&"not-validated",i&&"disabled"].filter(Boolean).join(" ")}),[u,x,b,w,v,i]);return e.createElement(Zs.Provider,{value:G},e.createElement(t,{autoClose:r,show:k,onToggle:B,className:o,align:n,drop:s,disabled:u?void 0:i,"data-error":m,style:h?void 0:{position:"relative"}},e.createElement(t.Toggle,{ref:_,as:u?"div":void 0,bsPrefix:u?"":void 0,className:Z},(()=>{const t=e.createElement(e.Fragment,null,e.createElement("span",{className:"dropdown-label"},d),e.createElement("span",null,f)),n=c&&e.createElement(Q,{style:"solid",name:c,scale:1}),r=d&&e.createElement(Q,{name:j,className:"caret"}),a="input"===x?t:d&&e.createElement("span",null,d);return"start"===s?e.createElement(e.Fragment,null,r,a,n):e.createElement(e.Fragment,null,n,a,r)})()),e.createElement(t.Menu,{as:z,align:n,ref:A,style:l?{width:C}:void 0,popperConfig:X,renderOnMount:h},W)))};el.propTypes={align:g.oneOf(["start","end"]),autoClose:g.oneOfType([g.bool,g.oneOf(["inside","outside"])]),children:g.node,className:g.string,disabled:g.bool,drop:g.oneOf(["up","down","start","end"]),fullWidth:g.bool,icon:g.string,isChild:g.bool,label:g.node,onToggle:g.func,overflow:g.bool,requiredText:g.string,selectedValue:g.node,setShow:g.func,show:g.bool,showError:g.bool,size:g.oneOf(["xs","md","lg"]),style:g.oneOf(["default","success","danger","warning","link"]),variant:g.oneOf(["primary","secondary","terciary","outline","input"])};const tl=()=>{const t=e.useCallback((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:t,highlightText:(t,n)=>{if(!n)return t;const r=t.split(new RegExp(`(${n})`,"gi"));return e.createElement("span",null,r.map(((t,r)=>e.createElement("span",{className:[t.toLowerCase()===n.toLowerCase()&&"highligthed-search"],key:r},t))))},capitalice:e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:""}},nl=({children:t,className:n="",disabled:r=!1,id:a,name:o,setStatus:i,size:s="md",status:l=!1})=>{const{toCamelCase:c}=tl();let u=a;a||"string"!=typeof t||(u=c(t));return e.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},e.createElement("label",{className:"checkbox "+("lg"===s?"checkbox-lg":"xs"===s?"checkbox-xs":"")},e.createElement("input",{type:"checkbox",checked:l,onChange:e=>{i(e.target.checked)},minLength:"1",id:u,name:o}),t))};nl.propTypes={className:g.string,disabled:g.bool,id:g.string,name:g.string,setStatus:g.func,size:g.oneOf(["xs","md","lg"]),status:g.bool};const rl=({autoFocus:t=!1,className:n="",disabled:r=!1,focus:a=!1,helpText:o,icon:i,label:s="Input label",max:l,maxLength:c,min:u,name:d,onChange:p,prefix:h,requiredText:m,setShowError:f,showError:g,size:y="md",suffix:v,type:w="text",value:b})=>{const{toCamelCase:x}=tl(),k=e.useRef(null),E=x(s);e.useEffect((()=>{g&&setTimeout((()=>{f(!1)}),3e3)}),[g]),e.useEffect((()=>{k.current&&a&&k.current.focus()}),[a]);const D=(()=>{switch(w){case"email":return"email";case"tel":return"tel";case"number":return"numeric";default:return}})();return e.createElement("div",{className:`position-relative ${n} ${r?"disabled":""}`},h||v||i?e.createElement("div",{className:"input-group "+(g?"not-validated":""),"data-error":m},i&&e.createElement("span",{className:"input-group-text"},e.createElement(Q,{style:"solid",name:i,scale:1})),h&&e.createElement("span",{className:"input-group-text"},h),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:w,className:"form-control "+("md"!==y?`form-control-${y}`:""),value:b,id:E,name:d,placeholder:s,onChange:p,required:!!m,autoFocus:t,ref:k,min:u,max:l,inputMode:D}),e.createElement("label",{htmlFor:E},s)),v&&e.createElement("span",{className:"input-group-text"},v)):e.createElement("div",{className:"form-floating "+(g?"not-validated":""),"data-error":m},e.createElement("input",{type:w,className:"form-control "+("md"!==y?`form-control-${y}`:""),value:b,id:E,placeholder:s,onChange:p,required:!!m,name:d,autoFocus:t,ref:k,min:u,max:l,maxLength:c,inputMode:D}),e.createElement("label",{htmlFor:E},s)),o&&e.createElement("small",{className:"text-muted"},o))};rl.propTypes={autoFocus:g.bool,className:g.string,disabled:g.bool,focus:g.bool,helpText:g.string,icon:g.string,label:g.string,max:g.oneOfType([g.string,g.number]),maxLength:g.number,min:g.oneOfType([g.string,g.number]),name:g.string,onChange:g.func,prefix:g.string,requiredText:g.string,size:g.oneOf(["xs","md","lg"]),showError:g.bool,setShowError:g.func,suffix:g.string,type:g.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:g.oneOfType([g.string,g.number])};const al=({children:t,className:n="",disabled:r=!1,fullWidth:a=!1,id:o,name:i,setStatus:s,size:l="md",status:c=!0})=>{const{toCamelCase:u}=tl();let d=o;o||"string"!=typeof t||(d=u(t));return e.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},e.createElement("label",{className:`radio ${a?"w-100":""} ${"lg"===l?"radio-lg":"xs"===l?"radio-xs":""}`},e.createElement("input",{type:"radio",checked:c,onChange:e=>{s(e.target.checked)},minLength:"1",id:d,name:i}),t))};al.propTypes={className:g.string,disabled:g.bool,fullWidth:g.bool,id:g.string,name:g.string,setStatus:g.func,size:g.oneOf(["xs","md","lg"]),status:g.bool};const ol=({children:t,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}=tl(),p="lg"===l?"form-switch-lg":"xs"===l?"form-switch-xs":"",h=o||d(t);return e.createElement("div",{className:`form-check form-switch ${p} ${n} ${"end"===u?"switch-end":""} ${a?"switch-icon":""} ${r?"disabled":""}`},e.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}),t&&e.createElement("label",{className:"form-check-label",htmlFor:h},t))};ol.propTypes={className:g.string,disabled:g.bool,icon:g.bool,id:g.string,name:g.string,setStatus:g.func,status:g.oneOfType([g.number,g.bool]),size:g.oneOf(["xs","md","lg"]),switchPosition:g.oneOf(["start","end"])};const il=({className:t="",disabled:n=!1,helpText:r,label:a="Textarea label",name:o,onChange:i,requiredText:s,showError:l,setShowError:c,size:u="md",value:d=""})=>{const{toCamelCase:p}=tl(),h="lg"===u?"form-control-lg":"xs"===u?"form-control-xs":"",m=p(a);return e.useEffect((()=>{l&&setTimeout((()=>{c(!1)}),3e3)}),[l]),e.createElement("div",{className:`position-relative ${t} ${n?"disabled":""}`},e.createElement("div",{className:"form-floating "+(l?"not-validated":""),"data-error":s},e.createElement("textarea",{className:`form-control ${h}`,onChange:i,placeholder:a,id:m,name:o,required:!!s,value:d||""}),e.createElement("label",{htmlFor:m},a),r&&e.createElement("small",{className:"text-muted"},r)))};il.propTypes={className:g.string,disabled:g.bool,helpText:g.string,label:g.string,name:g.string,onChange:g.func,requiredText:g.string,showError:g.bool,setShowError:g.func,size:g.oneOf(["xs","md","lg"]),value:g.string};const sl=({autoFocus:t=!1,className:n="",counter:r=!1,disabled:a=!1,duplicateKeywordErrorText:o="Duplicate keyword.",keywordsList:i=[],maxKeywords:s,maxKeywordLength:l,pillColor:c="neutral",placeholder:u="Add keywords…",recomendedKeywords:d,requiredText:p,setKeywordsList:h})=>{const[m,f]=e.useState(""),[g,y]=e.useState(""),[v,w]=e.useState(!1);return e.useEffect((()=>{i.length===s&&(w(!0),setTimeout((()=>{w(!1)}),3e3))}),[i]),e.createElement(e.Fragment,null,e.createElement("div",{className:`position-relative ${n} ${a?"disabled":""}`},e.createElement("div",{className:"input-chip "+(v?"not-validated":""),"data-error":p},e.createElement("div",{className:"wrapper"},i.map(((t,n)=>e.createElement(J,{key:n,closeButton:!0,color:c,onClick:()=>(e=>{const t=i.filter((t=>t!==e));h(t)})(t)},t)))),e.createElement("input",{type:"text",value:m,onKeyDown:e=>{if("Enter"===e.key&&""!==m.trim()&&i.length<s){if(m.length>l)return y(`Each keyword must be ${l} characters or less.`),setTimeout((()=>y("")),2e3),void f("");if(i.includes(m.trim()))return y(o),setTimeout((()=>y("")),2e3),void f("");const e=[...i,m.trim()];h(e),f("")}},onChange:e=>{f(e.target.value)},placeholder:u,autoFocus:t}),r&&i.length>=d&&e.createElement("div",{className:"progress-counter-wrapper "+(i.length>=s?"progress-value-error":i.length>=d?"progress-value-warning":"")},e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"progress-counter"},e.createElement("circle",{className:"progress-bg",cx:"10",cy:"10",r:"9",fill:"none"}),e.createElement("circle",{className:"progress-value",cx:"10",cy:"10",r:"9",strokeDasharray:56.55,strokeDashoffset:56.55*(1-i.length/s),strokeLinecap:"round",fill:"none"})),e.createElement("span",{className:"progress-counter-text"},i.length))),g&&e.createElement("small",{className:"text-muted"},g)))};sl.propTypes={autoFocus:g.bool,className:g.string,counter:g.bool,disabled:g.bool,duplicateKeywordErrorText:g.string,keywordsList:g.array.isRequired,maxKeywords:g.number.isRequired,maxKeywordLength:g.number.isRequired,pillColor:g.oneOf(["blue","danger","dark","green","light","midtone","neutral","red","yellow"]),placeholder:g.string.isRequired,recomendedKeywords:g.number.isRequired,requiredText:g.string.isRequired,setKeywordsList:g.func.isRequired};const ll=(void 0).MODE,cl="production"===ll?"https://api.groovinads.com/":"localdev"===ll?"https://api-test.groovinads.com/":"https://api-dev.groovinads.com/";var ul={authStatus:cl+"v2/auth/status",authLogout:cl+"v2/auth/logout",applications:cl+"v2/applications",favApps:cl+"v2/applications/favorite",clients:cl+"v2/auth/clients",clientsLogin:cl+"v2/auth/clients/login",headers:{headers:{"Content-Type":"application/json",Authorization:"Bearer "+r.get("groovinadsAuthToken"),"Accept-Language":"en"}}};a.defaults.withCredentials=!0;const dl=async({url:e})=>await a.get(e,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),pl=async({url:e,data:t})=>await a.post(e,t,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),hl=async e=>await dl({url:`${cl}${e}`}),ml=async(e,t)=>await pl({url:`${cl}${e}`,data:t}),fl=async e=>await(async({url:e})=>await a.delete(e,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))))({url:`${ul.favApps}/${e}`}),gl=({apiGetEmail:t,apiPostEmail:n,disabled:r=!1,label:a="Email addresses",showModal:o=!0,textButton:i="Add",textError:s="You must enter a valid email address",titleList:l="Added emails"})=>{const[c,u]=e.useState([]),[d,p]=e.useState(""),[h,m]=e.useState([]),[f,g]=e.useState(!1),y=/^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/;return e.useEffect((()=>{o?(async()=>{const e=await hl(t);u(e||[])})():c.length&&u([])}),[o]),e.createElement(e.Fragment,null,e.createElement("div",{className:"mb-3"},e.createElement("div",{className:`mb-3 input-group w-100 mb-4 ${f?"not-validated":""} ${r?"disabled":""}`,"data-error":s},e.createElement(rl,{label:a,value:d,onChange:e=>{(e=>{const t=e.target.value.replace(/\. +/g," ");p(t),t.trim()&&!y.test(t)||g(!1)})(e)}}),e.createElement(ne,{onClick:async()=>{const e=d.split(/[;, ]+/).map((e=>e.trim())).filter((e=>e.length>0)),t=e.filter((e=>!y.test(e))),r=e.filter((e=>y.test(e)));if(t.length&&(p(t.join(" ")),g(!0),setTimeout((()=>{g(!1)}),3e3)),r.length){const e=await ml(n,[...c,...r]);u(e)}p(t.join(" "))},className:""+(d.trim()?"":"disabled")},i))),c?.length?e.createElement("div",{className:"shared-users-list"},e.createElement("h3",null,l),c?.map(((t,r)=>e.createElement("div",{key:`email${r}`,className:"shared-user-item"},e.createElement("div",{className:"shared-user"},e.createElement(Q,{name:"user-circle",scale:2}),e.createElement("span",null,t)),h.some((e=>e===t))?e.createElement("div",{className:"spinner-wrapper"},e.createElement(ee,{scale:1})):e.createElement(ne,{variant:"terciary",style:"danger",startIcon:"trash-can",onClick:()=>(async e=>{m([...h,e]);const t=c.filter((t=>t!==e)),r=await ml(n,t);setTimeout((()=>{m(h.filter((t=>t!==e))),u(r)}),1e3)})(t)}))))):null)};gl.propTypes={apiGetEmail:g.string.isRequired,apiPostEmail:g.string.isRequired,disabled:g.bool,label:g.string,showModal:g.bool,textButton:g.string,textError:g.string,titleList:g.string};const yl=({autoClose:n=!1,className:r="",disabled:a=!1,locked:o=!1,menuType:i="simple",onRemoveFilter:s,onToggle:l,overflow:c=!1,requiredText:u,searchLabel:d="Search",setShow:p,setValuesSelected:h,show:m,showError:f=!1,title:g,values:y=[],valuesSelected:v=[]})=>{const[w,b]=e.useState(""),[x,k]=e.useState(!!m),[E,D]=e.useState(!1),[S,C]=e.useState(0),[M,T]=e.useState(0),[P,N]=e.useState({top:0,left:0}),R=e.useRef(null),O=e.useRef(null),L=e.useRef(x),A=()=>e.createElement("div",{className:"dropdown-filter-empty-space"},e.createElement("img",{src:"https://ui.groovinads.com/assets/not-found.svg",alt:"Sad magnifier on abstract background"}),e.createElement("div",null,e.createElement("h5",null,"Value not found"),e.createElement("p",null,"It looks like this value does not exist."))),_=(e,t)=>{h(e?[...v,t]:v.filter((e=>e!==t)))},F=e.useCallback((()=>{if(!O.current)return;const e=O.current.offsetHeight,t=O.current.offsetWidth;if(C(e),T(t),c){const e=O.current.getBoundingClientRect();N({top:e.top,left:e.left})}}),[c]);e.useEffect((()=>{m!==L.current&&(k(m),D(!0),L.current=m)}),[m]);const I=e.useCallback((e=>{!R?.current||R?.current.contains(e?.target)||!0!==n&&"outside"!==n||(!1!==L.current&&(D(!0),L.current=!1),k(!1),p(!1))}),[n,p]);e.useEffect((()=>(document.addEventListener("click",I),()=>{document.removeEventListener("click",I)})),[I]),e.useEffect((()=>{F()}),[F]);const Y=e.useMemo((()=>{const e={};return c?(e.top=`${P.top+S}px`,e.left=`${P.left}px`):e.top=`${S}px`,e}),[S,c,P]),V=e.useMemo((()=>E?{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[E]),B=e.useCallback((()=>{E&&D(!1)}),[E]),W=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:c?"fixed":"absolute",...Y,left:c?Y.left:"0",...c&&M&&{width:`${M}px`},transformOrigin:"top left"};return e.createElement(Gs.ul,re({},o,{ref:n},V,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:B}))}));return t.displayName="MotionMenu",t}),[V,B,c,Y,M]),j=e.useMemo((()=>({strategy:c?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...c&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[c]);return e.createElement(t,{onToggle:l,className:`dropdown-filter ${o?"locked":""} ${r} ${a?"disabled":""}`,autoClose:n,show:x,ref:R,"data-error":u,style:{position:"relative"}},e.createElement(t.Toggle,{ref:O,variant:"toggle-filter",className:f?"not-validated":"",onClick:e=>{e.stopPropagation();const t=!x;t!==L.current&&(D(!0),L.current=t),k(t),p(t),F()}},e.createElement("div",{className:"filter-heading"},e.createElement("div",{className:"filter-title"},e.createElement("span",{className:"filter-title-text"},g),v.length>0&&e.createElement("span",{className:"filter-title-count"},` (${v.length})`),o&&e.createElement(Q,{style:"solid",name:"lock-keyhole",scale:.7})),e.createElement(Q,{style:"solid",name:"chevron-down",scale:1,className:"caret"})),e.createElement("div",{className:"filter-values"},v.length===y.length?"All selected":v.length?v.join("; "):"None")),!o&&e.createElement(ne,{variant:"terciary",endIcon:"xmark",size:"md",className:"remove-filter",onClick:s}),"simple"===i&&e.createElement(t.Menu,{as:W,className:"dropdown-menu-simple",popperConfig:j},e.createElement("div",{className:"dropdown-menu-wrapper"},e.createElement(rl,{size:"xs",label:d,icon:"magnifying-glass",className:"w-100",value:w,onChange:({target:e})=>b(e.value),customRef:m}),y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).length>0?e.createElement("ul",{className:"dropdown-filter-list"},y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).map(((t,n)=>e.createElement(nl,{setStatus:e=>{_(e,t)},status:v.includes(t),key:"Dropdown.Simple.Checkbox"+n},t)))):e.createElement(A,null))),"selection"===i&&e.createElement(t.Menu,{as:W,className:"dropdown-menu-selection",popperConfig:j},e.createElement("div",{className:"dropdown-menu-wrapper"},e.createElement("div",{className:"dropdown-filter-list-wrapper"},e.createElement(rl,{size:"xs",label:d,icon:"magnifying-glass",className:"w-100",value:w,onChange:({target:e})=>b(e.value),customRef:m}),e.createElement("h4",null,"All values (",y.length,")"),y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).length>0?e.createElement(e.Fragment,null,e.createElement("ul",{className:"dropdown-filter-list"},y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).map(((t,n)=>e.createElement(nl,{setStatus:e=>{_(e,t)},status:v.includes(t),key:"Dropdown.Selection.Checkbox"+n},t))))):e.createElement(A,null)),e.createElement("div",{className:"dropdown-filter-values-wrapper"},e.createElement("div",{className:"dropdown-filter-buttons-wrapper"},e.createElement(ne,{startIcon:"check",size:"xs",variant:"terciary",onClick:()=>{h([...y])}},"Select all"),e.createElement(ne,{startIcon:"xmark",size:"xs",variant:"terciary",onClick:()=>{h([])}},"Clear selection")),e.createElement("h4",null,"Selected values (",v.length,")"),e.createElement("div",{className:"dropdown-filter-selected-list"},v.map(((t,n)=>e.createElement(J,{color:"light",closeButton:!0,onClick:()=>{(e=>{h(v.filter(((t,n)=>n!==e)))})(n)},key:"Dropdown.PillComponent"+n},t))))))))};yl.propTypes={autoClose:g.oneOfType([g.bool,g.oneOf(["outside"])]),className:g.string,disabled:g.bool,locked:g.bool,menuType:g.oneOf(["simple","selection"]),onRemoveFilter:g.func,onToggle:g.func,overflow:g.bool,requiredText:g.string,searchLabel:g.string,setShow:g.func,setValuesSelected:g.func,show:g.bool,showError:g.bool,title:g.string,values:g.array,valuesSelected:g.array};const vl=({autoClose:n=!1,buttonVariant:r="input",className:a="",customKey:o,disabled:i=!1,drop:s,focus:l=!1,hasId:c=!0,idInPill:u=!1,idKey:d,inputLabel:p="",nameKey:h,notMatchedText:m="No match found",nowrap:f=!1,object:g=!1,onToggle:y,overflow:v=!1,requiredText:w="Required",searchLabel:b="Search",setValuesSelected:x,setShow:k,show:E,showError:D=!1,showStatus:S="",values:C=[],valuesSelected:M=[]})=>{const[T,P]=e.useState(""),[N,R]=e.useState(!!E),[O,L]=e.useState(!1),[A,_]=e.useState(0),[F,I]=e.useState(0),[Y,V]=e.useState({top:0,left:0}),B=e.useRef(null),W=e.useRef(null),j=e.useRef(null),H=e.useRef(N),{highlightText:$}=tl(),q=e.useCallback(((e,t)=>{const n=C.findIndex((e=>(g?e[d]:e)===(g?t[d]:t)));x(e?e=>[...e,C[n]]:e=>e.filter((e=>(g?e[d]:e)!==(g?C[n][d]:C[n]))))}),[C,g,d,x]),U=e.useCallback((e=>{x((t=>t.filter(((t,n)=>n!==e))))}),[x]),K=e.useMemo((()=>C.filter((e=>(g?`${e[d]} ${e[h]} ${e[o]}`:e).toLowerCase().includes(T.toLowerCase())&&(!S||parseInt(e.status)===parseInt(S))))),[C,g,d,h,o,T,S]),z=e.useCallback((()=>{if(!W.current)return;const e=W.current.offsetHeight,t=W.current.offsetWidth;if(_(e),I(t),v){const e=W.current.getBoundingClientRect();V({top:e.top,left:e.left})}}),[v]),X=e.useCallback((e=>{!B?.current||B?.current.contains(e?.target)||!0!==n&&"outside"!==n||(!1!==H.current&&(L(!0),H.current=!1),R(!1),k(!1))}),[n,k]);e.useEffect((()=>{E!==H.current&&(R(E),L(!0),H.current=E)}),[E]),e.useEffect((()=>(document.addEventListener("click",X),()=>{document.removeEventListener("click",X)})),[X]),e.useEffect((()=>{z()}),[z]);const G="up"===s?"bottom left":"top left",Z=e.useMemo((()=>{const e={};return v?"up"===s?(e.bottom=window.innerHeight-Y.top+"px",e.left=`${Y.left}px`):(e.top=`${Y.top+A}px`,e.left=`${Y.left}px`):"up"===s?e.bottom=`${A}px`:e.top=`${A}px`,e}),[s,A,v,Y]),ee=e.useMemo((()=>O?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scaleY:1,opacity:1}}),[O]),te=e.useCallback((()=>{O&&L(!1)}),[O]),ne=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:v?"fixed":"absolute",...Z,left:v?Z.left:"0",...v&&F&&{width:`${F}px`},transformOrigin:G};return e.createElement(Gs.ul,re({},o,{ref:n},ee,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:te}))}));return t.displayName="MotionMenu",t}),[ee,te,v,Z,F,s]),ae=e.useMemo((()=>({strategy:v?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...v&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[v]),oe=e.useMemo((()=>["btn",`btn-${r}`,f&&"nowrap",D&&"not-validated",i&&"disabled"].filter(Boolean).join(" ")),[r,f,D,i]),ie=e.useCallback((e=>o?`${e[h]} - ${e[o]}`:u?`#${e[d]} - ${e[h]}`:e[h]||e),[o,u,h,d]),se=e.useCallback((e=>{const t=g?o?`${e[h]} - ${e[o]}`:`${c?`#${e[d]} - `:""}${e[h]}`:e[h]||e;return $(t,T)}),[g,o,c,h,d,$,T]);return e.createElement(t,{className:a,autoClose:n,show:N,ref:B,onToggle:y,drop:s,"data-error":w,style:{position:"relative"}},e.createElement(t.Toggle,{as:"div",ref:W,className:oe,onClick:e=>{e.stopPropagation();const t=!N;t!==H.current&&(L(!0),H.current=t),R(t),z()}},M.length>0&&"input"===r&&e.createElement("div",{className:"wrapper"},M.map(((t,n)=>e.createElement(J,{color:"neutral",closeButton:!0,onClick:e=>{e.stopPropagation(),U(n)},key:`Dropdown.PillComponent.${n}`},ie(t))))),e.createElement("span",{className:"label"},p),e.createElement(Q,{style:"solid",name:"angle-down",scale:1,className:"caret"})),e.createElement(t.Menu,{as:ne,className:"w-100",ref:j,popperConfig:ae},e.createElement(t.Item,{onClick:e=>e.stopPropagation(),as:"div"},e.createElement(rl,{label:b,value:T,onChange:({target:e})=>P(e.value),icon:"magnifying-glass",size:"xs",className:"w-100",focus:l})),e.createElement(t.Item,{onClick:e=>e.stopPropagation(),as:"div"},K.length>0?e.createElement("ul",{className:"dropdown-checks"},K.map(((t,n)=>e.createElement(nl,{setStatus:e=>q(e,t),status:g?M.some((e=>e[d]===t[d])):M.includes(t),key:`Dropdown.Input.Checkbox.${n}`},se(t))))):e.createElement("div",{className:"not-matched"},e.createElement("p",null,m)))))};vl.propTypes={autoClose:g.oneOfType([g.bool,g.string]),buttonVariant:g.oneOf(["input","primary","secondary","terciary","outline"]),className:g.string,customKey:g.string,disabled:g.bool,drop:g.oneOf(["up","down"]),focus:g.bool,hasId:g.bool,idInPill:g.bool,idKey:g.string,inputLabel:g.string,nameKey:g.string,notMatchedText:g.string,nowrap:g.bool,object:g.bool,onToggle:g.func,overflow:g.bool,requiredText:g.string,searchLabel:g.string,setValuesSelected:g.func,setShow:g.func,show:g.bool,showError:g.bool,showStatus:g.string,values:g.array,valuesSelected:g.array};const wl=6048e5,bl=864e5,xl=Symbol.for("constructDateFrom");function kl(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xl in e?e[xl](t):e instanceof Date?new e.constructor(t):new Date(t)}function El(e,t){return kl(t||e,e)}let Dl={};function Sl(){return Dl}function Cl(e,t){const n=Sl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=El(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 Ml(e,t){return Cl(e,{...t,weekStartsOn:1})}function Tl(e,t){const n=El(e,t?.in),r=n.getFullYear(),a=kl(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=Ml(a),i=kl(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Ml(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Pl(e){const t=El(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 Nl(e,t){const n=El(e,t?.in);return n.setHours(0,0,0,0),n}function Rl(e,t,n){const[r,a]=function(e,...t){const n=kl.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}(0,e,t),o=Nl(r),i=Nl(a),s=+o-Pl(o),l=+i-Pl(i);return Math.round((s-l)/bl)}function Ol(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+El(e)));var t}const Ll={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 Al(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const _l={date:Al({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Al({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:Al({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Il(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 Yl={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:Il({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Il({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:Il({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:Il({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:Il({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 Vl(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 Bl={ordinalNumber:(Wl={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Wl.matchPattern);if(!n)return null;const r=n[0],a=e.match(Wl.parsePattern);if(!a)return null;let o=Wl.valueCallback?Wl.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:Vl({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:Vl({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:Vl({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:Vl({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:Vl({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 Wl;const jl={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=Ll[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:_l,formatRelative:(e,t,n,r)=>Fl[e],localize:Yl,match:Bl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hl(e,t){const n=El(e,t?.in),r=Rl(n,function(e,t){const n=El(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return r+1}function $l(e,t){const n=El(e,t?.in),r=+Ml(n)-+function(e,t){const n=Tl(e,t),r=kl(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ml(r)}(n);return Math.round(r/wl)+1}function ql(e,t){const n=El(e,t?.in),r=n.getFullYear(),a=Sl(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=kl(t?.in||e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Cl(i,t),l=kl(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Cl(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ul(e,t){const n=El(e,t?.in),r=+Cl(n,t)-+function(e,t){const n=Sl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=ql(e,t),o=kl(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Cl(o,t)}(n,t);return Math.round(r/wl)+1}function Kl(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const zl={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Kl("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Kl(n+1,2)},d:(e,t)=>Kl(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)=>Kl(e.getHours()%12||12,t.length),H:(e,t)=>Kl(e.getHours(),t.length),m:(e,t)=>Kl(e.getMinutes(),t.length),s:(e,t)=>Kl(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Kl(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ql="midnight",Xl="noon",Gl="morning",Zl="afternoon",Jl="evening",ec="night",tc={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 zl.y(e,t)},Y:function(e,t,n,r){const a=ql(e,r),o=a>0?a:1-a;if("YY"===t){return Kl(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Kl(o,t.length)},R:function(e,t){return Kl(Tl(e),t.length)},u:function(e,t){return Kl(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 Kl(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 Kl(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 zl.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 Kl(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=Ul(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):Kl(a,t.length)},I:function(e,t,n){const r=$l(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Kl(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):zl.d(e,t)},D:function(e,t,n){const r=Hl(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Kl(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 Kl(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 Kl(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 Kl(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?Xl:0===r?Ql: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?Jl:r>=12?Zl:r>=4?Gl:ec,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 zl.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):zl.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Kl(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Kl(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):zl.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):zl.s(e,t)},S:function(e,t){return zl.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return rc(r);case"XXXX":case"XX":return ac(r);default:return ac(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return rc(r);case"xxxx":case"xx":return ac(r);default:return ac(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+nc(r,":");default:return"GMT"+ac(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+nc(r,":");default:return"GMT"+ac(r,":")}},t:function(e,t,n){return Kl(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Kl(+e,t.length)}};function nc(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+Kl(o,2)}function rc(e,t){if(e%60==0){return(e>0?"-":"+")+Kl(Math.abs(e)/60,2)}return ac(e,t)}function ac(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Kl(Math.trunc(r/60),2)+t+Kl(r%60,2)}const oc=(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"})}},ic=(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"})}},sc={p:ic,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return oc(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}}",oc(r,t)).replace("{{time}}",ic(a,t))}},lc=/^D+$/,cc=/^Y+$/,uc=["D","DD","YY","YYYY"];const dc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hc=/^'([^]*?)'?$/,mc=/''/g,fc=/[a-zA-Z]/;function gc(e,t,n){const r=Sl(),a=r.locale??jl,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=El(e,n?.in);if(!Ol(s))throw new RangeError("Invalid time value");let l=t.match(pc).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,sc[t])(e,a.formatLong)}return e})).join("").match(dc).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:yc(e)};if(tc[t])return{isToken:!0,value:e};if(t.match(fc))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 cc.test(e)}(r)||function(e){return lc.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),uc.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,tc[r[0]])(s,r,a.localize,c)})).join("")}function yc(e){const t=e.match(hc);return t?t[1].replace(mc,"'"):e}function vc(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=vc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wc(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=vc(e))&&(r&&(r+=" "),r+=t);return r}function bc(e,t){return bc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bc(e,t)}function xc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kc(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var Ec,Dc,Sc=(void 0===Ec&&(Ec=0),function(){return++Ec}),Cc={},Mc={},Tc=["touchstart","touchmove"];function Pc(e,t){var n={};return-1!==Tc.indexOf(t)&&Dc&&(n.passive=!e.props.preventDefault),n}function Nc(t,n){var r,a,o=t.displayName||t.name||"Component";return a=r=function(n){var r,a;function s(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent: "+o+" lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.__getComponentNode=function(){var e=t.getInstance();return"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():i.findDOMNode(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!Mc[t._uid]){void 0===Dc&&(Dc=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}}()),Mc[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),Cc[t._uid]=function(e){var n;null!==t.componentNode&&(t.initTimeStamp>e.timeStamp||(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&kc(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e)))},e.forEach((function(e){document.addEventListener(e,Cc[t._uid],Pc(xc(t),e))}))}},t.disableOnClickOutside=function(){delete Mc[t._uid];var e=Cc[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach((function(n){return document.removeEventListener(n,e,Pc(xc(t),n))})),delete Cc[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=Sc(),t.initTimeStamp=performance.now(),t}a=n,(r=s).prototype=Object.create(a.prototype),r.prototype.constructor=r,bc(r,a);var l=s.prototype;return l.getInstance=function(){if(t.prototype&&!t.prototype.isReactComponent)return this;var e=this.instanceRef;return e.getInstance?e.getInstance():e},l.componentDidMount=function(){"undefined"!=typeof document&&document.createElement&&(this.getInstance(),this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside())},l.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},l.componentWillUnmount=function(){this.disableOnClickOutside()},l.render=function(){var n=this.props;n.excludeScrollbar;var r=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}(n,["excludeScrollbar"]);return t.prototype&&t.prototype.isReactComponent?r.ref=this.getRef:r.wrappedRef=this.getRef,r.disableOnClickOutside=this.disableOnClickOutside,r.enableOnClickOutside=this.enableOnClickOutside,e.createElement(t,r)},s}(e.Component),r.displayName="OnClickOutside("+o+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},r.getClass=function(){return t.getClass?t.getClass():t},a}function Rc(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 Oc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Lc(e,t){const n=Rc(e);return isNaN(t)?Oc(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Ac(e,t){return Oc(e,+Rc(e)+t)}const _c=6048e5,Fc=864e5,Ic=6e4,Yc=36e5;function Vc(e,t){return Ac(e,t*Ic)}function Bc(e,t){const n=Rc(e);if(isNaN(t))return Oc(e,NaN);if(!t)return n;const r=n.getDate(),a=Oc(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);return r>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function Wc(e,t){return Bc(e,3*t)}function jc(e,t){return Ac(e,1e3*t)}function Hc(e,t){return Lc(e,7*t)}function $c(e,t){return Bc(e,12*t)}function qc(e){const t=Rc(e);return t.setHours(0,0,0,0),t}function Uc(e){const t=Rc(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 Kc(e,t){const n=qc(e),r=qc(t),a=+n-Uc(n),o=+r-Uc(r);return Math.round((a-o)/Fc)}function zc(e,t){const n=Rc(e),r=Rc(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Qc(e){const t=Rc(e);return Math.trunc(t.getMonth()/3)+1}function Xc(e,t){const n=Rc(e),r=Rc(t);return 4*(n.getFullYear()-r.getFullYear())+(Qc(n)-Qc(r))}function Gc(e,t){const n=Rc(e),r=Rc(t);return n.getFullYear()-r.getFullYear()}function Zc(e){const t=Rc(e);return t.setHours(23,59,59,999),t}function Jc(e){const t=Rc(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}let eu={};function tu(){return eu}function nu(e){const t=Rc(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}const ru={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 au(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ou={date:au({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:au({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:au({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},iu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function su(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 lu={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:su({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:su({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:su({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:su({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:su({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 cu(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 uu={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:cu({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:cu({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:cu({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:cu({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:cu({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"})},du={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=ru[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:ou,formatRelative:(e,t,n,r)=>iu[e],localize:lu,match:uu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pu(e){const t=Rc(e),n=Oc(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hu(e,t){const n=tu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rc(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 mu(e){return hu(e,{weekStartsOn:1})}function fu(e){const t=Rc(e),n=t.getFullYear(),r=Oc(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=mu(r),o=Oc(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=mu(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function gu(e){const t=Rc(e),n=+mu(t)-+function(e){const t=fu(e),n=Oc(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mu(n)}(t);return Math.round(n/_c)+1}function yu(e,t){const n=Rc(e),r=n.getFullYear(),a=tu(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=Oc(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=hu(i,t),l=Oc(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=hu(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vu(e,t){const n=Rc(e),r=+hu(n,t)-+function(e,t){const n=tu(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=yu(e,t),o=Oc(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),hu(o,t)}(n,t);return Math.round(r/_c)+1}function wu(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const bu={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return wu("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):wu(n+1,2)},d:(e,t)=>wu(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)=>wu(e.getHours()%12||12,t.length),H:(e,t)=>wu(e.getHours(),t.length),m:(e,t)=>wu(e.getMinutes(),t.length),s:(e,t)=>wu(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return wu(Math.trunc(r*Math.pow(10,n-3)),t.length)}},xu="midnight",ku="noon",Eu="morning",Du="afternoon",Su="evening",Cu="night",Mu={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 bu.y(e,t)},Y:function(e,t,n,r){const a=yu(e,r),o=a>0?a:1-a;if("YY"===t){return wu(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):wu(o,t.length)},R:function(e,t){return wu(fu(e),t.length)},u:function(e,t){return wu(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 wu(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 wu(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 bu.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 wu(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=vu(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):wu(a,t.length)},I:function(e,t,n){const r=gu(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):wu(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):bu.d(e,t)},D:function(e,t,n){const r=function(e){const t=Rc(e);return Kc(t,pu(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):wu(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 wu(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 wu(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 wu(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?ku:0===r?xu: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?Su:r>=12?Du:r>=4?Eu:Cu,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 bu.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):bu.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):wu(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):wu(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):bu.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):bu.s(e,t)},S:function(e,t){return bu.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Pu(r);case"XXXX":case"XX":return Nu(r);default:return Nu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Pu(r);case"xxxx":case"xx":return Nu(r);default:return Nu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tu(r,":");default:return"GMT"+Nu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tu(r,":");default:return"GMT"+Nu(r,":")}},t:function(e,t,n){return wu(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return wu(e.getTime(),t.length)}};function Tu(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+wu(o,2)}function Pu(e,t){if(e%60==0){return(e>0?"-":"+")+wu(Math.abs(e)/60,2)}return Nu(e,t)}function Nu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+wu(Math.trunc(r/60),2)+t+wu(r%60,2)}const Ru=(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"})}},Ou=(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"})}},Lu={p:Ou,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Ru(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}}",Ru(r,t)).replace("{{time}}",Ou(a,t))}},Au=/^D+$/,_u=/^Y+$/,Fu=["D","DD","YY","YYYY"];function Iu(e){return Au.test(e)}function Yu(e){return _u.test(e)}function Vu(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),Fu.includes(e))throw new RangeError(r)}function Bu(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Wu(e){if(!Bu(e)&&"number"!=typeof e)return!1;const t=Rc(e);return!isNaN(Number(t))}const ju=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$u=/^'([^]*?)'?$/,qu=/''/g,Uu=/[a-zA-Z]/;function Ku(e,t,n){const r=tu(),a=n?.locale??r.locale??du,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=Rc(e);if(!Wu(s))throw new RangeError("Invalid time value");let l=t.match(Hu).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lu[t])(e,a.formatLong)}return e})).join("").match(ju).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:zu(e)};if(Mu[t])return{isToken:!0,value:e};if(t.match(Uu))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&&Yu(o)||!n?.useAdditionalDayOfYearTokens&&Iu(o))&&Vu(o,t,String(e));return(0,Mu[o[0]])(s,o,a.localize,c)})).join("")}function zu(e){const t=e.match($u);return t?t[1].replace(qu,"'"):e}function Qu(e){return Rc(e).getDate()}function Xu(e){return Rc(e).getHours()}function Gu(e){return Rc(e).getMinutes()}function Zu(e){return Rc(e).getMonth()}function Ju(e){return Rc(e).getSeconds()}function ed(e){return Rc(e).getTime()}function td(e){return Rc(e).getFullYear()}function nd(e,t){const n=Rc(e),r=Rc(t);return n.getTime()>r.getTime()}function rd(e,t){return+Rc(e)<+Rc(t)}function ad(e){const t=Rc(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function od(e,t){const n=+Rc(e),[r,a]=[+Rc(t.start),+Rc(t.end)].sort(((e,t)=>e-t));return n>=r&&n<=a}function id(e){let t;return e.forEach((function(e){const n=Rc(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}function sd(e){let t;return e.forEach((e=>{const n=Rc(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}class ld{subPriority=0;validate(e,t){return!0}}class cd extends ld{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 ud extends ld{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Oc(e,function(e,t){const n=t instanceof Date?Oc(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 dd{run(e,t,n,r){const a=this.parse(e,t,n,r);return a?{setter:new cd(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,n){return!0}}const pd=/^(1[0-2]|0?\d)/,hd=/^(3[0-1]|[0-2]?\d)/,md=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,fd=/^(5[0-3]|[0-4]?\d)/,gd=/^(2[0-3]|[0-1]?\d)/,yd=/^(2[0-4]|[0-1]?\d)/,vd=/^(1[0-1]|0?\d)/,wd=/^(1[0-2]|0?\d)/,bd=/^[0-5]?\d/,xd=/^[0-5]?\d/,kd=/^\d/,Ed=/^\d{1,2}/,Dd=/^\d{1,3}/,Sd=/^\d{1,4}/,Cd=/^-?\d+/,Md=/^-?\d/,Td=/^-?\d{1,2}/,Pd=/^-?\d{1,3}/,Nd=/^-?\d{1,4}/,Rd=/^([+-])(\d{2})(\d{2})?|Z/,Od=/^([+-])(\d{2})(\d{2})|Z/,Ld=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ad=/^([+-])(\d{2}):(\d{2})|Z/,_d=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Fd(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Id(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Yd(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*Yc+o*Ic+1e3*i),rest:t.slice(n[0].length)}}function Vd(e){return Id(Cd,e)}function Bd(e,t){switch(e){case 1:return Id(kd,t);case 2:return Id(Ed,t);case 3:return Id(Dd,t);case 4:return Id(Sd,t);default:return Id(new RegExp("^\\d{1,"+e+"}"),t)}}function Wd(e,t){switch(e){case 1:return Id(Md,t);case 2:return Id(Td,t);case 3:return Id(Pd,t);case 4:return Id(Nd,t);default:return Id(new RegExp("^-?\\d{1,"+e+"}"),t)}}function jd(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Hd(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 $d(e){return e%400==0||e%4==0&&e%100!=0}const qd=[31,28,31,30,31,30,31,31,30,31,30,31],Ud=[31,29,31,30,31,30,31,31,30,31,30,31];function Kd(e,t,n){const r=tu(),a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rc(e),i=o.getDay(),s=7-a;return Lc(o,t<0||t>6?t-(i+s)%7:((t%7+7)%7+s)%7-(i+s)%7)}function zd(e,t){const n=Rc(e),r=function(e){let t=Rc(e).getDay();return 0===t&&(t=7),t}(n);return Lc(n,t-r)}const Qd={G:new class extends dd{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 dd{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 Fd(Bd(4,e),r);case"yo":return Fd(n.ordinalNumber(e,{unit:"year"}),r);default:return Fd(Bd(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=Hd(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 dd{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Fd(Bd(4,e),r);case"Yo":return Fd(n.ordinalNumber(e,{unit:"year"}),r);default:return Fd(Bd(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const a=yu(e,r);if(n.isTwoDigitYear){const t=Hd(n.year,a);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),hu(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),hu(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends dd{priority=130;parse(e,t){return Wd("R"===t?4:t.length,e)}set(e,t,n){const r=Oc(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),mu(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends dd{priority=130;parse(e,t){return Wd("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 dd{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Bd(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 dd{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Bd(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 dd{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 Fd(Id(pd,e),r);case"MM":return Fd(Bd(2,e),r);case"Mo":return Fd(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 dd{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return Fd(Id(pd,e),r);case"LL":return Fd(Bd(2,e),r);case"Lo":return Fd(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 dd{priority=100;parse(e,t,n){switch(t){case"w":return Id(fd,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Bd(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return hu(function(e,t,n){const r=Rc(e),a=vu(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 dd{priority=100;parse(e,t,n){switch(t){case"I":return Id(fd,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Bd(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return mu(function(e,t){const n=Rc(e),r=gu(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 dd{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Id(hd,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Bd(t.length,e)}}validate(e,t){const n=$d(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Ud[r]:t>=1&&t<=qd[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 dd{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Id(md,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Bd(t.length,e)}}validate(e,t){return $d(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 dd{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=Kd(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends dd{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 Fd(Bd(t.length,e),a);case"eo":return Fd(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=Kd(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 dd{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 Fd(Bd(t.length,e),a);case"co":return Fd(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=Kd(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 dd{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Bd(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Fd(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 Fd(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Fd(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Fd(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=zd(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 dd{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(jd(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends dd{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(jd(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends dd{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(jd(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends dd{priority=70;parse(e,t,n){switch(t){case"h":return Id(wd,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"H":return Id(gd,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"K":return Id(vd,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"k":return Id(yd,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=60;parse(e,t,n){switch(t){case"m":return Id(bd,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Bd(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 dd{priority=50;parse(e,t,n){switch(t){case"s":return Id(xd,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Bd(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 dd{priority=30;parse(e,t){return Fd(Bd(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 dd{priority=10;parse(e,t){switch(t){case"X":return Yd(Rd,e);case"XX":return Yd(Od,e);case"XXXX":return Yd(Ld,e);case"XXXXX":return Yd(_d,e);default:return Yd(Ad,e)}}set(e,t,n){return t.timestampIsSet?e:Oc(e,e.getTime()-Uc(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends dd{priority=10;parse(e,t){switch(t){case"x":return Yd(Rd,e);case"xx":return Yd(Od,e);case"xxxx":return Yd(Ld,e);case"xxxxx":return Yd(_d,e);default:return Yd(Ad,e)}}set(e,t,n){return t.timestampIsSet?e:Oc(e,e.getTime()-Uc(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends dd{priority=40;parse(e){return Vd(e)}set(e,t,n){return[Oc(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends dd{priority=20;parse(e){return Vd(e)}set(e,t,n){return[Oc(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Xd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zd=/^'([^]*?)'?$/,Jd=/''/g,ep=/\S/,tp=/[a-zA-Z]/;function np(e,t,n,r){const a=Object.assign({},tu()),o=r?.locale??a.locale??du,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?Rc(n):Oc(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o},c=[new ud],u=t.match(Gd).map((e=>{const t=e[0];if(t in Lu){return(0,Lu[t])(e,o.formatLong)}return e})).join("").match(Xd),d=[];for(let a of u){!r?.useAdditionalWeekYearTokens&&Yu(a)&&Vu(a,t,e),!r?.useAdditionalDayOfYearTokens&&Iu(a)&&Vu(a,t,e);const i=a[0],s=Qd[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 Oc(n,NaN);c.push(r.setter),e=r.rest}else{if(i.match(tp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===a?a="'":"'"===i&&(a=a.match(Zd)[1].replace(Jd,"'")),0!==e.indexOf(a))return Oc(n,NaN);e=e.slice(a.length)}}if(e.length>0&&ep.test(e))return Oc(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=Rc(n);if(isNaN(h.getTime()))return Oc(n,NaN);const m={};for(const e of p){if(!e.validate(h,l))return Oc(n,NaN);const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return Oc(n,h)}function rp(e,t){const n=function(e){const t={},n=e.split(ap.dateTimeDelimiter);let r;if(n.length>2)return t;/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ap.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ap.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length)));if(r){const e=ap.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(op);if(!n)return new Date(NaN);const r=!!n[4],a=lp(n[1]),o=lp(n[2])-1,i=lp(n[3]),s=lp(n[4]),l=lp(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<=(up[t]||(dp(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(dp(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(ip);if(!t)return NaN;const n=cp(t[1]),r=cp(t[2]),a=cp(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*Yc+r*Ic+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(sp);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*Yc+a*Ic)}(n.timezone),isNaN(o)?new Date(NaN):new Date(a+i+o)}const ap={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},op=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ip=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sp=/^([+-])(\d{2})(?::?(\d{2}))?$/;function lp(e){return e?parseInt(e):1}function cp(e){return e&&parseFloat(e.replace(",","."))||0}const up=[31,null,31,30,31,30,31,31,30,31,30,31];function dp(e){return e%400==0||e%4==0&&e%100!=0}function pp(e,t){const n=Rc(e),r=n.getFullYear(),a=n.getDate(),o=Oc(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const i=function(e){const t=Rc(e),n=t.getFullYear(),r=t.getMonth(),a=Oc(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 hp(e,t){const n=Rc(e);return n.setHours(t),n}function mp(e,t){const n=Rc(e);return n.setMinutes(t),n}function fp(e,t){const n=Rc(e),r=t-(Math.trunc(n.getMonth()/3)+1);return pp(n,n.getMonth()+3*r)}function gp(e,t){const n=Rc(e);return n.setSeconds(t),n}function yp(e,t){const n=Rc(e);return isNaN(+n)?Oc(e,NaN):(n.setFullYear(t),n)}function vp(e){const t=Rc(e);return t.setDate(1),t.setHours(0,0,0,0),t}function wp(e,t){return Bc(e,-t)}function bp(e,t){return Wc(e,-t)}function xp(e,t){return Hc(e,-t)}function kp(e,t){return $c(e,-t)}function Ep(e){return Cp(e)?(e.nodeName||"").toLowerCase():"#document"}function Dp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Sp(e){var t;return null==(t=(Cp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Cp(e){return e instanceof Node||e instanceof Dp(e).Node}function Mp(e){return e instanceof Element||e instanceof Dp(e).Element}function Tp(e){return e instanceof HTMLElement||e instanceof Dp(e).HTMLElement}function Pp(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Dp(e).ShadowRoot)}function Np(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Fp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Rp(e){return["table","td","th"].includes(Ep(e))}function Op(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Lp(e){const t=Ap(),n=Fp(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 Ap(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _p(e){return["html","body","#document"].includes(Ep(e))}function Fp(e){return Dp(e).getComputedStyle(e)}function Ip(e){return Mp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yp(e){if("html"===Ep(e))return e;const t=e.assignedSlot||e.parentNode||Pp(e)&&e.host||Sp(e);return Pp(t)?t.host:t}function Vp(e){const t=Yp(e);return _p(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tp(t)&&Np(t)?t:Vp(t)}function Bp(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=Vp(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Dp(a);return o?t.concat(i,i.visualViewport||[],Np(a)?a:[],i.frameElement&&n?Bp(i.frameElement):[]):t.concat(a,Bp(a,[],n))}const Wp=Math.min,jp=Math.max,Hp=Math.round,$p=Math.floor,qp=e=>({x:e,y:e}),Up={left:"right",right:"left",bottom:"top",top:"bottom"},Kp={start:"end",end:"start"};function zp(e,t,n){return jp(e,Wp(t,n))}function Qp(e,t){return"function"==typeof e?e(t):e}function Xp(e){return e.split("-")[0]}function Gp(e){return e.split("-")[1]}function Zp(e){return"y"===e?"height":"width"}function Jp(e){return["top","bottom"].includes(Xp(e))?"y":"x"}function eh(e){return"x"===Jp(e)?"y":"x"}function th(e){return e.replace(/start|end/g,(e=>Kp[e]))}function nh(e){return e.replace(/left|right|bottom|top/g,(e=>Up[e]))}function rh(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 ah(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 oh(e,t,n){let{reference:r,floating:a}=e;const o=Jp(t),i=eh(t),s=Zp(i),l=Xp(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(Gp(t)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1)}return h}function ih(e){const t=Fp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Tp(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=Hp(n)!==o||Hp(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function sh(e){return Mp(e)?e:e.contextElement}function lh(e){const t=sh(e);if(!Tp(t))return qp(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=ih(t);let i=(o?Hp(n.width):n.width)/r,s=(o?Hp(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const ch=qp(0);function uh(e){const t=Dp(e);return Ap()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ch}function dh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=sh(e);let i=qp(1);t&&(r?Mp(r)&&(i=lh(r)):i=lh(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Dp(e))&&t}(o,n,r)?uh(o):qp(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=Dp(o),t=r&&Mp(r)?Dp(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){const e=lh(a),t=a.getBoundingClientRect(),r=Fp(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=Dp(a),a=n.frameElement}}return ah({width:u,height:d,x:l,y:c})}function ph(e){return dh(Sp(e)).left+Ip(e).scrollLeft}function hh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Dp(e),r=Sp(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=Ap();(!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=Sp(e),n=Ip(e),r=e.ownerDocument.body,a=jp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=jp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ph(e);const s=-n.scrollTop;return"rtl"===Fp(r).direction&&(i+=jp(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(Sp(e));else if(Mp(t))r=function(e,t){const n=dh(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Tp(e)?lh(e):qp(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=uh(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return ah(r)}function mh(e,t){const n=Yp(e);return!(n===t||!Mp(n)||_p(n))&&("fixed"===Fp(n).position||mh(n,t))}function fh(e,t,n){const r=Tp(t),a=Sp(t),o="fixed"===n,i=dh(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=qp(0);if(r||!r&&!o)if(("body"!==Ep(t)||Np(a))&&(s=Ip(t)),r){const e=dh(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=ph(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function gh(e){return"static"===Fp(e).position}function yh(e,t){return Tp(e)&&"fixed"!==Fp(e).position?t?t(e):e.offsetParent:null}function vh(e,t){const n=Dp(e);if(Op(e))return n;if(!Tp(e)){let t=Yp(e);for(;t&&!_p(t);){if(Mp(t)&&!gh(t))return t;t=Yp(t)}return n}let r=yh(e,t);for(;r&&Rp(r)&&gh(r);)r=yh(r,t);return r&&_p(r)&&gh(r)&&!Lp(r)?n:r||function(e){let t=Yp(e);for(;Tp(t)&&!_p(t);){if(Op(t))return null;if(Lp(t))return t;t=Yp(t)}return null}(e)||n}const wh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=Sp(r),s=!!t&&Op(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=qp(1);const u=qp(0),d=Tp(r);if((d||!d&&!o)&&(("body"!==Ep(r)||Np(i))&&(l=Ip(r)),Tp(r))){const e=dh(r);c=lh(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:Sp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o="clippingAncestors"===n?Op(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Bp(e,[],!1).filter((e=>Mp(e)&&"body"!==Ep(e))),a=null;const o="fixed"===Fp(e).position;let i=o?Yp(e):e;for(;Mp(i)&&!_p(i);){const t=Fp(i),n=Lp(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||Np(i)&&!n&&mh(e,i))?r=r.filter((e=>e!==i)):a=t,i=Yp(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=hh(t,n,a);return e.top=jp(r.top,e.top),e.right=Wp(r.right,e.right),e.bottom=Wp(r.bottom,e.bottom),e.left=jp(r.left,e.left),e}),hh(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:vh,getElementRects:async function(e){const t=this.getOffsetParent||vh,n=this.getDimensions,r=await n(e.floating);return{reference:fh(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}=ih(e);return{width:t,height:n}},getScale:lh,isElement:Mp,isRTL:function(e){return"rtl"===Fp(e).direction}};function bh(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=sh(e),u=a||o?[...c?Bp(c):[],...Bp(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=Sp(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:-$p(u)+"px "+-$p(a.clientWidth-(c+d))+"px "+-$p(a.clientHeight-(u+p))+"px "+-$p(c)+"px",threshold:jp(0,Wp(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?dh(e):null;return l&&function t(){const r=dh(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 xh=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=Xp(n),s=Gp(n),l="y"===Jp(n),c=["left","top"].includes(i)?-1:1,u=o&&l?-1:1,d=Qp(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}}}}},kh=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}=Qp(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Xp(a),v=Jp(s),w=Xp(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!f?[nh(s)]:function(e){const t=nh(e);return[th(e),t,th(t)]}(s)),k="none"!==m;!p&&k&&x.push(...function(e,t,n,r){const a=Gp(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[]}}(Xp(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(th)))),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}=Qp(t,e),m=rh(h),f=s[p?"floating"===d?"reference":"floating":d],g=ah(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=ah(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=Gp(e),a=eh(e),o=Zp(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nh(i)),[i,nh(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 M,T;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(T=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Jp(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{}}}},Eh=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}=Qp(e,t)||{};if(null==c)return{};const d=rh(u),p={x:n,y:r},h=eh(a),m=Zp(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=Wp(d[y],S),M=Wp(d[v],S),T=C,P=E-f[m]-M,N=E/2-f[m]/2+D,R=zp(T,N,P),O=!l.arrow&&null!=Gp(a)&&N!==R&&o.reference[m]/2-(N<T?C:M)-f[m]/2<0,L=O?N<T?N-T:N-P:0;return{[h]:p[h]+L,data:{[h]:R,centerOffset:N-R-L,...O&&{alignmentOffset:L}},reset:O}}}),Dh=(e,t,n)=>{const r=new Map,a={platform:wh,...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}=oh(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}=oh(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var Sh="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Ch(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(!Ch(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)&&!Ch(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Mh(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Th(e,t){const n=Mh(e);return Math.round(t*n)/n}function Ph(e){const t=u.useRef(e);return Sh((()=>{t.current=e})),t}const Nh=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?Eh({element:n.current,padding:r}).fn(t):{}:n?Eh({element:n,padding:r}).fn(t):{};var a}}),Rh=(e,t)=>({...xh(e),options:[e,t]}),Oh=(e,t)=>({...Nh(e),options:[e,t]}),Lh={...u},Ah=Lh.useInsertionEffect||(e=>e());var _h="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Fh(){return Fh=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},Fh.apply(this,arguments)}let Ih=!1,Yh=0;const Vh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yh++;const Bh=Lh.useId||function(){const[e,t]=u.useState((()=>Ih?Vh():void 0));return _h((()=>{null==e&&t(Vh())}),[]),u.useEffect((()=>{Ih=!0}),[]),e},Wh=u.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:a}},width:o=14,height:i=7,tipRadius:s=0,strokeWidth:l=0,staticOffset:c,stroke:d,d:p,style:{transform:h,...m}={},...f}=e,g=Bh(),[y,v]=u.useState(!1);if(_h((()=>{if(!r)return;"rtl"===Fp(r).direction&&v(!0)}),[r]),!r)return null;const w=2*l,b=w/2,x=o/2*(s/-8+1),k=i/2*s/4,[E,D]=n.split("-"),S=!!p,C="top"===E||"bottom"===E,M=c&&"end"===D?"bottom":"top";let T=c&&"end"===D?"right":"left";c&&y&&(T="end"===D?"left":"right");const P=null!=(null==a?void 0:a.x)?c||a.x:"",N=null!=(null==a?void 0:a.y)?c||a.y:"",R=p||"M0,0 H"+o+" L"+(o-x)+","+(i-k)+" Q"+o/2+","+i+" "+x+","+(i-k)+" Z",O={top:S?"rotate(180deg)":"",left:S?"rotate(90deg)":"rotate(-90deg)",bottom:S?"":"rotate(180deg)",right:S?"rotate(-90deg)":"rotate(90deg)"}[E];return u.createElement("svg",Fh({},f,{"aria-hidden":!0,ref:t,width:S?o:o+w,height:o,viewBox:"0 0 "+o+" "+(i>o?i:o),style:{position:"absolute",pointerEvents:"none",[T]:P,[M]:N,[E]:C||S?"100%":"calc(100% - "+w/2+"px)",transform:""+O+(null!=h?h:""),...m}}),w>0&&u.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:w+(p?0:1),d:R}),u.createElement("path",{stroke:w&&!p?f.fill:"none",d:R}),u.createElement("clipPath",{id:g},u.createElement("rect",{x:-b,y:b*(S?-1:1),width:o+w,height:o})))}));const jh=u.createContext(null),Hh=u.createContext(null),$h=()=>{var e;return(null==(e=u.useContext(jh))?void 0:e.id)||null},qh=()=>u.useContext(Hh);function Uh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,a=Bh(),o=u.useRef({}),[i]=u.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)))||[])}}}())),s=null!=$h(),[l,c]=u.useState(r.reference),d=function(e){const t=u.useRef((()=>{}));return Ah((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,r)=>{o.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=u.useMemo((()=>({setPositionReference:c})),[]),h=u.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return u.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:i,floatingId:a,refs:p})),[t,d,h,i,a,p])}function Kh(e){void 0===e&&(e={});const{nodeId:t}=e,n=Uh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[o,i]=u.useState(null),[s,l]=u.useState(null),c=(null==a?void 0:a.reference)||o,p=u.useRef(null),h=qh();_h((()=>{c&&(p.current=c)}),[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[p,h]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=u.useState(r);Ch(m,r)||f(r);const[g,y]=u.useState(null),[v,w]=u.useState(null),b=u.useCallback((e=>{e!==D.current&&(D.current=e,y(e))}),[]),x=u.useCallback((e=>{e!==S.current&&(S.current=e,w(e))}),[]),k=o||g,E=i||v,D=u.useRef(null),S=u.useRef(null),C=u.useRef(p),M=null!=l,T=Ph(l),P=Ph(a),N=u.useCallback((()=>{if(!D.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),Dh(D.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Ch(C.current,t)&&(C.current=t,d.flushSync((()=>{h(t)})))}))}),[m,t,n,P]);Sh((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const R=u.useRef(!1);Sh((()=>(R.current=!0,()=>{R.current=!1})),[]),Sh((()=>{if(k&&(D.current=k),E&&(S.current=E),k&&E){if(T.current)return T.current(k,E,N);N()}}),[k,E,N,T,M]);const O=u.useMemo((()=>({reference:D,floating:S,setReference:b,setFloating:x})),[b,x]),L=u.useMemo((()=>({reference:k,floating:E})),[k,E]),A=u.useMemo((()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Th(L.floating,p.x),r=Th(L.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Mh(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,L.floating,p.x,p.y]);return u.useMemo((()=>({...p,update:N,refs:O,elements:L,floatingStyles:A})),[p,N,O,L,A])}({...e,elements:{...a,...s&&{reference:s}}}),f=u.useCallback((e=>{const t=Mp(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),m.refs.setReference(t)}),[m.refs]),g=u.useCallback((e=>{(Mp(e)||null===e)&&(p.current=e,i(e)),(Mp(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!Mp(e))&&m.refs.setReference(e)}),[m.refs]),y=u.useMemo((()=>({...m.refs,setReference:g,setPositionReference:f,domReference:p})),[m.refs,g,f]),v=u.useMemo((()=>({...m.elements,domReference:c})),[m.elements,c]),w=u.useMemo((()=>({...m,...r,refs:y,elements:v,nodeId:t})),[m,y,v,t,r]);return _h((()=>{r.dataRef.current.floatingContext=w;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),u.useMemo((()=>({...m,context:w,refs:y,elements:v})),[m,y,v,w])}
1
+ "use strict";var e=require("react"),t=require("react-bootstrap/Dropdown"),n=require("react/jsx-runtime"),r=require("js-cookie"),a=require("axios"),o=require("react-bootstrap"),i=require("react-dom"),s=require("react-bootstrap/Toast"),l=require("react-bootstrap/Container");function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=c(e),d=c(i);function p(){}function h(){}h.resetWarningCache=p;var m,f,g=(m=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:h,resetWarningCache:p};return n.PropTypes=n,n}()},m(f={exports:{}},f.exports),f.exports),y=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,v=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,w=/^(?:(min|max)-)?(.+)/,b=/(em|rem|px|cm|mm|in|pt|pc)?$/,x=/(dpi|dpcm|dppx)?$/;function k(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(y),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(v),n=t[1].toLowerCase().match(w);return{modifier:n[1],feature:n[2],value:t[2]}})),o}))}function E(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function D(e){var t=parseFloat(e);switch(String(e).match(x)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function S(e){var t=parseFloat(e);switch(String(e).match(b)[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 C={match:function(e,t){return k(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=S(a),o=S(o);break;case"resolution":a=D(a),o=D(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=E(a),o=E(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:k}.match,M="undefined"!=typeof window?window.matchMedia:null;function T(e,t,n){var r,a=this;function o(e){a.matches=e.matches,a.media=e.media}M&&!n&&(r=M.call(window,e)),r?(this.matches=r.matches,this.media=r.media,r.addListener(o)):(this.matches=C(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 P=function(e,t,n){return new T(e,t,n)},N=/[A-Z]/g,R=/^ms-/,O={};function L(e){return"-"+e.toLowerCase()}function A(e){if(O.hasOwnProperty(e))return O[e];var t=e.replace(N,L);return O[e]=R.test(t)?"-"+t:t}const _=g.oneOfType([g.string,g.number]),F={all:g.bool,grid:g.bool,aural:g.bool,braille:g.bool,handheld:g.bool,print:g.bool,projection:g.bool,screen:g.bool,tty:g.bool,tv:g.bool,embossed:g.bool},I={orientation:g.oneOf(["portrait","landscape"]),scan:g.oneOf(["progressive","interlace"]),aspectRatio:g.string,deviceAspectRatio:g.string,height:_,deviceHeight:_,width:_,deviceWidth:_,color:g.bool,colorIndex:g.bool,monochrome:g.bool,resolution:_,type:Object.keys(F)},{type:Y,...V}=I,B={minAspectRatio:g.string,maxAspectRatio:g.string,minDeviceAspectRatio:g.string,maxDeviceAspectRatio:g.string,minHeight:_,maxHeight:_,minDeviceHeight:_,maxDeviceHeight:_,minWidth:_,maxWidth:_,minDeviceWidth:_,maxDeviceWidth:_,minColor:g.number,maxColor:g.number,minColorIndex:g.number,maxColorIndex:g.number,minMonochrome:g.number,maxMonochrome:g.number,minResolution:_,maxResolution:_,...V};var W={all:{...F,...B},types:F,matchers:I,features:B};const j=e=>{const t=[];return Object.keys(W.all).forEach((n=>{const r=e[n];null!=r&&t.push(((e,t)=>{const n=A(e);return"number"==typeof t&&(t=`${t}px`),!0===t?n:!1===t?`not ${n}`:`(${n}: ${t})`})(n,r))})),t.join(" and ")},H=e.createContext(void 0),$=e=>{if(!e)return;return Object.keys(e).reduce(((t,n)=>(t[A(n)]=e[n],t)),{})},q=()=>{const t=e.useRef(!1);return e.useEffect((()=>{t.current=!0}),[]),t.current},U=t=>{const n=e.useContext(H),r=()=>$(t)||$(n),[a,o]=e.useState(r);return e.useEffect((()=>{const e=r();(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)||o(e)}),[t,n]),a},K=t=>{const n=()=>(e=>e.query||j(e))(t),[r,a]=e.useState(n);return e.useEffect((()=>{const e=n();r!==e&&a(e)}),[t]),r},z=(t,n,r)=>{const a=U(n),o=K(t);if(!o)throw new Error("Invalid or missing MediaQuery!");const i=((t,n)=>{const r=()=>P(t,n||{},!!n),[a,o]=e.useState(r),i=q();return e.useEffect((()=>{if(i){const e=r();return o(e),()=>{e&&e.dispose()}}}),[t,n]),a})(o,a),s=(t=>{const[n,r]=e.useState(t.matches);return e.useEffect((()=>{const e=e=>{r(e.matches)};return t.addListener(e),r(t.matches),()=>{t.removeListener(e)}}),[t]),n})(i),l=q();return e.useEffect((()=>{l&&r&&r(s)}),[s]),e.useEffect((()=>()=>{i&&i.dispose()}),[]),s},Q=({animation:t="",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(t){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 e.createElement("i",{className:`${i} ${s} ${l} ${c} ${n}`,"aria-hidden":"true"})};Q.propTypes={animation:g.oneOf(["beat","fade","beat-fade","bounce","flip","shake","spin","spin-reverse"]),className:g.string,name:g.string,scale:g.oneOf([.7,1,2,3,4]),style:g.oneOf(["light","solid","regular","thin","duotone","sharp","brands"])};const X=({animation:t=!1,children:n,className:r="",icon:a=!0,onClose:o=null,size:i="md",type:s="info"})=>e.createElement("div",{className:`alert ${t?"alert-animation":""} alert-${s} alert-${i} ${r}`,role:"alert"},e.createElement("div",{className:"alert-wrapper"},a&&e.createElement(Q,{style:"solid",name:{info:"circle-info",success:"check",warning:"triangle-exclamation",danger:"circle-xmark"}[s]}),e.createElement("span",null,n)),o&&e.createElement("button",{onClick:o,className:"btn-close"},e.createElement(Q,{style:"solid",name:"xmark"})));X.propTypes={animation:g.bool,children:g.node.isRequired,className:g.string,icon:g.bool,onClose:g.func,size:g.oneOf(["xs","md","lg"]),type:g.oneOf(["warning","danger","success","info"]).isRequired};const G=({as:t="",className:n="",onChange:r,onSave:a,value:o})=>{const[i,s]=e.useState(!1),[l,c]=e.useState(o),[u,d]=e.useState(!1),[p,h]=e.useState(!1),[m,f]=e.useState({}),g=e.useRef(null),y=e.useRef(null),v=async e=>{try{if(""===e.trim())return r(l),void s(!1);await a(e),d(!0),s(!1),setTimeout((()=>{d(!1)}),2e3)}catch(e){throw h(!0),s(!1),setTimeout((()=>{h(!1)}),2e3),e}};e.useEffect((()=>{i&&g.current&&g.current.focus()}),[i]),e.useEffect((()=>{if(y.current&&!i){const e=window.getComputedStyle(y.current),t=parseFloat(e.width)+2*parseFloat(e.fontSize);f({fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,width:`${t}px`})}}),[i]);const w=()=>e.createElement("svg",{className:"success-check-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7.07",stroke:"currentColor",strokeWidth:"1.4",className:"success-circle"}),e.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 e.createElement("div",{className:`editable-content ${u?"success":""} ${n}`,onClick:()=>{u||(c(o),s(!0))}},i?e.createElement("input",{type:"text",value:o,ref:g,onBlur:()=>{s(!1),o!==l&&v(o)},onChange:({target:e})=>{r(e.value)},onKeyDown:e=>{"Enter"===e.key?(v(o),s(!1)):"Escape"===e.key&&(r(l),s(!1))},style:m}):e.createElement("div",{className:"editable-content-display",style:{fontSize:m.fontSize}},e.createElement(t,{className:p?"error":"",ref:y},o),u&&e.createElement("div",{className:"success-animation"},e.createElement(w,null))))};G.propTypes={as:g.string.isRequired,className:g.string,onChange:g.func.isRequired,onSave:g.func.isRequired,value:g.string};const Z=({logo:t="groovinads",className:n=""})=>e.createElement("div",{className:`login-source ${t||""} ${n}`,"aria-label":`${t} logo`});Z.propTypes={className:g.string,logo:g.oneOf(["groovinads","google","microsoft","linkedin","slack"])};const J=({children:t,className:n="",closeButton:r=!1,color:a="neutral",disabled:o=!1,onClick:i})=>e.createElement("div",{className:`pill ${a} ${n} ${o?"disabled":""}`},e.createElement("span",null,t),r&&e.createElement("button",{onClick:i},e.createElement(Q,{style:"solid",name:"xmark",scale:.7})));J.propTypes={className:g.string,closeButton:g.bool,color:g.oneOf(["green","yellow","red","danger","neutral","blue","light","midtone","dark"]),disabled:g.bool,onClick:g.func};const ee=({className:t="",scale:n=1})=>e.createElement(Q,{name:"spinner-third",scale:n,animation:"spin",className:t});ee.propTypes={className:g.string,scale:g.oneOf([.7,1,2,3,4])};const te=({animated:t=!1,className:n="",status:r=0})=>e.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} ${t?"animated":""}`},e.createElement("circle",{cx:3===r?"12":"8",cy:"8",r:"8"}),(()=>{switch(r){case 1:return e.createElement(e.Fragment,null,e.createElement("polyline",{className:"line-back",points:"0 7.99 4.99 7.99 6.29 12 9.82 4 10.99 8 16 8"}),e.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 e.createElement(e.Fragment,null,e.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"}),e.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"}),e.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"}),e.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}})());te.propTypes={animated:g.bool,className:g.string,status:g.number.isRequired};const ne=({children:t,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=z({query:"(max-width: 768px)"}),h=s?e.createElement(e.Fragment,null,e.createElement(ee,{scale:1}),t&&e.createElement("span",null,t,"…")):e.createElement(e.Fragment,null,c&&e.createElement(Q,{style:"solid",name:c,scale:1}),t&&!(p&&o)&&e.createElement("span",null,t),a&&e.createElement(Q,{style:"solid",name:a,scale:1}));return e.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 re(){return re=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},re.apply(null,arguments)}ne.propTypes={children:g.node,className:g.string,disabled:g.bool,endIcon:g.string,hideLabelOnMobile:g.bool,onClick:g.func,processing:g.bool,size:g.oneOf(["xs","md","lg"]),startIcon:g.string,style:g.oneOf(["default","success","danger","warning","link"]),variant:g.oneOf(["primary","secondary","terciary","outline"])};const ae=e.createContext({});const oe="undefined"!=typeof window,ie=oe?e.useLayoutEffect:e.useEffect,se=e.createContext(null);function le(e,t){-1===e.indexOf(t)&&e.push(t)}function ce(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ue=(e,t,n)=>n>t?t:n<e?e:n;let de=()=>{};const pe={},he=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function me(e){return"object"==typeof e&&null!==e}const fe=e=>/^0[^.\s]+$/u.test(e);function ge(e){let t;return()=>(void 0===t&&(t=e()),t)}const ye=e=>e,ve=(e,t)=>n=>t(e(n)),we=(...e)=>e.reduce(ve),be=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class xe{constructor(){this.subscriptions=[]}add(e){return le(this.subscriptions,e),()=>ce(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 ke=e=>1e3*e,Ee=e=>e/1e3;function De(e,t){return t?e*(1e3/t):0}const Se=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ce=1e-7,Me=12;function Te(e,t,n,r){if(e===t&&n===r)return ye;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=Se(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>Ce&&++s<Me);return i}(t,0,1,e,n);return e=>0===e||1===e?e:Se(a(e),t,r)}const Pe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ne=e=>t=>1-e(1-t),Re=Te(.33,1.53,.69,.99),Oe=Ne(Re),Le=Pe(Oe),Ae=e=>(e*=2)<1?.5*Oe(e):.5*(2-Math.pow(2,-10*(e-1))),_e=e=>1-Math.sin(Math.acos(e)),Fe=Ne(_e),Ie=Pe(_e),Ye=Te(.42,0,1,1),Ve=Te(0,0,.58,1),Be=Te(.42,0,.58,1),We=e=>Array.isArray(e)&&"number"==typeof e[0],je={linear:ye,easeIn:Ye,easeInOut:Be,easeOut:Ve,circIn:_e,circInOut:Ie,circOut:Fe,backIn:Oe,backInOut:Le,backOut:Re,anticipate:Ae},He=e=>{if(We(e)){de(4===e.length);const[t,n,r,a]=e;return Te(t,n,r,a)}return"string"==typeof e?(de(void 0!==je[e]),je[e]):e},$e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],qe={value:null,addProjectionMetrics:null};function Ue(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=$e.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&&qe.value&&qe.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=pe.useManualTiming?a.timestamp:performance.now();n=!1,pe.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:$e.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<$e.length;t++)i[$e[t]].cancel(e)},state:a,steps:i}}const{schedule:Ke,cancel:ze,state:Qe,steps:Xe}=Ue("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ye,!0);let Ge;function Ze(){Ge=void 0}const Je={now:()=>(void 0===Ge&&Je.set(Qe.isProcessing||pe.useManualTiming?Qe.timestamp:performance.now()),Ge),set:e=>{Ge=e,queueMicrotask(Ze)}},et=e=>t=>"string"==typeof t&&t.startsWith(e),tt=et("--"),nt=et("var(--"),rt=e=>!!nt(e)&&at.test(e.split("/*")[0].trim()),at=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ot={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},it={...ot,transform:e=>ue(0,1,e)},st={...ot,default:1},lt=e=>Math.round(1e5*e)/1e5,ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ut=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(e,t)=>n=>Boolean("string"==typeof n&&ut.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),pt=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(ct);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},ht={...ot,transform:e=>Math.round((e=>ue(0,255,e))(e))},mt={test:dt("rgb","red"),parse:pt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ht.transform(e)+", "+ht.transform(t)+", "+ht.transform(n)+", "+lt(it.transform(r))+")"};const ft={test:dt("#"),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:mt.transform},gt=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),yt=gt("deg"),vt=gt("%"),wt=gt("px"),bt=gt("vh"),xt=gt("vw"),kt=(()=>({...vt,parse:e=>vt.parse(e)/100,transform:e=>vt.transform(100*e)}))(),Et={test:dt("hsl","hue"),parse:pt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+vt.transform(lt(t))+", "+vt.transform(lt(n))+", "+lt(it.transform(r))+")"},Dt={test:e=>mt.test(e)||ft.test(e)||Et.test(e),parse:e=>mt.test(e)?mt.parse(e):Et.test(e)?Et.parse(e):ft.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?mt.transform(e):Et.transform(e),getAnimatableNone:e=>{const t=Dt.parse(e);return t.alpha=0,Dt.transform(t)}},St=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Ct="number",Mt="color",Tt="var",Pt="var(",Nt="${}",Rt=/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 Ot(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;const i=t.replace(Rt,(e=>(Dt.test(e)?(r.color.push(o),a.push(Mt),n.push(Dt.parse(e))):e.startsWith(Pt)?(r.var.push(o),a.push(Tt),n.push(e)):(r.number.push(o),a.push(Ct),n.push(parseFloat(e))),++o,Nt))).split(Nt);return{values:n,split:i,indexes:r,types:a}}function Lt(e){return Ot(e).values}function At(e){const{split:t,types:n}=Ot(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===Ct?lt(e[o]):t===Mt?Dt.transform(e[o]):e[o]}return a}}const _t=e=>"number"==typeof e?0:Dt.test(e)?Dt.getAnimatableNone(e):e;const Ft={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ct)?.length||0)+(e.match(St)?.length||0)>0},parse:Lt,createTransformer:At,getAnimatableNone:function(e){const t=Lt(e);return At(e)(t.map(_t))}};function It(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 Yt(e,t){return n=>n>0?t:e}const Vt=(e,t,n)=>e+(t-e)*n,Bt=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},Wt=[ft,mt,Et];function jt(e){const t=(n=e,Wt.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Et&&(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=It(s,r,e+1/3),o=It(s,r,e),i=It(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 Ht=(e,t)=>{const n=jt(e),r=jt(t);if(!n||!r)return Yt(e,t);const a={...n};return e=>(a.red=Bt(n.red,r.red,e),a.green=Bt(n.green,r.green,e),a.blue=Bt(n.blue,r.blue,e),a.alpha=Vt(n.alpha,r.alpha,e),mt.transform(a))},$t=new Set(["none","hidden"]);function qt(e,t){return n=>Vt(e,t,n)}function Ut(e){return"number"==typeof e?qt:"string"==typeof e?rt(e)?Yt:Dt.test(e)?Ht:Qt:Array.isArray(e)?Kt:"object"==typeof e?Dt.test(e)?Ht:zt:Yt}function Kt(e,t){const n=[...e],r=n.length,a=e.map(((e,n)=>Ut(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function zt(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=Ut(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Qt=(e,t)=>{const n=Ft.createTransformer(t),r=Ot(e),a=Ot(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?$t.has(e)&&!a.values.length||$t.has(t)&&!r.values.length?function(e,t){return $t.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):we(Kt(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):Yt(e,t)};function Xt(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Vt(e,t,n);return Ut(e)(e,t)}const Gt=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ke.update(t,e),stop:()=>ze(t),now:()=>Qe.isProcessing?Qe.timestamp:Je.now()}},Zt=(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)})`},Jt=2e4;function en(e){let t=0;let n=e.next(t);for(;!n.done&&t<Jt;)t+=50,n=e.next(t);return t>=Jt?1/0:t}const tn=5;function nn(e,t,n){const r=Math.max(t-tn,0);return De(n-e(r),t-r)}const rn={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},an=.001;function on({duration:e=rn.duration,bounce:t=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let a,o,i=1-t;i=ue(rn.minDamping,rn.maxDamping,i),e=ue(rn.minDuration,rn.maxDuration,Ee(e)),i<1?(a=t=>{const r=t*i,a=r*e,o=r-n,s=ln(t,i),l=Math.exp(-a);return an-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=ln(Math.pow(t,2),i);return(-a(t)+an>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-an,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<sn;n++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=ke(e),isNaN(s))return{stiffness:rn.stiffness,damping:rn.damping,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}const sn=12;function ln(e,t){return e*Math.sqrt(1-t*t)}const cn=["duration","bounce"],un=["stiffness","damping","mass"];function dn(e,t){return t.some((t=>void 0!==e[t]))}function pn(e=rn.visualDuration,t=rn.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:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...e};if(!dn(e,un)&&dn(e,cn))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*ue(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:rn.mass,stiffness:a,damping:o}}else{const n=on(e);t={...t,...n,mass:rn.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ee(n.velocity||0)}),m=p||0,f=c/(2*Math.sqrt(l*u)),g=i-o,y=Ee(Math.sqrt(l/u)),v=Math.abs(g)<5;let w;if(r||(r=v?rn.restSpeed.granular:rn.restSpeed.default),a||(a=v?rn.restDelta.granular:rn.restDelta.default),f<1){const e=ln(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?ke(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(en(b),Jt),t=Zt((t=>b.next(e*t).value),e,30);return e+"ms "+t},toTransition:()=>{}};return b}function hn({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=pn({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 mn(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(de(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||pe.mix||Xt,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]||ye:t;o=we(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=be(e[r],e[r+1],n);return s[r](a)};return n?t=>c(ue(e[0],e[o-1],t)):c}function fn(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=be(0,t,r);e.push(Vt(n,1,a))}}(t,e.length-1),t}function gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(He):He(r),o={done:!1,value:t[0]},i=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:fn(t),e),s=mn(i,t,{ease:Array.isArray(a)?a:(l=t,c=a,l.map((()=>c||Be)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}pn.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(en(r),Jt);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:Ee(a)}}(e,100,pn);return e.ease=t.ease,e.duration=ke(t.duration),e.type="keyframes",e};const yn=e=>null!==e;function vn(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(yn),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const wn={decay:hn,inertia:hn,tween:gn,keyframes:gn,spring:pn};function bn(e){"string"==typeof e.type&&(e.type=wn[e.type])}class xn{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 kn=e=>e/100;class En extends xn{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!==Je.now()&&this.tick(Je.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;bn(e);const{type:t=gn,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||gn;s!==gn&&"number"!=typeof i[0]&&(this.mixKeyframes=we(kn,Xt(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=en(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=ue(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!==hn&&(b.value=vn(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 Ee(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ee(e)}get time(){return Ee(this.currentTime)}set time(e){e=ke(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(Je.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ee(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Gt,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(Je.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 Dn=e=>180*e/Math.PI,Sn=e=>{const t=Dn(Math.atan2(e[1],e[0]));return Mn(t)},Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sn,rotateZ:Sn,skewX:e=>Dn(Math.atan(e[1])),skewY:e=>Dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Mn=e=>((e%=360)<0&&(e+=360),e),Tn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Pn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Nn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:Pn,scale:e=>(Tn(e)+Pn(e))/2,rotateX:e=>Mn(Dn(Math.atan2(e[6],e[5]))),rotateY:e=>Mn(Dn(Math.atan2(-e[2],e[0]))),rotateZ:Sn,rotate:Sn,skewX:e=>Dn(Math.atan(e[4])),skewY:e=>Dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Rn(e){return e.includes("scale")?1:0}function On(e,t){if(!e||"none"===e)return Rn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Nn,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Cn,a=t}if(!a)return Rn(t);const o=r[t],i=a[1].split(",").map(Ln);return"function"==typeof o?o(i):i[o]}function Ln(e){return parseFloat(e.trim())}const An=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_n=(()=>new Set(An))(),Fn=e=>e===ot||e===wt,In=new Set(["x","y","z"]),Yn=An.filter((e=>!In.has(e)));const Vn={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})=>On(t,"x"),y:(e,{transform:t})=>On(t,"y")};Vn.translateX=Vn.x,Vn.translateY=Vn.y;const Bn=new Set;let Wn=!1,jn=!1,Hn=!1;function $n(){if(jn){const e=Array.from(Bn).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 Yn.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)}))}jn=!1,Wn=!1,Bn.forEach((e=>e.complete(Hn))),Bn.clear()}function qn(){Bn.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(jn=!0)}))}class Un{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?(Bn.add(this),Wn||(Wn=!0,Ke.read(qn),Ke.resolveKeyframes($n))):(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),Bn.delete(this)}cancel(){"scheduled"===this.state&&(Bn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Kn=ge((()=>void 0!==window.ScrollTimeline)),zn={};function Qn(e,t){const n=ge(e);return()=>zn[t]??n()}const Xn=Qn((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Zn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function Jn(e,t){return e?"function"==typeof e?Xn()?Zt(e,t):"ease-out":We(e)?Gn(e):Array.isArray(e)?e.map((e=>Jn(e,t)||Zn.easeOut)):Zn[e]:void 0}function er(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=Jn(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 tr(e){return"function"==typeof e&&"applyToOptions"in e}class nr extends xn{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,de("string"!=typeof e.type);const l=function({type:e,...t}){return tr(e)&&Xn()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=er(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=vn(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 Ee(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ee(e)}get time(){return Ee(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ke(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&&Kn()?(this.animation.timeline=e,ye):t(this)}}const rr={anticipate:Ae,backInOut:Le,circInOut:Ie};function ar(e){"string"==typeof e.ease&&e.ease in rr&&(e.ease=rr[e.ease])}class or extends nr{constructor(e){ar(e),bn(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 En({...o,autoplay:!1}),s=ke(this.finishedTime??this.time);t.setWithVelocity(i.sample(s-10).value,i.sample(s).value,10),i.stop()}}const ir=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ft.test(e)&&"0"!==e||e.startsWith("url(")));function sr(e){e.duration=0,e.type="keyframes"}const lr=new Set(["opacity","clipPath","filter","transform"]),cr=ge((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class ur extends xn{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=Je.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||Un;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=Je.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=ir(a,t),s=ir(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||tr(n))&&r)}(e,a,o,i)||(!pe.instantAnimations&&s||c?.(vn(e,n,t)),e[0]=e[e.length-1],sr(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 cr()&&n&&lr.has(n)&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}(u)?new or({...u,element:u.motionValue.owner.current}):new En(u);d.finished.then((()=>this.notifyFinished())).catch(ye),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(),Hn=!0,qn(),$n(),Hn=!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 dr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pr(e,t,n=1){const[r,a]=function(e){const t=dr.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 he(e)?parseFloat(e):e}return rt(a)?pr(a,t,n+1):a}function hr(e,t){return e?.[t]??e?.default??e}const mr=new Set(["width","height","top","left","right","bottom",...An]),fr=e=>t=>t.test(e),gr=[ot,wt,vt,yt,xt,bt,{test:e=>"auto"===e,parse:e=>e}],yr=e=>gr.find(fr(e));const vr=new Set(["brightness","contrast","saturate","opacity"]);function wr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ct)||[];if(!r)return e;const a=n.replace(r,"");let o=vr.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}const br=/\b([a-z-]*)\(.*?\)/gu,xr={...Ft,getAnimatableNone:e=>{const t=e.match(br);return t?t.map(wr).join(" "):e}},kr={...ot,transform:Math.round},Er={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,backgroundPositionX:wt,backgroundPositionY:wt,...{rotate:yt,rotateX:yt,rotateY:yt,rotateZ:yt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:yt,skewX:yt,skewY:yt,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:it,originX:kt,originY:kt,originZ:wt},zIndex:kr,fillOpacity:it,strokeOpacity:it,numOctaves:kr},Dr={...Er,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:xr,WebkitFilter:xr},Sr=e=>Dr[e];function Cr(e,t){let n=Sr(e);return n!==xr&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Mr=new Set(["auto","none","0"]);class Tr extends Un{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(),rt(r))){const a=pr(r,t.current);void 0!==a&&(e[n]=a),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!mr.has(n)||2!==e.length)return;const[r,a]=e,o=yr(r),i=yr(a);if(o!==i)if(Fn(o)&&Fn(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else Vn[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||fe(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&&!Mr.has(t)&&Ot(t).values.length&&(r=e[a]),a++}if(r&&n)for(const a of t)e[a]=Cr(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=Vn[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]=Vn[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 Pr=(e,t)=>t&&"number"==typeof e?t.transform(e):e;class Nr{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Je.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=Je.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 xe);const n=this.events[e].add(t);return"change"===e?()=>{n(),Ke.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=Je.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return De(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 Rr(e,t){return new Nr(e,t)}const{schedule:Or,cancel:Lr}=Ue(queueMicrotask,!1),Ar={x:!1,y:!1};function _r(){return Ar.x||Ar.y}function Fr(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 Ir(e){return!("touch"===e.pointerType||_r())}const Yr=(e,t)=>!!t&&(e===t||Yr(e,t.parentElement)),Vr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Br=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Wr=new WeakSet;function jr(e){return t=>{"Enter"===t.key&&e(t)}}function Hr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function $r(e){return Vr(e)&&!_r()}function qr(e,t,n={}){const[r,a,o]=Fr(e,n),i=e=>{const r=e.currentTarget;if(!$r(e))return;Wr.add(r);const o=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Wr.has(r)&&Wr.delete(r),$r(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Yr(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),me(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=jr((()=>{if(Wr.has(n))return;Hr(n,"down");const e=jr((()=>{Hr(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Hr(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,a))),function(e){return Br.has(e.tagName)||-1!==e.tabIndex}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))})),o}function Ur(e){return me(e)&&"ownerSVGElement"in e}const Kr=e=>Boolean(e&&e.getVelocity),zr=[...gr,Dt,Ft],Qr=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});const Xr=e.createContext({strict:!1}),Gr={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"]},Zr={};for(const e in Gr)Zr[e]={isEnabled:t=>Gr[e].some((e=>!!t[e]))};const Jr=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 ea(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Jr.has(e)}let ta=e=>!ea(e);try{"function"==typeof(na=require("@emotion/is-prop-valid").default)&&(ta=e=>e.startsWith("on")?!ea(e):na(e))}catch{}var na;const ra=e.createContext({});function aa(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function oa(e){return"string"==typeof e||Array.isArray(e)}const ia=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sa=["initial",...ia];function la(e){return aa(e.animate)||sa.some((t=>oa(e[t])))}function ca(e){return Boolean(la(e)||e.variants)}function ua(t){const{initial:n,animate:r}=function(e,t){if(la(e)){const{initial:t,animate:n}=e;return{initial:!1===t||oa(t)?t:void 0,animate:oa(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(ra));return e.useMemo((()=>({initial:n,animate:r})),[da(n),da(r)])}function da(e){return Array.isArray(e)?e.join(" "):e}const pa={};function ha(e,{layout:t,layoutId:n}){return _n.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!pa[e]||"opacity"===e)}const ma={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fa=An.length;function ga(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(_n.has(e))i=!0;else if(tt(e))a[e]=n;else{const t=Pr(n,Er[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<fa;o++){const i=An[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=Pr(s,Er[i]);l||(a=!1,r+=`${ma[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 ya=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function va(e,t,n){for(const r in t)Kr(t[r])||ha(r,n)||(e[r]=t[r])}function wa(t,n){const r={};return va(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo((()=>{const e=ya();return ga(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}function ba(e,t){const n={},r=wa(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 xa={offset:"stroke-dashoffset",array:"stroke-dasharray"},ka={offset:"strokeDashoffset",array:"strokeDasharray"};function Ea(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,u){if(ga(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?xa:ka;e[o.offset]=wt.transform(-r);const i=wt.transform(t),s=wt.transform(n);e[o.array]=`${i} ${s}`}(d,a,o,i,!1)}const Da=()=>({...ya(),attrs:{}}),Sa=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Ca(t,n,r,a){const o=e.useMemo((()=>{const e=Da();return Ea(e,n,Sa(a),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};va(e,t.style,t),o.style={...e,...o.style}}return o}const Ma=["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 Ta(e){return"string"==typeof e&&!e.includes("-")&&!!(Ma.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pa(t,n,r,{latestValues:a},o,i=!1){const s=(Ta(t)?Ca:ba)(n,a,o,t),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||(ta(a)||!0===n&&ea(a)||!t&&!ea(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(n,"string"==typeof t,i),c=t!==e.Fragment?{...l,...s,ref:r}:{},{children:u}=n,d=e.useMemo((()=>Kr(u)?u.get():u),[u]);return e.createElement(t,{...c,children:d})}function Na(e){const t=[{},{}];return e?.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Ra(e,t,n,r){if("function"==typeof t){const[a,o]=Na(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]=Na(r);t=t(void 0!==n?n:e.custom,a,o)}return t}function Oa(e){return Kr(e)?e.get():e}function La(e,t,n,r){const a={},o=r(e,{});for(const e in o)a[e]=Oa(o[e]);let{initial:i,animate:s}=e;const l=la(e),c=ca(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&&!aa(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ra(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 Aa=t=>(n,r)=>{const a=e.useContext(ra),o=e.useContext(se),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:La(n,r,a,e),renderState:t()}}(t,n,a,o);return r?i():function(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}(i)};function _a(e,t,n){const{style:r}=e,a={};for(const o in r)(Kr(r[o])||t.style&&Kr(t.style[o])||ha(o,e)||void 0!==n?.getValue(o)?.liveStyle)&&(a[o]=r[o]);return a}const Fa=Aa({scrapeMotionValuesFromProps:_a,createRenderState:ya});function Ia(e,t,n){const r=_a(e,t,n);for(const n in e)if(Kr(e[n])||Kr(t[n])){r[-1!==An.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}const Ya=Aa({scrapeMotionValuesFromProps:Ia,createRenderState:Da}),Va=Symbol.for("motionComponentSymbol");function Ba(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Wa(t,n,r){return e.useCallback((e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):Ba(r)&&(r.current=e))}),[n])}const ja=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ha="data-"+ja("framerAppearId"),$a=e.createContext({});function qa(t,n,r,a,o){const{visualElement:i}=e.useContext(ra),s=e.useContext(Xr),l=e.useContext(se),c=e.useContext(Qr).reducedMotion,u=e.useRef(null);a=a||s.renderer,!u.current&&a&&(u.current=a(t,{visualState:n,parent:i,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const d=u.current,p=e.useContext($a);!d||d.projection||!o||"html"!==d.type&&"svg"!==d.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:Ua(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&Ba(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(u.current,r,o,p);const h=e.useRef(!1);e.useInsertionEffect((()=>{d&&h.current&&d.update(r,l)}));const m=r[Ha],f=e.useRef(Boolean(m)&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return ie((()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),f.current&&d.animationState&&d.animationState.animateChanges())})),e.useEffect((()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current&&(queueMicrotask((()=>{window.MotionHandoffMarkAsComplete?.(m)})),f.current=!1),d.enteringChildren=void 0)})),d}function Ua(e){if(e)return!1!==e.options.allowProjection?e.projection:Ua(e.parent)}function Ka(t,{forwardMotionProps:r=!1}={},a,o){a&&function(e){for(const t in e)Zr[t]={...Zr[t],...e[t]}}(a);const i=Ta(t)?Ya:Fa;function s(a,s){let l;const c={...e.useContext(Qr),...a,layoutId:za(a)},{isStatic:u}=c,d=ua(a),p=i(a,u);if(!u&&oe){e.useContext(Xr).strict;const n=function(e){const{drag:t,layout:n}=Zr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=n.MeasureLayout,d.visualElement=qa(t,p,c,o,n.ProjectionNode)}return n.jsxs(ra.Provider,{value:d,children:[l&&d.visualElement?n.jsx(l,{visualElement:d.visualElement,...c}):null,Pa(t,a,Wa(p,d.visualElement,s),p,u,r)]})}s.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const l=e.forwardRef(s);return l[Va]=t,l}function za({layoutId:t}){const n=e.useContext(ae).id;return n&&void 0!==t?n+"-"+t:t}function Qa(e,t){if("undefined"==typeof Proxy)return Ka;const n=new Map,r=(n,r)=>Ka(n,r,e,t);return new Proxy(((e,t)=>r(e,t)),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,Ka(o,void 0,e,t)),n.get(o))})}function Xa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ga(e){return void 0===e||1===e}function Za({scale:e,scaleX:t,scaleY:n}){return!Ga(e)||!Ga(t)||!Ga(n)}function Ja(e){return Za(e)||eo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eo(e){return to(e.x)||to(e.y)}function to(e){return e&&"0%"!==e}function no(e,t,n){return n+t*(e-n)}function ro(e,t,n,r,a){return void 0!==a&&(e=no(e,a,r)),no(e,n,r)+t}function ao(e,t=0,n=1,r,a){e.min=ro(e.min,t,n,r,a),e.max=ro(e.max,t,n,r,a)}function oo(e,{x:t,y:n}){ao(e.x,t.translate,t.scale,t.originPoint),ao(e.y,n.translate,n.scale,n.originPoint)}const io=.999999999999,so=1.0000000000001;function lo(e,t){e.min=e.min+t,e.max=e.max+t}function co(e,t,n,r,a=.5){ao(e,t,n,Vt(e.min,e.max,a),r)}function uo(e,t){co(e.x,t.x,t.scaleX,t.scale,t.originX),co(e.y,t.y,t.scaleY,t.scale,t.originY)}function po(e,t){return Xa(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 ho=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),mo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),fo={current:null},go={current:!1};const yo=new WeakMap;const vo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class wo{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=Un,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=Je.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ke.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=la(t),this.isVariantNode=ca(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]&&Kr(t)&&t.set(s[e])}}mount(e){this.current=e,yo.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))),go.current||function(){if(go.current=!0,oe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fo.current=e.matches;e.addEventListener("change",t),t()}else fo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ze(this.notifyUpdate),ze(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=_n.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Ke.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 Zr){const t=Zr[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):mo()}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<vo.length;t++){const n=vo[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(Kr(a))e.addValue(r,a);else if(Kr(o))e.addValue(r,Rr(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,Rr(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=Rr(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&&(he(n)||fe(n))?n=parseFloat(n):(r=n,!zr.find(fr(r))&&Ft.test(t)&&(n=Cr(e,t))),this.setBaseTarget(e,Kr(n)?n.get():n)),Kr(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=Ra(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||Kr(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 xe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Or.render(this.render)}}class bo extends wo{constructor(){super(...arguments),this.KeyframeResolver=Tr}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;Kr(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}function xo(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 ko extends bo{constructor(){super(...arguments),this.type="html",this.renderInstance=xo}readValueFromInstance(e,t){if(_n.has(t))return this.projection?.isProjecting?Rn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return On(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(tt(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return po(e,t)}build(e,t,n){ga(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _a(e,t,n)}}const Eo=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 Do extends bo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mo}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_n.has(t)){const e=Sr(t);return e&&e.default||0}return t=Eo.has(t)?t:ja(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ia(e,t,n)}build(e,t,n){Ea(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){xo(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Eo.has(n)?n:ja(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Sa(e.tagName),super.mount(e)}}const So=(t,n)=>Ta(t)?new Do(n):new ko(n,{allowProjection:t!==e.Fragment});function Co(e,t,n){const r=e.getProps();return Ra(r,t,void 0!==n?n:r.custom,e)}const Mo=e=>Array.isArray(e);function To(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Rr(n))}function Po(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Kr(r)&&r.add))return n.add(t);if(!n&&pe.WillChange){const n=new pe.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function No(e){return e.props[Ha]}const Ro=e=>null!==e;const Oo={type:"spring",stiffness:500,damping:25,restSpeed:10},Lo={type:"keyframes",duration:.8},Ao={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_o=(e,{keyframes:t})=>t.length>2?Lo:_n.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Oo:Ao;const Fo=(e,t,n,r={},a,o)=>i=>{const s=hr(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=ke(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,_o(e,u)),u.duration&&(u.duration=ke(u.duration)),u.repeatDelay&&(u.repeatDelay=ke(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(sr(u),0===u.delay&&(d=!0)),(pe.instantAnimations||pe.skipAnimations)&&(d=!0,sr(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(Ro),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 Ke.update((()=>{u.onUpdate(e),u.onComplete()}))}return s.isSync?new En(u):new ur(u)};function Io({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Yo(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&&Io(c,t))continue;const i={delay:n,...hr(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=No(e);if(n){const e=window.MotionHandoffAnimation(n,t,Ke);null!==e&&(i.startTime=e,d=!0)}}Po(e,t),r.start(Fo(t,r,a,e.shouldReduceMotion&&mr.has(t)?{type:!1}:i,e,d));const p=r.animation;p&&l.push(p)}return i&&Promise.all(l).then((()=>{Ke.update((()=>{i&&function(e,t){const n=Co(e,t);let{transitionEnd:r={},transition:a={},...o}=n||{};o={...o,...r};for(const t in o)To(e,t,(i=o[t],Mo(i)?i[i.length-1]||0:i));var i}(e,i)}))})),l}function Vo(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 Bo(e,t,n={}){const r=Co(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(Yo(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(Bo(l,t,{...i,delay:n+("function"==typeof r?0:r)+Vo(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 Wo(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 jo=sa.length;function Ho(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ho(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<jo;n++){const r=sa[n],a=e.props[r];(oa(a)||!1===a)&&(t[r]=a)}return t}const $o=[...ia].reverse(),qo=ia.length;function Uo(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=>Bo(e,t,n)));r=Promise.all(a)}else if("string"==typeof t)r=Bo(e,t,n);else{const a="function"==typeof t?Co(e,t,n.custom):t;r=Promise.all(Yo(e,a,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Ko(e){let t=Uo(e),n=Xo(),r=!0;const a=t=>(n,r)=>{const a=Co(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=Ho(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<qo;t++){const p=$o[t],h=n[p],m=void 0!==i[p]?i[p]:s[p],f=oa(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||aa(m)||"boolean"==typeof m)continue;const v=zo(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=Mo(t)&&Mo(n)?!Wo(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=Co(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Vo(r.enteringChildren,e,t)}}return{animation:t,options:n}})))}if(c.size){const t={};if("boolean"!=typeof i.initial){const n=Co(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=Xo()}}}function zo(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Wo(t,e)}function Qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Xo(){return{animate:Qo(!0),whileInView:Qo(),whileHover:Qo(),whileTap:Qo(),whileDrag:Qo(),whileFocus:Qo(),exit:Qo()}}class Go{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Zo=0;const Jo={animation:{Feature:class extends Go{constructor(e){super(e),e.animationState||(e.animationState=Ko(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();aa(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 Go{constructor(){super(...arguments),this.id=Zo++}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 ei(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ti(e){return{point:{x:e.pageX,y:e.pageY}}}function ni(e,t,n,r){return ei(e,t,(e=>t=>Vr(t)&&e(t,ti(t)))(n),r)}const ri=.9999,ai=1.0001,oi=-.01,ii=.01;function si(e){return e.max-e.min}function li(e,t,n,r=.5){e.origin=r,e.originPoint=Vt(t.min,t.max,e.origin),e.scale=si(n)/si(t),e.translate=Vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ri&&e.scale<=ai||isNaN(e.scale))&&(e.scale=1),(e.translate>=oi&&e.translate<=ii||isNaN(e.translate))&&(e.translate=0)}function ci(e,t,n,r){li(e.x,t.x,n.x,r?r.originX:void 0),li(e.y,t.y,n.y,r?r.originY:void 0)}function ui(e,t,n){e.min=n.min+t.min,e.max=e.min+si(t)}function di(e,t,n){e.min=t.min-n.min,e.max=e.min+si(t)}function pi(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function hi(e){return[e("x"),e("y")]}const mi=({current:e})=>e?e.ownerDocument.defaultView:null,fi=(e,t)=>Math.abs(e-t);class gi{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=wi(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=fi(e.x,t.x),r=fi(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}=Qe;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=yi(t,this.transformPagePoint),Ke.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=wi("pointercancel"===e.type?this.lastMoveEventInfo:yi(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Vr(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const i=yi(ti(e),this.transformPagePoint),{point:s}=i,{timestamp:l}=Qe;this.history=[{...s,timestamp:l}];const{onSessionStart:c}=t;c&&c(e,wi(i,this.history)),this.removeListeners=we(ni(this.contextWindow,"pointermove",this.handlePointerMove),ni(this.contextWindow,"pointerup",this.handlePointerUp),ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),ze(this.updatePoint)}}function yi(e,t){return t?{point:t(e.point)}:e}function vi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wi({point:e},t){return{point:e,delta:vi(e,xi(t)),offset:vi(e,bi(t)),velocity:ki(t,.1)}}function bi(e){return e[0]}function xi(e){return e[e.length-1]}function ki(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=xi(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>ke(t)));)n--;if(!r)return{x:0,y:0};const o=Ee(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 Ei(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 Di(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 Si=.35;function Ci(e,t,n){return{min:Mi(e,t),max:Mi(e,n)}}function Mi(e,t){return"number"==typeof e?e:e[t]||0}const Ti=new WeakMap;class Pi{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=mo(),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 gi(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ti(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?Ar[o]?null:(Ar[o]=!0,()=>{Ar[o]=!1}):Ar.x||Ar.y?null:(Ar.x=Ar.y=!0,()=>{Ar.x=Ar.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),hi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(vt.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=si(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),a&&Ke.postRender((()=>a(e,t))),Po(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:()=>hi((e=>"paused"===this.getAnimationState(e)&&this.getAxisMotionValue(e).animation?.play()))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:mi(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&&Ke.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||!Ni(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?Vt(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Vt(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&&Ba(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:Ei(e.x,n,a),y:Ei(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Si){return!1===e?e=0:!0===e&&(e=Si),{x:Ci(e,"left","right"),y:Ci(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hi((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||!Ba(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=po(e,n),{scroll:a}=t;return a&&(lo(r.x,a.offset.x),lo(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Di(e.x,t.x),y:Di(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=Xa(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=hi((i=>{if(!Ni(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 Po(this.visualElement,e),n.start(Fo(e,n,0,t,this.visualElement,!1))}stopAnimation(){hi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){hi((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){hi((t=>{const{drag:n}=this.getProps();if(!Ni(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]-Vt(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ba(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};hi((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=si(e),a=si(t);return a>r?n=be(t.min,t.max-r,e.min):r>a&&(n=be(e.min,e.max-a,t.min)),ue(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(),hi((t=>{if(!Ni(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(Vt(a,o,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Ti.set(this.visualElement,this);const e=ni(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Ba(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()),Ke.read(t);const a=ei(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(hi((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=Si,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function Ni(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Ri=e=>(t,n)=>{e&&Ke.postRender((()=>e(t,n)))};const Oi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Li(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ai={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!wt.test(e))return e;e=parseFloat(e)}return`${Li(e,t.target.x)}% ${Li(e,t.target.y)}%`}},_i={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Ft.parse(e);if(a.length>5)return r;const o=Ft.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=Vt(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 Fi=!1;class Ii extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;!function(e){for(const t in e)pa[t]=e[t],tt(t)&&(pa[t].isCSSVariable=!0)}(Vi),a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),Fi&&a.root.didUpdate(),a.addEventListener("animationComplete",(()=>{this.safeToRemove()})),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Oi.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,Fi=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Ke.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Or.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Fi=!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 Yi(t){const[r,a]=function(t=!0){const n=e.useContext(se);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:a,register:o}=n,i=e.useId();e.useEffect((()=>{if(t)return o(i)}),[t]);const s=e.useCallback((()=>t&&a&&a(i)),[i,a,t]);return!r&&a?[!1,s]:[!0]}(),o=e.useContext(ae);return n.jsx(Ii,{...t,layoutGroup:o,switchLayoutGroup:e.useContext($a),isPresent:r,safeToRemove:a})}const Vi={borderRadius:{...Ai,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ai,borderTopRightRadius:Ai,borderBottomLeftRadius:Ai,borderBottomRightRadius:Ai,boxShadow:_i};const Bi=(e,t)=>e.depth-t.depth;class Wi{constructor(){this.children=[],this.isDirty=!1}add(e){le(this.children,e),this.isDirty=!0}remove(e){ce(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bi),this.isDirty=!1,this.children.forEach(e)}}const ji=["TopLeft","TopRight","BottomLeft","BottomRight"],Hi=ji.length,$i=e=>"string"==typeof e?parseFloat(e):e,qi=e=>"number"==typeof e||wt.test(e);function Ui(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Ki=Qi(0,.5,Fe),zi=Qi(.5,.95,ye);function Qi(e,t,n){return r=>r<e?0:r>t?1:n(be(e,t,r))}function Xi(e,t){e.min=t.min,e.max=t.max}function Gi(e,t){Xi(e.x,t.x),Xi(e.y,t.y)}function Zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ji(e,t,n,r,a){return e=no(e-=t,1/n,r),void 0!==a&&(e=no(e,1/a,r)),e}function es(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){vt.test(t)&&(t=parseFloat(t),t=Vt(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=Vt(o.min,o.max,r);e===o&&(s-=t),e.min=Ji(e.min,t,n,s,a),e.max=Ji(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}const ts=["x","scaleX","originX"],ns=["y","scaleY","originY"];function rs(e,t,n,r){es(e.x,t,ts,n?n.x:void 0,r?r.x:void 0),es(e.y,t,ns,n?n.y:void 0,r?r.y:void 0)}function as(e){return 0===e.translate&&1===e.scale}function os(e){return as(e.x)&&as(e.y)}function is(e,t){return e.min===t.min&&e.max===t.max}function ss(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ls(e,t){return ss(e.x,t.x)&&ss(e.y,t.y)}function cs(e){return si(e.x)/si(e.y)}function us(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ds{constructor(){this.members=[]}add(e){le(this.members,e),e.scheduleRender()}remove(e){if(ce(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 ps=["","X","Y","Z"];let hs=0;function ms(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=No(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fs(r)}function gs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=hs++,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(ws),this.nodes.forEach(Cs),this.nodes.forEach(Ms),this.nodes.forEach(bs)},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 Wi)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new xe),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=Ur(t)&&!(Ur(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;Ke.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=Je.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(ze(r),e(o-t))};return Ke.setup(r,!0),()=>ze(r)}(a,250),Oi.hasAnimatedSinceResize&&(Oi.hasAnimatedSinceResize=!1,this.nodes.forEach(Ss)))}))}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()||Ls,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!ls(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={...hr(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||Ss(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(),ze(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(Ts),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&&fs(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(ks);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Es);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ds),this.nodes.forEach(ys),this.nodes.forEach(vs)):this.nodes.forEach(Es),this.clearAllSnapshots();const e=Je.now();Qe.delta=ue(0,1e3/60,e-Qe.timestamp),Qe.timestamp=e,Qe.isProcessing=!0,Xe.update.process(Qe),Xe.preRender.process(Qe),Xe.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Or.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xs),this.sharedNodes.forEach(Ps)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||si(this.snapshot.measuredBox.x)||si(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=mo(),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&&!os(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ja(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)),Fs((r=n).x),Fs(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return mo();const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ys))){const{scroll:e}=this.root;e&&(lo(t.x,e.offset.x),lo(t.y,e.offset.y))}return t}removeElementScroll(e){const t=mo();if(Gi(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&&Gi(t,e),lo(t.x,a.offset.x),lo(t.y,a.offset.y))}return t}applyTransform(e,t=!1){const n=mo();Gi(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&&uo(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Ja(r.latestValues)&&uo(n,r.latestValues)}return Ja(this.latestValues)&&uo(n,this.latestValues),n}removeTransform(e){const t=mo();Gi(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Ja(n.latestValues))continue;Za(n.latestValues)&&n.updateSnapshot();const r=mo();Gi(r,n.measurePageBox()),rs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Ja(this.latestValues)&&rs(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!==Qe.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=Qe.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mo(),this.relativeTargetOrigin=mo(),pi(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Gi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var o,i,s;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target=mo(),this.targetWithTransforms=mo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,i=this.relativeTarget,s=this.relativeParent.target,ui(o.x,i.x,s.x),ui(o.y,i.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Gi(this.target,this.layout.layoutBox),oo(this.target,this.targetDelta)):Gi(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=mo(),this.relativeTargetOrigin=mo(),pi(this.relativeTargetOrigin,this.target,e.target),Gi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Za(this.parent.latestValues)&&!eo(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===Qe.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;Gi(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&&uo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,oo(e,i)),r&&Ja(o.latestValues)&&uo(e,o.latestValues))}t.x<so&&t.x>io&&(t.x=1),t.y<so&&t.y>io&&(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=mo());const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Zi(this.prevProjectionDelta.x,this.projectionDelta.x),Zi(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ci(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&us(this.projectionDelta.x,this.prevProjectionDelta.x)&&us(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=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},a={...this.latestValues},o=ho();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i=mo(),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(Os));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,p,h,m,f,g;Ns(o.x,e.x,n),Ns(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pi(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,m=this.relativeTargetOrigin,f=i,g=n,Rs(h.x,m.x,f.x,g),Rs(h.y,m.y,f.y,g),d&&(l=this.relativeTarget,p=d,is(l.x,p.x)&&is(l.y,p.y))&&(this.isProjectionDirty=!1),d||(d=mo()),Gi(d,this.relativeTarget)),s&&(this.animationValues=a,function(e,t,n,r,a,o){a?(e.opacity=Vt(0,n.opacity??1,Ki(r)),e.opacityExit=Vt(t.opacity??1,0,zi(r))):o&&(e.opacity=Vt(t.opacity??1,n.opacity??1,r));for(let a=0;a<Hi;a++){const o=`border${ji[a]}Radius`;let i=Ui(t,o),s=Ui(n,o);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||qi(i)===qi(s)?(e[o]=Math.max(Vt($i(i),$i(s),r),0),(vt.test(s)||vt.test(i))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=Vt(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&&(ze(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update((()=>{Oi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rr(0)),this.currentAnimation=function(e,t,n){const r=Kr(e)?e:Rr(e);return r.start(Fo("",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&&Is(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||mo();const t=si(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=si(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Gi(t,n),uo(t,a),ci(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ds);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&&ms("z",e,r,this.animationValues);for(let t=0;t<ps.length;t++)ms(`rotate${ps[t]}`,e,r,this.animationValues),ms(`skew${ps[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=Oa(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=Oa(t?.pointerEvents)||""),void(this.hasProjected&&!Ja(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 pa){if(void 0===a[t])continue;const{correct:n,applyTo:i,isCSSVariable:s}=pa[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?Oa(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>e.currentAnimation?.stop())),this.root.nodes.forEach(ks),this.root.sharedNodes.clear()}}}function ys(e){e.updateLayout()}function vs(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?hi((e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=si(r);r.min=n[e].min,r.max=r.min+a})):Is(a,t.layoutBox,n)&&hi((r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=si(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=ho();ci(i,n,t.layoutBox);const s=ho();o?ci(s,e.applyTransform(r,!0),t.measuredBox):ci(s,n,t.layoutBox);const l=!os(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=mo();pi(i,t.layoutBox,a.layoutBox);const s=mo();pi(s,n,o.layoutBox),ls(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 ws(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 bs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xs(e){e.clearSnapshot()}function ks(e){e.clearMeasurements()}function Es(e){e.isLayoutDirty=!1}function Ds(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ss(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Cs(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ts(e){e.resetSkewAndRotation()}function Ps(e){e.removeLeadSnapshot()}function Ns(e,t,n){e.translate=Vt(t.translate,0,n),e.scale=Vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Rs(e,t,n,r){e.min=Vt(t.min,n.min,r),e.max=Vt(t.max,n.max,r)}function Os(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ls={duration:.45,ease:[.4,0,.1,1]},As=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_s=As("applewebkit/")&&!As("chrome/")?Math.round:ye;function Fs(e){e.min=_s(e.min),e.max=_s(e.max)}function Is(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=cs(t),a=cs(n),o=.2,!(Math.abs(r-a)<=o));var r,a,o}function Ys(e){return e!==e.root&&e.scroll?.wasRoot}const Vs=gs({attachResizeListener:(e,t)=>ei(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bs={current:void 0},Ws=gs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bs.current){const e=new Vs({});e.mount(window),e.setOptions({layoutScroll:!0}),Bs.current=e}return Bs.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),js={pan:{Feature:class extends Go{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(e){this.session=new gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ri(e),onStart:Ri(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Ke.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=ni(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 Go{constructor(e){super(e),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new Pi(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ws,MeasureLayout:Yi}};function Hs(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&Ke.postRender((()=>a(t,ti(t))))}function $s(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&&Ke.postRender((()=>a(t,ti(t))))}const qs=new WeakMap,Us=new WeakMap,Ks=e=>{const t=qs.get(e.target);t&&t(e)},zs=e=>{e.forEach(Ks)};function Qs(e,t,n){const r=function({root:e,...t}){const n=e||document;Us.has(n)||Us.set(n,{});const r=Us.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(zs,{root:e,...t})),r[a]}(t);return qs.set(e,n),r.observe(e),()=>{qs.delete(e),r.unobserve(e)}}const Xs={some:0,all:1};const Gs=Qa({...Jo,...{inView:{Feature:class extends Go{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:Xs[r]};return Qs(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 Go{mount(){const{current:e}=this.node;e&&(this.unmount=qr(e,((e,t)=>($s(this.node,t,"Start"),(e,{success:t})=>$s(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Go{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=we(ei(this.node.current,"focus",(()=>this.onFocus())),ei(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Go{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,a,o]=Fr(e,n),i=e=>{if(!Ir(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{Ir(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)=>(Hs(this.node,t,"Start"),e=>Hs(this.node,e,"End")))))}unmount(){}}}},...js,...{layout:{ProjectionNode:Ws,MeasureLayout:Yi}}},So),Zs=e.createContext(null),Js={up:"angle-up",end:"angle-right",start:"angle-left",down:"angle-down"},el=({align:n="start",autoClose:r=!1,children:a,className:o="",disabled:i=!1,drop:s,fullWidth:l=!1,icon:c,isChild:u=!1,label:d,onToggle:p,overflow:h=!1,requiredText:m,selectedValue:f,setShow:g,show:y,showError:v=!1,size:w="md",style:b="default",variant:x="primary"})=>{const[k,E]=e.useState(!!y),[D,S]=e.useState(!1),[C,M]=e.useState(null),[T,P]=e.useState(0),[N,R]=e.useState(0),[O,L]=e.useState({top:0,left:0}),A=e.useRef(null),_=e.useRef(null),F=e.useRef(k),I=e.useRef(null),Y=e.useContext(Zs);I.current=()=>{if(!_.current)return;if(!document.body.contains(_.current))return;const e=_.current.offsetWidth,t=_.current.offsetHeight;if(0!==e&&0!==t&&(l&&M((t=>t!==e?e:t)),P((e=>e!==t?t:e)),R((t=>t!==e?e:t)),h)){const e=_.current.getBoundingClientRect();if(e.top<-1e4||e.top>1e4||e.left<-1e4||e.left>1e4)return;L((t=>Math.abs(t.top-e.top)>1||Math.abs(t.left-e.left)>1?{top:e.top,left:e.left}:t))}};const V=e.useCallback((()=>{I.current?.()}),[]),B=e.useCallback(((e,t)=>{e!==F.current&&(S(!0),F.current=e),E(e),g&&g(e),p&&p(e,t),V()}),[g,p,V]),W=e.useMemo((()=>{const t=a?.props?.children;if(!t)return null;const n=(t,n)=>{if(!e.isValidElement(t))return t;const r=t.type===e.Fragment,a="DropdownDivider"===t.type?.displayName||t.props?.className?.includes("dropdown-divider"),o=void 0!==t.props?.as;return r||a||o?e.cloneElement(t,{key:t.key||`${n}`}):e.cloneElement(t,{as:"li",key:t.key||`${n}`})};return Array.isArray(t)?t.map(((e,t)=>n(e,t))):n(t,0)}),[a]);e.useEffect((()=>{y!==F.current&&(E(y),S(!0),F.current=y)}),[y]),e.useEffect((()=>{Y&&!Y.isOpen&&k&&(E(!1),F.current=!1,g&&g(!1))}),[Y?.isOpen,k,g,Y]),e.useEffect((()=>{V()}),[V]),e.useEffect((()=>{if(!h||!k)return;V();let e=null,t=!1;const n=()=>{t||(t=!0,e=requestAnimationFrame((()=>{V(),t=!1})))};window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);let r=_.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)))}}),[h,k,V]);const j=Js[s]||Js.down,H=e.useMemo((()=>"up"===s?"end"===n?"bottom right":"bottom left":"start"===s?"center right":"end"===s?"center left":"end"===n?"top right":"top left"),[s,n]),$=e.useMemo((()=>{const e={};return h?"up"===s?(e.bottom=window.innerHeight-O.top+"px",e.left=`${O.left}px`):"start"===s?(e.right=window.innerWidth-O.left+"px",e.top=`${O.top}px`):"end"===s?(e.left=`${O.left+N}px`,e.top=`${O.top}px`):(e.top=`${O.top+T}px`,e.left=`${O.left}px`):"up"===s?e.bottom=`${T}px`:"start"===s?(e.right=`${N}px`,e.top="0"):"end"===s?(e.left=`${N}px`,e.top="0"):e.top=`${T}px`,e}),[s,T,N,h,O]),q=e.useMemo((()=>h?D?{initial:{opacity:0},animate:{opacity:1}}:{initial:!1,animate:{opacity:1}}:D?l?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:l?{initial:!1,animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[D,l,h]),U=e.useMemo((()=>"start"===s||"end"===s?{}:h?"end"===n?{left:"auto",right:window.innerWidth-O.left-N+"px"}:{}:{left:"end"===n?"auto":"0",right:"end"===n?"0":"auto"}),[s,n,h,O,N]),K=e.useCallback((()=>{D&&S(!1)}),[D]),z=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:h?"fixed":"absolute",...$,...U,...!h&&{transformOrigin:H},...h&&{zIndex:9999}};return e.createElement(Gs.ul,re({},o,{ref:n},q,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:K}))}));return t.displayName="MotionMenu",t}),[q,$,U,H,K,h]),X=e.useMemo((()=>({strategy:h?"fixed":"absolute",modifiers:h?[{name:"offset",enabled:!1},{name:"preventOverflow",enabled:!1},{name:"flip",enabled:!1},{name:"computeStyles",enabled:!1}]:[{name:"offset",enabled:!1}]})),[h]),G=e.useMemo((()=>({isOpen:k})),[k]),Z=e.useMemo((()=>{if(u)return"";return["w-100",`btn btn-${x}`,`btn-${b}`,`btn-${w}`,v&&"not-validated",i&&"disabled"].filter(Boolean).join(" ")}),[u,x,b,w,v,i]);return e.createElement(Zs.Provider,{value:G},e.createElement(t,{autoClose:r,show:k,onToggle:B,className:o,align:n,drop:s,disabled:u?void 0:i,"data-error":m,style:h?void 0:{position:"relative"}},e.createElement(t.Toggle,{ref:_,as:u?"div":void 0,bsPrefix:u?"":void 0,className:Z},(()=>{const t=e.createElement(e.Fragment,null,e.createElement("span",{className:"dropdown-label"},d),e.createElement("span",null,f)),n=c&&e.createElement(Q,{style:"solid",name:c,scale:1}),r=d&&e.createElement(Q,{name:j,className:"caret"}),a="input"===x?t:d&&e.createElement("span",null,d);return"start"===s?e.createElement(e.Fragment,null,r,a,n):e.createElement(e.Fragment,null,n,a,r)})()),e.createElement(t.Menu,{as:z,align:n,ref:A,style:l?{width:C}:void 0,popperConfig:X,renderOnMount:h},W)))};el.propTypes={align:g.oneOf(["start","end"]),autoClose:g.oneOfType([g.bool,g.oneOf(["inside","outside"])]),children:g.node,className:g.string,disabled:g.bool,drop:g.oneOf(["up","down","start","end"]),fullWidth:g.bool,icon:g.string,isChild:g.bool,label:g.node,onToggle:g.func,overflow:g.bool,requiredText:g.string,selectedValue:g.node,setShow:g.func,show:g.bool,showError:g.bool,size:g.oneOf(["xs","md","lg"]),style:g.oneOf(["default","success","danger","warning","link"]),variant:g.oneOf(["primary","secondary","terciary","outline","input"])};const tl=()=>{const t=e.useCallback((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:t,highlightText:(t,n)=>{if(!n)return t;const r=t.split(new RegExp(`(${n})`,"gi"));return e.createElement("span",null,r.map(((t,r)=>e.createElement("span",{className:[t.toLowerCase()===n.toLowerCase()&&"highligthed-search"],key:r},t))))},capitalice:e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:""}},nl=({children:t,className:n="",disabled:r=!1,id:a,name:o,setStatus:i,size:s="md",status:l=!1})=>{const{toCamelCase:c}=tl();let u=a;a||"string"!=typeof t||(u=c(t));return e.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},e.createElement("label",{className:"checkbox "+("lg"===s?"checkbox-lg":"xs"===s?"checkbox-xs":"")},e.createElement("input",{type:"checkbox",checked:l,onChange:e=>{i(e.target.checked)},minLength:"1",id:u,name:o}),t))};nl.propTypes={className:g.string,disabled:g.bool,id:g.string,name:g.string,setStatus:g.func,size:g.oneOf(["xs","md","lg"]),status:g.bool};const rl=({autoFocus:t=!1,className:n="",disabled:r=!1,focus:a=!1,helpText:o,icon:i,label:s="Input label",max:l,maxLength:c,min:u,name:d,onChange:p,prefix:h,requiredText:m,setShowError:f,showError:g,size:y="md",suffix:v,type:w="text",value:b})=>{const{toCamelCase:x}=tl(),k=e.useRef(null),E=x(s);e.useEffect((()=>{g&&setTimeout((()=>{f(!1)}),3e3)}),[g]),e.useEffect((()=>{k.current&&a&&k.current.focus()}),[a]);const D=(()=>{switch(w){case"email":return"email";case"tel":return"tel";case"number":return"numeric";default:return}})();return e.createElement("div",{className:`position-relative ${n} ${r?"disabled":""}`},h||v||i?e.createElement("div",{className:"input-group "+(g?"not-validated":""),"data-error":m},i&&e.createElement("span",{className:"input-group-text"},e.createElement(Q,{style:"solid",name:i,scale:1})),h&&e.createElement("span",{className:"input-group-text"},h),e.createElement("div",{className:"form-floating"},e.createElement("input",{type:w,className:"form-control "+("md"!==y?`form-control-${y}`:""),value:b,id:E,name:d,placeholder:s,onChange:p,required:!!m,autoFocus:t,ref:k,min:u,max:l,inputMode:D}),e.createElement("label",{htmlFor:E},s)),v&&e.createElement("span",{className:"input-group-text"},v)):e.createElement("div",{className:"form-floating "+(g?"not-validated":""),"data-error":m},e.createElement("input",{type:w,className:"form-control "+("md"!==y?`form-control-${y}`:""),value:b,id:E,placeholder:s,onChange:p,required:!!m,name:d,autoFocus:t,ref:k,min:u,max:l,maxLength:c,inputMode:D}),e.createElement("label",{htmlFor:E},s)),o&&e.createElement("small",{className:"text-muted"},o))};rl.propTypes={autoFocus:g.bool,className:g.string,disabled:g.bool,focus:g.bool,helpText:g.string,icon:g.string,label:g.string,max:g.oneOfType([g.string,g.number]),maxLength:g.number,min:g.oneOfType([g.string,g.number]),name:g.string,onChange:g.func,prefix:g.string,requiredText:g.string,size:g.oneOf(["xs","md","lg"]),showError:g.bool,setShowError:g.func,suffix:g.string,type:g.oneOf(["color","date","datetime-local","email","file","image","month","number","password","tel","text","time","url","week"]),value:g.oneOfType([g.string,g.number])};const al=({children:t,className:n="",disabled:r=!1,fullWidth:a=!1,id:o,name:i,setStatus:s,size:l="md",status:c=!0})=>{const{toCamelCase:u}=tl();let d=o;o||"string"!=typeof t||(d=u(t));return e.createElement("div",{className:`form-group form-check ${n} ${r?"disabled":""}`},e.createElement("label",{className:`radio ${a?"w-100":""} ${"lg"===l?"radio-lg":"xs"===l?"radio-xs":""}`},e.createElement("input",{type:"radio",checked:c,onChange:e=>{s(e.target.checked)},minLength:"1",id:d,name:i}),t))};al.propTypes={className:g.string,disabled:g.bool,fullWidth:g.bool,id:g.string,name:g.string,setStatus:g.func,size:g.oneOf(["xs","md","lg"]),status:g.bool};const ol=({children:t,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}=tl(),p="lg"===l?"form-switch-lg":"xs"===l?"form-switch-xs":"",h=o||d(t);return e.createElement("div",{className:`form-check form-switch ${p} ${n} ${"end"===u?"switch-end":""} ${a?"switch-icon":""} ${r?"disabled":""}`},e.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}),t&&e.createElement("label",{className:"form-check-label",htmlFor:h},t))};ol.propTypes={className:g.string,disabled:g.bool,icon:g.bool,id:g.string,name:g.string,setStatus:g.func,status:g.oneOfType([g.number,g.bool]),size:g.oneOf(["xs","md","lg"]),switchPosition:g.oneOf(["start","end"])};const il=({className:t="",disabled:n=!1,helpText:r,label:a="Textarea label",name:o,onChange:i,requiredText:s,showError:l,setShowError:c,size:u="md",value:d=""})=>{const{toCamelCase:p}=tl(),h="lg"===u?"form-control-lg":"xs"===u?"form-control-xs":"",m=p(a);return e.useEffect((()=>{l&&setTimeout((()=>{c(!1)}),3e3)}),[l]),e.createElement("div",{className:`position-relative ${t} ${n?"disabled":""}`},e.createElement("div",{className:"form-floating "+(l?"not-validated":""),"data-error":s},e.createElement("textarea",{className:`form-control ${h}`,onChange:i,placeholder:a,id:m,name:o,required:!!s,value:d||""}),e.createElement("label",{htmlFor:m},a),r&&e.createElement("small",{className:"text-muted"},r)))};il.propTypes={className:g.string,disabled:g.bool,helpText:g.string,label:g.string,name:g.string,onChange:g.func,requiredText:g.string,showError:g.bool,setShowError:g.func,size:g.oneOf(["xs","md","lg"]),value:g.string};const sl=({autoFocus:t=!1,className:n="",counter:r=!1,disabled:a=!1,duplicateKeywordErrorText:o="Duplicate keyword.",keywordsList:i=[],maxKeywords:s,maxKeywordLength:l,pillColor:c="neutral",placeholder:u="Add keywords…",recomendedKeywords:d,requiredText:p,setKeywordsList:h})=>{const[m,f]=e.useState(""),[g,y]=e.useState(""),[v,w]=e.useState(!1);return e.useEffect((()=>{i.length===s&&(w(!0),setTimeout((()=>{w(!1)}),3e3))}),[i]),e.createElement(e.Fragment,null,e.createElement("div",{className:`position-relative ${n} ${a?"disabled":""}`},e.createElement("div",{className:"input-chip "+(v?"not-validated":""),"data-error":p},e.createElement("div",{className:"wrapper"},i.map(((t,n)=>e.createElement(J,{key:n,closeButton:!0,color:c,onClick:()=>(e=>{const t=i.filter((t=>t!==e));h(t)})(t)},t)))),e.createElement("input",{type:"text",value:m,onKeyDown:e=>{if("Enter"===e.key&&""!==m.trim()&&i.length<s){if(m.length>l)return y(`Each keyword must be ${l} characters or less.`),setTimeout((()=>y("")),2e3),void f("");if(i.includes(m.trim()))return y(o),setTimeout((()=>y("")),2e3),void f("");const e=[...i,m.trim()];h(e),f("")}},onChange:e=>{f(e.target.value)},placeholder:u,autoFocus:t}),r&&i.length>=d&&e.createElement("div",{className:"progress-counter-wrapper "+(i.length>=s?"progress-value-error":i.length>=d?"progress-value-warning":"")},e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"progress-counter"},e.createElement("circle",{className:"progress-bg",cx:"10",cy:"10",r:"9",fill:"none"}),e.createElement("circle",{className:"progress-value",cx:"10",cy:"10",r:"9",strokeDasharray:56.55,strokeDashoffset:56.55*(1-i.length/s),strokeLinecap:"round",fill:"none"})),e.createElement("span",{className:"progress-counter-text"},i.length))),g&&e.createElement("small",{className:"text-muted"},g)))};sl.propTypes={autoFocus:g.bool,className:g.string,counter:g.bool,disabled:g.bool,duplicateKeywordErrorText:g.string,keywordsList:g.array.isRequired,maxKeywords:g.number.isRequired,maxKeywordLength:g.number.isRequired,pillColor:g.oneOf(["blue","danger","dark","green","light","midtone","neutral","red","yellow"]),placeholder:g.string.isRequired,recomendedKeywords:g.number.isRequired,requiredText:g.string.isRequired,setKeywordsList:g.func.isRequired};const ll=(void 0).MODE,cl="production"===ll?"https://api.groovinads.com/":"localdev"===ll?"https://api-test.groovinads.com/":"https://api-dev.groovinads.com/";var ul={authStatus:cl+"v2/auth/status",authLogout:cl+"v2/auth/logout",applications:cl+"v2/applications",favApps:cl+"v2/applications/favorite",clients:cl+"v2/auth/clients",clientsLogin:cl+"v2/auth/clients/login",headers:{headers:{"Content-Type":"application/json",Authorization:"Bearer "+r.get("groovinadsAuthToken"),"Accept-Language":"en"}}};a.defaults.withCredentials=!0;const dl=async({url:e})=>await a.get(e,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),pl=async({url:e,data:t})=>await a.post(e,t,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))),hl=async e=>await dl({url:`${cl}${e}`}),ml=async(e,t)=>await pl({url:`${cl}${e}`,data:t}),fl=async e=>await(async({url:e})=>await a.delete(e,ul.headers).then((({data:e})=>e)).catch((e=>Promise.reject(e||"error en la url"))))({url:`${ul.favApps}/${e}`}),gl=({apiGetEmail:t,apiPostEmail:n,disabled:r=!1,label:a="Email addresses",showModal:o=!0,textButton:i="Add",textError:s="You must enter a valid email address",titleList:l="Added emails"})=>{const[c,u]=e.useState([]),[d,p]=e.useState(""),[h,m]=e.useState([]),[f,g]=e.useState(!1),y=/^\w+([.-_+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/;return e.useEffect((()=>{o?(async()=>{const e=await hl(t);u(e||[])})():c.length&&u([])}),[o]),e.createElement(e.Fragment,null,e.createElement("div",{className:"mb-3"},e.createElement("div",{className:`mb-3 input-group w-100 mb-4 ${f?"not-validated":""} ${r?"disabled":""}`,"data-error":s},e.createElement(rl,{label:a,value:d,onChange:e=>{(e=>{const t=e.target.value.replace(/\. +/g," ");p(t),t.trim()&&!y.test(t)||g(!1)})(e)}}),e.createElement(ne,{onClick:async()=>{const e=d.split(/[;, ]+/).map((e=>e.trim())).filter((e=>e.length>0)),t=e.filter((e=>!y.test(e))),r=e.filter((e=>y.test(e)));if(t.length&&(p(t.join(" ")),g(!0),setTimeout((()=>{g(!1)}),3e3)),r.length){const e=await ml(n,[...c,...r]);u(e)}p(t.join(" "))},className:""+(d.trim()?"":"disabled")},i))),c?.length?e.createElement("div",{className:"shared-users-list"},e.createElement("h3",null,l),c?.map(((t,r)=>e.createElement("div",{key:`email${r}`,className:"shared-user-item"},e.createElement("div",{className:"shared-user"},e.createElement(Q,{name:"user-circle",scale:2}),e.createElement("span",null,t)),h.some((e=>e===t))?e.createElement("div",{className:"spinner-wrapper"},e.createElement(ee,{scale:1})):e.createElement(ne,{variant:"terciary",style:"danger",startIcon:"trash-can",onClick:()=>(async e=>{m([...h,e]);const t=c.filter((t=>t!==e)),r=await ml(n,t);setTimeout((()=>{m(h.filter((t=>t!==e))),u(r)}),1e3)})(t)}))))):null)};gl.propTypes={apiGetEmail:g.string.isRequired,apiPostEmail:g.string.isRequired,disabled:g.bool,label:g.string,showModal:g.bool,textButton:g.string,textError:g.string,titleList:g.string};const yl=({autoClose:n=!1,className:r="",disabled:a=!1,locked:o=!1,menuType:i="simple",onRemoveFilter:s,onToggle:l,overflow:c=!1,requiredText:u,searchLabel:d="Search",setShow:p,setValuesSelected:h,show:m,showError:f=!1,title:g,values:y=[],valuesSelected:v=[]})=>{const[w,b]=e.useState(""),[x,k]=e.useState(!!m),[E,D]=e.useState(!1),[S,C]=e.useState(0),[M,T]=e.useState(0),[P,N]=e.useState({top:0,left:0}),R=e.useRef(null),O=e.useRef(null),L=e.useRef(x),A=()=>e.createElement("div",{className:"dropdown-filter-empty-space"},e.createElement("img",{src:"https://ui.groovinads.com/assets/not-found.svg",alt:"Sad magnifier on abstract background"}),e.createElement("div",null,e.createElement("h5",null,"Value not found"),e.createElement("p",null,"It looks like this value does not exist."))),_=(e,t)=>{h(e?[...v,t]:v.filter((e=>e!==t)))},F=e.useCallback((()=>{if(!O.current)return;const e=O.current.offsetHeight,t=O.current.offsetWidth;if(C(e),T(t),c){const e=O.current.getBoundingClientRect();N({top:e.top,left:e.left})}}),[c]);e.useEffect((()=>{m!==L.current&&(k(m),D(!0),L.current=m)}),[m]);const I=e.useCallback((e=>{!R?.current||R?.current.contains(e?.target)||!0!==n&&"outside"!==n||(!1!==L.current&&(D(!0),L.current=!1),k(!1),p(!1))}),[n,p]);e.useEffect((()=>(document.addEventListener("click",I),()=>{document.removeEventListener("click",I)})),[I]),e.useEffect((()=>{F()}),[F]);const Y=e.useMemo((()=>{const e={};return c?(e.top=`${P.top+S}px`,e.left=`${P.left}px`):e.top=`${S}px`,e}),[S,c,P]),V=e.useMemo((()=>E?{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1}}:{initial:!1,animate:{scale:1,opacity:1}}),[E]),B=e.useCallback((()=>{E&&D(!1)}),[E]),W=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:c?"fixed":"absolute",...Y,left:c?Y.left:"0",...c&&M&&{width:`${M}px`},transformOrigin:"top left"};return e.createElement(Gs.ul,re({},o,{ref:n},V,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:B}))}));return t.displayName="MotionMenu",t}),[V,B,c,Y,M]),j=e.useMemo((()=>({strategy:c?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...c&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[c]);return e.createElement(t,{onToggle:l,className:`dropdown-filter ${o?"locked":""} ${r} ${a?"disabled":""}`,autoClose:n,show:x,ref:R,"data-error":u,style:{position:"relative"}},e.createElement(t.Toggle,{ref:O,variant:"toggle-filter",className:f?"not-validated":"",onClick:e=>{e.stopPropagation();const t=!x;t!==L.current&&(D(!0),L.current=t),k(t),p(t),F()}},e.createElement("div",{className:"filter-heading"},e.createElement("div",{className:"filter-title"},e.createElement("span",{className:"filter-title-text"},g),v.length>0&&e.createElement("span",{className:"filter-title-count"},` (${v.length})`),o&&e.createElement(Q,{style:"solid",name:"lock-keyhole",scale:.7})),e.createElement(Q,{style:"solid",name:"chevron-down",scale:1,className:"caret"})),e.createElement("div",{className:"filter-values"},v.length===y.length?"All selected":v.length?v.join("; "):"None")),!o&&e.createElement(ne,{variant:"terciary",endIcon:"xmark",size:"md",className:"remove-filter",onClick:s}),"simple"===i&&e.createElement(t.Menu,{as:W,className:"dropdown-menu-simple",popperConfig:j},e.createElement("div",{className:"dropdown-menu-wrapper"},e.createElement(rl,{size:"xs",label:d,icon:"magnifying-glass",className:"w-100",value:w,onChange:({target:e})=>b(e.value),customRef:m}),y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).length>0?e.createElement("ul",{className:"dropdown-filter-list"},y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).map(((t,n)=>e.createElement(nl,{setStatus:e=>{_(e,t)},status:v.includes(t),key:"Dropdown.Simple.Checkbox"+n},t)))):e.createElement(A,null))),"selection"===i&&e.createElement(t.Menu,{as:W,className:"dropdown-menu-selection",popperConfig:j},e.createElement("div",{className:"dropdown-menu-wrapper"},e.createElement("div",{className:"dropdown-filter-list-wrapper"},e.createElement(rl,{size:"xs",label:d,icon:"magnifying-glass",className:"w-100",value:w,onChange:({target:e})=>b(e.value),customRef:m}),e.createElement("h4",null,"All values (",y.length,")"),y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).length>0?e.createElement(e.Fragment,null,e.createElement("ul",{className:"dropdown-filter-list"},y.filter((e=>e.toString().toLowerCase().includes(w.toLowerCase()))).map(((t,n)=>e.createElement(nl,{setStatus:e=>{_(e,t)},status:v.includes(t),key:"Dropdown.Selection.Checkbox"+n},t))))):e.createElement(A,null)),e.createElement("div",{className:"dropdown-filter-values-wrapper"},e.createElement("div",{className:"dropdown-filter-buttons-wrapper"},e.createElement(ne,{startIcon:"check",size:"xs",variant:"terciary",onClick:()=>{h([...y])}},"Select all"),e.createElement(ne,{startIcon:"xmark",size:"xs",variant:"terciary",onClick:()=>{h([])}},"Clear selection")),e.createElement("h4",null,"Selected values (",v.length,")"),e.createElement("div",{className:"dropdown-filter-selected-list"},v.map(((t,n)=>e.createElement(J,{color:"light",closeButton:!0,onClick:()=>{(e=>{h(v.filter(((t,n)=>n!==e)))})(n)},key:"Dropdown.PillComponent"+n},t))))))))};yl.propTypes={autoClose:g.oneOfType([g.bool,g.oneOf(["outside"])]),className:g.string,disabled:g.bool,locked:g.bool,menuType:g.oneOf(["simple","selection"]),onRemoveFilter:g.func,onToggle:g.func,overflow:g.bool,requiredText:g.string,searchLabel:g.string,setShow:g.func,setValuesSelected:g.func,show:g.bool,showError:g.bool,title:g.string,values:g.array,valuesSelected:g.array};const vl=({autoClose:n=!1,buttonVariant:r="input",className:a="",customKey:o,disabled:i=!1,drop:s,focus:l=!1,hasId:c=!0,idInPill:u=!1,idKey:d,inputLabel:p="",nameKey:h,notMatchedText:m="No match found",nowrap:f=!1,object:g=!1,onToggle:y,overflow:v=!1,requiredText:w="Required",searchLabel:b="Search",setValuesSelected:x,setShow:k,show:E,showError:D=!1,showStatus:S="",values:C=[],valuesSelected:M=[]})=>{const[T,P]=e.useState(""),[N,R]=e.useState(!!E),[O,L]=e.useState(!1),[A,_]=e.useState(0),[F,I]=e.useState(0),[Y,V]=e.useState({top:0,left:0}),B=e.useRef(null),W=e.useRef(null),j=e.useRef(null),H=e.useRef(N),{highlightText:$}=tl(),q=e.useCallback(((e,t)=>{const n=C.findIndex((e=>(g?e[d]:e)===(g?t[d]:t)));x(e?e=>[...e,C[n]]:e=>e.filter((e=>(g?e[d]:e)!==(g?C[n][d]:C[n]))))}),[C,g,d,x]),U=e.useCallback((e=>{x((t=>t.filter(((t,n)=>n!==e))))}),[x]),K=e.useMemo((()=>C.filter((e=>(g?`${e[d]} ${e[h]} ${e[o]}`:e).toLowerCase().includes(T.toLowerCase())&&(!S||parseInt(e.status)===parseInt(S))))),[C,g,d,h,o,T,S]),z=e.useCallback((()=>{if(!W.current)return;const e=W.current.offsetHeight,t=W.current.offsetWidth;if(_(e),I(t),v){const e=W.current.getBoundingClientRect();V({top:e.top,left:e.left})}}),[v]),X=e.useCallback((e=>{!B?.current||B?.current.contains(e?.target)||!0!==n&&"outside"!==n||(!1!==H.current&&(L(!0),H.current=!1),R(!1),k(!1))}),[n,k]);e.useEffect((()=>{E!==H.current&&(R(E),L(!0),H.current=E)}),[E]),e.useEffect((()=>(document.addEventListener("click",X),()=>{document.removeEventListener("click",X)})),[X]),e.useEffect((()=>{z()}),[z]);const G="up"===s?"bottom left":"top left",Z=e.useMemo((()=>{const e={};return v?"up"===s?(e.bottom=window.innerHeight-Y.top+"px",e.left=`${Y.left}px`):(e.top=`${Y.top+A}px`,e.left=`${Y.left}px`):"up"===s?e.bottom=`${A}px`:e.top=`${A}px`,e}),[s,A,v,Y]),ee=e.useMemo((()=>O?{initial:{scaleY:.5,opacity:0},animate:{scaleY:1,opacity:1}}:{initial:!1,animate:{scaleY:1,opacity:1}}),[O]),te=e.useCallback((()=>{O&&L(!1)}),[O]),ne=e.useMemo((()=>{const t=e.forwardRef(((t,n)=>{const{show:r,close:a,...o}=t,i={...o.style,position:v?"fixed":"absolute",...Z,left:v?Z.left:"0",...v&&F&&{width:`${F}px`},transformOrigin:G};return e.createElement(Gs.ul,re({},o,{ref:n},ee,{transition:{type:"spring",stiffness:500,damping:30,duration:.25},style:i,onAnimationComplete:te}))}));return t.displayName="MotionMenu",t}),[ee,te,v,Z,F,s]),ae=e.useMemo((()=>({strategy:v?"fixed":"absolute",modifiers:[{name:"offset",enabled:!1}],...v&&{onFirstUpdate:()=>window.dispatchEvent(new CustomEvent("scroll"))}})),[v]),oe=e.useMemo((()=>["btn",`btn-${r}`,f&&"nowrap",D&&"not-validated",i&&"disabled"].filter(Boolean).join(" ")),[r,f,D,i]),ie=e.useCallback((e=>o?`${e[h]} - ${e[o]}`:u?`#${e[d]} - ${e[h]}`:e[h]||e),[o,u,h,d]),se=e.useCallback((e=>{const t=g?o?`${e[h]} - ${e[o]}`:`${c?`#${e[d]} - `:""}${e[h]}`:e[h]||e;return $(t,T)}),[g,o,c,h,d,$,T]);return e.createElement(t,{className:a,autoClose:n,show:N,ref:B,onToggle:y,drop:s,"data-error":w,style:{position:"relative"}},e.createElement(t.Toggle,{as:"div",ref:W,className:oe,onClick:e=>{e.stopPropagation();const t=!N;t!==H.current&&(L(!0),H.current=t),R(t),z()}},M.length>0&&"input"===r&&e.createElement("div",{className:"wrapper"},M.map(((t,n)=>e.createElement(J,{color:"neutral",closeButton:!0,onClick:e=>{e.stopPropagation(),U(n)},key:`Dropdown.PillComponent.${n}`},ie(t))))),e.createElement("span",{className:"label"},p),e.createElement(Q,{style:"solid",name:"angle-down",scale:1,className:"caret"})),e.createElement(t.Menu,{as:ne,className:"w-100",ref:j,popperConfig:ae},e.createElement(t.Item,{onClick:e=>e.stopPropagation(),as:"div"},e.createElement(rl,{label:b,value:T,onChange:({target:e})=>P(e.value),icon:"magnifying-glass",size:"xs",className:"w-100",focus:l})),e.createElement(t.Item,{onClick:e=>e.stopPropagation(),as:"div"},K.length>0?e.createElement("ul",{className:"dropdown-checks"},K.map(((t,n)=>e.createElement(nl,{setStatus:e=>q(e,t),status:g?M.some((e=>e[d]===t[d])):M.includes(t),key:`Dropdown.Input.Checkbox.${n}`},se(t))))):e.createElement("div",{className:"not-matched"},e.createElement("p",null,m)))))};vl.propTypes={autoClose:g.oneOfType([g.bool,g.string]),buttonVariant:g.oneOf(["input","primary","secondary","terciary","outline"]),className:g.string,customKey:g.string,disabled:g.bool,drop:g.oneOf(["up","down"]),focus:g.bool,hasId:g.bool,idInPill:g.bool,idKey:g.string,inputLabel:g.string,nameKey:g.string,notMatchedText:g.string,nowrap:g.bool,object:g.bool,onToggle:g.func,overflow:g.bool,requiredText:g.string,searchLabel:g.string,setValuesSelected:g.func,setShow:g.func,show:g.bool,showError:g.bool,showStatus:g.string,values:g.array,valuesSelected:g.array};const wl=6048e5,bl=864e5,xl=Symbol.for("constructDateFrom");function kl(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&xl in e?e[xl](t):e instanceof Date?new e.constructor(t):new Date(t)}function El(e,t){return kl(t||e,e)}let Dl={};function Sl(){return Dl}function Cl(e,t){const n=Sl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=El(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 Ml(e,t){return Cl(e,{...t,weekStartsOn:1})}function Tl(e,t){const n=El(e,t?.in),r=n.getFullYear(),a=kl(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=Ml(a),i=kl(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Ml(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Pl(e){const t=El(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 Nl(e,t){const n=El(e,t?.in);return n.setHours(0,0,0,0),n}function Rl(e,t,n){const[r,a]=function(e,...t){const n=kl.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}(0,e,t),o=Nl(r),i=Nl(a),s=+o-Pl(o),l=+i-Pl(i);return Math.round((s-l)/bl)}function Ol(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+El(e)));var t}const Ll={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 Al(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const _l={date:Al({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Al({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:Al({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Il(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 Yl={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:Il({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Il({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:Il({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:Il({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:Il({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 Vl(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 Bl={ordinalNumber:(Wl={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Wl.matchPattern);if(!n)return null;const r=n[0],a=e.match(Wl.parsePattern);if(!a)return null;let o=Wl.valueCallback?Wl.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(r.length)}}),era:Vl({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:Vl({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:Vl({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:Vl({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:Vl({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 Wl;const jl={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=Ll[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:_l,formatRelative:(e,t,n,r)=>Fl[e],localize:Yl,match:Bl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hl(e,t){const n=El(e,t?.in),r=Rl(n,function(e,t){const n=El(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return r+1}function $l(e,t){const n=El(e,t?.in),r=+Ml(n)-+function(e,t){const n=Tl(e,t),r=kl(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ml(r)}(n);return Math.round(r/wl)+1}function ql(e,t){const n=El(e,t?.in),r=n.getFullYear(),a=Sl(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=kl(t?.in||e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=Cl(i,t),l=kl(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Cl(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ul(e,t){const n=El(e,t?.in),r=+Cl(n,t)-+function(e,t){const n=Sl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=ql(e,t),o=kl(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),Cl(o,t)}(n,t);return Math.round(r/wl)+1}function Kl(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const zl={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Kl("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Kl(n+1,2)},d:(e,t)=>Kl(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)=>Kl(e.getHours()%12||12,t.length),H:(e,t)=>Kl(e.getHours(),t.length),m:(e,t)=>Kl(e.getMinutes(),t.length),s:(e,t)=>Kl(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Kl(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Ql="midnight",Xl="noon",Gl="morning",Zl="afternoon",Jl="evening",ec="night",tc={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 zl.y(e,t)},Y:function(e,t,n,r){const a=ql(e,r),o=a>0?a:1-a;if("YY"===t){return Kl(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Kl(o,t.length)},R:function(e,t){return Kl(Tl(e),t.length)},u:function(e,t){return Kl(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 Kl(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 Kl(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 zl.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 Kl(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=Ul(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):Kl(a,t.length)},I:function(e,t,n){const r=$l(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Kl(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):zl.d(e,t)},D:function(e,t,n){const r=Hl(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Kl(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 Kl(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 Kl(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 Kl(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?Xl:0===r?Ql: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?Jl:r>=12?Zl:r>=4?Gl:ec,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 zl.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):zl.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Kl(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Kl(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):zl.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):zl.s(e,t)},S:function(e,t){return zl.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return rc(r);case"XXXX":case"XX":return ac(r);default:return ac(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return rc(r);case"xxxx":case"xx":return ac(r);default:return ac(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+nc(r,":");default:return"GMT"+ac(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+nc(r,":");default:return"GMT"+ac(r,":")}},t:function(e,t,n){return Kl(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Kl(+e,t.length)}};function nc(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+Kl(o,2)}function rc(e,t){if(e%60==0){return(e>0?"-":"+")+Kl(Math.abs(e)/60,2)}return ac(e,t)}function ac(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Kl(Math.trunc(r/60),2)+t+Kl(r%60,2)}const oc=(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"})}},ic=(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"})}},sc={p:ic,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return oc(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}}",oc(r,t)).replace("{{time}}",ic(a,t))}},lc=/^D+$/,cc=/^Y+$/,uc=["D","DD","YY","YYYY"];const dc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hc=/^'([^]*?)'?$/,mc=/''/g,fc=/[a-zA-Z]/;function gc(e,t,n){const r=Sl(),a=r.locale??jl,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=El(e,n?.in);if(!Ol(s))throw new RangeError("Invalid time value");let l=t.match(pc).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,sc[t])(e,a.formatLong)}return e})).join("").match(dc).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:yc(e)};if(tc[t])return{isToken:!0,value:e};if(t.match(fc))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 cc.test(e)}(r)||function(e){return lc.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),uc.includes(e))throw new RangeError(r)}(r,t,String(e));return(0,tc[r[0]])(s,r,a.localize,c)})).join("")}function yc(e){const t=e.match(hc);return t?t[1].replace(mc,"'"):e}function vc(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=vc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wc(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=vc(e))&&(r&&(r+=" "),r+=t);return r}function bc(e,t){return bc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bc(e,t)}function xc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kc(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var Ec,Dc,Sc=(void 0===Ec&&(Ec=0),function(){return++Ec}),Cc={},Mc={},Tc=["touchstart","touchmove"];function Pc(e,t){var n={};return-1!==Tc.indexOf(t)&&Dc&&(n.passive=!e.props.preventDefault),n}function Nc(t,n){var r,a,o=t.displayName||t.name||"Component";return a=r=function(n){var r,a;function s(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent: "+o+" lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.__getComponentNode=function(){var e=t.getInstance();return"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():i.findDOMNode(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!Mc[t._uid]){void 0===Dc&&(Dc=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}}()),Mc[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),Cc[t._uid]=function(e){var n;null!==t.componentNode&&(t.initTimeStamp>e.timeStamp||(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&kc(e,t,n))return!0;e=e.parentNode||e.host}return e}(e.composed&&e.composedPath&&e.composedPath().shift()||e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e)))},e.forEach((function(e){document.addEventListener(e,Cc[t._uid],Pc(xc(t),e))}))}},t.disableOnClickOutside=function(){delete Mc[t._uid];var e=Cc[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach((function(n){return document.removeEventListener(n,e,Pc(xc(t),n))})),delete Cc[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=Sc(),t.initTimeStamp=performance.now(),t}a=n,(r=s).prototype=Object.create(a.prototype),r.prototype.constructor=r,bc(r,a);var l=s.prototype;return l.getInstance=function(){if(t.prototype&&!t.prototype.isReactComponent)return this;var e=this.instanceRef;return e.getInstance?e.getInstance():e},l.componentDidMount=function(){"undefined"!=typeof document&&document.createElement&&(this.getInstance(),this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside())},l.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},l.componentWillUnmount=function(){this.disableOnClickOutside()},l.render=function(){var n=this.props;n.excludeScrollbar;var r=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}(n,["excludeScrollbar"]);return t.prototype&&t.prototype.isReactComponent?r.ref=this.getRef:r.wrappedRef=this.getRef,r.disableOnClickOutside=this.disableOnClickOutside,r.enableOnClickOutside=this.enableOnClickOutside,e.createElement(t,r)},s}(e.Component),r.displayName="OnClickOutside("+o+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},r.getClass=function(){return t.getClass?t.getClass():t},a}function Rc(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 Oc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Lc(e,t){const n=Rc(e);return isNaN(t)?Oc(e,NaN):t?(n.setDate(n.getDate()+t),n):n}function Ac(e,t){return Oc(e,+Rc(e)+t)}const _c=6048e5,Fc=864e5,Ic=6e4,Yc=36e5;function Vc(e,t){return Ac(e,t*Ic)}function Bc(e,t){const n=Rc(e);if(isNaN(t))return Oc(e,NaN);if(!t)return n;const r=n.getDate(),a=Oc(e,n.getTime());a.setMonth(n.getMonth()+t+1,0);return r>=a.getDate()?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function Wc(e,t){return Bc(e,3*t)}function jc(e,t){return Ac(e,1e3*t)}function Hc(e,t){return Lc(e,7*t)}function $c(e,t){return Bc(e,12*t)}function qc(e){const t=Rc(e);return t.setHours(0,0,0,0),t}function Uc(e){const t=Rc(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 Kc(e,t){const n=qc(e),r=qc(t),a=+n-Uc(n),o=+r-Uc(r);return Math.round((a-o)/Fc)}function zc(e,t){const n=Rc(e),r=Rc(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function Qc(e){const t=Rc(e);return Math.trunc(t.getMonth()/3)+1}function Xc(e,t){const n=Rc(e),r=Rc(t);return 4*(n.getFullYear()-r.getFullYear())+(Qc(n)-Qc(r))}function Gc(e,t){const n=Rc(e),r=Rc(t);return n.getFullYear()-r.getFullYear()}function Zc(e){const t=Rc(e);return t.setHours(23,59,59,999),t}function Jc(e){const t=Rc(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}let eu={};function tu(){return eu}function nu(e){const t=Rc(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}const ru={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 au(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ou={date:au({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:au({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:au({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},iu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function su(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 lu={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:su({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:su({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:su({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:su({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:su({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 cu(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 uu={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:cu({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:cu({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:cu({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:cu({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:cu({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"})},du={code:"en-US",formatDistance:(e,t,n)=>{let r;const a=ru[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:ou,formatRelative:(e,t,n,r)=>iu[e],localize:lu,match:uu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pu(e){const t=Rc(e),n=Oc(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hu(e,t){const n=tu(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=Rc(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 mu(e){return hu(e,{weekStartsOn:1})}function fu(e){const t=Rc(e),n=t.getFullYear(),r=Oc(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=mu(r),o=Oc(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const i=mu(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function gu(e){const t=Rc(e),n=+mu(t)-+function(e){const t=fu(e),n=Oc(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mu(n)}(t);return Math.round(n/_c)+1}function yu(e,t){const n=Rc(e),r=n.getFullYear(),a=tu(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=Oc(e,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const s=hu(i,t),l=Oc(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=hu(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vu(e,t){const n=Rc(e),r=+hu(n,t)-+function(e,t){const n=tu(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=yu(e,t),o=Oc(e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),hu(o,t)}(n,t);return Math.round(r/_c)+1}function wu(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const bu={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return wu("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):wu(n+1,2)},d:(e,t)=>wu(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)=>wu(e.getHours()%12||12,t.length),H:(e,t)=>wu(e.getHours(),t.length),m:(e,t)=>wu(e.getMinutes(),t.length),s:(e,t)=>wu(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return wu(Math.trunc(r*Math.pow(10,n-3)),t.length)}},xu="midnight",ku="noon",Eu="morning",Du="afternoon",Su="evening",Cu="night",Mu={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 bu.y(e,t)},Y:function(e,t,n,r){const a=yu(e,r),o=a>0?a:1-a;if("YY"===t){return wu(o%100,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):wu(o,t.length)},R:function(e,t){return wu(fu(e),t.length)},u:function(e,t){return wu(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 wu(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 wu(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 bu.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 wu(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=vu(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):wu(a,t.length)},I:function(e,t,n){const r=gu(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):wu(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):bu.d(e,t)},D:function(e,t,n){const r=function(e){const t=Rc(e);return Kc(t,pu(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):wu(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 wu(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 wu(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 wu(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?ku:0===r?xu: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?Su:r>=12?Du:r>=4?Eu:Cu,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 bu.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):bu.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):wu(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):wu(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):bu.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):bu.s(e,t)},S:function(e,t){return bu.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Pu(r);case"XXXX":case"XX":return Nu(r);default:return Nu(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Pu(r);case"xxxx":case"xx":return Nu(r);default:return Nu(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tu(r,":");default:return"GMT"+Nu(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tu(r,":");default:return"GMT"+Nu(r,":")}},t:function(e,t,n){return wu(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return wu(e.getTime(),t.length)}};function Tu(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+wu(o,2)}function Pu(e,t){if(e%60==0){return(e>0?"-":"+")+wu(Math.abs(e)/60,2)}return Nu(e,t)}function Nu(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+wu(Math.trunc(r/60),2)+t+wu(r%60,2)}const Ru=(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"})}},Ou=(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"})}},Lu={p:Ou,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Ru(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}}",Ru(r,t)).replace("{{time}}",Ou(a,t))}},Au=/^D+$/,_u=/^Y+$/,Fu=["D","DD","YY","YYYY"];function Iu(e){return Au.test(e)}function Yu(e){return _u.test(e)}function Vu(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),Fu.includes(e))throw new RangeError(r)}function Bu(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Wu(e){if(!Bu(e)&&"number"!=typeof e)return!1;const t=Rc(e);return!isNaN(Number(t))}const ju=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$u=/^'([^]*?)'?$/,qu=/''/g,Uu=/[a-zA-Z]/;function Ku(e,t,n){const r=tu(),a=n?.locale??r.locale??du,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=Rc(e);if(!Wu(s))throw new RangeError("Invalid time value");let l=t.match(Hu).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Lu[t])(e,a.formatLong)}return e})).join("").match(ju).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:zu(e)};if(Mu[t])return{isToken:!0,value:e};if(t.match(Uu))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&&Yu(o)||!n?.useAdditionalDayOfYearTokens&&Iu(o))&&Vu(o,t,String(e));return(0,Mu[o[0]])(s,o,a.localize,c)})).join("")}function zu(e){const t=e.match($u);return t?t[1].replace(qu,"'"):e}function Qu(e){return Rc(e).getDate()}function Xu(e){return Rc(e).getHours()}function Gu(e){return Rc(e).getMinutes()}function Zu(e){return Rc(e).getMonth()}function Ju(e){return Rc(e).getSeconds()}function ed(e){return Rc(e).getTime()}function td(e){return Rc(e).getFullYear()}function nd(e,t){const n=Rc(e),r=Rc(t);return n.getTime()>r.getTime()}function rd(e,t){return+Rc(e)<+Rc(t)}function ad(e){const t=Rc(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function od(e,t){const n=+Rc(e),[r,a]=[+Rc(t.start),+Rc(t.end)].sort(((e,t)=>e-t));return n>=r&&n<=a}function id(e){let t;return e.forEach((function(e){const n=Rc(e);(void 0===t||t<n||isNaN(Number(n)))&&(t=n)})),t||new Date(NaN)}function sd(e){let t;return e.forEach((e=>{const n=Rc(e);(!t||t>n||isNaN(+n))&&(t=n)})),t||new Date(NaN)}class ld{subPriority=0;validate(e,t){return!0}}class cd extends ld{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 ud extends ld{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:Oc(e,function(e,t){const n=t instanceof Date?Oc(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 dd{run(e,t,n,r){const a=this.parse(e,t,n,r);return a?{setter:new cd(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(e,t,n){return!0}}const pd=/^(1[0-2]|0?\d)/,hd=/^(3[0-1]|[0-2]?\d)/,md=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,fd=/^(5[0-3]|[0-4]?\d)/,gd=/^(2[0-3]|[0-1]?\d)/,yd=/^(2[0-4]|[0-1]?\d)/,vd=/^(1[0-1]|0?\d)/,wd=/^(1[0-2]|0?\d)/,bd=/^[0-5]?\d/,xd=/^[0-5]?\d/,kd=/^\d/,Ed=/^\d{1,2}/,Dd=/^\d{1,3}/,Sd=/^\d{1,4}/,Cd=/^-?\d+/,Md=/^-?\d/,Td=/^-?\d{1,2}/,Pd=/^-?\d{1,3}/,Nd=/^-?\d{1,4}/,Rd=/^([+-])(\d{2})(\d{2})?|Z/,Od=/^([+-])(\d{2})(\d{2})|Z/,Ld=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ad=/^([+-])(\d{2}):(\d{2})|Z/,_d=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Fd(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Id(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Yd(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*Yc+o*Ic+1e3*i),rest:t.slice(n[0].length)}}function Vd(e){return Id(Cd,e)}function Bd(e,t){switch(e){case 1:return Id(kd,t);case 2:return Id(Ed,t);case 3:return Id(Dd,t);case 4:return Id(Sd,t);default:return Id(new RegExp("^\\d{1,"+e+"}"),t)}}function Wd(e,t){switch(e){case 1:return Id(Md,t);case 2:return Id(Td,t);case 3:return Id(Pd,t);case 4:return Id(Nd,t);default:return Id(new RegExp("^-?\\d{1,"+e+"}"),t)}}function jd(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Hd(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 $d(e){return e%400==0||e%4==0&&e%100!=0}const qd=[31,28,31,30,31,30,31,31,30,31,30,31],Ud=[31,29,31,30,31,30,31,31,30,31,30,31];function Kd(e,t,n){const r=tu(),a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rc(e),i=o.getDay(),s=7-a;return Lc(o,t<0||t>6?t-(i+s)%7:((t%7+7)%7+s)%7-(i+s)%7)}function zd(e,t){const n=Rc(e),r=function(e){let t=Rc(e).getDay();return 0===t&&(t=7),t}(n);return Lc(n,t-r)}const Qd={G:new class extends dd{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 dd{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 Fd(Bd(4,e),r);case"yo":return Fd(n.ordinalNumber(e,{unit:"year"}),r);default:return Fd(Bd(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=Hd(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 dd{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Fd(Bd(4,e),r);case"Yo":return Fd(n.ordinalNumber(e,{unit:"year"}),r);default:return Fd(Bd(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const a=yu(e,r);if(n.isTwoDigitYear){const t=Hd(n.year,a);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),hu(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),hu(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends dd{priority=130;parse(e,t){return Wd("R"===t?4:t.length,e)}set(e,t,n){const r=Oc(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),mu(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends dd{priority=130;parse(e,t){return Wd("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 dd{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Bd(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 dd{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Bd(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 dd{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 Fd(Id(pd,e),r);case"MM":return Fd(Bd(2,e),r);case"Mo":return Fd(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 dd{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return Fd(Id(pd,e),r);case"LL":return Fd(Bd(2,e),r);case"Lo":return Fd(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 dd{priority=100;parse(e,t,n){switch(t){case"w":return Id(fd,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Bd(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return hu(function(e,t,n){const r=Rc(e),a=vu(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 dd{priority=100;parse(e,t,n){switch(t){case"I":return Id(fd,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Bd(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return mu(function(e,t){const n=Rc(e),r=gu(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 dd{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Id(hd,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Bd(t.length,e)}}validate(e,t){const n=$d(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Ud[r]:t>=1&&t<=qd[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 dd{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Id(md,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Bd(t.length,e)}}validate(e,t){return $d(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 dd{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=Kd(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends dd{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 Fd(Bd(t.length,e),a);case"eo":return Fd(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=Kd(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 dd{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 Fd(Bd(t.length,e),a);case"co":return Fd(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=Kd(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 dd{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Bd(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Fd(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 Fd(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Fd(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Fd(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=zd(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 dd{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(jd(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends dd{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(jd(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends dd{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(jd(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends dd{priority=70;parse(e,t,n){switch(t){case"h":return Id(wd,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"H":return Id(gd,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"K":return Id(vd,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=70;parse(e,t,n){switch(t){case"k":return Id(yd,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Bd(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 dd{priority=60;parse(e,t,n){switch(t){case"m":return Id(bd,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Bd(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 dd{priority=50;parse(e,t,n){switch(t){case"s":return Id(xd,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Bd(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 dd{priority=30;parse(e,t){return Fd(Bd(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 dd{priority=10;parse(e,t){switch(t){case"X":return Yd(Rd,e);case"XX":return Yd(Od,e);case"XXXX":return Yd(Ld,e);case"XXXXX":return Yd(_d,e);default:return Yd(Ad,e)}}set(e,t,n){return t.timestampIsSet?e:Oc(e,e.getTime()-Uc(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends dd{priority=10;parse(e,t){switch(t){case"x":return Yd(Rd,e);case"xx":return Yd(Od,e);case"xxxx":return Yd(Ld,e);case"xxxxx":return Yd(_d,e);default:return Yd(Ad,e)}}set(e,t,n){return t.timestampIsSet?e:Oc(e,e.getTime()-Uc(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends dd{priority=40;parse(e){return Vd(e)}set(e,t,n){return[Oc(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends dd{priority=20;parse(e){return Vd(e)}set(e,t,n){return[Oc(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Xd=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Gd=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Zd=/^'([^]*?)'?$/,Jd=/''/g,ep=/\S/,tp=/[a-zA-Z]/;function np(e,t,n,r){const a=Object.assign({},tu()),o=r?.locale??a.locale??du,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?Rc(n):Oc(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o},c=[new ud],u=t.match(Gd).map((e=>{const t=e[0];if(t in Lu){return(0,Lu[t])(e,o.formatLong)}return e})).join("").match(Xd),d=[];for(let a of u){!r?.useAdditionalWeekYearTokens&&Yu(a)&&Vu(a,t,e),!r?.useAdditionalDayOfYearTokens&&Iu(a)&&Vu(a,t,e);const i=a[0],s=Qd[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 Oc(n,NaN);c.push(r.setter),e=r.rest}else{if(i.match(tp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===a?a="'":"'"===i&&(a=a.match(Zd)[1].replace(Jd,"'")),0!==e.indexOf(a))return Oc(n,NaN);e=e.slice(a.length)}}if(e.length>0&&ep.test(e))return Oc(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=Rc(n);if(isNaN(h.getTime()))return Oc(n,NaN);const m={};for(const e of p){if(!e.validate(h,l))return Oc(n,NaN);const t=e.set(h,m,l);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return Oc(n,h)}function rp(e,t){const n=function(e){const t={},n=e.split(ap.dateTimeDelimiter);let r;if(n.length>2)return t;/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],ap.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ap.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length)));if(r){const e=ap.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(op);if(!n)return new Date(NaN);const r=!!n[4],a=lp(n[1]),o=lp(n[2])-1,i=lp(n[3]),s=lp(n[4]),l=lp(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<=(up[t]||(dp(e)?29:28))}(t,o,i)&&function(e,t){return t>=1&&t<=(dp(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(ip);if(!t)return NaN;const n=cp(t[1]),r=cp(t[2]),a=cp(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*Yc+r*Ic+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(sp);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*Yc+a*Ic)}(n.timezone),isNaN(o)?new Date(NaN):new Date(a+i+o)}const ap={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},op=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ip=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sp=/^([+-])(\d{2})(?::?(\d{2}))?$/;function lp(e){return e?parseInt(e):1}function cp(e){return e&&parseFloat(e.replace(",","."))||0}const up=[31,null,31,30,31,30,31,31,30,31,30,31];function dp(e){return e%400==0||e%4==0&&e%100!=0}function pp(e,t){const n=Rc(e),r=n.getFullYear(),a=n.getDate(),o=Oc(e,0);o.setFullYear(r,t,15),o.setHours(0,0,0,0);const i=function(e){const t=Rc(e),n=t.getFullYear(),r=t.getMonth(),a=Oc(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 hp(e,t){const n=Rc(e);return n.setHours(t),n}function mp(e,t){const n=Rc(e);return n.setMinutes(t),n}function fp(e,t){const n=Rc(e),r=t-(Math.trunc(n.getMonth()/3)+1);return pp(n,n.getMonth()+3*r)}function gp(e,t){const n=Rc(e);return n.setSeconds(t),n}function yp(e,t){const n=Rc(e);return isNaN(+n)?Oc(e,NaN):(n.setFullYear(t),n)}function vp(e){const t=Rc(e);return t.setDate(1),t.setHours(0,0,0,0),t}function wp(e,t){return Bc(e,-t)}function bp(e,t){return Wc(e,-t)}function xp(e,t){return Hc(e,-t)}function kp(e,t){return $c(e,-t)}function Ep(e){return Cp(e)?(e.nodeName||"").toLowerCase():"#document"}function Dp(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Sp(e){var t;return null==(t=(Cp(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Cp(e){return e instanceof Node||e instanceof Dp(e).Node}function Mp(e){return e instanceof Element||e instanceof Dp(e).Element}function Tp(e){return e instanceof HTMLElement||e instanceof Dp(e).HTMLElement}function Pp(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Dp(e).ShadowRoot)}function Np(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Fp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Rp(e){return["table","td","th"].includes(Ep(e))}function Op(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Lp(e){const t=Ap(),n=Fp(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 Ap(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function _p(e){return["html","body","#document"].includes(Ep(e))}function Fp(e){return Dp(e).getComputedStyle(e)}function Ip(e){return Mp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yp(e){if("html"===Ep(e))return e;const t=e.assignedSlot||e.parentNode||Pp(e)&&e.host||Sp(e);return Pp(t)?t.host:t}function Vp(e){const t=Yp(e);return _p(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tp(t)&&Np(t)?t:Vp(t)}function Bp(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=Vp(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=Dp(a);return o?t.concat(i,i.visualViewport||[],Np(a)?a:[],i.frameElement&&n?Bp(i.frameElement):[]):t.concat(a,Bp(a,[],n))}const Wp=Math.min,jp=Math.max,Hp=Math.round,$p=Math.floor,qp=e=>({x:e,y:e}),Up={left:"right",right:"left",bottom:"top",top:"bottom"},Kp={start:"end",end:"start"};function zp(e,t,n){return jp(e,Wp(t,n))}function Qp(e,t){return"function"==typeof e?e(t):e}function Xp(e){return e.split("-")[0]}function Gp(e){return e.split("-")[1]}function Zp(e){return"y"===e?"height":"width"}function Jp(e){return["top","bottom"].includes(Xp(e))?"y":"x"}function eh(e){return"x"===Jp(e)?"y":"x"}function th(e){return e.replace(/start|end/g,(e=>Kp[e]))}function nh(e){return e.replace(/left|right|bottom|top/g,(e=>Up[e]))}function rh(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 ah(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 oh(e,t,n){let{reference:r,floating:a}=e;const o=Jp(t),i=eh(t),s=Zp(i),l=Xp(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(Gp(t)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1)}return h}function ih(e){const t=Fp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Tp(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=Hp(n)!==o||Hp(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function sh(e){return Mp(e)?e:e.contextElement}function lh(e){const t=sh(e);if(!Tp(t))return qp(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=ih(t);let i=(o?Hp(n.width):n.width)/r,s=(o?Hp(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const ch=qp(0);function uh(e){const t=Dp(e);return Ap()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ch}function dh(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=sh(e);let i=qp(1);t&&(r?Mp(r)&&(i=lh(r)):i=lh(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Dp(e))&&t}(o,n,r)?uh(o):qp(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=Dp(o),t=r&&Mp(r)?Dp(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){const e=lh(a),t=a.getBoundingClientRect(),r=Fp(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=Dp(a),a=n.frameElement}}return ah({width:u,height:d,x:l,y:c})}function ph(e){return dh(Sp(e)).left+Ip(e).scrollLeft}function hh(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Dp(e),r=Sp(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=Ap();(!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=Sp(e),n=Ip(e),r=e.ownerDocument.body,a=jp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=jp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ph(e);const s=-n.scrollTop;return"rtl"===Fp(r).direction&&(i+=jp(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(Sp(e));else if(Mp(t))r=function(e,t){const n=dh(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Tp(e)?lh(e):qp(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=uh(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return ah(r)}function mh(e,t){const n=Yp(e);return!(n===t||!Mp(n)||_p(n))&&("fixed"===Fp(n).position||mh(n,t))}function fh(e,t,n){const r=Tp(t),a=Sp(t),o="fixed"===n,i=dh(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=qp(0);if(r||!r&&!o)if(("body"!==Ep(t)||Np(a))&&(s=Ip(t)),r){const e=dh(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=ph(a));return{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function gh(e){return"static"===Fp(e).position}function yh(e,t){return Tp(e)&&"fixed"!==Fp(e).position?t?t(e):e.offsetParent:null}function vh(e,t){const n=Dp(e);if(Op(e))return n;if(!Tp(e)){let t=Yp(e);for(;t&&!_p(t);){if(Mp(t)&&!gh(t))return t;t=Yp(t)}return n}let r=yh(e,t);for(;r&&Rp(r)&&gh(r);)r=yh(r,t);return r&&_p(r)&&gh(r)&&!Lp(r)?n:r||function(e){let t=Yp(e);for(;Tp(t)&&!_p(t);){if(Op(t))return null;if(Lp(t))return t;t=Yp(t)}return null}(e)||n}const wh={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=Sp(r),s=!!t&&Op(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=qp(1);const u=qp(0),d=Tp(r);if((d||!d&&!o)&&(("body"!==Ep(r)||Np(i))&&(l=Ip(r)),Tp(r))){const e=dh(r);c=lh(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:Sp,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o="clippingAncestors"===n?Op(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Bp(e,[],!1).filter((e=>Mp(e)&&"body"!==Ep(e))),a=null;const o="fixed"===Fp(e).position;let i=o?Yp(e):e;for(;Mp(i)&&!_p(i);){const t=Fp(i),n=Lp(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||Np(i)&&!n&&mh(e,i))?r=r.filter((e=>e!==i)):a=t,i=Yp(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=hh(t,n,a);return e.top=jp(r.top,e.top),e.right=Wp(r.right,e.right),e.bottom=Wp(r.bottom,e.bottom),e.left=jp(r.left,e.left),e}),hh(t,s,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:vh,getElementRects:async function(e){const t=this.getOffsetParent||vh,n=this.getDimensions,r=await n(e.floating);return{reference:fh(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}=ih(e);return{width:t,height:n}},getScale:lh,isElement:Mp,isRTL:function(e){return"rtl"===Fp(e).direction}};function bh(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=sh(e),u=a||o?[...c?Bp(c):[],...Bp(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=Sp(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:-$p(u)+"px "+-$p(a.clientWidth-(c+d))+"px "+-$p(a.clientHeight-(u+p))+"px "+-$p(c)+"px",threshold:jp(0,Wp(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?dh(e):null;return l&&function t(){const r=dh(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 xh=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=Xp(n),s=Gp(n),l="y"===Jp(n),c=["left","top"].includes(i)?-1:1,u=o&&l?-1:1,d=Qp(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}}}}},kh=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}=Qp(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Xp(a),v=Jp(s),w=Xp(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!f?[nh(s)]:function(e){const t=nh(e);return[th(e),t,th(t)]}(s)),k="none"!==m;!p&&k&&x.push(...function(e,t,n,r){const a=Gp(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[]}}(Xp(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(th)))),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}=Qp(t,e),m=rh(h),f=s[p?"floating"===d?"reference":"floating":d],g=ah(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=ah(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=Gp(e),a=eh(e),o=Zp(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nh(i)),[i,nh(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 M,T;const e=((null==(M=o.flip)?void 0:M.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(T=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=C.filter((e=>{if(k){const t=Jp(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{}}}},Eh=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}=Qp(e,t)||{};if(null==c)return{};const d=rh(u),p={x:n,y:r},h=eh(a),m=Zp(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=Wp(d[y],S),M=Wp(d[v],S),T=C,P=E-f[m]-M,N=E/2-f[m]/2+D,R=zp(T,N,P),O=!l.arrow&&null!=Gp(a)&&N!==R&&o.reference[m]/2-(N<T?C:M)-f[m]/2<0,L=O?N<T?N-T:N-P:0;return{[h]:p[h]+L,data:{[h]:R,centerOffset:N-R-L,...O&&{alignmentOffset:L}},reset:O}}}),Dh=(e,t,n)=>{const r=new Map,a={platform:wh,...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}=oh(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}=oh(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var Sh="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Ch(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(!Ch(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)&&!Ch(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Mh(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Th(e,t){const n=Mh(e);return Math.round(t*n)/n}function Ph(e){const t=u.useRef(e);return Sh((()=>{t.current=e})),t}const Nh=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?Eh({element:n.current,padding:r}).fn(t):{}:n?Eh({element:n,padding:r}).fn(t):{};var a}}),Rh=(e,t)=>({...xh(e),options:[e,t]}),Oh=(e,t)=>({...Nh(e),options:[e,t]}),Lh={...u},Ah=Lh.useInsertionEffect||(e=>e());var _h="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Fh(){return Fh=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},Fh.apply(this,arguments)}let Ih=!1,Yh=0;const Vh=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yh++;const Bh=Lh.useId||function(){const[e,t]=u.useState((()=>Ih?Vh():void 0));return _h((()=>{null==e&&t(Vh())}),[]),u.useEffect((()=>{Ih=!0}),[]),e},Wh=u.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:a}},width:o=14,height:i=7,tipRadius:s=0,strokeWidth:l=0,staticOffset:c,stroke:d,d:p,style:{transform:h,...m}={},...f}=e,g=Bh(),[y,v]=u.useState(!1);if(_h((()=>{if(!r)return;"rtl"===Fp(r).direction&&v(!0)}),[r]),!r)return null;const w=2*l,b=w/2,x=o/2*(s/-8+1),k=i/2*s/4,[E,D]=n.split("-"),S=!!p,C="top"===E||"bottom"===E,M=c&&"end"===D?"bottom":"top";let T=c&&"end"===D?"right":"left";c&&y&&(T="end"===D?"left":"right");const P=null!=(null==a?void 0:a.x)?c||a.x:"",N=null!=(null==a?void 0:a.y)?c||a.y:"",R=p||"M0,0 H"+o+" L"+(o-x)+","+(i-k)+" Q"+o/2+","+i+" "+x+","+(i-k)+" Z",O={top:S?"rotate(180deg)":"",left:S?"rotate(90deg)":"rotate(-90deg)",bottom:S?"":"rotate(180deg)",right:S?"rotate(-90deg)":"rotate(90deg)"}[E];return u.createElement("svg",Fh({},f,{"aria-hidden":!0,ref:t,width:S?o:o+w,height:o,viewBox:"0 0 "+o+" "+(i>o?i:o),style:{position:"absolute",pointerEvents:"none",[T]:P,[M]:N,[E]:C||S?"100%":"calc(100% - "+w/2+"px)",transform:""+O+(null!=h?h:""),...m}}),w>0&&u.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:w+(p?0:1),d:R}),u.createElement("path",{stroke:w&&!p?f.fill:"none",d:R}),u.createElement("clipPath",{id:g},u.createElement("rect",{x:-b,y:b*(S?-1:1),width:o+w,height:o})))}));const jh=u.createContext(null),Hh=u.createContext(null),$h=()=>{var e;return(null==(e=u.useContext(jh))?void 0:e.id)||null},qh=()=>u.useContext(Hh);function Uh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,a=Bh(),o=u.useRef({}),[i]=u.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)))||[])}}}())),s=null!=$h(),[l,c]=u.useState(r.reference),d=function(e){const t=u.useRef((()=>{}));return Ah((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,r)=>{o.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=u.useMemo((()=>({setPositionReference:c})),[]),h=u.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return u.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:h,events:i,floatingId:a,refs:p})),[t,d,h,i,a,p])}function Kh(e){void 0===e&&(e={});const{nodeId:t}=e,n=Uh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[o,i]=u.useState(null),[s,l]=u.useState(null),c=(null==a?void 0:a.reference)||o,p=u.useRef(null),h=qh();_h((()=>{c&&(p.current=c)}),[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[p,h]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=u.useState(r);Ch(m,r)||f(r);const[g,y]=u.useState(null),[v,w]=u.useState(null),b=u.useCallback((e=>{e!==D.current&&(D.current=e,y(e))}),[]),x=u.useCallback((e=>{e!==S.current&&(S.current=e,w(e))}),[]),k=o||g,E=i||v,D=u.useRef(null),S=u.useRef(null),C=u.useRef(p),M=null!=l,T=Ph(l),P=Ph(a),N=u.useCallback((()=>{if(!D.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),Dh(D.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};R.current&&!Ch(C.current,t)&&(C.current=t,d.flushSync((()=>{h(t)})))}))}),[m,t,n,P]);Sh((()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const R=u.useRef(!1);Sh((()=>(R.current=!0,()=>{R.current=!1})),[]),Sh((()=>{if(k&&(D.current=k),E&&(S.current=E),k&&E){if(T.current)return T.current(k,E,N);N()}}),[k,E,N,T,M]);const O=u.useMemo((()=>({reference:D,floating:S,setReference:b,setFloating:x})),[b,x]),L=u.useMemo((()=>({reference:k,floating:E})),[k,E]),A=u.useMemo((()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Th(L.floating,p.x),r=Th(L.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Mh(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,L.floating,p.x,p.y]);return u.useMemo((()=>({...p,update:N,refs:O,elements:L,floatingStyles:A})),[p,N,O,L,A])}({...e,elements:{...a,...s&&{reference:s}}}),f=u.useCallback((e=>{const t=Mp(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),m.refs.setReference(t)}),[m.refs]),g=u.useCallback((e=>{(Mp(e)||null===e)&&(p.current=e,i(e)),(Mp(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!Mp(e))&&m.refs.setReference(e)}),[m.refs]),y=u.useMemo((()=>({...m.refs,setReference:g,setPositionReference:f,domReference:p})),[m.refs,g,f]),v=u.useMemo((()=>({...m.elements,domReference:c})),[m.elements,c]),w=u.useMemo((()=>({...m,...r,refs:y,elements:v,nodeId:t})),[m,y,v,t,r]);return _h((()=>{r.dataRef.current.floatingContext=w;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),u.useMemo((()=>({...m,context:w,refs:y,elements:v})),[m,y,v,w])}
2
2
  /*!
3
3
  react-datepicker v7.3.0
4
4
  https://github.com/Hacker0x01/react-datepicker