@maycolem/stories 29.0.0 → 30.0.0

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.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),y=require("react"),ta=require("react-dom");function na(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Cn=na(y),ra="_ScrollContainerClassName_12xv6_26",ia="_ItemClassName_12xv6_41",Cr={ScrollContainerClassName:ra,ItemClassName:ia},oa="_ProfileStory_1dl0h_1",sa="_ProfileStoryWrap_1dl0h_12",aa="_ProfileStory__wrapImage_1dl0h_26",la="_ProfileStory__image_1dl0h_34",ua="_ProfileStory__title_1dl0h_49",ca="_hasSeenAllStories_1dl0h_58",Be={ProfileStory:oa,ProfileStoryWrap:sa,ProfileStory__wrapImage:aa,ProfileStory__image:la,ProfileStory__title:ua,hasSeenAllStories:ca};function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),g=require("react"),Zu=require("react-dom");function Qd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const mi=Qd(g),ep="_ScrollContainerClassName_12xv6_26",tp="_ItemClassName_12xv6_41",As={ScrollContainerClassName:ep,ItemClassName:tp},np="_ProfileStory_1dl0h_1",rp="_ProfileStoryWrap_1dl0h_12",ip="_ProfileStory__wrapImage_1dl0h_26",op="_ProfileStory__image_1dl0h_34",ap="_ProfileStory__title_1dl0h_49",sp="_hasSeenAllStories_1dl0h_58",Zt={ProfileStory:np,ProfileStoryWrap:rp,ProfileStory__wrapImage:ip,ProfileStory__image:op,ProfileStory__title:ap,hasSeenAllStories:sp};function Ia(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ao={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var _r;function da(){return _r||(_r=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(tn)),tn.exports}var fa=da();const ve=Qi(fa);function pa(){const[e,t]=y.useState({width:0,height:0}),n=y.useRef();return[y.useCallback(i=>{n.current&&n.current.disconnect(),i&&(n.current=new ResizeObserver(o=>{const s=o[0];if(!s)return;const{width:a,height:l}=s.contentRect;a&&l&&t({width:a,height:l})}),n.current.observe(i))},[]),e]}var nn,Mr;function va(){return Mr||(Mr=1,nn={hexToRGB:r=>{let i=r;return i.length===4&&(i=i[0]+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),{r:parseInt(i.substring(1,3),16),g:parseInt(i.substring(3,5),16),b:parseInt(i.substring(5,7),16)}},formatRGB:({r,g:i,b:o})=>`rgb(${r},${i},${o})`,formatRGBA:({r,g:i,b:o},s)=>`rgba(${r},${i},${o},${s})`}),nn}var rn,Ar;function ha(){if(Ar)return rn;Ar=1;const{hexToRGB:e,formatRGB:t,formatRGBA:n}=va();return rn=(i,o)=>{const s=e(i);return typeof o=="number"&&o>=0&&o<=1?n(s,o):t(s)},rn}var ma=ha();const ga=Qi(ma),Zn=({image:e,title:t,color:n,className:r,onProfileClick:i,width:o,hasSeenAllStories:s})=>{const[a,{width:l,height:u}]=pa();return T.jsx("div",{ref:a,children:T.jsxs("div",{className:ve(Be.ProfileStory,r,{[Be.hasSeenAllStories]:s}),onClick:i,style:{"--story-color":n,"--story-color-alpha":n&&ga(n,.7),"--story-width":o??`${l}px`},children:[T.jsx("div",{className:Be.ProfileStoryWrap,children:T.jsx("div",{className:Be.ProfileStory__wrapImage,children:T.jsx("div",{className:Be.ProfileStory__image,children:T.jsx("img",{src:e,alt:"",draggable:!1})})})}),t&&T.jsx("div",{className:Be.ProfileStory__title,children:t})]})})},eo=({container:e="HOME"}={})=>{const t="apuestotal-stories-"+e;function n(){const l=localStorage.getItem(t);if(!l)return{};try{const u=JSON.parse(l),c={};for(const d in u)c[d]={seenStoryIds:new Set(u[d].seenStoryIds)};return c}catch(u){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",u),{}}}function r(l){const u={};for(const c in l)u[c]={seenStoryIds:Array.from(l[c].seenStoryIds)};localStorage.setItem(t,JSON.stringify(u))}function i(l,u){const c=n();c[l]||(c[l]={seenStoryIds:new Set}),c[l].seenStoryIds.add(u),r(c)}function o(l){const c=n()[l==null?void 0:l.id];return c?l.stories.every(d=>c.seenStoryIds.has(d==null?void 0:d.id)):!1}function s(l){const c=n()[l.id];if(!c)return 0;for(let d=0;d<l.stories.length;d++)if(!c.seenStoryIds.has(l.stories[d].id))return d;return 0}function a(l){const u=[],c=[];for(const d of l)o(d)?c.push(d):u.push(d);return[...u,...c]}return{markStorySeen:i,hasSeenAllStories:o,getNextUnseenStoryIndex:s,sortProfilesBySeenStatus:a}};function ya({scroll:e,targets:t}){const n=y.useRef([]),r=y.useCallback(o=>{n.current.forEach(({el:s,originalOverflow:a})=>{s.style.overflow=a}),n.current=[],o.forEach(s=>{if(typeof s=="string"){const a=document.getElementById(s);a?(n.current.push({target:s,el:a,originalOverflow:a.style.overflow}),a.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${s}"`)}else s===window||s===document?[document.body,document.documentElement].forEach(a=>{n.current.push({target:s,el:a,originalOverflow:a.style.overflow}),a.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",s)})},[]),i=y.useCallback(()=>{n.current.forEach(({el:o,originalOverflow:s})=>{o.style.overflow=s}),n.current=[]},[]);return y.useEffect(()=>{switch(e){case"ON":i();break;case"OFF":r(t);break}return()=>{i()}},[e]),{disableScroll:r,enableScroll:i}}function Ir(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Jn(e,t){e===void 0&&(e={}),t===void 0&&(t={});const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Ir(t[r])&&Ir(e[r])&&Object.keys(t[r]).length>0&&Jn(e[r],t[r])})}const to={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function De(){const e=typeof document<"u"?document:{};return Jn(e,to),e}const Sa={document:to,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Q(){const e=typeof window<"u"?window:{};return Jn(e,Sa),e}function wa(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function xa(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function _n(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function Ot(){return Date.now()}function ba(e){const t=Q();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Ta(e,t){t===void 0&&(t="x");const n=Q();let r,i,o;const s=ba(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function gt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Ea(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function te(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(r!=null&&!Ea(r)){const i=Object.keys(Object(r)).filter(o=>t.indexOf(o)<0);for(let o=0,s=i.length;o<s;o+=1){const a=i[o],l=Object.getOwnPropertyDescriptor(r,a);l!==void 0&&l.enumerable&&(gt(e[a])&&gt(r[a])?r[a].__swiper__?e[a]=r[a]:te(e[a],r[a]):!gt(e[a])&&gt(r[a])?(e[a]={},r[a].__swiper__?e[a]=r[a]:te(e[a],r[a])):e[a]=r[a])}}}return e}function yt(e,t,n){e.style.setProperty(t,n)}function no(e){let{swiper:t,targetPosition:n,side:r}=e;const i=Q(),o=-t.translate;let s=null,a;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const u=n>o?"next":"prev",c=(f,v)=>u==="next"&&f>=v||u==="prev"&&f<=v,d=()=>{a=new Date().getTime(),s===null&&(s=a);const f=Math.max(Math.min((a-s)/l,1),0),v=.5-Math.cos(f*Math.PI)/2;let p=o+v*(n-o);if(c(p,n)&&(p=n),t.wrapperEl.scrollTo({[r]:p}),c(p,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:p})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(d)};d()}function fe(e,t){t===void 0&&(t="");const n=Q(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(i=>i.matches(t)):r}function Pa(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function Ca(e,t){const n=Q();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=Pa(e,t))),r}function Rt(e){try{console.warn(e);return}catch{}}function Ce(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:wa(t)),n}function _a(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Ma(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function _e(e,t){return Q().getComputedStyle(e,null).getPropertyValue(t)}function Vr(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Aa(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function Lr(e,t,n){const r=Q();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function me(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function Ia(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90===0?t+.001:t}function Or(e,t){t===void 0&&(t=""),typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let on;function Va(){const e=Q(),t=De();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ro(){return on||(on=Va()),on}let sn;function La(e){let{userAgent:t}=e===void 0?{}:e;const n=ro(),r=Q(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,u=o.match(/(Android);?[\s\/]+([\d.]+)?/);let c=o.match(/(iPad).*OS\s([\d_]+)/);const d=o.match(/(iPod)(.*OS\s([\d_]+))?/),f=!c&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),v=i==="Win32";let p=i==="MacIntel";const h=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!c&&p&&n.touch&&h.indexOf(`${a}x${l}`)>=0&&(c=o.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),p=!1),u&&!v&&(s.os="android",s.android=!0),(c||f||d)&&(s.os="ios",s.ios=!0),s}function io(e){return e===void 0&&(e={}),sn||(sn=La(e)),sn}let an;function Oa(){const e=Q(),t=io();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,u]=a.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));n=l<16||l===16&&u<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function oo(){return an||(an=Oa()),an}function Ra(e){let{swiper:t,on:n,emit:r}=e;const i=Q();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(d=>{s=i.requestAnimationFrame(()=>{const{width:f,height:v}=t;let p=f,h=v;d.forEach(g=>{let{contentBoxSize:m,contentRect:S,target:w}=g;w&&w!==t.el||(p=S?S.width:(m[0]||m).inlineSize,h=S?S.height:(m[0]||m).blockSize)}),(p!==f||h!==v)&&a()})}),o.observe(t.el))},u=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},c=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",c)}),n("destroy",()=>{u(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",c)})}function Da(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=Q(),a=function(c,d){d===void 0&&(d={});const f=s.MutationObserver||s.WebkitMutationObserver,v=new f(p=>{if(t.__preventObserver__)return;if(p.length===1){i("observerUpdate",p[0]);return}const h=function(){i("observerUpdate",p[0])};s.requestAnimationFrame?s.requestAnimationFrame(h):s.setTimeout(h,0)});v.observe(c,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:t.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),o.push(v)},l=()=>{if(t.params.observer){if(t.params.observeParents){const c=Aa(t.hostEl);for(let d=0;d<c.length;d+=1)a(c[d])}a(t.hostEl,{childList:t.params.observeSlideChildren}),a(t.wrapperEl,{attributes:!1})}},u=()=>{o.forEach(c=>{c.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",u)}var ja={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];t.apply(r,s)}return i.__emitterProxy=t,r.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return typeof o[0]=="string"||Array.isArray(o[0])?(t=o[0],n=o.slice(1,o.length),r=e):(t=o[0].events,n=o[0].data,r=o[0].context||e),n.unshift(r),(Array.isArray(t)?t:t.split(" ")).forEach(l=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(u=>{u.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(u=>{u.apply(r,n)})}),e}};function Na(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(_e(r,"padding-left")||0,10)-parseInt(_e(r,"padding-right")||0,10),n=n-parseInt(_e(r,"padding-top")||0,10)-parseInt(_e(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Ba(){const e=this;function t(C,I){return parseFloat(C.getPropertyValue(e.getDirectionLabel(I))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,u=l?e.virtual.slides.length:e.slides.length,c=fe(i,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:c.length;let f=[];const v=[],p=[];let h=n.slidesOffsetBefore;typeof h=="function"&&(h=n.slidesOffsetBefore.call(e));let g=n.slidesOffsetAfter;typeof g=="function"&&(g=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,S=e.slidesGrid.length;let w=n.spaceBetween,b=-h,x=0,M=0;if(typeof o>"u")return;typeof w=="string"&&w.indexOf("%")>=0?w=parseFloat(w.replace("%",""))/100*o:typeof w=="string"&&(w=parseFloat(w)),e.virtualSize=-w,c.forEach(C=>{s?C.style.marginLeft="":C.style.marginRight="",C.style.marginBottom="",C.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(yt(r,"--swiper-centered-offset-before",""),yt(r,"--swiper-centered-offset-after",""));const P=n.grid&&n.grid.rows>1&&e.grid;P?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();let _;const E=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(C=>typeof n.breakpoints[C].slidesPerView<"u").length>0;for(let C=0;C<d;C+=1){_=0;let I;if(c[C]&&(I=c[C]),P&&e.grid.updateSlide(C,I,c),!(c[C]&&_e(I,"display")==="none")){if(n.slidesPerView==="auto"){E&&(c[C].style[e.getDirectionLabel("width")]="");const V=getComputedStyle(I),O=I.style.transform,N=I.style.webkitTransform;if(O&&(I.style.transform="none"),N&&(I.style.webkitTransform="none"),n.roundLengths)_=e.isHorizontal()?Lr(I,"width"):Lr(I,"height");else{const F=t(V,"width"),D=t(V,"padding-left"),k=t(V,"padding-right"),$=t(V,"margin-left"),z=t(V,"margin-right"),Y=V.getPropertyValue("box-sizing");if(Y&&Y==="border-box")_=F+$+z;else{const{clientWidth:oe,offsetWidth:X}=I;_=F+D+k+$+z+(X-oe)}}O&&(I.style.transform=O),N&&(I.style.webkitTransform=N),n.roundLengths&&(_=Math.floor(_))}else _=(o-(n.slidesPerView-1)*w)/n.slidesPerView,n.roundLengths&&(_=Math.floor(_)),c[C]&&(c[C].style[e.getDirectionLabel("width")]=`${_}px`);c[C]&&(c[C].swiperSlideSize=_),p.push(_),n.centeredSlides?(b=b+_/2+x/2+w,x===0&&C!==0&&(b=b-o/2-w),C===0&&(b=b-o/2-w),Math.abs(b)<1/1e3&&(b=0),n.roundLengths&&(b=Math.floor(b)),M%n.slidesPerGroup===0&&f.push(b),v.push(b)):(n.roundLengths&&(b=Math.floor(b)),(M-Math.min(e.params.slidesPerGroupSkip,M))%e.params.slidesPerGroup===0&&f.push(b),v.push(b),b=b+_+w),e.virtualSize+=_+w,x=_,M+=1}}if(e.virtualSize=Math.max(e.virtualSize,o)+g,s&&a&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+w}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+w}px`),P&&e.grid.updateWrapperSize(_,f),!n.centeredSlides){const C=[];for(let I=0;I<f.length;I+=1){let V=f[I];n.roundLengths&&(V=Math.floor(V)),f[I]<=e.virtualSize-o&&C.push(V)}f=C,Math.floor(e.virtualSize-o)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-o)}if(l&&n.loop){const C=p[0]+w;if(n.slidesPerGroup>1){const I=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),V=C*n.slidesPerGroup;for(let O=0;O<I;O+=1)f.push(f[f.length-1]+V)}for(let I=0;I<e.virtual.slidesBefore+e.virtual.slidesAfter;I+=1)n.slidesPerGroup===1&&f.push(f[f.length-1]+C),v.push(v[v.length-1]+C),e.virtualSize+=C}if(f.length===0&&(f=[0]),w!==0){const C=e.isHorizontal()&&s?"marginLeft":e.getDirectionLabel("marginRight");c.filter((I,V)=>!n.cssMode||n.loop?!0:V!==c.length-1).forEach(I=>{I.style[C]=`${w}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let C=0;p.forEach(V=>{C+=V+(w||0)}),C-=w;const I=C>o?C-o:0;f=f.map(V=>V<=0?-h:V>I?I+g:V)}if(n.centerInsufficientSlides){let C=0;p.forEach(V=>{C+=V+(w||0)}),C-=w;const I=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(C+I<o){const V=(o-C-I)/2;f.forEach((O,N)=>{f[N]=O-V}),v.forEach((O,N)=>{v[N]=O+V})}}if(Object.assign(e,{slides:c,snapGrid:f,slidesGrid:v,slidesSizesGrid:p}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){yt(r,"--swiper-centered-offset-before",`${-f[0]}px`),yt(r,"--swiper-centered-offset-after",`${e.size/2-p[p.length-1]/2}px`);const C=-e.snapGrid[0],I=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(V=>V+C),e.slidesGrid=e.slidesGrid.map(V=>V+I)}if(d!==u&&e.emit("slidesLengthChange"),f.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),v.length!==S&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const C=`${n.containerModifierClass}backface-hidden`,I=e.el.classList.contains(C);d<=n.maxBackfaceHiddenSlides?I||e.el.classList.add(C):I&&e.el.classList.remove(C)}}function Fa(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;o<Math.ceil(t.params.slidesPerView);o+=1){const a=t.activeIndex+o;if(a>t.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;o<n.length;o+=1)if(typeof n[o]<"u"){const a=n[o].offsetHeight;i=a>i?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function za(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const Rr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function ka(e){e===void 0&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:i,snapGrid:o}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l<r.length;l+=1){const u=r[l];let c=u.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const d=(s+(n.centeredSlides?t.minTranslate():0)-c)/(u.swiperSlideSize+a),f=(s-o[0]+(n.centeredSlides?t.minTranslate():0)-c)/(u.swiperSlideSize+a),v=-(s-c),p=v+t.slidesSizesGrid[l],h=v>=0&&v<=t.size-t.slidesSizesGrid[l],g=v>=0&&v<t.size-1||p>1&&p<=t.size||v<=0&&p>=t.size;g&&(t.visibleSlides.push(u),t.visibleSlidesIndexes.push(l)),Rr(u,g,n.slideVisibleClass),Rr(u,h,n.slideFullyVisibleClass),u.progress=i?-d:d,u.originalProgress=i?-f:f}}function Ga(e){const t=this;if(typeof e>"u"){const c=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*c||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,u=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const c=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;o=c||i<=0,s=d||i>=1,c&&(i=0),d&&(i=1)}if(n.loop){const c=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[c],v=t.slidesGrid[d],p=t.slidesGrid[t.slidesGrid.length-1],h=Math.abs(e);h>=f?a=(h-f)/p:a=(h+p-v)/p,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!u&&t.emit("reachEnd toEdge"),(l&&!o||u&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const ln=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function $a(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=d=>fe(r,`.${n.slideClass}${d}, swiper-slide${d}`)[0];let l,u,c;if(o)if(n.loop){let d=i-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.find(d=>d.column===i),c=t.find(d=>d.column===i+1),u=t.find(d=>d.column===i-1)):l=t[i];l&&(s||(c=Ma(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c&&(c=t[0]),u=_a(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u===0&&(u=t[t.length-1]))),t.forEach(d=>{ln(d,d===l,n.slideActiveClass),ln(d,d===c,n.slideNextClass),ln(d,d===u,n.slidePrevClass)}),e.emitSlidesClasses()}const At=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},un=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Mn=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,u)=>s+r+u)),e.slides.forEach((l,u)=>{a.includes(l.column)&&un(e,u)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(a<i||a>o)&&un(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s<i)&&un(e,s)};function Ha(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let i;for(let o=0;o<t.length;o+=1)typeof t[o+1]<"u"?r>=t[o]&&r<t[o+1]-(t[o+1]-t[o])/2?i=o:r>=t[o]&&r<t[o+1]&&(i=o+1):r>=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function Wa(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,u;const c=v=>{let p=v-t.virtual.slidesBefore;return p<0&&(p=t.virtual.slides.length+p),p>=t.virtual.slides.length&&(p-=t.virtual.slides.length),p};if(typeof l>"u"&&(l=Ha(t)),r.indexOf(n)>=0)u=r.indexOf(n);else{const v=Math.min(i.slidesPerGroupSkip,l);u=v+Math.floor((l-v)/i.slidesPerGroup)}if(u>=r.length&&(u=r.length-1),l===o&&!t.params.loop){u!==a&&(t.snapIndex=u,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(l);return}const d=t.grid&&i.grid&&i.grid.rows>1;let f;if(t.virtual&&i.virtual.enabled&&i.loop)f=c(l);else if(d){const v=t.slides.find(h=>h.column===l);let p=parseInt(v.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(t.slides.indexOf(v),0)),f=Math.floor(p/i.grid.rows)}else if(t.slides[l]){const v=t.slides[l].getAttribute("data-swiper-slide-index");v?f=parseInt(v,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:u,previousRealIndex:s,realIndex:f,previousIndex:o,activeIndex:l}),t.initialized&&Mn(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function Ua(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;a<n.slides.length;a+=1)if(n.slides[a]===i){o=!0,s=a;break}}if(i&&o)n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var qa={updateSize:Na,updateSlides:Ba,updateAutoHeight:Fa,updateSlidesOffset:za,updateSlidesProgress:ka,updateProgress:Ga,updateSlidesClasses:$a,updateActiveIndex:Wa,updateClickedSlide:Ua};function Ya(e){e===void 0&&(e=this.isHorizontal()?"x":"y");const t=this,{params:n,rtlTranslate:r,translate:i,wrapperEl:o}=t;if(n.virtualTranslate)return r?-i:i;if(n.cssMode)return i;let s=Ta(o,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function Xa(e,t){const n=this,{rtlTranslate:r,params:i,wrapperEl:o,progress:s}=n;let a=0,l=0;const u=0;n.isHorizontal()?a=r?-e:e:l=e,i.roundLengths&&(a=Math.floor(a),l=Math.floor(l)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?a:l,i.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-a:-l:i.virtualTranslate||(n.isHorizontal()?a-=n.cssOverflowAdjustment():l-=n.cssOverflowAdjustment(),o.style.transform=`translate3d(${a}px, ${l}px, ${u}px)`);let c;const d=n.maxTranslate()-n.minTranslate();d===0?c=0:c=(e-n.minTranslate())/d,c!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function Ka(){return-this.snapGrid[0]}function Za(){return-this.snapGrid[this.snapGrid.length-1]}function Ja(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=this.params.speed),n===void 0&&(n=!0),r===void 0&&(r=!0);const o=this,{params:s,wrapperEl:a}=o;if(o.animating&&s.preventInteractionOnTransition)return!1;const l=o.minTranslate(),u=o.maxTranslate();let c;if(r&&e>l?c=l:r&&e<u?c=u:c=e,o.updateProgress(c),s.cssMode){const d=o.isHorizontal();if(t===0)a[d?"scrollLeft":"scrollTop"]=-c;else{if(!o.support.smoothScroll)return no({swiper:o,targetPosition:-c,side:d?"left":"top"}),!0;a.scrollTo({[d?"left":"top"]:-c,behavior:"smooth"})}return!0}return t===0?(o.setTransition(0),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(f){!o||o.destroyed||f.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,o.animating=!1,n&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}var Qa={getTranslate:Ya,setTranslate:Xa,minTranslate:Ka,maxTranslate:Za,translateTo:Ja};function el(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function so(e){let{swiper:t,runCallbacks:n,direction:r,step:i}=e;const{activeIndex:o,previousIndex:s}=t;let a=r;a||(o>s?a="next":o<s?a="prev":a="reset"),t.emit(`transition${i}`),n&&a==="reset"?t.emit(`slideResetTransition${i}`):n&&o!==s&&(t.emit(`slideChangeTransition${i}`),a==="next"?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}function tl(e,t){e===void 0&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),so({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function nl(e,t){e===void 0&&(e=!0);const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),so({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var rl={setTransition:el,transitionStart:tl,transitionEnd:nl};function il(e,t,n,r,i){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const o=this;let s=e;s<0&&(s=0);const{params:a,snapGrid:l,slidesGrid:u,previousIndex:c,activeIndex:d,rtlTranslate:f,wrapperEl:v,enabled:p}=o;if(!p&&!r&&!i||o.destroyed||o.animating&&a.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=o.params.speed);const h=Math.min(o.params.slidesPerGroupSkip,s);let g=h+Math.floor((s-h)/o.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const m=-l[g];if(a.normalizeSlideIndex)for(let P=0;P<u.length;P+=1){const _=-Math.floor(m*100),E=Math.floor(u[P]*100),C=Math.floor(u[P+1]*100);typeof u[P+1]<"u"?_>=E&&_<C-(C-E)/2?s=P:_>=E&&_<C&&(s=P+1):_>=E&&(s=P)}if(o.initialized&&s!==d&&(!o.allowSlideNext&&(f?m>o.translate&&m>o.minTranslate():m<o.translate&&m<o.minTranslate())||!o.allowSlidePrev&&m>o.translate&&m>o.maxTranslate()&&(d||0)!==s))return!1;s!==(c||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(m);let S;s>d?S="next":s<d?S="prev":S="reset";const w=o.virtual&&o.params.virtual.enabled;if(!(w&&i)&&(f&&-m===o.translate||!f&&m===o.translate))return o.updateActiveIndex(s),a.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),a.effect!=="slide"&&o.setTranslate(m),S!=="reset"&&(o.transitionStart(n,S),o.transitionEnd(n,S)),!1;if(a.cssMode){const P=o.isHorizontal(),_=f?m:-m;if(t===0)w&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),w&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{v[P?"scrollLeft":"scrollTop"]=_})):v[P?"scrollLeft":"scrollTop"]=_,w&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1});else{if(!o.support.smoothScroll)return no({swiper:o,targetPosition:_,side:P?"left":"top"}),!0;v.scrollTo({[P?"left":"top"]:_,behavior:"smooth"})}return!0}const M=oo().isSafari;return w&&!i&&M&&o.isElement&&o.virtual.update(!1,!1,s),o.setTransition(t),o.setTranslate(m),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,S),t===0?o.transitionEnd(n,S):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,S))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function ol(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const f=s*i.params.grid.rows;a=i.slides.find(v=>v.getAttribute("data-swiper-slide-index")*1===f).column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:u}=i.params;let c=i.params.slidesPerView;c==="auto"?c=i.slidesPerViewDynamic():(c=Math.ceil(parseFloat(i.params.slidesPerView,10)),u&&c%2===0&&(c=c+1));let d=l-a<c;if(u&&(d=d||a<Math.ceil(c/2)),r&&u&&i.params.slidesPerView!=="auto"&&!o&&(d=!1),d){const f=u?a<i.activeIndex?"prev":"next":a-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:f,slideTo:!0,activeSlideIndex:f==="next"?a+1:a-l+1,slideRealIndex:f==="next"?i.realIndex:void 0})}if(o){const f=s*i.params.grid.rows;s=i.slides.find(v=>v.getAttribute("data-swiper-slide-index")*1===f).column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function sl(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<o.slidesPerGroupSkip?1:a,u=r.virtual&&o.virtual.enabled;if(o.loop){if(s&&!u&&o.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&o.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function al(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:u}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const c=r.virtual&&i.virtual.enabled;if(i.loop){if(u&&!c&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const d=a?r.translate:-r.translate;function f(S){return S<0?-Math.floor(Math.abs(S)):Math.floor(S)}const v=f(d),p=o.map(S=>f(S)),h=i.freeMode&&i.freeMode.enabled;let g=o[p.indexOf(v)-1];if(typeof g>"u"&&(i.cssMode||h)){let S;o.forEach((w,b)=>{v>=w&&(S=b)}),typeof S<"u"&&(g=h?o[S]:o[S>0?S-1:S])}let m=0;if(typeof g<"u"&&(m=s.indexOf(g),m<0&&(m=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(m=m-r.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.rewind&&r.isBeginning){const S=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(S,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(m,e,t,n)}),!0;return r.slideTo(m,e,t,n)}function ll(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function ul(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const u=i.snapGrid[a],c=i.snapGrid[a+1];l-u>(c-u)*r&&(o+=i.params.slidesPerGroup)}else{const u=i.snapGrid[a-1],c=i.snapGrid[a];l-u<=(c-u)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function cl(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?i<e.loopedSlides-r/2||i>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(fe(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),_n(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(fe(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),_n(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var dl={slideTo:il,slideToLoop:ol,slideNext:sl,slidePrev:al,slideReset:ll,slideToClosest:ul,slideToClickedSlide:cl};function fl(e,t){const n=this,{params:r,slidesEl:i}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const o=()=>{fe(i,`.${r.slideClass}, swiper-slide`).forEach((f,v)=>{f.setAttribute("data-swiper-slide-index",v)})},s=n.grid&&r.grid&&r.grid.rows>1,a=r.slidesPerGroup*(s?r.grid.rows:1),l=n.slides.length%a!==0,u=s&&n.slides.length%r.grid.rows!==0,c=d=>{for(let f=0;f<d;f+=1){const v=n.isElement?Ce("swiper-slide",[r.slideBlankClass]):Ce("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(v)}};if(l){if(r.loopAddBlankSlides){const d=a-n.slides.length%a;c(d),n.recalcSlides(),n.updateSlides()}else Rt("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(u){if(r.loopAddBlankSlides){const d=r.grid.rows-n.slides.length%r.grid.rows;c(d),n.recalcSlides(),n.updateSlides()}else Rt("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();n.loopFix({slideRealIndex:e,direction:r.centeredSlides?void 0:"next",initial:t})}function pl(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:i,activeSlideIndex:o,initial:s,byController:a,byMousewheel:l}=e===void 0?{}:e;const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:c,allowSlidePrev:d,allowSlideNext:f,slidesEl:v,params:p}=u,{centeredSlides:h,initialSlide:g}=p;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&p.virtual.enabled){n&&(!p.centeredSlides&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):p.centeredSlides&&u.snapIndex<p.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=f,u.emit("loopFix");return}let m=p.slidesPerView;m==="auto"?m=u.slidesPerViewDynamic():(m=Math.ceil(parseFloat(p.slidesPerView,10)),h&&m%2===0&&(m=m+1));const S=p.slidesPerGroupAuto?m:p.slidesPerGroup;let w=S;w%S!==0&&(w+=S-w%S),w+=p.loopAdditionalSlides,u.loopedSlides=w;const b=u.grid&&p.grid&&p.grid.rows>1;c.length<m+w||u.params.effect==="cards"&&c.length<m+w*2?Rt("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):b&&p.grid.fill==="row"&&Rt("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const x=[],M=[],P=b?Math.ceil(c.length/p.grid.rows):c.length,_=s&&P-g<m&&!h;let E=_?g:u.activeIndex;typeof o>"u"?o=u.getSlideIndex(c.find(D=>D.classList.contains(p.slideActiveClass))):E=o;const C=r==="next"||!r,I=r==="prev"||!r;let V=0,O=0;const F=(b?c[o].column:o)+(h&&typeof i>"u"?-m/2+.5:0);if(F<w){V=Math.max(w-F,S);for(let D=0;D<w-F;D+=1){const k=D-Math.floor(D/P)*P;if(b){const $=P-k-1;for(let z=c.length-1;z>=0;z-=1)c[z].column===$&&x.push(z)}else x.push(P-k-1)}}else if(F+m>P-w){O=Math.max(F-(P-w*2),S),_&&(O=Math.max(O,m-P+g+1));for(let D=0;D<O;D+=1){const k=D-Math.floor(D/P)*P;b?c.forEach(($,z)=>{$.column===k&&M.push(z)}):M.push(k)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&c.length<m+w*2&&(M.includes(o)&&M.splice(M.indexOf(o),1),x.includes(o)&&x.splice(x.indexOf(o),1)),I&&x.forEach(D=>{c[D].swiperLoopMoveDOM=!0,v.prepend(c[D]),c[D].swiperLoopMoveDOM=!1}),C&&M.forEach(D=>{c[D].swiperLoopMoveDOM=!0,v.append(c[D]),c[D].swiperLoopMoveDOM=!1}),u.recalcSlides(),p.slidesPerView==="auto"?u.updateSlides():b&&(x.length>0&&I||M.length>0&&C)&&u.slides.forEach((D,k)=>{u.grid.updateSlide(k,D,u.slides)}),p.watchSlidesProgress&&u.updateSlidesOffset(),n){if(x.length>0&&I){if(typeof t>"u"){const D=u.slidesGrid[E],$=u.slidesGrid[E+V]-D;l?u.setTranslate(u.translate-$):(u.slideTo(E+Math.ceil(V),0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-$,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-$))}else if(i){const D=b?x.length/p.grid.rows:x.length;u.slideTo(u.activeIndex+D,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(M.length>0&&C)if(typeof t>"u"){const D=u.slidesGrid[E],$=u.slidesGrid[E-O]-D;l?u.setTranslate(u.translate-$):(u.slideTo(E-O,0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-$,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-$))}else{const D=b?M.length/p.grid.rows:M.length;u.slideTo(u.activeIndex-D,0,!1,!0)}}if(u.allowSlidePrev=d,u.allowSlideNext=f,u.controller&&u.controller.control&&!a){const D={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(k=>{!k.destroyed&&k.params.loop&&k.loopFix({...D,slideTo:k.params.slidesPerView===p.slidesPerView?n:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...D,slideTo:u.controller.control.params.slidesPerView===p.slidesPerView?n:!1})}u.emit("loopFix")}function vl(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var hl={loopCreate:fl,loopFix:pl,loopDestroy:vl};function ml(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function gl(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var yl={setGrabCursor:ml,unsetGrabCursor:gl};function Sl(e,t){t===void 0&&(t=this);function n(r){if(!r||r===De()||r===Q())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function Dr(e,t,n){const r=Q(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function wl(e){const t=this,n=De();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){Dr(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!Ca(l,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const u=!!o.noSwipingClass&&o.noSwipingClass!=="",c=r.composedPath?r.composedPath():r.path;u&&r.target&&r.target.shadowRoot&&c&&(l=c[0]);const d=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,f=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(f?Sl(d,l):l.closest(d))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const v=s.currentX,p=s.currentY;if(!Dr(t,r,v))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=v,s.startY=p,i.touchStartTime=Ot(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let h=!0;l.matches(i.focusableElements)&&(h=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!l.matches(i.focusableElements))&&n.activeElement.blur();const g=h&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||g)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function xl(e){const t=De(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let u;if(l.type==="touchmove"){if(u=[...l.changedTouches].find(x=>x.identifier===r.touchId),!u||u.identifier!==r.touchId)return}else u=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const c=u.pageX,d=u.pageY;if(l.preventedByNestedSwiper){o.startX=c,o.startY=d;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:c,startY:d,currentX:c,currentY:d}),r.touchStartTime=Ot());return}if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(d<o.startY&&n.translate<=n.maxTranslate()||d>o.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(c>o.startX&&-n.translate<=n.maxTranslate()||c<o.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(c<o.startX&&n.translate<=n.maxTranslate()||c>o.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==l.target&&l.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=c,o.currentY=d;const f=o.currentX-o.startX,v=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(f**2+v**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let x;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:f*f+v*v>=25&&(x=Math.atan2(Math.abs(v),Math.abs(f))*180/Math.PI,r.isScrolling=n.isHorizontal()?x>i.touchAngle:90-x>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let p=n.isHorizontal()?f:v,h=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(p=Math.abs(p)*(s?1:-1),h=Math.abs(h)*(s?1:-1)),o.diff=p,p*=i.touchRatio,s&&(p=-p,h=-h);const g=n.touchesDirection;n.swipeDirection=p>0?"prev":"next",n.touchesDirection=h>0?"prev":"next";const m=n.params.loop&&!i.cssMode,S=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(m&&S&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const x=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(x)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}if(new Date().getTime(),i._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&g!==n.touchesDirection&&m&&S&&Math.abs(p)>=1){Object.assign(o,{startX:c,startY:d,currentX:c,currentY:d,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=p+r.startTranslate;let w=!0,b=i.resistanceRatio;if(i.touchReleaseOnEdges&&(b=0),p>0?(m&&S&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(w=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+p)**b))):p<0&&(m&&S&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(w=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-p)**b))),w&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(p)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function bl(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].find(x=>x.identifier===n.touchId),!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:u,enabled:c}=t;if(!c||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=Ot(),f=d-n.touchStartTime;if(t.allowClick){const x=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(x&&x[0]||r.target,x),t.emit("tap click",r),f<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Ot(),_n(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let v;if(s.followFinger?v=l?t.translate:-t.translate:v=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:v});return}const p=v>=-t.maxTranslate()&&!t.params.loop;let h=0,g=t.slidesSizesGrid[0];for(let x=0;x<u.length;x+=x<s.slidesPerGroupSkip?1:s.slidesPerGroup){const M=x<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof u[x+M]<"u"?(p||v>=u[x]&&v<u[x+M])&&(h=x,g=u[x+M]-u[x]):(p||v>=u[x])&&(h=x,g=u[u.length-1]-u[u.length-2])}let m=null,S=null;s.rewind&&(t.isBeginning?S=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const w=(v-u[h])/g,b=h<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(f>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(w>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?m:h+b):t.slideTo(h)),t.swipeDirection==="prev"&&(w>1-s.longSwipesRatio?t.slideTo(h+b):S!==null&&w<0&&Math.abs(w)>s.longSwipesRatio?t.slideTo(S):t.slideTo(h))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(h+b):t.slideTo(h):(t.swipeDirection==="next"&&t.slideTo(m!==null?m:h+b),t.swipeDirection==="prev"&&t.slideTo(S!==null?S:h))}}function jr(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function Tl(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function El(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Pl(e){const t=this;At(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Cl(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const ao=(e,t)=>{const n=De(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",u=t;!i||typeof i=="string"||(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[u](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",jr,!0):e[u]("observerUpdate",jr,!0),i[l]("load",e.onLoad,{capture:!0}))};function _l(){const e=this,{params:t}=e;e.onTouchStart=wl.bind(e),e.onTouchMove=xl.bind(e),e.onTouchEnd=bl.bind(e),e.onDocumentTouchStart=Cl.bind(e),t.cssMode&&(e.onScroll=El.bind(e)),e.onClick=Tl.bind(e),e.onLoad=Pl.bind(e),ao(e,"on")}function Ml(){ao(this,"off")}var Al={attachEvents:_l,detachEvents:Ml};const Nr=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Il(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=De(),a=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",l=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),u=e.getBreakpoint(o,a,l);if(!u||e.currentBreakpoint===u)return;const d=(u in o?o[u]:void 0)||e.originalParams,f=Nr(e,r),v=Nr(e,d),p=e.params.grabCursor,h=d.grabCursor,g=r.enabled;f&&!v?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!f&&v&&(i.classList.add(`${r.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),p&&!h?e.unsetGrabCursor():!p&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(M=>{if(typeof d[M]>"u")return;const P=r[M]&&r[M].enabled,_=d[M]&&d[M].enabled;P&&!_&&e[M].disable(),!P&&_&&e[M].enable()});const m=d.direction&&d.direction!==r.direction,S=r.loop&&(d.slidesPerView!==r.slidesPerView||m),w=r.loop;m&&n&&e.changeDirection(),te(e.params,d);const b=e.params.enabled,x=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!b?e.disable():!g&&b&&e.enable(),e.currentBreakpoint=u,e.emit("_beforeBreakpoint",d),n&&(S?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!w&&x?(e.loopCreate(t),e.updateSlides()):w&&!x&&e.loopDestroy()),e.emit("breakpoint",d)}function Vl(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Q(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a<s.length;a+=1){const{point:l,value:u}=s[a];t==="window"?i.matchMedia(`(min-width: ${u}px)`).matches&&(r=l):u<=n.clientWidth&&(r=l)}return r||"max"}var Ll={setBreakpoint:Il,getBreakpoint:Vl};function Ol(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function Rl(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=Ol(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function Dl(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var jl={addClasses:Rl,removeClasses:Dl};function Nl(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Bl={checkOverflow:Nl},An={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Fl(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){te(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){te(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),te(t,r)}}const cn={eventsEmitter:ja,update:qa,translate:Qa,transition:rl,slide:dl,loop:hl,grabCursor:yl,events:Al,breakpoints:Ll,checkOverflow:Bl,classes:jl},dn={};let Qn=class ye{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.length===1&&i[0].constructor&&Object.prototype.toString.call(i[0]).slice(8,-1)==="Object"?n=i[0]:[t,n]=i,n||(n={}),n=te({},n),t&&!n.el&&(n.el=t);const s=De();if(n.el&&typeof n.el=="string"&&s.querySelectorAll(n.el).length>1){const c=[];return s.querySelectorAll(n.el).forEach(d=>{const f=te({},n,{el:d});c.push(new ye(f))}),c}const a=this;a.__swiper__=!0,a.support=ro(),a.device=io({userAgent:n.userAgent}),a.browser=oo(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(c=>{c({params:n,swiper:a,extendParams:Fl(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const u=te({},An,l);return a.params=te({},u,dn,n),a.originalParams=te({},a.params),a.passedParams=te({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(c=>{a.on(c,a.params.on[c])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=fe(n,`.${r.slideClass}, swiper-slide`),o=Vr(i[0]);return Vr(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.getAttribute("data-swiper-slide-index")*1===t))}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=fe(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:u}=r;let c=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let d=o[u]?Math.ceil(o[u].swiperSlideSize):0,f;for(let v=u+1;v<o.length;v+=1)o[v]&&!f&&(d+=Math.ceil(o[v].swiperSlideSize),c+=1,d>l&&(f=!0));for(let v=u-1;v>=0;v-=1)o[v]&&!f&&(d+=o[v].swiperSlideSize,c+=1,d>l&&(f=!0))}else if(t==="current")for(let d=u+1;d<o.length;d+=1)(n?s[d]+a[d]-s[u]<l:s[d]-s[u]<l)&&(c+=1);else for(let d=u-1;d>=0;d-=1)s[u]-s[d]<l&&(c+=1);return c}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&At(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):fe(r,i())[0];return!s&&n.params.createElements&&(s=Ce("div",n.params.wrapperClass),r.append(s),fe(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||_e(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||_e(r,"direction")==="rtl"),wrongRTL:_e(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?At(n,o):o.addEventListener("load",s=>{At(n,s.target)})}),Mn(n),n.initialized=!0,Mn(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),xa(r)),r.destroyed=!0),null}static extendDefaults(t){te(dn,t)}static get extendedDefaults(){return dn}static get defaults(){return An}static installModule(t){ye.prototype.__modules__||(ye.prototype.__modules__=[]);const n=ye.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ye.installModule(n)),ye):(ye.installModule(t),ye)}};Object.keys(cn).forEach(e=>{Object.keys(cn[e]).forEach(t=>{Qn.prototype[t]=cn[e][t]})});Qn.use([Ra,Da]);const lo=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Oe(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Ge(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Oe(t[r])&&Oe(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Ge(e[r],t[r]):e[r]=t[r]})}function uo(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function co(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function fo(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function po(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function zl(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function kl(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const u=i.filter(E=>E!=="children"&&E!=="direction"&&E!=="wrapperClass"),{params:c,pagination:d,navigation:f,scrollbar:v,virtual:p,thumbs:h}=t;let g,m,S,w,b,x,M,P;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&!r.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(g=!0),i.includes("controller")&&r.controller&&r.controller.control&&c.controller&&!c.controller.control&&(m=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(c.pagination||c.pagination===!1)&&d&&!d.el&&(S=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(c.scrollbar||c.scrollbar===!1)&&v&&!v.el&&(w=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(b=!0);const _=E=>{t[E]&&(t[E].destroy(),E==="navigation"?(t.isElement&&(t[E].prevEl.remove(),t[E].nextEl.remove()),c[E].prevEl=void 0,c[E].nextEl=void 0,t[E].prevEl=void 0,t[E].nextEl=void 0):(t.isElement&&t[E].el.remove(),c[E].el=void 0,t[E].el=void 0))};i.includes("loop")&&t.isElement&&(c.loop&&!r.loop?x=!0:!c.loop&&r.loop?M=!0:P=!0),u.forEach(E=>{if(Oe(c[E])&&Oe(r[E]))Object.assign(c[E],r[E]),(E==="navigation"||E==="pagination"||E==="scrollbar")&&"enabled"in r[E]&&!r[E].enabled&&_(E);else{const C=r[E];(C===!0||C===!1)&&(E==="navigation"||E==="pagination"||E==="scrollbar")?C===!1&&_(E):c[E]=r[E]}}),u.includes("controller")&&!m&&t.controller&&t.controller.control&&c.controller&&c.controller.control&&(t.controller.control=c.controller.control),i.includes("children")&&n&&p&&c.virtual.enabled?(p.slides=n,p.update(!0)):i.includes("virtual")&&p&&c.virtual.enabled&&(n&&(p.slides=n),p.update(!0)),i.includes("children")&&n&&c.loop&&(P=!0),g&&h.init()&&h.update(!0),m&&(t.controller.control=c.controller.control),S&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(c.pagination.el=l),d.init(),d.render(),d.update()),w&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(c.scrollbar.el=a),v.init(),v.updateSize(),v.setTranslate()),b&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),Or(o,t.hostEl.constructor.nextButtonSvg),o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),Or(s,t.hostEl.constructor.prevButtonSvg),s.part.add("button-prev"),t.el.appendChild(s))),o&&(c.navigation.nextEl=o),s&&(c.navigation.prevEl=s),f.init(),f.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(x||P)&&t.loopDestroy(),(M||P)&&t.loopCreate(),t.update()}function Gl(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};Ge(n,An),n._emitClasses=!0,n.init=!1;const o={},s=lo.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?Oe(e[l])?(n[l]={},i[l]={},Ge(n[l],e[l]),Ge(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function $l(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;uo(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),co(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),fo(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function Hl(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),u=n.map(i);l.join("")!==u.join("")&&s("children"),r.length!==n.length&&s("children")}return lo.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Oe(e[l])&&Oe(t[l])){const u=Object.keys(e[l]),c=Object.keys(t[l]);u.length!==c.length?s(l):(u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const Wl=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Dt(){return Dt=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},Dt.apply(this,arguments)}function vo(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function ho(e){const t=[];return y.Children.toArray(e).forEach(n=>{vo(n)?t.push(n):n.props&&n.props.children&&ho(n.props.children).forEach(r=>t.push(r))}),t}function Ul(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return y.Children.toArray(e).forEach(r=>{if(vo(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=ho(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function ql(e,t,n){if(!n)return null;const r=c=>{let d=c;return c<0?d=t.length+c:d>=t.length&&(d=d-t.length),d},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,u=[];for(let c=a;c<l;c+=1)c>=o&&c<=s&&u.push(t[r(c)]);return u.map((c,d)=>y.cloneElement(c,{swiper:e,style:i,key:c.props.virtualIndex||c.key||`slide-${d}`}))}function Xe(e,t){return typeof window>"u"?y.useEffect(e,t):y.useLayoutEffect(e,t)}const Br=y.createContext(null),Yl=y.createContext(null),mo=y.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[u,c]=y.useState("swiper"),[d,f]=y.useState(null),[v,p]=y.useState(!1),h=y.useRef(!1),g=y.useRef(null),m=y.useRef(null),S=y.useRef(null),w=y.useRef(null),b=y.useRef(null),x=y.useRef(null),M=y.useRef(null),P=y.useRef(null),{params:_,passedParams:E,rest:C,events:I}=Gl(a),{slides:V,slots:O}=Ul(o),N=()=>{p(!v)};Object.assign(_.on,{_containerClasses(z,Y){c(Y)}});const F=()=>{Object.assign(_.on,I),l=!0;const z={..._};if(delete z.wrapperClass,m.current=new Qn(z),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=V;const Y={cache:!1,slides:V,renderExternal:f,renderExternalUpdate:!1};Ge(m.current.params.virtual,Y),Ge(m.current.originalParams.virtual,Y)}};g.current||F(),m.current&&m.current.on("_beforeBreakpoint",N);const D=()=>{l||!I||!m.current||Object.keys(I).forEach(z=>{m.current.on(z,I[z])})},k=()=>{!I||!m.current||Object.keys(I).forEach(z=>{m.current.off(z,I[z])})};y.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",N)}),y.useEffect(()=>{!h.current&&m.current&&(m.current.emitSlidesClasses(),h.current=!0)}),Xe(()=>{if(t&&(t.current=g.current),!!g.current)return m.current.destroyed&&F(),$l({el:g.current,nextEl:b.current,prevEl:x.current,paginationEl:M.current,scrollbarEl:P.current,swiper:m.current},_),s&&!m.current.destroyed&&s(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),Xe(()=>{D();const z=Hl(E,S.current,V,w.current,Y=>Y.key);return S.current=E,w.current=V,z.length&&m.current&&!m.current.destroyed&&kl({swiper:m.current,slides:V,passedParams:E,changedParams:z,nextEl:b.current,prevEl:x.current,scrollbarEl:P.current,paginationEl:M.current}),()=>{k()}}),Xe(()=>{Wl(m.current)},[d]);function $(){return _.virtual?ql(m.current,V,d):V.map((z,Y)=>y.cloneElement(z,{swiper:m.current,swiperSlideIndex:Y}))}return y.createElement(r,Dt({ref:g,className:po(`${u}${n?` ${n}`:""}`)},C),y.createElement(Yl.Provider,{value:m.current},O["container-start"],y.createElement(i,{className:zl(_.wrapperClass)},O["wrapper-start"],$(),O["wrapper-end"]),uo(_)&&y.createElement(y.Fragment,null,y.createElement("div",{ref:x,className:"swiper-button-prev"}),y.createElement("div",{ref:b,className:"swiper-button-next"})),fo(_)&&y.createElement("div",{ref:P,className:"swiper-scrollbar"}),co(_)&&y.createElement("div",{ref:M,className:"swiper-pagination"}),O["container-end"]))});mo.displayName="Swiper";const go=y.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:u,...c}=e===void 0?{}:e;const d=y.useRef(null),[f,v]=y.useState("swiper-slide"),[p,h]=y.useState(!1);function g(b,x,M){x===d.current&&v(M)}Xe(()=>{if(typeof u<"u"&&(d.current.swiperSlideIndex=u),t&&(t.current=d.current),!(!d.current||!o)){if(o.destroyed){f!=="swiper-slide"&&v("swiper-slide");return}return o.on("_slideClass",g),()=>{o&&o.off("_slideClass",g)}}}),Xe(()=>{o&&d.current&&!o.destroyed&&v(o.getSlideClasses(d.current))},[o]);const m={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},S=()=>typeof r=="function"?r(m):r,w=()=>{h(!0)};return y.createElement(n,Dt({ref:d,className:po(`${f}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:w},c),s&&y.createElement(Br.Provider,{value:m},y.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},S(),a&&!p&&y.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&y.createElement(Br.Provider,{value:m},S(),a&&!p&&y.createElement("div",{className:"swiper-lazy-preloader"})))});go.displayName="SwiperSlide";function Xl(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(i=>{if(!n[i]&&n.auto===!0){let o=fe(e.el,`.${r[i]}`)[0];o||(o=Ce("div",r[i]),o.className=r[i],e.el.append(o)),n[i]=o,t[i]=o}}),n}function Kl(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};function o(p){let h;return p&&typeof p=="string"&&t.isElement&&(h=t.el.querySelector(p)||t.hostEl.querySelector(p),h)?h:(p&&(typeof p=="string"&&(h=[...document.querySelectorAll(p)]),t.params.uniqueNavElements&&typeof p=="string"&&h&&h.length>1&&t.el.querySelectorAll(p).length===1?h=t.el.querySelector(p):h&&h.length===1&&(h=h[0])),p&&!h?p:h)}function s(p,h){const g=t.params.navigation;p=me(p),p.forEach(m=>{m&&(m.classList[h?"add":"remove"](...g.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=h),t.params.watchOverflow&&t.enabled&&m.classList[t.isLocked?"add":"remove"](g.lockClass))})}function a(){const{nextEl:p,prevEl:h}=t.navigation;if(t.params.loop){s(h,!1),s(p,!1);return}s(h,t.isBeginning&&!t.params.rewind),s(p,t.isEnd&&!t.params.rewind)}function l(p){p.preventDefault(),!(t.isBeginning&&!t.params.loop&&!t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function u(p){p.preventDefault(),!(t.isEnd&&!t.params.loop&&!t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function c(){const p=t.params.navigation;if(t.params.navigation=Xl(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(p.nextEl||p.prevEl))return;let h=o(p.nextEl),g=o(p.prevEl);Object.assign(t.navigation,{nextEl:h,prevEl:g}),h=me(h),g=me(g);const m=(S,w)=>{S&&S.addEventListener("click",w==="next"?u:l),!t.enabled&&S&&S.classList.add(...p.lockClass.split(" "))};h.forEach(S=>m(S,"next")),g.forEach(S=>m(S,"prev"))}function d(){let{nextEl:p,prevEl:h}=t.navigation;p=me(p),h=me(h);const g=(m,S)=>{m.removeEventListener("click",S==="next"?u:l),m.classList.remove(...t.params.navigation.disabledClass.split(" "))};p.forEach(m=>g(m,"next")),h.forEach(m=>g(m,"prev"))}r("init",()=>{t.params.navigation.enabled===!1?v():(c(),a())}),r("toEdge fromEdge lock unlock",()=>{a()}),r("destroy",()=>{d()}),r("enable disable",()=>{let{nextEl:p,prevEl:h}=t.navigation;if(p=me(p),h=me(h),t.enabled){a();return}[...p,...h].filter(g=>!!g).forEach(g=>g.classList.add(t.params.navigation.lockClass))}),r("click",(p,h)=>{let{nextEl:g,prevEl:m}=t.navigation;g=me(g),m=me(m);const S=h.target;let w=m.includes(S)||g.includes(S);if(t.isElement&&!w){const b=h.path||h.composedPath&&h.composedPath();b&&(w=b.find(x=>g.includes(x)||m.includes(x)))}if(t.params.navigation.hideOnClick&&!w){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===S||t.pagination.el.contains(S)))return;let b;g.length?b=g[0].classList.contains(t.params.navigation.hiddenClass):m.length&&(b=m[0].classList.contains(t.params.navigation.hiddenClass)),i(b===!0?"navigationShow":"navigationHide"),[...g,...m].filter(x=>!!x).forEach(x=>x.classList.toggle(t.params.navigation.hiddenClass))}});const f=()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),a()},v=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),d()};Object.assign(t.navigation,{enable:f,disable:v,update:a,init:c,destroy:d})}function Zl(e){const{effect:t,swiper:n,on:r,setTranslate:i,setTransition:o,overwriteParams:s,perspective:a,recreateShadows:l,getEffectParams:u}=e;r("beforeInit",()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),a&&a()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const d=s?s():{};Object.assign(n.params,d),Object.assign(n.originalParams,d)}),r("setTranslate _virtualUpdated",()=>{n.params.effect===t&&i()}),r("setTransition",(d,f)=>{n.params.effect===t&&o(f)}),r("transitionEnd",()=>{if(n.params.effect===t&&l){if(!u||!u().slideShadows)return;n.slides.forEach(d=>{d.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(f=>f.remove())}),l()}});let c;r("virtualUpdate",()=>{n.params.effect===t&&(n.slides.length||(c=!0),requestAnimationFrame(()=>{c&&n.slides&&n.slides.length&&(i(),c=!1)}))})}function Jl(e){let{swiper:t,extendParams:n,on:r}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(l,u,c)=>{let d=c?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),f=c?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");d||(d=Ce("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"left":"top"}`.split(" ")),l.append(d)),f||(f=Ce("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"right":"bottom"}`.split(" ")),l.append(f)),d&&(d.style.opacity=Math.max(-u,0)),f&&(f.style.opacity=Math.max(u,0))};Zl({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{el:l,wrapperEl:u,slides:c,width:d,height:f,rtlTranslate:v,size:p,browser:h}=t,g=Ia(t),m=t.params.cubeEffect,S=t.isHorizontal(),w=t.virtual&&t.params.virtual.enabled;let b=0,x;m.shadow&&(S?(x=t.wrapperEl.querySelector(".swiper-cube-shadow"),x||(x=Ce("div","swiper-cube-shadow"),t.wrapperEl.append(x)),x.style.height=`${d}px`):(x=l.querySelector(".swiper-cube-shadow"),x||(x=Ce("div","swiper-cube-shadow"),l.append(x))));for(let P=0;P<c.length;P+=1){const _=c[P];let E=P;w&&(E=parseInt(_.getAttribute("data-swiper-slide-index"),10));let C=E*90,I=Math.floor(C/360);v&&(C=-C,I=Math.floor(-C/360));const V=Math.max(Math.min(_.progress,1),-1);let O=0,N=0,F=0;E%4===0?(O=-I*4*p,F=0):(E-1)%4===0?(O=0,F=-I*4*p):(E-2)%4===0?(O=p+I*4*p,F=p):(E-3)%4===0&&(O=-p,F=3*p+p*4*I),v&&(O=-O),S||(N=O,O=0);const D=`rotateX(${g(S?0:-C)}deg) rotateY(${g(S?C:0)}deg) translate3d(${O}px, ${N}px, ${F}px)`;V<=1&&V>-1&&(b=E*90+V*90,v&&(b=-E*90-V*90)),_.style.transform=D,m.slideShadows&&i(_,V,S)}if(u.style.transformOrigin=`50% 50% -${p/2}px`,u.style["-webkit-transform-origin"]=`50% 50% -${p/2}px`,m.shadow)if(S)x.style.transform=`translate3d(0px, ${d/2+m.shadowOffset}px, ${-d/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${m.shadowScale})`;else{const P=Math.abs(b)-Math.floor(Math.abs(b)/90)*90,_=1.5-(Math.sin(P*2*Math.PI/360)/2+Math.cos(P*2*Math.PI/360)/2),E=m.shadowScale,C=m.shadowScale/_,I=m.shadowOffset;x.style.transform=`scale3d(${E}, 1, ${C}) translate3d(0px, ${f/2+I}px, ${-f/2/C}px) rotateX(-89.99deg)`}const M=(h.isSafari||h.isWebView)&&h.needPerspectiveFix?-p/2:0;u.style.transform=`translate3d(0px,0,${M}px) rotateX(${g(t.isHorizontal()?0:b)}deg) rotateY(${g(t.isHorizontal()?-b:0)}deg)`,u.style.setProperty("--swiper-cube-translate-z",`${M}px`)},setTransition:l=>{const{el:u,slides:c}=t;if(c.forEach(d=>{d.style.transitionDuration=`${l}ms`,d.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(f=>{f.style.transitionDuration=`${l}ms`})}),t.params.cubeEffect.shadow&&!t.isHorizontal()){const d=u.querySelector(".swiper-cube-shadow");d&&(d.style.transitionDuration=`${l}ms`)}},recreateShadows:()=>{const l=t.isHorizontal();t.slides.forEach(u=>{const c=Math.max(Math.min(u.progress,1),-1);i(u,c,l)})},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}const Ql="_StoryCube_1rp57_1",eu="_AtSwiperCubeWrap_1rp57_17",tu="_AtSwiperCube_1rp57_17",nu="_CloseIcon_1rp57_58",St={StoryCube:Ql,AtSwiperCubeWrap:eu,AtSwiperCube:tu,CloseIcon:nu},ru="_Story_1lz7t_1",iu="_CardStory_ProgressRoot_1lz7t_4",ou="_CardStory_ProgressRoot_Track_1lz7t_19",su="_NoComplete_1lz7t_36",au="_Complete_1lz7t_42",lu="_ProgressAnimate_1lz7t_48",uu="_Pause_1lz7t_53",xe={Story:ru,CardStory_ProgressRoot:iu,CardStory_ProgressRoot_Track:ou,NoComplete:su,Complete:au,ProgressAnimate:lu,Pause:uu},cu="_story_16e19_1",du="_BetSlip_Wrapper_16e19_17",fu="_BetSlip_ButtonWrap_16e19_28",Ke={story:cu,BetSlip_Wrapper:du,BetSlip_ButtonWrap:fu},pu="es-PE";function vu(e,t=pu){const n=new Date(e),r=n.toLocaleDateString(t,{day:"2-digit",month:"2-digit"}),i=n.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${i}`}class hu{static fromRaw(t){var s,a,l;const n=((a=(s=t==null?void 0:t.stakes)==null?void 0:s.find(u=>u.isEnabled))==null?void 0:a.preciseValue)??0,r=(l=t==null?void 0:t.selections)==null?void 0:l.map(u=>{var g,m,S,w,b,x;const c=parseFloat((m=(g=u==null?void 0:u.odd)==null?void 0:g.price)==null?void 0:m.toFixed(2)),d=vu((S=u==null?void 0:u.event)==null?void 0:S.startDate),f=(b=(w=u==null?void 0:u.odd)==null?void 0:w.offers)==null?void 0:b.find(M=>M.type===0),p=u.market.name,h=(x=u==null?void 0:u.bbSelections)==null?void 0:x.map(M=>{var C,I,V,O,N;const P=(C=M==null?void 0:M.odd)==null?void 0:C.price,_=parseFloat(P.toFixed(2)),E=(V=(I=M==null?void 0:M.odd)==null?void 0:I.offers)==null?void 0:V.find(F=>F.type===0);return{marketName:(O=M==null?void 0:M.market)==null?void 0:O.name,name:(N=M==null?void 0:M.odd)==null?void 0:N.name,cuota:_,hasPA:!!E,paParam:E==null?void 0:E.parameter}});return{name:u.odd.name,cuota:c,event:u.event.name,fechaHora:d,hasPA:!!f,paParam:f==null?void 0:f.parameter,marketName:p,subSelections:h}}),i=parseFloat(r==null?void 0:r.reduce((u,c)=>u*(c==null?void 0:c.cuota),1).toFixed(2)),o=parseFloat((n*i).toFixed(2));return{selections:r,stake:n,cuotaTotal:i,gananciaTotal:o}}}const mu="_BetSlip_1ysis_1",gu="_BetSlip_Title_1ysis_14",yu="_SelectionItemWrap_1ysis_21",Su="_BetSlip_ButtonWrap_1ysis_35",wt={BetSlip:mu,BetSlip_Title:gu,SelectionItemWrap:yu,BetSlip_ButtonWrap:Su},wu="_SelectionItem_pgtan_1",xu="_SelectionItemGrid_pgtan_12",bu="_SelectionItem_name_pgtan_18",Tu="_SelectionItem_marketName_pgtan_22",Eu="_SelectionItem_hasPA_pgtan_29",Pu="_SelectionItem_fechahora_pgtan_38",Cu="_SelectionItem__Wrap_pgtan_43",_u="_SelectionItem__BB_pgtan_48",Mu="_SelectionItem__BB__mn_pgtan_81",ee={SelectionItem:wu,SelectionItemGrid:xu,SelectionItem_name:bu,SelectionItem_marketName:Tu,SelectionItem_hasPA:Eu,SelectionItem_fechahora:Pu,SelectionItem__Wrap:Cu,SelectionItem__BB:_u,SelectionItem__BB__mn:Mu},Au=({selection:e})=>{var t,n;return T.jsxs("div",{className:ee.SelectionItem,children:[T.jsxs("div",{className:ee.SelectionItemGrid,children:[T.jsx("div",{className:ee.SelectionItem_name,children:e!=null&&e.subSelections?"Crear Apuesta":e.name}),T.jsx("div",{className:ee.SelectionItem_sc,children:e.cuota.toFixed(2)})]}),e!=null&&e.subSelections?null:T.jsx("div",{className:ee.SelectionItemGrid,children:T.jsxs("div",{className:ee.SelectionItem_marketName,children:[T.jsx("div",{children:e.marketName}),e.hasPA&&T.jsx("div",{className:ee.SelectionItem_hasPA,children:"PA"})]})}),T.jsxs("div",{className:ee.SelectionItemGrid,children:[T.jsx("div",{className:ee.SelectionItem_event,children:e.event}),T.jsx("div",{className:ee.SelectionItem_fechahora,children:e.fechaHora})]}),e!=null&&e.subSelections&&((t=e==null?void 0:e.subSelections)==null?void 0:t.length)>0?T.jsx("div",{className:ee.SelectionItem__Wrap,children:(n=e.subSelections)==null?void 0:n.map((r,i)=>T.jsxs("div",{className:ee.SelectionItem__BB,children:[T.jsx("div",{className:ee.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),T.jsx("div",{children:r==null?void 0:r.name})]},i))}):T.jsx(T.Fragment,{})]})},Iu="_PulseButton_1x1ir_1",Vu="_BetSlip__NextIcon_1x1ir_21",Fr={PulseButton:Iu,BetSlip__NextIcon:Vu},Lu="_Button_tq1cu_1",Ou={Button:Lu},Ru=({width:e="100%",height:t="100%",fill:n="white",...r})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,fill:n,...r,children:T.jsx("path",{fill:"#fff",d:"M5.77 1.86A1 1 0 1 0 4.23 3.14l4.47 5.36-4.47 5.36a1 1 0 1 0 1.538 1.28l5-6a1 1 0 0 0 0-1.28l-5-6Z"})}),yo=({children:e,onClick:t})=>T.jsx("div",{className:Fr.PulseButton,children:T.jsxs("a",{className:Ou.Button,onClick:n=>{n.preventDefault(),n.stopPropagation(),t()},children:[e,T.jsx("div",{className:Fr.BetSlip__NextIcon,children:T.jsx(Ru,{})})]})}),Du=({slip:e,title:t,onButtonStoryClick:n})=>{var r;return T.jsxs("div",{className:wt.BetSlip,children:[T.jsxs("div",{className:ve(wt.SelectionItemWrap),onWheel:i=>{i.stopPropagation()},onPointerDown:i=>{i.stopPropagation()},children:[t?T.jsx("div",{className:wt.BetSlip_Title,children:t}):null,(r=e==null?void 0:e.selections)==null?void 0:r.map((i,o)=>T.jsx(Au,{selection:i},`${Date.now()}-${o}`))]}),T.jsx("div",{className:ve(wt.BetSlip_ButtonWrap),children:T.jsx(yo,{onClick:n,children:e==null?void 0:e.cuotaTotal})})]})},So=({story:e,onButtonStoryClick:t})=>{let n=zr;return(e==null?void 0:e.type)=="promo"&&(n=zr),(e==null?void 0:e.type)=="betting"&&(n=ju),T.jsx(n,{story:e,onButtonStoryClick:t})},zr=({story:e,onButtonStoryClick:t})=>T.jsxs("div",{className:ve(Ke.story),children:[T.jsx("img",{src:e==null?void 0:e.image,alt:""}),e!=null&&e.btn_text&&(e!=null&&e.btn_url)?T.jsx("div",{className:ve(Ke.BetSlip_Wrapper),children:T.jsx("div",{className:Ke.BetSlip_ButtonWrap,children:T.jsx(yo,{onClick:()=>t==null?void 0:t(e),children:e==null?void 0:e.btn_text})})}):null]}),ju=({story:e,onButtonStoryClick:t})=>{const n=JSON.parse((e==null?void 0:e.coupon_result)??"{}");return T.jsxs("div",{className:ve(Ke.story),children:[T.jsx("img",{src:e==null?void 0:e.image,alt:""}),T.jsx("div",{className:Ke.BetSlip_Wrapper,children:T.jsx(Du,{slip:hu.fromRaw(n),title:e==null?void 0:e.coupon_title,onButtonStoryClick:()=>t==null?void 0:t(e)})})]})},Nu="_StoryHeaderPlayer_1fccj_1",Bu="_StoryHeaderPlayer__ProfileStory_1fccj_21",Fu="_StoryHeaderPlayer__title_1fccj_27",fn={StoryHeaderPlayer:Nu,StoryHeaderPlayer__ProfileStory:Bu,StoryHeaderPlayer__title:Fu},wo=({story:e,onProfileClick:t=()=>null,color:n,image:r})=>T.jsxs("div",{className:fn.StoryHeaderPlayer,children:[T.jsx(Zn,{className:fn.StoryHeaderPlayer__ProfileStory,onProfileClick:t,color:n,image:r}),T.jsx("div",{className:fn.StoryHeaderPlayer__title,children:e==null?void 0:e.title})]}),zu=({story:e,onChangeStory:t,onAllStoriesEnd:n,onLeft:r,onRight:i,play:o,initialIndex:s,onButtonStoryClick:a})=>{var x,M;const[l,u]=y.useState(!1),c=y.useRef(),d=y.useRef(!1),[f,v]=y.useState(s),p=y.useRef(null),h=P=>{const _=p.current.getBoundingClientRect();P.clientX-_.left<_.width/2?f==0?r==null||r(-1):(r==null||r(f-1),v(f-1)):b()},g=y.useRef(0),m=P=>{g.current=P.clientX,u(!0),d.current=!1,c.current=window.setTimeout(()=>{d.current=!0},200)},S=P=>{u(!1),clearTimeout(c.current)},w=P=>{if(d.current){P.preventDefault();return}h(P)},b=()=>{var P;f>=((P=e==null?void 0:e.stories)==null?void 0:P.length)-1?(i==null||i(-1),n==null||n(f)):(i==null||i(f),v(f+1))};return y.useEffect(()=>{o&&(t==null||t(f,e==null?void 0:e.stories[f]))},[f,o]),y.useEffect(()=>{if(!o||l)return;const P=setTimeout(()=>{b(),clearTimeout(P)},7e3);return()=>{clearTimeout(P)}},[f,o,l]),T.jsxs("div",{className:xe.CardStory,onClick:w,ref:p,onPointerDown:m,onPointerUp:S,onPointerLeave:S,children:[o&&T.jsx("div",{className:xe.CardStory_ProgressRoot,children:(x=e==null?void 0:e.stories)==null?void 0:x.map((P,_)=>{const E=f>_,C=f<_,I=f==_;return T.jsx("div",{className:ve(xe.CardStory_ProgressRoot_Track,{[xe.ProgressAnimate]:I,[xe.Complete]:E,[xe.NoComplete]:C,[xe.Pause]:l})},P==null?void 0:P.id)})}),(M=e==null?void 0:e.stories)==null?void 0:M.map((P,_)=>f!=_?null:T.jsxs("div",{"data-card-story-index":_,className:ve(xe.Story,{active:f==_}),children:[T.jsx(So,{story:P,onButtonStoryClick:a}),T.jsx(wo,{color:e==null?void 0:e.color,image:e==null?void 0:e.avatar,story:P})]},P==null?void 0:P.id))]})};var In=function(e,t){return In=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},In(e,t)};function xo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");In(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var A=function(){return A=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},A.apply(this,arguments)};function ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function U(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function re(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var kr="production",bo=typeof process>"u"||process.env===void 0?kr:process.env.NODE_ENV||kr,ge=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},it={measureLayout:ge(["layout","layoutId","drag"]),animation:ge(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ge(["exit"]),drag:ge(["drag","dragControls"]),focus:ge(["whileFocus"]),hover:ge(["whileHover","onHoverStart","onHoverEnd"]),tap:ge(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ge(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ge(["whileInView","onViewportEnter","onViewportLeave"])};function ku(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?it.projectionNodeConstructor=e[t]:it[t].Component=e[t])}var ct=function(){},ne=function(){};process.env.NODE_ENV!=="production"&&(ct=function(e,t){!e&&typeof console<"u"&&console.warn(t)},ne=function(e,t){if(!e)throw new Error(t)});var To=y.createContext({strict:!1}),Eo=Object.keys(it),Gu=Eo.length;function $u(e,t,n){var r=[],i=y.useContext(To);if(!t)return null;bo!=="production"&&n&&i.strict&&ne(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var o=0;o<Gu;o++){var s=Eo[o],a=it[s],l=a.isEnabled,u=a.Component;l(e)&&u&&r.push(Cn.createElement(u,A({key:s},e,{visualElement:t})))}return r}var dt=y.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),Ut=y.createContext({});function Hu(){return y.useContext(Ut).visualElement}var qt=y.createContext(null),Ue=typeof document<"u",jt=Ue?y.useLayoutEffect:y.useEffect,Vn={current:null},Po=!1;function Wu(){if(Po=!0,!!Ue)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Vn.current=e.matches};e.addListener(t),t()}else Vn.current=!1}function Uu(){!Po&&Wu();var e=U(y.useState(Vn.current),1),t=e[0];return t}function qu(){var e=Uu(),t=y.useContext(dt).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function Yu(e,t,n,r){var i=y.useContext(To),o=Hu(),s=y.useContext(qt),a=qu(),l=y.useRef(void 0);r||(r=i.renderer),!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceId:s==null?void 0:s.id,blockInitialAnimation:(s==null?void 0:s.initial)===!1,shouldReduceMotion:a}));var u=l.current;return jt(function(){u==null||u.syncRender()}),y.useEffect(function(){var c;(c=u==null?void 0:u.animationState)===null||c===void 0||c.animateChanges()}),jt(function(){return function(){return u==null?void 0:u.notifyUnmount()}},[]),u}function Fe(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Xu(e,t,n){return y.useCallback(function(r){var i;r&&((i=e.mount)===null||i===void 0||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Fe(n)&&(n.current=r))},[t])}function Co(e){return Array.isArray(e)}function ae(e){return typeof e=="string"||Co(e)}function Ku(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function Zu(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function _o(e,t,n,r,i){var o;return r===void 0&&(r={}),i===void 0&&(i={}),typeof t=="function"&&(t=t(n??e.custom,r,i)),typeof t=="string"&&(t=(o=e.variants)===null||o===void 0?void 0:o[t]),typeof t=="function"&&(t=t(n??e.custom,r,i)),t}function Yt(e,t,n){var r=e.getProps();return _o(r,t,n??r.custom,Ku(e),Zu(e))}function Xt(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||ae(e.initial)||ae(e.animate)||ae(e.whileHover)||ae(e.whileDrag)||ae(e.whileTap)||ae(e.whileFocus)||ae(e.exit)}function Mo(e){return!!(Xt(e)||e.variants)}function Ju(e,t){if(Xt(e)){var n=e.initial,r=e.animate;return{initial:n===!1||ae(n)?n:void 0,animate:ae(r)?r:void 0}}return e.inherit!==!1?t:{}}function Qu(e){var t=Ju(e,y.useContext(Ut)),n=t.initial,r=t.animate;return y.useMemo(function(){return{initial:n,animate:r}},[Gr(n),Gr(r)])}function Gr(e){return Array.isArray(e)?e.join(" "):e}function je(e){var t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}var Ze={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ec=1;function tc(){return je(function(){if(Ze.hasEverUpdated)return ec++})}var Ao=y.createContext({}),Io=y.createContext({});function nc(e,t,n,r){var i,o=t.layoutId,s=t.layout,a=t.drag,l=t.dragConstraints,u=t.layoutScroll,c=y.useContext(Io);!r||!n||n!=null&&n.projection||(n.projection=new r(e,n.getLatestValues(),(i=n.parent)===null||i===void 0?void 0:i.projection),n.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!a||l&&Fe(l),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof s=="string"?s:"both",initialPromotionConfig:c,layoutScroll:u}))}var rc=function(e){xo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var n=this.props,r=n.visualElement,i=n.props;r&&r.setProps(i)},t.prototype.render=function(){return this.props.children},t}(y.Component);function ic(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,i=e.useRender,o=e.useVisualState,s=e.Component;t&&ku(t);function a(l,u){var c=oc(l);l=A(A({},l),{layoutId:c});var d=y.useContext(dt),f=null,v=Qu(l),p=d.isStatic?void 0:tc(),h=o(l,d.isStatic);return!d.isStatic&&Ue&&(v.visualElement=Yu(s,h,A(A({},d),l),n),nc(p,l,v.visualElement,r||it.projectionNodeConstructor),f=$u(l,v.visualElement,t)),Cn.createElement(rc,{visualElement:v.visualElement,props:A(A({},d),l)},f,Cn.createElement(Ut.Provider,{value:v},i(s,l,p,Xu(h,v.visualElement,u),h,d.isStatic,v.visualElement)))}return y.forwardRef(a)}function oc(e){var t,n=e.layoutId,r=(t=y.useContext(Ao))===null||t===void 0?void 0:t.id;return r&&n!==void 0?r+"-"+n:n}function sc(e){function t(r,i){return i===void 0&&(i={}),ic(e(r,i))}if(typeof Proxy>"u")return t;var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var ac=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function er(e){return typeof e!="string"||e.includes("-")?!1:!!(ac.indexOf(e)>-1||/[A-Z]/.test(e))}var Nt={};function lc(e){Object.assign(Nt,e)}var Ln=["","X","Y","Z"],uc=["translate","scale","rotate","skew"],ot=["transformPerspective","x","y","z"];uc.forEach(function(e){return Ln.forEach(function(t){return ot.push(e+t)})});function cc(e,t){return ot.indexOf(e)-ot.indexOf(t)}var dc=new Set(ot);function ft(e){return dc.has(e)}var fc=new Set(["originX","originY","originZ"]);function Vo(e){return fc.has(e)}function Lo(e,t){var n=t.layout,r=t.layoutId;return ft(e)||Vo(e)||(n||r!==void 0)&&(!!Nt[e]||e==="opacity")}var ue=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},pc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function vc(e,t,n,r){var i=e.transform,o=e.transformKeys,s=t.enableHardwareAcceleration,a=s===void 0?!0:s,l=t.allowTransformNone,u=l===void 0?!0:l,c="";o.sort(cc);for(var d=!1,f=o.length,v=0;v<f;v++){var p=o[v];c+="".concat(pc[p]||p,"(").concat(i[p],") "),p==="z"&&(d=!0)}return!d&&a?c+="translateZ(0)":c=c.trim(),r?c=r(i,n?"":c):u&&n&&(c="none"),c}function hc(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,i=r===void 0?"50%":r,o=e.originZ,s=o===void 0?0:o;return"".concat(n," ").concat(i," ").concat(s)}function Oo(e){return e.startsWith("--")}var mc=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const Ro=(e,t)=>n=>Math.max(Math.min(n,t),e),Je=e=>e%1?Number(e.toFixed(5)):e,st=/(-)?([\d]*\.?[\d])+/g,On=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,gc=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function pt(e){return typeof e=="string"}const Ne={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qe=Object.assign(Object.assign({},Ne),{transform:Ro(0,1)}),xt=Object.assign(Object.assign({},Ne),{default:1}),vt=e=>({test:t=>pt(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Te=vt("deg"),pe=vt("%"),j=vt("px"),yc=vt("vh"),Sc=vt("vw"),$r=Object.assign(Object.assign({},pe),{parse:e=>pe.parse(e)/100,transform:e=>pe.transform(e*100)}),tr=(e,t)=>n=>!!(pt(n)&&gc.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Do=(e,t,n)=>r=>{if(!pt(r))return r;const[i,o,s,a]=r.match(st);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Le={test:tr("hsl","hue"),parse:Do("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pe.transform(Je(t))+", "+pe.transform(Je(n))+", "+Je(Qe.transform(r))+")"},wc=Ro(0,255),pn=Object.assign(Object.assign({},Ne),{transform:e=>Math.round(wc(e))}),Me={test:tr("rgb","red"),parse:Do("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pn.transform(e)+", "+pn.transform(t)+", "+pn.transform(n)+", "+Je(Qe.transform(r))+")"};function xc(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Rn={test:tr("#"),parse:xc,transform:Me.transform},J={test:e=>Me.test(e)||Rn.test(e)||Le.test(e),parse:e=>Me.test(e)?Me.parse(e):Le.test(e)?Le.parse(e):Rn.parse(e),transform:e=>pt(e)?e:e.hasOwnProperty("red")?Me.transform(e):Le.transform(e)},jo="${c}",No="${n}";function bc(e){var t,n,r,i;return isNaN(e)&&pt(e)&&((n=(t=e.match(st))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(On))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function Bo(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(On);r&&(n=r.length,e=e.replace(On,jo),t.push(...r.map(J.parse)));const i=e.match(st);return i&&(e=e.replace(st,No),t.push(...i.map(Ne.parse))),{values:t,numColors:n,tokenised:e}}function Fo(e){return Bo(e).values}function zo(e){const{values:t,numColors:n,tokenised:r}=Bo(e),i=t.length;return o=>{let s=r;for(let a=0;a<i;a++)s=s.replace(a<n?jo:No,a<n?J.transform(o[a]):Je(o[a]));return s}}const Tc=e=>typeof e=="number"?0:e;function Ec(e){const t=Fo(e);return zo(e)(t.map(Tc))}const Se={test:bc,parse:Fo,createTransformer:zo,getAnimatableNone:Ec},Pc=new Set(["brightness","contrast","saturate","opacity"]);function Cc(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(st)||[];if(!r)return e;const i=n.replace(r,"");let o=Pc.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const _c=/([a-z-]*)\(.*?\)/g,Dn=Object.assign(Object.assign({},Se),{getAnimatableNone:e=>{const t=e.match(_c);return t?t.map(Cc).join(" "):e}});var Hr=A(A({},Ne),{transform:Math.round}),ko={borderWidth:j,borderTopWidth:j,borderRightWidth:j,borderBottomWidth:j,borderLeftWidth:j,borderRadius:j,radius:j,borderTopLeftRadius:j,borderTopRightRadius:j,borderBottomRightRadius:j,borderBottomLeftRadius:j,width:j,maxWidth:j,height:j,maxHeight:j,size:j,top:j,right:j,bottom:j,left:j,padding:j,paddingTop:j,paddingRight:j,paddingBottom:j,paddingLeft:j,margin:j,marginTop:j,marginRight:j,marginBottom:j,marginLeft:j,rotate:Te,rotateX:Te,rotateY:Te,rotateZ:Te,scale:xt,scaleX:xt,scaleY:xt,scaleZ:xt,skew:Te,skewX:Te,skewY:Te,distance:j,translateX:j,translateY:j,translateZ:j,x:j,y:j,z:j,perspective:j,transformPerspective:j,opacity:Qe,originX:$r,originY:$r,originZ:j,zIndex:Hr,fillOpacity:Qe,strokeOpacity:Qe,numOctaves:Hr};function nr(e,t,n,r){var i,o=e.style,s=e.vars,a=e.transform,l=e.transformKeys,u=e.transformOrigin;l.length=0;var c=!1,d=!1,f=!0;for(var v in t){var p=t[v];if(Oo(v)){s[v]=p;continue}var h=ko[v],g=mc(p,h);if(ft(v)){if(c=!0,a[v]=g,l.push(v),!f)continue;p!==((i=h.default)!==null&&i!==void 0?i:0)&&(f=!1)}else Vo(v)?(u[v]=g,d=!0):o[v]=g}c?o.transform=vc(e,n,f,r):r?o.transform=r({},""):!t.transform&&o.transform&&(o.transform="none"),d&&(o.transformOrigin=hc(u))}var rr=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Go(e,t,n){for(var r in t)!ue(t[r])&&!Lo(r,n)&&(e[r]=t[r])}function Mc(e,t,n){var r=e.transformTemplate;return y.useMemo(function(){var i=rr();nr(i,t,{enableHardwareAcceleration:!n},r);var o=i.vars,s=i.style;return A(A({},o),s)},[t])}function Ac(e,t,n){var r=e.style||{},i={};return Go(i,r,e),Object.assign(i,Mc(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function Ic(e,t,n){var r={},i=Ac(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),r.style=i,r}var Vc=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Bt(e){return Vc.has(e)}var $o=function(e){return!Bt(e)};function Lc(e){e&&($o=function(t){return t.startsWith("on")?!Bt(t):e(t)})}try{Lc(require("@emotion/is-prop-valid").default)}catch{}function Oc(e,t,n){var r={};for(var i in e)($o(i)||n===!0&&Bt(i)||!t&&!Bt(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Wr(e,t,n){return typeof e=="string"?e:j.transform(t+n*e)}function Rc(e,t,n){var r=Wr(t,e.x,e.width),i=Wr(n,e.y,e.height);return"".concat(r," ").concat(i)}var Dc={offset:"strokeDashoffset",array:"strokeDasharray"};function jc(e,t,n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),e.pathLength=1;var o=Dc;e[o.offset]=j.transform(-r);var s=j.transform(t),a=j.transform(n);e[o.array]="".concat(s," ").concat(a)}function ir(e,t,n,r){var i=t.attrX,o=t.attrY,s=t.originX,a=t.originY,l=t.pathLength,u=t.pathSpacing,c=u===void 0?1:u,d=t.pathOffset,f=d===void 0?0:d,v=ie(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);nr(e,v,n,r),e.attrs=e.style,e.style={};var p=e.attrs,h=e.style,g=e.dimensions;p.transform&&(g&&(h.transform=p.transform),delete p.transform),g&&(s!==void 0||a!==void 0||h.transform)&&(h.transformOrigin=Rc(g,s!==void 0?s:.5,a!==void 0?a:.5)),i!==void 0&&(p.x=i),o!==void 0&&(p.y=o),l!==void 0&&jc(p,l,c,f)}var Ho=function(){return A(A({},rr()),{attrs:{}})};function Nc(e,t){var n=y.useMemo(function(){var i=Ho();return ir(i,t,{enableHardwareAcceleration:!1},e.transformTemplate),A(A({},i.attrs),{style:A({},i.style)})},[t]);if(e.style){var r={};Go(r,e.style,e),n.style=A(A({},r),n.style)}return n}function Bc(e){e===void 0&&(e=!1);var t=function(n,r,i,o,s,a){var l=s.latestValues,u=er(n)?Nc:Ic,c=u(r,l,a),d=Oc(r,typeof n=="string",e),f=A(A(A({},d),c),{ref:o});return i&&(f["data-projection-id"]=i),y.createElement(n,f)};return t}var Fc=/([a-z])([A-Z])/g,zc="$1-$2",Wo=function(e){return e.replace(Fc,zc).toLowerCase()};function Uo(e,t,n,r){var i=t.style,o=t.vars;Object.assign(e.style,i,r&&r.getProjectionStyles(n));for(var s in o)e.style.setProperty(s,o[s])}var qo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Yo(e,t,n,r){Uo(e,t,void 0,r);for(var i in t.attrs)e.setAttribute(qo.has(i)?i:Wo(i),t.attrs[i])}function or(e){var t=e.style,n={};for(var r in t)(ue(t[r])||Lo(r,e))&&(n[r]=t[r]);return n}function Xo(e){var t=or(e);for(var n in e)if(ue(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function sr(e){return typeof e=="object"&&typeof e.start=="function"}var at=function(e){return Array.isArray(e)},kc=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},Ko=function(e){return at(e)?e[e.length-1]||0:e};function It(e){var t=ue(e)?e.get():e;return kc(t)?t.toValue():t}function Ur(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,s=e.onMount,a={latestValues:Gc(t,n,r,i),renderState:o()};return s&&(a.mount=function(l){return s(t,l,a)}),a}var Zo=function(e){return function(t,n){var r=y.useContext(Ut),i=y.useContext(qt);return n?Ur(e,t,r,i):je(function(){return Ur(e,t,r,i)})}};function Gc(e,t,n,r){var i={},o=(n==null?void 0:n.initial)===!1,s=r(e);for(var a in s)i[a]=It(s[a]);var l=e.initial,u=e.animate,c=Xt(e),d=Mo(e);t&&d&&!c&&e.inherit!==!1&&(l??(l=t.initial),u??(u=t.animate));var f=o||l===!1,v=f?u:l;if(v&&typeof v!="boolean"&&!sr(v)){var p=Array.isArray(v)?v:[v];p.forEach(function(h){var g=_o(e,h);if(g){var m=g.transitionEnd;g.transition;var S=ie(g,["transitionEnd","transition"]);for(var w in S){var b=S[w];if(Array.isArray(b)){var x=f?b.length-1:0;b=b[x]}b!==null&&(i[w]=b)}for(var w in m)i[w]=m[w]}})}return i}var $c={useVisualState:Zo({scrapeMotionValuesFromProps:Xo,createRenderState:Ho,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}ir(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),Yo(t,r)}})},Hc={useVisualState:Zo({scrapeMotionValuesFromProps:or,createRenderState:rr})};function Wc(e,t,n,r,i){var o=t.forwardMotionProps,s=o===void 0?!1:o,a=er(e)?$c:Hc;return A(A({},a),{preloadedFeatures:n,useRender:Bc(s),createVisualElement:r,projectionNodeConstructor:i,Component:e})}var H;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(H||(H={}));function Kt(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function jn(e,t,n,r){y.useEffect(function(){var i=e.current;if(n&&i)return Kt(i,t,n,r)},[e,t,n,r])}function Uc(e){var t=e.whileFocus,n=e.visualElement,r=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(H.Focus,!0)},i=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(H.Focus,!1)};jn(n,"focus",t?r:void 0),jn(n,"blur",t?i:void 0)}function Jo(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Qo(e){var t=!!e.touches;return t}function qc(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var Yc={pageX:0,pageY:0};function Xc(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||Yc;return{x:r[t+"X"],y:r[t+"Y"]}}function Kc(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function ar(e,t){return t===void 0&&(t="page"),{point:Qo(e)?Xc(e,t):Kc(e,t)}}var es=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,ar(r))};return t?qc(n):n},Zc=function(){return Ue&&window.onpointerdown===null},Jc=function(){return Ue&&window.ontouchstart===null},Qc=function(){return Ue&&window.onmousedown===null},ed={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},td={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ts(e){return Zc()?e:Jc()?td[e]:Qc()?ed[e]:e}function $e(e,t,n,r){return Kt(e,ts(t),es(n,t==="pointerdown"),r)}function Ft(e,t,n,r){return jn(e,ts(t),n&&es(n,t==="pointerdown"),r)}function ns(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var qr=ns("dragHorizontal"),Yr=ns("dragVertical");function rs(e){var t=!1;if(e==="y")t=Yr();else if(e==="x")t=qr();else{var n=qr(),r=Yr();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function is(){var e=rs(!0);return e?(e(),!1):!0}function Xr(e,t,n){return function(r,i){var o;!Jo(r)||is()||((o=e.animationState)===null||o===void 0||o.setActive(H.Hover,t),n==null||n(r,i))}}function nd(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Ft(i,"pointerenter",t||r?Xr(i,!0,t):void 0,{passive:!t}),Ft(i,"pointerleave",n||r?Xr(i,!1,n):void 0,{passive:!n})}var os=function(e,t){return t?e===t?!0:os(e,t.parentElement):!1};function ss(e){return y.useEffect(function(){return function(){return e()}},[])}const zt=(e,t,n)=>Math.min(Math.max(n,e),t),Kr=.001,rd=.01,Zr=10,id=.05,od=1;function sd({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;ct(e<=Zr*1e3,"Spring duration must be 10 seconds or less");let s=1-t;s=zt(id,od,s),e=zt(rd,Zr,e/1e3),s<1?(i=u=>{const c=u*s,d=c*e,f=c-n,v=Nn(u,s),p=Math.exp(-d);return Kr-f/v*p},o=u=>{const d=u*s*e,f=d*n+n,v=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),h=Nn(Math.pow(u,2),s);return(-i(u)+Kr>0?-1:1)*((f-v)*p)/h}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-.001+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=ld(i,o,a);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const ad=12;function ld(e,t,n){let r=n;for(let i=1;i<ad;i++)r=r-e(r)/t(r);return r}function Nn(e,t){return e*Math.sqrt(1-t*t)}const ud=["duration","bounce"],cd=["stiffness","damping","mass"];function Jr(e,t){return t.some(n=>e[n]!==void 0)}function dd(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Jr(e,cd)&&Jr(e,ud)){const n=sd(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function lr(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=ie(e,["from","to","restSpeed","restDelta"]);const s={done:!1,value:t};let{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=dd(o),v=Qr,p=Qr;function h(){const g=c?-(c/1e3):0,m=n-t,S=l/(2*Math.sqrt(a*u)),w=Math.sqrt(a/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),S<1){const b=Nn(w,S);v=x=>{const M=Math.exp(-S*w*x);return n-M*((g+S*w*m)/b*Math.sin(b*x)+m*Math.cos(b*x))},p=x=>{const M=Math.exp(-S*w*x);return S*w*M*(Math.sin(b*x)*(g+S*w*m)/b+m*Math.cos(b*x))-M*(Math.cos(b*x)*(g+S*w*m)-b*m*Math.sin(b*x))}}else if(S===1)v=b=>n-Math.exp(-w*b)*(m+(g+w*m)*b);else{const b=w*Math.sqrt(S*S-1);v=x=>{const M=Math.exp(-S*w*x),P=Math.min(b*x,300);return n-M*((g+S*w*m)*Math.sinh(P)+b*m*Math.cosh(P))/b}}}return h(),{next:g=>{const m=v(g);if(f)s.done=g>=d;else{const S=p(g)*1e3,w=Math.abs(S)<=r,b=Math.abs(n-m)<=i;s.done=w&&b}return s.value=s.done?n:m,s},flipTarget:()=>{c=-c,[t,n]=[n,t],h()}}}lr.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Qr=e=>0,lt=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},q=(e,t,n)=>-n*e+n*t+e;function vn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ei({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=vn(l,a,e+1/3),o=vn(l,a,e),s=vn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const fd=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},pd=[Rn,Me,Le],ti=e=>pd.find(t=>t.test(e)),ni=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,as=(e,t)=>{let n=ti(e),r=ti(t);ne(!!n,ni(e)),ne(!!r,ni(t));let i=n.parse(e),o=r.parse(t);n===Le&&(i=ei(i),n=Me),r===Le&&(o=ei(o),r=Me);const s=Object.assign({},i);return a=>{for(const l in s)l!=="alpha"&&(s[l]=fd(i[l],o[l],a));return s.alpha=q(i.alpha,o.alpha,a),n.transform(s)}},Bn=e=>typeof e=="number",vd=(e,t)=>n=>t(e(n)),Zt=(...e)=>e.reduce(vd);function ls(e,t){return Bn(e)?n=>q(e,t,n):J.test(e)?as(e,t):cs(e,t)}const us=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>ls(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},hd=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ls(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function ri(e){const t=Se.parse(e),n=t.length;let r=0,i=0,o=0;for(let s=0;s<n;s++)r||typeof t[s]=="number"?r++:t[s].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const cs=(e,t)=>{const n=Se.createTransformer(t),r=ri(e),i=ri(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Zt(us(r.parsed,i.parsed),n):(ct(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),s=>`${s>0?t:e}`)},md=(e,t)=>n=>q(e,t,n);function gd(e){if(typeof e=="number")return md;if(typeof e=="string")return J.test(e)?as:cs;if(Array.isArray(e))return us;if(typeof e=="object")return hd}function yd(e,t,n){const r=[],i=n||gd(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]:t;a=Zt(l,a)}r.push(a)}return r}function Sd([e,t],[n]){return r=>n(lt(e,t,r))}function wd(e,t){const n=e.length,r=n-1;return i=>{let o=0,s=!1;if(i<=e[0]?s=!0:i>=e[r]&&(o=r-1,s=!0),!s){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const a=lt(e[o],e[o+1],i);return t[o](a)}}function ur(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;ne(o===t.length,"Both input and output ranges must be the same length"),ne(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const s=yd(t,r,i),a=o===2?Sd(e,s):wd(e,s);return n?l=>a(zt(e[0],e[o-1],l)):a}const Jt=e=>t=>1-e(1-t),cr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xd=e=>t=>Math.pow(t,e),ds=e=>t=>t*t*((e+1)*t-e),bd=e=>{const t=ds(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},fs=1.525,Td=4/11,Ed=8/11,Pd=9/10,dr=e=>e,fr=xd(2),Cd=Jt(fr),ps=cr(fr),vs=e=>1-Math.sin(Math.acos(e)),pr=Jt(vs),_d=cr(pr),vr=ds(fs),Md=Jt(vr),Ad=cr(vr),Id=bd(fs),Vd=4356/361,Ld=35442/1805,Od=16061/1805,kt=e=>{if(e===1||e===0)return e;const t=e*e;return e<Td?7.5625*t:e<Ed?9.075*t-9.9*e+3.4:e<Pd?Vd*t-Ld*e+Od:10.8*e*e-20.52*e+10.72},Rd=Jt(kt),Dd=e=>e<.5?.5*(1-kt(1-e*2)):.5*kt(e*2-1)+.5;function jd(e,t){return e.map(()=>t||ps).splice(0,e.length-1)}function Nd(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Bd(e,t){return e.map(n=>n*t)}function Vt({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},s=Array.isArray(t)?t:[e,t],a=Bd(r&&r.length===s.length?r:Nd(s),i);function l(){return ur(a,s,{ease:Array.isArray(n)?n:jd(s,n)})}let u=l();return{next:c=>(o.value=u(c),o.done=c>=i,o),flipTarget:()=>{s.reverse(),u=l()}}}function Fd({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const s={done:!1,value:t};let a=n*e;const l=t+a,u=o===void 0?l:o(l);return u!==l&&(a=u-t),{next:c=>{const d=-a*Math.exp(-c/r);return s.done=!(d>i||d<-i),s.value=s.done?u:u+d,s},flipTarget:()=>{}}}const ii={keyframes:Vt,spring:lr,decay:Fd};function zd(e){if(Array.isArray(e.to))return Vt;if(ii[e.type])return ii[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Vt:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?lr:Vt}const hs=1/60*1e3,kd=typeof performance<"u"?()=>performance.now():()=>Date.now(),ms=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(kd()),hs);function Gd(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&s.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const c=t[u];c(l),s.has(c)&&(a.schedule(c),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const $d=40;let Fn=!0,ut=!1,zn=!1;const He={delta:0,timestamp:0},ht=["read","update","preRender","render","postRender"],Qt=ht.reduce((e,t)=>(e[t]=Gd(()=>ut=!0),e),{}),le=ht.reduce((e,t)=>{const n=Qt[t];return e[t]=(r,i=!1,o=!1)=>(ut||Wd(),n.schedule(r,i,o)),e},{}),We=ht.reduce((e,t)=>(e[t]=Qt[t].cancel,e),{}),hn=ht.reduce((e,t)=>(e[t]=()=>Qt[t].process(He),e),{}),Hd=e=>Qt[e].process(He),gs=e=>{ut=!1,He.delta=Fn?hs:Math.max(Math.min(e-He.timestamp,$d),1),He.timestamp=e,zn=!0,ht.forEach(Hd),zn=!1,ut&&(Fn=!1,ms(gs))},Wd=()=>{ut=!0,Fn=!0,zn||ms(gs)},Gt=()=>He;function ys(e,t,n=0){return e-t-n}function Ud(e,t,n=0,r=!0){return r?ys(t+-e,t,n):t-(e-t)+n}function qd(e,t,n,r){return r?e>=t+n:e<=-n}const Yd=e=>{const t=({delta:n})=>e(n);return{start:()=>le.update(t,!0),stop:()=>We.update(t)}};function hr(e){var t,n,{from:r,autoplay:i=!0,driver:o=Yd,elapsed:s=0,repeat:a=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:f,onRepeat:v,onUpdate:p}=e,h=ie(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=h,m,S=0,w=h.duration,b,x=!1,M=!0,P;const _=zd(h);!((n=(t=_).needsInterpolation)===null||n===void 0)&&n.call(t,r,g)&&(P=ur([0,100],[r,g],{clamp:!1}),r=0,g=100);const E=_(Object.assign(Object.assign({},h),{from:r,to:g}));function C(){S++,l==="reverse"?(M=S%2===0,s=Ud(s,w,u,M)):(s=ys(s,w,u),l==="mirror"&&E.flipTarget()),x=!1,v&&v()}function I(){m.stop(),f&&f()}function V(N){if(M||(N=-N),s+=N,!x){const F=E.next(Math.max(0,s));b=F.value,P&&(b=P(b)),x=M?F.done:s<=0}p==null||p(b),x&&(S===0&&(w??(w=s)),S<a?qd(s,w,u,M)&&C():I())}function O(){c==null||c(),m=o(V),m.start()}return i&&O(),{stop:()=>{d==null||d(),m.stop()}}}function Ss(e,t){return t?e*(1e3/t):0}function Xd({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:f,onStop:v}){let p;function h(w){return n!==void 0&&w<n||r!==void 0&&w>r}function g(w){return n===void 0?r:r===void 0||Math.abs(n-w)<Math.abs(r-w)?n:r}function m(w){p==null||p.stop(),p=hr(Object.assign(Object.assign({},w),{driver:c,onUpdate:b=>{var x;d==null||d(b),(x=w.onUpdate)===null||x===void 0||x.call(w,b)},onComplete:f,onStop:v}))}function S(w){m(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:l},w))}if(h(e))S({from:e,velocity:t,to:g(e)});else{let w=i*t+e;typeof u<"u"&&(w=u(w));const b=g(w),x=b===n?-1:1;let M,P;const _=E=>{M=P,P=E,t=Ss(E-M,Gt().delta),(x===1&&E>b||x===-1&&E<b)&&S({from:E,to:b,velocity:t})};m({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:h(w)?_:void 0})}return{stop:()=>p==null?void 0:p.stop()}}const kn=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),oi=e=>kn(e)&&e.hasOwnProperty("z"),bt=(e,t)=>Math.abs(e-t);function ws(e,t){if(Bn(e)&&Bn(t))return bt(e,t);if(kn(e)&&kn(t)){const n=bt(e.x,t.x),r=bt(e.y,t.y),i=oi(e)&&oi(t)?bt(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const xs=(e,t)=>1-3*t+3*e,bs=(e,t)=>3*t-6*e,Ts=e=>3*e,$t=(e,t,n)=>((xs(t,n)*e+bs(t,n))*e+Ts(t))*e,Es=(e,t,n)=>3*xs(t,n)*e*e+2*bs(t,n)*e+Ts(t),Kd=1e-7,Zd=10;function Jd(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=$t(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Kd&&++a<Zd);return s}const Qd=8,ef=.001;function tf(e,t,n,r){for(let i=0;i<Qd;++i){const o=Es(t,n,r);if(o===0)return t;const s=$t(t,n,r)-e;t-=s/o}return t}const Lt=11,Tt=1/(Lt-1);function nf(e,t,n,r){if(e===t&&n===r)return dr;const i=new Float32Array(Lt);for(let s=0;s<Lt;++s)i[s]=$t(s*Tt,e,n);function o(s){let a=0,l=1;const u=Lt-1;for(;l!==u&&i[l]<=s;++l)a+=Tt;--l;const c=(s-i[l])/(i[l+1]-i[l]),d=a+c*Tt,f=Es(d,e,n);return f>=ef?tf(s,d,e,n):f===0?d:Jd(s,a,a+Tt,e,n)}return s=>s===0||s===1?s:$t(o(s),t,r)}function rf(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,s=t||n||r||i,a=y.useRef(!1),l=y.useRef(null),u={passive:!(n||t||r||p)};function c(){var h;(h=l.current)===null||h===void 0||h.call(l),l.current=null}function d(){var h;return c(),a.current=!1,(h=o.animationState)===null||h===void 0||h.setActive(H.Tap,!1),!is()}function f(h,g){d()&&(os(o.getInstance(),h.target)?t==null||t(h,g):r==null||r(h,g))}function v(h,g){d()&&(r==null||r(h,g))}function p(h,g){var m;c(),!a.current&&(a.current=!0,l.current=Zt($e(window,"pointerup",f,u),$e(window,"pointercancel",v,u)),(m=o.animationState)===null||m===void 0||m.setActive(H.Tap,!0),n==null||n(h,g))}Ft(o,"pointerdown",s?p:void 0,u),ss(c)}var si=new Set;function Ps(e,t,n){e||si.has(t)||(console.warn(t),si.add(t))}var Gn=new WeakMap,mn=new WeakMap,of=function(e){var t;(t=Gn.get(e.target))===null||t===void 0||t(e)},sf=function(e){e.forEach(of)};function af(e){var t=e.root,n=ie(e,["root"]),r=t||document;mn.has(r)||mn.set(r,{});var i=mn.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(sf,A({root:t},n))),i[o]}function lf(e,t,n){var r=af(t);return Gn.set(e,n),r.observe(e),function(){Gn.delete(e),r.unobserve(e)}}function uf(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,s=o===void 0?{}:o,a=y.useRef({hasEnteredView:!1,isInView:!1}),l=!!(n||r||i);s.once&&a.current.hasEnteredView&&(l=!1);var u=typeof IntersectionObserver>"u"?ff:df;u(l,a.current,t,s)}var cf={some:0,all:1};function df(e,t,n,r){var i=r.root,o=r.margin,s=r.amount,a=s===void 0?"some":s,l=r.once;y.useEffect(function(){if(e){var u={root:i==null?void 0:i.current,rootMargin:o,threshold:typeof a=="number"?a:cf[a]},c=function(d){var f,v=d.isIntersecting;if(t.isInView!==v&&(t.isInView=v,!(l&&!v&&t.hasEnteredView))){v&&(t.hasEnteredView=!0),(f=n.animationState)===null||f===void 0||f.setActive(H.InView,v);var p=n.getProps(),h=v?p.onViewportEnter:p.onViewportLeave;h==null||h(d)}};return lf(n.getInstance(),u,c)}},[e,i,o,a])}function ff(e,t,n,r){var i=r.fallback,o=i===void 0?!0:i;y.useEffect(function(){!e||!o||(bo!=="production"&&Ps(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var s;t.hasEnteredView=!0;var a=n.getProps().onViewportEnter;a==null||a(null),(s=n.animationState)===null||s===void 0||s.setActive(H.InView,!0)}))},[e])}var Ae=function(e){return function(t){return e(t),null}},pf={inView:Ae(uf),tap:Ae(rf),focus:Ae(Uc),hover:Ae(nd)},vf=0,hf=function(){return vf++},mf=function(){return je(hf)};function Cs(){var e=y.useContext(qt);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=mf();y.useEffect(function(){return r(i)},[]);var o=function(){return n==null?void 0:n(i)};return!t&&n?[!1,o]:[!0]}function _s(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Ht=function(e){return e*1e3},ai={linear:dr,easeIn:fr,easeInOut:ps,easeOut:Cd,circIn:vs,circInOut:_d,circOut:pr,backIn:vr,backInOut:Ad,backOut:Md,anticipate:Id,bounceIn:Rd,bounceInOut:Dd,bounceOut:kt},li=function(e){if(Array.isArray(e)){ne(e.length===4,"Cubic bezier arrays must contain four numerical values.");var t=U(e,4),n=t[0],r=t[1],i=t[2],o=t[3];return nf(n,r,i,o)}else if(typeof e=="string")return ne(ai[e]!==void 0,"Invalid easing type '".concat(e,"'")),ai[e];return e},gf=function(e){return Array.isArray(e)&&typeof e[0]!="number"},ui=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Se.test(t)&&!t.startsWith("url("))},Ie=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Et=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},gn=function(){return{type:"keyframes",ease:"linear",duration:.3}},yf=function(e){return{type:"keyframes",duration:.8,values:e}},ci={x:Ie,y:Ie,z:Ie,rotate:Ie,rotateX:Ie,rotateY:Ie,rotateZ:Ie,scaleX:Et,scaleY:Et,scale:Et,opacity:gn,backgroundColor:gn,color:gn,default:Et},Sf=function(e,t){var n;return at(t)?n=yf:n=ci[e]||ci.default,A({to:t},n(t))},wf=A(A({},ko),{color:J,backgroundColor:J,outlineColor:J,fill:J,stroke:J,borderColor:J,borderTopColor:J,borderRightColor:J,borderBottomColor:J,borderLeftColor:J,filter:Dn,WebkitFilter:Dn}),mr=function(e){return wf[e]};function gr(e,t){var n,r=mr(e);return r!==Dn&&(r=Se),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function xf(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=ie(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}var di=!1;function bf(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,o=e.loop,s=ie(e,["ease","times","yoyo","flip","loop"]),a=A({},s);return n&&(a.offset=n),s.duration&&(a.duration=Ht(s.duration)),s.repeatDelay&&(a.repeatDelay=Ht(s.repeatDelay)),t&&(a.ease=gf(t)?t.map(li):li(t)),s.type==="tween"&&(a.type="keyframes"),(r||o||i)&&(ct(!di,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),di=!0,r?a.repeatType="reverse":o?a.repeatType="loop":i&&(a.repeatType="mirror"),a.repeat=o||r||i||s.repeat),s.type!=="spring"&&(a.type="keyframes"),a}function Tf(e,t){var n,r,i=yr(e,t)||{};return(r=(n=i.delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ef(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=re([],U(e.to),!1),e.to[0]=e.from),e}function Pf(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),Ef(t),xf(e)||(e=A(A({},e),Sf(n,t.to))),A(A({},t),bf(e))}function Cf(e,t,n,r,i){var o,s=yr(r,e),a=(o=s.from)!==null&&o!==void 0?o:t.get(),l=ui(e,n);a==="none"&&l&&typeof n=="string"?a=gr(e,n):fi(a)&&typeof n=="string"?a=pi(n):!Array.isArray(n)&&fi(n)&&typeof a=="string"&&(n=pi(a));var u=ui(e,a);ct(u===l,"You are trying to animate ".concat(e,' from "').concat(a,'" to "').concat(n,'". ').concat(a," is not an animatable value - to enable this animation set ").concat(a," to a value animatable to ").concat(n," via the `style` property."));function c(){var f={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(v){return t.set(v)}};return s.type==="inertia"||s.type==="decay"?Xd(A(A({},f),s)):hr(A(A({},Pf(s,f,e)),{onUpdate:function(v){var p;f.onUpdate(v),(p=s.onUpdate)===null||p===void 0||p.call(s,v)},onComplete:function(){var v;f.onComplete(),(v=s.onComplete)===null||v===void 0||v.call(s)}}))}function d(){var f,v,p=Ko(n);return t.set(p),i(),(f=s==null?void 0:s.onUpdate)===null||f===void 0||f.call(s,p),(v=s==null?void 0:s.onComplete)===null||v===void 0||v.call(s),{stop:function(){}}}return!u||!l||s.type===!1?d:c}function fi(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function pi(e){return typeof e=="number"?0:gr("",e)}function yr(e,t){return e[t]||e.default||e}function Sr(e,t,n,r){return r===void 0&&(r={}),t.start(function(i){var o,s,a=Cf(e,t,n,r,i),l=Tf(r,e),u=function(){return s=a()};return l?o=window.setTimeout(u,Ht(l)):u(),function(){clearTimeout(o),s==null||s.stop()}})}var _f=function(e){return/^\-?\d*\.?\d+$/.test(e)},Mf=function(e){return/^0[^.\s]+$/.test(e)};function wr(e,t){e.indexOf(t)===-1&&e.push(t)}function xr(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var et=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return wr(this.subscriptions,t),function(){return xr(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var o=0;o<i;o++){var s=this.subscriptions[o];s&&s(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Af=function(e){return!isNaN(parseFloat(e))},If=function(){function e(t){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new et,this.velocityUpdateSubscribers=new et,this.renderSubscribers=new et,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var o=Gt(),s=o.delta,a=o.timestamp;n.lastUpdated!==a&&(n.timeDelta=s,n.lastUpdated=a,le.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return le.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Af(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Ss(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Re(e){return new If(e)}var Ms=function(e){return function(t){return t.test(e)}},Vf={test:function(e){return e==="auto"},parse:function(e){return e}},As=[Ne,j,pe,Te,Sc,yc,Vf],qe=function(e){return As.find(Ms(e))},Lf=re(re([],U(As),!1),[J,Se],!1),Of=function(e){return Lf.find(Ms(e))};function Rf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Re(n))}function br(e,t){var n=Yt(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=i===void 0?{}:i;r.transition;var s=ie(r,["transitionEnd","transition"]);s=A(A({},s),o);for(var a in s){var l=Ko(s[a]);Rf(e,a,l)}}function $n(e,t){var n=re([],U(t),!1).reverse();n.forEach(function(r){var i,o=e.getVariant(r);o&&br(e,o),(i=e.variantChildren)===null||i===void 0||i.forEach(function(s){$n(s,t)})})}function Df(e,t){if(Array.isArray(t))return $n(e,t);if(typeof t=="string")return $n(e,[t]);br(e,t)}function jf(e,t,n){var r,i,o,s,a=Object.keys(t).filter(function(v){return!e.hasValue(v)}),l=a.length;if(l)for(var u=0;u<l;u++){var c=a[u],d=t[c],f=null;Array.isArray(d)&&(f=d[0]),f===null&&(f=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),f!=null&&(typeof f=="string"&&(_f(f)||Mf(f))?f=parseFloat(f):!Of(f)&&Se.test(d)&&(f=gr(c,d)),e.addValue(c,Re(f)),(o=(s=n)[c])!==null&&o!==void 0||(s[c]=f),e.setBaseTarget(c,f))}}function Nf(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function Bf(e,t,n){var r,i,o={};for(var s in e)o[s]=(r=Nf(s,t))!==null&&r!==void 0?r:(i=n.getValue(s))===null||i===void 0?void 0:i.get();return o}function Is(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart(t);var r;if(Array.isArray(t)){var i=t.map(function(s){return Hn(e,s,n)});r=Promise.all(i)}else if(typeof t=="string")r=Hn(e,t,n);else{var o=typeof t=="function"?Yt(e,t,n.custom):t;r=Vs(e,o,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function Hn(e,t,n){var r;n===void 0&&(n={});var i=Yt(e,t,n.custom),o=(i||{}).transition,s=o===void 0?e.getDefaultTransition()||{}:o;n.transitionOverride&&(s=n.transitionOverride);var a=i?function(){return Vs(e,i,n)}:function(){return Promise.resolve()},l=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(v){v===void 0&&(v=0);var p=s.delayChildren,h=p===void 0?0:p,g=s.staggerChildren,m=s.staggerDirection;return Ff(e,t,h+v,g,m,n)}:function(){return Promise.resolve()},u=s.when;if(u){var c=U(u==="beforeChildren"?[a,l]:[l,a],2),d=c[0],f=c[1];return d().then(f)}else return Promise.all([a(),l(n.delay)])}function Vs(e,t,n){var r,i=n===void 0?{}:n,o=i.delay,s=o===void 0?0:o,a=i.transitionOverride,l=i.type,u=e.makeTargetAnimatable(t),c=u.transition,d=c===void 0?e.getDefaultTransition():c,f=u.transitionEnd,v=ie(u,["transition","transitionEnd"]);a&&(d=a);var p=[],h=l&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[l]);for(var g in v){var m=e.getValue(g),S=v[g];if(!(!m||S===void 0||h&&Gf(h,g))){var w=A({delay:s},d);e.shouldReduceMotion&&ft(g)&&(w=A(A({},w),{type:!1,delay:0}));var b=Sr(g,m,S,w);p.push(b)}}return Promise.all(p).then(function(){f&&br(e,f)})}function Ff(e,t,n,r,i,o){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var s=[],a=(e.variantChildren.size-1)*r,l=i===1?function(u){return u===void 0&&(u=0),u*r}:function(u){return u===void 0&&(u=0),a-u*r};return Array.from(e.variantChildren).sort(kf).forEach(function(u,c){s.push(Hn(u,t,A(A({},o),{delay:n+l(c)})).then(function(){return u.notifyAnimationComplete(t)}))}),Promise.all(s)}function zf(e){e.forEachValue(function(t){return t.stop()})}function kf(e,t){return e.sortNodePosition(t)}function Gf(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,i}var Tr=[H.Animate,H.InView,H.Focus,H.Hover,H.Tap,H.Drag,H.Exit],$f=re([],U(Tr),!1).reverse(),Hf=Tr.length;function Wf(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,i=n.options;return Is(e,r,i)}))}}function Uf(e){var t=Wf(e),n=Yf(),r={},i=!0,o=function(c,d){var f=Yt(e,d);if(f){f.transition;var v=f.transitionEnd,p=ie(f,["transition","transitionEnd"]);c=A(A(A({},c),p),v)}return c};function s(c){return r[c]!==void 0}function a(c){t=c(e)}function l(c,d){for(var f,v=e.getProps(),p=e.getVariantContext(!0)||{},h=[],g=new Set,m={},S=1/0,w=function(P){var _=$f[P],E=n[_],C=(f=v[_])!==null&&f!==void 0?f:p[_],I=ae(C),V=_===d?E.isActive:null;V===!1&&(S=P);var O=C===p[_]&&C!==v[_]&&I;if(O&&i&&e.manuallyAnimateOnMount&&(O=!1),E.protectedKeys=A({},m),!E.isActive&&V===null||!C&&!E.prevProp||sr(C)||typeof C=="boolean")return"continue";var N=qf(E.prevProp,C),F=N||_===d&&E.isActive&&!O&&I||P>S&&I,D=Array.isArray(C)?C:[C],k=D.reduce(o,{});V===!1&&(k={});var $=E.prevResolvedValues,z=$===void 0?{}:$,Y=A(A({},z),k),oe=function(R){F=!0,g.delete(R),E.needsAnimating[R]=!0};for(var X in Y){var G=k[X],L=z[X];m.hasOwnProperty(X)||(G!==L?at(G)&&at(L)?!_s(G,L)||N?oe(X):E.protectedKeys[X]=!0:G!==void 0?oe(X):g.add(X):G!==void 0&&g.has(X)?oe(X):E.protectedKeys[X]=!0)}E.prevProp=C,E.prevResolvedValues=k,E.isActive&&(m=A(A({},m),k)),i&&e.blockInitialAnimation&&(F=!1),F&&!O&&h.push.apply(h,re([],U(D.map(function(R){return{animation:R,options:A({type:_},c)}})),!1))},b=0;b<Hf;b++)w(b);if(r=A({},m),g.size){var x={};g.forEach(function(P){var _=e.getBaseTarget(P);_!==void 0&&(x[P]=_)}),h.push({animation:x})}var M=!!h.length;return i&&v.initial===!1&&!e.manuallyAnimateOnMount&&(M=!1),i=!1,M?t(h):Promise.resolve()}function u(c,d,f){var v;if(n[c].isActive===d)return Promise.resolve();(v=e.variantChildren)===null||v===void 0||v.forEach(function(g){var m;return(m=g.animationState)===null||m===void 0?void 0:m.setActive(c,d)}),n[c].isActive=d;var p=l(f,c);for(var h in n)n[h].protectedKeys={};return p}return{isAnimated:s,animateChanges:l,setActive:u,setAnimateFunction:a,getState:function(){return n}}}function qf(e,t){return typeof t=="string"?t!==e:Co(t)?!_s(t,e):!1}function Ve(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yf(){var e;return e={},e[H.Animate]=Ve(!0),e[H.InView]=Ve(),e[H.Hover]=Ve(),e[H.Tap]=Ve(),e[H.Drag]=Ve(),e[H.Focus]=Ve(),e[H.Exit]=Ve(),e}var Xf={animation:Ae(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=Uf(t)),sr(n)&&y.useEffect(function(){return n.subscribe(t)},[n])}),exit:Ae(function(e){var t=e.custom,n=e.visualElement,r=U(Cs(),2),i=r[0],o=r[1],s=y.useContext(qt);y.useEffect(function(){var a,l;n.isPresent=i;var u=(a=n.animationState)===null||a===void 0?void 0:a.setActive(H.Exit,!i,{custom:(l=s==null?void 0:s.custom)!==null&&l!==void 0?l:t});!i&&(u==null||u.then(o))},[i])})},Ls=function(){function e(t,n,r){var i=this,o=r===void 0?{}:r,s=o.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var f=Sn(i.lastMoveEventInfo,i.history),v=i.startEvent!==null,p=ws(f.offset,{x:0,y:0})>=3;if(!(!v&&!p)){var h=f.point,g=Gt().timestamp;i.history.push(A(A({},h),{timestamp:g}));var m=i.handlers,S=m.onStart,w=m.onMove;v||(S&&S(i.lastMoveEvent,f),i.startEvent=i.lastMoveEvent),w&&w(i.lastMoveEvent,f)}}},this.handlePointerMove=function(f,v){if(i.lastMoveEvent=f,i.lastMoveEventInfo=yn(v,i.transformPagePoint),Jo(f)&&f.buttons===0){i.handlePointerUp(f,v);return}le.update(i.updatePoint,!0)},this.handlePointerUp=function(f,v){i.end();var p=i.handlers,h=p.onEnd,g=p.onSessionEnd,m=Sn(yn(v,i.transformPagePoint),i.history);i.startEvent&&h&&h(f,m),g&&g(f,m)},!(Qo(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var a=ar(t),l=yn(a,this.transformPagePoint),u=l.point,c=Gt().timestamp;this.history=[A(A({},u),{timestamp:c})];var d=n.onSessionStart;d&&d(t,Sn(l,this.history)),this.removeListeners=Zt($e(window,"pointermove",this.handlePointerMove),$e(window,"pointerup",this.handlePointerUp),$e(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),We.update(this.updatePoint)},e}();function yn(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 Sn(e,t){var n=e.point;return{point:n,delta:vi(n,Os(t)),offset:vi(n,Kf(t)),velocity:Zf(t,.1)}}function Kf(e){return e[0]}function Os(e){return e[e.length-1]}function Zf(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=Os(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ht(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};var s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function we(e){return e.max-e.min}function hi(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),ws(e,t)<n}function mi(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=we(n)/we(t),(hi(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(hi(e.translate)||isNaN(e.translate))&&(e.translate=0)}function tt(e,t,n,r){mi(e.x,t.x,n.x,r==null?void 0:r.originX),mi(e.y,t.y,n.y,r==null?void 0:r.originY)}function gi(e,t,n){e.min=n.min+t.min,e.max=e.min+we(t)}function Jf(e,t,n){gi(e.x,t.x,n.x),gi(e.y,t.y,n.y)}function yi(e,t,n){e.min=t.min-n.min,e.max=e.min+we(t)}function nt(e,t,n){yi(e.x,t.x,n.x),yi(e.y,t.y,n.y)}function Qf(e,t,n){var r=t.min,i=t.max;return r!==void 0&&e<r?e=n?q(r,e,n.min):Math.max(e,r):i!==void 0&&e>i&&(e=n?q(i,e,n.max):Math.min(e,i)),e}function Si(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ep(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:Si(e.x,r,o),y:Si(e.y,n,i)}}function wi(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=U([i,r],2),r=n[0],i=n[1]),{min:r,max:i}}function tp(e,t){return{x:wi(e.x,t.x),y:wi(e.y,t.y)}}function np(e,t){var n=.5,r=we(e),i=we(t);return i>r?n=lt(t.min,t.max-r,e.min):r>i&&(n=lt(e.min,e.max-i,t.min)),zt(0,1,n)}function rp(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Wn=.35;function ip(e){return e===void 0&&(e=Wn),e===!1?e=0:e===!0&&(e=Wn),{x:xi(e,"left","right"),y:xi(e,"top","bottom")}}function xi(e,t,n){return{min:bi(e,t),max:bi(e,n)}}function bi(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var Ti=function(){return{translate:0,scale:1,origin:0,originPoint:0}},rt=function(){return{x:Ti(),y:Ti()}},Ei=function(){return{min:0,max:0}},K=function(){return{x:Ei(),y:Ei()}};function de(e){return[e("x"),e("y")]}function Rs(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function op(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function sp(e,t){if(!t)return e;var 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}}function wn(e){return e===void 0||e===1}function Ds(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!wn(t)||!wn(n)||!wn(r)}function Ee(e){return Ds(e)||Pi(e.x)||Pi(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function Pi(e){return e&&e!=="0%"}function Wt(e,t,n){var r=e-n,i=t*r;return n+i}function Ci(e,t,n,r,i){return i!==void 0&&(e=Wt(e,i,r)),Wt(e,n,r)+t}function Un(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=Ci(e.min,t,n,r,i),e.max=Ci(e.max,t,n,r,i)}function js(e,t){var n=t.x,r=t.y;Un(e.x,n.translate,n.scale,n.originPoint),Un(e.y,r.translate,r.scale,r.originPoint)}function ap(e,t,n,r){var i,o;r===void 0&&(r=!1);var s=n.length;if(s){t.x=t.y=1;for(var a,l,u=0;u<s;u++)a=n[u],l=a.projectionDelta,((o=(i=a.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ze(e,{x:-a.scroll.x,y:-a.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,js(e,l)),r&&Ee(a.latestValues)&&ze(e,a.latestValues))}}function Pe(e,t){e.min=e.min+t,e.max=e.max+t}function _i(e,t,n){var r=U(n,3),i=r[0],o=r[1],s=r[2],a=t[s]!==void 0?t[s]:.5,l=q(e.min,e.max,a);Un(e,t[i],t[o],l,t.scale)}var lp=["x","scaleX","originX"],up=["y","scaleY","originY"];function ze(e,t){_i(e.x,t,lp),_i(e.y,t,up)}function Ns(e,t){return Rs(sp(e.getBoundingClientRect(),t))}function cp(e,t,n){var r=Ns(e,n),i=t.scroll;return i&&(Pe(r.x,i.x),Pe(r.y,i.y)),r}var dp=new WeakMap,fp=function(){function e(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=K(),this.visualElement=t}return e.prototype.start=function(t,n){var r=this,i=n===void 0?{}:n,o=i.snapToCursor,s=o===void 0?!1:o;if(this.visualElement.isPresent!==!1){var a=function(d){r.stopAnimation(),s&&r.snapToCursor(ar(d,"page").point)},l=function(d,f){var v,p=r.getProps(),h=p.drag,g=p.dragPropagation,m=p.onDragStart;h&&!g&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=rs(h),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),de(function(S){var w,b,x=r.getAxisMotionValue(S).get()||0;if(pe.test(x)){var M=(b=(w=r.visualElement.projection)===null||w===void 0?void 0:w.layout)===null||b===void 0?void 0:b.actual[S];if(M){var P=we(M);x=P*(parseFloat(x)/100)}}r.originPoint[S]=x}),m==null||m(d,f),(v=r.visualElement.animationState)===null||v===void 0||v.setActive(H.Drag,!0))},u=function(d,f){var v=r.getProps(),p=v.dragPropagation,h=v.dragDirectionLock,g=v.onDirectionLock,m=v.onDrag;if(!(!p&&!r.openGlobalLock)){var S=f.offset;if(h&&r.currentDirection===null){r.currentDirection=pp(S),r.currentDirection!==null&&(g==null||g(r.currentDirection));return}r.updateAxis("x",f.point,S),r.updateAxis("y",f.point,S),r.visualElement.syncRender(),m==null||m(d,f)}},c=function(d,f){return r.stop(d,f)};this.panSession=new Ls(t,{onSessionStart:a,onStart:l,onMove:u,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(t,n){var r=this.isDragging;if(this.cancel(),!!r){var i=n.velocity;this.startAnimation(i);var o=this.getProps().onDragEnd;o==null||o(t,n)}},e.prototype.cancel=function(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(H.Drag,!1)},e.prototype.updateAxis=function(t,n,r){var i=this.getProps().drag;if(!(!r||!Pt(t,i,this.currentDirection))){var o=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=Qf(s,this.constraints[t],this.elastic[t])),o.set(s)}},e.prototype.resolveConstraints=function(){var t=this,n=this.getProps(),r=n.dragConstraints,i=n.dragElastic,o=(this.visualElement.projection||{}).layout,s=this.constraints;r&&Fe(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=ep(o.actual,r):this.constraints=!1,this.elastic=ip(i),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&de(function(a){t.getAxisMotionValue(a)&&(t.constraints[a]=rp(o.actual[a],t.constraints[a]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),n=t.dragConstraints,r=t.onMeasureDragConstraints;if(!n||!Fe(n))return!1;var i=n.current;ne(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var s=cp(i,o.root,this.visualElement.getTransformPagePoint()),a=tp(o.layout.actual,s);if(r){var l=r(op(a));this.hasMutatedConstraints=!!l,l&&(a=Rs(l))}return a},e.prototype.startAnimation=function(t){var n=this,r=this.getProps(),i=r.drag,o=r.dragMomentum,s=r.dragElastic,a=r.dragTransition,l=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},d=de(function(f){var v;if(Pt(f,i,n.currentDirection)){var p=(v=c==null?void 0:c[f])!==null&&v!==void 0?v:{};l&&(p={min:0,max:0});var h=s?200:1e6,g=s?40:1e7,m=A(A({type:"inertia",velocity:o?t[f]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10},a),p);return n.startAxisValueAnimation(f,m)}});return Promise.all(d).then(u)},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);return Sr(t,r,0,n)},e.prototype.stopAnimation=function(){var t=this;de(function(n){return t.getAxisMotionValue(n).stop()})},e.prototype.getAxisMotionValue=function(t){var n,r,i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)},e.prototype.snapToCursor=function(t){var n=this;de(function(r){var i=n.getProps().drag;if(Pt(r,i,n.currentDirection)){var o=n.visualElement.projection,s=n.getAxisMotionValue(r);if(o&&o.layout){var a=o.layout.actual[r],l=a.min,u=a.max;s.set(t[r]-q(l,u,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var t=this,n,r=this.getProps(),i=r.drag,o=r.dragConstraints,s=this.visualElement.projection;if(!(!Fe(o)||!s||!this.constraints)){this.stopAnimation();var a={x:0,y:0};de(function(u){var c=t.getAxisMotionValue(u);if(c){var d=c.get();a[u]=np({min:d,max:d},t.constraints[u])}});var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",(n=s.root)===null||n===void 0||n.updateScroll(),s.updateLayout(),this.resolveConstraints(),de(function(u){if(Pt(u,i,null)){var c=t.getAxisMotionValue(u),d=t.constraints[u],f=d.min,v=d.max;c.set(q(f,v,a[u]))}})}},e.prototype.addListeners=function(){var t=this,n;dp.set(this.visualElement,this);var r=this.visualElement.getInstance(),i=$e(r,"pointerdown",function(u){var c=t.getProps(),d=c.drag,f=c.dragListener,v=f===void 0?!0:f;d&&v&&t.start(u)}),o=function(){var u=t.getProps().dragConstraints;Fe(u)&&(t.constraints=t.resolveRefConstraints())},s=this.visualElement.projection,a=s.addEventListener("measure",o);s&&!s.layout&&((n=s.root)===null||n===void 0||n.updateScroll(),s.updateLayout()),o();var l=Kt(window,"resize",function(){return t.scalePositionWithinConstraints()});return s.addEventListener("didUpdate",function(u){var c=u.delta,d=u.hasLayoutChanged;t.isDragging&&d&&(de(function(f){var v=t.getAxisMotionValue(f);v&&(t.originPoint[f]+=c[f].translate,v.set(v.get()+c[f].translate))}),t.visualElement.syncRender())}),function(){l(),i(),a()}},e.prototype.getProps=function(){var t=this.visualElement.getProps(),n=t.drag,r=n===void 0?!1:n,i=t.dragDirectionLock,o=i===void 0?!1:i,s=t.dragPropagation,a=s===void 0?!1:s,l=t.dragConstraints,u=l===void 0?!1:l,c=t.dragElastic,d=c===void 0?Wn:c,f=t.dragMomentum,v=f===void 0?!0:f;return A(A({},t),{drag:r,dragDirectionLock:o,dragPropagation:a,dragConstraints:u,dragElastic:d,dragMomentum:v})},e}();function Pt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pp(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function vp(e){var t=e.dragControls,n=e.visualElement,r=je(function(){return new fp(n)});y.useEffect(function(){return t&&t.subscribe(r)},[r,t]),y.useEffect(function(){return r.addListeners()},[r])}function hp(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,s=t||n||r||i,a=y.useRef(null),l=y.useContext(dt).transformPagePoint,u={onSessionStart:i,onStart:n,onMove:t,onEnd:function(d,f){a.current=null,r&&r(d,f)}};y.useEffect(function(){a.current!==null&&a.current.updateHandlers(u)});function c(d){a.current=new Ls(d,u,{transformPagePoint:l})}Ft(o,"pointerdown",s&&c),ss(function(){return a.current&&a.current.end()})}var mp={pan:Ae(hp),drag:Ae(vp)},Ct=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function gp(){var e=Ct.map(function(){return new et}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){Ct.forEach(function(i){var o,s="on"+i,a=r[s];(o=t[i])===null||o===void 0||o.call(t),a&&(t[i]=n[s](a))})}};return e.forEach(function(r,i){n["on"+Ct[i]]=function(o){return r.add(o)},n["notify"+Ct[i]]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return r.notify.apply(r,re([],U(o),!1))}}),n}function yp(e,t,n){var r;for(var i in t){var o=t[i],s=n[i];if(ue(o))e.addValue(i,o),process.env.NODE_ENV==="development"&&Ps(o.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(o.version," with 6.5.1 may not work as expected."));else if(ue(s))e.addValue(i,Re(o));else if(s!==o)if(e.hasValue(i)){var a=e.getValue(i);!a.hasAnimated&&a.set(o)}else e.addValue(i,Re((r=e.getStaticValue(i))!==null&&r!==void 0?r:o))}for(var i in n)t[i]===void 0&&e.removeValue(i);return t}var Bs=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,s=e.measureViewportBox,a=e.render,l=e.readValueFromInstance,u=e.removeValueFromRenderState,c=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(f,v){var p=f.parent,h=f.props,g=f.presenceId,m=f.blockInitialAnimation,S=f.visualState,w=f.shouldReduceMotion;v===void 0&&(v={});var b=!1,x=S.latestValues,M=S.renderState,P,_=gp(),E=new Map,C=new Map,I={},V=A({},x),O;function N(){!P||!b||(F(),a(P,M,h.style,G.projection))}function F(){r(G,M,x,v,h)}function D(){_.notifyUpdate(x)}function k(L,R){var B=R.onChange(function(ce){x[L]=ce,h.onUpdate&&le.update(D,!1,!0)}),Z=R.onRenderRequest(G.scheduleRender);C.set(L,function(){B(),Z()})}var $=d(h);for(var z in $){var Y=$[z];x[z]!==void 0&&ue(Y)&&Y.set(x[z],!1)}var oe=Xt(h),X=Mo(h),G=A(A({treeType:n,current:null,depth:p?p.depth+1:0,parent:p,children:new Set,presenceId:g,shouldReduceMotion:w,variantChildren:X?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(p!=null&&p.isMounted()),blockInitialAnimation:m,isMounted:function(){return!!P},mount:function(L){b=!0,P=G.current=L,G.projection&&G.projection.mount(L),X&&p&&!oe&&(O=p==null?void 0:p.addVariantChild(G)),E.forEach(function(R,B){return k(B,R)}),p==null||p.children.add(G),G.setProps(h)},unmount:function(){var L;(L=G.projection)===null||L===void 0||L.unmount(),We.update(D),We.render(N),C.forEach(function(R){return R()}),O==null||O(),p==null||p.children.delete(G),_.clearAllListeners(),P=void 0,b=!1},addVariantChild:function(L){var R,B=G.getClosestVariantNode();if(B)return(R=B.variantChildren)===null||R===void 0||R.add(L),function(){return B.variantChildren.delete(L)}},sortNodePosition:function(L){return!c||n!==L.treeType?0:c(G.getInstance(),L.getInstance())},getClosestVariantNode:function(){return X?G:p==null?void 0:p.getClosestVariantNode()},getLayoutId:function(){return h.layoutId},getInstance:function(){return P},getStaticValue:function(L){return x[L]},setStaticValue:function(L,R){return x[L]=R},getLatestValues:function(){return x},setVisibility:function(L){G.isVisible!==L&&(G.isVisible=L,G.scheduleRender())},makeTargetAnimatable:function(L,R){return R===void 0&&(R=!0),o(G,L,h,R)},measureViewportBox:function(){return s(P,h)},addValue:function(L,R){G.hasValue(L)&&G.removeValue(L),E.set(L,R),x[L]=R.get(),k(L,R)},removeValue:function(L){var R;E.delete(L),(R=C.get(L))===null||R===void 0||R(),C.delete(L),delete x[L],u(L,M)},hasValue:function(L){return E.has(L)},getValue:function(L,R){var B=E.get(L);return B===void 0&&R!==void 0&&(B=Re(R),G.addValue(L,B)),B},forEachValue:function(L){return E.forEach(L)},readValue:function(L){var R;return(R=x[L])!==null&&R!==void 0?R:l(P,L,v)},setBaseTarget:function(L,R){V[L]=R},getBaseTarget:function(L){if(i){var R=i(h,L);if(R!==void 0&&!ue(R))return R}return V[L]}},_),{build:function(){return F(),M},scheduleRender:function(){le.render(N,!1,!0)},syncRender:N,setProps:function(L){(L.transformTemplate||h.transformTemplate)&&G.scheduleRender(),h=L,_.updatePropListeners(L),I=yp(G,d(h),I)},getProps:function(){return h},getVariant:function(L){var R;return(R=h.variants)===null||R===void 0?void 0:R[L]},getDefaultTransition:function(){return h.transition},getTransformPagePoint:function(){return h.transformPagePoint},getVariantContext:function(L){if(L===void 0&&(L=!1),L)return p==null?void 0:p.getVariantContext();if(!oe){var R=(p==null?void 0:p.getVariantContext())||{};return h.initial!==void 0&&(R.initial=h.initial),R}for(var B={},Z=0;Z<Sp;Z++){var ce=Fs[Z],he=h[ce];(ae(he)||he===!1)&&(B[ce]=he)}return B}});return G}},Fs=re(["initial"],U(Tr),!1),Sp=Fs.length;function qn(e){return typeof e=="string"&&e.startsWith("var(--")}var zs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wp(e){var t=zs.exec(e);if(!t)return[,];var n=U(t,3),r=n[1],i=n[2];return[r,i]}var xp=4;function Yn(e,t,n){n===void 0&&(n=1),ne(n<=xp,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=U(wp(e),2),i=r[0],o=r[1];if(i){var s=window.getComputedStyle(t).getPropertyValue(i);return s?s.trim():qn(o)?Yn(o,t,n+1):o}}function bp(e,t,n){var r,i=ie(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};n&&(n=A({},n)),e.forEachValue(function(u){var c=u.get();if(qn(c)){var d=Yn(c,o);d&&u.set(d)}});for(var s in i){var a=i[s];if(qn(a)){var l=Yn(a,o);l&&(i[s]=l,n&&((r=n[s])!==null&&r!==void 0||(n[s]=a)))}}return{target:i,transitionEnd:n}}var Tp=new Set(["width","height","top","left","right","bottom","x","y"]),ks=function(e){return Tp.has(e)},Ep=function(e){return Object.keys(e).some(ks)},Gs=function(e,t){e.set(t,!1),e.set(t)},_t=function(e){return e===Ne||e===j},Mi;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(Mi||(Mi={}));var Ai=function(e,t){return parseFloat(e.split(", ")[t])},Ii=function(e,t){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return Ai(o[1],t);var s=i.match(/^matrix\((.+)\)$/);return s?Ai(s[1],e):0}},Pp=new Set(["x","y","z"]),Cp=ot.filter(function(e){return!Pp.has(e)});function _p(e){var t=[];return Cp.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var Vi={width:function(e,t){var n=e.x,r=t.paddingLeft,i=r===void 0?"0":r,o=t.paddingRight,s=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(s)},height:function(e,t){var n=e.y,r=t.paddingTop,i=r===void 0?"0":r,o=t.paddingBottom,s=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(s)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Ii(4,13),y:Ii(5,14)},Mp=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),s=o.display,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(function(u){a[u]=Vi[u](r,o)}),t.syncRender();var l=t.measureViewportBox();return n.forEach(function(u){var c=t.getValue(u);Gs(c,a[u]),e[u]=Vi[u](l,o)}),e},Ap=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=A({},t),r=A({},r);var i=Object.keys(t).filter(ks),o=[],s=!1,a=[];if(i.forEach(function(c){var d=e.getValue(c);if(e.hasValue(c)){var f=n[c],v=qe(f),p=t[c],h;if(at(p)){var g=p.length,m=p[0]===null?1:0;f=p[m],v=qe(f);for(var S=m;S<g;S++)h?ne(qe(p[S])===h,"All keyframes must be of the same type"):(h=qe(p[S]),ne(h===v||_t(v)&&_t(h),"Keyframes must be of the same dimension as the current value"))}else h=qe(p);if(v!==h)if(_t(v)&&_t(h)){var w=d.get();typeof w=="string"&&d.set(parseFloat(w)),typeof p=="string"?t[c]=parseFloat(p):Array.isArray(p)&&h===j&&(t[c]=p.map(parseFloat))}else v!=null&&v.transform&&(h!=null&&h.transform)&&(f===0||p===0)?f===0?d.set(h.transform(f)):t[c]=v.transform(p):(s||(o=_p(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],Gs(d,p))}}),a.length){var l=a.indexOf("height")>=0?window.pageYOffset:null,u=Mp(t,e,a);return o.length&&o.forEach(function(c){var d=U(c,2),f=d[0],v=d[1];e.getValue(f).set(v)}),e.syncRender(),l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Ip(e,t,n,r){return Ep(t)?Ap(e,t,n,r):{target:t,transitionEnd:r}}var Vp=function(e,t,n,r){var i=bp(e,t,r);return t=i.target,r=i.transitionEnd,Ip(e,t,n,r)};function Lp(e){return window.getComputedStyle(e)}var $s={treeType:"dom",readValueFromInstance:function(e,t){if(ft(t)){var n=mr(t);return n&&n.default||0}else{var r=Lp(e);return(Oo(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return Ns(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var o=t.transition,s=t.transitionEnd,a=ie(t,["transition","transitionEnd"]),l=Bf(a,o||{},e);if(i&&(s&&(s=i(s)),a&&(a=i(a)),l&&(l=i(l))),r){jf(e,a,l);var u=Vp(e,a,l,s);s=u.transitionEnd,a=u.target}return A({transition:o,transitionEnd:s},a)},scrapeMotionValuesFromProps:or,build:function(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),nr(t,n,r,i.transformTemplate)},render:Uo},Op=Bs($s),Rp=Bs(A(A({},$s),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return ft(t)?((n=mr(t))===null||n===void 0?void 0:n.default)||0:(t=qo.has(t)?t:Wo(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Xo,build:function(e,t,n,r,i){ir(t,n,r,i.transformTemplate)},render:Yo})),Dp=function(e,t){return er(e)?Rp(t,{enableHardwareAcceleration:!1}):Op(t,{enableHardwareAcceleration:!0})};function Li(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ye={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(j.test(e))e=parseFloat(e);else return e;var n=Li(e,t.target.x),r=Li(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Oi="_$css",jp={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),s=[];o&&(e=e.replace(zs,function(h){return s.push(h),Oi}));var a=Se.parse(e);if(a.length>5)return i;var l=Se.createTransformer(e),u=typeof a[0]!="number"?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;a[0+u]/=c,a[1+u]/=d;var f=q(c,d,.5);typeof a[2+u]=="number"&&(a[2+u]/=f),typeof a[3+u]=="number"&&(a[3+u]/=f);var v=l(a);if(o){var p=0;v=v.replace(Oi,function(){var h=s[p];return p++,h})}return v}},Np=function(e){xo(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.visualElement,o=r.layoutGroup,s=r.switchLayoutGroup,a=r.layoutId,l=i.projection;lc(Fp),l&&(o!=null&&o.group&&o.group.add(l),s!=null&&s.register&&a&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){n.safeToRemove()}),l.setOptions(A(A({},l.options),{onExitComplete:function(){return n.safeToRemove()}}))),Ze.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(n){var r=this,i=this.props,o=i.layoutDependency,s=i.visualElement,a=i.drag,l=i.isPresent,u=s.projection;return u&&(u.isPresent=l,a||n.layoutDependency!==o||o===void 0?u.willUpdate():this.safeToRemove(),n.isPresent!==l&&(l?u.promote():u.relegate()||le.postRender(function(){var c;!((c=u.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,s=r.projection;s&&(s.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(s),o!=null&&o.deregister&&o.deregister(s))},t.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},t.prototype.render=function(){return null},t}(y.Component);function Bp(e){var t=U(Cs(),2),n=t[0],r=t[1],i=y.useContext(Ao);return y.createElement(Np,A({},e,{layoutGroup:i,switchLayoutGroup:y.useContext(Io),isPresent:n,safeToRemove:r}))}var Fp={borderRadius:A(A({},Ye),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ye,borderTopRightRadius:Ye,borderBottomLeftRadius:Ye,borderBottomRightRadius:Ye,boxShadow:jp},zp={measureLayout:Bp};function kp(e,t,n){n===void 0&&(n={});var r=ue(e)?e:Re(e);return Sr("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Hs=["TopLeft","TopRight","BottomLeft","BottomRight"],Gp=Hs.length,Ri=function(e){return typeof e=="string"?parseFloat(e):e},Di=function(e){return typeof e=="number"||j.test(e)};function $p(e,t,n,r,i,o){var s,a,l,u;i?(e.opacity=q(0,(s=n.opacity)!==null&&s!==void 0?s:1,Hp(r)),e.opacityExit=q((a=t.opacity)!==null&&a!==void 0?a:1,0,Wp(r))):o&&(e.opacity=q((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(var c=0;c<Gp;c++){var d="border".concat(Hs[c],"Radius"),f=ji(t,d),v=ji(n,d);if(!(f===void 0&&v===void 0)){f||(f=0),v||(v=0);var p=f===0||v===0||Di(f)===Di(v);p?(e[d]=Math.max(q(Ri(f),Ri(v),r),0),(pe.test(v)||pe.test(f))&&(e[d]+="%")):e[d]=v}}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function ji(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}var Hp=Ws(0,.5,pr),Wp=Ws(.5,.95,dr);function Ws(e,t,n){return function(r){return r<e?0:r>t?1:n(lt(e,t,r))}}function Ni(e,t){e.min=t.min,e.max=t.max}function se(e,t){Ni(e.x,t.x),Ni(e.y,t.y)}function Bi(e,t,n,r,i){return e-=t,e=Wt(e,1/n,r),i!==void 0&&(e=Wt(e,1/i,r)),e}function Up(e,t,n,r,i,o,s){if(t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5),o===void 0&&(o=e),s===void 0&&(s=e),pe.test(t)){t=parseFloat(t);var a=q(s.min,s.max,t/100);t=a-s.min}if(typeof t=="number"){var l=q(o.min,o.max,r);e===o&&(l-=t),e.min=Bi(e.min,t,n,l,i),e.max=Bi(e.max,t,n,l,i)}}function Fi(e,t,n,r,i){var o=U(n,3),s=o[0],a=o[1],l=o[2];Up(e,t[s],t[a],t[l],t.scale,r,i)}var qp=["x","scaleX","originX"],Yp=["y","scaleY","originY"];function zi(e,t,n,r){Fi(e.x,t,qp,n==null?void 0:n.x,r==null?void 0:r.x),Fi(e.y,t,Yp,n==null?void 0:n.y,r==null?void 0:r.y)}function ki(e){return e.translate===0&&e.scale===1}function Us(e){return ki(e.x)&&ki(e.y)}function qs(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Xp=function(){function e(){this.members=[]}return e.prototype.add=function(t){wr(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(xr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},e.prototype.relegate=function(t){var n=this.members.findIndex(function(s){return t===s});if(n===0)return!1;for(var r,i=n;i>=0;i--){var o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1},e.prototype.promote=function(t,n){var r,i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);var o=t.options.crossfade;o===!1&&i.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var n,r,i,o,s;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(s=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||s===void 0||s.call(o)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),Kp="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Gi(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var s=n.rotate,a=n.rotateX,l=n.rotateY;s&&(o+="rotate(".concat(s,"deg) ")),a&&(o+="rotateX(".concat(a,"deg) ")),l&&(o+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return o+="scale(".concat(u,", ").concat(c,")"),o===Kp?"none":o}var Zp=function(e,t){return e.depth-t.depth},Jp=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){wr(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){xr(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(Zp),this.isDirty=!1,this.children.forEach(t)},e}(),$i=1e3;function Ys(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function s(a,l,u){var c=this;l===void 0&&(l={}),u===void 0&&(u=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(iv),c.nodes.forEach(ov)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?re(re([],U(u.path),!1),[u],!1):[],this.parent=u,this.depth=u?u.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(var d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new Jp)}return s.prototype.addEventListener=function(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new et),this.eventHandlers.get(a).add(l)},s.prototype.notifyListeners=function(a){for(var l=[],u=1;u<arguments.length;u++)l[u-1]=arguments[u];var c=this.eventHandlers.get(a);c==null||c.notify.apply(c,re([],U(l),!1))},s.prototype.hasListeners=function(a){return this.eventHandlers.has(a)},s.prototype.registerPotentialNode=function(a,l){this.potentialNodes.set(a,l)},s.prototype.mount=function(a,l){var u=this,c;if(l===void 0&&(l=!1),!this.instance){this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;var d=this.options,f=d.layoutId,v=d.layout,p=d.visualElement;if(p&&!p.getInstance()&&p.mount(a),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),l&&(v||f)&&(this.isLayoutDirty=!0),t){var h,g=function(){return u.root.updateBlockedByResize=!1};t(a,function(){u.root.updateBlockedByResize=!0,clearTimeout(h),h=window.setTimeout(g,250),Ze.hasAnimatedSinceResize&&(Ze.hasAnimatedSinceResize=!1,u.nodes.forEach(rv))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&p&&(f||v)&&this.addEventListener("didUpdate",function(m){var S,w,b,x,M,P=m.delta,_=m.hasLayoutChanged,E=m.hasRelativeTargetChanged,C=m.layout;if(u.isTreeAnimationBlocked()){u.target=void 0,u.relativeTarget=void 0;return}var I=(w=(S=u.options.transition)!==null&&S!==void 0?S:p.getDefaultTransition())!==null&&w!==void 0?w:cv,V=p.getProps(),O=V.onLayoutAnimationStart,N=V.onLayoutAnimationComplete,F=!u.targetLayout||!qs(u.targetLayout,C)||E,D=!_&&E;if(!((b=u.resumeFrom)===null||b===void 0)&&b.instance||D||_&&(F||!u.currentAnimation)){u.resumeFrom&&(u.resumingFrom=u.resumeFrom,u.resumingFrom.resumingFrom=void 0),u.setAnimationOrigin(P,D);var k=A(A({},yr(I,"layout")),{onPlay:O,onComplete:N});p.shouldReduceMotion&&(k.delay=0,k.type=!1),u.startAnimation(k)}else!_&&u.animationProgress===0&&u.finishAnimation(),u.isLead()&&((M=(x=u.options).onExitComplete)===null||M===void 0||M.call(x));u.targetLayout=C})}},s.prototype.unmount=function(){var a,l;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(l=this.parent)===null||l===void 0||l.children.delete(this),this.instance=void 0,We.preRender(this.updateProjection)},s.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},s.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},s.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},s.prototype.isTreeAnimationBlocked=function(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1},s.prototype.startUpdate=function(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(sv))},s.prototype.willUpdate=function(a){var l,u,c;if(a===void 0&&(a=!0),this.root.isUpdateBlocked()){(u=(l=this.options).onExitComplete)===null||u===void 0||u.call(l);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var d=0;d<this.path.length;d++){var f=this.path[d];f.shouldResetTransform=!0,f.updateScroll()}var v=this.options,p=v.layoutId,h=v.layout;if(!(p===void 0&&!h)){var g=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=g==null?void 0:g(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}}},s.prototype.didUpdate=function(){var a=this.isUpdateBlocked();if(a){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hi);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(dv),this.potentialNodes.clear()),this.nodes.forEach(nv),this.nodes.forEach(Qp),this.nodes.forEach(ev),this.clearAllSnapshots(),hn.update(),hn.preRender(),hn.render())},s.prototype.clearAllSnapshots=function(){this.nodes.forEach(tv),this.sharedNodes.forEach(av)},s.prototype.scheduleUpdateProjection=function(){le.preRender(this.updateProjection,!1,!0)},s.prototype.scheduleCheckAfterUnmount=function(){var a=this;le.postRender(function(){a.isLayoutDirty?a.root.didUpdate():a.root.checkUpdateFailed()})},s.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var a=this.measure(),l=this.removeTransform(this.removeElementScroll(a));Yi(l),this.snapshot={measured:a,layout:l,latestValues:{}}}},s.prototype.updateLayout=function(){var a;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var l=0;l<this.path.length;l++){var u=this.path[l];u.updateScroll()}var c=this.measure();Yi(c);var d=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=K(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(a=this.options.visualElement)===null||a===void 0||a.notifyLayoutMeasure(this.layout.actual,d==null?void 0:d.actual)}},s.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=r(this.instance))},s.prototype.resetTransform=function(){var a;if(o){var l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!Us(this.projectionDelta),c=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,d=c==null?void 0:c(this.latestValues,""),f=d!==this.prevTransformTemplateValue;l&&(u||Ee(this.latestValues)||f)&&(o(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}},s.prototype.measure=function(){var a=this.options.visualElement;if(!a)return K();var l=a.measureViewportBox(),u=this.root.scroll;return u&&(Pe(l.x,u.x),Pe(l.y,u.y)),l},s.prototype.removeElementScroll=function(a){var l=K();se(l,a);for(var u=0;u<this.path.length;u++){var c=this.path[u],d=c.scroll,f=c.options,v=c.isScrollRoot;if(c!==this.root&&d&&f.layoutScroll){if(v){se(l,a);var p=this.root.scroll;p&&(Pe(l.x,-p.x),Pe(l.y,-p.y))}Pe(l.x,d.x),Pe(l.y,d.y)}}return l},s.prototype.applyTransform=function(a,l){l===void 0&&(l=!1);var u=K();se(u,a);for(var c=0;c<this.path.length;c++){var d=this.path[c];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ze(u,{x:-d.scroll.x,y:-d.scroll.y}),Ee(d.latestValues)&&ze(u,d.latestValues)}return Ee(this.latestValues)&&ze(u,this.latestValues),u},s.prototype.removeTransform=function(a){var l,u=K();se(u,a);for(var c=0;c<this.path.length;c++){var d=this.path[c];if(d.instance&&Ee(d.latestValues)){Ds(d.latestValues)&&d.updateSnapshot();var f=K(),v=d.measure();se(f,v),zi(u,d.latestValues,(l=d.snapshot)===null||l===void 0?void 0:l.layout,f)}}return Ee(this.latestValues)&&zi(u,this.latestValues),u},s.prototype.setTargetDelta=function(a){this.targetDelta=a,this.root.scheduleUpdateProjection()},s.prototype.setOptions=function(a){var l;this.options=A(A(A({},this.options),a),{crossfade:(l=a.crossfade)!==null&&l!==void 0?l:!0})},s.prototype.clearMeasurements=function(){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},s.prototype.resolveTargetDelta=function(){var a,l=this.options,u=l.layout,c=l.layoutId;!this.layout||!(u||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=K(),this.relativeTargetOrigin=K(),nt(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),se(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&(!((a=this.relativeParent)===null||a===void 0)&&a.target)?Jf(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):se(this.target,this.layout.actual),js(this.target,this.targetDelta)):se(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=K(),this.relativeTargetOrigin=K(),nt(this.relativeTargetOrigin,this.target,this.relativeParent.target),se(this.relativeTarget,this.relativeTargetOrigin)))))},s.prototype.getClosestProjectingParent=function(){if(!(!this.parent||Ee(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},s.prototype.calcProjection=function(){var a,l=this.options,u=l.layout,c=l.layoutId;if(this.isTreeAnimating=!!(!((a=this.parent)===null||a===void 0)&&a.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(u||c))){var d=this.getLead();se(this.layoutCorrected,this.layout.actual),ap(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==d);var f=d.target;if(f){this.projectionDelta||(this.projectionDelta=rt(),this.projectionDeltaWithTransform=rt());var v=this.treeScale.x,p=this.treeScale.y,h=this.projectionTransform;tt(this.projectionDelta,this.layoutCorrected,f,this.latestValues),this.projectionTransform=Gi(this.projectionDelta,this.treeScale),(this.projectionTransform!==h||this.treeScale.x!==v||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}}},s.prototype.hide=function(){this.isVisible=!1},s.prototype.show=function(){this.isVisible=!0},s.prototype.scheduleRender=function(a){var l,u,c;a===void 0&&(a=!0),(u=(l=this.options).scheduleRender)===null||u===void 0||u.call(l),a&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},s.prototype.setAnimationOrigin=function(a,l){var u=this,c;l===void 0&&(l=!1);var d=this.snapshot,f=(d==null?void 0:d.latestValues)||{},v=A({},this.latestValues),p=rt();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!l;var h=K(),g=d==null?void 0:d.isShared,m=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,S=!!(g&&!m&&this.options.crossfade===!0&&!this.path.some(uv));this.animationProgress=0,this.mixTargetDelta=function(w){var b,x=w/1e3;Wi(p.x,a.x,x),Wi(p.y,a.y,x),u.setTargetDelta(p),u.relativeTarget&&u.relativeTargetOrigin&&u.layout&&(!((b=u.relativeParent)===null||b===void 0)&&b.layout)&&(nt(h,u.layout.actual,u.relativeParent.layout.actual),lv(u.relativeTarget,u.relativeTargetOrigin,h,x)),g&&(u.animationValues=v,$p(v,f,u.latestValues,x,S,m)),u.root.scheduleUpdateProjection(),u.scheduleRender(),u.animationProgress=x},this.mixTargetDelta(0)},s.prototype.startAnimation=function(a){var l=this,u,c;this.notifyListeners("animationStart"),(u=this.currentAnimation)===null||u===void 0||u.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(We.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=le.update(function(){Ze.hasAnimatedSinceResize=!0,l.currentAnimation=kp(0,$i,A(A({},a),{onUpdate:function(d){var f;l.mixTargetDelta(d),(f=a.onUpdate)===null||f===void 0||f.call(a,d)},onComplete:function(){var d;(d=a.onComplete)===null||d===void 0||d.call(a),l.completeAnimation()}})),l.resumingFrom&&(l.resumingFrom.currentAnimation=l.currentAnimation),l.pendingAnimation=void 0})},s.prototype.completeAnimation=function(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},s.prototype.finishAnimation=function(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,$i),this.currentAnimation.stop()),this.completeAnimation()},s.prototype.applyTransformsToTarget=function(){var a=this.getLead(),l=a.targetWithTransforms,u=a.target,c=a.layout,d=a.latestValues;!l||!u||!c||(se(l,u),ze(l,d),tt(this.projectionDeltaWithTransform,this.layoutCorrected,l,d))},s.prototype.registerSharedNode=function(a,l){var u,c,d;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Xp);var f=this.sharedNodes.get(a);f.add(l),l.promote({transition:(u=l.options.initialPromotionConfig)===null||u===void 0?void 0:u.transition,preserveFollowOpacity:(d=(c=l.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||d===void 0?void 0:d.call(c,l)})},s.prototype.isLead=function(){var a=this.getStack();return a?a.lead===this:!0},s.prototype.getLead=function(){var a,l=this.options.layoutId;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this},s.prototype.getPrevLead=function(){var a,l=this.options.layoutId;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0},s.prototype.getStack=function(){var a=this.options.layoutId;if(a)return this.root.sharedNodes.get(a)},s.prototype.promote=function(a){var l=a===void 0?{}:a,u=l.needsReset,c=l.transition,d=l.preserveFollowOpacity,f=this.getStack();f&&f.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},s.prototype.relegate=function(){var a=this.getStack();return a?a.relegate(this):!1},s.prototype.resetRotation=function(){var a=this.options.visualElement;if(a){for(var l=!1,u={},c=0;c<Ln.length;c++){var d=Ln[c],f="rotate"+d;a.getStaticValue(f)&&(l=!0,u[f]=a.getStaticValue(f),a.setStaticValue(f,0))}if(l){a==null||a.syncRender();for(var f in u)a.setStaticValue(f,u[f]);a.scheduleRender()}}},s.prototype.getProjectionStyles=function(a){var l,u,c,d,f,v;a===void 0&&(a={});var p={};if(!this.instance||this.isSVG)return p;if(this.isVisible)p.visibility="";else return{visibility:"hidden"};var h=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,p.opacity="",p.pointerEvents=It(a.pointerEvents)||"",p.transform=h?h(this.latestValues,""):"none",p;var g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){var m={};return this.options.layoutId&&(m.opacity=(u=this.latestValues.opacity)!==null&&u!==void 0?u:1,m.pointerEvents=It(a.pointerEvents)||""),this.hasProjected&&!Ee(this.latestValues)&&(m.transform=h?h({},""):"none",this.hasProjected=!1),m}var S=g.animationValues||g.latestValues;this.applyTransformsToTarget(),p.transform=Gi(this.projectionDeltaWithTransform,this.treeScale,S),h&&(p.transform=h(S,p.transform));var w=this.projectionDelta,b=w.x,x=w.y;p.transformOrigin="".concat(b.origin*100,"% ").concat(x.origin*100,"% 0"),g.animationValues?p.opacity=g===this?(d=(c=S.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:S.opacityExit:p.opacity=g===this?(f=S.opacity)!==null&&f!==void 0?f:"":(v=S.opacityExit)!==null&&v!==void 0?v:0;for(var M in Nt)if(S[M]!==void 0){var P=Nt[M],_=P.correct,E=P.applyTo,C=_(S[M],g);if(E)for(var I=E.length,V=0;V<I;V++)p[E[V]]=C;else p[M]=C}return this.options.layoutId&&(p.pointerEvents=g===this?It(a.pointerEvents)||"":"none"),p},s.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},s.prototype.resetTree=function(){this.root.nodes.forEach(function(a){var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Hi),this.root.sharedNodes.clear()},s}()}function Qp(e){e.updateLayout()}function ev(e){var t,n,r,i,o=(n=(t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)!==null&&n!==void 0?n:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var s=e.layout,a=s.actual,l=s.measured;e.options.animationType==="size"?de(function(S){var w=o.isShared?o.measured[S]:o.layout[S],b=we(w);w.min=a[S].min,w.max=w.min+b}):e.options.animationType==="position"&&de(function(S){var w=o.isShared?o.measured[S]:o.layout[S],b=we(a[S]);w.max=w.min+b});var u=rt();tt(u,a,o.layout);var c=rt();o.isShared?tt(c,e.applyTransform(l,!0),o.measured):tt(c,a,o.layout);var d=!Us(u),f=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var v=e.relativeParent,p=v.snapshot,h=v.layout;if(p&&h){var g=K();nt(g,o.layout,p.layout);var m=K();nt(m,a,h.actual),qs(g,m)||(f=!0)}}e.notifyListeners("didUpdate",{layout:a,snapshot:o,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else e.isLead()&&((i=(r=e.options).onExitComplete)===null||i===void 0||i.call(r));e.options.transition=void 0}function tv(e){e.clearSnapshot()}function Hi(e){e.clearMeasurements()}function nv(e){var t=e.options.visualElement;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function rv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function iv(e){e.resolveTargetDelta()}function ov(e){e.calcProjection()}function sv(e){e.resetRotation()}function av(e){e.removeLeadSnapshot()}function Wi(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ui(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function lv(e,t,n,r){Ui(e.x,t.x,n.x,r),Ui(e.y,t.y,n.y,r)}function uv(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var cv={duration:.45,ease:[.4,0,.1,1]};function dv(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(e.path[r].instance){n=e.path[r];break}var i=n&&n!==e.root?n.instance:document,o=i.querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function qi(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Yi(e){qi(e.x),qi(e.y)}var fv=Ys({attachResizeListener:function(e,t){return Kt(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),xn={current:void 0},pv=Ys({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!xn.current){var e=new fv(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),xn.current=e}return xn.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),vv=A(A(A(A({},Xf),pf),mp),zp),Xs=sc(function(e,t){return Wc(e,t,vv,Dp,pv)});function Er(e){var t=je(function(){return Re(e)}),n=y.useContext(dt).isStatic;if(n){var r=U(y.useState(e),2),i=r[1];y.useEffect(function(){return t.onChange(i)},[])}return t}var hv=function(e){return typeof e=="object"&&e.mix},mv=function(e){return hv(e)?e.mix:void 0};function gv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,i=e[0+r],o=e[1+r],s=e[2+r],a=e[3+r],l=ur(o,s,A({mixer:mv(s[0])},a));return n?l(i):l}function yv(e,t){jt(function(){if(ue(e))return e.onChange(t)},[t])}function Sv(e,t){jt(function(){var n=e.map(function(r){return r.onChange(t)});return function(){return n.forEach(function(r){return r()})}})}function wv(e,t){var n=Er(t()),r=function(){return n.set(t())};return r(),Sv(e,function(){return le.update(r,!1,!0)}),n}function xv(e,t,n,r){var i=typeof t=="function"?t:gv(t,n,r);return Array.isArray(e)?Xi(e,i):Xi([e],function(o){var s=U(o,1),a=s[0];return i(a)})}function Xi(e,t){var n=je(function(){return[]});return wv(e,function(){n.length=0;for(var r=e.length,i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function bv(e,t){t===void 0&&(t={});var n=y.useContext(dt).isStatic,r=y.useRef(null),i=Er(ue(e)?e.get():e);return y.useMemo(function(){return i.attach(function(o,s){return n?s(o):(r.current&&r.current.stop(),r.current=hr(A(A({from:i.get(),to:o,velocity:i.getVelocity()},t),{onUpdate:s})),i.get())})},[JSON.stringify(t)]),yv(e,function(o){return i.set(parseFloat(o))}),i}function Tv(){var e=!1,t=[],n=new Set,r={subscribe:function(i){return n.add(i),function(){return void n.delete(i)}},start:function(i,o){if(e){var s=[];return n.forEach(function(a){s.push(Is(a,i,{transitionOverride:o}))}),Promise.all(s)}else return new Promise(function(a){t.push({animation:[i,o],resolve:a})})},set:function(i){return ne(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(o){Df(o,i)})},stop:function(){n.forEach(function(i){zf(i)})},mount:function(){return e=!0,t.forEach(function(i){var o=i.animation,s=i.resolve;r.start.apply(r,re([],U(o),!1)).then(s)}),function(){e=!1,r.stop()}}};return r}function Ev(){var e=je(Tv);return y.useEffect(e.mount,[]),e}var Ks=Ev;function Pv({onClose:e,children:t,disabled:n,onDragProgress:r}){const i=Er(0),o=150,s=bv(i,{stiffness:300,damping:30}),a=xv(s,[0,300],[1,.95],{clamp:!0}),l=Ks();return T.jsx(Xs.div,{style:{y:s,scale:a,height:"100%",width:"100%",touchAction:"pan-y"},drag:n?!1:"y",dragDirectionLock:!0,dragConstraints:{top:0},dragElastic:.2,dragMomentum:!1,animate:l,initial:{y:0},onDragEnd:(u,c)=>{n||(r==null||r(1),c.offset.y>o&&e?e():l.start({y:0,transition:{type:"spring",stiffness:300,damping:30}}))},children:t})}const Zs=({width:e="100%",height:t="100%",fill:n="white",...r})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,fill:"none",viewBox:"0 0 24 24",...r,children:T.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})});function Cv(e,t){const n=y.useRef(t);y.useEffect(()=>{n.current=t},[t]),y.useEffect(()=>{if(!e)return;window.history.pushState({modalOpen:!0},"");const r=o=>{o.key==="Escape"&&n.current()},i=()=>{n.current()};return window.addEventListener("keydown",r),window.addEventListener("popstate",i),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",i)}},[e])}function _v({stories:e,open:t,onClose:n,initialSlide:r,onButtonStoryClick:i}){const[o,s]=y.useState(!1),a=y.useRef(null),l=y.useRef(null);console.log(r);const[u,c]=y.useState(r);Cv(t,()=>n==null?void 0:n());const{markStorySeen:d,getNextUnseenStoryIndex:f}=eo({container:"HOME"});return t?T.jsx("div",{className:St.StoryCube,children:T.jsxs("div",{className:St.AtSwiperCubeWrap,ref:a,children:[T.jsx("div",{className:St.CloseIcon,onClick:n,children:T.jsx(Zs,{})}),T.jsx(Pv,{disabled:!1,onClose:n,children:T.jsx(mo,{modules:[Jl,Kl],effect:"cube",onSliderMove:()=>s(!0),onTransitionEnd:()=>s(!1),onSwiper:v=>l.current=v,cubeEffect:{shadow:!1,slideShadows:!1},className:St.AtSwiperCube,onSlideChange:v=>{c(v.activeIndex)},initialSlide:u,children:e==null?void 0:e.map((v,p)=>(console.log(v.id),console.log("getNextUnseenStoryIndex=> ",f(v)),T.jsx(go,{children:T.jsx(zu,{onButtonStoryClick:i,initialIndex:f(v),play:u==p,story:v,onChangeStory:(h,g)=>{d(v==null?void 0:v.id,g==null?void 0:g.id)},onAllStoriesEnd:()=>{var h;(h=l.current)==null||h.slideNext()},onLeft:h=>{var g;h==-1&&((g=l.current)==null||g.slidePrev())}})},v==null?void 0:v.id)))})})]})}):null}/*! *****************************************************************************
5
+ */var Rs;function lp(){return Rs||(Rs=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)t.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ao)),ao.exports}var up=lp();const Oe=Ia(up);function cp(){const[e,t]=g.useState({width:0,height:0}),n=g.useRef();return[g.useCallback(i=>{n.current&&n.current.disconnect(),i&&(n.current=new ResizeObserver(o=>{const a=o[0];if(!a)return;const{width:s,height:l}=a.contentRect;s&&l&&t({width:s,height:l})}),n.current.observe(i))},[]),e]}var so,Ms;function fp(){return Ms||(Ms=1,so={hexToRGB:r=>{let i=r;return i.length===4&&(i=i[0]+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),{r:parseInt(i.substring(1,3),16),g:parseInt(i.substring(3,5),16),b:parseInt(i.substring(5,7),16)}},formatRGB:({r,g:i,b:o})=>`rgb(${r},${i},${o})`,formatRGBA:({r,g:i,b:o},a)=>`rgba(${r},${i},${o},${a})`}),so}var lo,Is;function dp(){if(Is)return lo;Is=1;const{hexToRGB:e,formatRGB:t,formatRGBA:n}=fp();return lo=(i,o)=>{const a=e(i);return typeof o=="number"&&o>=0&&o<=1?n(a,o):t(a)},lo}var pp=dp();const hp=Ia(pp),La=({image:e,title:t,color:n,className:r,onProfileClick:i,width:o,hasSeenAllStories:a})=>{const[s,{width:l,height:u}]=cp();return A.jsx("div",{ref:s,children:A.jsxs("div",{className:Oe(Zt.ProfileStory,r,{[Zt.hasSeenAllStories]:a}),onClick:i,style:{"--story-color":n,"--story-color-alpha":n&&hp(n,.7),"--story-width":o??`${l}px`},children:[A.jsx("div",{className:Zt.ProfileStoryWrap,children:A.jsx("div",{className:Zt.ProfileStory__wrapImage,children:A.jsx("div",{className:Zt.ProfileStory__image,children:A.jsx("img",{src:e,alt:"",draggable:!1})})})}),t&&A.jsx("div",{className:Zt.ProfileStory__title,children:t})]})})},Ju=({container:e="HOME"}={})=>{const t="apuestotal-stories-"+e;function n(){const l=localStorage.getItem(t);if(!l)return{};try{const u=JSON.parse(l),c={};for(const f in u)c[f]={seenStoryIds:new Set(u[f].seenStoryIds)};return c}catch(u){return console.warn("No se pudo parsear seenStoriesMap de localStorage:",u),{}}}function r(l){const u={};for(const c in l)u[c]={seenStoryIds:Array.from(l[c].seenStoryIds)};localStorage.setItem(t,JSON.stringify(u))}function i(l,u){const c=n();c[l]||(c[l]={seenStoryIds:new Set}),c[l].seenStoryIds.add(u),r(c)}function o(l){const c=n()[l==null?void 0:l.id];return c?l.stories.every(f=>c.seenStoryIds.has(f==null?void 0:f.id)):!1}function a(l){const c=n()[l.id];if(!c)return 0;for(let f=0;f<l.stories.length;f++)if(!c.seenStoryIds.has(l.stories[f].id))return f;return 0}function s(l){const u=[],c=[];for(const f of l)o(f)?c.push(f):u.push(f);return[...u,...c]}return{markStorySeen:i,hasSeenAllStories:o,getNextUnseenStoryIndex:a,sortProfilesBySeenStatus:s}};function vp({scroll:e,targets:t}){const n=g.useRef([]),r=g.useCallback(o=>{n.current.forEach(({el:a,originalOverflow:s})=>{a.style.overflow=s}),n.current=[],o.forEach(a=>{if(typeof a=="string"){const s=document.getElementById(a);s?(n.current.push({target:a,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"):console.warn(`useScrollLock: no se encontró elemento con id "${a}"`)}else a===window||a===document?[document.body,document.documentElement].forEach(s=>{n.current.push({target:a,el:s,originalOverflow:s.style.overflow}),s.style.overflow="hidden"}):console.warn("useScrollLock: target no soportado",a)})},[]),i=g.useCallback(()=>{n.current.forEach(({el:o,originalOverflow:a})=>{o.style.overflow=a}),n.current=[]},[]);return g.useEffect(()=>{switch(e){case"ON":i();break;case"OFF":r(t);break}return()=>{i()}},[e]),{disableScroll:r,enableScroll:i}}function Ls(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Da(e,t){e===void 0&&(e={}),t===void 0&&(t={});const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Ls(t[r])&&Ls(e[r])&&Object.keys(t[r]).length>0&&Da(e[r],t[r])})}const Qu={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function $t(){const e=typeof document<"u"?document:{};return Da(e,Qu),e}const mp={document:Qu,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Le(){const e=typeof window<"u"?window:{};return Da(e,mp),e}function gp(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function yp(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Wo(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function gi(){return Date.now()}function Sp(e){const t=Le();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function bp(e,t){t===void 0&&(t="x");const n=Le();let r,i,o;const a=Sp(e);return n.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(s=>s.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function Rr(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function wp(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Be(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;n<arguments.length;n+=1){const r=n<0||arguments.length<=n?void 0:arguments[n];if(r!=null&&!wp(r)){const i=Object.keys(Object(r)).filter(o=>t.indexOf(o)<0);for(let o=0,a=i.length;o<a;o+=1){const s=i[o],l=Object.getOwnPropertyDescriptor(r,s);l!==void 0&&l.enumerable&&(Rr(e[s])&&Rr(r[s])?r[s].__swiper__?e[s]=r[s]:Be(e[s],r[s]):!Rr(e[s])&&Rr(r[s])?(e[s]={},r[s].__swiper__?e[s]=r[s]:Be(e[s],r[s])):e[s]=r[s])}}}return e}function Mr(e,t,n){e.style.setProperty(t,n)}function ec(e){let{swiper:t,targetPosition:n,side:r}=e;const i=Le(),o=-t.translate;let a=null,s;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const u=n>o?"next":"prev",c=(d,h)=>u==="next"&&d>=h||u==="prev"&&d<=h,f=()=>{s=new Date().getTime(),a===null&&(a=s);const d=Math.max(Math.min((s-a)/l,1),0),h=.5-Math.cos(d*Math.PI)/2;let p=o+h*(n-o);if(c(p,n)&&(p=n),t.wrapperEl.scrollTo({[r]:p}),c(p,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:p})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(f)};f()}function ot(e,t){t===void 0&&(t="");const n=Le(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(i=>i.matches(t)):r}function xp(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function Ep(e,t){const n=Le();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=xp(e,t))),r}function yi(e){try{console.warn(e);return}catch{}}function Tt(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:gp(t)),n}function Tp(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Pp(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Pt(e,t){return Le().getComputedStyle(e,null).getPropertyValue(t)}function Ds(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Cp(e,t){const n=[];let r=e.parentElement;for(;r;)n.push(r),r=r.parentElement;return n}function Vs(e,t,n){const r=Le();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function ut(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function _p(e){return t=>Math.abs(t)>0&&e.browser&&e.browser.need3dFix&&Math.abs(t)%90===0?t+.001:t}function Ns(e,t){t===void 0&&(t=""),typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let uo;function Op(){const e=Le(),t=$t();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function tc(){return uo||(uo=Op()),uo}let co;function Ap(e){let{userAgent:t}=e===void 0?{}:e;const n=tc(),r=Le(),i=r.navigator.platform,o=t||r.navigator.userAgent,a={ios:!1,android:!1},s=r.screen.width,l=r.screen.height,u=o.match(/(Android);?[\s\/]+([\d.]+)?/);let c=o.match(/(iPad).*OS\s([\d_]+)/);const f=o.match(/(iPod)(.*OS\s([\d_]+))?/),d=!c&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h=i==="Win32";let p=i==="MacIntel";const v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!c&&p&&n.touch&&v.indexOf(`${s}x${l}`)>=0&&(c=o.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),p=!1),u&&!h&&(a.os="android",a.android=!0),(c||d||f)&&(a.os="ios",a.ios=!0),a}function nc(e){return e===void 0&&(e={}),co||(co=Ap(e)),co}let fo;function Rp(){const e=Le(),t=nc();let n=!1;function r(){const s=e.navigator.userAgent.toLowerCase();return s.indexOf("safari")>=0&&s.indexOf("chrome")<0&&s.indexOf("android")<0}if(r()){const s=String(e.navigator.userAgent);if(s.includes("Version/")){const[l,u]=s.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));n=l<16||l===16&&u<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),a=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:a,isWebView:i}}function rc(){return fo||(fo=Rp()),fo}function Mp(e){let{swiper:t,on:n,emit:r}=e;const i=Le();let o=null,a=null;const s=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(f=>{a=i.requestAnimationFrame(()=>{const{width:d,height:h}=t;let p=d,v=h;f.forEach(y=>{let{contentBoxSize:m,contentRect:S,target:b}=y;b&&b!==t.el||(p=S?S.width:(m[0]||m).inlineSize,v=S?S.height:(m[0]||m).blockSize)}),(p!==d||v!==h)&&s()})}),o.observe(t.el))},u=()=>{a&&i.cancelAnimationFrame(a),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},c=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",s),i.addEventListener("orientationchange",c)}),n("destroy",()=>{u(),i.removeEventListener("resize",s),i.removeEventListener("orientationchange",c)})}function Ip(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],a=Le(),s=function(c,f){f===void 0&&(f={});const d=a.MutationObserver||a.WebkitMutationObserver,h=new d(p=>{if(t.__preventObserver__)return;if(p.length===1){i("observerUpdate",p[0]);return}const v=function(){i("observerUpdate",p[0])};a.requestAnimationFrame?a.requestAnimationFrame(v):a.setTimeout(v,0)});h.observe(c,{attributes:typeof f.attributes>"u"?!0:f.attributes,childList:t.isElement||(typeof f.childList>"u"?!0:f).childList,characterData:typeof f.characterData>"u"?!0:f.characterData}),o.push(h)},l=()=>{if(t.params.observer){if(t.params.observeParents){const c=Cp(t.hostEl);for(let f=0;f<c.length;f+=1)s(c[f])}s(t.hostEl,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}},u=()=>{o.forEach(c=>{c.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",u)}var Lp={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];t.apply(r,a)}return i.__emitterProxy=t,r.on(e,i,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return typeof o[0]=="string"||Array.isArray(o[0])?(t=o[0],n=o.slice(1,o.length),r=e):(t=o[0].events,n=o[0].data,r=o[0].context||e),n.unshift(r),(Array.isArray(t)?t:t.split(" ")).forEach(l=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(u=>{u.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(u=>{u.apply(r,n)})}),e}};function Dp(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(Pt(r,"padding-left")||0,10)-parseInt(Pt(r,"padding-right")||0,10),n=n-parseInt(Pt(r,"padding-top")||0,10)-parseInt(Pt(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function Vp(){const e=this;function t(P,O){return parseFloat(P.getPropertyValue(e.getDirectionLabel(O))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:a,wrongRTL:s}=e,l=e.virtual&&n.virtual.enabled,u=l?e.virtual.slides.length:e.slides.length,c=ot(i,`.${e.params.slideClass}, swiper-slide`),f=l?e.virtual.slides.length:c.length;let d=[];const h=[],p=[];let v=n.slidesOffsetBefore;typeof v=="function"&&(v=n.slidesOffsetBefore.call(e));let y=n.slidesOffsetAfter;typeof y=="function"&&(y=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,S=e.slidesGrid.length;let b=n.spaceBetween,E=-v,T=0,w=0;if(typeof o>"u")return;typeof b=="string"&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*o:typeof b=="string"&&(b=parseFloat(b)),e.virtualSize=-b,c.forEach(P=>{a?P.style.marginLeft="":P.style.marginRight="",P.style.marginBottom="",P.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Mr(r,"--swiper-centered-offset-before",""),Mr(r,"--swiper-centered-offset-after",""));const x=n.grid&&n.grid.rows>1&&e.grid;x?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();let _;const C=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(P=>typeof n.breakpoints[P].slidesPerView<"u").length>0;for(let P=0;P<f;P+=1){_=0;let O;if(c[P]&&(O=c[P]),x&&e.grid.updateSlide(P,O,c),!(c[P]&&Pt(O,"display")==="none")){if(n.slidesPerView==="auto"){C&&(c[P].style[e.getDirectionLabel("width")]="");const R=getComputedStyle(O),L=O.style.transform,N=O.style.webkitTransform;if(L&&(O.style.transform="none"),N&&(O.style.webkitTransform="none"),n.roundLengths)_=e.isHorizontal()?Vs(O,"width"):Vs(O,"height");else{const z=t(R,"width"),B=t(R,"padding-left"),G=t(R,"padding-right"),$=t(R,"margin-left"),k=t(R,"margin-right"),Y=R.getPropertyValue("box-sizing");if(Y&&Y==="border-box")_=z+$+k;else{const{clientWidth:Q,offsetWidth:W}=O;_=z+B+G+$+k+(W-Q)}}L&&(O.style.transform=L),N&&(O.style.webkitTransform=N),n.roundLengths&&(_=Math.floor(_))}else _=(o-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(_=Math.floor(_)),c[P]&&(c[P].style[e.getDirectionLabel("width")]=`${_}px`);c[P]&&(c[P].swiperSlideSize=_),p.push(_),n.centeredSlides?(E=E+_/2+T/2+b,T===0&&P!==0&&(E=E-o/2-b),P===0&&(E=E-o/2-b),Math.abs(E)<1/1e3&&(E=0),n.roundLengths&&(E=Math.floor(E)),w%n.slidesPerGroup===0&&d.push(E),h.push(E)):(n.roundLengths&&(E=Math.floor(E)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup===0&&d.push(E),h.push(E),E=E+_+b),e.virtualSize+=_+b,T=_,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,o)+y,a&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),x&&e.grid.updateWrapperSize(_,d),!n.centeredSlides){const P=[];for(let O=0;O<d.length;O+=1){let R=d[O];n.roundLengths&&(R=Math.floor(R)),d[O]<=e.virtualSize-o&&P.push(R)}d=P,Math.floor(e.virtualSize-o)-Math.floor(d[d.length-1])>1&&d.push(e.virtualSize-o)}if(l&&n.loop){const P=p[0]+b;if(n.slidesPerGroup>1){const O=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),R=P*n.slidesPerGroup;for(let L=0;L<O;L+=1)d.push(d[d.length-1]+R)}for(let O=0;O<e.virtual.slidesBefore+e.virtual.slidesAfter;O+=1)n.slidesPerGroup===1&&d.push(d[d.length-1]+P),h.push(h[h.length-1]+P),e.virtualSize+=P}if(d.length===0&&(d=[0]),b!==0){const P=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");c.filter((O,R)=>!n.cssMode||n.loop?!0:R!==c.length-1).forEach(O=>{O.style[P]=`${b}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let P=0;p.forEach(R=>{P+=R+(b||0)}),P-=b;const O=P>o?P-o:0;d=d.map(R=>R<=0?-v:R>O?O+y:R)}if(n.centerInsufficientSlides){let P=0;p.forEach(R=>{P+=R+(b||0)}),P-=b;const O=(n.slidesOffsetBefore||0)+(n.slidesOffsetAfter||0);if(P+O<o){const R=(o-P-O)/2;d.forEach((L,N)=>{d[N]=L-R}),h.forEach((L,N)=>{h[N]=L+R})}}if(Object.assign(e,{slides:c,snapGrid:d,slidesGrid:h,slidesSizesGrid:p}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Mr(r,"--swiper-centered-offset-before",`${-d[0]}px`),Mr(r,"--swiper-centered-offset-after",`${e.size/2-p[p.length-1]/2}px`);const P=-e.snapGrid[0],O=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(R=>R+P),e.slidesGrid=e.slidesGrid.map(R=>R+O)}if(f!==u&&e.emit("slidesLengthChange"),d.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==S&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const P=`${n.containerModifierClass}backface-hidden`,O=e.el.classList.contains(P);f<=n.maxBackfaceHiddenSlides?O||e.el.classList.add(P):O&&e.el.classList.remove(P)}}function Np(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const a=s=>r?t.slides[t.getSlideIndexByData(s)]:t.slides[s];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(s=>{n.push(s)});else for(o=0;o<Math.ceil(t.params.slidesPerView);o+=1){const s=t.activeIndex+o;if(s>t.slides.length&&!r)break;n.push(a(s))}else n.push(a(t.activeIndex));for(o=0;o<n.length;o+=1)if(typeof n[o]<"u"){const s=n[o].offsetHeight;i=s>i?s:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function jp(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const js=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Bp(e){e===void 0&&(e=this&&this.translate||0);const t=this,n=t.params,{slides:r,rtlTranslate:i,snapGrid:o}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let a=-e;i&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=n.spaceBetween;typeof s=="string"&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:typeof s=="string"&&(s=parseFloat(s));for(let l=0;l<r.length;l+=1){const u=r[l];let c=u.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(c-=r[0].swiperSlideOffset);const f=(a+(n.centeredSlides?t.minTranslate():0)-c)/(u.swiperSlideSize+s),d=(a-o[0]+(n.centeredSlides?t.minTranslate():0)-c)/(u.swiperSlideSize+s),h=-(a-c),p=h+t.slidesSizesGrid[l],v=h>=0&&h<=t.size-t.slidesSizesGrid[l],y=h>=0&&h<t.size-1||p>1&&p<=t.size||h<=0&&p>=t.size;y&&(t.visibleSlides.push(u),t.visibleSlidesIndexes.push(l)),js(u,y,n.slideVisibleClass),js(u,v,n.slideFullyVisibleClass),u.progress=i?-f:f,u.originalProgress=i?-d:d}}function kp(e){const t=this;if(typeof e>"u"){const c=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*c||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:a,progressLoop:s}=t;const l=o,u=a;if(r===0)i=0,o=!0,a=!0;else{i=(e-t.minTranslate())/r;const c=Math.abs(e-t.minTranslate())<1,f=Math.abs(e-t.maxTranslate())<1;o=c||i<=0,a=f||i>=1,c&&(i=0),f&&(i=1)}if(n.loop){const c=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),d=t.slidesGrid[c],h=t.slidesGrid[f],p=t.slidesGrid[t.slidesGrid.length-1],v=Math.abs(e);v>=d?s=(v-d)/p:s=(v+p-h)/p,s>1&&(s-=1)}Object.assign(t,{progress:i,progressLoop:s,isBeginning:o,isEnd:a}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),a&&!u&&t.emit("reachEnd toEdge"),(l&&!o||u&&!a)&&t.emit("fromEdge"),t.emit("progress",i)}const po=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Fp(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,a=e.grid&&n.grid&&n.grid.rows>1,s=f=>ot(r,`.${n.slideClass}${f}, swiper-slide${f}`)[0];let l,u,c;if(o)if(n.loop){let f=i-e.virtual.slidesBefore;f<0&&(f=e.virtual.slides.length+f),f>=e.virtual.slides.length&&(f-=e.virtual.slides.length),l=s(`[data-swiper-slide-index="${f}"]`)}else l=s(`[data-swiper-slide-index="${i}"]`);else a?(l=t.find(f=>f.column===i),c=t.find(f=>f.column===i+1),u=t.find(f=>f.column===i-1)):l=t[i];l&&(a||(c=Pp(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c&&(c=t[0]),u=Tp(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!u===0&&(u=t[t.length-1]))),t.forEach(f=>{po(f,f===l,n.slideActiveClass),po(f,f===c,n.slideNextClass),po(f,f===u,n.slidePrevClass)}),e.emitSlidesClasses()}const oi=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},ho=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Uo=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const a=i,s=[a-t];s.push(...Array.from({length:t}).map((l,u)=>a+r+u)),e.slides.forEach((l,u)=>{s.includes(l.column)&&ho(e,u)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let a=i-t;a<=o+t;a+=1){const s=(a%n+n)%n;(s<i||s>o)&&ho(e,s)}else for(let a=Math.max(i-t,0);a<=Math.min(o+t,n-1);a+=1)a!==i&&(a>o||a<i)&&ho(e,a)};function zp(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let i;for(let o=0;o<t.length;o+=1)typeof t[o+1]<"u"?r>=t[o]&&r<t[o+1]-(t[o+1]-t[o])/2?i=o:r>=t[o]&&r<t[o+1]&&(i=o+1):r>=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function $p(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:a,snapIndex:s}=t;let l=e,u;const c=h=>{let p=h-t.virtual.slidesBefore;return p<0&&(p=t.virtual.slides.length+p),p>=t.virtual.slides.length&&(p-=t.virtual.slides.length),p};if(typeof l>"u"&&(l=zp(t)),r.indexOf(n)>=0)u=r.indexOf(n);else{const h=Math.min(i.slidesPerGroupSkip,l);u=h+Math.floor((l-h)/i.slidesPerGroup)}if(u>=r.length&&(u=r.length-1),l===o&&!t.params.loop){u!==s&&(t.snapIndex=u,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(l);return}const f=t.grid&&i.grid&&i.grid.rows>1;let d;if(t.virtual&&i.virtual.enabled&&i.loop)d=c(l);else if(f){const h=t.slides.find(v=>v.column===l);let p=parseInt(h.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(t.slides.indexOf(h),0)),d=Math.floor(p/i.grid.rows)}else if(t.slides[l]){const h=t.slides[l].getAttribute("data-swiper-slide-index");h?d=parseInt(h,10):d=l}else d=l;Object.assign(t,{previousSnapIndex:s,snapIndex:u,previousRealIndex:a,realIndex:d,previousIndex:o,activeIndex:l}),t.initialized&&Uo(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==d&&t.emit("realIndexChange"),t.emit("slideChange"))}function Gp(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(s=>{!i&&s.matches&&s.matches(`.${r.slideClass}, swiper-slide`)&&(i=s)});let o=!1,a;if(i){for(let s=0;s<n.slides.length;s+=1)if(n.slides[s]===i){o=!0,a=s;break}}if(i&&o)n.clickedSlide=i,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=a;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var Hp={updateSize:Dp,updateSlides:Vp,updateAutoHeight:Np,updateSlidesOffset:jp,updateSlidesProgress:Bp,updateProgress:kp,updateSlidesClasses:Fp,updateActiveIndex:$p,updateClickedSlide:Gp};function Wp(e){e===void 0&&(e=this.isHorizontal()?"x":"y");const t=this,{params:n,rtlTranslate:r,translate:i,wrapperEl:o}=t;if(n.virtualTranslate)return r?-i:i;if(n.cssMode)return i;let a=bp(o,e);return a+=t.cssOverflowAdjustment(),r&&(a=-a),a||0}function Up(e,t){const n=this,{rtlTranslate:r,params:i,wrapperEl:o,progress:a}=n;let s=0,l=0;const u=0;n.isHorizontal()?s=r?-e:e:l=e,i.roundLengths&&(s=Math.floor(s),l=Math.floor(l)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?s:l,i.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-s:-l:i.virtualTranslate||(n.isHorizontal()?s-=n.cssOverflowAdjustment():l-=n.cssOverflowAdjustment(),o.style.transform=`translate3d(${s}px, ${l}px, ${u}px)`);let c;const f=n.maxTranslate()-n.minTranslate();f===0?c=0:c=(e-n.minTranslate())/f,c!==a&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function qp(){return-this.snapGrid[0]}function Yp(){return-this.snapGrid[this.snapGrid.length-1]}function Kp(e,t,n,r,i){e===void 0&&(e=0),t===void 0&&(t=this.params.speed),n===void 0&&(n=!0),r===void 0&&(r=!0);const o=this,{params:a,wrapperEl:s}=o;if(o.animating&&a.preventInteractionOnTransition)return!1;const l=o.minTranslate(),u=o.maxTranslate();let c;if(r&&e>l?c=l:r&&e<u?c=u:c=e,o.updateProgress(c),a.cssMode){const f=o.isHorizontal();if(t===0)s[f?"scrollLeft":"scrollTop"]=-c;else{if(!o.support.smoothScroll)return ec({swiper:o,targetPosition:-c,side:f?"left":"top"}),!0;s.scrollTo({[f?"left":"top"]:-c,behavior:"smooth"})}return!0}return t===0?(o.setTransition(0),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,i),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(d){!o||o.destroyed||d.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,o.animating=!1,n&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}var Xp={getTranslate:Wp,setTranslate:Up,minTranslate:qp,maxTranslate:Yp,translateTo:Kp};function Zp(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function ic(e){let{swiper:t,runCallbacks:n,direction:r,step:i}=e;const{activeIndex:o,previousIndex:a}=t;let s=r;s||(o>a?s="next":o<a?s="prev":s="reset"),t.emit(`transition${i}`),n&&s==="reset"?t.emit(`slideResetTransition${i}`):n&&o!==a&&(t.emit(`slideChangeTransition${i}`),s==="next"?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}function Jp(e,t){e===void 0&&(e=!0);const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),ic({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function Qp(e,t){e===void 0&&(e=!0);const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),ic({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var eh={setTransition:Zp,transitionStart:Jp,transitionEnd:Qp};function th(e,t,n,r,i){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const o=this;let a=e;a<0&&(a=0);const{params:s,snapGrid:l,slidesGrid:u,previousIndex:c,activeIndex:f,rtlTranslate:d,wrapperEl:h,enabled:p}=o;if(!p&&!r&&!i||o.destroyed||o.animating&&s.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=o.params.speed);const v=Math.min(o.params.slidesPerGroupSkip,a);let y=v+Math.floor((a-v)/o.params.slidesPerGroup);y>=l.length&&(y=l.length-1);const m=-l[y];if(s.normalizeSlideIndex)for(let x=0;x<u.length;x+=1){const _=-Math.floor(m*100),C=Math.floor(u[x]*100),P=Math.floor(u[x+1]*100);typeof u[x+1]<"u"?_>=C&&_<P-(P-C)/2?a=x:_>=C&&_<P&&(a=x+1):_>=C&&(a=x)}if(o.initialized&&a!==f&&(!o.allowSlideNext&&(d?m>o.translate&&m>o.minTranslate():m<o.translate&&m<o.minTranslate())||!o.allowSlidePrev&&m>o.translate&&m>o.maxTranslate()&&(f||0)!==a))return!1;a!==(c||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(m);let S;a>f?S="next":a<f?S="prev":S="reset";const b=o.virtual&&o.params.virtual.enabled;if(!(b&&i)&&(d&&-m===o.translate||!d&&m===o.translate))return o.updateActiveIndex(a),s.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),s.effect!=="slide"&&o.setTranslate(m),S!=="reset"&&(o.transitionStart(n,S),o.transitionEnd(n,S)),!1;if(s.cssMode){const x=o.isHorizontal(),_=d?m:-m;if(t===0)b&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),b&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{h[x?"scrollLeft":"scrollTop"]=_})):h[x?"scrollLeft":"scrollTop"]=_,b&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1});else{if(!o.support.smoothScroll)return ec({swiper:o,targetPosition:_,side:x?"left":"top"}),!0;h.scrollTo({[x?"left":"top"]:_,behavior:"smooth"})}return!0}const w=rc().isSafari;return b&&!i&&w&&o.isElement&&o.virtual.update(!1,!1,a),o.setTransition(t),o.setTranslate(m),o.updateActiveIndex(a),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,S),t===0?o.transitionEnd(n,S):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(_){!o||o.destroyed||_.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,S))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function nh(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let a=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)a=a+i.virtual.slidesBefore;else{let s;if(o){const d=a*i.params.grid.rows;s=i.slides.find(h=>h.getAttribute("data-swiper-slide-index")*1===d).column}else s=i.getSlideIndexByData(a);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:u}=i.params;let c=i.params.slidesPerView;c==="auto"?c=i.slidesPerViewDynamic():(c=Math.ceil(parseFloat(i.params.slidesPerView,10)),u&&c%2===0&&(c=c+1));let f=l-s<c;if(u&&(f=f||s<Math.ceil(c/2)),r&&u&&i.params.slidesPerView!=="auto"&&!o&&(f=!1),f){const d=u?s<i.activeIndex?"prev":"next":s-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:d,slideTo:!0,activeSlideIndex:d==="next"?s+1:s-l+1,slideRealIndex:d==="next"?i.realIndex:void 0})}if(o){const d=a*i.params.grid.rows;a=i.slides.find(h=>h.getAttribute("data-swiper-slide-index")*1===d).column}else a=i.getSlideIndexByData(a)}return requestAnimationFrame(()=>{i.slideTo(a,t,n,r)}),i}function rh(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:a}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let s=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(s=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<o.slidesPerGroupSkip?1:s,u=r.virtual&&o.virtual.enabled;if(o.loop){if(a&&!u&&o.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&o.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function ih(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:a,rtlTranslate:s,enabled:l,animating:u}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const c=r.virtual&&i.virtual.enabled;if(i.loop){if(u&&!c&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const f=s?r.translate:-r.translate;function d(S){return S<0?-Math.floor(Math.abs(S)):Math.floor(S)}const h=d(f),p=o.map(S=>d(S)),v=i.freeMode&&i.freeMode.enabled;let y=o[p.indexOf(h)-1];if(typeof y>"u"&&(i.cssMode||v)){let S;o.forEach((b,E)=>{h>=b&&(S=E)}),typeof S<"u"&&(y=v?o[S]:o[S>0?S-1:S])}let m=0;if(typeof y<"u"&&(m=a.indexOf(y),m<0&&(m=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(m=m-r.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.rewind&&r.isBeginning){const S=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(S,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(m,e,t,n)}),!0;return r.slideTo(m,e,t,n)}function oh(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function ah(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,o),s=a+Math.floor((o-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[s]){const u=i.snapGrid[s],c=i.snapGrid[s+1];l-u>(c-u)*r&&(o+=i.params.slidesPerGroup)}else{const u=i.snapGrid[s-1],c=i.snapGrid[s];l-u<=(c-u)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function sh(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?i<e.loopedSlides-r/2||i>e.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(ot(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),Wo(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(ot(n,`${a}[data-swiper-slide-index="${o}"]`)[0]),Wo(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var lh={slideTo:th,slideToLoop:nh,slideNext:rh,slidePrev:ih,slideReset:oh,slideToClosest:ah,slideToClickedSlide:sh};function uh(e,t){const n=this,{params:r,slidesEl:i}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const o=()=>{ot(i,`.${r.slideClass}, swiper-slide`).forEach((d,h)=>{d.setAttribute("data-swiper-slide-index",h)})},a=n.grid&&r.grid&&r.grid.rows>1,s=r.slidesPerGroup*(a?r.grid.rows:1),l=n.slides.length%s!==0,u=a&&n.slides.length%r.grid.rows!==0,c=f=>{for(let d=0;d<f;d+=1){const h=n.isElement?Tt("swiper-slide",[r.slideBlankClass]):Tt("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(h)}};if(l){if(r.loopAddBlankSlides){const f=s-n.slides.length%s;c(f),n.recalcSlides(),n.updateSlides()}else yi("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(u){if(r.loopAddBlankSlides){const f=r.grid.rows-n.slides.length%r.grid.rows;c(f),n.recalcSlides(),n.updateSlides()}else yi("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();n.loopFix({slideRealIndex:e,direction:r.centeredSlides?void 0:"next",initial:t})}function ch(e){let{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:i,activeSlideIndex:o,initial:a,byController:s,byMousewheel:l}=e===void 0?{}:e;const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:c,allowSlidePrev:f,allowSlideNext:d,slidesEl:h,params:p}=u,{centeredSlides:v,initialSlide:y}=p;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&p.virtual.enabled){n&&(!p.centeredSlides&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):p.centeredSlides&&u.snapIndex<p.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=f,u.allowSlideNext=d,u.emit("loopFix");return}let m=p.slidesPerView;m==="auto"?m=u.slidesPerViewDynamic():(m=Math.ceil(parseFloat(p.slidesPerView,10)),v&&m%2===0&&(m=m+1));const S=p.slidesPerGroupAuto?m:p.slidesPerGroup;let b=S;b%S!==0&&(b+=S-b%S),b+=p.loopAdditionalSlides,u.loopedSlides=b;const E=u.grid&&p.grid&&p.grid.rows>1;c.length<m+b||u.params.effect==="cards"&&c.length<m+b*2?yi("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):E&&p.grid.fill==="row"&&yi("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const T=[],w=[],x=E?Math.ceil(c.length/p.grid.rows):c.length,_=a&&x-y<m&&!v;let C=_?y:u.activeIndex;typeof o>"u"?o=u.getSlideIndex(c.find(B=>B.classList.contains(p.slideActiveClass))):C=o;const P=r==="next"||!r,O=r==="prev"||!r;let R=0,L=0;const z=(E?c[o].column:o)+(v&&typeof i>"u"?-m/2+.5:0);if(z<b){R=Math.max(b-z,S);for(let B=0;B<b-z;B+=1){const G=B-Math.floor(B/x)*x;if(E){const $=x-G-1;for(let k=c.length-1;k>=0;k-=1)c[k].column===$&&T.push(k)}else T.push(x-G-1)}}else if(z+m>x-b){L=Math.max(z-(x-b*2),S),_&&(L=Math.max(L,m-x+y+1));for(let B=0;B<L;B+=1){const G=B-Math.floor(B/x)*x;E?c.forEach(($,k)=>{$.column===G&&w.push(k)}):w.push(G)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&c.length<m+b*2&&(w.includes(o)&&w.splice(w.indexOf(o),1),T.includes(o)&&T.splice(T.indexOf(o),1)),O&&T.forEach(B=>{c[B].swiperLoopMoveDOM=!0,h.prepend(c[B]),c[B].swiperLoopMoveDOM=!1}),P&&w.forEach(B=>{c[B].swiperLoopMoveDOM=!0,h.append(c[B]),c[B].swiperLoopMoveDOM=!1}),u.recalcSlides(),p.slidesPerView==="auto"?u.updateSlides():E&&(T.length>0&&O||w.length>0&&P)&&u.slides.forEach((B,G)=>{u.grid.updateSlide(G,B,u.slides)}),p.watchSlidesProgress&&u.updateSlidesOffset(),n){if(T.length>0&&O){if(typeof t>"u"){const B=u.slidesGrid[C],$=u.slidesGrid[C+R]-B;l?u.setTranslate(u.translate-$):(u.slideTo(C+Math.ceil(R),0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-$,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-$))}else if(i){const B=E?T.length/p.grid.rows:T.length;u.slideTo(u.activeIndex+B,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(w.length>0&&P)if(typeof t>"u"){const B=u.slidesGrid[C],$=u.slidesGrid[C-L]-B;l?u.setTranslate(u.translate-$):(u.slideTo(C-L,0,!1,!0),i&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-$,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-$))}else{const B=E?w.length/p.grid.rows:w.length;u.slideTo(u.activeIndex-B,0,!1,!0)}}if(u.allowSlidePrev=f,u.allowSlideNext=d,u.controller&&u.controller.control&&!s){const B={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(G=>{!G.destroyed&&G.params.loop&&G.loopFix({...B,slideTo:G.params.slidesPerView===p.slidesPerView?n:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...B,slideTo:u.controller.control.params.slidesPerView===p.slidesPerView?n:!1})}u.emit("loopFix")}function fh(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var dh={loopCreate:uh,loopFix:ch,loopDestroy:fh};function ph(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function hh(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var vh={setGrabCursor:ph,unsetGrabCursor:hh};function mh(e,t){t===void 0&&(t=this);function n(r){if(!r||r===$t()||r===Le())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function Bs(e,t,n){const r=Le(),{params:i}=e,o=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return o&&(n<=a||n>=r.innerWidth-a)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function gh(e){const t=this,n=$t();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){Bs(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:a,enabled:s}=t;if(!s||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!Ep(l,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const u=!!o.noSwipingClass&&o.noSwipingClass!=="",c=r.composedPath?r.composedPath():r.path;u&&r.target&&r.target.shadowRoot&&c&&(l=c[0]);const f=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,d=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(d?mh(f,l):l.closest(f))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;a.currentX=r.pageX,a.currentY=r.pageY;const h=a.currentX,p=a.currentY;if(!Bs(t,r,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=h,a.startY=p,i.touchStartTime=gi(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let v=!0;l.matches(i.focusableElements)&&(v=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!l.matches(i.focusableElements))&&n.activeElement.blur();const y=v&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||y)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function yh(e){const t=$t(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:a,enabled:s}=n;if(!s||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let u;if(l.type==="touchmove"){if(u=[...l.changedTouches].find(T=>T.identifier===r.touchId),!u||u.identifier!==r.touchId)return}else u=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const c=u.pageX,f=u.pageY;if(l.preventedByNestedSwiper){o.startX=c,o.startY=f;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:c,startY:f,currentX:c,currentY:f}),r.touchStartTime=gi());return}if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(f<o.startY&&n.translate<=n.maxTranslate()||f>o.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(a&&(c>o.startX&&-n.translate<=n.maxTranslate()||c<o.startX&&-n.translate>=n.minTranslate()))return;if(!a&&(c<o.startX&&n.translate<=n.maxTranslate()||c>o.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==l.target&&l.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=c,o.currentY=f;const d=o.currentX-o.startX,h=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(d**2+h**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let T;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:d*d+h*h>=25&&(T=Math.atan2(Math.abs(h),Math.abs(d))*180/Math.PI,r.isScrolling=n.isHorizontal()?T>i.touchAngle:90-T>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let p=n.isHorizontal()?d:h,v=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(p=Math.abs(p)*(a?1:-1),v=Math.abs(v)*(a?1:-1)),o.diff=p,p*=i.touchRatio,a&&(p=-p,v=-v);const y=n.touchesDirection;n.swipeDirection=p>0?"prev":"next",n.touchesDirection=v>0?"prev":"next";const m=n.params.loop&&!i.cssMode,S=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(m&&S&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const T=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(T)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}if(new Date().getTime(),i._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&y!==n.touchesDirection&&m&&S&&Math.abs(p)>=1){Object.assign(o,{startX:c,startY:f,currentX:c,currentY:f,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=p+r.startTranslate;let b=!0,E=i.resistanceRatio;if(i.touchReleaseOnEdges&&(E=0),p>0?(m&&S&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(b=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+p)**E))):p<0&&(m&&S&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(i.slidesPerView!=="auto"&&n.slides.length-i.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(b=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-p)**E))),b&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(p)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Sh(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].find(T=>T.identifier===n.touchId),!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:a,touches:s,rtlTranslate:l,slidesGrid:u,enabled:c}=t;if(!c||!a.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}a.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const f=gi(),d=f-n.touchStartTime;if(t.allowClick){const T=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(T&&T[0]||r.target,T),t.emit("tap click",r),d<300&&f-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=gi(),Wo(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||s.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let h;if(a.followFinger?h=l?t.translate:-t.translate:h=-n.currentTranslate,a.cssMode)return;if(a.freeMode&&a.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:h});return}const p=h>=-t.maxTranslate()&&!t.params.loop;let v=0,y=t.slidesSizesGrid[0];for(let T=0;T<u.length;T+=T<a.slidesPerGroupSkip?1:a.slidesPerGroup){const w=T<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof u[T+w]<"u"?(p||h>=u[T]&&h<u[T+w])&&(v=T,y=u[T+w]-u[T]):(p||h>=u[T])&&(v=T,y=u[u.length-1]-u[u.length-2])}let m=null,S=null;a.rewind&&(t.isBeginning?S=a.virtual&&a.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const b=(h-u[v])/y,E=v<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(d>a.longSwipesMs){if(!a.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(b>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?m:v+E):t.slideTo(v)),t.swipeDirection==="prev"&&(b>1-a.longSwipesRatio?t.slideTo(v+E):S!==null&&b<0&&Math.abs(b)>a.longSwipesRatio?t.slideTo(S):t.slideTo(v))}else{if(!a.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(v+E):t.slideTo(v):(t.swipeDirection==="next"&&t.slideTo(m!==null?m:v+E),t.swipeDirection==="prev"&&t.slideTo(S!==null?S:v))}}function ks(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=a&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!s?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function bh(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function wh(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function xh(e){const t=this;oi(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function Eh(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const oc=(e,t)=>{const n=$t(),{params:r,el:i,wrapperEl:o,device:a}=e,s=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",u=t;!i||typeof i=="string"||(n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:s}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:s}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[u](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",ks,!0):e[u]("observerUpdate",ks,!0),i[l]("load",e.onLoad,{capture:!0}))};function Th(){const e=this,{params:t}=e;e.onTouchStart=gh.bind(e),e.onTouchMove=yh.bind(e),e.onTouchEnd=Sh.bind(e),e.onDocumentTouchStart=Eh.bind(e),t.cssMode&&(e.onScroll=wh.bind(e)),e.onClick=bh.bind(e),e.onLoad=xh.bind(e),oc(e,"on")}function Ph(){oc(this,"off")}var Ch={attachEvents:Th,detachEvents:Ph};const Fs=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function _h(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const a=$t(),s=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",l=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:a.querySelector(r.breakpointsBase),u=e.getBreakpoint(o,s,l);if(!u||e.currentBreakpoint===u)return;const f=(u in o?o[u]:void 0)||e.originalParams,d=Fs(e,r),h=Fs(e,f),p=e.params.grabCursor,v=f.grabCursor,y=r.enabled;d&&!h?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&h&&(i.classList.add(`${r.containerModifierClass}grid`),(f.grid.fill&&f.grid.fill==="column"||!f.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),p&&!v?e.unsetGrabCursor():!p&&v&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(w=>{if(typeof f[w]>"u")return;const x=r[w]&&r[w].enabled,_=f[w]&&f[w].enabled;x&&!_&&e[w].disable(),!x&&_&&e[w].enable()});const m=f.direction&&f.direction!==r.direction,S=r.loop&&(f.slidesPerView!==r.slidesPerView||m),b=r.loop;m&&n&&e.changeDirection(),Be(e.params,f);const E=e.params.enabled,T=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),y&&!E?e.disable():!y&&E&&e.enable(),e.currentBreakpoint=u,e.emit("_beforeBreakpoint",f),n&&(S?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&T?(e.loopCreate(t),e.updateSlides()):b&&!T&&e.loopDestroy()),e.emit("breakpoint",f)}function Oh(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=Le(),o=t==="window"?i.innerHeight:n.clientHeight,a=Object.keys(e).map(s=>{if(typeof s=="string"&&s.indexOf("@")===0){const l=parseFloat(s.substr(1));return{value:o*l,point:s}}return{value:s,point:s}});a.sort((s,l)=>parseInt(s.value,10)-parseInt(l.value,10));for(let s=0;s<a.length;s+=1){const{point:l,value:u}=a[s];t==="window"?i.matchMedia(`(min-width: ${u}px)`).matches&&(r=l):u<=n.clientWidth&&(r=l)}return r||"max"}var Ah={setBreakpoint:_h,getBreakpoint:Oh};function Rh(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function Mh(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,a=Rh(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...a),i.classList.add(...t),e.emitContainerClasses()}function Ih(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Lh={addClasses:Mh,removeClasses:Ih};function Dh(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var Vh={checkOverflow:Dh},qo={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Nh(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){Be(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){Be(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),Be(t,r)}}const vo={eventsEmitter:Lp,update:Hp,translate:Xp,transition:eh,slide:lh,loop:dh,grabCursor:vh,events:Ch,breakpoints:Ah,checkOverflow:Vh,classes:Lh},mo={};let Va=class ft{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];i.length===1&&i[0].constructor&&Object.prototype.toString.call(i[0]).slice(8,-1)==="Object"?n=i[0]:[t,n]=i,n||(n={}),n=Be({},n),t&&!n.el&&(n.el=t);const a=$t();if(n.el&&typeof n.el=="string"&&a.querySelectorAll(n.el).length>1){const c=[];return a.querySelectorAll(n.el).forEach(f=>{const d=Be({},n,{el:f});c.push(new ft(d))}),c}const s=this;s.__swiper__=!0,s.support=tc(),s.device=nc({userAgent:n.userAgent}),s.browser=rc(),s.eventsListeners={},s.eventsAnyListeners=[],s.modules=[...s.__modules__],n.modules&&Array.isArray(n.modules)&&s.modules.push(...n.modules);const l={};s.modules.forEach(c=>{c({params:n,swiper:s,extendParams:Nh(n,l),on:s.on.bind(s),once:s.once.bind(s),off:s.off.bind(s),emit:s.emit.bind(s)})});const u=Be({},qo,l);return s.params=Be({},u,mo,n),s.originalParams=Be({},s.params),s.passedParams=Be({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach(c=>{s.on(c,s.params.on[c])}),s.params&&s.params.onAny&&s.onAny(s.params.onAny),Object.assign(s,{enabled:s.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return s.params.direction==="horizontal"},isVertical(){return s.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.emit("_swiper"),s.params.init&&s.init(),s}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=ot(n,`.${r.slideClass}, swiper-slide`),o=Ds(i[0]);return Ds(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.getAttribute("data-swiper-slide-index")*1===t))}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=ot(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),a=(r.maxTranslate()-i)*t+i;r.translateTo(a,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:a,slidesSizesGrid:s,size:l,activeIndex:u}=r;let c=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let f=o[u]?Math.ceil(o[u].swiperSlideSize):0,d;for(let h=u+1;h<o.length;h+=1)o[h]&&!d&&(f+=Math.ceil(o[h].swiperSlideSize),c+=1,f>l&&(d=!0));for(let h=u-1;h>=0;h-=1)o[h]&&!d&&(f+=o[h].swiperSlideSize,c+=1,f>l&&(d=!0))}else if(t==="current")for(let f=u+1;f<o.length;f+=1)(n?a[f]+s[f]-a[u]<l:a[f]-a[u]<l)&&(c+=1);else for(let f=u-1;f>=0;f-=1)a[u]-a[f]<l&&(c+=1);return c}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(a=>{a.complete&&oi(t,a)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const a=t.rtlTranslate?t.translate*-1:t.translate,s=Math.min(Math.max(a,t.maxTranslate()),t.minTranslate());t.setTranslate(s),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const a=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(a.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):ot(r,i())[0];return!a&&n.params.createElements&&(a=Tt("div",n.params.wrapperClass),r.append(a),ot(r,`.${n.params.slideClass}`).forEach(s=>{a.append(s)})),Object.assign(n,{el:r,wrapperEl:a,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:a,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||Pt(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||Pt(r,"direction")==="rtl"),wrongRTL:Pt(a,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?oi(n,o):o.addEventListener("load",a=>{oi(n,a.target)})}),Uo(n),n.initialized=!0,Uo(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:a,slides:s}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o&&typeof o!="string"&&o.removeAttribute("style"),a&&a.removeAttribute("style"),s&&s.length&&s.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),yp(r)),r.destroyed=!0),null}static extendDefaults(t){Be(mo,t)}static get extendedDefaults(){return mo}static get defaults(){return qo}static installModule(t){ft.prototype.__modules__||(ft.prototype.__modules__=[]);const n=ft.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ft.installModule(n)),ft):(ft.installModule(t),ft)}};Object.keys(vo).forEach(e=>{Object.keys(vo[e]).forEach(t=>{Va.prototype[t]=vo[e][t]})});Va.use([Mp,Ip]);const ac=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Bt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function cn(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Bt(t[r])&&Bt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:cn(e[r],t[r]):e[r]=t[r]})}function sc(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function lc(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function uc(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function cc(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function jh(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Bh(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:a,scrollbarEl:s,paginationEl:l}=e;const u=i.filter(C=>C!=="children"&&C!=="direction"&&C!=="wrapperClass"),{params:c,pagination:f,navigation:d,scrollbar:h,virtual:p,thumbs:v}=t;let y,m,S,b,E,T,w,x;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&!r.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(y=!0),i.includes("controller")&&r.controller&&r.controller.control&&c.controller&&!c.controller.control&&(m=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(c.pagination||c.pagination===!1)&&f&&!f.el&&(S=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||s)&&(c.scrollbar||c.scrollbar===!1)&&h&&!h.el&&(b=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||a)&&(r.navigation.nextEl||o)&&(c.navigation||c.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(E=!0);const _=C=>{t[C]&&(t[C].destroy(),C==="navigation"?(t.isElement&&(t[C].prevEl.remove(),t[C].nextEl.remove()),c[C].prevEl=void 0,c[C].nextEl=void 0,t[C].prevEl=void 0,t[C].nextEl=void 0):(t.isElement&&t[C].el.remove(),c[C].el=void 0,t[C].el=void 0))};i.includes("loop")&&t.isElement&&(c.loop&&!r.loop?T=!0:!c.loop&&r.loop?w=!0:x=!0),u.forEach(C=>{if(Bt(c[C])&&Bt(r[C]))Object.assign(c[C],r[C]),(C==="navigation"||C==="pagination"||C==="scrollbar")&&"enabled"in r[C]&&!r[C].enabled&&_(C);else{const P=r[C];(P===!0||P===!1)&&(C==="navigation"||C==="pagination"||C==="scrollbar")?P===!1&&_(C):c[C]=r[C]}}),u.includes("controller")&&!m&&t.controller&&t.controller.control&&c.controller&&c.controller.control&&(t.controller.control=c.controller.control),i.includes("children")&&n&&p&&c.virtual.enabled?(p.slides=n,p.update(!0)):i.includes("virtual")&&p&&c.virtual.enabled&&(n&&(p.slides=n),p.update(!0)),i.includes("children")&&n&&c.loop&&(x=!0),y&&v.init()&&v.update(!0),m&&(t.controller.control=c.controller.control),S&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(c.pagination.el=l),f.init(),f.render(),f.update()),b&&(t.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),t.el.appendChild(s)),s&&(c.scrollbar.el=s),h.init(),h.updateSize(),h.setTranslate()),E&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),Ns(o,t.hostEl.constructor.nextButtonSvg),o.part.add("button-next"),t.el.appendChild(o)),(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-prev"),Ns(a,t.hostEl.constructor.prevButtonSvg),a.part.add("button-prev"),t.el.appendChild(a))),o&&(c.navigation.nextEl=o),a&&(c.navigation.prevEl=a),d.init(),d.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(T||x)&&t.loopDestroy(),(w||x)&&t.loopCreate(),t.update()}function kh(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};cn(n,qo),n._emitClasses=!0,n.init=!1;const o={},a=ac.map(l=>l.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(l=>{typeof e[l]>"u"||(a.indexOf(l)>=0?Bt(e[l])?(n[l]={},i[l]={},cn(n[l],e[l]),cn(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function Fh(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:a,swiper:s}=e;sc(t)&&r&&i&&(s.params.navigation.nextEl=r,s.originalParams.navigation.nextEl=r,s.params.navigation.prevEl=i,s.originalParams.navigation.prevEl=i),lc(t)&&o&&(s.params.pagination.el=o,s.originalParams.pagination.el=o),uc(t)&&a&&(s.params.scrollbar.el=a,s.originalParams.scrollbar.el=a),s.init(n)}function zh(e,t,n,r,i){const o=[];if(!t)return o;const a=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),u=n.map(i);l.join("")!==u.join("")&&a("children"),r.length!==n.length&&a("children")}return ac.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Bt(e[l])&&Bt(t[l])){const u=Object.keys(e[l]),c=Object.keys(t[l]);u.length!==c.length?a(l):(u.forEach(f=>{e[l][f]!==t[l][f]&&a(l)}),c.forEach(f=>{e[l][f]!==t[l][f]&&a(l)}))}else e[l]!==t[l]&&a(l)}),o}const $h=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Si(){return Si=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},Si.apply(this,arguments)}function fc(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function dc(e){const t=[];return g.Children.toArray(e).forEach(n=>{fc(n)?t.push(n):n.props&&n.props.children&&dc(n.props.children).forEach(r=>t.push(r))}),t}function Gh(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return g.Children.toArray(e).forEach(r=>{if(fc(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=dc(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Hh(e,t,n){if(!n)return null;const r=c=>{let f=c;return c<0?f=t.length+c:f>=t.length&&(f=f-t.length),f},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:a}=n,s=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,u=[];for(let c=s;c<l;c+=1)c>=o&&c<=a&&u.push(t[r(c)]);return u.map((c,f)=>g.cloneElement(c,{swiper:e,style:i,key:c.props.virtualIndex||c.key||`slide-${f}`}))}function kn(e,t){return typeof window>"u"?g.useEffect(e,t):g.useLayoutEffect(e,t)}const zs=g.createContext(null),Wh=g.createContext(null),pc=g.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:a,...s}=e===void 0?{}:e,l=!1;const[u,c]=g.useState("swiper"),[f,d]=g.useState(null),[h,p]=g.useState(!1),v=g.useRef(!1),y=g.useRef(null),m=g.useRef(null),S=g.useRef(null),b=g.useRef(null),E=g.useRef(null),T=g.useRef(null),w=g.useRef(null),x=g.useRef(null),{params:_,passedParams:C,rest:P,events:O}=kh(s),{slides:R,slots:L}=Gh(o),N=()=>{p(!h)};Object.assign(_.on,{_containerClasses(k,Y){c(Y)}});const z=()=>{Object.assign(_.on,O),l=!0;const k={..._};if(delete k.wrapperClass,m.current=new Va(k),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=R;const Y={cache:!1,slides:R,renderExternal:d,renderExternalUpdate:!1};cn(m.current.params.virtual,Y),cn(m.current.originalParams.virtual,Y)}};y.current||z(),m.current&&m.current.on("_beforeBreakpoint",N);const B=()=>{l||!O||!m.current||Object.keys(O).forEach(k=>{m.current.on(k,O[k])})},G=()=>{!O||!m.current||Object.keys(O).forEach(k=>{m.current.off(k,O[k])})};g.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",N)}),g.useEffect(()=>{!v.current&&m.current&&(m.current.emitSlidesClasses(),v.current=!0)}),kn(()=>{if(t&&(t.current=y.current),!!y.current)return m.current.destroyed&&z(),Fh({el:y.current,nextEl:E.current,prevEl:T.current,paginationEl:w.current,scrollbarEl:x.current,swiper:m.current},_),a&&!m.current.destroyed&&a(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),kn(()=>{B();const k=zh(C,S.current,R,b.current,Y=>Y.key);return S.current=C,b.current=R,k.length&&m.current&&!m.current.destroyed&&Bh({swiper:m.current,slides:R,passedParams:C,changedParams:k,nextEl:E.current,prevEl:T.current,scrollbarEl:x.current,paginationEl:w.current}),()=>{G()}}),kn(()=>{$h(m.current)},[f]);function $(){return _.virtual?Hh(m.current,R,f):R.map((k,Y)=>g.cloneElement(k,{swiper:m.current,swiperSlideIndex:Y}))}return g.createElement(r,Si({ref:y,className:cc(`${u}${n?` ${n}`:""}`)},P),g.createElement(Wh.Provider,{value:m.current},L["container-start"],g.createElement(i,{className:jh(_.wrapperClass)},L["wrapper-start"],$(),L["wrapper-end"]),sc(_)&&g.createElement(g.Fragment,null,g.createElement("div",{ref:T,className:"swiper-button-prev"}),g.createElement("div",{ref:E,className:"swiper-button-next"})),uc(_)&&g.createElement("div",{ref:x,className:"swiper-scrollbar"}),lc(_)&&g.createElement("div",{ref:w,className:"swiper-pagination"}),L["container-end"]))});pc.displayName="Swiper";const hc=g.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:a,lazy:s,virtualIndex:l,swiperSlideIndex:u,...c}=e===void 0?{}:e;const f=g.useRef(null),[d,h]=g.useState("swiper-slide"),[p,v]=g.useState(!1);function y(E,T,w){T===f.current&&h(w)}kn(()=>{if(typeof u<"u"&&(f.current.swiperSlideIndex=u),t&&(t.current=f.current),!(!f.current||!o)){if(o.destroyed){d!=="swiper-slide"&&h("swiper-slide");return}return o.on("_slideClass",y),()=>{o&&o.off("_slideClass",y)}}}),kn(()=>{o&&f.current&&!o.destroyed&&h(o.getSlideClasses(f.current))},[o]);const m={isActive:d.indexOf("swiper-slide-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0},S=()=>typeof r=="function"?r(m):r,b=()=>{v(!0)};return g.createElement(n,Si({ref:f,className:cc(`${d}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:b},c),a&&g.createElement(zs.Provider,{value:m},g.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},S(),s&&!p&&g.createElement("div",{className:"swiper-lazy-preloader"}))),!a&&g.createElement(zs.Provider,{value:m},S(),s&&!p&&g.createElement("div",{className:"swiper-lazy-preloader"})))});hc.displayName="SwiperSlide";function Uh(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(i=>{if(!n[i]&&n.auto===!0){let o=ot(e.el,`.${r[i]}`)[0];o||(o=Tt("div",r[i]),o.className=r[i],e.el.append(o)),n[i]=o,t[i]=o}}),n}function qh(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};function o(p){let v;return p&&typeof p=="string"&&t.isElement&&(v=t.el.querySelector(p)||t.hostEl.querySelector(p),v)?v:(p&&(typeof p=="string"&&(v=[...document.querySelectorAll(p)]),t.params.uniqueNavElements&&typeof p=="string"&&v&&v.length>1&&t.el.querySelectorAll(p).length===1?v=t.el.querySelector(p):v&&v.length===1&&(v=v[0])),p&&!v?p:v)}function a(p,v){const y=t.params.navigation;p=ut(p),p.forEach(m=>{m&&(m.classList[v?"add":"remove"](...y.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=v),t.params.watchOverflow&&t.enabled&&m.classList[t.isLocked?"add":"remove"](y.lockClass))})}function s(){const{nextEl:p,prevEl:v}=t.navigation;if(t.params.loop){a(v,!1),a(p,!1);return}a(v,t.isBeginning&&!t.params.rewind),a(p,t.isEnd&&!t.params.rewind)}function l(p){p.preventDefault(),!(t.isBeginning&&!t.params.loop&&!t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function u(p){p.preventDefault(),!(t.isEnd&&!t.params.loop&&!t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function c(){const p=t.params.navigation;if(t.params.navigation=Uh(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(p.nextEl||p.prevEl))return;let v=o(p.nextEl),y=o(p.prevEl);Object.assign(t.navigation,{nextEl:v,prevEl:y}),v=ut(v),y=ut(y);const m=(S,b)=>{S&&S.addEventListener("click",b==="next"?u:l),!t.enabled&&S&&S.classList.add(...p.lockClass.split(" "))};v.forEach(S=>m(S,"next")),y.forEach(S=>m(S,"prev"))}function f(){let{nextEl:p,prevEl:v}=t.navigation;p=ut(p),v=ut(v);const y=(m,S)=>{m.removeEventListener("click",S==="next"?u:l),m.classList.remove(...t.params.navigation.disabledClass.split(" "))};p.forEach(m=>y(m,"next")),v.forEach(m=>y(m,"prev"))}r("init",()=>{t.params.navigation.enabled===!1?h():(c(),s())}),r("toEdge fromEdge lock unlock",()=>{s()}),r("destroy",()=>{f()}),r("enable disable",()=>{let{nextEl:p,prevEl:v}=t.navigation;if(p=ut(p),v=ut(v),t.enabled){s();return}[...p,...v].filter(y=>!!y).forEach(y=>y.classList.add(t.params.navigation.lockClass))}),r("click",(p,v)=>{let{nextEl:y,prevEl:m}=t.navigation;y=ut(y),m=ut(m);const S=v.target;let b=m.includes(S)||y.includes(S);if(t.isElement&&!b){const E=v.path||v.composedPath&&v.composedPath();E&&(b=E.find(T=>y.includes(T)||m.includes(T)))}if(t.params.navigation.hideOnClick&&!b){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===S||t.pagination.el.contains(S)))return;let E;y.length?E=y[0].classList.contains(t.params.navigation.hiddenClass):m.length&&(E=m[0].classList.contains(t.params.navigation.hiddenClass)),i(E===!0?"navigationShow":"navigationHide"),[...y,...m].filter(T=>!!T).forEach(T=>T.classList.toggle(t.params.navigation.hiddenClass))}});const d=()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),s()},h=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),f()};Object.assign(t.navigation,{enable:d,disable:h,update:s,init:c,destroy:f})}function Yh(e){const{effect:t,swiper:n,on:r,setTranslate:i,setTransition:o,overwriteParams:a,perspective:s,recreateShadows:l,getEffectParams:u}=e;r("beforeInit",()=>{if(n.params.effect!==t)return;n.classNames.push(`${n.params.containerModifierClass}${t}`),s&&s()&&n.classNames.push(`${n.params.containerModifierClass}3d`);const f=a?a():{};Object.assign(n.params,f),Object.assign(n.originalParams,f)}),r("setTranslate _virtualUpdated",()=>{n.params.effect===t&&i()}),r("setTransition",(f,d)=>{n.params.effect===t&&o(d)}),r("transitionEnd",()=>{if(n.params.effect===t&&l){if(!u||!u().slideShadows)return;n.slides.forEach(f=>{f.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),l()}});let c;r("virtualUpdate",()=>{n.params.effect===t&&(n.slides.length||(c=!0),requestAnimationFrame(()=>{c&&n.slides&&n.slides.length&&(i(),c=!1)}))})}function Kh(e){let{swiper:t,extendParams:n,on:r}=e;n({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(l,u,c)=>{let f=c?l.querySelector(".swiper-slide-shadow-left"):l.querySelector(".swiper-slide-shadow-top"),d=c?l.querySelector(".swiper-slide-shadow-right"):l.querySelector(".swiper-slide-shadow-bottom");f||(f=Tt("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"left":"top"}`.split(" ")),l.append(f)),d||(d=Tt("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"right":"bottom"}`.split(" ")),l.append(d)),f&&(f.style.opacity=Math.max(-u,0)),d&&(d.style.opacity=Math.max(u,0))};Yh({effect:"cube",swiper:t,on:r,setTranslate:()=>{const{el:l,wrapperEl:u,slides:c,width:f,height:d,rtlTranslate:h,size:p,browser:v}=t,y=_p(t),m=t.params.cubeEffect,S=t.isHorizontal(),b=t.virtual&&t.params.virtual.enabled;let E=0,T;m.shadow&&(S?(T=t.wrapperEl.querySelector(".swiper-cube-shadow"),T||(T=Tt("div","swiper-cube-shadow"),t.wrapperEl.append(T)),T.style.height=`${f}px`):(T=l.querySelector(".swiper-cube-shadow"),T||(T=Tt("div","swiper-cube-shadow"),l.append(T))));for(let x=0;x<c.length;x+=1){const _=c[x];let C=x;b&&(C=parseInt(_.getAttribute("data-swiper-slide-index"),10));let P=C*90,O=Math.floor(P/360);h&&(P=-P,O=Math.floor(-P/360));const R=Math.max(Math.min(_.progress,1),-1);let L=0,N=0,z=0;C%4===0?(L=-O*4*p,z=0):(C-1)%4===0?(L=0,z=-O*4*p):(C-2)%4===0?(L=p+O*4*p,z=p):(C-3)%4===0&&(L=-p,z=3*p+p*4*O),h&&(L=-L),S||(N=L,L=0);const B=`rotateX(${y(S?0:-P)}deg) rotateY(${y(S?P:0)}deg) translate3d(${L}px, ${N}px, ${z}px)`;R<=1&&R>-1&&(E=C*90+R*90,h&&(E=-C*90-R*90)),_.style.transform=B,m.slideShadows&&i(_,R,S)}if(u.style.transformOrigin=`50% 50% -${p/2}px`,u.style["-webkit-transform-origin"]=`50% 50% -${p/2}px`,m.shadow)if(S)T.style.transform=`translate3d(0px, ${f/2+m.shadowOffset}px, ${-f/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${m.shadowScale})`;else{const x=Math.abs(E)-Math.floor(Math.abs(E)/90)*90,_=1.5-(Math.sin(x*2*Math.PI/360)/2+Math.cos(x*2*Math.PI/360)/2),C=m.shadowScale,P=m.shadowScale/_,O=m.shadowOffset;T.style.transform=`scale3d(${C}, 1, ${P}) translate3d(0px, ${d/2+O}px, ${-d/2/P}px) rotateX(-89.99deg)`}const w=(v.isSafari||v.isWebView)&&v.needPerspectiveFix?-p/2:0;u.style.transform=`translate3d(0px,0,${w}px) rotateX(${y(t.isHorizontal()?0:E)}deg) rotateY(${y(t.isHorizontal()?-E:0)}deg)`,u.style.setProperty("--swiper-cube-translate-z",`${w}px`)},setTransition:l=>{const{el:u,slides:c}=t;if(c.forEach(f=>{f.style.transitionDuration=`${l}ms`,f.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})}),t.params.cubeEffect.shadow&&!t.isHorizontal()){const f=u.querySelector(".swiper-cube-shadow");f&&(f.style.transitionDuration=`${l}ms`)}},recreateShadows:()=>{const l=t.isHorizontal();t.slides.forEach(u=>{const c=Math.max(Math.min(u.progress,1),-1);i(u,c,l)})},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}const Xh="_StoryCube_1rp57_1",Zh="_AtSwiperCubeWrap_1rp57_17",Jh="_AtSwiperCube_1rp57_17",Qh="_CloseIcon_1rp57_58",Ir={StoryCube:Xh,AtSwiperCubeWrap:Zh,AtSwiperCube:Jh,CloseIcon:Qh},ev="_Story_4el36_1",tv="_CardStory_ProgressRoot_4el36_4",nv="_CardStory_ProgressRoot_Track_4el36_19",rv="_NoComplete_4el36_36",iv="_Complete_4el36_42",ov="_ProgressAnimate_4el36_48",av="_Pause_4el36_53",mt={Story:ev,CardStory_ProgressRoot:tv,CardStory_ProgressRoot_Track:nv,NoComplete:rv,Complete:iv,ProgressAnimate:ov,Pause:av},sv="_story_ujlze_1",lv="_BetSlip_Wrapper_ujlze_21",uv="_BetSlip_ButtonWrap_ujlze_32",Fn={story:sv,BetSlip_Wrapper:lv,BetSlip_ButtonWrap:uv},cv="es-PE";function fv(e,t=cv){const n=new Date(e),r=n.toLocaleDateString(t,{day:"2-digit",month:"2-digit"}),i=n.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r} • ${i}`}class dv{static fromRaw(t){var a,s,l;const n=((s=(a=t==null?void 0:t.stakes)==null?void 0:a.find(u=>u.isEnabled))==null?void 0:s.preciseValue)??0,r=(l=t==null?void 0:t.selections)==null?void 0:l.map(u=>{var y,m,S,b,E,T;const c=parseFloat((m=(y=u==null?void 0:u.odd)==null?void 0:y.price)==null?void 0:m.toFixed(2)),f=fv((S=u==null?void 0:u.event)==null?void 0:S.startDate),d=(E=(b=u==null?void 0:u.odd)==null?void 0:b.offers)==null?void 0:E.find(w=>w.type===0),p=u.market.name,v=(T=u==null?void 0:u.bbSelections)==null?void 0:T.map(w=>{var P,O,R,L,N;const x=(P=w==null?void 0:w.odd)==null?void 0:P.price,_=parseFloat(x.toFixed(2)),C=(R=(O=w==null?void 0:w.odd)==null?void 0:O.offers)==null?void 0:R.find(z=>z.type===0);return{marketName:(L=w==null?void 0:w.market)==null?void 0:L.name,name:(N=w==null?void 0:w.odd)==null?void 0:N.name,cuota:_,hasPA:!!C,paParam:C==null?void 0:C.parameter}});return{name:u.odd.name,cuota:c,event:u.event.name,fechaHora:f,hasPA:!!d,paParam:d==null?void 0:d.parameter,marketName:p,subSelections:v}}),i=parseFloat(r==null?void 0:r.reduce((u,c)=>u*(c==null?void 0:c.cuota),1).toFixed(2)),o=parseFloat((n*i).toFixed(2));return{selections:r,stake:n,cuotaTotal:i,gananciaTotal:o}}}const pv="_BetSlip_1mebh_1",hv="_BetSlip_Title_1mebh_14",vv="_SelectionItemWrap_1mebh_21",mv="_BetSlip_ButtonWrap_1mebh_35",gv="_BetSlip_PulseButton__Text_1mebh_53",yv="_BetSlip_ShowMoreWrap_1mebh_58",Sv="_BetSlip_ShowMoreButton_1mebh_76",bv="_BetSlip_BottomSheet_1mebh_92",wv="_BetSlip_BottomSheet_handle_1mebh_106",xv="_BetSlip_BottomSheet_Content_1mebh_126",Ve={BetSlip:pv,BetSlip_Title:hv,SelectionItemWrap:vv,BetSlip_ButtonWrap:mv,BetSlip_PulseButton__Text:gv,BetSlip_ShowMoreWrap:yv,BetSlip_ShowMoreButton:Sv,BetSlip_BottomSheet:bv,BetSlip_BottomSheet_handle:wv,BetSlip_BottomSheet_Content:xv},Ev="_SelectionItem_pgtan_1",Tv="_SelectionItemGrid_pgtan_12",Pv="_SelectionItem_name_pgtan_18",Cv="_SelectionItem_marketName_pgtan_22",_v="_SelectionItem_hasPA_pgtan_29",Ov="_SelectionItem_fechahora_pgtan_38",Av="_SelectionItem__Wrap_pgtan_43",Rv="_SelectionItem__BB_pgtan_48",Mv="_SelectionItem__BB__mn_pgtan_81",je={SelectionItem:Ev,SelectionItemGrid:Tv,SelectionItem_name:Pv,SelectionItem_marketName:Cv,SelectionItem_hasPA:_v,SelectionItem_fechahora:Ov,SelectionItem__Wrap:Av,SelectionItem__BB:Rv,SelectionItem__BB__mn:Mv},vc=({selection:e})=>{var t,n;return A.jsxs("div",{className:je.SelectionItem,children:[A.jsxs("div",{className:je.SelectionItemGrid,children:[A.jsx("div",{className:je.SelectionItem_name,children:e!=null&&e.subSelections?"Crear Apuesta":e.name}),A.jsx("div",{className:je.SelectionItem_sc,children:e.cuota.toFixed(2)})]}),e!=null&&e.subSelections?null:A.jsx("div",{className:je.SelectionItemGrid,children:A.jsxs("div",{className:je.SelectionItem_marketName,children:[A.jsx("div",{children:e.marketName}),e.hasPA&&A.jsx("div",{className:je.SelectionItem_hasPA,children:"PA"})]})}),A.jsxs("div",{className:je.SelectionItemGrid,children:[A.jsx("div",{className:je.SelectionItem_event,children:e.event}),A.jsx("div",{className:je.SelectionItem_fechahora,children:e.fechaHora})]}),e!=null&&e.subSelections&&((t=e==null?void 0:e.subSelections)==null?void 0:t.length)>0?A.jsx("div",{className:je.SelectionItem__Wrap,children:(n=e.subSelections)==null?void 0:n.map((r,i)=>A.jsxs("div",{className:je.SelectionItem__BB,children:[A.jsx("div",{className:je.SelectionItem__BB__mn,children:r==null?void 0:r.marketName}),A.jsx("div",{children:r==null?void 0:r.name})]},i))}):A.jsx(A.Fragment,{})]})},Iv="_PulseButton_1x1ir_1",Lv="_BetSlip__NextIcon_1x1ir_21",$s={PulseButton:Iv,BetSlip__NextIcon:Lv},Dv="_Button_tq1cu_1",Vv={Button:Dv},Nv=({width:e="100%",height:t="100%",fill:n="white",...r})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,fill:n,...r,children:A.jsx("path",{fill:"#fff",d:"M5.77 1.86A1 1 0 1 0 4.23 3.14l4.47 5.36-4.47 5.36a1 1 0 1 0 1.538 1.28l5-6a1 1 0 0 0 0-1.28l-5-6Z"})}),Na=({children:e,onClick:t})=>A.jsx("div",{className:$s.PulseButton,children:A.jsxs("a",{className:Vv.Button,onClick:n=>{n.preventDefault(),n.stopPropagation(),t()},children:[e,A.jsx("div",{className:$s.BetSlip__NextIcon,children:A.jsx(Nv,{})})]})}),jv=e=>A.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e,children:[A.jsx("mask",{id:"a",width:24,height:24,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"},children:A.jsx("path",{fill:"#D9D9D9",d:"M24 24H0V0h24z"})}),A.jsx("g",{mask:"url(#a)",children:A.jsx("path",{fill:"#1C1B1F",d:"M13 20V7.825l5.6 5.6L20 12l-8-8-8 8 1.4 1.425 5.6-5.6V20h2Z"})})]});var go,Gs;function Bv(){if(Gs)return go;Gs=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(i,o){var a=arguments.length;o=new Array(a>1?a-1:0);for(var s=1;s<a;s++)o[s-1]=arguments[s];var l=0,u="Warning: "+i.replace(/%s/g,function(){return o[l++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}};t=function(r,i,o){var a=arguments.length;o=new Array(a>2?a-2:0);for(var s=2;s<a;s++)o[s-2]=arguments[s];if(i===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");r||n.apply(null,[i].concat(o))}}return go=t,go}Bv();var kv=zv()?g.useLayoutEffect:g.useEffect;if(process.env.NODE_ENV!=="production"){var Fv=typeof process<"u"?process:{env:{NODE_ENV:"development"}};Fv.env}function zv(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}process.env.NODE_ENV;process.env.NODE_ENV;function $v(){var e=g.useState(Object.create(null)),t=e[1];return g.useCallback(function(){t(Object.create(null))},[])}process.env.NODE_ENV;var mc=function(t){var n=t.children,r=t.type,i=r===void 0?"reach-portal":r,o=g.useRef(null),a=g.useRef(null),s=$v();return kv(function(){if(o.current){var l=o.current.ownerDocument;return a.current=l==null?void 0:l.createElement(i),l.body.appendChild(a.current),s(),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}},[i,s]),a.current?Zu.createPortal(n,a.current):g.createElement("span",{ref:o})};process.env.NODE_ENV!=="production"&&(mc.displayName="Portal");/*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -15,11 +15,68 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
15
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
16
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
17
  PERFORMANCE OF THIS SOFTWARE.
18
- ***************************************************************************** */var Js=function(e,t){return(Js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])})(e,t)},Mv,Mt,Av=(function(e){/*!
18
+ ***************************************************************************** */var V=function(){return V=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},V.apply(this,arguments)};function ja(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function J(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function te(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ce(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var ae;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ae||(ae={}));var mn;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(mn||(mn={}));var Yo=ae.Start,Ba=ae.Stop,pr=ae.Raise,Gi=ae.Send,gc=ae.Cancel,Gv=ae.NullEvent,ka=ae.Assign;ae.After;ae.DoneState;var yc=ae.Log,Hv=ae.Init,Ko=ae.Invoke;ae.ErrorExecution;var Hs=ae.ErrorPlatform,Wv=ae.ErrorCustom,Sc=ae.Update,Uv=ae.Choose,qv=ae.Pure,bc=".",Ws={},Xo="xstate.guard",Yv="",be=process.env.NODE_ENV==="production",Lr;function Fa(e,t,n){n===void 0&&(n=bc);var r=zn(e,n),i=zn(t,n);return ne(i)?ne(r)?i===r:!1:ne(r)?r in i:Object.keys(r).every(function(o){return o in i?Fa(r[o],i[o]):!1})}function wc(e){try{return ne(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Zo(e,t){try{return Sn(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function Kv(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function zn(e,t){if(Kv(e))return e.value;if(Sn(e))return bi(e);if(typeof e!="string")return e;var n=Zo(e,t);return bi(n)}function bi(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Vn(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var o=r[i];n[o]=t(e[o],o,e,i)}return n}function Us(e,t,n){var r,i,o={};try{for(var a=J(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];n(u)&&(o[l]=t(u,l,e))}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var Xv=function(e){return function(t){var n,r,i=t;try{for(var o=J(e),a=o.next();!a.done;a=o.next()){var s=a.value;i=i[s]}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function Zv(e,t){return function(n){var r,i,o=n;try{for(var a=J(e),s=a.next();!s.done;s=a.next()){var l=s.value;o=o[t][l]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}}function ai(e){if(!e)return[[]];if(ne(e))return[[e]];var t=he(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:ai(e[n]).map(function(i){return[n].concat(i)})}));return t}function he(e){var t;return(t=[]).concat.apply(t,ce([],te(e),!1))}function xc(e){return Sn(e)?e:[e]}function Xe(e){return e===void 0?[]:xc(e)}function wi(e,t,n){var r,i;if(re(e))return e(t,n.data);var o={};try{for(var a=J(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];re(u)?o[l]=u(t,n.data):o[l]=u}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function Jv(e){return/^(done|error)\./.test(e)}function qs(e){return!!(e instanceof Promise||e!==null&&(re(e)||typeof e=="object")&&re(e.then))}function Qv(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function em(e,t){var n,r,i=te([[],[]],2),o=i[0],a=i[1];try{for(var s=J(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?o.push(u):a.push(u)}}catch(c){n={error:c}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}function Ec(e,t){return Vn(e.states,function(n,r){if(n){var i=(ne(t)?void 0:t[r])||(n?n.current:void 0);if(i)return{current:i,states:Ec(n,i)}}})}function tm(e,t){return{current:t,states:Ec(e,t)}}function Ys(e,t,n,r){be||Te(!!e,"Attempting to update undefined context");var i=e&&n.reduce(function(o,a){var s,l,u=a.assignment,c={state:r,action:a,_event:t},f={};if(re(u))f=u(o,t.data,c);else try{for(var d=J(Object.keys(u)),h=d.next();!h.done;h=d.next()){var p=h.value,v=u[p];f[p]=re(v)?v(o,t.data,c):v}}catch(y){s={error:y}}finally{try{h&&!h.done&&(l=d.return)&&l.call(d)}finally{if(s)throw s.error}}return Object.assign({},o,f)},e);return i}var Te=function(){};be||(Te=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function Sn(e){return Array.isArray(e)}function re(e){return typeof e=="function"}function ne(e){return typeof e=="string"}function Tc(e,t){if(e)return ne(e)?{type:Xo,name:e,predicate:t?t[e]:void 0}:re(e)?{type:Xo,name:e.name,predicate:e}:e}function nm(e){try{return"subscribe"in e&&re(e.subscribe)}catch{return!1}}var wt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Lr={},Lr[wt]=function(){return this},Lr[Symbol.observable]=function(){return this};function kt(e){return!!e&&"__xstatenode"in e}function rm(e){return!!e&&typeof e.send=="function"}function Hi(e,t){return ne(e)||typeof e=="number"?V({type:e},t):e}function Ee(e,t){if(!ne(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=Hi(e);return V({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Jt(e,t){var n=xc(t).map(function(r){return typeof r>"u"||typeof r=="string"||kt(r)?{target:r,event:e}:V(V({},r),{event:e})});return n}function im(e){if(!(e===void 0||e===Yv))return Xe(e)}function om(e,t,n){if(!be){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}function Pc(e,t,n,r,i){var o=e.options.guards,a={state:i,cond:t,_event:r};if(t.type===Xo)return((o==null?void 0:o[t.name])||t.predicate)(n,r.data,a);var s=o==null?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Cc(e){return typeof e=="string"?{type:e}:e}function si(e,t,n){var r=function(){},i=typeof e=="object",o=i?e:null;return{next:((i?e.next:e)||r).bind(o),error:((i?e.error:t)||r).bind(o),complete:((i?e.complete:n)||r).bind(o)}}function Dr(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Jo(e){return(e.type===pr||e.type===Gi&&e.to===mn.Internal)&&typeof e.delay!="number"}var fn=Ee({type:Hv});function Qo(e,t){return t&&t[e]||void 0}function ir(e,t){var n;if(ne(e)||typeof e=="number"){var r=Qo(e,t);re(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(re(e))n={type:e.name||e.toString(),exec:e};else{var r=Qo(e.type,t);if(re(r))n=V(V({},e),{exec:r});else if(r){var i=r.type||e.type;n=V(V(V({},r),e),{type:i})}else n=e}return n}var xt=function(e,t){if(!e)return[];var n=Sn(e)?e:[e];return n.map(function(r){return ir(r,t)})};function za(e){var t=ir(e);return V(V({id:ne(e)?e:t.id},t),{type:t.type})}function am(e,t){return{type:pr,event:typeof e=="function"?e:Hi(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function sm(e,t,n,r){var i={_event:n},o=Ee(re(e.event)?e.event(t,n.data,i):e.event),a;if(ne(e.delay)){var s=r&&r[e.delay];a=re(s)?s(t,n.data,i):s}else a=re(e.delay)?e.delay(t,n.data,i):e.delay;return V(V({},e),{type:pr,_event:o,delay:a})}function lm(e,t){return{to:t?t.to:void 0,type:Gi,event:re(e)?e:Hi(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:re(e)?e.name:wc(e)}}function um(e,t,n,r){var i={_event:n},o=Ee(re(e.event)?e.event(t,n.data,i):e.event),a;if(ne(e.delay)){var s=r&&r[e.delay];a=re(s)?s(t,n.data,i):s}else a=re(e.delay)?e.delay(t,n.data,i):e.delay;var l=re(e.to)?e.to(t,n.data,i):e.to;return V(V({},e),{to:l,_event:o,event:o.data,delay:a})}var cm=function(e,t,n){return V(V({},e),{value:ne(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},fm=function(e){return{type:gc,sendId:e}};function dm(e){var t=za(e);return{type:ae.Start,activity:t,exec:void 0}}function pm(e){var t=re(e)?e:za(e);return{type:ae.Stop,activity:t,exec:void 0}}function hm(e,t,n){var r=re(e.activity)?e.activity(t,n.data):e.activity,i=typeof r=="string"?{id:r}:r,o={type:ae.Stop,activity:i};return o}var vm=function(e){return{type:ka,assignment:e}};function mm(e,t){var n=t?"#".concat(t):"";return"".concat(ae.After,"(").concat(e,")").concat(n)}function Vr(e,t){var n="".concat(ae.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function li(e,t){var n="".concat(ae.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Nn(e,t){var n="".concat(ae.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var gm=function(e){var t,n,r=[];try{for(var i=J(e),o=i.next();!o.done;o=i.next())for(var a=o.value,s=0;s<a.actions.length;){if(a.actions[s].type===ka){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r};function xi(e,t,n,r,i,o,a){a===void 0&&(a=!1);var s=a?[]:gm(i),l=s.length?Ys(n,r,s,t):n,u=a?[n]:void 0,c=[];function f(p,v){var y;switch(v.type){case pr:{var m=sm(v,l,r,e.options.delays);return o&&typeof m.delay=="number"&&o(m,l,r),m}case Gi:var S=um(v,l,r,e.options.delays);if(!be){var b=v.delay;Te(!ne(b)||typeof S.delay=="number","No delay reference for delay expression '".concat(b,"' was found on machine '").concat(e.id,"'"))}return o&&S.to!==mn.Internal&&(p==="entry"?c.push(S):o(S,l,r)),S;case yc:{var E=cm(v,l,r);return o==null||o(E,l,r),E}case Uv:{var T=v,w=(y=T.conds.find(function(G){var $=Tc(G.cond,e.options.guards);return!$||Pc(e,$,l,r,o?void 0:t)}))===null||y===void 0?void 0:y.actions;if(!w)return[];var x=te(xi(e,t,l,r,[{type:p,actions:xt(Xe(w),e.options.actions)}],o,a),2),_=x[0],C=x[1];return l=C,u==null||u.push(l),_}case qv:{var w=v.get(l,r.data);if(!w)return[];var P=te(xi(e,t,l,r,[{type:p,actions:xt(Xe(w),e.options.actions)}],o,a),2),O=P[0],R=P[1];return l=R,u==null||u.push(l),O}case Ba:{var E=hm(v,l,r);return o==null||o(E,n,r),E}case ka:{l=Ys(l,r,[v],o?void 0:t),u==null||u.push(l);break}default:var L=ir(v,e.options.actions),N=L.exec;if(o)o(L,l,r);else if(N&&u){var z=u.length-1,B=V(V({},L),{exec:function(G){for(var $=[],k=1;k<arguments.length;k++)$[k-1]=arguments[k];N.apply(void 0,ce([u[z]],te($),!1))}});L=B}return L}}function d(p){var v,y,m=[];try{for(var S=J(p.actions),b=S.next();!b.done;b=S.next()){var E=b.value,T=f(p.type,E);T&&(m=m.concat(T))}}catch(w){v={error:w}}finally{try{b&&!b.done&&(y=S.return)&&y.call(S)}finally{if(v)throw v.error}}return c.forEach(function(w){o(w,l,r)}),c.length=0,m}var h=he(i.map(d));return[h,l]}var rn=function(e,t){var n=t(e);return n};function _c(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[wt]=function(){return this},t}function ym(e,t,n,r){var i,o=Cc(e.src),a=(i=t==null?void 0:t.options.services)===null||i===void 0?void 0:i[o.type],s=e.data?wi(e.data,n,r):void 0,l=a?Oc(a,e.id,s):_c(e.id);return l.meta=e,l}function Oc(e,t,n){var r=_c(t);if(r.deferred=!0,kt(e)){var i=r.state=rn(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return i}}return r}function Sm(e){try{return typeof e.send=="function"}catch{return!1}}function bm(e){return Sm(e)&&"id"in e}function wm(e){var t;return V((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[wt]=function(){return this},t),e)}var Ei=function(e){return e.type==="atomic"||e.type==="final"};function Ac(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function or(e){return Ac(e).filter(function(t){return t.type!=="history"})}function Rc(e){var t=[e];return Ei(e)?t:t.concat(he(or(e).map(Rc)))}function jn(e,t){var n,r,i,o,a,s,l,u,c=new Set(e),f=ea(c),d=new Set(t);try{for(var h=J(d),p=h.next();!p.done;p=h.next())for(var v=p.value,y=v.parent;y&&!d.has(y);)d.add(y),y=y.parent}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=ea(d);try{for(var S=J(d),b=S.next();!b.done;b=S.next()){var v=b.value;if(v.type==="compound"&&(!m.get(v)||!m.get(v).length))f.get(v)?f.get(v).forEach(function(P){return d.add(P)}):v.initialStateNodes.forEach(function(P){return d.add(P)});else if(v.type==="parallel")try{for(var E=(a=void 0,J(or(v))),T=E.next();!T.done;T=E.next()){var w=T.value;d.has(w)||(d.add(w),f.get(w)?f.get(w).forEach(function(P){return d.add(P)}):w.initialStateNodes.forEach(function(P){return d.add(P)}))}}catch(P){a={error:P}}finally{try{T&&!T.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}}}catch(C){i={error:C}}finally{try{b&&!b.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}try{for(var x=J(d),_=x.next();!_.done;_=x.next())for(var v=_.value,y=v.parent;y&&!d.has(y);)d.add(y),y=y.parent}catch(C){l={error:C}}finally{try{_&&!_.done&&(u=x.return)&&u.call(x)}finally{if(l)throw l.error}}return d}function Mc(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(Ei(r))return r.key}else return{}}var i={};return n.forEach(function(o){i[o.key]=Mc(o,t)}),i}function ea(e){var t,n,r=new Map;try{for(var i=J(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function xm(e,t){var n=jn([e],t);return Mc(e,ea(n))}function Bn(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Em(e){return ce([],te(new Set(he(ce([],te(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ui(e,t){return t.type==="compound"?or(t).some(function(n){return n.type==="final"&&Bn(e,n)}):t.type==="parallel"?or(t).every(function(n){return ui(e,n)}):!1}function Tm(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Ks(e){return new Set(he(e.map(function(t){return t.tags})))}function Ic(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(ne(e)||ne(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(i){return Ic(e[i],t[i])})}function Pm(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Cm(e,t){var n=e.exec,r=V(V({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var Ge=function(){function e(t){var n=this,r;this.actions=[],this.activities=Ws,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Ws,this.meta=Tm(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Em(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t;var r=fn;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=fn;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),ne(t))return[t];var i=Object.keys(t);return i.concat.apply(i,ce([],te(i.map(function(o){return r.toStrings(t[o],n).map(function(a){return o+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=ja(t,["configuration","transitions","tags","machine"]);return V(V({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Fa(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;be&&Te(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(i){return i.target!==void 0||i.actions.length})},e}(),_m={deferEvents:!1},Xs=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=V(V({},_m),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),yo=new Map,Om=0,_n={bookId:function(){return"x:".concat(Om++)},register:function(e,t){return yo.set(e,t),e},get:function(e){return yo.get(e)},free:function(e){yo.delete(e)}};function $a(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;be||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function Am(){var e=$a();if(e&&"__xstate__"in e)return e.__xstate__}function Rm(e){if($a()){var t=Am();t&&t.register(e)}}function Mm(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,i=[],o=!1,a=function(){if(!o){for(o=!0;i.length>0;){var u=i.shift();n=e.transition(n,u,l),r.forEach(function(c){return c.next(n)})}o=!1}},s=wm({id:t.id,send:function(u){i.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,c,f){var d=si(u,c,f);return r.add(d),d.next(n),{unsubscribe:function(){r.delete(d)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(l):n,s}var Im={sync:!1,autoForward:!1},we;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(we||(we={}));var Lm=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=we.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(c,f){if(Sn(c))return r.batch(c),r.state;var d=Ee(Hi(c,f));if(r.status===we.Stopped)return be||Te(!1,'Event "'.concat(d.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
19
+ Event: `).concat(JSON.stringify(d.data))),r.state;if(r.status!==we.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(d.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
20
+ Event: `).concat(JSON.stringify(d.data)));return r.scheduler.schedule(function(){r.forward(d);var h=r._nextState(d);r.update(h,d)}),r._state},this.sendTo=function(c,f,d){var h=r.parent&&(f===mn.Parent||r.parent.id===f),p=h?r.parent:ne(f)?f===mn.Internal?r:r.children.get(f)||_n.get(f):rm(f)?f:void 0;if(!p){if(!h)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(r.id,"'."));be||Te(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(c.type));return}if("machine"in p){if(r.status!==we.Stopped||r.parent!==p||r.state.done){var v=V(V({},c),{name:c.name===Wv?"".concat(Nn(r.id)):c.name,origin:r.sessionId});!d&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([p,v]):p.send(v)}}else!d&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([p,c.data]):p.send(c.data)},this._exec=function(c,f,d,h){h===void 0&&(h=r.machine.options.actions);var p=c.exec||Qo(c.type,h),v=re(p)?p:p?p.exec:c.exec;if(v)try{return v(f,d.data,r.machine.config.predictableActionArguments?{action:c,_event:d}:{action:c,state:r.state,_event:d})}catch(N){throw r.parent&&r.parent.send({type:"xstate.error",data:N}),N}switch(c.type){case pr:{var y=c;r.defer(y);break}case Gi:var m=c;if(typeof m.delay=="number"){r.defer(m);return}else m.to?r.sendTo(m._event,m.to,d===fn):r.send(m._event);break;case gc:r.cancel(c.sendId);break;case Yo:{if(r.status!==we.Running)return;var S=c.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[S.id||S.type])break;if(S.type===ae.Invoke){var b=Cc(S.src),E=r.machine.options.services?r.machine.options.services[b.type]:void 0,T=S.id,w=S.data;be||Te(!("forward"in S),"`forward` property is deprecated (found in invocation of '".concat(S.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var x="autoForward"in S?S.autoForward:!!S.forward;if(!E){be||Te(!1,"No service found for invocation '".concat(S.src,"' in machine '").concat(r.machine.id,"'."));return}var _=w?wi(w,f,d):void 0;if(typeof E=="string")return;var C=re(E)?E(f,d.data,{data:_,src:b,meta:S.meta}):E;if(!C)return;var P=void 0;kt(C)&&(C=_?C.withContext(_):C,P={autoForward:x}),r.spawn(C,T,P)}else r.spawnActivity(S);break}case Ba:{r.stopChild(c.activity.id);break}case yc:var O=c,R=O.label,L=O.value;R?r.logger(R,L):r.logger(L);break;default:be||Te(!1,"No implementation found for action type '".concat(c.type,"'"));break}};var i=V(V({},e.defaultOptions),n),o=i.clock,a=i.logger,s=i.parent,l=i.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=o,this.parent=s,this.options=i,this.scheduler=new Xs({deferEvents:this.options.deferEvents}),this.sessionId=_n.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:rn(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return be||Te(this.status!==we.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,i;try{for(var o=J(t.actions),a=o.next();!a.done;a=o.next()){var s=a.value;this.exec(s,t,n)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,i,o,a,s,l,u,c,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===fn)&&this.options.execute)this.execute(this.state);else for(var d=void 0;d=this._outgoingQueue.shift();)d[0].send(d[1]);if(this.children.forEach(function(C){f.state.children[C.id]=C}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var h=J(this.eventListeners),p=h.next();!p.done;p=h.next()){var v=p.value;v(t.event)}}catch(C){r={error:C}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var y=J(this.listeners),m=y.next();!m.done;m=y.next()){var v=m.value;v(t,t.event)}}catch(C){o={error:C}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}try{for(var S=J(this.contextListeners),b=S.next();!b.done;b=S.next()){var E=b.value;E(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(C){s={error:C}}finally{try{b&&!b.done&&(l=S.return)&&l.call(S)}finally{if(s)throw s.error}}if(this.state.done){var T=t.configuration.find(function(C){return C.type==="final"&&C.parent===f.machine}),w=T&&T.doneData?wi(T.doneData,t.context,n):void 0;this._doneEvent=li(this.id,w);try{for(var x=J(this.doneListeners),_=x.next();!_.done;_=x.next()){var v=_.value;v(this._doneEvent)}}catch(C){u={error:C}}finally{try{_&&!_.done&&(c=x.return)&&c.call(x)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),_n.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===we.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var i=this,o=si(t,n,r);this.listeners.add(o.next),this.status!==we.NotStarted&&o.next(this.state);var a=function(){i.doneListeners.delete(a),i.stopListeners.delete(a),o.complete()};return this.status===we.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(a),i.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===we.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===we.Running)return this;this.machine._init(),_n.register(this.sessionId,this),this.initialized=!0,this.status=we.Running;var r=t===void 0?this.initialState:rn(this,function(){return Pm(t)?n.machine.resolveState(t):n.machine.resolveState(Ge.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,fn)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){re(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,i,o,a,s,l,u,c;try{for(var f=J(this.listeners),d=f.next();!d.done;d=f.next()){var h=d.value;this.listeners.delete(h)}}catch(x){t={error:x}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var p=J(this.stopListeners),v=p.next();!v.done;v=p.next()){var h=v.value;h(),this.stopListeners.delete(h)}}catch(x){r={error:x}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}try{for(var y=J(this.contextListeners),m=y.next();!m.done;m=y.next()){var h=m.value;this.contextListeners.delete(h)}}catch(x){o={error:x}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}try{for(var S=J(this.doneListeners),b=S.next();!b.done;b=S.next()){var h=b.value;this.doneListeners.delete(h)}}catch(x){s={error:x}}finally{try{b&&!b.done&&(l=S.return)&&l.call(S)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=we.Stopped,this._initialState=void 0;try{for(var E=J(Object.keys(this.delayedEventsMap)),T=E.next();!T.done;T=E.next()){var w=T.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(x){u={error:x}}finally{try{T&&!T.done&&(c=E.return)&&c.call(E)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new Xs({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=t._state)===null||r===void 0)&&r.done)){var i=Ee({type:"xstate.stop"}),o=rn(t,function(){var a=he(ce([],te(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return xt(f.onExit,t.machine.options.actions)})),s=te(xi(t.machine,t.state,t.state.context,i,[{type:"exit",actions:a}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),l=s[0],u=s[1],c=new Ge({value:t.state.value,context:u,_event:i,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:l.filter(function(f){return!Jo(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return c.changed=!0,c});t.update(o,i),t._stopChildren(),_n.free(t.sessionId)}}),this},e.prototype.batch=function(t){var n=this;if(this.status===we.NotStarted&&this.options.deferEvents)be||Te(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
21
+ Event: `).concat(JSON.stringify(event)));else if(this.status!==we.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,o,a=n.state,s=!1,l=[],u=function(h){var p=Ee(h);n.forward(p),a=rn(n,function(){return n.machine.transition(a,p,void 0,r||void 0)}),l.push.apply(l,ce([],te(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return Cm(v,a)})),!1)),s=s||!!a.changed};try{for(var c=J(t),f=c.next();!f.done;f=c.next()){var d=f.value;u(d)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}a.changed=s,a.actions=l,n.update(a,Ee(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var i=Ee(t);if(i.name.indexOf(Hs)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Hs)===0}))throw i.data.data;var o=rn(this,function(){return r.machine.transition(r.state,i,void 0,n||void 0)});return o},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var i=J(this.forwardTo),o=i.next();!o.done;o=i.next()){var a=o.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),re(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==we.Running)return Oc(t,n);if(qs(t))return this.spawnPromise(Promise.resolve(t),n);if(re(t))return this.spawnCallback(t,n);if(bm(t))return this.spawnActor(t,n);if(nm(t))return this.spawnObservable(t,n);if(kt(t))return this.spawnMachine(t,V(V({},r),{id:n}));if(Qv(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var i=new e(t,V(V({},this.options),{parent:this,id:n.id||t.id})),o=V(V({},Im),n);o.sync&&i.onTransition(function(s){r.send(Sc,{state:s,id:i.id})});var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(s){r.removeChild(i.id),r.send(Ee(s,{origin:i.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Mm(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,i=this,o=!1,a;t.then(function(l){o||(a=l,i.removeChild(n),i.send(Ee(li(n,l),{origin:n})))},function(l){if(!o){i.removeChild(n);var u=Nn(n,l);try{i.send(Ee(u,{origin:n}))}catch(c){om(l,c,n),i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(l,u,c){var f=si(l,u,c),d=!1;return t.then(function(h){d||(f.next(h),!d&&f.complete())},function(h){d||f.error(h)}),{unsubscribe:function(){return d=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[wt]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,i=this,o=!1,a=new Set,s=new Set,l,u=function(d){l=d,s.forEach(function(h){return h(d)}),!o&&i.send(Ee(d,{origin:n}))},c;try{c=t(u,function(d){a.add(d)})}catch(d){this.send(Nn(n,d))}if(qs(c))return this.spawnPromise(c,n);var f=(r={id:n,send:function(d){return a.forEach(function(h){return h(d)})},subscribe:function(d){var h=si(d);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){o=!0,re(c)&&c()},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[wt]=function(){return this},r);return this.children.set(n,f),f},e.prototype.spawnObservable=function(t,n){var r,i=this,o,a=t.subscribe(function(l){o=l,i.send(Ee(l,{origin:n}))},function(l){i.removeChild(n),i.send(Ee(Nn(n,l),{origin:n}))},function(){i.removeChild(n),i.send(Ee(li(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(l,u,c){return t.subscribe(l,u,c)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[wt]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){be||Te(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[wt]=function(){return this},r))},e.prototype.attachDev=function(){var t=$a();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(V(V({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:V({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Rm(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[wt]=function(){return this},e.prototype.getSnapshot=function(){return this.status===we.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Lc,e}();function Lc(e,t){var n=new Lm(e,t);return n}function Dm(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Nr(e){return V(V({type:Ko},e),{toJSON:function(){e.onDone,e.onError;var t=ja(e,["onDone","onError"]);return V(V({},t),{type:Ko,src:Dm(e.src)})}})}var on="",ta="#",On="*",Qt={},en=function(e){return e[0]===ta},Vm=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Nm=function(e,t,n){var r=n.slice(0,-1).some(function(o){return!("cond"in o)&&!("in"in o)&&(ne(o.target)||kt(o.target))}),i=t===on?"the transient event":"event '".concat(t,"'");Te(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},jm=function(){function e(t,n,r,i){r===void 0&&(r="context"in t?t.context:void 0);var o=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Vm(),n),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:bc),this.id=this.config.id||ce([this.machine.key],te(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,be||Te(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Vn(this.config.states,function(u,c){var f,d=new e(u,{},void 0,{parent:o,key:c});return Object.assign(o.idMap,V((f={},f[d.id]=d,f),d.idMap)),d}):Qt;var s=0;function l(u){var c,f;u.order=s++;try{for(var d=J(Ac(u)),h=d.next();!h.done;h=d.next()){var p=h.value;l(p)}}catch(v){c={error:v}}finally{try{h&&!h.done&&(f=d.return)&&f.call(d)}finally{if(c)throw c.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var c=u.event;return c===on}):on in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Xe(this.config.entry||this.config.onEntry).map(function(u){return ir(u)}),this.onExit=Xe(this.config.exit||this.config.onExit).map(function(u){return ir(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Xe(this.config.invoke).map(function(u,c){var f,d;if(kt(u)){var h=Dr(o.id,c);return o.machine.options.services=V((f={},f[h]=u,f),o.machine.options.services),Nr({src:h,id:h})}else if(ne(u.src)){var h=u.id||Dr(o.id,c);return Nr(V(V({},u),{id:h,src:u.src}))}else if(kt(u.src)||re(u.src)){var h=u.id||Dr(o.id,c);return o.machine.options.services=V((d={},d[h]=u.src,d),o.machine.options.services),Nr(V(V({id:h},u),{src:h}))}else{var p=u.src;return Nr(V(V({id:Dr(o.id,c)},u),{src:p}))}}),this.activities=Xe(this.config.activities).concat(this.invoke).map(function(u){return za(u)}),this.transition=this.transition.bind(this),this.tags=Xe(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Rc(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,l=r.delays;return new e(this.config,{actions:V(V({},i),t.actions),activities:V(V({},o),t.activities),guards:V(V({},a),t.guards),services:V(V({},s),t.services),delays:V(V({},l),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return re(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Vn(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===on,r=this.transitions.filter(function(i){var o=i.eventType===t;return n?o:o||i.eventType===On});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(o,a){var s=re(o)?"".concat(t.id,":delay[").concat(a,"]"):o,l=mm(s,t.id);return t.onEntry.push(lm(l,{delay:o})),t.onExit.push(fm(l)),l},i=Sn(n)?n.map(function(o,a){var s=r(o.delay,a);return V(V({},o),{event:s})}):he(Object.keys(n).map(function(o,a){var s=n[o],l=ne(s)?{target:s}:s,u=isNaN(+o)?o:+o,c=r(u,a);return Xe(l).map(function(f){return V(V({},f),{event:c,delay:u})})}));return i.map(function(o){var a=o.delay;return V(V({},t.formatTransition(o)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var i=t instanceof Ge?t.value:zn(t,this.delimiter);if(ne(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((n={},n[i]=o,n)):[this,this.states[i]]}var a=Object.keys(i),s=[this];return s.push.apply(s,ce([],te(he(a.map(function(l){return r.getStateNode(l).getStateNodes(i[l])}))),!1)),s},e.prototype.handles=function(t){var n=wc(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof Ge?t:Ge.create(t),r=Array.from(jn([],this.getStateNodes(n.value)));return new Ge(V(V({},n),{value:this.resolve(n.value),configuration:r,done:ui(r,this),tags:Ks(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var i=this.getStateNode(t),o=i.next(n,r);return!o||!o.transitions.length?this.next(n,r):o},e.prototype.transitionCompoundNode=function(t,n,r){var i=Object.keys(t),o=this.getStateNode(i[0]),a=o._transition(t[i[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var i,o,a={};try{for(var s=J(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,c=t[u];if(c){var f=this.getStateNode(u),d=f._transition(c,n,r);d&&(a[u]=d)}}}catch(m){i={error:m}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}var h=Object.keys(a).map(function(m){return a[m]}),p=he(h.map(function(m){return m.transitions})),v=h.some(function(m){return m.transitions.length>0});if(!v)return this.next(n,r);var y=he(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:p,exitSet:he(h.map(function(m){return m.exitSet})),configuration:y,source:n,actions:he(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,n,r){return ne(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Ee(n))},e.prototype.next=function(t,n){var r,i,o=this,a=n.name,s=[],l=[],u;try{for(var c=J(this.getCandidates(a)),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.cond,p=d.in,v=t.context,y=p?ne(p)&&en(p)?t.matches(zn(this.getStateNodeById(p).path,this.delimiter)):Fa(zn(p,this.delimiter),Xv(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||Pc(this.machine,h,v,n,t)}catch(E){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
22
+ `).concat(E.message))}if(m&&y){d.target!==void 0&&(l=d.target),s.push.apply(s,ce([],te(d.actions),!1)),u=d;break}}}catch(E){r={error:E}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var S=he(l.map(function(E){return o.getRelativeStateNodes(E,t.historyValue)})),b=!!u.internal;return{transitions:[u],exitSet:b?[]:he(l.map(function(E){return o.getPotentiallyReenteringNodes(E)})),configuration:S,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,i=t;r&&r!==i;)n.push(r),r=r.parent;return r!==i?[]:(n.push(i),n)},e.prototype.getActions=function(t,n,r,i,o,a,s){var l,u,c,f,d=this,h=a?jn([],this.getStateNodes(a.value)):[],p=new Set;try{for(var v=J(Array.from(t).sort(function(O,R){return O.order-R.order})),y=v.next();!y.done;y=v.next()){var m=y.value;(!Bn(h,m)||Bn(r.exitSet,m)||m.parent&&p.has(m.parent))&&p.add(m)}}catch(O){l={error:O}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var S=J(h),b=S.next();!b.done;b=S.next()){var m=b.value;(!Bn(t,m)||Bn(r.exitSet,m.parent))&&r.exitSet.push(m)}}catch(O){c={error:O}}finally{try{b&&!b.done&&(f=S.return)&&f.call(S)}finally{if(c)throw c.error}}r.exitSet.sort(function(O,R){return R.order-O.order});var E=Array.from(p).sort(function(O,R){return O.order-R.order}),T=new Set(r.exitSet),w=he(E.map(function(O){var R=[];if(O.type!=="final")return R;var L=O.parent;if(!L.parent)return R;R.push(Vr(O.id,O.doneData),Vr(L.id,O.doneData?wi(O.doneData,i,o):void 0));var N=L.parent;return N.type==="parallel"&&or(N).every(function(z){return ui(r.configuration,z)})&&R.push(Vr(N.id)),R})),x=E.map(function(O){var R=O.onEntry,L=O.activities.map(function(N){return dm(N)});return{type:"entry",actions:xt(s?ce(ce([],te(R),!1),te(L),!1):ce(ce([],te(L),!1),te(R),!1),d.machine.options.actions)}}).concat({type:"state_done",actions:w.map(function(O){return am(O)})}),_=Array.from(T).map(function(O){return{type:"exit",actions:xt(ce(ce([],te(O.onExit),!1),te(O.activities.map(function(R){return pm(R)})),!1),d.machine.options.actions)}}),C=_.concat({type:"transition",actions:xt(r.actions,this.machine.options.actions)}).concat(x);if(n){var P=xt(he(ce([],te(t),!1).sort(function(O,R){return R.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!Jo(O)});return C.concat({type:"stop",actions:P})}return C},e.prototype.transition=function(t,n,r,i){t===void 0&&(t=this.initialState);var o=Ee(n),a;if(t instanceof Ge)a=r===void 0?t:this.resolveState(Ge.from(t,r));else{var s=ne(t)?this.resolve(bi(this.getResolvedPath(t))):this.resolve(t),l=r??this.machine.context;a=this.resolveState(Ge.from(s,l))}if(!be&&o.name===On)throw new Error("An event cannot have the wildcard type ('".concat(On,"')"));if(this.strict&&!this.events.includes(o.name)&&!Jv(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(a.value,a,o)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},c=jn([],this.getStateNodes(a.value)),f=u.configuration.length?jn(c,u.configuration):c;return u.configuration=ce([],te(f),!1),this.resolveTransition(u,a,a.context,i,o)},e.prototype.resolveRaisedTransition=function(t,n,r,i){var o,a=t.actions;return t=this.transition(t,n,void 0,i),t._event=r,t.event=r.data,(o=t.actions).unshift.apply(o,ce([],te(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,i,o){var a,s,l,u,c=this;o===void 0&&(o=fn);var f=t.configuration,d=!n||t.transitions.length>0,h=d?t.configuration:n?n.configuration:[],p=ui(h,this),v=d?xm(this.machine,f):void 0,y=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,m=this.getActions(new Set(h),p,t,r,o,n,i),S=n?V({},n.activities):{};try{for(var b=J(m),E=b.next();!E.done;E=b.next()){var T=E.value;try{for(var w=(l=void 0,J(T.actions)),x=w.next();!x.done;x=w.next()){var _=x.value;_.type===Yo?S[_.activity.id||_.activity.type]=_:_.type===Ba&&(S[_.activity.id||_.activity.type]=!1)}}catch(D){l={error:D}}finally{try{x&&!x.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}}}catch(D){a={error:D}}finally{try{E&&!E.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}var C=te(xi(this,n,r,o,m,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),P=C[0],O=C[1],R=te(em(P,Jo),2),L=R[0],N=R[1],z=P.filter(function(D){var j;return D.type===Yo&&((j=D.activity)===null||j===void 0?void 0:j.type)===Ko}),B=z.reduce(function(D,j){return D[j.activity.id]=ym(j.activity,c.machine,O,o),D},n?V({},n.children):{}),G=new Ge({value:v||n.value,context:O,_event:o,_sessionid:n?n._sessionid:null,historyValue:v?y?tm(y,v):void 0:n?n.historyValue:void 0,history:!v||t.source?n:void 0,actions:v?N:[],activities:v?S:n?n.activities:{},events:[],configuration:h,transitions:t.transitions,children:B,done:p,tags:Ks(h),machine:this}),$=r!==O;G.changed=o.name===Sc||$;var k=G.history;k&&delete k.history;var Y=!p&&(this._transient||f.some(function(D){return D._transient}));if(!d&&(!Y||o.name===on))return G;var Q=G;if(!p)for(Y&&(Q=this.resolveRaisedTransition(Q,{type:Gv},o,i));L.length;){var W=L.shift();Q=this.resolveRaisedTransition(Q,W._event,o,i)}var q=Q.changed||(k?!!Q.actions.length||$||typeof k.value!=typeof Q.value||!Ic(Q.value,k.value):void 0);return Q.changed=q,Q.history=k,Q},e.prototype.getStateNode=function(t){if(en(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=en(t)?t.slice(ta.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&en(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=Zo(t,this.delimiter).slice(),r=this;n.length;){var i=n.shift();if(!i.length)break;r=r.getStateNode(i)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||Qt;switch(this.type){case"parallel":return Vn(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(t[a]||o):Qt});case"compound":if(ne(t)){var i=this.getStateNode(t);return i.type==="parallel"||i.type==="compound"?(n={},n[t]=i.initialStateValue,n):t}return Object.keys(t).length?Vn(t,function(o,a){return o?r.getStateNode(a).resolve(o):Qt}):this.initialStateValue||{};default:return t||Qt}},e.prototype.getResolvedPath=function(t){if(en(t)){var n=this.machine.idMap[t.slice(ta.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Zo(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Us(this.states,function(r){return r.initialStateValue||Qt},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=Ei(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;ne(n.target)?t=en(n.target)?bi(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(Ei(this))return[this];if(this.type==="compound"&&!this.initial)return be||Te(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=ai(this.initialStateValue);return he(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=te(t),r=n[0],i=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var o=this.getStateNode(r);if(o.type==="history")return o.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(i)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Us(this.states,function(n,r){if(!t)return n.historyValue();var i=ne(t)?void 0:t[r];return n.historyValue(i||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var i=this.target;return i?he(ai(i).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=Zv(r.path,"states")(t).current;return ne(o)?[r.getStateNode(o)]:he(ai(o).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=he(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,i;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var s=J(Object.keys(o)),l=s.next();!l.done;l=s.next()){var u=l.value,c=o[u];if(c.states)try{for(var f=(r=void 0,J(c.events)),d=f.next();!d.done;d=f.next()){var h=d.value;a.add("".concat(h))}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}}catch(p){t={error:p}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!ne(r))return r;var i=r[0]===n.delimiter;if(i&&!n.parent)return n.getStateNodeByPath(r.slice(1));var o=i?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
23
+ `).concat(s.message))}else return n.getStateNodeByPath(o)})},e.prototype.formatTransition=function(t){var n=this,r=im(t.target),i="internal"in t?t.internal:r?r.some(function(l){return ne(l)&&l[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(r),s=V(V({},t),{actions:xt(Xe(t.actions)),cond:Tc(t.cond,o),target:a,source:this,internal:i,eventType:t.event,toJSON:function(){return V(V({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,a=On,s=o[a],l=s===void 0?[]:s,u=ja(o,[typeof a=="symbol"?a:a+""]);i=he(Object.keys(u).map(function(S){!be&&S===on&&Te(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var b=Jt(S,u[S]);return be||Nm(r,S,b),b}).concat(Jt(On,l)))}var c=this.config.always?Jt("",this.config.always):[],f=this.config.onDone?Jt(String(Vr(this.id)),this.config.onDone):[];be||Te(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var d=he(this.invoke.map(function(S){var b=[];return S.onDone&&b.push.apply(b,ce([],te(Jt(String(li(S.id)),S.onDone)),!1)),S.onError&&b.push.apply(b,ce([],te(Jt(String(Nn(S.id)),S.onError)),!1)),b})),h=this.after,p=he(ce(ce(ce(ce([],te(f),!1),te(d),!1),te(i),!1),te(c),!1).map(function(S){return Xe(S).map(function(b){return r.formatTransition(b)})}));try{for(var v=J(h),y=v.next();!y.done;y=v.next()){var m=y.value;p.push(m)}}catch(S){t={error:S}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return p},e}();function Bm(e,t,n){return n===void 0&&(n=e.context),new jm(e,t,n)}var km=vm,na;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(na||(na={}));var $n=g.useLayoutEffect;function Zs(e){var t=mi.useRef();return t.current||(t.current={v:e()}),t.current.v}var Fm=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function $m(e,t){var n,r,i=Fm([[],[]],2),o=i[0],a=i[1];try{for(var s=zm(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?o.push(u):a.push(u)}}catch(c){n={error:c}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}var An=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Js=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};function Qs(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function Gm(e){var t=g.useRef([]),n=g.useRef([]);$n(function(){var r=e.subscribe(function(i){var o,a;if(i.actions.length){var s=i.actions.filter(function(f){return typeof f.exec=="function"&&"__effect"in f.exec}),l=An($m(s,function(f){return f.exec.__effect===na.Effect}),2),u=l[0],c=l[1];(o=t.current).push.apply(o,Js([],An(u.map(function(f){return[f,i]})),!1)),(a=n.current).push.apply(a,Js([],An(c.map(function(f){return[f,i]})),!1))}});return function(){r.unsubscribe()}},[]),$n(function(){for(;n.current.length;){var r=An(n.current.shift(),2),i=r[0],o=r[1];Qs(i,o)}}),g.useEffect(function(){for(;t.current.length;){var r=An(t.current.shift(),2),i=r[0],o=r[1];Qs(i,o)}})}var Gn=function(){return Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Gn.apply(this,arguments)},Hm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Wm=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Um(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function qm(e,t,n){t===void 0&&(t={});var r=Zs(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var i=Wm(g.useState(r),1),o=i[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,l=t.actions,u=t.activities,c=t.services,f=t.delays,d=t.state,h=Hm(t,["context","guards","actions","activities","services","delays","state"]),p=Zs(function(){var v={context:a,guards:s,actions:l,activities:u,services:c,delays:f},y=r.withConfig(v,function(){return Gn(Gn({},r.context),a)});return Lc(y,Gn({deferEvents:!0},h))});return $n(function(){var v;return n&&(v=p.subscribe(Um(n))),function(){v==null||v.unsubscribe()}},[n]),$n(function(){return p.start(d?Ge.create(d):void 0),function(){p.stop()}},[]),$n(function(){Object.assign(p.machine.options.actions,l),Object.assign(p.machine.options.guards,s),Object.assign(p.machine.options.activities,u),Object.assign(p.machine.options.services,c),Object.assign(p.machine.options.delays,f)},[l,s,u,c,f]),Gm(p),p}var Ym=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Km(e,t){t===void 0&&(t={});var n=g.useCallback(function(s){var l=s.changed===void 0&&Object.keys(s.children).length;(s.changed||l)&&a(s)},[]),r=qm(e,t,n),i=Ym(g.useState(function(){var s=r.machine.initialState;return t.state?Ge.create(t.state):s}),2),o=i[0],a=i[1];return[o,r.send,r]}var jr={exports:{}},So={};/**
24
+ * @license React
25
+ * use-sync-external-store-shim.production.js
26
+ *
27
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */var el;function Xm(){if(el)return So;el=1;var e=g;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),v=p[0].inst,y=p[1];return o(function(){v.value=h,v.getSnapshot=d,l(v)&&y({inst:v})},[f,h,d]),i(function(){return l(v)&&y({inst:v}),f(function(){l(v)&&y({inst:v})})},[f]),a(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function u(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return So.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,So}var bo={};/**
32
+ * @license React
33
+ * use-sync-external-store-shim.development.js
34
+ *
35
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */var tl;function Zm(){return tl||(tl=1,process.env.NODE_ENV!=="production"&&function(){function e(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}function t(h,p){c||i.startTransition===void 0||(c=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=p();if(!f){var y=p();o(v,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=a({inst:{value:v,getSnapshot:p}});var m=y[0].inst,S=y[1];return l(function(){m.value=v,m.getSnapshot=p,n(m)&&S({inst:m})},[h,v,p]),s(function(){return n(m)&&S({inst:m}),h(function(){n(m)&&S({inst:m})})},[h]),u(v),v}function n(h){var p=h.getSnapshot;h=h.value;try{var v=p();return!o(h,v)}catch{return!0}}function r(h,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=g,o=typeof Object.is=="function"?Object.is:e,a=i.useState,s=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,c=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;bo.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),bo}var nl;function Dc(){return nl||(nl=1,process.env.NODE_ENV==="production"?jr.exports=Xm():jr.exports=Zm()),jr.exports}function me(){return me=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},me.apply(null,arguments)}function dn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const Z={arr:Array.isArray,obj:e=>Object.prototype.toString.call(e)==="[object Object]",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0,nul:e=>e===null,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(Z.str(e)||Z.num(e))return e===t;if(Z.obj(e)&&Z.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return Z.und(n)?e===t:!0}};function Jm(e,t){return n=>(Z.arr(n)?n:Object.keys(n)).reduce((r,i)=>{const o=i;return r[o]=e(o),r},e)}function Qm(){const e=g.useState(!1),t=e[1];return g.useCallback(()=>t(r=>!r),[])}function Rt(e,t){return Z.und(e)||Z.nul(e)?t:e}function Br(e){return Z.und(e)?[]:Z.arr(e)?e:[e]}function an(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Z.fun(e)?e(...n):e}function eg(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,dn(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function wo(e){const t=eg(e);if(Z.und(t))return me({to:t},e);const n=Object.keys(e).reduce((r,i)=>Z.und(t[i])?me({},r,{[i]:e[i]}):r,{});return me({to:t},n)}function tg(e,t){return t&&(Z.fun(t)?t(e):Z.obj(t)&&(t.current=e)),e}class Je{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(t){this.children.length===0&&this.attach(),this.children.push(t)}removeChild(t){const n=this.children.indexOf(t);this.children.splice(n,1),this.children.length===0&&this.detach()}}class ra extends Je{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(t=>t instanceof Je&&t.addChild(this)),this.detach=()=>this.payload.forEach(t=>t instanceof Je&&t.removeChild(this))}}class Vc extends Je{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(t=>t instanceof Je&&t.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(t=>t instanceof Je&&t.removeChild(this))}getValue(t){t===void 0&&(t=!1);const n={};for(const r in this.payload){const i=this.payload[r];t&&!(i instanceof Je)||(n[r]=i instanceof Je?i[t?"getAnimatedValue":"getValue"]():i)}return n}getAnimatedValue(){return this.getValue(!0)}}let Ga;function ng(e,t){Ga={fn:e,transform:t}}let Nc;function rg(e){Nc=e}let jc=e=>typeof window<"u"?window.requestAnimationFrame(e):-1,Ti;function ig(e){Ti=e}let Bc=()=>Date.now(),og=e=>e.current,kc;function ag(e){kc=e}class sg extends Vc{constructor(t,n){super(),this.update=void 0,this.payload=t.style?me({},t,{style:kc(t.style)}):t,this.update=n,this.attach()}}const lg=e=>Z.fun(e)&&!(e.prototype instanceof g.Component),ug=e=>g.forwardRef((n,r)=>{const i=Qm(),o=g.useRef(!0),a=g.useRef(null),s=g.useRef(null),l=g.useCallback(d=>{const h=a.current,p=()=>{let v=!1;s.current&&(v=Ga.fn(s.current,a.current.getAnimatedValue())),(!s.current||v===!1)&&i()};a.current=new sg(d,p),h&&h.detach()},[]);g.useEffect(()=>()=>{o.current=!1,a.current&&a.current.detach()},[]),g.useImperativeHandle(r,()=>og(s)),l(n);const u=a.current.getValue();u.scrollTop,u.scrollLeft;const c=dn(u,["scrollTop","scrollLeft"]),f=lg(e)?void 0:d=>s.current=tg(d,r);return g.createElement(e,me({},c,{ref:f}))});let Hn=!1;const Vt=new Set,Fc=()=>{if(!Hn)return!1;let e=Bc();for(let t of Vt){let n=!1;for(let r=0;r<t.configs.length;r++){let i=t.configs[r],o,a;for(let s=0;s<i.animatedValues.length;s++){let l=i.animatedValues[s];if(l.done)continue;let u=i.fromValues[s],c=i.toValues[s],f=l.lastPosition,d=c instanceof Je,h=Array.isArray(i.initialVelocity)?i.initialVelocity[s]:i.initialVelocity;if(d&&(c=c.getValue()),i.immediate){l.setValue(c),l.done=!0;continue}if(typeof u=="string"||typeof c=="string"){l.setValue(c),l.done=!0;continue}if(i.duration!==void 0)f=u+i.easing((e-l.startTime)/i.duration)*(c-u),o=e>=l.startTime+i.duration;else if(i.decay)f=u+h/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-l.startTime))),o=Math.abs(l.lastPosition-f)<.1,o&&(c=f);else{a=l.lastTime!==void 0?l.lastTime:e,h=l.lastVelocity!==void 0?l.lastVelocity:i.initialVelocity,e>a+64&&(a=e);let p=Math.floor(e-a);for(let S=0;S<p;++S){let b=-i.tension*(f-c),E=-i.friction*h,T=(b+E)/i.mass;h=h+T*1/1e3,f=f+h*1/1e3}let v=i.clamp&&i.tension!==0?u<c?f>c:f<c:!1,y=Math.abs(h)<=i.precision,m=i.tension!==0?Math.abs(c-f)<=i.precision:!0;o=v||y&&m,l.lastVelocity=h,l.lastTime=e}d&&!i.toValues[s].done&&(o=!1),o?(l.value!==c&&(f=c),l.done=!0):n=!0,l.setValue(f),l.lastPosition=f}t.props.onFrame&&(t.values[i.name]=i.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Vt.delete(t),t.stop(!0))}return Vt.size?jc(Fc):Hn=!1,Hn},cg=e=>{Vt.has(e)||Vt.add(e),Hn||(Hn=!0,jc(Fc))},fg=e=>{Vt.has(e)&&Vt.delete(e)};function Pi(e,t,n){if(typeof e=="function")return e;if(Array.isArray(e))return Pi({range:e,output:t,extrapolate:n});if(Ti&&typeof e.output[0]=="string")return Ti(e);const r=e,i=r.output,o=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{const c=pg(u,o);return dg(u,o[c],o[c+1],i[c],i[c+1],l,a,s,r.map)}}function dg(e,t,n,r,i,o,a,s,l){let u=l?l(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:i===1/0?u=u+r:u=u*(i-r)+r,u)}function pg(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}class gn extends ra{constructor(t,n,r,i){super(),this.calc=void 0,this.payload=t instanceof ra&&!(t instanceof gn)?t.getPayload():Array.isArray(t)?t:[t],this.calc=Pi(n,r,i)}getValue(){return this.calc(...this.payload.map(t=>t.getValue()))}updateConfig(t,n,r){this.calc=Pi(t,n,r)}interpolate(t,n,r){return new gn(this,t,n,r)}}const tn=(e,t,n)=>e&&new gn(e,t,n),hg={default:{tension:170,friction:26}};function zc(e,t){"update"in e?t.add(e):e.getChildren().forEach(n=>zc(n,t))}class ia extends Je{constructor(t){var n;super(),n=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(r,i){i===void 0&&(i=!0),n.value=r,i&&n.flush()},this.value=t,this.startPosition=t,this.lastPosition=t}flush(){this.animatedStyles.size===0&&zc(this,this.animatedStyles),this.animatedStyles.forEach(t=>t.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(t,n,r){return new gn(this,t,n,r)}}class vg extends ra{constructor(t){super(),this.payload=t.map(n=>new ia(n))}setValue(t,n){n===void 0&&(n=!0),Array.isArray(t)?t.length===this.payload.length&&t.forEach((r,i)=>this.payload[i].setValue(r,n)):this.payload.forEach(r=>r.setValue(t,n))}getValue(){return this.payload.map(t=>t.getValue())}interpolate(t,n){return new gn(this,t,n)}}let mg=0,gg=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=mg++}update(t){if(!t)return this;const n=wo(t),r=n.delay,i=r===void 0?0:r,o=n.to,a=dn(n,["delay","to"]);if(Z.arr(o)||Z.fun(o))this.queue.push(me({},a,{delay:i,to:o}));else if(o){let s={};Object.entries(o).forEach(l=>{let u=l[0],c=l[1];const f=me({to:{[u]:c},delay:an(i,u)},a),d=s[f.delay]&&s[f.delay].to;s[f.delay]=me({},s[f.delay],f,{to:me({},d,f.to)})}),this.queue=Object.values(s)}return this.queue=this.queue.sort((s,l)=>s.delay-l.delay),this.diff(a),this}start(t){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let o=i.from,a=o===void 0?{}:o,s=i.to,l=s===void 0?{}:s;Z.obj(a)&&(this.merged=me({},a,this.merged)),Z.obj(l)&&(this.merged=me({},this.merged,l))});const n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((i,o)=>{let a=i.delay,s=dn(i,["delay"]);const l=c=>{o===r.length-1&&n===this.guid&&c&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),t&&t()};let u=Z.arr(s.to)||Z.fun(s.to);a?setTimeout(()=>{n===this.guid&&(u?this.runAsync(s,l):this.diff(s).start(l))},a):u?this.runAsync(s,l):this.diff(s).start(l)})}else Z.fun(t)&&this.listeners.push(t),this.props.onStart&&this.props.onStart(),cg(this);return this}stop(t){return this.listeners.forEach(n=>n(t)),this.listeners=[],this}pause(t){return this.stop(!0),t&&fg(this),this}runAsync(t,n){var r=this;t.delay;let i=dn(t,["delay"]);const o=this.local;let a=Promise.resolve(void 0);if(Z.arr(i.to))for(let s=0;s<i.to.length;s++){const l=s,u=me({},i,wo(i.to[l]));Z.arr(u.config)&&(u.config=u.config[l]),a=a.then(()=>{if(o===this.guid)return new Promise(c=>this.diff(u).start(c))})}else if(Z.fun(i.to)){let s=0,l;a=a.then(()=>i.to(u=>{const c=me({},i,wo(u));if(Z.arr(c.config)&&(c.config=c.config[s]),s++,o===this.guid)return l=new Promise(f=>this.diff(c).start(f))},function(u){return u===void 0&&(u=!0),r.stop(u)}).then(()=>l))}a.then(n)}diff(t){this.props=me({},this.props,t);let n=this.props,r=n.from,i=r===void 0?{}:r,o=n.to,a=o===void 0?{}:o,s=n.config,l=s===void 0?{}:s,u=n.reverse,c=n.attach,f=n.reset,d=n.immediate;if(u){var h=[a,i];i=h[0],a=h[1]}this.merged=me({},i,this.merged,a),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce((v,y)=>{let m=y[0],S=y[1],b=v[m]||{};const E=Z.num(S),T=Z.str(S)&&!S.startsWith("#")&&!/\d/.test(S)&&!Nc[S],w=Z.arr(S),x=!E&&!w&&!T;let _=Z.und(i[m])?S:i[m],C=E||w||T?S:1,P=an(l,m);p&&(C=p.animations[m].parent);let O=b.parent,R=b.interpolation,L=Br(p?C.getPayload():C),N,z=S;x&&(z=Ti({range:[0,1],output:[S,S]})(1));let B=R&&R.getValue();const $=!Z.und(O)&&b.animatedValues.some(W=>!W.done),k=!Z.equ(z,B),Y=!Z.equ(z,b.previous),Q=!Z.equ(P,b.config);if(f||Y&&k||Q){if(E||T)O=R=b.parent||new ia(_);else if(w)O=R=b.parent||new vg(_);else if(x){let W=b.interpolation&&b.interpolation.calc(b.parent.value);W=W!==void 0&&!f?W:_,b.parent?(O=b.parent,O.setValue(0,!1)):O=new ia(0);const q={output:[W,S]};b.interpolation?(R=b.interpolation,b.interpolation.updateConfig(q)):R=O.interpolate(q)}return L=Br(p?C.getPayload():C),N=Br(O.getPayload()),f&&!x&&O.setValue(_,!1),this.hasChanged=!0,N.forEach(W=>{W.startPosition=W.value,W.lastPosition=W.value,W.lastVelocity=$?W.lastVelocity:void 0,W.lastTime=$?W.lastTime:void 0,W.startTime=Bc(),W.done=!1,W.animatedStyles.clear()}),an(d,m)&&O.setValue(x?C:S,!1),me({},v,{[m]:me({},b,{name:m,parent:O,interpolation:R,animatedValues:N,toValues:L,previous:z,config:P,fromValues:Br(O.getValue()),immediate:an(d,m),initialVelocity:Rt(P.velocity,0),clamp:Rt(P.clamp,!1),precision:Rt(P.precision,.01),tension:Rt(P.tension,170),friction:Rt(P.friction,26),mass:Rt(P.mass,1),duration:P.duration,easing:Rt(P.easing,W=>W),decay:P.decay})})}else return k?v:(x&&(O.setValue(1,!1),R.updateConfig({output:[z,z]})),O.done=!0,this.hasChanged=!0,me({},v,{[m]:me({},v[m],{previous:z})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let v in this.animations)this.interpolations[v]=this.animations[v].interpolation,this.values[v]=this.animations[v].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const yg=(e,t)=>{const n=g.useRef(!1),r=g.useRef(),i=Z.fun(t),o=g.useMemo(()=>{r.current&&(r.current.map(f=>f.destroy()),r.current=void 0);let c;return[new Array(e).fill().map((f,d)=>{const h=new gg,p=i?an(t,d,h):t[d];return d===0&&(c=p.ref),h.update(p),c||h.start(),h}),c]},[e]),a=o[0],s=o[1];r.current=a,g.useImperativeHandle(s,()=>({start:()=>Promise.all(r.current.map(c=>new Promise(f=>c.start(f)))),stop:c=>r.current.forEach(f=>f.stop(c)),get controllers(){return r.current}}));const l=g.useMemo(()=>c=>r.current.map((f,d)=>{f.update(i?an(c,d,f):c[d]),s||f.start()}),[e]);g.useEffect(()=>{n.current?i||l(t):s||r.current.forEach(c=>c.start())}),g.useEffect(()=>(n.current=!0,()=>r.current.forEach(c=>c.destroy())),[]);const u=r.current.map(c=>c.getValues());return i?[u,l,c=>r.current.forEach(f=>f.pause(c))]:u},Sg=e=>{const t=Z.fun(e),n=yg(1,t?e:[e]),r=n[0],i=n[1],o=n[2];return t?[r[0],i,o]:r};class bg extends Vc{constructor(t){t===void 0&&(t={}),super(),t.transform&&!(t.transform instanceof Je)&&(t=Ga.transform(t)),this.payload=t}}const Ci={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Qe="[-+]?\\d*\\.?\\d+",_i=Qe+"%";function Wi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const wg=new RegExp("rgb"+Wi(Qe,Qe,Qe)),xg=new RegExp("rgba"+Wi(Qe,Qe,Qe,Qe)),Eg=new RegExp("hsl"+Wi(Qe,_i,_i)),Tg=new RegExp("hsla"+Wi(Qe,_i,_i,Qe)),Pg=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cg=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,_g=/^#([0-9a-fA-F]{6})$/,Og=/^#([0-9a-fA-F]{8})$/;function Ag(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=_g.exec(e))?parseInt(t[1]+"ff",16)>>>0:Ci.hasOwnProperty(e)?Ci[e]:(t=wg.exec(e))?(nn(t[1])<<24|nn(t[2])<<16|nn(t[3])<<8|255)>>>0:(t=xg.exec(e))?(nn(t[1])<<24|nn(t[2])<<16|nn(t[3])<<8|ol(t[4]))>>>0:(t=Pg.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Og.exec(e))?parseInt(t[1],16)>>>0:(t=Cg.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Eg.exec(e))?(rl(il(t[1]),kr(t[2]),kr(t[3]))|255)>>>0:(t=Tg.exec(e))?(rl(il(t[1]),kr(t[2]),kr(t[3]))|ol(t[4]))>>>0:null}function xo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rl(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=xo(i,r,e+1/3),a=xo(i,r,e),s=xo(i,r,e-1/3);return Math.round(o*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function nn(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function il(e){return(parseFloat(e)%360+360)%360/360}function ol(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function kr(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function al(e){let t=Ag(e);if(t===null)return e;t=t||0;let n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,o=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${o})`}const Fr=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Rg=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Mg=new RegExp(`(${Object.keys(Ci).join("|")})`,"g"),Ig=e=>{const t=e.output.map(i=>i.replace(Rg,al)).map(i=>i.replace(Mg,al)),n=t[0].match(Fr).map(()=>[]);t.forEach(i=>{i.match(Fr).forEach((o,a)=>n[a].push(+o))});const r=t[0].match(Fr).map((i,o)=>Pi(me({},e,{output:n[o]})));return i=>{let o=0;return t[0].replace(Fr,()=>r[o++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(a,s,l,u,c)=>`rgba(${Math.round(s)}, ${Math.round(l)}, ${Math.round(u)}, ${c})`)}};let Wn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Lg=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Dg=["Webkit","Ms","Moz","O"];Wn=Object.keys(Wn).reduce((e,t)=>(Dg.forEach(n=>e[Lg(n,t)]=e[t]),e),Wn);function Vg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":!n&&typeof t=="number"&&t!==0&&!(Wn.hasOwnProperty(e)&&Wn[e])?t+"px":(""+t).trim()}const sl={};ag(e=>new bg(e));ig(Ig);rg(Ci);ng((e,t)=>{if(e.nodeType&&e.setAttribute!==void 0){const i=t.style,o=t.children,a=t.scrollTop,s=t.scrollLeft,l=dn(t,["style","children","scrollTop","scrollLeft"]),u=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter";a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),o!==void 0&&(e.textContent=o);for(let c in i)if(i.hasOwnProperty(c)){var n=c.indexOf("--")===0,r=Vg(c,i[c],n);c==="float"&&(c="cssFloat"),n?e.style.setProperty(c,r):e.style[c]=r}for(let c in l){const f=u?c:sl[c]||(sl[c]=c.replace(/([A-Z])/g,d=>"-"+d.toLowerCase()));typeof e.getAttribute(f)<"u"&&e.setAttribute(f,l[c])}return}else return!1},e=>e);const Ng=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],jg=Jm(ug),Bg=jg(Ng);function ll(e,t){return e.map(function(n,r){return n+t[r]})}function $c(e,t){return e.map(function(n,r){return n-t[r]})}function oa(e){return Math.hypot.apply(Math,e)}function kg(e,t,n){var r=oa(t),i=r===0?0:1/r,o=n===0?0:1/n,a=o*r,s=t.map(function(c){return o*c}),l=t.map(function(c){return i*c}),u=oa(e);return{velocities:s,velocity:a,distance:u,direction:l}}function aa(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function Fg(e,t,n){return Math.max(t,Math.min(e,n))}function zg(e,t){return Math.pow(e,t*5)}function ul(e,t,n){return t===0||Math.abs(t)===1/0?zg(e,n):e*t*n/(t+n*e)}function Un(e,t,n,r){return r===void 0&&(r=.15),r===0?Fg(e,t,n):e<t?-ul(t-e,n-t,r)+t:e>n?+ul(e-n,n-t,r)+n:e}function $g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gg(e,t,n){return t&&$g(e.prototype,t),e}function Ie(){return Ie=Object.assign||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},Ie.apply(this,arguments)}function Gc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Hg(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function zr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wg(e,t){if(e){if(typeof e=="string")return cl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cl(e,t)}}function cl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ui(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=Wg(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function Hc(){}function Wc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?Hc:t.length===1?t[0]:function(){for(var r,i=Ui(t),o;!(o=i()).done;){var a=o.value;r=a.apply(this,arguments)||r}return r}}function Et(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function $r(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function Ha(e,t){e===void 0&&(e={});for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r],a=o[0],s=o[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=Ha(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}var Ug=180,qg=.15,Yg=.5,Kg=60,Xg={threshold:function(t){return t===void 0&&(t=0),Et(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return Et(qg);case!1:return Et(0);default:return Et(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:Et(t)}},Uc=Ie({},Xg,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(f){return Uc.bounds(t(f))};var n=t,r=n.left,i=r===void 0?-1/0:r,o=n.right,a=o===void 0?1/0:o,s=n.top,l=s===void 0?-1/0:s,u=n.bottom,c=u===void 0?1/0:u;return[[i,a],[l,c]]}}),Zg=typeof window<"u"&&window.document&&window.document.createElement,Jg={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=Zg?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,i=r===void 0?!0:r,o=n.capture,a=o===void 0?!1:o;return{passive:i,capture:a}}},Qg=Ie({},Uc,{threshold:function(t,n,r){var i=r.filterTaps,o=i===void 0?!1:i,a=r.lockDirection,s=a===void 0?!1:a,l=r.axis,u=l===void 0?void 0:l,c=Et(t,o?3:s||u?1:0);return this.filterTaps=o||c[0]+c[1]>0,c},swipeVelocity:function(t){return t===void 0&&(t=Yg),Et(t)},swipeDistance:function(t){return t===void 0&&(t=Kg),Et(t)},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return Ug;case!1:return 0;default:return t}}});function ey(e){return e===void 0&&(e={}),Ha(e,Jg)}function ty(e){return e===void 0&&(e={}),Ha(e,Qg)}function ny(e){var t=e.domTarget,n=e.eventOptions,r=e.window,i=e.enabled,o=Hg(e,["domTarget","eventOptions","window","enabled"]),a=ey({domTarget:t,eventOptions:n,window:r,enabled:i});return a.drag=ty(o),a}function Rn(e){return Ie({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Hc,canceled:!1,memo:void 0,args:void 0},e)}function qc(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},t=Rn({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),n=Rn({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=Rn({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=Rn({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=Rn({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:i,scroll:o}}var Lt=new Map,ry=function(){function e(n,r){var i=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(o,a){var s;a===void 0&&(a=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];i.controller.timeouts[i.stateKey]=(s=window).setTimeout.apply(s,[o,a].concat(u))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(o){if(o===void 0&&(o=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!o&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var a=i.state.active,s=i.state._active;i.state.active=s,i.state.first=s&&!a,i.state.last=a&&!s,i.controller.state.shared[i.ingKey]=s}var l=Ie({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),u=i.handler(l);return i.state.memo=u!==void 0?u:i.state.memo,i.state._active||i.clean(),l}}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,i){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var i=this.config,o=i.initial,a=i.bounds,s=i.rubberband,l=i.threshold,u=this.state,c=u._bounds,f=u._initial,d=u._active,h=u._intentional,p=u.lastOffset,v=u.movement,y=this.getInternalMovement(r,this.state),m=h[0]===!1?fl(y[0],l[0]):h[0],S=h[1]===!1?fl(y[1],l[1]):h[1],b=this.checkIntentionality([m,S],y);if(b._blocked)return Ie({},b,{_movement:y,delta:[0,0]});var E=b._intentional,T=y,w,x;if(E[0]!==!1&&h[0]===!1&&(x=$r(o,this.state),w=$r(a,this.state),f[0]=x[0],c[0]=w[0]),E[1]!==!1&&h[1]===!1){var _,C;x=(_=x)!=null?_:$r(o,this.state),w=(C=w)!=null?C:$r(a,this.state),f[1]=x[1],c[1]=w[1]}var P=[E[0]!==!1?y[0]-E[0]:f[0],E[1]!==!1?y[1]-E[1]:f[1]],O=ll(P,p),R=d?s:[0,0];return P=dl(c,ll(P,f),R),Ie({},b,{intentional:E[0]!==!1||E[1]!==!1,_initial:f,_movement:T,movement:P,values:r,offset:dl(c,O,R),delta:$c(P,v)})},t.clean=function(){this.clearTimeout()},Gg(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function fl(e,t){return Math.abs(e)>=t?aa(e)*t:!1}function dl(e,t,n){var r=t[0],i=t[1],o=n[0],a=n[1],s=e[0],l=s[0],u=s[1],c=e[1],f=c[0],d=c[1];return[Un(r,l,u,o),Un(i,f,d,a)]}function Eo(e,t,n){var r=e.state,i=e.args,o=t.timeStamp,a=t.type,s=r.values,l=n?0:o-r.startTime;return{_lastEventType:a,event:t,timeStamp:o,elapsedTime:l,args:i,previous:s}}function iy(e,t,n){var r=e.state.offset,i=n.timeStamp;return Ie({},qc()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:i})}function oy(e,t){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.call.apply(e,[this,Ie({},t,{event:n})].concat(i))}}var ay=function(t){var n=this;this.classes=t,this.bind=function(){for(var r={},i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];for(var s=Ui(n.classes),l;!(l=s()).done;){var u=l.value;new u(n,o).addBindings(r)}for(var c=0,f=Object.entries(n.nativeRefs);c<f.length;c++){var d=f[c],h=d[0],p=d[1];sa(r,h,oy(p,Ie({},n.state.shared,{args:o})))}return n.config.domTarget?cy(n,r):fy(n,r)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Kc(n.config),i=n.config.eventOptions;r&&hr(r,Yc(n.domListeners),i),Object.values(n.timeouts).forEach(clearTimeout),sy(n)},this.state=qc(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function sy(e){var t=e.config,n=t.window,r=t.eventOptions,i=e.windowListeners;if(n){for(var o in i){var a=i[o];hr(n,a,r)}e.windowListeners={}}}function ly(e,t){var n=e.config,r=e.windowListeners;n.window&&(hr(n.window,r[t],n.eventOptions),delete r[t])}function uy(e,t,n){var r=e.config,i=e.windowListeners;n===void 0&&(n=[]),r.window&&(hr(r.window,i[t],r.eventOptions),Xc(r.window,i[t]=n,r.eventOptions))}function cy(e,t){var n=e.config,r=e.domListeners,i=Kc(n);if(!i)throw new Error("domTarget must be defined");var o=n.eventOptions;hr(i,Yc(r),o);for(var a=0,s=Object.entries(t);a<s.length;a++){var l=s[a],u=l[0],c=l[1],f=u.slice(2).toLowerCase();r.push([f,Wc.apply(void 0,c)])}Xc(i,r,o)}function fy(e,t){for(var n=e.config,r={},i=n.eventOptions.capture?"Capture":"",o=0,a=Object.entries(t);o<a.length;o++){var s=a[o],l=s[0],u=s[1],c=Array.isArray(u)?u:[u],f=l+i;r[f]=Wc.apply(void 0,c)}return r}function Yc(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Kc(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function sa(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Xc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ui(t),i;!(i=r()).done;){var o=i.value,a=o[0],s=o[1];e.addEventListener(a,s,n)}}function hr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ui(t),i;!(i=r()).done;){var o=i.value,a=o[0],s=o[1];e.removeEventListener(a,s,n)}}function dy(e,t,n){n===void 0&&(n={});var r=hy(e),i=g.useMemo(function(){return new ay(r)},[]);return i.config=t,i.handlers=e,i.nativeRefs=n,g.useEffect(i.effect,[]),i.config.domTarget?py:i.bind}function py(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function hy(e){var t=new Set;return e.drag&&t.add(Lt.get("drag")),e.wheel&&t.add(Lt.get("wheel")),e.scroll&&t.add(Lt.get("scroll")),e.move&&t.add(Lt.get("move")),e.pinch&&t.add(Lt.get("pinch")),e.hover&&t.add(Lt.get("hover")),t}var vy=function(e){Gc(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(i,o){return $c(i,o.initial)},n.checkIntentionality=function(i,o){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var a=o.map(Math.abs),s=a[0],l=a[1],u=this.state.axis||(s>l?"x":s<l?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:i,_blocked:!0,axis:u}:(i[u==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(i,o){var a=this.getMovement(i);if(!a._blocked){var s=o.timeStamp-this.state.timeStamp;Object.assign(a,kg(a.movement,a.delta,s))}return a},n.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},t}(ry);function Zc(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function pl(e){var t="buttons"in e?e.buttons:0,n=Zc(e),r=n&&n.length||0,i=r>0||t>0,o=e.shiftKey,a=e.altKey,s=e.metaKey,l=e.ctrlKey;return{touches:r,down:i,buttons:t,shiftKey:o,altKey:a,metaKey:s,ctrlKey:l}}function hl(e){var t=Zc(e),n=t?t[0]:e,r=n.clientX,i=n.clientY;return[r,i]}var my=3,gy=220,yy=function(e){Gc(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.onDragStart=function(i){!r.enabled||r.state._active||(uy(r.controller,r.stateKey,[["pointermove",r.onDragChange],["pointerup",r.onDragEnd],["pointercancel",r.onDragEnd]]),r.updateGestureState({_pointerId:i.pointerId}),r.config.delay>0?(r.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),r.setTimeout(r.startDrag.bind(zr(r)),r.config.delay,i)):r.startDrag(i))},r.onDragChange=function(i){if(!r.state.canceled&&i.pointerId===r.state._pointerId){if(!r.state._active){r.state._delayedEvent&&(r.clearTimeout(),r.startDrag(i));return}var o=pl(i);if(!o.down){r.onDragEnd(i);return}r.updateSharedState(o);var a=hl(i),s=r.getKinematics(a,i),l=Eo(zr(r),i),u=r.state._isTap,c=oa(s._movement);u&&c>=my&&(u=!1),r.updateGestureState(Ie({},l,s,{_isTap:u})),r.fireGestureHandler()}},r.onDragEnd=function(i){if(i.pointerId===r.state._pointerId){r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0});var o=r.state._isTap,a=r.state.velocities,s=a[0],l=a[1],u=r.state.movement,c=u[0],f=u[1],d=r.state._intentional,h=d[0],p=d[1],v=r.config.swipeVelocity,y=v[0],m=v[1],S=r.config.swipeDistance,b=S[0],E=S[1],T=Ie({},Eo(zr(r),i),r.getMovement(r.state.values)),w=[0,0];T.elapsedTime<gy&&(h!==!1&&Math.abs(s)>y&&Math.abs(c)>b&&(w[0]=aa(s)),p!==!1&&Math.abs(l)>m&&Math.abs(f)>E&&(w[1]=aa(l))),r.updateGestureState(Ie({},T,{tap:o,swipe:w})),r.fireGestureHandler(o===!0)}},r.clean=function(){e.prototype.clean.call(zr(r)),r.state._delayedEvent=!1,ly(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0}),r.state._active=!1,r.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return r.fireGestureHandler()}))},r.onClick=function(i){r.state._isTap||i.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(i){var o=hl(i);this.updateSharedState(pl(i)),this.updateGestureState(Ie({},iy(this,o,i),Eo(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(o)),this.fireGestureHandler()},n.addBindings=function(i){if(sa(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var o=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";sa(i,o,this.onClick)}},t}(vy);function Sy(e,t){var n,r=[],i,o=!1;function a(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return o&&n===this&&t(l,r)||(i=e.apply(this,l),o=!0,n=this,r=l),i}return a}function ci(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ci(e[r],t[r]))return!1;return!0}var o;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!ci(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(i[r]==="_owner"&&e.$$typeof)&&!ci(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}function by(e,t){try{return ci(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function wy(e,t){t===void 0&&(t={}),Lt.set("drag",yy);var n=g.useRef();return n.current||(n.current=Sy(ny,by)),dy({drag:e},n.current(t))}/*!
41
+ * tabbable 5.3.3
42
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
43
+ */var Jc=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Oi=Jc.join(","),Qc=typeof Element>"u",Ft=Qc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,la=!Qc&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},ef=function(t,n,r){var i=Array.prototype.slice.apply(t.querySelectorAll(Oi));return n&&Ft.call(t,Oi)&&i.unshift(t),i=i.filter(r),i},tf=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:a,candidates:u})}else{var c=Ft.call(a,Oi);c&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!r.shadowRootFilter||r.shadowRootFilter(a);if(f&&d){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scope:a,candidates:h})}else o.unshift.apply(o,a.children)}}return i},nf=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},xy=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},rf=function(t){return t.tagName==="INPUT"},Ey=function(t){return rf(t)&&t.type==="hidden"},Ty=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Py=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Cy=function(t){if(!t.name)return!0;var n=t.form||la(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=Py(i,t.form);return!o||o===t},_y=function(t){return rf(t)&&t.type==="radio"},Oy=function(t){return _y(t)&&!Cy(t)},vl=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Ay=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Ft.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Ft.call(a,"details:not([open]) *"))return!0;var s=la(t).host,l=(s==null?void 0:s.ownerDocument.contains(s))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof i=="function"){for(var u=t;t;){var c=t.parentElement,f=la(t);if(c&&!c.shadowRoot&&i(c)===!0)return vl(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=u}if(l)return!t.getClientRects().length}else if(r==="non-zero-area")return vl(t);return!1},Ry=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Ft.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Ai=function(t,n){return!(n.disabled||Ey(n)||Ay(n,t)||Ty(n)||Ry(n))},ua=function(t,n){return!(Oy(n)||nf(n)<0||!Ai(t,n))},My=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Iy=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scope,s=a?i.scope:i,l=nf(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(xy).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Ly=function(t,n){n=n||{};var r;return n.getShadowRoot?r=tf([t],n.includeContainer,{filter:ua.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:My}):r=ef(t,n.includeContainer,ua.bind(null,n)),Iy(r)},Dy=function(t,n){n=n||{};var r;return n.getShadowRoot?r=tf([t],n.includeContainer,{filter:Ai.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=ef(t,n.includeContainer,Ai.bind(null,n)),r},Gr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ft.call(t,Oi)===!1?!1:ua(n,t)},Vy=Jc.concat("iframe").join(","),To=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ft.call(t,Vy)===!1?!1:Ai(n,t)};/*!
44
+ * focus-trap 6.9.4
45
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
46
+ */function ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ml(Object(n),!0).forEach(function(r){Ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ny(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yl=function(){var e=[];return{activateTrap:function(n){if(e.length>0){var r=e[e.length-1];r!==n&&r.pause()}var i=e.indexOf(n);i===-1||e.splice(i,1),e.push(n)},deactivateTrap:function(n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}}}(),jy=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},By=function(t){return t.key==="Escape"||t.key==="Esc"||t.keyCode===27},ky=function(t){return t.key==="Tab"||t.keyCode===9},Sl=function(t){return setTimeout(t,0)},bl=function(t,n){var r=-1;return t.every(function(i,o){return n(i)?(r=o,!1):!0}),r},Mn=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof t=="function"?t.apply(void 0,r):t},Hr=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},Fy=function(t,n){var r=(n==null?void 0:n.document)||document,i=gl({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a,s=function(w,x,_){return w&&w[x]!==void 0?w[x]:i[_||x]},l=function(w){return o.containerGroups.findIndex(function(x){var _=x.container,C=x.tabbableNodes;return _.contains(w)||C.find(function(P){return P===w})})},u=function(w){var x=i[w];if(typeof x=="function"){for(var _=arguments.length,C=new Array(_>1?_-1:0),P=1;P<_;P++)C[P-1]=arguments[P];x=x.apply(void 0,C)}if(x===!0&&(x=void 0),!x){if(x===void 0||x===!1)return x;throw new Error("`".concat(w,"` was specified but was not a node, or did not return a node"))}var O=x;if(typeof x=="string"&&(O=r.querySelector(x),!O))throw new Error("`".concat(w,"` as selector refers to no known node"));return O},c=function(){var w=u("initialFocus");if(w===!1)return!1;if(w===void 0)if(l(r.activeElement)>=0)w=r.activeElement;else{var x=o.tabbableGroups[0],_=x&&x.firstTabbableNode;w=_||u("fallbackFocus")}if(!w)throw new Error("Your focus-trap needs to have at least one focusable element");return w},f=function(){if(o.containerGroups=o.containers.map(function(w){var x=Ly(w,i.tabbableOptions),_=Dy(w,i.tabbableOptions);return{container:w,tabbableNodes:x,focusableNodes:_,firstTabbableNode:x.length>0?x[0]:null,lastTabbableNode:x.length>0?x[x.length-1]:null,nextTabbableNode:function(P){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,R=_.findIndex(function(L){return L===P});if(!(R<0))return O?_.slice(R+1).find(function(L){return Gr(L,i.tabbableOptions)}):_.slice(0,R).reverse().find(function(L){return Gr(L,i.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(w){return w.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function T(w){if(w!==!1&&w!==r.activeElement){if(!w||!w.focus){T(c());return}w.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=w,jy(w)&&w.select()}},h=function(w){var x=u("setReturnFocus",w);return x||(x===!1?!1:w)},p=function(w){var x=Hr(w);if(!(l(x)>=0)){if(Mn(i.clickOutsideDeactivates,w)){a.deactivate({returnFocus:i.returnFocusOnDeactivate&&!To(x,i.tabbableOptions)});return}Mn(i.allowOutsideClick,w)||w.preventDefault()}},v=function(w){var x=Hr(w),_=l(x)>=0;_||x instanceof Document?_&&(o.mostRecentlyFocusedNode=x):(w.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||c()))},y=function(w){var x=Hr(w);f();var _=null;if(o.tabbableGroups.length>0){var C=l(x),P=C>=0?o.containerGroups[C]:void 0;if(C<0)w.shiftKey?_=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:_=o.tabbableGroups[0].firstTabbableNode;else if(w.shiftKey){var O=bl(o.tabbableGroups,function(G){var $=G.firstTabbableNode;return x===$});if(O<0&&(P.container===x||To(x,i.tabbableOptions)&&!Gr(x,i.tabbableOptions)&&!P.nextTabbableNode(x,!1))&&(O=C),O>=0){var R=O===0?o.tabbableGroups.length-1:O-1,L=o.tabbableGroups[R];_=L.lastTabbableNode}}else{var N=bl(o.tabbableGroups,function(G){var $=G.lastTabbableNode;return x===$});if(N<0&&(P.container===x||To(x,i.tabbableOptions)&&!Gr(x,i.tabbableOptions)&&!P.nextTabbableNode(x))&&(N=C),N>=0){var z=N===o.tabbableGroups.length-1?0:N+1,B=o.tabbableGroups[z];_=B.firstTabbableNode}}}else _=u("fallbackFocus");_&&(w.preventDefault(),d(_))},m=function(w){if(By(w)&&Mn(i.escapeDeactivates,w)!==!1){w.preventDefault(),a.deactivate();return}if(ky(w)){y(w);return}},S=function(w){var x=Hr(w);l(x)>=0||Mn(i.clickOutsideDeactivates,w)||Mn(i.allowOutsideClick,w)||(w.preventDefault(),w.stopImmediatePropagation())},b=function(){if(o.active)return yl.activateTrap(a),o.delayInitialFocusTimer=i.delayInitialFocus?Sl(function(){d(c())}):d(c()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),a},E=function(){if(o.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",m,!0),a};return a={get active(){return o.active},get paused(){return o.paused},activate:function(w){if(o.active)return this;var x=s(w,"onActivate"),_=s(w,"onPostActivate"),C=s(w,"checkCanFocusTrap");C||f(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,x&&x();var P=function(){C&&f(),b(),_&&_()};return C?(C(o.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(w){if(!o.active)return this;var x=gl({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},w);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,E(),o.active=!1,o.paused=!1,yl.deactivateTrap(a);var _=s(x,"onDeactivate"),C=s(x,"onPostDeactivate"),P=s(x,"checkCanReturnFocus"),O=s(x,"returnFocus","returnFocusOnDeactivate");_&&_();var R=function(){Sl(function(){O&&d(h(o.nodeFocusedBeforeActivation)),C&&C()})};return O&&P?(P(h(o.nodeFocusedBeforeActivation)).then(R,R),this):(R(),this)},pause:function(){return o.paused||!o.active?this:(o.paused=!0,E(),this)},unpause:function(){return!o.paused||!o.active?this:(o.paused=!1,f(),b(),this)},updateContainerElements:function(w){var x=[].concat(w).filter(Boolean);return o.containers=x.map(function(_){return typeof _=="string"?r.querySelector(_):_}),o.active&&f(),this}},a.updateContainerElements(t),a};function zy(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var Wa=!1;if(typeof window<"u"){var wl={get passive(){Wa=!0}};window.addEventListener("testPassive",null,wl),window.removeEventListener("testPassive",null,wl)}var of=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Ct=[],Ri=!1,af=-1,qn=void 0,Yn=void 0,sf=function(t){return Ct.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Mi=function(t){var n=t||window.event;return sf(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},$y=function(t){if(Yn===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(Yn=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}qn===void 0&&(qn=document.body.style.overflow,document.body.style.overflow="hidden")},Gy=function(){Yn!==void 0&&(document.body.style.paddingRight=Yn,Yn=void 0),qn!==void 0&&(document.body.style.overflow=qn,qn=void 0)},Hy=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},Wy=function(t,n){var r=t.targetTouches[0].clientY-af;return sf(t.target)?!1:n&&n.scrollTop===0&&r>0||Hy(n)&&r<0?Mi(t):(t.stopPropagation(),!0)},Uy=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Ct.some(function(i){return i.targetElement===t})){var r={targetElement:t,options:n||{}};Ct=[].concat(zy(Ct),[r]),of?(t.ontouchstart=function(i){i.targetTouches.length===1&&(af=i.targetTouches[0].clientY)},t.ontouchmove=function(i){i.targetTouches.length===1&&Wy(i,t)},Ri||(document.addEventListener("touchmove",Mi,Wa?{passive:!1}:void 0),Ri=!0)):$y(n)}},qy=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Ct=Ct.filter(function(n){return n.targetElement!==t}),of?(t.ontouchstart=null,t.ontouchmove=null,Ri&&Ct.length===0&&(document.removeEventListener("touchmove",Mi,Wa?{passive:!1}:void 0),Ri=!1)):Ct.length||Gy()},Nt=[],Yy=function(){return Nt.some(function(e){return e.activeTargets.length>0})},Ky=function(){return Nt.some(function(e){return e.skippedTargets.length>0})},xl="ResizeObserver loop completed with undelivered notifications.",Xy=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:xl}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=xl),window.dispatchEvent(e)},ar;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ar||(ar={}));var jt=function(e){return Object.freeze(e)},Zy=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,jt(this)}return e}(),lf=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,jt(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Ua=function(e){return e instanceof SVGElement&&"getBBox"in e},uf=function(e){if(Ua(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},El=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Jy=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Kn=typeof window<"u"?window:{},Wr=new WeakMap,Tl=/auto|scroll/,Qy=/^tb|vertical/,e0=/msie|trident/i.test(Kn.navigator&&Kn.navigator.userAgent),rt=function(e){return parseFloat(e||"0")},pn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Zy((n?t:e)||0,(n?e:t)||0)},Pl=jt({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new lf(0,0,0,0)}),cf=function(e,t){if(t===void 0&&(t=!1),Wr.has(e)&&!t)return Wr.get(e);if(uf(e))return Wr.set(e,Pl),Pl;var n=getComputedStyle(e),r=Ua(e)&&e.ownerSVGElement&&e.getBBox(),i=!e0&&n.boxSizing==="border-box",o=Qy.test(n.writingMode||""),a=!r&&Tl.test(n.overflowY||""),s=!r&&Tl.test(n.overflowX||""),l=r?0:rt(n.paddingTop),u=r?0:rt(n.paddingRight),c=r?0:rt(n.paddingBottom),f=r?0:rt(n.paddingLeft),d=r?0:rt(n.borderTopWidth),h=r?0:rt(n.borderRightWidth),p=r?0:rt(n.borderBottomWidth),v=r?0:rt(n.borderLeftWidth),y=f+u,m=l+c,S=v+h,b=d+p,E=s?e.offsetHeight-b-e.clientHeight:0,T=a?e.offsetWidth-S-e.clientWidth:0,w=i?y+S:0,x=i?m+b:0,_=r?r.width:rt(n.width)-w-T,C=r?r.height:rt(n.height)-x-E,P=_+y+T+S,O=C+m+E+b,R=jt({devicePixelContentBoxSize:pn(Math.round(_*devicePixelRatio),Math.round(C*devicePixelRatio),o),borderBoxSize:pn(P,O,o),contentBoxSize:pn(_,C,o),contentRect:new lf(f,l,_,C)});return Wr.set(e,R),R},ff=function(e,t,n){var r=cf(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case ar.DEVICE_PIXEL_CONTENT_BOX:return a;case ar.BORDER_BOX:return i;default:return o}},t0=function(){function e(t){var n=cf(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=jt([n.borderBoxSize]),this.contentBoxSize=jt([n.contentBoxSize]),this.devicePixelContentBoxSize=jt([n.devicePixelContentBoxSize])}return e}(),df=function(e){if(uf(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},n0=function(){var e=1/0,t=[];Nt.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var c=new t0(u.target),f=df(u.target);s.push(c),u.lastReportedSize=ff(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},Cl=function(e){Nt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(df(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},r0=function(){var e=0;for(Cl(e);Yy();)e=n0(),Cl(e);return Ky()&&Xy(),e>0},Po,pf=[],i0=function(){return pf.splice(0).forEach(function(e){return e()})},o0=function(e){if(!Po){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return i0()}).observe(n,r),Po=function(){n.textContent="".concat(t?t--:t++)}}pf.push(e),Po()},a0=function(e){o0(function(){requestAnimationFrame(e)})},fi=0,s0=function(){return!!fi},l0=250,u0={attributes:!0,characterData:!0,childList:!0,subtree:!0},_l=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ol=function(e){return e===void 0&&(e=0),Date.now()+e},Co=!1,c0=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=l0),!Co){Co=!0;var r=Ol(t);a0(function(){var i=!1;try{i=r0()}finally{if(Co=!1,t=r-Ol(),!s0())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,u0)};document.body?n():Kn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),_l.forEach(function(n){return Kn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),_l.forEach(function(n){return Kn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ca=new c0,Al=function(e){!fi&&e>0&&ca.start(),fi+=e,!fi&&ca.stop()},f0=function(e){return!Ua(e)&&!Jy(e)&&getComputedStyle(e).display==="inline"},d0=function(){function e(t,n){this.target=t,this.observedBox=n||ar.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=ff(this.target,this.observedBox,!0);return f0(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),p0=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ur=new WeakMap,Rl=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},qr=function(){function e(){}return e.connect=function(t,n){var r=new p0(t,n);Ur.set(t,r)},e.observe=function(t,n,r){var i=Ur.get(t),o=i.observationTargets.length===0;Rl(i.observationTargets,n)<0&&(o&&Nt.push(i),i.observationTargets.push(new d0(n,r&&r.box)),Al(1),ca.schedule())},e.unobserve=function(t,n){var r=Ur.get(t),i=Rl(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Nt.splice(Nt.indexOf(r),1),r.observationTargets.splice(i,1),Al(-1))},e.disconnect=function(t){var n=this,r=Ur.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),h0=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");qr.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!El(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!El(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");qr.unobserve(this,t)},e.prototype.disconnect=function(){qr.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function _e(){return _e=Object.assign||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},_e.apply(this,arguments)}function di(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Xn=typeof window<"u"?g.useLayoutEffect:g.useEffect;function In(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function Yr(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var v0={box:"border-box"};function _o(e,t){var n=t.label,r=t.enabled,i=t.resizeSourceRef,o=g.useState(0),a=o[0],s=o[1];g.useDebugValue(n+": "+a);var l=g.useCallback(function(u){s(u[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Xn(function(){if(e.current&&r){var u=new h0(l);return u.observe(e.current,v0),function(){u.disconnect()}}},[e,l,r]),r?a:0}function Pe(e){return e===void 0&&(e=1e3),new Promise(function(t){return setTimeout(t,e)})}var Ml={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Il={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},m0=Bm({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:_e({},Ml,Il)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:_e({},Ml,Il)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:_e({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[km({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return n===void 0?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(Pe()).then(function(){})}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},activate:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},deactivate:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},openSmoothly:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},openImmediately:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},snapSmoothly:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},resizeSmoothly:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}},closeSmoothly:function(e,t){try{return Promise.resolve(Pe()).then(function(){})}catch(n){return Promise.reject(n)}}},guards:{initiallyClosed:function(e){return e.initialState==="CLOSED"},initiallyOpen:function(e){return e.initialState==="OPEN"}}}),g0=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],y0=["velocity"],S0=["onRest","config"],hf=hg.default,b0=hf.tension,Kr=hf.friction,w0=g.forwardRef(function(e,t){var n=e.children,r=e.sibling,i=e.className,o=e.footer,a=e.header,s=e.open,l=e.initialState,u=e.lastSnapRef,c=e.initialFocusRef,f=e.onDismiss,d=e.maxHeight,h=e.defaultSnap,p=h===void 0?E0:h,v=e.snapPoints,y=v===void 0?T0:v,m=e.blocking,S=m===void 0||m,b=e.scrollLocking,E=b===void 0||b,T=e.style,w=e.onSpringStart,x=e.onSpringCancel,_=e.onSpringEnd,C=e.reserveScrollBarGap,P=C===void 0?S:C,O=e.expandOnContentDrag,R=O!==void 0&&O,L=di(e,g0),N=function(){var M=g.useState(!1),U=M[0],F=M[1],ee=g.useState({}),de=ee[0],ie=ee[1],se=g.useCallback(function(ue){return ie(function(pe){var X;return _e({},pe,((X={})[ue]=!1,X))}),function(){ie(function(pe){var X;return _e({},pe,((X={})[ue]=!0,X))})}},[]);return g.useEffect(function(){var ue=Object.values(de);ue.length!==0&&ue.every(Boolean)&&F(!0)},[de]),{ready:U,registerReady:se}}(),z=N.ready,B=N.registerReady,G=g.useRef(!1),$=g.useRef(w),k=g.useRef(x),Y=g.useRef(_);g.useEffect(function(){$.current=w,k.current=x,Y.current=_},[x,w,_]);var Q,W,q=Sg(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),D=q[0],j=q[1],K=g.useRef(null),ye=g.useRef(null),Ne=g.useRef(null),Fe=g.useRef(null),wr=g.useRef(null),wn=g.useRef(null),De=g.useRef(0),Wt=g.useRef(),no=g.useRef(!1),ht=(Q=g.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),W=g.useRef(Q==null?void 0:Q.matches),g.useDebugValue(W.current?"reduce":"no-preference"),g.useEffect(function(){var M=function(U){W.current=U.matches};return Q==null||Q.addListener(M),function(){return Q==null?void 0:Q.removeListener(M)}},[Q]),W),Ut=function(M){var U=M.targetRef,F=M.enabled,ee=M.reserveScrollBarGap,de=g.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return g.useDebugValue(F?"Enabled":"Disabled"),g.useEffect(function(){if(!F)return de.current.deactivate(),void(de.current={activate:function(){},deactivate:function(){}});var ie=U.current,se=!1;de.current={activate:function(){se||(se=!0,Uy(ie,{allowTouchMove:function(ue){return ue.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:ee}))},deactivate:function(){se&&(se=!1,qy(ie))}}},[F,U,ee]),de}({targetRef:ye,enabled:z&&E,reserveScrollBarGap:P}),qt=function(M){var U=M.targetRef,F=M.enabled,ee=g.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return g.useDebugValue(F?"Enabled":"Disabled"),g.useEffect(function(){if(!F)return ee.current.deactivate(),void(ee.current={activate:function(){},deactivate:function(){}});var de=U.current,ie=!1,se=[],ue=[];ee.current={activate:function(){if(!ie){ie=!0;var pe=de.parentNode;document.querySelectorAll("body > *").forEach(function(X){if(X!==pe){var oe=X.getAttribute("aria-hidden");oe!==null&&oe!=="false"||(se.push(oe),ue.push(X),X.setAttribute("aria-hidden","true"))}})}},deactivate:function(){ie&&(ie=!1,ue.forEach(function(pe,X){var oe=se[X];oe===null?pe.removeAttribute("aria-hidden"):pe.setAttribute("aria-hidden",oe)}),se=[],ue=[])}}},[U,F]),ee}({targetRef:K,enabled:z&&S}),Yt=function(M){var U=M.targetRef,F=M.fallbackRef,ee=M.initialFocusRef,de=M.enabled,ie=g.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return g.useDebugValue(de?"Enabled":"Disabled"),g.useEffect(function(){if(!de)return ie.current.deactivate(),void(ie.current={activate:function(){},deactivate:function(){}});var se=F.current,ue=Fy(U.current,{onActivate:void 0,initialFocus:ee?function(){return(ee==null?void 0:ee.current)||se}:void 0,fallbackFocus:se,escapeDeactivates:!1,clickOutsideDeactivates:!1}),pe=!1;ie.current={activate:function(){try{return pe?Promise.resolve():(pe=!0,Promise.resolve(ue.activate()).then(function(){return Promise.resolve(new Promise(function(X){return setTimeout(function(){return X(void 0)},0)})).then(function(){})}))}catch(X){return Promise.reject(X)}},deactivate:function(){pe&&(pe=!1,ue.deactivate())}}},[de,F,ee,U]),ie}({targetRef:K,fallbackRef:wn,initialFocusRef:c||void 0,enabled:z&&S&&c!==!1}),xr=function(M){var U=M.getSnapPoints,F=M.heightRef,ee=M.lastSnapRef,de=M.ready,ie=function(xe){var qe=xe.contentRef,lt=xe.controlledMaxHeight,Re=xe.footerEnabled,At=xe.footerRef,Xt=xe.headerEnabled,Ye=xe.headerRef,Pn=xe.registerReady,Cr=xe.resizeSourceRef,Ss=g.useMemo(function(){return Pn("contentHeight")},[Pn]),bs=function(Cn,Ts,_r){var Or=g.useMemo(function(){return Ts("maxHeight")},[Ts]),Ps=g.useState(function(){return Yr(Cn)||typeof window<"u"?window.innerHeight:0}),Cs=Ps[0],oo=Ps[1],_s=Cs>0,Ar=g.useRef(0);return g.useDebugValue(Cn?"controlled":"auto"),g.useEffect(function(){_s&&Or()},[_s,Or]),Xn(function(){if(Cn)return oo(Yr(Cn)),void(_r.current="maxheightprop");var Os=function(){Ar.current||(Ar.current=requestAnimationFrame(function(){oo(window.innerHeight),_r.current="window",Ar.current=0}))};return window.addEventListener("resize",Os),oo(window.innerHeight),_r.current="window",Or(),function(){window.removeEventListener("resize",Os),cancelAnimationFrame(Ar.current)}},[Cn,Or,_r]),Cs}(lt,Pn,Cr),ro=_o(Ye,{label:"headerHeight",enabled:Xt,resizeSourceRef:Cr}),ws=_o(qe,{label:"contentHeight",enabled:!0,resizeSourceRef:Cr}),io=_o(At,{label:"footerHeight",enabled:Re,resizeSourceRef:Cr}),xs=Math.min(bs-ro-io,ws)+ro+io;g.useDebugValue("minHeight: "+xs);var Es=ws>0;return g.useEffect(function(){Es&&Ss()},[Es,Ss]),{maxHeight:bs,minHeight:xs,headerHeight:ro,footerHeight:io}}({contentRef:M.contentRef,controlledMaxHeight:M.controlledMaxHeight,footerEnabled:M.footerEnabled,footerRef:M.footerRef,headerEnabled:M.headerEnabled,headerRef:M.headerRef,registerReady:M.registerReady,resizeSourceRef:M.resizeSourceRef}),se=ie.maxHeight,ue=ie.minHeight,pe=ie.headerHeight,X=ie.footerHeight,oe=function(xe,qe){var lt=[].concat(xe).map(Yr).reduce(function(Ye,Pn){return Ye.add(In(Pn,0,qe)),Ye},new Set),Re=Array.from(lt),At=Math.min.apply(Math,Re);if(Number.isNaN(At))throw new TypeError("minSnap is NaN");var Xt=Math.max.apply(Math,Re);if(Number.isNaN(Xt))throw new TypeError("maxSnap is NaN");return{snapPoints:Re,minSnap:At,maxSnap:Xt}}(de?U({height:F.current,footerHeight:X,headerHeight:pe,minHeight:ue,maxHeight:se}):[0],se),$e=oe.snapPoints,Kt=oe.minSnap,Ue=oe.maxSnap;return g.useDebugValue("minSnap: "+Kt+", maxSnap:"+Ue),{minSnap:Kt,maxSnap:Ue,findSnap:function(xe){var qe=Yr(typeof xe=="function"?xe({footerHeight:X,headerHeight:pe,height:F.current,minHeight:ue,maxHeight:se,snapPoints:$e,lastSnap:ee.current}):xe);return $e.reduce(function(lt,Re){return Math.abs(Re-qe)<Math.abs(lt-qe)?Re:lt},Kt)},maxHeight:se}}({contentRef:Ne,controlledMaxHeight:d,footerEnabled:!!o,footerRef:wr,getSnapPoints:y,headerEnabled:a!==!1,headerRef:Fe,heightRef:De,lastSnapRef:u,ready:z,registerReady:B,resizeSourceRef:Wt}),xn=xr.minSnap,En=xr.maxSnap,Tn=xr.maxHeight,Er=xr.findSnap,st=g.useRef(Tn),ze=g.useRef(xn),Se=g.useRef(En),Tr=g.useRef(Er),nt=g.useRef(0);Xn(function(){st.current=Tn,Se.current=En,ze.current=xn,Tr.current=Er,nt.current=Er(p)},[Er,p,Tn,En,xn]);var Ae=g.useCallback(function(M){var U=M.onRest,F=M.config,ee=(F=F===void 0?{}:F).velocity,de=ee===void 0?1:ee,ie=di(F,y0),se=di(M,S0);return new Promise(function(ue){return j(_e({},se,{config:_e({velocity:de},ie,{mass:1,tension:b0,friction:Math.max(Kr,Kr+(Kr-Kr*de))}),onRest:function(){var pe=[].slice.call(arguments);ue.apply(void 0,pe),U==null||U.apply(void 0,pe)}}))})},[j]),ys=Km(m0,{devTools:!1,actions:{onOpenCancel:g.useCallback(function(){return k.current==null?void 0:k.current({type:"OPEN"})},[]),onSnapCancel:g.useCallback(function(M){return k.current==null?void 0:k.current({type:"SNAP",source:M.snapSource})},[]),onCloseCancel:g.useCallback(function(){return k.current==null?void 0:k.current({type:"CLOSE"})},[]),onResizeCancel:g.useCallback(function(){return k.current==null?void 0:k.current({type:"RESIZE",source:Wt.current})},[]),onOpenEnd:g.useCallback(function(){return Y.current==null?void 0:Y.current({type:"OPEN"})},[]),onSnapEnd:g.useCallback(function(M,U){return Y.current==null?void 0:Y.current({type:"SNAP",source:M.snapSource})},[]),onResizeEnd:g.useCallback(function(){return Y.current==null?void 0:Y.current({type:"RESIZE",source:Wt.current})},[])},context:{initialState:l},services:{onSnapStart:g.useCallback(function(M,U){try{return Promise.resolve($.current==null?void 0:$.current({type:"SNAP",source:U.payload.source||"custom"}))}catch(F){return Promise.reject(F)}},[]),onOpenStart:g.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseStart:g.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeStart:g.useCallback(function(){try{return Promise.resolve($.current==null?void 0:$.current({type:"RESIZE",source:Wt.current}))}catch(M){return Promise.reject(M)}},[]),onSnapEnd:g.useCallback(function(M,U){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"SNAP",source:M.snapSource}))}catch(F){return Promise.reject(F)}},[]),onOpenEnd:g.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"OPEN"}))}catch(M){return Promise.reject(M)}},[]),onCloseEnd:g.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"CLOSE"}))}catch(M){return Promise.reject(M)}},[]),onResizeEnd:g.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"RESIZE",source:Wt.current}))}catch(M){return Promise.reject(M)}},[]),renderVisuallyHidden:g.useCallback(function(M,U){try{return Promise.resolve(Ae({y:nt.current,ready:0,maxHeight:st.current,maxSnap:Se.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(F){return Promise.reject(F)}},[Ae]),activate:g.useCallback(function(M,U){try{return G.current=!0,Promise.resolve(Promise.all([Ut.current.activate(),Yt.current.activate(),qt.current.activate()])).then(function(){})}catch(F){return Promise.reject(F)}},[qt,Yt,Ut]),deactivate:g.useCallback(function(){try{return Ut.current.deactivate(),Yt.current.deactivate(),qt.current.deactivate(),G.current=!1,Promise.resolve()}catch(M){return Promise.reject(M)}},[qt,Yt,Ut]),openImmediately:g.useCallback(function(){try{return De.current=nt.current,Promise.resolve(Ae({y:nt.current,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:nt.current,immediate:!0})).then(function(){})}catch(M){return Promise.reject(M)}},[Ae]),openSmoothly:g.useCallback(function(){try{return Promise.resolve(Ae({y:0,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:nt.current,immediate:!0})).then(function(){return De.current=nt.current,Promise.resolve(Ae({y:nt.current,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:nt.current,immediate:ht.current})).then(function(){})})}catch(M){return Promise.reject(M)}},[Ae,ht]),snapSmoothly:g.useCallback(function(M,U){try{var F=Tr.current(M.y);return De.current=F,u.current=F,Promise.resolve(Ae({y:F,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:ze.current,immediate:ht.current,config:{velocity:M.velocity}})).then(function(){})}catch(ee){return Promise.reject(ee)}},[Ae,u,ht]),resizeSmoothly:g.useCallback(function(){try{var M=Tr.current(De.current);return De.current=M,u.current=M,Promise.resolve(Ae({y:M,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:ze.current,immediate:Wt.current!=="element"||ht.current})).then(function(){})}catch(U){return Promise.reject(U)}},[Ae,u,ht]),closeSmoothly:g.useCallback(function(M,U){try{return Ae({minSnap:De.current,immediate:!0}),De.current=0,Promise.resolve(Ae({y:0,maxHeight:st.current,maxSnap:Se.current,immediate:ht.current})).then(function(){return Promise.resolve(Ae({ready:0,immediate:!0})).then(function(){})})}catch(F){return Promise.reject(F)}},[Ae,ht])}}),Zd=ys[0],vt=ys[1];g.useEffect(function(){z&&vt(s?"OPEN":"CLOSE")},[s,vt,z]),Xn(function(){(Tn||En||xn)&&vt("RESIZE")},[Tn,En,xn,vt]),g.useEffect(function(){return function(){Ut.current.deactivate(),Yt.current.deactivate(),qt.current.deactivate()}},[qt,Yt,Ut]),g.useImperativeHandle(t,function(){return{snapTo:function(M,U){var F=U===void 0?{}:U,ee=F.velocity,de=ee===void 0?1:ee,ie=F.source,se=ie===void 0?"custom":ie;vt("SNAP",{payload:{y:Tr.current(M),velocity:de,source:se}})},get height(){return De.current}}},[vt]),g.useEffect(function(){var M=ye.current,U=function(ee){no.current&&ee.preventDefault()},F=function(ee){M.scrollTop<0&&(requestAnimationFrame(function(){M.style.overflow="hidden",M.scrollTop=0,M.style.removeProperty("overflow")}),ee.preventDefault())};return R&&(M.addEventListener("scroll",U),M.addEventListener("touchmove",U),M.addEventListener("touchstart",F)),function(){M.removeEventListener("scroll",U),M.removeEventListener("touchmove",U),M.removeEventListener("touchstart",F)}},[R,ye]);var Pr=wy(function(M){var U=M.args,F=(U=U===void 0?[]:U)[0],ee=(F=F===void 0?{}:F).closeOnTap,de=ee!==void 0&&ee,ie=F.isContentDragging,se=ie!==void 0&&ie,ue=M.cancel,pe=M.direction[1],X=M.down,oe=M.first,$e=M.last,Kt=M.memo,Ue=Kt===void 0?D.y.getValue():Kt,xe=M.tap,qe=M.velocity,lt=-1*M.movement[1];if(!G.current)return ue(),Ue;if(f&&de&&xe)return ue(),setTimeout(function(){return f()},0),Ue;if(xe)return Ue;var Re=Ue+lt,At=lt*qe,Xt=Math.max(ze.current,Math.min(Se.current,Re+2*At));if(!X&&f&&pe>0&&Re+At<ze.current/2)return ue(),f(),Ue;var Ye=X?f||ze.current!==Se.current?Un(Re,f?0:ze.current,Se.current,.55):Re<ze.current?Un(Re,ze.current,2*Se.current,.55):Un(Re,ze.current/2,Se.current,.55):Xt;return R&&se?(Ye>=Se.current&&(Ye=Se.current),Ue===Se.current&&ye.current.scrollTop>0&&(Ye=Se.current),no.current=Ye<Se.current):no.current=!1,oe&&vt("DRAG"),$e?(vt("SNAP",{payload:{y:Ye,velocity:qe>.05?qe:1,source:"dragging"}}),Ue):(j({y:Ye,ready:1,maxHeight:st.current,maxSnap:Se.current,minSnap:ze.current,immediate:!0,config:{velocity:qe}}),Ue)},{filterTaps:!0});if(Number.isNaN(Se.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ze.current))throw new TypeError("minSnapRef is NaN!!");var Jd=function(M){var U,F=M.spring,ee=tn([F.y,F.maxHeight],function(X,oe){return Math.round(In(oe-X,0,16))+"px"}),de=tn([F.y,F.minSnap,F.maxSnap],function(X,oe,$e){return In(X,oe,$e)+"px"}),ie=tn([F.y,F.minSnap,F.maxSnap],function(X,oe,$e){return X<oe?oe-X+"px":X>$e?$e-X+"px":"0px"}),se=tn([F.y,F.maxSnap],function(X,oe){return X>=oe?Math.ceil(X-oe):0}),ue=tn([F.y,F.minSnap],function(X,oe){if(!oe)return 0;var $e=Math.max(oe/2-45,0);return In((X-$e)*(1/(Math.min(oe/2+45,oe)-$e)+0),0,1)}),pe=tn([F.y,F.minSnap],function(X,oe){return oe?In(X/oe,0,1):0});return(U={})["--rsbs-content-opacity"]=ue,U["--rsbs-backdrop-opacity"]=pe,U["--rsbs-antigap-scale-y"]=se,U["--rsbs-overlay-translate-y"]=ie,U["--rsbs-overlay-rounded"]=ee,U["--rsbs-overlay-h"]=de,U}({spring:D});return g.createElement(Bg.div,_e({},L,{"data-rsbs-root":!0,"data-rsbs-state":x0.find(Zd.matches),"data-rsbs-is-blocking":S,"data-rsbs-is-dismissable":!!f,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!o,className:i,ref:K,style:_e({},Jd,T,{opacity:D.ready})}),r,S&&g.createElement("div",_e({key:"backdrop","data-rsbs-backdrop":!0},Pr({closeOnTap:!0}))),g.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:wn,onKeyDown:function(M){M.key==="Escape"&&(M.stopPropagation(),f&&f())}},a!==!1&&g.createElement("div",_e({key:"header","data-rsbs-header":!0,ref:Fe},Pr()),a),g.createElement("div",_e({key:"scroll","data-rsbs-scroll":!0,ref:ye},R?Pr({isContentDragging:!0}):{}),g.createElement("div",{"data-rsbs-content":!0,ref:Ne},n)),o&&g.createElement("div",_e({key:"footer",ref:wr,"data-rsbs-footer":!0},Pr()),o)))}),x0=["closed","opening","open","closing","dragging","snapping","resizing"];function E0(e){var t=e.lastSnap;return t??Math.min.apply(Math,e.snapPoints)}function T0(e){return e.minHeight}var P0=["onSpringStart","onSpringEnd","skipInitialTransition"],C0=g.forwardRef(function(e,t){var n=e.onSpringStart,r=e.onSpringEnd,i=e.skipInitialTransition,o=di(e,P0),a=g.useState(!1),s=a[0],l=a[1],u=g.useRef(),c=g.useRef(null),f=g.useRef(i&&o.open?"OPEN":"CLOSED");Xn(function(){if(o.open)return cancelAnimationFrame(u.current),l(!0),function(){f.current="CLOSED"}},[o.open]);var d=g.useCallback(function(p){return Promise.resolve(n==null?void 0:n(p)).then(function(){p.type==="OPEN"&&cancelAnimationFrame(u.current)})},[n]),h=g.useCallback(function(p){return Promise.resolve(r==null?void 0:r(p)).then(function(){p.type==="CLOSE"&&(u.current=requestAnimationFrame(function(){return l(!1)}))})},[r]);return s?g.createElement(mc,{"data-rsbs-portal":!0},g.createElement(w0,_e({},o,{lastSnapRef:c,ref:t,initialState:f.current,onSpringStart:d,onSpringEnd:h}))):null});const _0={},Ll=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(_0?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},O0=e=>e?Ll(e):Ll;var Xr={exports:{}},Oo={};/**
47
+ * @license React
48
+ * use-sync-external-store-shim/with-selector.production.js
49
+ *
50
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
51
+ *
52
+ * This source code is licensed under the MIT license found in the
53
+ * LICENSE file in the root directory of this source tree.
54
+ */var Dl;function A0(){if(Dl)return Oo;Dl=1;var e=g,t=Dc();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Oo.useSyncExternalStoreWithSelector=function(u,c,f,d,h){var p=o(null);if(p.current===null){var v={hasValue:!1,value:null};p.current=v}else v=p.current;p=s(function(){function m(w){if(!S){if(S=!0,b=w,w=d(w),h!==void 0&&v.hasValue){var x=v.value;if(h(x,w))return E=x}return E=w}if(x=E,r(b,w))return x;var _=d(w);return h!==void 0&&h(x,_)?(b=w,x):(b=w,E=_)}var S=!1,b,E,T=f===void 0?null:f;return[function(){return m(c())},T===null?void 0:function(){return m(T())}]},[c,f,d,h]);var y=i(u,p[0],p[1]);return a(function(){v.hasValue=!0,v.value=y},[y]),l(y),y},Oo}var Ao={};/**
55
+ * @license React
56
+ * use-sync-external-store-shim/with-selector.development.js
57
+ *
58
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */var Vl;function R0(){return Vl||(Vl=1,process.env.NODE_ENV!=="production"&&function(){function e(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=g,n=Dc(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,o=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Ao.useSyncExternalStoreWithSelector=function(u,c,f,d,h){var p=o(null);if(p.current===null){var v={hasValue:!1,value:null};p.current=v}else v=p.current;p=s(function(){function m(w){if(!S){if(S=!0,b=w,w=d(w),h!==void 0&&v.hasValue){var x=v.value;if(h(x,w))return E=x}return E=w}if(x=E,r(b,w))return x;var _=d(w);return h!==void 0&&h(x,_)?(b=w,x):(b=w,E=_)}var S=!1,b,E,T=f===void 0?null:f;return[function(){return m(c())},T===null?void 0:function(){return m(T())}]},[c,f,d,h]);var y=i(u,p[0],p[1]);return a(function(){v.hasValue=!0,v.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ao}var Nl;function M0(){return Nl||(Nl=1,process.env.NODE_ENV==="production"?Xr.exports=A0():Xr.exports=R0()),Xr.exports}var I0=M0();const L0=Ia(I0),vf={},{useDebugValue:D0}=g,{useSyncExternalStoreWithSelector:V0}=L0;let jl=!1;const N0=e=>e;function j0(e,t=N0,n){(vf?"production":void 0)!=="production"&&n&&!jl&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),jl=!0);const r=V0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return D0(r),r}const Bl=e=>{(vf?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?O0(e):e,n=(r,i)=>j0(t,r,i);return Object.assign(n,t),n},B0=e=>e?Bl(e):Bl,Ii=B0(e=>({betSlipBottomSheet:{isOpen:!1,storyId:null},setBetSlipBottomSheet:t=>e({betSlipBottomSheet:t})})),k0=({slip:e,title:t,onButtonStoryClick:n,storyId:r})=>{var s;const{betSlipBottomSheet:i,setBetSlipBottomSheet:o}=Ii(),a=i.isOpen&&r===i.storyId;return A.jsxs(C0,{open:a,onClick:l=>l.stopPropagation(),onPointerDown:l=>l.stopPropagation(),onTouchStart:l=>l.stopPropagation(),onDismiss:()=>o({isOpen:!1,storyId:null}),className:Ve.BetSlip_BottomSheet,snapPoints:({minHeight:l})=>l,expandOnContentDrag:!0,blocking:!0,header:null,scrollLocking:!1,children:[A.jsx("div",{className:Oe(Ve.BetSlip_BottomSheet_handle),children:A.jsx("span",{})}),A.jsxs("div",{className:Oe(Ve.BetSlip_BottomSheet_Content),onClick:l=>l.stopPropagation(),children:[A.jsxs("div",{className:Oe(Ve.SelectionItemWrap),onWheel:l=>l.stopPropagation(),onPointerDown:l=>l.stopPropagation(),children:[t?A.jsx("div",{className:Ve.BetSlip_Title,children:t}):null,(s=e==null?void 0:e.selections)==null?void 0:s.map((l,u)=>A.jsx(vc,{selection:l},`${Date.now()}-${u}`))]}),A.jsx("div",{className:Oe(Ve.BetSlip_ButtonWrap),children:A.jsx(Na,{onClick:n,children:A.jsxs("span",{className:Ve.BetSlip_PulseButton__Text,children:[A.jsx("span",{children:"Cuota total"})," ",e==null?void 0:e.cuotaTotal]})})})]})]})},F0=({slip:e,title:t,onButtonStoryClick:n,storyId:r})=>{var u;const{setBetSlipBottomSheet:i}=Ii(),o=g.useRef(null),a=g.useRef(null),[s,l]=g.useState(!1);return g.useEffect(()=>{(()=>{var f,d;o.current&&a.current&&l(((f=o.current)==null?void 0:f.clientHeight)<((d=a.current)==null?void 0:d.scrollHeight)+40-10)})()},[e.cuotaTotal]),A.jsxs("div",{className:Ve.BetSlip,ref:o,children:[A.jsxs("div",{className:Oe(Ve.SelectionItemWrap),ref:a,onWheel:c=>c.stopPropagation(),onPointerDown:c=>c.stopPropagation(),children:[t?A.jsx("div",{className:Ve.BetSlip_Title,children:t}):null,(u=e==null?void 0:e.selections)==null?void 0:u.map((c,f)=>A.jsx(vc,{selection:c},`${Date.now()}-${f}`))]}),A.jsx("div",{className:Oe(Ve.BetSlip_ButtonWrap),children:A.jsx(Na,{onClick:n,children:A.jsxs("span",{className:Ve.BetSlip_PulseButton__Text,children:[A.jsx("span",{children:"Cuota total"})," ",e==null?void 0:e.cuotaTotal]})})}),s&&A.jsx("div",{className:Oe(Ve.BetSlip_ShowMoreWrap),children:A.jsx("button",{className:Oe(Ve.BetSlip_ShowMoreButton),onClick:c=>{c.stopPropagation(),i({isOpen:!0,storyId:r})},children:A.jsx(jv,{})})}),A.jsx(k0,{slip:e,title:t,onButtonStoryClick:n,storyId:r})]})},mf=({story:e,onButtonStoryClick:t})=>{let n=kl;return(e==null?void 0:e.type)=="promo"&&(n=kl),(e==null?void 0:e.type)=="betting"&&(n=z0),A.jsx(n,{story:e,onButtonStoryClick:t})},kl=({story:e,onButtonStoryClick:t})=>A.jsxs("div",{className:Oe(Fn.story),children:[A.jsx("img",{src:e==null?void 0:e.image,alt:""}),e!=null&&e.btn_text&&(e!=null&&e.btn_url)?A.jsx("div",{className:Oe(Fn.BetSlip_Wrapper),children:A.jsx("div",{className:Fn.BetSlip_ButtonWrap,children:A.jsx(Na,{onClick:()=>t==null?void 0:t(e),children:e==null?void 0:e.btn_text})})}):null]}),z0=({story:e,onButtonStoryClick:t})=>{const n=JSON.parse((e==null?void 0:e.coupon_result)??"{}");return A.jsxs("div",{className:Oe(Fn.story),children:[A.jsx("img",{src:e==null?void 0:e.image,alt:""}),A.jsx("div",{className:Fn.BetSlip_Wrapper,children:A.jsx(F0,{storyId:e.id,slip:dv.fromRaw(n),title:e==null?void 0:e.coupon_title,onButtonStoryClick:()=>t==null?void 0:t(e)})})]})},$0="_StoryHeaderPlayer_1fccj_1",G0="_StoryHeaderPlayer__ProfileStory_1fccj_21",H0="_StoryHeaderPlayer__title_1fccj_27",Ro={StoryHeaderPlayer:$0,StoryHeaderPlayer__ProfileStory:G0,StoryHeaderPlayer__title:H0},gf=({story:e,onProfileClick:t=()=>null,color:n,image:r})=>A.jsxs("div",{className:Ro.StoryHeaderPlayer,children:[A.jsx(La,{className:Ro.StoryHeaderPlayer__ProfileStory,onProfileClick:t,color:n,image:r}),A.jsx("div",{className:Ro.StoryHeaderPlayer__title,children:e==null?void 0:e.title})]}),W0=({story:e,onChangeStory:t,onAllStoriesEnd:n,onLeft:r,onRight:i,play:o,initialIndex:a,onButtonStoryClick:s,duration:l=7e3})=>{var _,C;const{betSlipBottomSheet:u}=Ii(),[c,f]=g.useState(!1),d=g.useRef(),h=g.useRef(!1),[p,v]=g.useState(a),y=g.useRef(null),m=Ii(P=>{var O;return(O=P.betSlipBottomSheet)==null?void 0:O.isOpen}),S=P=>{const O=y.current.getBoundingClientRect();P.clientX-O.left<O.width/2?p==0?r==null||r(-1):(r==null||r(p-1),v(p-1)):x()},b=g.useRef(0),E=P=>{b.current=P.clientX,f(!0),h.current=!1,d.current=window.setTimeout(()=>{h.current=!0},200)},T=P=>{f(!1),clearTimeout(d.current)},w=P=>{if(h.current){P.preventDefault();return}S(P)},x=()=>{var P;p>=((P=e==null?void 0:e.stories)==null?void 0:P.length)-1?(i==null||i(-1),n==null||n(p)):(i==null||i(p),v(p+1))};return g.useEffect(()=>{o&&(t==null||t(p,e==null?void 0:e.stories[p]))},[p,o]),g.useEffect(()=>{if(!o||c)return;const P=setTimeout(()=>{x(),clearTimeout(P)},l);return()=>{clearTimeout(P)}},[p,o,c]),g.useEffect(()=>{f(m)},[u,o]),A.jsxs("div",{className:mt.CardStory,onClick:w,ref:y,onPointerDown:E,onPointerUp:T,onPointerLeave:T,children:[o&&A.jsx("div",{className:mt.CardStory_ProgressRoot,children:(_=e==null?void 0:e.stories)==null?void 0:_.map((P,O)=>{const R=p>O,L=p<O,N=p==O;return A.jsx("div",{className:Oe(mt.CardStory_ProgressRoot_Track,{[mt.ProgressAnimate]:N,[mt.Complete]:R,[mt.NoComplete]:L,[mt.Pause]:c}),style:{"--story-progress-track":`${l}ms`}},P==null?void 0:P.id)})}),(C=e==null?void 0:e.stories)==null?void 0:C.map((P,O)=>p!=O?null:A.jsxs("div",{"data-card-story-index":O,className:Oe(mt.Story,{active:p==O}),children:[A.jsx(mf,{story:P,onButtonStoryClick:s}),A.jsx(gf,{color:e==null?void 0:e.color,image:e==null?void 0:e.avatar,story:P})]},P==null?void 0:P.id))]})};var fa=function(e,t){return fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},fa(e,t)};function yf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},I.apply(this,arguments)};function We(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ve(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function He(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Fl="production",Sf=typeof process>"u"||process.env===void 0?Fl:process.env.NODE_ENV||Fl,ct=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},sr={measureLayout:ct(["layout","layoutId","drag"]),animation:ct(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ct(["exit"]),drag:ct(["drag","dragControls"]),focus:ct(["whileFocus"]),hover:ct(["whileHover","onHoverStart","onHoverEnd"]),tap:ct(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ct(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ct(["whileInView","onViewportEnter","onViewportLeave"])};function U0(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?sr.projectionNodeConstructor=e[t]:sr[t].Component=e[t])}var vr=function(){},ke=function(){};process.env.NODE_ENV!=="production"&&(vr=function(e,t){!e&&typeof console<"u"&&console.warn(t)},ke=function(e,t){if(!e)throw new Error(t)});var bf=g.createContext({strict:!1}),wf=Object.keys(sr),q0=wf.length;function Y0(e,t,n){var r=[],i=g.useContext(bf);if(!t)return null;Sf!=="production"&&n&&i.strict&&ke(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var o=0;o<q0;o++){var a=wf[o],s=sr[a],l=s.isEnabled,u=s.Component;l(e)&&u&&r.push(mi.createElement(u,I({key:a},e,{visualElement:t})))}return r}var mr=g.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),qi=g.createContext({});function K0(){return g.useContext(qi).visualElement}var Yi=g.createContext(null),bn=typeof document<"u",Li=bn?g.useLayoutEffect:g.useEffect,da={current:null},xf=!1;function X0(){if(xf=!0,!!bn)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return da.current=e.matches};e.addListener(t),t()}else da.current=!1}function Z0(){!xf&&X0();var e=ve(g.useState(da.current),1),t=e[0];return t}function J0(){var e=Z0(),t=g.useContext(mr).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function Q0(e,t,n,r){var i=g.useContext(bf),o=K0(),a=g.useContext(Yi),s=J0(),l=g.useRef(void 0);r||(r=i.renderer),!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceId:a==null?void 0:a.id,blockInitialAnimation:(a==null?void 0:a.initial)===!1,shouldReduceMotion:s}));var u=l.current;return Li(function(){u==null||u.syncRender()}),g.useEffect(function(){var c;(c=u==null?void 0:u.animationState)===null||c===void 0||c.animateChanges()}),Li(function(){return function(){return u==null?void 0:u.notifyUnmount()}},[]),u}function sn(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function eS(e,t,n){return g.useCallback(function(r){var i;r&&((i=e.mount)===null||i===void 0||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):sn(n)&&(n.current=r))},[t])}function Ef(e){return Array.isArray(e)}function Ze(e){return typeof e=="string"||Ef(e)}function tS(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function nS(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function Tf(e,t,n,r,i){var o;return r===void 0&&(r={}),i===void 0&&(i={}),typeof t=="function"&&(t=t(n??e.custom,r,i)),typeof t=="string"&&(t=(o=e.variants)===null||o===void 0?void 0:o[t]),typeof t=="function"&&(t=t(n??e.custom,r,i)),t}function Ki(e,t,n){var r=e.getProps();return Tf(r,t,n??r.custom,tS(e),nS(e))}function Xi(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||Ze(e.initial)||Ze(e.animate)||Ze(e.whileHover)||Ze(e.whileDrag)||Ze(e.whileTap)||Ze(e.whileFocus)||Ze(e.exit)}function Pf(e){return!!(Xi(e)||e.variants)}function rS(e,t){if(Xi(e)){var n=e.initial,r=e.animate;return{initial:n===!1||Ze(n)?n:void 0,animate:Ze(r)?r:void 0}}return e.inherit!==!1?t:{}}function iS(e){var t=rS(e,g.useContext(qi)),n=t.initial,r=t.animate;return g.useMemo(function(){return{initial:n,animate:r}},[zl(n),zl(r)])}function zl(e){return Array.isArray(e)?e.join(" "):e}function Gt(e){var t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}var Zn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},oS=1;function aS(){return Gt(function(){if(Zn.hasEverUpdated)return oS++})}var Cf=g.createContext({}),_f=g.createContext({});function sS(e,t,n,r){var i,o=t.layoutId,a=t.layout,s=t.drag,l=t.dragConstraints,u=t.layoutScroll,c=g.useContext(_f);!r||!n||n!=null&&n.projection||(n.projection=new r(e,n.getLatestValues(),(i=n.parent)===null||i===void 0?void 0:i.projection),n.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!s||l&&sn(l),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof a=="string"?a:"both",initialPromotionConfig:c,layoutScroll:u}))}var lS=function(e){yf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var n=this.props,r=n.visualElement,i=n.props;r&&r.setProps(i)},t.prototype.render=function(){return this.props.children},t}(g.Component);function uS(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,i=e.useRender,o=e.useVisualState,a=e.Component;t&&U0(t);function s(l,u){var c=cS(l);l=I(I({},l),{layoutId:c});var f=g.useContext(mr),d=null,h=iS(l),p=f.isStatic?void 0:aS(),v=o(l,f.isStatic);return!f.isStatic&&bn&&(h.visualElement=Q0(a,v,I(I({},f),l),n),sS(p,l,h.visualElement,r||sr.projectionNodeConstructor),d=Y0(l,h.visualElement,t)),mi.createElement(lS,{visualElement:h.visualElement,props:I(I({},f),l)},d,mi.createElement(qi.Provider,{value:h},i(a,l,p,eS(v,h.visualElement,u),v,f.isStatic,h.visualElement)))}return g.forwardRef(s)}function cS(e){var t,n=e.layoutId,r=(t=g.useContext(Cf))===null||t===void 0?void 0:t.id;return r&&n!==void 0?r+"-"+n:n}function fS(e){function t(r,i){return i===void 0&&(i={}),uS(e(r,i))}if(typeof Proxy>"u")return t;var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var dS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function qa(e){return typeof e!="string"||e.includes("-")?!1:!!(dS.indexOf(e)>-1||/[A-Z]/.test(e))}var Di={};function pS(e){Object.assign(Di,e)}var pa=["","X","Y","Z"],hS=["translate","scale","rotate","skew"],lr=["transformPerspective","x","y","z"];hS.forEach(function(e){return pa.forEach(function(t){return lr.push(e+t)})});function vS(e,t){return lr.indexOf(e)-lr.indexOf(t)}var mS=new Set(lr);function gr(e){return mS.has(e)}var gS=new Set(["originX","originY","originZ"]);function Of(e){return gS.has(e)}function Af(e,t){var n=t.layout,r=t.layoutId;return gr(e)||Of(e)||(n||r!==void 0)&&(!!Di[e]||e==="opacity")}var tt=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},yS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function SS(e,t,n,r){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,l=t.allowTransformNone,u=l===void 0?!0:l,c="";o.sort(vS);for(var f=!1,d=o.length,h=0;h<d;h++){var p=o[h];c+="".concat(yS[p]||p,"(").concat(i[p],") "),p==="z"&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),r?c=r(i,n?"":c):u&&n&&(c="none"),c}function bS(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,i=r===void 0?"50%":r,o=e.originZ,a=o===void 0?0:o;return"".concat(n," ").concat(i," ").concat(a)}function Rf(e){return e.startsWith("--")}var wS=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const Mf=(e,t)=>n=>Math.max(Math.min(n,t),e),Jn=e=>e%1?Number(e.toFixed(5)):e,ur=/(-)?([\d]*\.?[\d])+/g,ha=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,xS=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function yr(e){return typeof e=="string"}const Ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Qn=Object.assign(Object.assign({},Ht),{transform:Mf(0,1)}),Zr=Object.assign(Object.assign({},Ht),{default:1}),Sr=e=>({test:t=>yr(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yt=Sr("deg"),at=Sr("%"),H=Sr("px"),ES=Sr("vh"),TS=Sr("vw"),$l=Object.assign(Object.assign({},at),{parse:e=>at.parse(e)/100,transform:e=>at.transform(e*100)}),Ya=(e,t)=>n=>!!(yr(n)&&xS.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),If=(e,t,n)=>r=>{if(!yr(r))return r;const[i,o,a,s]=r.match(ur);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Dt={test:Ya("hsl","hue"),parse:If("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+at.transform(Jn(t))+", "+at.transform(Jn(n))+", "+Jn(Qn.transform(r))+")"},PS=Mf(0,255),Mo=Object.assign(Object.assign({},Ht),{transform:e=>Math.round(PS(e))}),_t={test:Ya("rgb","red"),parse:If("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Mo.transform(e)+", "+Mo.transform(t)+", "+Mo.transform(n)+", "+Jn(Qn.transform(r))+")"};function CS(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const va={test:Ya("#"),parse:CS,transform:_t.transform},Me={test:e=>_t.test(e)||va.test(e)||Dt.test(e),parse:e=>_t.test(e)?_t.parse(e):Dt.test(e)?Dt.parse(e):va.parse(e),transform:e=>yr(e)?e:e.hasOwnProperty("red")?_t.transform(e):Dt.transform(e)},Lf="${c}",Df="${n}";function _S(e){var t,n,r,i;return isNaN(e)&&yr(e)&&((n=(t=e.match(ur))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(ha))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function Vf(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(ha);r&&(n=r.length,e=e.replace(ha,Lf),t.push(...r.map(Me.parse)));const i=e.match(ur);return i&&(e=e.replace(ur,Df),t.push(...i.map(Ht.parse))),{values:t,numColors:n,tokenised:e}}function Nf(e){return Vf(e).values}function jf(e){const{values:t,numColors:n,tokenised:r}=Vf(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?Lf:Df,s<n?Me.transform(o[s]):Jn(o[s]));return a}}const OS=e=>typeof e=="number"?0:e;function AS(e){const t=Nf(e);return jf(e)(t.map(OS))}const dt={test:_S,parse:Nf,createTransformer:jf,getAnimatableNone:AS},RS=new Set(["brightness","contrast","saturate","opacity"]);function MS(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ur)||[];if(!r)return e;const i=n.replace(r,"");let o=RS.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const IS=/([a-z-]*)\(.*?\)/g,ma=Object.assign(Object.assign({},dt),{getAnimatableNone:e=>{const t=e.match(IS);return t?t.map(MS).join(" "):e}});var Gl=I(I({},Ht),{transform:Math.round}),Bf={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,radius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,size:H,top:H,right:H,bottom:H,left:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,rotate:yt,rotateX:yt,rotateY:yt,rotateZ:yt,scale:Zr,scaleX:Zr,scaleY:Zr,scaleZ:Zr,skew:yt,skewX:yt,skewY:yt,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:Qn,originX:$l,originY:$l,originZ:H,zIndex:Gl,fillOpacity:Qn,strokeOpacity:Qn,numOctaves:Gl};function Ka(e,t,n,r){var i,o=e.style,a=e.vars,s=e.transform,l=e.transformKeys,u=e.transformOrigin;l.length=0;var c=!1,f=!1,d=!0;for(var h in t){var p=t[h];if(Rf(h)){a[h]=p;continue}var v=Bf[h],y=wS(p,v);if(gr(h)){if(c=!0,s[h]=y,l.push(h),!d)continue;p!==((i=v.default)!==null&&i!==void 0?i:0)&&(d=!1)}else Of(h)?(u[h]=y,f=!0):o[h]=y}c?o.transform=SS(e,n,d,r):r?o.transform=r({},""):!t.transform&&o.transform&&(o.transform="none"),f&&(o.transformOrigin=bS(u))}var Xa=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function kf(e,t,n){for(var r in t)!tt(t[r])&&!Af(r,n)&&(e[r]=t[r])}function LS(e,t,n){var r=e.transformTemplate;return g.useMemo(function(){var i=Xa();Ka(i,t,{enableHardwareAcceleration:!n},r);var o=i.vars,a=i.style;return I(I({},o),a)},[t])}function DS(e,t,n){var r=e.style||{},i={};return kf(i,r,e),Object.assign(i,LS(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function VS(e,t,n){var r={},i=DS(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),r.style=i,r}var NS=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function Vi(e){return NS.has(e)}var Ff=function(e){return!Vi(e)};function jS(e){e&&(Ff=function(t){return t.startsWith("on")?!Vi(t):e(t)})}try{jS(require("@emotion/is-prop-valid").default)}catch{}function BS(e,t,n){var r={};for(var i in e)(Ff(i)||n===!0&&Vi(i)||!t&&!Vi(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Hl(e,t,n){return typeof e=="string"?e:H.transform(t+n*e)}function kS(e,t,n){var r=Hl(t,e.x,e.width),i=Hl(n,e.y,e.height);return"".concat(r," ").concat(i)}var FS={offset:"strokeDashoffset",array:"strokeDasharray"};function zS(e,t,n,r,i){n===void 0&&(n=1),r===void 0&&(r=0),e.pathLength=1;var o=FS;e[o.offset]=H.transform(-r);var a=H.transform(t),s=H.transform(n);e[o.array]="".concat(a," ").concat(s)}function Za(e,t,n,r){var i=t.attrX,o=t.attrY,a=t.originX,s=t.originY,l=t.pathLength,u=t.pathSpacing,c=u===void 0?1:u,f=t.pathOffset,d=f===void 0?0:f,h=We(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Ka(e,h,n,r),e.attrs=e.style,e.style={};var p=e.attrs,v=e.style,y=e.dimensions;p.transform&&(y&&(v.transform=p.transform),delete p.transform),y&&(a!==void 0||s!==void 0||v.transform)&&(v.transformOrigin=kS(y,a!==void 0?a:.5,s!==void 0?s:.5)),i!==void 0&&(p.x=i),o!==void 0&&(p.y=o),l!==void 0&&zS(p,l,c,d)}var zf=function(){return I(I({},Xa()),{attrs:{}})};function $S(e,t){var n=g.useMemo(function(){var i=zf();return Za(i,t,{enableHardwareAcceleration:!1},e.transformTemplate),I(I({},i.attrs),{style:I({},i.style)})},[t]);if(e.style){var r={};kf(r,e.style,e),n.style=I(I({},r),n.style)}return n}function GS(e){e===void 0&&(e=!1);var t=function(n,r,i,o,a,s){var l=a.latestValues,u=qa(n)?$S:VS,c=u(r,l,s),f=BS(r,typeof n=="string",e),d=I(I(I({},f),c),{ref:o});return i&&(d["data-projection-id"]=i),g.createElement(n,d)};return t}var HS=/([a-z])([A-Z])/g,WS="$1-$2",$f=function(e){return e.replace(HS,WS).toLowerCase()};function Gf(e,t,n,r){var i=t.style,o=t.vars;Object.assign(e.style,i,r&&r.getProjectionStyles(n));for(var a in o)e.style.setProperty(a,o[a])}var Hf=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Wf(e,t,n,r){Gf(e,t,void 0,r);for(var i in t.attrs)e.setAttribute(Hf.has(i)?i:$f(i),t.attrs[i])}function Ja(e){var t=e.style,n={};for(var r in t)(tt(t[r])||Af(r,e))&&(n[r]=t[r]);return n}function Uf(e){var t=Ja(e);for(var n in e)if(tt(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Qa(e){return typeof e=="object"&&typeof e.start=="function"}var cr=function(e){return Array.isArray(e)},US=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},qf=function(e){return cr(e)?e[e.length-1]||0:e};function pi(e){var t=tt(e)?e.get():e;return US(t)?t.toValue():t}function Wl(e,t,n,r){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,s={latestValues:qS(t,n,r,i),renderState:o()};return a&&(s.mount=function(l){return a(t,l,s)}),s}var Yf=function(e){return function(t,n){var r=g.useContext(qi),i=g.useContext(Yi);return n?Wl(e,t,r,i):Gt(function(){return Wl(e,t,r,i)})}};function qS(e,t,n,r){var i={},o=(n==null?void 0:n.initial)===!1,a=r(e);for(var s in a)i[s]=pi(a[s]);var l=e.initial,u=e.animate,c=Xi(e),f=Pf(e);t&&f&&!c&&e.inherit!==!1&&(l??(l=t.initial),u??(u=t.animate));var d=o||l===!1,h=d?u:l;if(h&&typeof h!="boolean"&&!Qa(h)){var p=Array.isArray(h)?h:[h];p.forEach(function(v){var y=Tf(e,v);if(y){var m=y.transitionEnd;y.transition;var S=We(y,["transitionEnd","transition"]);for(var b in S){var E=S[b];if(Array.isArray(E)){var T=d?E.length-1:0;E=E[T]}E!==null&&(i[b]=E)}for(var b in m)i[b]=m[b]}})}return i}var YS={useVisualState:Yf({scrapeMotionValuesFromProps:Uf,createRenderState:zf,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}Za(r,i,{enableHardwareAcceleration:!1},e.transformTemplate),Wf(t,r)}})},KS={useVisualState:Yf({scrapeMotionValuesFromProps:Ja,createRenderState:Xa})};function XS(e,t,n,r,i){var o=t.forwardMotionProps,a=o===void 0?!1:o,s=qa(e)?YS:KS;return I(I({},s),{preloadedFeatures:n,useRender:GS(a),createVisualElement:r,projectionNodeConstructor:i,Component:e})}var le;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(le||(le={}));function Zi(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function ga(e,t,n,r){g.useEffect(function(){var i=e.current;if(n&&i)return Zi(i,t,n,r)},[e,t,n,r])}function ZS(e){var t=e.whileFocus,n=e.visualElement,r=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(le.Focus,!0)},i=function(){var o;(o=n.animationState)===null||o===void 0||o.setActive(le.Focus,!1)};ga(n,"focus",t?r:void 0),ga(n,"blur",t?i:void 0)}function Kf(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Xf(e){var t=!!e.touches;return t}function JS(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var QS={pageX:0,pageY:0};function eb(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||QS;return{x:r[t+"X"],y:r[t+"Y"]}}function tb(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function es(e,t){return t===void 0&&(t="page"),{point:Xf(e)?eb(e,t):tb(e,t)}}var Zf=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,es(r))};return t?JS(n):n},nb=function(){return bn&&window.onpointerdown===null},rb=function(){return bn&&window.ontouchstart===null},ib=function(){return bn&&window.onmousedown===null},ob={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ab={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Jf(e){return nb()?e:rb()?ab[e]:ib()?ob[e]:e}function hn(e,t,n,r){return Zi(e,Jf(t),Zf(n,t==="pointerdown"),r)}function Ni(e,t,n,r){return ga(e,Jf(t),n&&Zf(n,t==="pointerdown"),r)}function Qf(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var Ul=Qf("dragHorizontal"),ql=Qf("dragVertical");function ed(e){var t=!1;if(e==="y")t=ql();else if(e==="x")t=Ul();else{var n=Ul(),r=ql();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function td(){var e=ed(!0);return e?(e(),!1):!0}function Yl(e,t,n){return function(r,i){var o;!Kf(r)||td()||((o=e.animationState)===null||o===void 0||o.setActive(le.Hover,t),n==null||n(r,i))}}function sb(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Ni(i,"pointerenter",t||r?Yl(i,!0,t):void 0,{passive:!t}),Ni(i,"pointerleave",n||r?Yl(i,!1,n):void 0,{passive:!n})}var nd=function(e,t){return t?e===t?!0:nd(e,t.parentElement):!1};function rd(e){return g.useEffect(function(){return function(){return e()}},[])}const ji=(e,t,n)=>Math.min(Math.max(n,e),t),Io=.001,lb=.01,Kl=10,ub=.05,cb=1;function fb({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;vr(e<=Kl*1e3,"Spring duration must be 10 seconds or less");let a=1-t;a=ji(ub,cb,a),e=ji(lb,Kl,e/1e3),a<1?(i=u=>{const c=u*a,f=c*e,d=c-n,h=ya(u,a),p=Math.exp(-f);return Io-d/h*p},o=u=>{const f=u*a*e,d=f*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-f),v=ya(Math.pow(u,2),a);return(-i(u)+Io>0?-1:1)*((d-h)*p)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Io+c*f},o=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const s=5/e,l=pb(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const db=12;function pb(e,t,n){let r=n;for(let i=1;i<db;i++)r=r-e(r)/t(r);return r}function ya(e,t){return e*Math.sqrt(1-t*t)}const hb=["duration","bounce"],vb=["stiffness","damping","mass"];function Xl(e,t){return t.some(n=>e[n]!==void 0)}function mb(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Xl(e,vb)&&Xl(e,hb)){const n=fb(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function ts(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=We(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:c,duration:f,isResolvedFromDuration:d}=mb(o),h=Zl,p=Zl;function v(){const y=c?-(c/1e3):0,m=n-t,S=l/(2*Math.sqrt(s*u)),b=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),S<1){const E=ya(b,S);h=T=>{const w=Math.exp(-S*b*T);return n-w*((y+S*b*m)/E*Math.sin(E*T)+m*Math.cos(E*T))},p=T=>{const w=Math.exp(-S*b*T);return S*b*w*(Math.sin(E*T)*(y+S*b*m)/E+m*Math.cos(E*T))-w*(Math.cos(E*T)*(y+S*b*m)-E*m*Math.sin(E*T))}}else if(S===1)h=E=>n-Math.exp(-b*E)*(m+(y+b*m)*E);else{const E=b*Math.sqrt(S*S-1);h=T=>{const w=Math.exp(-S*b*T),x=Math.min(E*T,300);return n-w*((y+S*b*m)*Math.sinh(x)+E*m*Math.cosh(x))/E}}}return v(),{next:y=>{const m=h(y);if(d)a.done=y>=f;else{const S=p(y)*1e3,b=Math.abs(S)<=r,E=Math.abs(n-m)<=i;a.done=b&&E}return a.value=a.done?n:m,a},flipTarget:()=>{c=-c,[t,n]=[n,t],v()}}}ts.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Zl=e=>0,fr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ge=(e,t,n)=>-n*e+n*t+e;function Lo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Jl({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Lo(l,s,e+1/3),o=Lo(l,s,e),a=Lo(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const gb=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},yb=[va,_t,Dt],Ql=e=>yb.find(t=>t.test(e)),eu=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,id=(e,t)=>{let n=Ql(e),r=Ql(t);ke(!!n,eu(e)),ke(!!r,eu(t));let i=n.parse(e),o=r.parse(t);n===Dt&&(i=Jl(i),n=_t),r===Dt&&(o=Jl(o),r=_t);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=gb(i[l],o[l],s));return a.alpha=ge(i.alpha,o.alpha,s),n.transform(a)}},Sa=e=>typeof e=="number",Sb=(e,t)=>n=>t(e(n)),Ji=(...e)=>e.reduce(Sb);function od(e,t){return Sa(e)?n=>ge(e,t,n):Me.test(e)?id(e,t):sd(e,t)}const ad=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>od(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},bb=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=od(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function tu(e){const t=dt.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a<n;a++)r||typeof t[a]=="number"?r++:t[a].hue!==void 0?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}const sd=(e,t)=>{const n=dt.createTransformer(t),r=tu(e),i=tu(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Ji(ad(r.parsed,i.parsed),n):(vr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),a=>`${a>0?t:e}`)},wb=(e,t)=>n=>ge(e,t,n);function xb(e){if(typeof e=="number")return wb;if(typeof e=="string")return Me.test(e)?id:sd;if(Array.isArray(e))return ad;if(typeof e=="object")return bb}function Eb(e,t,n){const r=[],i=n||xb(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=Ji(l,s)}r.push(s)}return r}function Tb([e,t],[n]){return r=>n(fr(e,t,r))}function Pb(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;l<n&&!(e[l]>i||l===r);l++);o=l-1}const s=fr(e[o],e[o+1],i);return t[o](s)}}function ns(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;ke(o===t.length,"Both input and output ranges must be the same length"),ke(!r||!Array.isArray(r)||r.length===o-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Eb(t,r,i),s=o===2?Tb(e,a):Pb(e,a);return n?l=>s(ji(e[0],e[o-1],l)):s}const Qi=e=>t=>1-e(1-t),rs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cb=e=>t=>Math.pow(t,e),ld=e=>t=>t*t*((e+1)*t-e),_b=e=>{const t=ld(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},ud=1.525,Ob=4/11,Ab=8/11,Rb=9/10,is=e=>e,os=Cb(2),Mb=Qi(os),cd=rs(os),fd=e=>1-Math.sin(Math.acos(e)),as=Qi(fd),Ib=rs(as),ss=ld(ud),Lb=Qi(ss),Db=rs(ss),Vb=_b(ud),Nb=4356/361,jb=35442/1805,Bb=16061/1805,Bi=e=>{if(e===1||e===0)return e;const t=e*e;return e<Ob?7.5625*t:e<Ab?9.075*t-9.9*e+3.4:e<Rb?Nb*t-jb*e+Bb:10.8*e*e-20.52*e+10.72},kb=Qi(Bi),Fb=e=>e<.5?.5*(1-Bi(1-e*2)):.5*Bi(e*2-1)+.5;function zb(e,t){return e.map(()=>t||cd).splice(0,e.length-1)}function $b(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function Gb(e,t){return e.map(n=>n*t)}function hi({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Gb(r&&r.length===a.length?r:$b(a),i);function l(){return ns(s,a,{ease:Array.isArray(n)?n:zb(a,n)})}let u=l();return{next:c=>(o.value=u(c),o.done=c>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function Hb({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:c=>{const f=-s*Math.exp(-c/r);return a.done=!(f>i||f<-i),a.value=a.done?u:u+f,a},flipTarget:()=>{}}}const nu={keyframes:hi,spring:ts,decay:Hb};function Wb(e){if(Array.isArray(e.to))return hi;if(nu[e.type])return nu[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?hi:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?ts:hi}const dd=1/60*1e3,Ub=typeof performance<"u"?()=>performance.now():()=>Date.now(),pd=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Ub()),dd);function qb(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const f=c&&i,d=f?t:n;return u&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const c=t[u];c(l),a.has(c)&&(s.schedule(c),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Yb=40;let ba=!0,dr=!1,wa=!1;const vn={delta:0,timestamp:0},br=["read","update","preRender","render","postRender"],eo=br.reduce((e,t)=>(e[t]=qb(()=>dr=!0),e),{}),et=br.reduce((e,t)=>{const n=eo[t];return e[t]=(r,i=!1,o=!1)=>(dr||Xb(),n.schedule(r,i,o)),e},{}),yn=br.reduce((e,t)=>(e[t]=eo[t].cancel,e),{}),Do=br.reduce((e,t)=>(e[t]=()=>eo[t].process(vn),e),{}),Kb=e=>eo[e].process(vn),hd=e=>{dr=!1,vn.delta=ba?dd:Math.max(Math.min(e-vn.timestamp,Yb),1),vn.timestamp=e,wa=!0,br.forEach(Kb),wa=!1,dr&&(ba=!1,pd(hd))},Xb=()=>{dr=!0,ba=!0,wa||pd(hd)},ki=()=>vn;function vd(e,t,n=0){return e-t-n}function Zb(e,t,n=0,r=!0){return r?vd(t+-e,t,n):t-(e-t)+n}function Jb(e,t,n,r){return r?e>=t+n:e<=-n}const Qb=e=>{const t=({delta:n})=>e(n);return{start:()=>et.update(t,!0),stop:()=>yn.update(t)}};function ls(e){var t,n,{from:r,autoplay:i=!0,driver:o=Qb,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:f,onComplete:d,onRepeat:h,onUpdate:p}=e,v=We(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:y}=v,m,S=0,b=v.duration,E,T=!1,w=!0,x;const _=Wb(v);!((n=(t=_).needsInterpolation)===null||n===void 0)&&n.call(t,r,y)&&(x=ns([0,100],[r,y],{clamp:!1}),r=0,y=100);const C=_(Object.assign(Object.assign({},v),{from:r,to:y}));function P(){S++,l==="reverse"?(w=S%2===0,a=Zb(a,b,u,w)):(a=vd(a,b,u),l==="mirror"&&C.flipTarget()),T=!1,h&&h()}function O(){m.stop(),d&&d()}function R(N){if(w||(N=-N),a+=N,!T){const z=C.next(Math.max(0,a));E=z.value,x&&(E=x(E)),T=w?z.done:a<=0}p==null||p(E),T&&(S===0&&(b??(b=a)),S<s?Jb(a,b,u,w)&&P():O())}function L(){c==null||c(),m=o(R),m.start()}return i&&L(),{stop:()=>{f==null||f(),m.stop()}}}function md(e,t){return t?e*(1e3/t):0}function ew({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:f,onComplete:d,onStop:h}){let p;function v(b){return n!==void 0&&b<n||r!==void 0&&b>r}function y(b){return n===void 0?r:r===void 0||Math.abs(n-b)<Math.abs(r-b)?n:r}function m(b){p==null||p.stop(),p=ls(Object.assign(Object.assign({},b),{driver:c,onUpdate:E=>{var T;f==null||f(E),(T=b.onUpdate)===null||T===void 0||T.call(b,E)},onComplete:d,onStop:h}))}function S(b){m(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},b))}if(v(e))S({from:e,velocity:t,to:y(e)});else{let b=i*t+e;typeof u<"u"&&(b=u(b));const E=y(b),T=E===n?-1:1;let w,x;const _=C=>{w=x,x=C,t=md(C-w,ki().delta),(T===1&&C>E||T===-1&&C<E)&&S({from:C,to:E,velocity:t})};m({type:"decay",from:e,velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:u,onUpdate:v(b)?_:void 0})}return{stop:()=>p==null?void 0:p.stop()}}const xa=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),ru=e=>xa(e)&&e.hasOwnProperty("z"),Jr=(e,t)=>Math.abs(e-t);function gd(e,t){if(Sa(e)&&Sa(t))return Jr(e,t);if(xa(e)&&xa(t)){const n=Jr(e.x,t.x),r=Jr(e.y,t.y),i=ru(e)&&ru(t)?Jr(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const yd=(e,t)=>1-3*t+3*e,Sd=(e,t)=>3*t-6*e,bd=e=>3*e,Fi=(e,t,n)=>((yd(t,n)*e+Sd(t,n))*e+bd(t))*e,wd=(e,t,n)=>3*yd(t,n)*e*e+2*Sd(t,n)*e+bd(t),tw=1e-7,nw=10;function rw(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=Fi(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>tw&&++s<nw);return a}const iw=8,ow=.001;function aw(e,t,n,r){for(let i=0;i<iw;++i){const o=wd(t,n,r);if(o===0)return t;const a=Fi(t,n,r)-e;t-=a/o}return t}const vi=11,Qr=1/(vi-1);function sw(e,t,n,r){if(e===t&&n===r)return is;const i=new Float32Array(vi);for(let a=0;a<vi;++a)i[a]=Fi(a*Qr,e,n);function o(a){let s=0,l=1;const u=vi-1;for(;l!==u&&i[l]<=a;++l)s+=Qr;--l;const c=(a-i[l])/(i[l+1]-i[l]),f=s+c*Qr,d=wd(f,e,n);return d>=ow?aw(a,f,e,n):d===0?f:rw(a,s,s+Qr,e,n)}return a=>a===0||a===1?a:Fi(o(a),t,r)}function lw(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,o=e.visualElement,a=t||n||r||i,s=g.useRef(!1),l=g.useRef(null),u={passive:!(n||t||r||p)};function c(){var v;(v=l.current)===null||v===void 0||v.call(l),l.current=null}function f(){var v;return c(),s.current=!1,(v=o.animationState)===null||v===void 0||v.setActive(le.Tap,!1),!td()}function d(v,y){f()&&(nd(o.getInstance(),v.target)?t==null||t(v,y):r==null||r(v,y))}function h(v,y){f()&&(r==null||r(v,y))}function p(v,y){var m;c(),!s.current&&(s.current=!0,l.current=Ji(hn(window,"pointerup",d,u),hn(window,"pointercancel",h,u)),(m=o.animationState)===null||m===void 0||m.setActive(le.Tap,!0),n==null||n(v,y))}Ni(o,"pointerdown",a?p:void 0,u),rd(c)}var iu=new Set;function xd(e,t,n){e||iu.has(t)||(console.warn(t),iu.add(t))}var Ea=new WeakMap,Vo=new WeakMap,uw=function(e){var t;(t=Ea.get(e.target))===null||t===void 0||t(e)},cw=function(e){e.forEach(uw)};function fw(e){var t=e.root,n=We(e,["root"]),r=t||document;Vo.has(r)||Vo.set(r,{});var i=Vo.get(r),o=JSON.stringify(n);return i[o]||(i[o]=new IntersectionObserver(cw,I({root:t},n))),i[o]}function dw(e,t,n){var r=fw(t);return Ea.set(e,n),r.observe(e),function(){Ea.delete(e),r.unobserve(e)}}function pw(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,o=e.viewport,a=o===void 0?{}:o,s=g.useRef({hasEnteredView:!1,isInView:!1}),l=!!(n||r||i);a.once&&s.current.hasEnteredView&&(l=!1);var u=typeof IntersectionObserver>"u"?mw:vw;u(l,s.current,t,a)}var hw={some:0,all:1};function vw(e,t,n,r){var i=r.root,o=r.margin,a=r.amount,s=a===void 0?"some":a,l=r.once;g.useEffect(function(){if(e){var u={root:i==null?void 0:i.current,rootMargin:o,threshold:typeof s=="number"?s:hw[s]},c=function(f){var d,h=f.isIntersecting;if(t.isInView!==h&&(t.isInView=h,!(l&&!h&&t.hasEnteredView))){h&&(t.hasEnteredView=!0),(d=n.animationState)===null||d===void 0||d.setActive(le.InView,h);var p=n.getProps(),v=h?p.onViewportEnter:p.onViewportLeave;v==null||v(f)}};return dw(n.getInstance(),u,c)}},[e,i,o,s])}function mw(e,t,n,r){var i=r.fallback,o=i===void 0?!0:i;g.useEffect(function(){!e||!o||(Sf!=="production"&&xd(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=n.getProps().onViewportEnter;s==null||s(null),(a=n.animationState)===null||a===void 0||a.setActive(le.InView,!0)}))},[e])}var Ot=function(e){return function(t){return e(t),null}},gw={inView:Ot(pw),tap:Ot(lw),focus:Ot(ZS),hover:Ot(sb)},yw=0,Sw=function(){return yw++},bw=function(){return Gt(Sw)};function Ed(){var e=g.useContext(Yi);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=bw();g.useEffect(function(){return r(i)},[]);var o=function(){return n==null?void 0:n(i)};return!t&&n?[!1,o]:[!0]}function Td(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var zi=function(e){return e*1e3},ou={linear:is,easeIn:os,easeInOut:cd,easeOut:Mb,circIn:fd,circInOut:Ib,circOut:as,backIn:ss,backInOut:Db,backOut:Lb,anticipate:Vb,bounceIn:kb,bounceInOut:Fb,bounceOut:Bi},au=function(e){if(Array.isArray(e)){ke(e.length===4,"Cubic bezier arrays must contain four numerical values.");var t=ve(e,4),n=t[0],r=t[1],i=t[2],o=t[3];return sw(n,r,i,o)}else if(typeof e=="string")return ke(ou[e]!==void 0,"Invalid easing type '".concat(e,"'")),ou[e];return e},ww=function(e){return Array.isArray(e)&&typeof e[0]!="number"},su=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&dt.test(t)&&!t.startsWith("url("))},Mt=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},ei=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},No=function(){return{type:"keyframes",ease:"linear",duration:.3}},xw=function(e){return{type:"keyframes",duration:.8,values:e}},lu={x:Mt,y:Mt,z:Mt,rotate:Mt,rotateX:Mt,rotateY:Mt,rotateZ:Mt,scaleX:ei,scaleY:ei,scale:ei,opacity:No,backgroundColor:No,color:No,default:ei},Ew=function(e,t){var n;return cr(t)?n=xw:n=lu[e]||lu.default,I({to:t},n(t))},Tw=I(I({},Bf),{color:Me,backgroundColor:Me,outlineColor:Me,fill:Me,stroke:Me,borderColor:Me,borderTopColor:Me,borderRightColor:Me,borderBottomColor:Me,borderLeftColor:Me,filter:ma,WebkitFilter:ma}),us=function(e){return Tw[e]};function cs(e,t){var n,r=us(e);return r!==ma&&(r=dt),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function Pw(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=We(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}var uu=!1;function Cw(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,o=e.loop,a=We(e,["ease","times","yoyo","flip","loop"]),s=I({},a);return n&&(s.offset=n),a.duration&&(s.duration=zi(a.duration)),a.repeatDelay&&(s.repeatDelay=zi(a.repeatDelay)),t&&(s.ease=ww(t)?t.map(au):au(t)),a.type==="tween"&&(s.type="keyframes"),(r||o||i)&&(vr(!uu,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),uu=!0,r?s.repeatType="reverse":o?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=o||r||i||a.repeat),a.type!=="spring"&&(s.type="keyframes"),s}function _w(e,t){var n,r,i=fs(e,t)||{};return(r=(n=i.delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Ow(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=He([],ve(e.to),!1),e.to[0]=e.from),e}function Aw(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),Ow(t),Pw(e)||(e=I(I({},e),Ew(n,t.to))),I(I({},t),Cw(e))}function Rw(e,t,n,r,i){var o,a=fs(r,e),s=(o=a.from)!==null&&o!==void 0?o:t.get(),l=su(e,n);s==="none"&&l&&typeof n=="string"?s=cs(e,n):cu(s)&&typeof n=="string"?s=fu(n):!Array.isArray(n)&&cu(n)&&typeof s=="string"&&(n=fu(s));var u=su(e,s);vr(u===l,"You are trying to animate ".concat(e,' from "').concat(s,'" to "').concat(n,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(n," via the `style` property."));function c(){var d={from:s,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(h){return t.set(h)}};return a.type==="inertia"||a.type==="decay"?ew(I(I({},d),a)):ls(I(I({},Aw(a,d,e)),{onUpdate:function(h){var p;d.onUpdate(h),(p=a.onUpdate)===null||p===void 0||p.call(a,h)},onComplete:function(){var h;d.onComplete(),(h=a.onComplete)===null||h===void 0||h.call(a)}}))}function f(){var d,h,p=qf(n);return t.set(p),i(),(d=a==null?void 0:a.onUpdate)===null||d===void 0||d.call(a,p),(h=a==null?void 0:a.onComplete)===null||h===void 0||h.call(a),{stop:function(){}}}return!u||!l||a.type===!1?f:c}function cu(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function fu(e){return typeof e=="number"?0:cs("",e)}function fs(e,t){return e[t]||e.default||e}function ds(e,t,n,r){return r===void 0&&(r={}),t.start(function(i){var o,a,s=Rw(e,t,n,r,i),l=_w(r,e),u=function(){return a=s()};return l?o=window.setTimeout(u,zi(l)):u(),function(){clearTimeout(o),a==null||a.stop()}})}var Mw=function(e){return/^\-?\d*\.?\d+$/.test(e)},Iw=function(e){return/^0[^.\s]+$/.test(e)};function ps(e,t){e.indexOf(t)===-1&&e.push(t)}function hs(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var er=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return ps(this.subscriptions,t),function(){return hs(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var o=0;o<i;o++){var a=this.subscriptions[o];a&&a(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Lw=function(e){return!isNaN(parseFloat(e))},Dw=function(){function e(t){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new er,this.velocityUpdateSubscribers=new er,this.renderSubscribers=new er,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var o=ki(),a=o.delta,s=o.timestamp;n.lastUpdated!==s&&(n.timeDelta=a,n.lastUpdated=s,et.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return et.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Lw(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?md(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function zt(e){return new Dw(e)}var Pd=function(e){return function(t){return t.test(e)}},Vw={test:function(e){return e==="auto"},parse:function(e){return e}},Cd=[Ht,H,at,yt,TS,ES,Vw],Ln=function(e){return Cd.find(Pd(e))},Nw=He(He([],ve(Cd),!1),[Me,dt],!1),jw=function(e){return Nw.find(Pd(e))};function Bw(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zt(n))}function vs(e,t){var n=Ki(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=i===void 0?{}:i;r.transition;var a=We(r,["transitionEnd","transition"]);a=I(I({},a),o);for(var s in a){var l=qf(a[s]);Bw(e,s,l)}}function Ta(e,t){var n=He([],ve(t),!1).reverse();n.forEach(function(r){var i,o=e.getVariant(r);o&&vs(e,o),(i=e.variantChildren)===null||i===void 0||i.forEach(function(a){Ta(a,t)})})}function kw(e,t){if(Array.isArray(t))return Ta(e,t);if(typeof t=="string")return Ta(e,[t]);vs(e,t)}function Fw(e,t,n){var r,i,o,a,s=Object.keys(t).filter(function(h){return!e.hasValue(h)}),l=s.length;if(l)for(var u=0;u<l;u++){var c=s[u],f=t[c],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),d!=null&&(typeof d=="string"&&(Mw(d)||Iw(d))?d=parseFloat(d):!jw(d)&&dt.test(f)&&(d=cs(c,f)),e.addValue(c,zt(d)),(o=(a=n)[c])!==null&&o!==void 0||(a[c]=d),e.setBaseTarget(c,d))}}function zw(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function $w(e,t,n){var r,i,o={};for(var a in e)o[a]=(r=zw(a,t))!==null&&r!==void 0?r:(i=n.getValue(a))===null||i===void 0?void 0:i.get();return o}function _d(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart(t);var r;if(Array.isArray(t)){var i=t.map(function(a){return Pa(e,a,n)});r=Promise.all(i)}else if(typeof t=="string")r=Pa(e,t,n);else{var o=typeof t=="function"?Ki(e,t,n.custom):t;r=Od(e,o,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function Pa(e,t,n){var r;n===void 0&&(n={});var i=Ki(e,t,n.custom),o=(i||{}).transition,a=o===void 0?e.getDefaultTransition()||{}:o;n.transitionOverride&&(a=n.transitionOverride);var s=i?function(){return Od(e,i,n)}:function(){return Promise.resolve()},l=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(h){h===void 0&&(h=0);var p=a.delayChildren,v=p===void 0?0:p,y=a.staggerChildren,m=a.staggerDirection;return Gw(e,t,v+h,y,m,n)}:function(){return Promise.resolve()},u=a.when;if(u){var c=ve(u==="beforeChildren"?[s,l]:[l,s],2),f=c[0],d=c[1];return f().then(d)}else return Promise.all([s(),l(n.delay)])}function Od(e,t,n){var r,i=n===void 0?{}:n,o=i.delay,a=o===void 0?0:o,s=i.transitionOverride,l=i.type,u=e.makeTargetAnimatable(t),c=u.transition,f=c===void 0?e.getDefaultTransition():c,d=u.transitionEnd,h=We(u,["transition","transitionEnd"]);s&&(f=s);var p=[],v=l&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[l]);for(var y in h){var m=e.getValue(y),S=h[y];if(!(!m||S===void 0||v&&Uw(v,y))){var b=I({delay:a},f);e.shouldReduceMotion&&gr(y)&&(b=I(I({},b),{type:!1,delay:0}));var E=ds(y,m,S,b);p.push(E)}}return Promise.all(p).then(function(){d&&vs(e,d)})}function Gw(e,t,n,r,i,o){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var a=[],s=(e.variantChildren.size-1)*r,l=i===1?function(u){return u===void 0&&(u=0),u*r}:function(u){return u===void 0&&(u=0),s-u*r};return Array.from(e.variantChildren).sort(Ww).forEach(function(u,c){a.push(Pa(u,t,I(I({},o),{delay:n+l(c)})).then(function(){return u.notifyAnimationComplete(t)}))}),Promise.all(a)}function Hw(e){e.forEachValue(function(t){return t.stop()})}function Ww(e,t){return e.sortNodePosition(t)}function Uw(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,i}var ms=[le.Animate,le.InView,le.Focus,le.Hover,le.Tap,le.Drag,le.Exit],qw=He([],ve(ms),!1).reverse(),Yw=ms.length;function Kw(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,i=n.options;return _d(e,r,i)}))}}function Xw(e){var t=Kw(e),n=Jw(),r={},i=!0,o=function(c,f){var d=Ki(e,f);if(d){d.transition;var h=d.transitionEnd,p=We(d,["transition","transitionEnd"]);c=I(I(I({},c),p),h)}return c};function a(c){return r[c]!==void 0}function s(c){t=c(e)}function l(c,f){for(var d,h=e.getProps(),p=e.getVariantContext(!0)||{},v=[],y=new Set,m={},S=1/0,b=function(x){var _=qw[x],C=n[_],P=(d=h[_])!==null&&d!==void 0?d:p[_],O=Ze(P),R=_===f?C.isActive:null;R===!1&&(S=x);var L=P===p[_]&&P!==h[_]&&O;if(L&&i&&e.manuallyAnimateOnMount&&(L=!1),C.protectedKeys=I({},m),!C.isActive&&R===null||!P&&!C.prevProp||Qa(P)||typeof P=="boolean")return"continue";var N=Zw(C.prevProp,P),z=N||_===f&&C.isActive&&!L&&O||x>S&&O,B=Array.isArray(P)?P:[P],G=B.reduce(o,{});R===!1&&(G={});var $=C.prevResolvedValues,k=$===void 0?{}:$,Y=I(I({},k),G),Q=function(j){z=!0,y.delete(j),C.needsAnimating[j]=!0};for(var W in Y){var q=G[W],D=k[W];m.hasOwnProperty(W)||(q!==D?cr(q)&&cr(D)?!Td(q,D)||N?Q(W):C.protectedKeys[W]=!0:q!==void 0?Q(W):y.add(W):q!==void 0&&y.has(W)?Q(W):C.protectedKeys[W]=!0)}C.prevProp=P,C.prevResolvedValues=G,C.isActive&&(m=I(I({},m),G)),i&&e.blockInitialAnimation&&(z=!1),z&&!L&&v.push.apply(v,He([],ve(B.map(function(j){return{animation:j,options:I({type:_},c)}})),!1))},E=0;E<Yw;E++)b(E);if(r=I({},m),y.size){var T={};y.forEach(function(x){var _=e.getBaseTarget(x);_!==void 0&&(T[x]=_)}),v.push({animation:T})}var w=!!v.length;return i&&h.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),i=!1,w?t(v):Promise.resolve()}function u(c,f,d){var h;if(n[c].isActive===f)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(function(y){var m;return(m=y.animationState)===null||m===void 0?void 0:m.setActive(c,f)}),n[c].isActive=f;var p=l(d,c);for(var v in n)n[v].protectedKeys={};return p}return{isAnimated:a,animateChanges:l,setActive:u,setAnimateFunction:s,getState:function(){return n}}}function Zw(e,t){return typeof t=="string"?t!==e:Ef(t)?!Td(t,e):!1}function It(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jw(){var e;return e={},e[le.Animate]=It(!0),e[le.InView]=It(),e[le.Hover]=It(),e[le.Tap]=It(),e[le.Drag]=It(),e[le.Focus]=It(),e[le.Exit]=It(),e}var Qw={animation:Ot(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=Xw(t)),Qa(n)&&g.useEffect(function(){return n.subscribe(t)},[n])}),exit:Ot(function(e){var t=e.custom,n=e.visualElement,r=ve(Ed(),2),i=r[0],o=r[1],a=g.useContext(Yi);g.useEffect(function(){var s,l;n.isPresent=i;var u=(s=n.animationState)===null||s===void 0?void 0:s.setActive(le.Exit,!i,{custom:(l=a==null?void 0:a.custom)!==null&&l!==void 0?l:t});!i&&(u==null||u.then(o))},[i])})},Ad=function(){function e(t,n,r){var i=this,o=r===void 0?{}:r,a=o.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var d=Bo(i.lastMoveEventInfo,i.history),h=i.startEvent!==null,p=gd(d.offset,{x:0,y:0})>=3;if(!(!h&&!p)){var v=d.point,y=ki().timestamp;i.history.push(I(I({},v),{timestamp:y}));var m=i.handlers,S=m.onStart,b=m.onMove;h||(S&&S(i.lastMoveEvent,d),i.startEvent=i.lastMoveEvent),b&&b(i.lastMoveEvent,d)}}},this.handlePointerMove=function(d,h){if(i.lastMoveEvent=d,i.lastMoveEventInfo=jo(h,i.transformPagePoint),Kf(d)&&d.buttons===0){i.handlePointerUp(d,h);return}et.update(i.updatePoint,!0)},this.handlePointerUp=function(d,h){i.end();var p=i.handlers,v=p.onEnd,y=p.onSessionEnd,m=Bo(jo(h,i.transformPagePoint),i.history);i.startEvent&&v&&v(d,m),y&&y(d,m)},!(Xf(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=a;var s=es(t),l=jo(s,this.transformPagePoint),u=l.point,c=ki().timestamp;this.history=[I(I({},u),{timestamp:c})];var f=n.onSessionStart;f&&f(t,Bo(l,this.history)),this.removeListeners=Ji(hn(window,"pointermove",this.handlePointerMove),hn(window,"pointerup",this.handlePointerUp),hn(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),yn.update(this.updatePoint)},e}();function jo(e,t){return t?{point:t(e.point)}:e}function du(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bo(e,t){var n=e.point;return{point:n,delta:du(n,Rd(t)),offset:du(n,ex(t)),velocity:tx(t,.1)}}function ex(e){return e[0]}function Rd(e){return e[e.length-1]}function tx(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=Rd(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zi(t)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function pt(e){return e.max-e.min}function pu(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),gd(e,t)<n}function hu(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=ge(t.min,t.max,e.origin),e.scale=pt(n)/pt(t),(pu(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ge(n.min,n.max,e.origin)-e.originPoint,(pu(e.translate)||isNaN(e.translate))&&(e.translate=0)}function tr(e,t,n,r){hu(e.x,t.x,n.x,r==null?void 0:r.originX),hu(e.y,t.y,n.y,r==null?void 0:r.originY)}function vu(e,t,n){e.min=n.min+t.min,e.max=e.min+pt(t)}function nx(e,t,n){vu(e.x,t.x,n.x),vu(e.y,t.y,n.y)}function mu(e,t,n){e.min=t.min-n.min,e.max=e.min+pt(t)}function nr(e,t,n){mu(e.x,t.x,n.x),mu(e.y,t.y,n.y)}function rx(e,t,n){var r=t.min,i=t.max;return r!==void 0&&e<r?e=n?ge(r,e,n.min):Math.max(e,r):i!==void 0&&e>i&&(e=n?ge(i,e,n.max):Math.min(e,i)),e}function gu(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ix(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right;return{x:gu(e.x,r,o),y:gu(e.y,n,i)}}function yu(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=ve([i,r],2),r=n[0],i=n[1]),{min:r,max:i}}function ox(e,t){return{x:yu(e.x,t.x),y:yu(e.y,t.y)}}function ax(e,t){var n=.5,r=pt(e),i=pt(t);return i>r?n=fr(t.min,t.max-r,e.min):r>i&&(n=fr(e.min,e.max-i,t.min)),ji(0,1,n)}function sx(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Ca=.35;function lx(e){return e===void 0&&(e=Ca),e===!1?e=0:e===!0&&(e=Ca),{x:Su(e,"left","right"),y:Su(e,"top","bottom")}}function Su(e,t,n){return{min:bu(e,t),max:bu(e,n)}}function bu(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var wu=function(){return{translate:0,scale:1,origin:0,originPoint:0}},rr=function(){return{x:wu(),y:wu()}},xu=function(){return{min:0,max:0}},Ce=function(){return{x:xu(),y:xu()}};function it(e){return[e("x"),e("y")]}function Md(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function ux(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function cx(e,t){if(!t)return e;var 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}}function ko(e){return e===void 0||e===1}function Id(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!ko(t)||!ko(n)||!ko(r)}function St(e){return Id(e)||Eu(e.x)||Eu(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function Eu(e){return e&&e!=="0%"}function $i(e,t,n){var r=e-n,i=t*r;return n+i}function Tu(e,t,n,r,i){return i!==void 0&&(e=$i(e,i,r)),$i(e,n,r)+t}function _a(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=Tu(e.min,t,n,r,i),e.max=Tu(e.max,t,n,r,i)}function Ld(e,t){var n=t.x,r=t.y;_a(e.x,n.translate,n.scale,n.originPoint),_a(e.y,r.translate,r.scale,r.originPoint)}function fx(e,t,n,r){var i,o;r===void 0&&(r=!1);var a=n.length;if(a){t.x=t.y=1;for(var s,l,u=0;u<a;u++)s=n[u],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ln(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Ld(e,l)),r&&St(s.latestValues)&&ln(e,s.latestValues))}}function bt(e,t){e.min=e.min+t,e.max=e.max+t}function Pu(e,t,n){var r=ve(n,3),i=r[0],o=r[1],a=r[2],s=t[a]!==void 0?t[a]:.5,l=ge(e.min,e.max,s);_a(e,t[i],t[o],l,t.scale)}var dx=["x","scaleX","originX"],px=["y","scaleY","originY"];function ln(e,t){Pu(e.x,t,dx),Pu(e.y,t,px)}function Dd(e,t){return Md(cx(e.getBoundingClientRect(),t))}function hx(e,t,n){var r=Dd(e,n),i=t.scroll;return i&&(bt(r.x,i.x),bt(r.y,i.y)),r}var vx=new WeakMap,mx=function(){function e(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.visualElement=t}return e.prototype.start=function(t,n){var r=this,i=n===void 0?{}:n,o=i.snapToCursor,a=o===void 0?!1:o;if(this.visualElement.isPresent!==!1){var s=function(f){r.stopAnimation(),a&&r.snapToCursor(es(f,"page").point)},l=function(f,d){var h,p=r.getProps(),v=p.drag,y=p.dragPropagation,m=p.onDragStart;v&&!y&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=ed(v),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),it(function(S){var b,E,T=r.getAxisMotionValue(S).get()||0;if(at.test(T)){var w=(E=(b=r.visualElement.projection)===null||b===void 0?void 0:b.layout)===null||E===void 0?void 0:E.actual[S];if(w){var x=pt(w);T=x*(parseFloat(T)/100)}}r.originPoint[S]=T}),m==null||m(f,d),(h=r.visualElement.animationState)===null||h===void 0||h.setActive(le.Drag,!0))},u=function(f,d){var h=r.getProps(),p=h.dragPropagation,v=h.dragDirectionLock,y=h.onDirectionLock,m=h.onDrag;if(!(!p&&!r.openGlobalLock)){var S=d.offset;if(v&&r.currentDirection===null){r.currentDirection=gx(S),r.currentDirection!==null&&(y==null||y(r.currentDirection));return}r.updateAxis("x",d.point,S),r.updateAxis("y",d.point,S),r.visualElement.syncRender(),m==null||m(f,d)}},c=function(f,d){return r.stop(f,d)};this.panSession=new Ad(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:c},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(t,n){var r=this.isDragging;if(this.cancel(),!!r){var i=n.velocity;this.startAnimation(i);var o=this.getProps().onDragEnd;o==null||o(t,n)}},e.prototype.cancel=function(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(le.Drag,!1)},e.prototype.updateAxis=function(t,n,r){var i=this.getProps().drag;if(!(!r||!ti(t,i,this.currentDirection))){var o=this.getAxisMotionValue(t),a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=rx(a,this.constraints[t],this.elastic[t])),o.set(a)}},e.prototype.resolveConstraints=function(){var t=this,n=this.getProps(),r=n.dragConstraints,i=n.dragElastic,o=(this.visualElement.projection||{}).layout,a=this.constraints;r&&sn(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=ix(o.actual,r):this.constraints=!1,this.elastic=lx(i),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&it(function(s){t.getAxisMotionValue(s)&&(t.constraints[s]=sx(o.actual[s],t.constraints[s]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),n=t.dragConstraints,r=t.onMeasureDragConstraints;if(!n||!sn(n))return!1;var i=n.current;ke(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var a=hx(i,o.root,this.visualElement.getTransformPagePoint()),s=ox(o.layout.actual,a);if(r){var l=r(ux(s));this.hasMutatedConstraints=!!l,l&&(s=Md(l))}return s},e.prototype.startAnimation=function(t){var n=this,r=this.getProps(),i=r.drag,o=r.dragMomentum,a=r.dragElastic,s=r.dragTransition,l=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},f=it(function(d){var h;if(ti(d,i,n.currentDirection)){var p=(h=c==null?void 0:c[d])!==null&&h!==void 0?h:{};l&&(p={min:0,max:0});var v=a?200:1e6,y=a?40:1e7,m=I(I({type:"inertia",velocity:o?t[d]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10},s),p);return n.startAxisValueAnimation(d,m)}});return Promise.all(f).then(u)},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);return ds(t,r,0,n)},e.prototype.stopAnimation=function(){var t=this;it(function(n){return t.getAxisMotionValue(n).stop()})},e.prototype.getAxisMotionValue=function(t){var n,r,i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)},e.prototype.snapToCursor=function(t){var n=this;it(function(r){var i=n.getProps().drag;if(ti(r,i,n.currentDirection)){var o=n.visualElement.projection,a=n.getAxisMotionValue(r);if(o&&o.layout){var s=o.layout.actual[r],l=s.min,u=s.max;a.set(t[r]-ge(l,u,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var t=this,n,r=this.getProps(),i=r.drag,o=r.dragConstraints,a=this.visualElement.projection;if(!(!sn(o)||!a||!this.constraints)){this.stopAnimation();var s={x:0,y:0};it(function(u){var c=t.getAxisMotionValue(u);if(c){var f=c.get();s[u]=ax({min:f,max:f},t.constraints[u])}});var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",(n=a.root)===null||n===void 0||n.updateScroll(),a.updateLayout(),this.resolveConstraints(),it(function(u){if(ti(u,i,null)){var c=t.getAxisMotionValue(u),f=t.constraints[u],d=f.min,h=f.max;c.set(ge(d,h,s[u]))}})}},e.prototype.addListeners=function(){var t=this,n;vx.set(this.visualElement,this);var r=this.visualElement.getInstance(),i=hn(r,"pointerdown",function(u){var c=t.getProps(),f=c.drag,d=c.dragListener,h=d===void 0?!0:d;f&&h&&t.start(u)}),o=function(){var u=t.getProps().dragConstraints;sn(u)&&(t.constraints=t.resolveRefConstraints())},a=this.visualElement.projection,s=a.addEventListener("measure",o);a&&!a.layout&&((n=a.root)===null||n===void 0||n.updateScroll(),a.updateLayout()),o();var l=Zi(window,"resize",function(){return t.scalePositionWithinConstraints()});return a.addEventListener("didUpdate",function(u){var c=u.delta,f=u.hasLayoutChanged;t.isDragging&&f&&(it(function(d){var h=t.getAxisMotionValue(d);h&&(t.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),t.visualElement.syncRender())}),function(){l(),i(),s()}},e.prototype.getProps=function(){var t=this.visualElement.getProps(),n=t.drag,r=n===void 0?!1:n,i=t.dragDirectionLock,o=i===void 0?!1:i,a=t.dragPropagation,s=a===void 0?!1:a,l=t.dragConstraints,u=l===void 0?!1:l,c=t.dragElastic,f=c===void 0?Ca:c,d=t.dragMomentum,h=d===void 0?!0:d;return I(I({},t),{drag:r,dragDirectionLock:o,dragPropagation:s,dragConstraints:u,dragElastic:f,dragMomentum:h})},e}();function ti(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function gx(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function yx(e){var t=e.dragControls,n=e.visualElement,r=Gt(function(){return new mx(n)});g.useEffect(function(){return t&&t.subscribe(r)},[r,t]),g.useEffect(function(){return r.addListeners()},[r])}function Sx(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||n||r||i,s=g.useRef(null),l=g.useContext(mr).transformPagePoint,u={onSessionStart:i,onStart:n,onMove:t,onEnd:function(f,d){s.current=null,r&&r(f,d)}};g.useEffect(function(){s.current!==null&&s.current.updateHandlers(u)});function c(f){s.current=new Ad(f,u,{transformPagePoint:l})}Ni(o,"pointerdown",a&&c),rd(function(){return s.current&&s.current.end()})}var bx={pan:Ot(Sx),drag:Ot(yx)},ni=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function wx(){var e=ni.map(function(){return new er}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){ni.forEach(function(i){var o,a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach(function(r,i){n["on"+ni[i]]=function(o){return r.add(o)},n["notify"+ni[i]]=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return r.notify.apply(r,He([],ve(o),!1))}}),n}function xx(e,t,n){var r;for(var i in t){var o=t[i],a=n[i];if(tt(o))e.addValue(i,o),process.env.NODE_ENV==="development"&&xd(o.version==="6.5.1","Attempting to mix Framer Motion versions ".concat(o.version," with 6.5.1 may not work as expected."));else if(tt(a))e.addValue(i,zt(o));else if(a!==o)if(e.hasValue(i)){var s=e.getValue(i);!s.hasAnimated&&s.set(o)}else e.addValue(i,zt((r=e.getStaticValue(i))!==null&&r!==void 0?r:o))}for(var i in n)t[i]===void 0&&e.removeValue(i);return t}var Vd=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,u=e.removeValueFromRenderState,c=e.sortNodePosition,f=e.scrapeMotionValuesFromProps;return function(d,h){var p=d.parent,v=d.props,y=d.presenceId,m=d.blockInitialAnimation,S=d.visualState,b=d.shouldReduceMotion;h===void 0&&(h={});var E=!1,T=S.latestValues,w=S.renderState,x,_=wx(),C=new Map,P=new Map,O={},R=I({},T),L;function N(){!x||!E||(z(),s(x,w,v.style,q.projection))}function z(){r(q,w,T,h,v)}function B(){_.notifyUpdate(T)}function G(D,j){var K=j.onChange(function(Ne){T[D]=Ne,v.onUpdate&&et.update(B,!1,!0)}),ye=j.onRenderRequest(q.scheduleRender);P.set(D,function(){K(),ye()})}var $=f(v);for(var k in $){var Y=$[k];T[k]!==void 0&&tt(Y)&&Y.set(T[k],!1)}var Q=Xi(v),W=Pf(v),q=I(I({treeType:n,current:null,depth:p?p.depth+1:0,parent:p,children:new Set,presenceId:y,shouldReduceMotion:b,variantChildren:W?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(p!=null&&p.isMounted()),blockInitialAnimation:m,isMounted:function(){return!!x},mount:function(D){E=!0,x=q.current=D,q.projection&&q.projection.mount(D),W&&p&&!Q&&(L=p==null?void 0:p.addVariantChild(q)),C.forEach(function(j,K){return G(K,j)}),p==null||p.children.add(q),q.setProps(v)},unmount:function(){var D;(D=q.projection)===null||D===void 0||D.unmount(),yn.update(B),yn.render(N),P.forEach(function(j){return j()}),L==null||L(),p==null||p.children.delete(q),_.clearAllListeners(),x=void 0,E=!1},addVariantChild:function(D){var j,K=q.getClosestVariantNode();if(K)return(j=K.variantChildren)===null||j===void 0||j.add(D),function(){return K.variantChildren.delete(D)}},sortNodePosition:function(D){return!c||n!==D.treeType?0:c(q.getInstance(),D.getInstance())},getClosestVariantNode:function(){return W?q:p==null?void 0:p.getClosestVariantNode()},getLayoutId:function(){return v.layoutId},getInstance:function(){return x},getStaticValue:function(D){return T[D]},setStaticValue:function(D,j){return T[D]=j},getLatestValues:function(){return T},setVisibility:function(D){q.isVisible!==D&&(q.isVisible=D,q.scheduleRender())},makeTargetAnimatable:function(D,j){return j===void 0&&(j=!0),o(q,D,v,j)},measureViewportBox:function(){return a(x,v)},addValue:function(D,j){q.hasValue(D)&&q.removeValue(D),C.set(D,j),T[D]=j.get(),G(D,j)},removeValue:function(D){var j;C.delete(D),(j=P.get(D))===null||j===void 0||j(),P.delete(D),delete T[D],u(D,w)},hasValue:function(D){return C.has(D)},getValue:function(D,j){var K=C.get(D);return K===void 0&&j!==void 0&&(K=zt(j),q.addValue(D,K)),K},forEachValue:function(D){return C.forEach(D)},readValue:function(D){var j;return(j=T[D])!==null&&j!==void 0?j:l(x,D,h)},setBaseTarget:function(D,j){R[D]=j},getBaseTarget:function(D){if(i){var j=i(v,D);if(j!==void 0&&!tt(j))return j}return R[D]}},_),{build:function(){return z(),w},scheduleRender:function(){et.render(N,!1,!0)},syncRender:N,setProps:function(D){(D.transformTemplate||v.transformTemplate)&&q.scheduleRender(),v=D,_.updatePropListeners(D),O=xx(q,f(v),O)},getProps:function(){return v},getVariant:function(D){var j;return(j=v.variants)===null||j===void 0?void 0:j[D]},getDefaultTransition:function(){return v.transition},getTransformPagePoint:function(){return v.transformPagePoint},getVariantContext:function(D){if(D===void 0&&(D=!1),D)return p==null?void 0:p.getVariantContext();if(!Q){var j=(p==null?void 0:p.getVariantContext())||{};return v.initial!==void 0&&(j.initial=v.initial),j}for(var K={},ye=0;ye<Ex;ye++){var Ne=Nd[ye],Fe=v[Ne];(Ze(Fe)||Fe===!1)&&(K[Ne]=Fe)}return K}});return q}},Nd=He(["initial"],ve(ms),!1),Ex=Nd.length;function Oa(e){return typeof e=="string"&&e.startsWith("var(--")}var jd=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Tx(e){var t=jd.exec(e);if(!t)return[,];var n=ve(t,3),r=n[1],i=n[2];return[r,i]}var Px=4;function Aa(e,t,n){n===void 0&&(n=1),ke(n<=Px,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=ve(Tx(e),2),i=r[0],o=r[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():Oa(o)?Aa(o,t,n+1):o}}function Cx(e,t,n){var r,i=We(t,[]),o=e.getInstance();if(!(o instanceof Element))return{target:i,transitionEnd:n};n&&(n=I({},n)),e.forEachValue(function(u){var c=u.get();if(Oa(c)){var f=Aa(c,o);f&&u.set(f)}});for(var a in i){var s=i[a];if(Oa(s)){var l=Aa(s,o);l&&(i[a]=l,n&&((r=n[a])!==null&&r!==void 0||(n[a]=s)))}}return{target:i,transitionEnd:n}}var _x=new Set(["width","height","top","left","right","bottom","x","y"]),Bd=function(e){return _x.has(e)},Ox=function(e){return Object.keys(e).some(Bd)},kd=function(e,t){e.set(t,!1),e.set(t)},ri=function(e){return e===Ht||e===H},Cu;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(Cu||(Cu={}));var _u=function(e,t){return parseFloat(e.split(", ")[t])},Ou=function(e,t){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return _u(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?_u(a[1],e):0}},Ax=new Set(["x","y","z"]),Rx=lr.filter(function(e){return!Ax.has(e)});function Mx(e){var t=[];return Rx.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var Au={width:function(e,t){var n=e.x,r=t.paddingLeft,i=r===void 0?"0":r,o=t.paddingRight,a=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(e,t){var n=e.y,r=t.paddingTop,i=r===void 0?"0":r,o=t.paddingBottom,a=o===void 0?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Ou(4,13),y:Ou(5,14)},Ix=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(function(u){s[u]=Au[u](r,o)}),t.syncRender();var l=t.measureViewportBox();return n.forEach(function(u){var c=t.getValue(u);kd(c,s[u]),e[u]=Au[u](l,o)}),e},Lx=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=I({},t),r=I({},r);var i=Object.keys(t).filter(Bd),o=[],a=!1,s=[];if(i.forEach(function(c){var f=e.getValue(c);if(e.hasValue(c)){var d=n[c],h=Ln(d),p=t[c],v;if(cr(p)){var y=p.length,m=p[0]===null?1:0;d=p[m],h=Ln(d);for(var S=m;S<y;S++)v?ke(Ln(p[S])===v,"All keyframes must be of the same type"):(v=Ln(p[S]),ke(v===h||ri(h)&&ri(v),"Keyframes must be of the same dimension as the current value"))}else v=Ln(p);if(h!==v)if(ri(h)&&ri(v)){var b=f.get();typeof b=="string"&&f.set(parseFloat(b)),typeof p=="string"?t[c]=parseFloat(p):Array.isArray(p)&&v===H&&(t[c]=p.map(parseFloat))}else h!=null&&h.transform&&(v!=null&&v.transform)&&(d===0||p===0)?d===0?f.set(v.transform(d)):t[c]=h.transform(p):(a||(o=Mx(e),a=!0),s.push(c),r[c]=r[c]!==void 0?r[c]:t[c],kd(f,p))}}),s.length){var l=s.indexOf("height")>=0?window.pageYOffset:null,u=Ix(t,e,s);return o.length&&o.forEach(function(c){var f=ve(c,2),d=f[0],h=f[1];e.getValue(d).set(h)}),e.syncRender(),l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Dx(e,t,n,r){return Ox(t)?Lx(e,t,n,r):{target:t,transitionEnd:r}}var Vx=function(e,t,n,r){var i=Cx(e,t,r);return t=i.target,r=i.transitionEnd,Dx(e,t,n,r)};function Nx(e){return window.getComputedStyle(e)}var Fd={treeType:"dom",readValueFromInstance:function(e,t){if(gr(t)){var n=us(t);return n&&n.default||0}else{var r=Nx(e);return(Rf(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return Dd(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var o=t.transition,a=t.transitionEnd,s=We(t,["transition","transitionEnd"]),l=$w(s,o||{},e);if(i&&(a&&(a=i(a)),s&&(s=i(s)),l&&(l=i(l))),r){Fw(e,s,l);var u=Vx(e,s,l,a);a=u.transitionEnd,s=u.target}return I({transition:o,transitionEnd:a},s)},scrapeMotionValuesFromProps:Ja,build:function(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),Ka(t,n,r,i.transformTemplate)},render:Gf},jx=Vd(Fd),Bx=Vd(I(I({},Fd),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return gr(t)?((n=us(t))===null||n===void 0?void 0:n.default)||0:(t=Hf.has(t)?t:$f(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Uf,build:function(e,t,n,r,i){Za(t,n,r,i.transformTemplate)},render:Wf})),kx=function(e,t){return qa(e)?Bx(t,{enableHardwareAcceleration:!1}):jx(t,{enableHardwareAcceleration:!0})};function Ru(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Dn={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;var n=Ru(e,t.target.x),r=Ru(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Mu="_$css",Fx={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(jd,function(v){return a.push(v),Mu}));var s=dt.parse(e);if(s.length>5)return i;var l=dt.createTransformer(e),u=typeof s[0]!="number"?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+u]/=c,s[1+u]/=f;var d=ge(c,f,.5);typeof s[2+u]=="number"&&(s[2+u]/=d),typeof s[3+u]=="number"&&(s[3+u]/=d);var h=l(s);if(o){var p=0;h=h.replace(Mu,function(){var v=a[p];return p++,v})}return h}},zx=function(e){yf(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.visualElement,o=r.layoutGroup,a=r.switchLayoutGroup,s=r.layoutId,l=i.projection;pS(Gx),l&&(o!=null&&o.group&&o.group.add(l),a!=null&&a.register&&s&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){n.safeToRemove()}),l.setOptions(I(I({},l.options),{onExitComplete:function(){return n.safeToRemove()}}))),Zn.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(n){var r=this,i=this.props,o=i.layoutDependency,a=i.visualElement,s=i.drag,l=i.isPresent,u=a.projection;return u&&(u.isPresent=l,s||n.layoutDependency!==o||o===void 0?u.willUpdate():this.safeToRemove(),n.isPresent!==l&&(l?u.promote():u.relegate()||et.postRender(function(){var c;!((c=u.getStack())===null||c===void 0)&&c.members.length||r.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,a=r.projection;a&&(a.scheduleCheckAfterUnmount(),i!=null&&i.group&&i.group.remove(a),o!=null&&o.deregister&&o.deregister(a))},t.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},t.prototype.render=function(){return null},t}(g.Component);function $x(e){var t=ve(Ed(),2),n=t[0],r=t[1],i=g.useContext(Cf);return g.createElement(zx,I({},e,{layoutGroup:i,switchLayoutGroup:g.useContext(_f),isPresent:n,safeToRemove:r}))}var Gx={borderRadius:I(I({},Dn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Dn,borderTopRightRadius:Dn,borderBottomLeftRadius:Dn,borderBottomRightRadius:Dn,boxShadow:Fx},Hx={measureLayout:$x};function Wx(e,t,n){n===void 0&&(n={});var r=tt(e)?e:zt(e);return ds("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var zd=["TopLeft","TopRight","BottomLeft","BottomRight"],Ux=zd.length,Iu=function(e){return typeof e=="string"?parseFloat(e):e},Lu=function(e){return typeof e=="number"||H.test(e)};function qx(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=ge(0,(a=n.opacity)!==null&&a!==void 0?a:1,Yx(r)),e.opacityExit=ge((s=t.opacity)!==null&&s!==void 0?s:1,0,Kx(r))):o&&(e.opacity=ge((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(var c=0;c<Ux;c++){var f="border".concat(zd[c],"Radius"),d=Du(t,f),h=Du(n,f);if(!(d===void 0&&h===void 0)){d||(d=0),h||(h=0);var p=d===0||h===0||Lu(d)===Lu(h);p?(e[f]=Math.max(ge(Iu(d),Iu(h),r),0),(at.test(h)||at.test(d))&&(e[f]+="%")):e[f]=h}}(t.rotate||n.rotate)&&(e.rotate=ge(t.rotate||0,n.rotate||0,r))}function Du(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}var Yx=$d(0,.5,as),Kx=$d(.5,.95,is);function $d(e,t,n){return function(r){return r<e?0:r>t?1:n(fr(e,t,r))}}function Vu(e,t){e.min=t.min,e.max=t.max}function Ke(e,t){Vu(e.x,t.x),Vu(e.y,t.y)}function Nu(e,t,n,r,i){return e-=t,e=$i(e,1/n,r),i!==void 0&&(e=$i(e,1/i,r)),e}function Xx(e,t,n,r,i,o,a){if(t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5),o===void 0&&(o=e),a===void 0&&(a=e),at.test(t)){t=parseFloat(t);var s=ge(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var l=ge(o.min,o.max,r);e===o&&(l-=t),e.min=Nu(e.min,t,n,l,i),e.max=Nu(e.max,t,n,l,i)}}function ju(e,t,n,r,i){var o=ve(n,3),a=o[0],s=o[1],l=o[2];Xx(e,t[a],t[s],t[l],t.scale,r,i)}var Zx=["x","scaleX","originX"],Jx=["y","scaleY","originY"];function Bu(e,t,n,r){ju(e.x,t,Zx,n==null?void 0:n.x,r==null?void 0:r.x),ju(e.y,t,Jx,n==null?void 0:n.y,r==null?void 0:r.y)}function ku(e){return e.translate===0&&e.scale===1}function Gd(e){return ku(e.x)&&ku(e.y)}function Hd(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var Qx=function(){function e(){this.members=[]}return e.prototype.add=function(t){ps(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(hs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},e.prototype.relegate=function(t){var n=this.members.findIndex(function(a){return t===a});if(n===0)return!1;for(var r,i=n;i>=0;i--){var o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1},e.prototype.promote=function(t,n){var r,i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);var o=t.options.crossfade;o===!1&&i.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),eE="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function Fu(e,t,n){var r=e.x.translate/t.x,i=e.y.translate/t.y,o="translate3d(".concat(r,"px, ").concat(i,"px, 0) ");if(o+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(o+="rotate(".concat(a,"deg) ")),s&&(o+="rotateX(".concat(s,"deg) ")),l&&(o+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return o+="scale(".concat(u,", ").concat(c,")"),o===eE?"none":o}var tE=function(e,t){return e.depth-t.depth},nE=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){ps(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){hs(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(tE),this.isDirty=!1,this.children.forEach(t)},e}(),zu=1e3;function Wd(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,o=e.resetTransform;return function(){function a(s,l,u){var c=this;l===void 0&&(l={}),u===void 0&&(u=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){c.isUpdating&&(c.isUpdating=!1,c.clearAllSnapshots())},this.updateProjection=function(){c.nodes.forEach(lE),c.nodes.forEach(uE)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?He(He([],ve(u.path),!1),[u],!1):[],this.parent=u,this.depth=u?u.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new nE)}return a.prototype.addEventListener=function(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new er),this.eventHandlers.get(s).add(l)},a.prototype.notifyListeners=function(s){for(var l=[],u=1;u<arguments.length;u++)l[u-1]=arguments[u];var c=this.eventHandlers.get(s);c==null||c.notify.apply(c,He([],ve(l),!1))},a.prototype.hasListeners=function(s){return this.eventHandlers.has(s)},a.prototype.registerPotentialNode=function(s,l){this.potentialNodes.set(s,l)},a.prototype.mount=function(s,l){var u=this,c;if(l===void 0&&(l=!1),!this.instance){this.isSVG=s instanceof SVGElement&&s.tagName!=="svg",this.instance=s;var f=this.options,d=f.layoutId,h=f.layout,p=f.visualElement;if(p&&!p.getInstance()&&p.mount(s),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),l&&(h||d)&&(this.isLayoutDirty=!0),t){var v,y=function(){return u.root.updateBlockedByResize=!1};t(s,function(){u.root.updateBlockedByResize=!0,clearTimeout(v),v=window.setTimeout(y,250),Zn.hasAnimatedSinceResize&&(Zn.hasAnimatedSinceResize=!1,u.nodes.forEach(sE))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&p&&(d||h)&&this.addEventListener("didUpdate",function(m){var S,b,E,T,w,x=m.delta,_=m.hasLayoutChanged,C=m.hasRelativeTargetChanged,P=m.layout;if(u.isTreeAnimationBlocked()){u.target=void 0,u.relativeTarget=void 0;return}var O=(b=(S=u.options.transition)!==null&&S!==void 0?S:p.getDefaultTransition())!==null&&b!==void 0?b:hE,R=p.getProps(),L=R.onLayoutAnimationStart,N=R.onLayoutAnimationComplete,z=!u.targetLayout||!Hd(u.targetLayout,P)||C,B=!_&&C;if(!((E=u.resumeFrom)===null||E===void 0)&&E.instance||B||_&&(z||!u.currentAnimation)){u.resumeFrom&&(u.resumingFrom=u.resumeFrom,u.resumingFrom.resumingFrom=void 0),u.setAnimationOrigin(x,B);var G=I(I({},fs(O,"layout")),{onPlay:L,onComplete:N});p.shouldReduceMotion&&(G.delay=0,G.type=!1),u.startAnimation(G)}else!_&&u.animationProgress===0&&u.finishAnimation(),u.isLead()&&((w=(T=u.options).onExitComplete)===null||w===void 0||w.call(T));u.targetLayout=P})}},a.prototype.unmount=function(){var s,l;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(s=this.getStack())===null||s===void 0||s.remove(this),(l=this.parent)===null||l===void 0||l.children.delete(this),this.instance=void 0,yn.preRender(this.updateProjection)},a.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},a.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},a.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},a.prototype.isTreeAnimationBlocked=function(){var s;return this.isAnimationBlocked||((s=this.parent)===null||s===void 0?void 0:s.isTreeAnimationBlocked())||!1},a.prototype.startUpdate=function(){var s;this.isUpdateBlocked()||(this.isUpdating=!0,(s=this.nodes)===null||s===void 0||s.forEach(cE))},a.prototype.willUpdate=function(s){var l,u,c;if(s===void 0&&(s=!0),this.root.isUpdateBlocked()){(u=(l=this.options).onExitComplete)===null||u===void 0||u.call(l);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var f=0;f<this.path.length;f++){var d=this.path[f];d.shouldResetTransform=!0,d.updateScroll()}var h=this.options,p=h.layoutId,v=h.layout;if(!(p===void 0&&!v)){var y=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=y==null?void 0:y(this.latestValues,""),this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}}},a.prototype.didUpdate=function(){var s=this.isUpdateBlocked();if(s){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($u);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(vE),this.potentialNodes.clear()),this.nodes.forEach(aE),this.nodes.forEach(rE),this.nodes.forEach(iE),this.clearAllSnapshots(),Do.update(),Do.preRender(),Do.render())},a.prototype.clearAllSnapshots=function(){this.nodes.forEach(oE),this.sharedNodes.forEach(fE)},a.prototype.scheduleUpdateProjection=function(){et.preRender(this.updateProjection,!1,!0)},a.prototype.scheduleCheckAfterUnmount=function(){var s=this;et.postRender(function(){s.isLayoutDirty?s.root.didUpdate():s.root.checkUpdateFailed()})},a.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var s=this.measure(),l=this.removeTransform(this.removeElementScroll(s));Uu(l),this.snapshot={measured:s,layout:l,latestValues:{}}}},a.prototype.updateLayout=function(){var s;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var l=0;l<this.path.length;l++){var u=this.path[l];u.updateScroll()}var c=this.measure();Uu(c);var f=this.layout;this.layout={measured:c,actual:this.removeElementScroll(c)},this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(s=this.options.visualElement)===null||s===void 0||s.notifyLayoutMeasure(this.layout.actual,f==null?void 0:f.actual)}},a.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=r(this.instance))},a.prototype.resetTransform=function(){var s;if(o){var l=this.isLayoutDirty||this.shouldResetTransform,u=this.projectionDelta&&!Gd(this.projectionDelta),c=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate,f=c==null?void 0:c(this.latestValues,""),d=f!==this.prevTransformTemplateValue;l&&(u||St(this.latestValues)||d)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}},a.prototype.measure=function(){var s=this.options.visualElement;if(!s)return Ce();var l=s.measureViewportBox(),u=this.root.scroll;return u&&(bt(l.x,u.x),bt(l.y,u.y)),l},a.prototype.removeElementScroll=function(s){var l=Ce();Ke(l,s);for(var u=0;u<this.path.length;u++){var c=this.path[u],f=c.scroll,d=c.options,h=c.isScrollRoot;if(c!==this.root&&f&&d.layoutScroll){if(h){Ke(l,s);var p=this.root.scroll;p&&(bt(l.x,-p.x),bt(l.y,-p.y))}bt(l.x,f.x),bt(l.y,f.y)}}return l},a.prototype.applyTransform=function(s,l){l===void 0&&(l=!1);var u=Ce();Ke(u,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&ln(u,{x:-f.scroll.x,y:-f.scroll.y}),St(f.latestValues)&&ln(u,f.latestValues)}return St(this.latestValues)&&ln(u,this.latestValues),u},a.prototype.removeTransform=function(s){var l,u=Ce();Ke(u,s);for(var c=0;c<this.path.length;c++){var f=this.path[c];if(f.instance&&St(f.latestValues)){Id(f.latestValues)&&f.updateSnapshot();var d=Ce(),h=f.measure();Ke(d,h),Bu(u,f.latestValues,(l=f.snapshot)===null||l===void 0?void 0:l.layout,d)}}return St(this.latestValues)&&Bu(u,this.latestValues),u},a.prototype.setTargetDelta=function(s){this.targetDelta=s,this.root.scheduleUpdateProjection()},a.prototype.setOptions=function(s){var l;this.options=I(I(I({},this.options),s),{crossfade:(l=s.crossfade)!==null&&l!==void 0?l:!0})},a.prototype.clearMeasurements=function(){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},a.prototype.resolveTargetDelta=function(){var s,l=this.options,u=l.layout,c=l.layoutId;!this.layout||!(u||c)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),nr(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Ke(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&(!((s=this.relativeParent)===null||s===void 0)&&s.target)?nx(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):Ke(this.target,this.layout.actual),Ld(this.target,this.targetDelta)):Ke(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),nr(this.relativeTargetOrigin,this.target,this.relativeParent.target),Ke(this.relativeTarget,this.relativeTargetOrigin)))))},a.prototype.getClosestProjectingParent=function(){if(!(!this.parent||St(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},a.prototype.calcProjection=function(){var s,l=this.options,u=l.layout,c=l.layoutId;if(this.isTreeAnimating=!!(!((s=this.parent)===null||s===void 0)&&s.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(u||c))){var f=this.getLead();Ke(this.layoutCorrected,this.layout.actual),fx(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==f);var d=f.target;if(d){this.projectionDelta||(this.projectionDelta=rr(),this.projectionDeltaWithTransform=rr());var h=this.treeScale.x,p=this.treeScale.y,v=this.projectionTransform;tr(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.projectionTransform=Fu(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==h||this.treeScale.y!==p)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}}},a.prototype.hide=function(){this.isVisible=!1},a.prototype.show=function(){this.isVisible=!0},a.prototype.scheduleRender=function(s){var l,u,c;s===void 0&&(s=!0),(u=(l=this.options).scheduleRender)===null||u===void 0||u.call(l),s&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},a.prototype.setAnimationOrigin=function(s,l){var u=this,c;l===void 0&&(l=!1);var f=this.snapshot,d=(f==null?void 0:f.latestValues)||{},h=I({},this.latestValues),p=rr();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!l;var v=Ce(),y=f==null?void 0:f.isShared,m=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,S=!!(y&&!m&&this.options.crossfade===!0&&!this.path.some(pE));this.animationProgress=0,this.mixTargetDelta=function(b){var E,T=b/1e3;Gu(p.x,s.x,T),Gu(p.y,s.y,T),u.setTargetDelta(p),u.relativeTarget&&u.relativeTargetOrigin&&u.layout&&(!((E=u.relativeParent)===null||E===void 0)&&E.layout)&&(nr(v,u.layout.actual,u.relativeParent.layout.actual),dE(u.relativeTarget,u.relativeTargetOrigin,v,T)),y&&(u.animationValues=h,qx(h,d,u.latestValues,T,S,m)),u.root.scheduleUpdateProjection(),u.scheduleRender(),u.animationProgress=T},this.mixTargetDelta(0)},a.prototype.startAnimation=function(s){var l=this,u,c;this.notifyListeners("animationStart"),(u=this.currentAnimation)===null||u===void 0||u.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(yn.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=et.update(function(){Zn.hasAnimatedSinceResize=!0,l.currentAnimation=Wx(0,zu,I(I({},s),{onUpdate:function(f){var d;l.mixTargetDelta(f),(d=s.onUpdate)===null||d===void 0||d.call(s,f)},onComplete:function(){var f;(f=s.onComplete)===null||f===void 0||f.call(s),l.completeAnimation()}})),l.resumingFrom&&(l.resumingFrom.currentAnimation=l.currentAnimation),l.pendingAnimation=void 0})},a.prototype.completeAnimation=function(){var s;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(s=this.getStack())===null||s===void 0||s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},a.prototype.finishAnimation=function(){var s;this.currentAnimation&&((s=this.mixTargetDelta)===null||s===void 0||s.call(this,zu),this.currentAnimation.stop()),this.completeAnimation()},a.prototype.applyTransformsToTarget=function(){var s=this.getLead(),l=s.targetWithTransforms,u=s.target,c=s.layout,f=s.latestValues;!l||!u||!c||(Ke(l,u),ln(l,f),tr(this.projectionDeltaWithTransform,this.layoutCorrected,l,f))},a.prototype.registerSharedNode=function(s,l){var u,c,f;this.sharedNodes.has(s)||this.sharedNodes.set(s,new Qx);var d=this.sharedNodes.get(s);d.add(l),l.promote({transition:(u=l.options.initialPromotionConfig)===null||u===void 0?void 0:u.transition,preserveFollowOpacity:(f=(c=l.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,l)})},a.prototype.isLead=function(){var s=this.getStack();return s?s.lead===this:!0},a.prototype.getLead=function(){var s,l=this.options.layoutId;return l?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this},a.prototype.getPrevLead=function(){var s,l=this.options.layoutId;return l?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0},a.prototype.getStack=function(){var s=this.options.layoutId;if(s)return this.root.sharedNodes.get(s)},a.prototype.promote=function(s){var l=s===void 0?{}:s,u=l.needsReset,c=l.transition,f=l.preserveFollowOpacity,d=this.getStack();d&&d.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})},a.prototype.relegate=function(){var s=this.getStack();return s?s.relegate(this):!1},a.prototype.resetRotation=function(){var s=this.options.visualElement;if(s){for(var l=!1,u={},c=0;c<pa.length;c++){var f=pa[c],d="rotate"+f;s.getStaticValue(d)&&(l=!0,u[d]=s.getStaticValue(d),s.setStaticValue(d,0))}if(l){s==null||s.syncRender();for(var d in u)s.setStaticValue(d,u[d]);s.scheduleRender()}}},a.prototype.getProjectionStyles=function(s){var l,u,c,f,d,h;s===void 0&&(s={});var p={};if(!this.instance||this.isSVG)return p;if(this.isVisible)p.visibility="";else return{visibility:"hidden"};var v=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,p.opacity="",p.pointerEvents=pi(s.pointerEvents)||"",p.transform=v?v(this.latestValues,""):"none",p;var y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){var m={};return this.options.layoutId&&(m.opacity=(u=this.latestValues.opacity)!==null&&u!==void 0?u:1,m.pointerEvents=pi(s.pointerEvents)||""),this.hasProjected&&!St(this.latestValues)&&(m.transform=v?v({},""):"none",this.hasProjected=!1),m}var S=y.animationValues||y.latestValues;this.applyTransformsToTarget(),p.transform=Fu(this.projectionDeltaWithTransform,this.treeScale,S),v&&(p.transform=v(S,p.transform));var b=this.projectionDelta,E=b.x,T=b.y;p.transformOrigin="".concat(E.origin*100,"% ").concat(T.origin*100,"% 0"),y.animationValues?p.opacity=y===this?(f=(c=S.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&f!==void 0?f:1:this.preserveOpacity?this.latestValues.opacity:S.opacityExit:p.opacity=y===this?(d=S.opacity)!==null&&d!==void 0?d:"":(h=S.opacityExit)!==null&&h!==void 0?h:0;for(var w in Di)if(S[w]!==void 0){var x=Di[w],_=x.correct,C=x.applyTo,P=_(S[w],y);if(C)for(var O=C.length,R=0;R<O;R++)p[C[R]]=P;else p[w]=P}return this.options.layoutId&&(p.pointerEvents=y===this?pi(s.pointerEvents)||"":"none"),p},a.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},a.prototype.resetTree=function(){this.root.nodes.forEach(function(s){var l;return(l=s.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach($u),this.root.sharedNodes.clear()},a}()}function rE(e){e.updateLayout()}function iE(e){var t,n,r,i,o=(n=(t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)!==null&&n!==void 0?n:e.snapshot;if(e.isLead()&&e.layout&&o&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,l=a.measured;e.options.animationType==="size"?it(function(S){var b=o.isShared?o.measured[S]:o.layout[S],E=pt(b);b.min=s[S].min,b.max=b.min+E}):e.options.animationType==="position"&&it(function(S){var b=o.isShared?o.measured[S]:o.layout[S],E=pt(s[S]);b.max=b.min+E});var u=rr();tr(u,s,o.layout);var c=rr();o.isShared?tr(c,e.applyTransform(l,!0),o.measured):tr(c,s,o.layout);var f=!Gd(u),d=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var h=e.relativeParent,p=h.snapshot,v=h.layout;if(p&&v){var y=Ce();nr(y,o.layout,p.layout);var m=Ce();nr(m,s,v.actual),Hd(y,m)||(d=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:o,delta:c,layoutDelta:u,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else e.isLead()&&((i=(r=e.options).onExitComplete)===null||i===void 0||i.call(r));e.options.transition=void 0}function oE(e){e.clearSnapshot()}function $u(e){e.clearMeasurements()}function aE(e){var t=e.options.visualElement;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function sE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function lE(e){e.resolveTargetDelta()}function uE(e){e.calcProjection()}function cE(e){e.resetRotation()}function fE(e){e.removeLeadSnapshot()}function Gu(e,t,n){e.translate=ge(t.translate,0,n),e.scale=ge(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hu(e,t,n,r){e.min=ge(t.min,n.min,r),e.max=ge(t.max,n.max,r)}function dE(e,t,n,r){Hu(e.x,t.x,n.x,r),Hu(e.y,t.y,n.y,r)}function pE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var hE={duration:.45,ease:[.4,0,.1,1]};function vE(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(e.path[r].instance){n=e.path[r];break}var i=n&&n!==e.root?n.instance:document,o=i.querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function Wu(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Uu(e){Wu(e.x),Wu(e.y)}var mE=Wd({attachResizeListener:function(e,t){return Zi(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Fo={current:void 0},gE=Wd({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Fo.current){var e=new mE(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fo.current=e}return Fo.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),yE=I(I(I(I({},Qw),gw),bx),Hx),Ud=fS(function(e,t){return XS(e,t,yE,kx,gE)});function gs(e){var t=Gt(function(){return zt(e)}),n=g.useContext(mr).isStatic;if(n){var r=ve(g.useState(e),2),i=r[1];g.useEffect(function(){return t.onChange(i)},[])}return t}var SE=function(e){return typeof e=="object"&&e.mix},bE=function(e){return SE(e)?e.mix:void 0};function wE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,i=e[0+r],o=e[1+r],a=e[2+r],s=e[3+r],l=ns(o,a,I({mixer:bE(a[0])},s));return n?l(i):l}function xE(e,t){Li(function(){if(tt(e))return e.onChange(t)},[t])}function EE(e,t){Li(function(){var n=e.map(function(r){return r.onChange(t)});return function(){return n.forEach(function(r){return r()})}})}function TE(e,t){var n=gs(t()),r=function(){return n.set(t())};return r(),EE(e,function(){return et.update(r,!1,!0)}),n}function PE(e,t,n,r){var i=typeof t=="function"?t:wE(t,n,r);return Array.isArray(e)?qu(e,i):qu([e],function(o){var a=ve(o,1),s=a[0];return i(s)})}function qu(e,t){var n=Gt(function(){return[]});return TE(e,function(){n.length=0;for(var r=e.length,i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function CE(e,t){t===void 0&&(t={});var n=g.useContext(mr).isStatic,r=g.useRef(null),i=gs(tt(e)?e.get():e);return g.useMemo(function(){return i.attach(function(o,a){return n?a(o):(r.current&&r.current.stop(),r.current=ls(I(I({from:i.get(),to:o,velocity:i.getVelocity()},t),{onUpdate:a})),i.get())})},[JSON.stringify(t)]),xE(e,function(o){return i.set(parseFloat(o))}),i}function _E(){var e=!1,t=[],n=new Set,r={subscribe:function(i){return n.add(i),function(){return void n.delete(i)}},start:function(i,o){if(e){var a=[];return n.forEach(function(s){a.push(_d(s,i,{transitionOverride:o}))}),Promise.all(a)}else return new Promise(function(s){t.push({animation:[i,o],resolve:s})})},set:function(i){return ke(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(function(o){kw(o,i)})},stop:function(){n.forEach(function(i){Hw(i)})},mount:function(){return e=!0,t.forEach(function(i){var o=i.animation,a=i.resolve;r.start.apply(r,He([],ve(o),!1)).then(a)}),function(){e=!1,r.stop()}}};return r}function OE(){var e=Gt(_E);return g.useEffect(e.mount,[]),e}var qd=OE;function AE({onClose:e,children:t,disabled:n,onDragProgress:r}){const i=gs(0),o=150,a=CE(i,{stiffness:300,damping:30}),s=PE(a,[0,300],[1,.95],{clamp:!0}),l=qd();return A.jsx(Ud.div,{style:{y:a,scale:s,height:"100%",width:"100%",touchAction:"pan-y"},drag:n?!1:"y",dragDirectionLock:!0,dragConstraints:{top:0},dragElastic:.2,dragMomentum:!1,animate:l,initial:{y:0},onDragEnd:(u,c)=>{n||(r==null||r(1),c.offset.y>o&&e?e():l.start({y:0,transition:{type:"spring",stiffness:300,damping:30}}))},children:t})}const Yd=({width:e="100%",height:t="100%",fill:n="white",...r})=>A.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,fill:"none",viewBox:"0 0 24 24",...r,children:A.jsx("path",{fill:n,fillRule:"evenodd",d:"M19.207 6.207a1 1 0 0 0-1.414-1.414L12 10.586 6.207 4.793a1 1 0 0 0-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 1 0 1.414 1.414L12 13.414l5.793 5.793a1 1 0 0 0 1.414-1.414L13.414 12l5.793-5.793z",clipRule:"evenodd"})});function RE(e,t){const n=g.useRef(t);g.useEffect(()=>{n.current=t},[t]),g.useEffect(()=>{if(!e)return;window.history.pushState({modalOpen:!0},"");const r=o=>{o.key==="Escape"&&n.current()},i=()=>{n.current()};return window.addEventListener("keydown",r),window.addEventListener("popstate",i),()=>{window.removeEventListener("keydown",r),window.removeEventListener("popstate",i)}},[e])}function ME({stories:e,open:t,onClose:n,initialSlide:r,onButtonStoryClick:i}){const[o,a]=g.useState(!1),s=g.useRef(null),l=g.useRef(null);console.log(r);const[u,c]=g.useState(r);RE(t,()=>n==null?void 0:n());const{markStorySeen:f,getNextUnseenStoryIndex:d}=Ju({container:"HOME"});return t?A.jsx("div",{className:Ir.StoryCube,children:A.jsxs("div",{className:Ir.AtSwiperCubeWrap,ref:s,children:[A.jsx("div",{className:Ir.CloseIcon,onClick:n,children:A.jsx(Yd,{})}),A.jsx(AE,{disabled:!1,onClose:n,children:A.jsx(pc,{modules:[Kh,qh],effect:"cube",onSliderMove:()=>a(!0),onTransitionEnd:()=>a(!1),onSwiper:h=>l.current=h,cubeEffect:{shadow:!1,slideShadows:!1},className:Ir.AtSwiperCube,onSlideChange:h=>{c(h.activeIndex)},initialSlide:u,children:e==null?void 0:e.map((h,p)=>A.jsx(hc,{children:A.jsx(W0,{duration:7e3,onButtonStoryClick:i,initialIndex:d(h),play:u==p,story:h,onChangeStory:(v,y)=>{f(h==null?void 0:h.id,y==null?void 0:y.id)},onAllStoriesEnd:()=>{var v;(v=l.current)==null||v.slideNext()},onLeft:v=>{var y;v==-1&&((y=l.current)==null||y.slidePrev())}})},h==null?void 0:h.id))})})]})}):null}/*! *****************************************************************************
63
+ Copyright (c) Microsoft Corporation.
64
+
65
+ Permission to use, copy, modify, and/or distribute this software for any
66
+ purpose with or without fee is hereby granted.
67
+
68
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
69
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
70
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
71
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
72
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
73
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
74
+ PERFORMANCE OF THIS SOFTWARE.
75
+ ***************************************************************************** */var Kd=function(e,t){return(Kd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])})(e,t)},IE,ii,LE=(function(e){/*!
19
76
  Copyright (c) 2017 Jed Watson.
20
77
  Licensed under the MIT License (MIT), see
21
78
  http://jedwatson.github.io/classnames
22
- */(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&r.push(a)}else if(s==="object")for(var l in o)t.call(o,l)&&o[l]&&r.push(l)}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Mt={path:Mv,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&Mt.path)}},Mt.exports),Mt.exports);function Xn(e,t,n){var r,i,o,s,a;function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(o,i),o=i=null))}t==null&&(t=100);var u=function(){o=this,i=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(o,i),o=i=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}Xn.debounce=Xn;var Iv=Xn;(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`.indiana-scroll-container {
79
+ */(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)&&o.length){var s=n.apply(null,o);s&&r.push(s)}else if(a==="object")for(var l in o)t.call(o,l)&&o[l]&&r.push(l)}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ii={path:IE,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&ii.path)}},ii.exports),ii.exports);function Ra(e,t,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}t==null&&(t=100);var u=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}Ra.debounce=Ra;var DE=Ra;(function(e,t){t===void 0&&(t={});var n=t.insertAt;if(typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}})(`.indiana-scroll-container {
23
80
  overflow: auto;
24
81
  }
25
82
  .indiana-scroll-container--dragging {
@@ -50,5 +107,5 @@ PERFORMANCE OF THIS SOFTWARE.
50
107
  .indiana-dragging {
51
108
  cursor: -webkit-grab;
52
109
  cursor: grab;
53
- }`);var bn,Vv=(bn="indiana-scroll-container",function(e,t){if(!e)return bn;var n;typeof e=="string"?n=e:t=e;var r=bn;return n&&(r+="__"+n),r+(t?Object.keys(t).reduce(function(i,o){var s=t[o];return s&&(i+=" "+(typeof s=="boolean"?r+"--"+o:r+"--"+o+"_"+s)),i},""):"")}),Lv=function(e){function t(n){var r=e.call(this,n)||this;return r.onEndScroll=function(){r.scrolling=!1,!r.pressed&&r.started&&r.processEnd()},r.onScroll=function(i){var o=r.container.current;o.scrollLeft===r.scrollLeft&&o.scrollTop===r.scrollTop||(r.scrolling=!0,r.processScroll(i),r.onEndScroll())},r.onTouchStart=function(i){var o=r.props.nativeMobileScroll;if(r.isDraggable(i.target))if(r.internal=!0,o&&r.scrolling)r.pressed=!0;else{var s=i.touches[0];r.processClick(i,s.clientX,s.clientY),!o&&r.props.stopPropagation&&i.stopPropagation()}},r.onTouchEnd=function(i){var o=r.props.nativeMobileScroll;r.pressed&&(!r.started||r.scrolling&&o?r.pressed=!1:r.processEnd(),r.forceUpdate())},r.onTouchMove=function(i){var o=r.props.nativeMobileScroll;if(r.pressed&&(!o||!r.isMobile)){var s=i.touches[0];s&&r.processMove(i,s.clientX,s.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation()}},r.onMouseDown=function(i){r.isDraggable(i.target)&&r.isScrollable()&&(r.internal=!0,r.props.buttons.indexOf(i.button)!==-1&&(r.processClick(i,i.clientX,i.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation()))},r.onMouseMove=function(i){r.pressed&&(r.processMove(i,i.clientX,i.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation())},r.onMouseUp=function(i){r.pressed&&(r.started?r.processEnd():(r.internal=!1,r.pressed=!1,r.forceUpdate(),r.props.onClick&&r.props.onClick(i)),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation())},r.container=y.createRef(),r.onEndScroll=Iv(r.onEndScroll,300),r.scrolling=!1,r.started=!1,r.pressed=!1,r.internal=!1,r.getRef=r.getRef.bind(r),r}return function(n,r){function i(){this.constructor=n}Js(n,r),n.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}(t,e),t.prototype.componentDidMount=function(){var n=this.props.nativeMobileScroll,r=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),r.addEventListener("touchstart",this.onTouchStart,{passive:!1}),r.addEventListener("mousedown",this.onMouseDown,{passive:!1}),n&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())},t.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},t.prototype.getElement=function(){return this.container.current},t.prototype.isMobileDevice=function(){return window.orientation!==void 0||navigator.userAgent.indexOf("IEMobile")!==-1},t.prototype.isDraggable=function(n){var r=this.props.ignoreElements;if(r){var i=n.closest(r);return i===null||i.contains(this.getElement())}return!0},t.prototype.isScrollable=function(){var n=this.container.current;return n&&(n.scrollWidth>n.clientWidth||n.scrollHeight>n.clientHeight)},t.prototype.processClick=function(n,r,i){var o=this.container.current;this.scrollLeft=o.scrollLeft,this.scrollTop=o.scrollTop,this.clientX=r,this.clientY=i,this.pressed=!0},t.prototype.processStart=function(n){n===void 0&&(n=!0);var r=this.props.onStartScroll;this.started=!0,n&&document.body.classList.add("indiana-dragging"),r&&r({external:!this.internal}),this.forceUpdate()},t.prototype.processScroll=function(n){if(this.started){var r=this.props.onScroll;r&&r({external:!this.internal})}else this.processStart(!1)},t.prototype.processMove=function(n,r,i){var o=this.props,s=o.horizontal,a=o.vertical,l=o.activationDistance,u=o.onScroll,c=this.container.current;this.started?(s&&(c.scrollLeft-=r-this.clientX),a&&(c.scrollTop-=i-this.clientY),u&&u({external:!this.internal}),this.clientX=r,this.clientY=i,this.scrollLeft=c.scrollLeft,this.scrollTop=c.scrollTop):(s&&Math.abs(r-this.clientX)>l||a&&Math.abs(i-this.clientY)>l)&&(this.clientX=r,this.clientY=i,this.processStart())},t.prototype.processEnd=function(){var n=this.props.onEndScroll;this.container.current&&n&&n({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("indiana-dragging"),this.forceUpdate()},t.prototype.getRef=function(n){[this.container,this.props.innerRef].forEach(function(r){r&&(typeof r=="function"?r(n):r.current=n)})},t.prototype.render=function(){var n=this.props,r=n.children,i=n.draggingClassName,o=n.className,s=n.style,a=n.hideScrollbars,l=n.component;return y.createElement(l,{className:Av(o,this.pressed&&i,Vv({dragging:this.pressed,"hide-scrollbars":a,"native-scroll":this.isMobile})),style:s,ref:this.getRef,onScroll:this.onScroll},r)},t.defaultProps={nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},component:"div",buttons:[0]},t}(y.PureComponent);const Ov=({className:e="",data:t,isPortal:n=!0,onButtonStoryClick:r})=>{const[i,o]=y.useState(null),s=p=>o(p),[a,l]=y.useState(t),{hasSeenAllStories:u,sortProfilesBySeenStatus:c}=eo();y.useEffect(()=>{l(c(t==null?void 0:t.filter(p=>p.stories.length)))},[t]);const d=a==null?void 0:a.findIndex(p=>p.id==i);ya({targets:[document],scroll:i?"OFF":"ON"});const f=()=>{l(c(t==null?void 0:t.filter(p=>p.stories.length))),o(null)},v=()=>i?ta.createPortal(T.jsx(_v,{stories:a,open:i,onClose:f,initialSlide:d,onButtonStoryClick:p=>{f(),r==null||r(p)}}),document.body):null;return a!=null&&a.length?T.jsxs(T.Fragment,{children:[T.jsx(Lv,{className:ve(Cr.ScrollContainerClassName,e),children:a==null?void 0:a.map((p,h)=>T.jsx("div",{className:Cr.ItemClassName,children:T.jsx(Zn,{hasSeenAllStories:u(p),onProfileClick:()=>s(p==null?void 0:p.id),color:p==null?void 0:p.color,image:p==null?void 0:p.avatar,title:p==null?void 0:p.name},p==null?void 0:p.id)}))}),i!=null&&v()]}):T.jsx(T.Fragment,{})},Rv="_StoryPlayer_v4m0s_1",Dv="_Overlay_v4m0s_15",jv="_StoryPlayer__Wrap_v4m0s_25",Nv="_progressContainer_v4m0s_37",Bv="_CloseIcon_v4m0s_41",Fv="_inline_v4m0s_57",zv="_progressBarContainer_v4m0s_75",kv="_progressBar_v4m0s_75",be={StoryPlayer:Rv,Overlay:Dv,StoryPlayer__Wrap:jv,progressContainer:Nv,CloseIcon:Bv,inline:Fv,progressBarContainer:zv,progressBar:kv};var W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)},Qs=y.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),Tn=Object.freeze({LEFT:"left",RIGHT:"right"}),Gv="Actions-styles_left__eky50",$v="Actions-styles_right__zguoH";function Hv(e){var t=e.onNextClick,n=e.onPrevClick,r=e.onPause,i=e.onResume,o=y.useState(!1),s=o[0],a=o[1],l=y.useRef(null);function u(f){f.stopPropagation(),f.preventDefault(),clearTimeout(l.current),l.current=setTimeout(function(){r(),a(!0)},200)}function c(f,v){if(v.stopPropagation(),v.preventDefault(),clearTimeout(l.current),s)return i(),void a(!1);i(),f!=Tn.LEFT?t():n()}function d(f){return{onMouseUp:function(v){return c(f,v)},onTouchEnd:function(v){return c(f,v)},onTouchStart:function(v){return u(v)},onMouseDown:function(v){return u(v)}}}return T.jsxs(y.Fragment,{children:[T.jsx("div",W({className:Gv},d(Tn.LEFT))),T.jsx("div",W({className:$v},d(Tn.RIGHT)))]})}function en(){return y.useContext(Qs)}var Wv="ProgressBar-styles_wrapper__oqUCo",Uv="ProgressBar-styles_bar__x0O50",Ki=0,Zi=.1;function qv(e){var t,n,r,i,o,s=en(),a=s.defaultDuration,l=s.classNames,u=y.useRef(null),c=y.useRef(null),d=y.useState(!1),f=d[0],v=d[1];return y.useEffect(function(){!e.isPaused&&e.isActive&&e.isActive?v(!0):v(!1)},[e.isActive,e.isPaused]),y.useEffect(function(){var p;u.current&&(e.hasStoryPassed?u.current.style.width="".concat((p=c==null?void 0:c.current)===null||p===void 0?void 0:p.offsetWidth,"px"):u.current.style.width="0px")},[e.hasStoryPassed,e.isActive]),t=function(p){var h;u.current&&c.current&&((Ki=Number((u.current.style.width||"1px").slice(0,u.current.style.width.length-2))||0)>c.current.offsetWidth?v(!1):(Zi=((h=c==null?void 0:c.current)===null||h===void 0?void 0:h.offsetWidth)/((e.story.duration||a)/p),u.current.style.width="".concat(Ki+Zi,"px")))},n=f,r=y.useRef(),i=y.useRef(),o=y.useRef(t),y.useEffect(function(){o.current=t},[t]),y.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function p(h){if(i.current!=null){var g=h-i.current;o.current(g)}i.current=h,r.current=requestAnimationFrame(p)}),function(){cancelAnimationFrame(r.current),r.current=null,i.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),i.current=null}},[n]),T.jsx("div",W({className:"".concat(Wv," ").concat((l==null?void 0:l.progressBarContainer)||""),ref:c},{children:T.jsx("div",{className:"".concat(Uv," ").concat((l==null?void 0:l.progressBar)||""),ref:u})}))}var Yv="progress-styles_wrapper__qQPyW";function Xv(e){var t=en(),n=t.stories,r=t.classNames;return T.jsx("div",W({className:"".concat(Yv," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(i){return T.jsx(qv,{hasStoryPassed:i.index<e.activeStoryIndex,isActive:i.index===e.activeStoryIndex,story:i,isPaused:i.index===e.activeStoryIndex&&e.isPaused},i.index)})}))}var En=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),Kv="Story-styles_wrapper__oJP7j",Zv="Story-styles_header__-rnWL",Jv="Image-styles_image__gnfW1";function Qv(e){return y.useEffect(function(){e.onPause()},[]),T.jsx("img",{className:Jv,src:e.story.url,alt:"story",onLoad:function(){setTimeout(function(){e.onResume()},4)}})}var Pn,eh="Video-styles_video__BykuO",th="Video-styles_loaderWrapper__TqVWk",nh="Video-styles_loader__FxxSV",rh="Video-styles_soundIcon__ZvYXE";function ih(e){return e.type==="off"?T.jsx("svg",W({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:T.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):T.jsx("svg",W({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:T.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var Kn="RSIsMute",ke=typeof window>"u"?{}:window;function oh(e){var t,n=en().isPaused,r=y.useState(((t=ke==null?void 0:ke.localStorage)===null||t===void 0?void 0:t.getItem(Kn))==="true"),i=r[0],o=r[1],s=y.useState(!1),a=s[0],l=s[1],u=y.useRef(null);function c(d){var f;(f=ke==null?void 0:ke.localStorage)===null||f===void 0||f.setItem(Kn,String(d)),o(d)}return y.useEffect(function(){e.onPause(),l(!0)},[]),y.useEffect(function(){u.current&&(!n||u.current.paused?u.current.play().catch(function(){var d;c(!0),(d=u.current)===null||d===void 0||d.play()}):u.current.pause())},[n]),T.jsxs(y.Fragment,{children:[T.jsxs("video",W({className:eh,ref:u,playsInline:!0,"webkit-playsinline":"",controls:!1,src:e.story.url,onLoadedData:function(){setTimeout(function(){e.onResume(),l(!1)},4)},muted:i},{children:[T.jsx("source",{src:e.story.url,type:"video/mp4"}),T.jsx("source",{src:e.story.url,type:"video/webm"}),T.jsx("source",{src:e.story.url,type:"video/ogg"}),T.jsx("p",{children:"Video not supported"})]})),T.jsx("div",W({className:rh,onClick:function(){return c(!i)}},{children:T.jsx(ih,{type:i?"off":"on"})})),a&&T.jsx("div",W({className:th},{children:T.jsx("div",{className:nh})}))]})}(Pn=ke==null?void 0:ke.localStorage)===null||Pn===void 0||Pn.setItem(Kn,"true");var sh="CustomComponents-styles_component__w87Wx";function ah(e){return T.jsx("div",W({className:sh},{children:T.jsx(e.story.component,{pause:e.onPause,resume:e.onResume,story:e.story,isPaused:e.isPaused})}))}var lh="SeeMore-styles_seeMoreWrapper__kwjif",uh="SeeMore-styles_defaultSeeMore__-B1QW";function ch(e){return e.story.seeMore?T.jsx("button",W({type:"button",onClick:function(){e.onSeeMoreClick()},className:lh},{children:function(){var t=e.story.seeMore,n=typeof t;if(["string","boolean"].includes(n)){var r=n==="string"?t:"See More";return T.jsxs("div",W({className:uh},{children:[T.jsx("span",{children:"^"}),T.jsx("p",{children:r})]}))}return n==="function"?T.jsx(e.story.seeMore,{}):e.story.seeMore}()})):null}var dh="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",fh="SeeMoreComponent-styles_closeIcon__LMm3b";function ph(e){return e.story.seeMore&&e.story.seeMoreComponent?T.jsxs("div",W({className:dh},{children:[T.jsx("button",W({className:fh,onClick:e.onClose},{children:"✕"})),typeof e.story.seeMoreComponent=="function"?T.jsx(e.story.seeMoreComponent,{}):e.story.seeMoreComponent]})):null}function vh(e){var t=y.useState(!1),n=t[0],r=t[1],i=en().classNames;return y.useEffect(function(){r(!1)},[e.story]),T.jsxs("div",W({className:"".concat(Kv," ").concat((i==null?void 0:i.storyContainer)||"")},{children:[e.story.type===En.IMAGE?T.jsx(Qv,W({},e)):e.story.type===En.VIDEO?T.jsx(oh,W({},e)):e.story.type===En.COMPONENT?T.jsx(ah,W({},e)):null,e.story.header&&T.jsx("div",W({className:Zv},{children:typeof e.story.header=="function"?T.jsx(e.story.header,{}):e.story.header})),T.jsx(ch,{onSeeMoreClick:function(){var o,s;e.onPause(),r(!0),(s=(o=e.story).onSeeMoreClick)===null||s===void 0||s.call(o,e.story.index)},story:e.story}),n&&T.jsx(ph,{story:e.story,onClose:function(){e.onResume(),r(!1)}})]}))}var hh="styles_main__-0FEu";function Ji(e){return e===void 0&&(e=4),Number(Math.random().toFixed(e))}function mh(e){var t,n,r,i,o,s,a,l=e.stories,u=l===void 0?[]:l,c=e.width,d=c===void 0?"100%":c,f=e.height,v=f===void 0?"100%":f,p=e.onStoryChange,h=p===void 0?function(){}:p,g=e.currentIndex,m=g===void 0?0:g,S=e.defaultDuration,w=S===void 0?1e4:S,b=e.onAllStoriesEnd,x=b===void 0?function(){}:b,M=e.onStoriesStart,P=M===void 0?function(){}:M,_=e.classNames,E=_===void 0?{}:_,C=e.pauseStoryWhenInActiveWindow,I=C===void 0||C,V=y.useMemo(function(){return function(B,Z){var ce=0;return B.map(function(he,ea){var Pr=he.duration||Z,mt=Pr+Ji();return mt===ce&&(mt=Pr+Ji(6)),ce=mt,W(W({},he),{index:ea,calculatedDuration:mt})})}(u,w)},[u,w]),O=y.useState(),N=O[0],F=O[1],D=u.length-1,k=y.useState(!1),$=k[0],z=k[1],Y=y.useRef(!1),oe=y.useRef(!1);function X(){Y.current||(N==null?void 0:N.index)!==D||(x(),Y.current=!0),(N==null?void 0:N.index)!==D&&F(function(B){if(!B)return V[0];var Z=(B==null?void 0:B.index)+1;return V[Z]})}function G(){z(!0)}function L(){z(!1)}y.useEffect(function(){oe.current||(oe.current=!0,P())},[P]),y.useEffect(function(){var B=V[m];B&&F(B)},[m,u]),y.useEffect(function(){N&&h(N.index)},[N]),n=function(){X()},r=(t=N==null?void 0:N.calculatedDuration)!==null&&t!==void 0?t:null,i=$,o=y.useRef(),s=y.useRef(r),a=y.useRef(Date.now()),y.useEffect(function(){o.current=n},[n]),y.useEffect(function(){s.current=r},[r]),y.useEffect(function(){if(r!==null&&i===!1){a.current=Date.now();var B=setTimeout(function(){o.current()},s.current);return function(){clearTimeout(B)}}return function(){}},[r,i]),y.useEffect(function(){i&&(s.current=s.current-(Date.now()-a.current))},[i]),function(B){var Z=y.useRef(B);y.useEffect(function(){Z.current=B},[B]),y.useEffect(function(){function ce(){Z.current(!0)}function he(){Z.current(!1)}return window.addEventListener("focus",ce),window.addEventListener("blur",he),function(){window.removeEventListener("focus",ce),window.removeEventListener("blur",he)}},[])}(function(B){I&&z(!B)});var R={stories:V,width:d,height:v,defaultDuration:w,isPaused:$,classNames:E};return N?T.jsx(Qs.Provider,W({value:R},{children:T.jsxs("div",W({className:"".concat(hh," ").concat(E.main||""),style:{width:d,height:v}},{children:[T.jsx(Xv,{activeStoryIndex:N.index,isPaused:$}),T.jsx(vh,{onPause:G,onResume:L,story:N,isPaused:$},N.index),T.jsx(Hv,{onNextClick:X,onPrevClick:function(){(N==null?void 0:N.index)!==0&&F(function(B){if(!B)return V[0];var Z=(B==null?void 0:B.index)-1;return V[Z]})},onPause:G,onResume:L})]}))})):null}const gh=({onClose:e,threshold:t=.08,children:n})=>{const r=y.useRef(null),i=Ks(),o=(s,a)=>{const l=r.current;if(!l)return;const u=l.getBoundingClientRect().height;a.offset.y>u*t?e():i.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return T.jsx(Xs.div,{ref:r,style:{height:"100%",width:"100%",touchAction:"none",willChange:"transform"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:i,initial:{y:0},onDragEnd:o,children:n})},yh=({stories:e,currentIndex:t,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:i,inline:o,loop:s,onClose:a,className:l=""})=>{const[u,c]=y.useState(0),d=()=>{c(p=>p+1)},f=()=>{n&&n(),s&&d()};if((e==null?void 0:e.length)==0)return T.jsx(T.Fragment,{});const v=o?({children:p})=>p:gh;return T.jsxs("div",{className:ve(be.StoryPlayer,l,{[be.inline]:o}),children:[T.jsx("div",{className:be.Overlay,onClick:r}),T.jsx("div",{className:be.StoryPlayer__Wrap,children:T.jsxs(v,{onClose:a,children:[T.jsx("div",{className:be.CloseIcon,onClick:a,children:T.jsx(Zs,{})}),T.jsx(mh,{onStoryChange:i,currentIndex:t,stories:e,width:"100%",height:"100%",onAllStoriesEnd:f,classNames:{progressContainer:be.progressContainer,progressBar:be.progressBar,progressBarContainer:be.progressBarContainer}},u)]})})]})};exports.ManagmentStoryComponent=So;exports.ProfileStories=Ov;exports.ProfileStory=Zn;exports.StoryHeaderPlayer=wo;exports.StoryPlayer=yh;
110
+ }`);var zo,VE=(zo="indiana-scroll-container",function(e,t){if(!e)return zo;var n;typeof e=="string"?n=e:t=e;var r=zo;return n&&(r+="__"+n),r+(t?Object.keys(t).reduce(function(i,o){var a=t[o];return a&&(i+=" "+(typeof a=="boolean"?r+"--"+o:r+"--"+o+"_"+a)),i},""):"")}),NE=function(e){function t(n){var r=e.call(this,n)||this;return r.onEndScroll=function(){r.scrolling=!1,!r.pressed&&r.started&&r.processEnd()},r.onScroll=function(i){var o=r.container.current;o.scrollLeft===r.scrollLeft&&o.scrollTop===r.scrollTop||(r.scrolling=!0,r.processScroll(i),r.onEndScroll())},r.onTouchStart=function(i){var o=r.props.nativeMobileScroll;if(r.isDraggable(i.target))if(r.internal=!0,o&&r.scrolling)r.pressed=!0;else{var a=i.touches[0];r.processClick(i,a.clientX,a.clientY),!o&&r.props.stopPropagation&&i.stopPropagation()}},r.onTouchEnd=function(i){var o=r.props.nativeMobileScroll;r.pressed&&(!r.started||r.scrolling&&o?r.pressed=!1:r.processEnd(),r.forceUpdate())},r.onTouchMove=function(i){var o=r.props.nativeMobileScroll;if(r.pressed&&(!o||!r.isMobile)){var a=i.touches[0];a&&r.processMove(i,a.clientX,a.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation()}},r.onMouseDown=function(i){r.isDraggable(i.target)&&r.isScrollable()&&(r.internal=!0,r.props.buttons.indexOf(i.button)!==-1&&(r.processClick(i,i.clientX,i.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation()))},r.onMouseMove=function(i){r.pressed&&(r.processMove(i,i.clientX,i.clientY),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation())},r.onMouseUp=function(i){r.pressed&&(r.started?r.processEnd():(r.internal=!1,r.pressed=!1,r.forceUpdate(),r.props.onClick&&r.props.onClick(i)),i.preventDefault(),r.props.stopPropagation&&i.stopPropagation())},r.container=g.createRef(),r.onEndScroll=DE(r.onEndScroll,300),r.scrolling=!1,r.started=!1,r.pressed=!1,r.internal=!1,r.getRef=r.getRef.bind(r),r}return function(n,r){function i(){this.constructor=n}Kd(n,r),n.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}(t,e),t.prototype.componentDidMount=function(){var n=this.props.nativeMobileScroll,r=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),r.addEventListener("touchstart",this.onTouchStart,{passive:!1}),r.addEventListener("mousedown",this.onMouseDown,{passive:!1}),n&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())},t.prototype.componentWillUnmount=function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},t.prototype.getElement=function(){return this.container.current},t.prototype.isMobileDevice=function(){return window.orientation!==void 0||navigator.userAgent.indexOf("IEMobile")!==-1},t.prototype.isDraggable=function(n){var r=this.props.ignoreElements;if(r){var i=n.closest(r);return i===null||i.contains(this.getElement())}return!0},t.prototype.isScrollable=function(){var n=this.container.current;return n&&(n.scrollWidth>n.clientWidth||n.scrollHeight>n.clientHeight)},t.prototype.processClick=function(n,r,i){var o=this.container.current;this.scrollLeft=o.scrollLeft,this.scrollTop=o.scrollTop,this.clientX=r,this.clientY=i,this.pressed=!0},t.prototype.processStart=function(n){n===void 0&&(n=!0);var r=this.props.onStartScroll;this.started=!0,n&&document.body.classList.add("indiana-dragging"),r&&r({external:!this.internal}),this.forceUpdate()},t.prototype.processScroll=function(n){if(this.started){var r=this.props.onScroll;r&&r({external:!this.internal})}else this.processStart(!1)},t.prototype.processMove=function(n,r,i){var o=this.props,a=o.horizontal,s=o.vertical,l=o.activationDistance,u=o.onScroll,c=this.container.current;this.started?(a&&(c.scrollLeft-=r-this.clientX),s&&(c.scrollTop-=i-this.clientY),u&&u({external:!this.internal}),this.clientX=r,this.clientY=i,this.scrollLeft=c.scrollLeft,this.scrollTop=c.scrollTop):(a&&Math.abs(r-this.clientX)>l||s&&Math.abs(i-this.clientY)>l)&&(this.clientX=r,this.clientY=i,this.processStart())},t.prototype.processEnd=function(){var n=this.props.onEndScroll;this.container.current&&n&&n({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("indiana-dragging"),this.forceUpdate()},t.prototype.getRef=function(n){[this.container,this.props.innerRef].forEach(function(r){r&&(typeof r=="function"?r(n):r.current=n)})},t.prototype.render=function(){var n=this.props,r=n.children,i=n.draggingClassName,o=n.className,a=n.style,s=n.hideScrollbars,l=n.component;return g.createElement(l,{className:LE(o,this.pressed&&i,VE({dragging:this.pressed,"hide-scrollbars":s,"native-scroll":this.isMobile})),style:a,ref:this.getRef,onScroll:this.onScroll},r)},t.defaultProps={nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},component:"div",buttons:[0]},t}(g.PureComponent);const jE=({className:e="",data:t,isPortal:n=!0,onButtonStoryClick:r})=>{const[i,o]=g.useState(null),a=p=>o(p),[s,l]=g.useState(t),{hasSeenAllStories:u,sortProfilesBySeenStatus:c}=Ju();g.useEffect(()=>{l(c(t==null?void 0:t.filter(p=>p.stories.length)))},[t]);const f=s==null?void 0:s.findIndex(p=>p.id==i);vp({targets:[document],scroll:i?"OFF":"ON"});const d=()=>{l(c(t==null?void 0:t.filter(p=>p.stories.length))),o(null)},h=()=>i?Zu.createPortal(A.jsx(ME,{stories:s,open:i,onClose:d,initialSlide:f,onButtonStoryClick:p=>{d(),r==null||r(p)}}),document.body):null;return s!=null&&s.length?A.jsxs(A.Fragment,{children:[A.jsx(NE,{className:Oe(As.ScrollContainerClassName,e),children:s==null?void 0:s.map((p,v)=>A.jsx("div",{className:As.ItemClassName,children:A.jsx(La,{hasSeenAllStories:u(p),onProfileClick:()=>a(p==null?void 0:p.id),color:p==null?void 0:p.color,image:p==null?void 0:p.avatar,title:p==null?void 0:p.name},p==null?void 0:p.id)}))}),i!=null&&h()]}):A.jsx(A.Fragment,{})},BE="_StoryPlayer_v4m0s_1",kE="_Overlay_v4m0s_15",FE="_StoryPlayer__Wrap_v4m0s_25",zE="_progressContainer_v4m0s_37",$E="_CloseIcon_v4m0s_41",GE="_inline_v4m0s_57",HE="_progressBarContainer_v4m0s_75",WE="_progressBar_v4m0s_75",gt={StoryPlayer:BE,Overlay:kE,StoryPlayer__Wrap:FE,progressContainer:zE,CloseIcon:$E,inline:GE,progressBarContainer:HE,progressBar:WE};var fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fe.apply(this,arguments)},Xd=g.createContext({stories:[],width:"100%",height:"100%",defaultDuration:1e4,isPaused:!1}),$o=Object.freeze({LEFT:"left",RIGHT:"right"}),UE="Actions-styles_left__eky50",qE="Actions-styles_right__zguoH";function YE(e){var t=e.onNextClick,n=e.onPrevClick,r=e.onPause,i=e.onResume,o=g.useState(!1),a=o[0],s=o[1],l=g.useRef(null);function u(d){d.stopPropagation(),d.preventDefault(),clearTimeout(l.current),l.current=setTimeout(function(){r(),s(!0)},200)}function c(d,h){if(h.stopPropagation(),h.preventDefault(),clearTimeout(l.current),a)return i(),void s(!1);i(),d!=$o.LEFT?t():n()}function f(d){return{onMouseUp:function(h){return c(d,h)},onTouchEnd:function(h){return c(d,h)},onTouchStart:function(h){return u(h)},onMouseDown:function(h){return u(h)}}}return A.jsxs(g.Fragment,{children:[A.jsx("div",fe({className:UE},f($o.LEFT))),A.jsx("div",fe({className:qE},f($o.RIGHT)))]})}function to(){return g.useContext(Xd)}var KE="ProgressBar-styles_wrapper__oqUCo",XE="ProgressBar-styles_bar__x0O50",Yu=0,Ku=.1;function ZE(e){var t,n,r,i,o,a=to(),s=a.defaultDuration,l=a.classNames,u=g.useRef(null),c=g.useRef(null),f=g.useState(!1),d=f[0],h=f[1];return g.useEffect(function(){!e.isPaused&&e.isActive&&e.isActive?h(!0):h(!1)},[e.isActive,e.isPaused]),g.useEffect(function(){var p;u.current&&(e.hasStoryPassed?u.current.style.width="".concat((p=c==null?void 0:c.current)===null||p===void 0?void 0:p.offsetWidth,"px"):u.current.style.width="0px")},[e.hasStoryPassed,e.isActive]),t=function(p){var v;u.current&&c.current&&((Yu=Number((u.current.style.width||"1px").slice(0,u.current.style.width.length-2))||0)>c.current.offsetWidth?h(!1):(Ku=((v=c==null?void 0:c.current)===null||v===void 0?void 0:v.offsetWidth)/((e.story.duration||s)/p),u.current.style.width="".concat(Yu+Ku,"px")))},n=d,r=g.useRef(),i=g.useRef(),o=g.useRef(t),g.useEffect(function(){o.current=t},[t]),g.useEffect(function(){return n!==!1?(r.current=requestAnimationFrame(function p(v){if(i.current!=null){var y=v-i.current;o.current(y)}i.current=v,r.current=requestAnimationFrame(p)}),function(){cancelAnimationFrame(r.current),r.current=null,i.current=null}):function(){r.current&&(r.current=null),cancelAnimationFrame(r.current),i.current=null}},[n]),A.jsx("div",fe({className:"".concat(KE," ").concat((l==null?void 0:l.progressBarContainer)||""),ref:c},{children:A.jsx("div",{className:"".concat(XE," ").concat((l==null?void 0:l.progressBar)||""),ref:u})}))}var JE="progress-styles_wrapper__qQPyW";function QE(e){var t=to(),n=t.stories,r=t.classNames;return A.jsx("div",fe({className:"".concat(JE," ").concat((r==null?void 0:r.progressContainer)||""),style:{gridTemplateColumns:"repeat(".concat(n.length,",1fr)")}},{children:n.map(function(i){return A.jsx(ZE,{hasStoryPassed:i.index<e.activeStoryIndex,isActive:i.index===e.activeStoryIndex,story:i,isPaused:i.index===e.activeStoryIndex&&e.isPaused},i.index)})}))}var Go=Object.freeze({IMAGE:"image",VIDEO:"video",COMPONENT:"component"}),eT="Story-styles_wrapper__oJP7j",tT="Story-styles_header__-rnWL",nT="Image-styles_image__gnfW1";function rT(e){return g.useEffect(function(){e.onPause()},[]),A.jsx("img",{className:nT,src:e.story.url,alt:"story",onLoad:function(){setTimeout(function(){e.onResume()},4)}})}var Ho,iT="Video-styles_video__BykuO",oT="Video-styles_loaderWrapper__TqVWk",aT="Video-styles_loader__FxxSV",sT="Video-styles_soundIcon__ZvYXE";function lT(e){return e.type==="off"?A.jsx("svg",fe({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:A.jsx("path",{d:"M3 9v6h-1v-6h1zm13-7l-9 5v2.288l7-3.889v13.202l-7-3.889v2.288l9 5v-20zm-11 5h-5v10h5v-10zm17.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"})})):A.jsx("svg",fe({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white"},{children:A.jsx("path",{d:"M22 0v24l-11-6v-2.278l9 4.909v-17.262l-9 4.91v-2.279l11-6zm-13 6v12h-7v-12h7zm-2 2h-3v8h3v-8z"})}))}var Ma="RSIsMute",un=typeof window>"u"?{}:window;function uT(e){var t,n=to().isPaused,r=g.useState(((t=un==null?void 0:un.localStorage)===null||t===void 0?void 0:t.getItem(Ma))==="true"),i=r[0],o=r[1],a=g.useState(!1),s=a[0],l=a[1],u=g.useRef(null);function c(f){var d;(d=un==null?void 0:un.localStorage)===null||d===void 0||d.setItem(Ma,String(f)),o(f)}return g.useEffect(function(){e.onPause(),l(!0)},[]),g.useEffect(function(){u.current&&(!n||u.current.paused?u.current.play().catch(function(){var f;c(!0),(f=u.current)===null||f===void 0||f.play()}):u.current.pause())},[n]),A.jsxs(g.Fragment,{children:[A.jsxs("video",fe({className:iT,ref:u,playsInline:!0,"webkit-playsinline":"",controls:!1,src:e.story.url,onLoadedData:function(){setTimeout(function(){e.onResume(),l(!1)},4)},muted:i},{children:[A.jsx("source",{src:e.story.url,type:"video/mp4"}),A.jsx("source",{src:e.story.url,type:"video/webm"}),A.jsx("source",{src:e.story.url,type:"video/ogg"}),A.jsx("p",{children:"Video not supported"})]})),A.jsx("div",fe({className:sT,onClick:function(){return c(!i)}},{children:A.jsx(lT,{type:i?"off":"on"})})),s&&A.jsx("div",fe({className:oT},{children:A.jsx("div",{className:aT})}))]})}(Ho=un==null?void 0:un.localStorage)===null||Ho===void 0||Ho.setItem(Ma,"true");var cT="CustomComponents-styles_component__w87Wx";function fT(e){return A.jsx("div",fe({className:cT},{children:A.jsx(e.story.component,{pause:e.onPause,resume:e.onResume,story:e.story,isPaused:e.isPaused})}))}var dT="SeeMore-styles_seeMoreWrapper__kwjif",pT="SeeMore-styles_defaultSeeMore__-B1QW";function hT(e){return e.story.seeMore?A.jsx("button",fe({type:"button",onClick:function(){e.onSeeMoreClick()},className:dT},{children:function(){var t=e.story.seeMore,n=typeof t;if(["string","boolean"].includes(n)){var r=n==="string"?t:"See More";return A.jsxs("div",fe({className:pT},{children:[A.jsx("span",{children:"^"}),A.jsx("p",{children:r})]}))}return n==="function"?A.jsx(e.story.seeMore,{}):e.story.seeMore}()})):null}var vT="SeeMoreComponent-styles_seeMoreComponentWrapper__0T6Ap",mT="SeeMoreComponent-styles_closeIcon__LMm3b";function gT(e){return e.story.seeMore&&e.story.seeMoreComponent?A.jsxs("div",fe({className:vT},{children:[A.jsx("button",fe({className:mT,onClick:e.onClose},{children:"✕"})),typeof e.story.seeMoreComponent=="function"?A.jsx(e.story.seeMoreComponent,{}):e.story.seeMoreComponent]})):null}function yT(e){var t=g.useState(!1),n=t[0],r=t[1],i=to().classNames;return g.useEffect(function(){r(!1)},[e.story]),A.jsxs("div",fe({className:"".concat(eT," ").concat((i==null?void 0:i.storyContainer)||"")},{children:[e.story.type===Go.IMAGE?A.jsx(rT,fe({},e)):e.story.type===Go.VIDEO?A.jsx(uT,fe({},e)):e.story.type===Go.COMPONENT?A.jsx(fT,fe({},e)):null,e.story.header&&A.jsx("div",fe({className:tT},{children:typeof e.story.header=="function"?A.jsx(e.story.header,{}):e.story.header})),A.jsx(hT,{onSeeMoreClick:function(){var o,a;e.onPause(),r(!0),(a=(o=e.story).onSeeMoreClick)===null||a===void 0||a.call(o,e.story.index)},story:e.story}),n&&A.jsx(gT,{story:e.story,onClose:function(){e.onResume(),r(!1)}})]}))}var ST="styles_main__-0FEu";function Xu(e){return e===void 0&&(e=4),Number(Math.random().toFixed(e))}function bT(e){var t,n,r,i,o,a,s,l=e.stories,u=l===void 0?[]:l,c=e.width,f=c===void 0?"100%":c,d=e.height,h=d===void 0?"100%":d,p=e.onStoryChange,v=p===void 0?function(){}:p,y=e.currentIndex,m=y===void 0?0:y,S=e.defaultDuration,b=S===void 0?1e4:S,E=e.onAllStoriesEnd,T=E===void 0?function(){}:E,w=e.onStoriesStart,x=w===void 0?function(){}:w,_=e.classNames,C=_===void 0?{}:_,P=e.pauseStoryWhenInActiveWindow,O=P===void 0||P,R=g.useMemo(function(){return function(K,ye){var Ne=0;return K.map(function(Fe,wr){var wn=Fe.duration||ye,De=wn+Xu();return De===Ne&&(De=wn+Xu(6)),Ne=De,fe(fe({},Fe),{index:wr,calculatedDuration:De})})}(u,b)},[u,b]),L=g.useState(),N=L[0],z=L[1],B=u.length-1,G=g.useState(!1),$=G[0],k=G[1],Y=g.useRef(!1),Q=g.useRef(!1);function W(){Y.current||(N==null?void 0:N.index)!==B||(T(),Y.current=!0),(N==null?void 0:N.index)!==B&&z(function(K){if(!K)return R[0];var ye=(K==null?void 0:K.index)+1;return R[ye]})}function q(){k(!0)}function D(){k(!1)}g.useEffect(function(){Q.current||(Q.current=!0,x())},[x]),g.useEffect(function(){var K=R[m];K&&z(K)},[m,u]),g.useEffect(function(){N&&v(N.index)},[N]),n=function(){W()},r=(t=N==null?void 0:N.calculatedDuration)!==null&&t!==void 0?t:null,i=$,o=g.useRef(),a=g.useRef(r),s=g.useRef(Date.now()),g.useEffect(function(){o.current=n},[n]),g.useEffect(function(){a.current=r},[r]),g.useEffect(function(){if(r!==null&&i===!1){s.current=Date.now();var K=setTimeout(function(){o.current()},a.current);return function(){clearTimeout(K)}}return function(){}},[r,i]),g.useEffect(function(){i&&(a.current=a.current-(Date.now()-s.current))},[i]),function(K){var ye=g.useRef(K);g.useEffect(function(){ye.current=K},[K]),g.useEffect(function(){function Ne(){ye.current(!0)}function Fe(){ye.current(!1)}return window.addEventListener("focus",Ne),window.addEventListener("blur",Fe),function(){window.removeEventListener("focus",Ne),window.removeEventListener("blur",Fe)}},[])}(function(K){O&&k(!K)});var j={stories:R,width:f,height:h,defaultDuration:b,isPaused:$,classNames:C};return N?A.jsx(Xd.Provider,fe({value:j},{children:A.jsxs("div",fe({className:"".concat(ST," ").concat(C.main||""),style:{width:f,height:h}},{children:[A.jsx(QE,{activeStoryIndex:N.index,isPaused:$}),A.jsx(yT,{onPause:q,onResume:D,story:N,isPaused:$},N.index),A.jsx(YE,{onNextClick:W,onPrevClick:function(){(N==null?void 0:N.index)!==0&&z(function(K){if(!K)return R[0];var ye=(K==null?void 0:K.index)-1;return R[ye]})},onPause:q,onResume:D})]}))})):null}const wT=({onClose:e,threshold:t=.08,children:n})=>{const r=g.useRef(null),i=qd(),o=(a,s)=>{const l=r.current;if(!l)return;const u=l.getBoundingClientRect().height;s.offset.y>u*t?e():i.start({y:0,transition:{type:"spring",stiffness:300,damping:30}})};return A.jsx(Ud.div,{ref:r,style:{height:"100%",width:"100%",touchAction:"none",willChange:"transform"},drag:"y",dragConstraints:{top:0},dragMomentum:!1,dragElastic:0,animate:i,initial:{y:0},onDragEnd:o,children:n})},xT=({stories:e,currentIndex:t,onAllStoriesEnd:n,onOverlayClick:r,onStoryChange:i,inline:o,loop:a,onClose:s,className:l=""})=>{const[u,c]=g.useState(0),f=()=>{c(p=>p+1)},d=()=>{n&&n(),a&&f()};if((e==null?void 0:e.length)==0)return A.jsx(A.Fragment,{});const h=o?({children:p})=>p:wT;return A.jsxs("div",{className:Oe(gt.StoryPlayer,l,{[gt.inline]:o}),children:[A.jsx("div",{className:gt.Overlay,onClick:r}),A.jsx("div",{className:gt.StoryPlayer__Wrap,children:A.jsxs(h,{onClose:s,children:[A.jsx("div",{className:gt.CloseIcon,onClick:s,children:A.jsx(Yd,{})}),A.jsx(bT,{onStoryChange:i,currentIndex:t,stories:e,width:"100%",height:"100%",onAllStoriesEnd:d,classNames:{progressContainer:gt.progressContainer,progressBar:gt.progressBar,progressBarContainer:gt.progressBarContainer}},u)]})})]})};exports.ManagmentStoryComponent=mf;exports.ProfileStories=jE;exports.ProfileStory=La;exports.StoryHeaderPlayer=gf;exports.StoryPlayer=xT;
54
111
  //# sourceMappingURL=index.cjs.js.map