botech-library 1.0.67 → 1.0.72

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/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import r,{createContext as s,useRef as o,useLayoutEffect as a,useEffect as l,useId as c,useContext as d,useInsertionEffect as u,useMemo as h,useCallback as m,Children as p,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as b}from"react";import w from"sweetalert2";import S from"axios";import{createPortal as C}from"react-dom";const T=({variant:e="primary",size:n="md",onClick:i,children:r,className:s="",disabled:o=!1})=>t("button",{className:`rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[n]} ${{primary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"}[e]} ${s}`,onClick:o?void 0:i,disabled:o,children:r}),P=({leftIcon:n,rightIcon:i,children:r,onClick:s,className:o="",variant:a="primary",size:l="md",disabled:c=!1})=>e("button",{type:"button",className:`inline-flex items-center gap-2 rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[l]} ${{primary:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"}[a]} ${o}`,onClick:c?void 0:s,disabled:c,children:[n&&t("span",{className:"flex items-center",children:n}),r,i&&t("span",{className:"flex items-center",children:i})]});var k={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},E=r.createContext&&r.createContext(k),N=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},M.apply(this,arguments)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach(function(e){L(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function L(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t){return t&&t.map((t,e)=>r.createElement(t.tag,D({key:e},t.attr),R(t.child)))}function j(t){return e=>r.createElement(B,M({attr:D({},t.attr)},e),R(t.child))}function B(t){var e=e=>{var n,{attr:i,size:s,title:o}=t,a=A(t,N),l=s||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),r.createElement("svg",M({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:D(D({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&r.createElement("title",null,o),t.children)};return void 0!==E?r.createElement(E.Consumer,null,t=>e(t)):e(k)}function F(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function O(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function z(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function I(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function $(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function W(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function U(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const H=({title:n,description:i,logoUrl:r,defaultLogoUrl:s,logoAlt:o="Logo",systemName:a="PASS",systemSubtitle:l="Sistema Escolar",onMenuToggle:c,showPageInfo:d=!0,className:u="flex flex-col sm:flex-row sm:items-end bg-primary-botech text-white p-3 sm:p-4 shadow-lg gap-3 sm:gap-0 justify-between",logoClassName:h="h-8 sm:h-10 object-contain",titleClassName:m="text-lg sm:text-xl font-bold",descriptionClassName:p="text-xs sm:text-sm opacity-80"})=>{const f="string"==typeof s&&""!==s.trim()?s:void 0,g="string"==typeof r&&""!==r.trim()?r:f;return e("div",{className:u,children:[e("div",{className:"flex items-center gap-3 sm:gap-4",children:[t("button",{onClick:c,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20 flex-shrink-0","aria-label":"Abrir menú",children:t($,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),e("div",{className:"flex items-center min-w-0 flex-1",children:[t("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:g?t("img",{src:g,alt:o,className:h}):t("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t("span",{className:"text-white font-bold text-sm sm:text-lg",children:a.charAt(0)})})}),e("div",{className:"min-w-0 flex-1",children:[t("h1",{className:m,children:a}),t("p",{className:p,children:l})]})]})]}),d&&e("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t("h2",{className:"text-base sm:text-lg font-semibold",children:n}),t("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:i})]})]})},_=s({});function Y(t){const e=o(null);return null===e.current&&(e.current=t()),e.current}const X="undefined"!=typeof window,K=X?a:l,q=s(null);function G(t,e){-1===t.indexOf(e)&&t.push(e)}function Z(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let Q=()=>{},tt=()=>{};"production"!==process.env.NODE_ENV&&(Q=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},tt=(t,e)=>{if(!t)throw new Error(e)});const et={},nt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function it(t){return"object"==typeof t&&null!==t}const rt=t=>/^0[^.\s]+$/u.test(t);function st(t){let e;return()=>(void 0===e&&(e=t()),e)}const ot=t=>t,at=(t,e)=>n=>e(t(n)),lt=(...t)=>t.reduce(at),ct=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class dt{constructor(){this.subscriptions=[]}add(t){return G(this.subscriptions,t),()=>Z(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ut=t=>1e3*t,ht=t=>t/1e3;function mt(t,e){return e?t*(1e3/e):0}const pt=new Set;function ft(t,e,n){t||pt.has(e)||(console.warn(e),n&&console.warn(n),pt.add(e))}const gt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function yt(t,e,n,i){if(t===e&&n===i)return ot;const r=e=>function(t,e,n,i,r){let s,o,a=0;do{o=e+(n-e)/2,s=gt(o,i,r)-t,s>0?n=o:e=o}while(Math.abs(s)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:gt(r(t),e,i)}const vt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xt=t=>e=>1-t(1-e),bt=yt(.33,1.53,.69,.99),wt=xt(bt),St=vt(wt),Ct=t=>(t*=2)<1?.5*wt(t):.5*(2-Math.pow(2,-10*(t-1))),Tt=t=>1-Math.sin(Math.acos(t)),Pt=xt(Tt),kt=vt(Tt),Et=yt(.42,0,1,1),Nt=yt(0,0,.58,1),At=yt(.42,0,.58,1),Mt=t=>Array.isArray(t)&&"number"==typeof t[0],Vt={linear:ot,easeIn:Et,easeInOut:At,easeOut:Nt,circIn:Tt,circInOut:kt,circOut:Pt,backIn:wt,backInOut:St,backOut:bt,anticipate:Ct},Dt=t=>{if(Mt(t)){tt(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,r]=t;return yt(e,n,i,r)}return"string"==typeof t?(tt(void 0!==Vt[t],`Invalid easing type '${t}'`),Vt[t]):t},Lt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Rt={value:null,addProjectionMetrics:null};function jt(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Lt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){o.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,s=!1)=>{const a=s&&r?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,r?s=!0:(r=!0,[n,i]=[i,n],n.forEach(c),e&&Rt.value&&Rt.value.frameloop[e].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(t)))}};return d}(s,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:p}=o,f=()=>{const s=et.useManualTiming?r.timestamp:performance.now();n=!1,et.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),m.process(r),p.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:Lt.reduce((e,s)=>{const a=o[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(f)),a.schedule(e,s,o)),e},{}),cancel:t=>{for(let e=0;e<Lt.length;e++)o[Lt[e]].cancel(t)},state:r,steps:o}}const{schedule:Bt,cancel:Ft,state:Ot,steps:zt}=jt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ot,!0);let It;function $t(){It=void 0}const Wt={now:()=>(void 0===It&&Wt.set(Ot.isProcessing||et.useManualTiming?Ot.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask($t)}},Ut=t=>e=>"string"==typeof e&&e.startsWith(t),Ht=Ut("--"),_t=Ut("var(--"),Yt=t=>!!_t(t)&&Xt.test(t.split("/*")[0].trim()),Xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},qt={...Kt,transform:t=>J(0,1,t)},Gt={...Kt,default:1},Zt=t=>Math.round(1e5*t)/1e5,Jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Qt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,te=(t,e)=>n=>Boolean("string"==typeof n&&Qt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ee=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,s,o,a]=i.match(Jt);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ne={...Kt,transform:t=>Math.round((t=>J(0,255,t))(t))},ie={test:te("rgb","red"),parse:ee("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ne.transform(t)+", "+ne.transform(e)+", "+ne.transform(n)+", "+Zt(qt.transform(i))+")"};const re={test:te("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:ie.transform},se=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),oe=se("deg"),ae=se("%"),le=se("px"),ce=se("vh"),de=se("vw"),ue=(()=>({...ae,parse:t=>ae.parse(t)/100,transform:t=>ae.transform(100*t)}))(),he={test:te("hsl","hue"),parse:ee("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ae.transform(Zt(e))+", "+ae.transform(Zt(n))+", "+Zt(qt.transform(i))+")"},me={test:t=>ie.test(t)||re.test(t)||he.test(t),parse:t=>ie.test(t)?ie.parse(t):he.test(t)?he.parse(t):re.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ie.transform(t):he.transform(t),getAnimatableNone:t=>{const e=me.parse(t);return e.alpha=0,me.transform(e)}},pe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const fe="number",ge="color",ye=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ve(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const o=e.replace(ye,t=>(me.test(t)?(i.color.push(s),r.push(ge),n.push(me.parse(t))):t.startsWith("var(")?(i.var.push(s),r.push("var"),n.push(t)):(i.number.push(s),r.push(fe),n.push(parseFloat(t))),++s,"${}")).split("${}");return{values:n,split:o,indexes:i,types:r}}function xe(t){return ve(t).values}function be(t){const{split:e,types:n}=ve(t),i=e.length;return t=>{let r="";for(let s=0;s<i;s++)if(r+=e[s],void 0!==t[s]){const e=n[s];r+=e===fe?Zt(t[s]):e===ge?me.transform(t[s]):t[s]}return r}}const we=t=>"number"==typeof t?0:me.test(t)?me.getAnimatableNone(t):t;const Se={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Jt)?.length||0)+(t.match(pe)?.length||0)>0},parse:xe,createTransformer:be,getAnimatableNone:function(t){const e=xe(t);return be(t)(e.map(we))}};function Ce(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Te(t,e){return n=>n>0?e:t}const Pe=(t,e,n)=>t+(e-t)*n,ke=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},Ee=[re,ie,he];function Ne(t){const e=(n=t,Ee.find(t=>t.test(n)));var n;if(Q(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===he&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,s=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=Ce(a,i,t+1/3),s=Ce(a,i,t),o=Ce(a,i,t-1/3)}else r=s=o=n;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Ne(t),i=Ne(e);if(!n||!i)return Te(t,e);const r={...n};return t=>(r.red=ke(n.red,i.red,t),r.green=ke(n.green,i.green,t),r.blue=ke(n.blue,i.blue,t),r.alpha=Pe(n.alpha,i.alpha,t),ie.transform(r))},Me=new Set(["none","hidden"]);function Ve(t,e){return n=>Pe(t,e,n)}function De(t){return"number"==typeof t?Ve:"string"==typeof t?Yt(t)?Te:me.test(t)?Ae:je:Array.isArray(t)?Le:"object"==typeof t?me.test(t)?Ae:Re:Te}function Le(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>De(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=De(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const je=(t,e)=>{const n=Se.createTransformer(e),i=ve(t),r=ve(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Me.has(t)&&!r.values.length||Me.has(e)&&!i.values.length?function(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):lt(Le(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const s=e.types[r],o=t.indexes[s][i[s]],a=t.values[o]??0;n[r]=a,i[s]++}return n}(i,r),r.values),n):(Q(!0,`Complex values '${t}' and '${e}' 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.`),Te(t,e))};function Be(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Pe(t,e,n);return De(t)(t,e)}const Fe=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Bt.update(e,t),stop:()=>Ft(e),now:()=>Ot.isProcessing?Ot.timestamp:Wt.now()}},Oe=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ze=2e4;function Ie(t){let e=0;let n=t.next(e);for(;!n.done&&e<ze;)e+=50,n=t.next(e);return e>=ze?1/0:e}function $e(t,e,n){const i=Math.max(e-5,0);return mt(n-t(i),e-i)}const We=100,Ue=10,He=1,_e=0,Ye=800,Xe=.3,Ke=.3,qe={granular:.01,default:2},Ge={granular:.005,default:.5},Ze=.01,Je=10,Qe=.05,tn=1,en=.001;function nn({duration:t=Ye,bounce:e=Xe,velocity:n=_e,mass:i=He}){let r,s;Q(t<=ut(Je),"Spring duration must be 10 seconds or less");let o=1-e;o=J(Qe,tn,o),t=J(Ze,Je,ht(t)),o<1?(r=e=>{const i=e*o,r=i*t,s=i-n,a=sn(e,o),l=Math.exp(-r);return en-s/a*l},s=e=>{const i=e*o*t,s=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=sn(Math.pow(e,2),o);return(-r(e)+en>0?-1:1)*((s-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<rn;n++)i-=t(i)/e(i);return i}(r,s,5/t);if(t=ut(t),isNaN(a))return{stiffness:We,damping:Ue,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const rn=12;function sn(t,e){return t*Math.sqrt(1-e*e)}const on=["duration","bounce"],an=["stiffness","damping","mass"];function ln(t,e){return e.some(e=>void 0!==t[e])}function cn(t=Ke,e=Xe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:m}=function(t){let e={velocity:_e,stiffness:We,damping:Ue,mass:He,isResolvedFromDuration:!1,...t};if(!ln(t,an)&&ln(t,on))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,s=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:He,stiffness:r,damping:s}}else{const n=nn(t);e={...e,...n,mass:He},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ht(n.velocity||0)}),p=h||0,f=c/(2*Math.sqrt(l*d)),g=o-s,y=ht(Math.sqrt(l/d)),v=Math.abs(g)<5;let x;if(i||(i=v?qe.granular:qe.default),r||(r=v?Ge.granular:Ge.default),f<1){const t=sn(y,f);x=e=>{const n=Math.exp(-f*y*e);return o-n*((p+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>o-Math.exp(-y*t)*(g+(p+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return o-n*((p+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:m&&u||null,next:t=>{const e=x(t);if(m)a.done=t>=u;else{let n=0===t?p:0;f<1&&(n=0===t?ut(p):$e(x,t,e));const s=Math.abs(n)<=i,l=Math.abs(o-e)<=r;a.done=s&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(Ie(b),ze),e=Oe(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=u+p,g=void 0===o?f:o(f);g!==f&&(p=g-u);const y=t=>-p*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const S=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=cn({keyframes:[h.value,m(h.value)],velocity:$e(v,t,h.value),damping:r,stiffness:s,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),S(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&x(t),h)}}}function un(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(tt(s===e.length,"Both input and output ranges must be the same length"),1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],r=n||et.mix||Be,s=t.length-1;for(let n=0;n<s;n++){let s=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||ot:e;s=lt(t,s)}i.push(s)}return i}(e,i,r),l=a.length,c=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=ct(t[i],t[i+1],n);return a[i](r)};return n?e=>c(J(t[0],t[s-1],e)):c}function hn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ct(0,e,i);t.push(Pe(n,1,r))}}(e,t.length-1),e}function mn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Dt):Dt(i),s={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:hn(e),t),a=un(o,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(s.value=a(e),s.done=e>=t,s)}}cn.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(Ie(i),ze);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:ht(r)}}(t,100,cn);return t.ease=e.ease,t.duration=ut(e.duration),t.type="keyframes",t};const pn=t=>null!==t;function fn(t,{repeat:e,repeatType:n="loop"},i,r=1){const s=t.filter(pn),o=r<0||e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}const gn={decay:dn,inertia:dn,tween:mn,keyframes:mn,spring:cn};function yn(t){"string"==typeof t.type&&(t.type=gn[t.type])}class vn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const xn=t=>t/100;class bn extends vn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Wt.now()&&this.tick(Wt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;yn(t);const{type:e=mn,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:s=0}=t;let{keyframes:o}=t;const a=e||mn;"production"!==process.env.NODE_ENV&&a!==mn&&tt(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),a!==mn&&"number"!=typeof o[0]&&(this.mixKeyframes=lt(xn,Be(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=Ie(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(d){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===u?(n=1-n,h&&(n-=h/o)):"mirror"===u&&(x=s)),v=J(0,1,n)*o}const b=y?{done:!1,value:c[0]}:x.next(v);r&&(b.value=r(b.value));let{done:w}=b;y||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&m!==dn&&(b.value=fn(c,this.options,f,this.speed)),p&&p(b.value),S&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return ht(this.calculatedDuration)}get time(){return ht(this.currentTime)}set time(t){t=ut(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ht(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fe,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Wt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const wn=t=>180*t/Math.PI,Sn=t=>{const e=wn(Math.atan2(t[1],t[0]));return Tn(e)},Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Sn,rotateZ:Sn,skewX:t=>wn(Math.atan(t[1])),skewY:t=>wn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Tn=t=>((t%=360)<0&&(t+=360),t),Pn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),kn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),En={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pn,scaleY:kn,scale:t=>(Pn(t)+kn(t))/2,rotateX:t=>Tn(wn(Math.atan2(t[6],t[5]))),rotateY:t=>Tn(wn(Math.atan2(-t[2],t[0]))),rotateZ:Sn,rotate:Sn,skewX:t=>wn(Math.atan(t[4])),skewY:t=>wn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Nn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return Nn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=En,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Cn,r=e}if(!r)return Nn(e);const s=i[e],o=r[1].split(",").map(Mn);return"function"==typeof s?s(o):o[s]}function Mn(t){return parseFloat(t.trim())}const Vn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dn=(()=>new Set(Vn))(),Ln=t=>t===Kt||t===le,Rn=new Set(["x","y","z"]),jn=Vn.filter(t=>!Rn.has(t));const Bn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};Bn.translateX=Bn.x,Bn.translateY=Bn.y;const Fn=new Set;let On=!1,zn=!1,In=!1;function $n(){if(zn){const t=Array.from(Fn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return jn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}zn=!1,On=!1,Fn.forEach(t=>t.complete(In)),Fn.clear()}function Wn(){Fn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zn=!0)})}class Un{constructor(t,e,n,i,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fn.add(this),On||(On=!0,Bt.read(Wn),Bt.resolveKeyframes($n))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fn.delete(this)}cancel(){"scheduled"===this.state&&(Fn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Hn=st(()=>void 0!==window.ScrollTimeline),_n={};function Yn(t,e){const n=st(t);return()=>_n[e]??n()}const Xn=Yn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Kn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kn([0,.65,.55,1]),circOut:Kn([.55,0,1,.45]),backIn:Kn([.31,.01,.66,-.59]),backOut:Kn([.33,1.53,.69,.99])};function Gn(t,e){return t?"function"==typeof t?Xn()?Oe(t,e):"ease-out":Mt(t)?Kn(t):Array.isArray(t)?t.map(t=>Gn(t,e)||qn.easeOut):qn[t]:void 0}function Zn(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=Gn(a,r);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Jn(t){return"function"==typeof t&&"applyToOptions"in t}class Qn extends vn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=s,this.options=t,tt("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return Jn(t)&&Xn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Zn(e,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=fn(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ht(Number(t))}get time(){return ht(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ut(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Hn()?(this.animation.timeline=t,ot):e(this)}}const ti={anticipate:Ct,backInOut:St,circInOut:kt};function ei(t){"string"==typeof t.ease&&t.ease in ti&&(t.ease=ti[t.ease])}class ni extends Qn{constructor(t){ei(t),yn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new bn({...s,autoplay:!1}),a=ut(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const ii=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Se.test(t)&&"0"!==t||t.startsWith("url(")));function ri(t){return it(t)&&"offsetHeight"in t}const si=new Set(["opacity","clipPath","filter","transform"]),oi=st(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ai extends vn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s="loop",keyframes:o,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wt.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:s,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||Un;this.keyframeResolver=new h(o,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:s,velocity:o,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Wt.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const s=t[t.length-1],o=ii(r,e),a=ii(s,e);return Q(o===a,`You are trying to animate ${e} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Jn(n))&&i)}(t,r,s,o)||(!et.instantAnimations&&a||c?.(fn(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:s,type:o}=t;if(!ri(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return oi()&&n&&si.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==r&&0!==s&&"inertia"!==o}(d)?new ni({...d,element:d.motionValue.owner.current}):new bn(d);u.finished.then(()=>this.notifyFinished()).catch(ot),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),In=!0,Wn(),$n(),In=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const li=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ci(t,e,n=1){tt(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,r]=function(t){const e=li.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const t=s.trim();return nt(t)?parseFloat(t):t}return Yt(r)?ci(r,e,n+1):r}function di(t,e){return t?.[e]??t?.default??t}const ui=new Set(["width","height","top","left","right","bottom",...Vn]),hi=t=>e=>e.test(t),mi=[Kt,le,ae,oe,de,ce,{test:t=>"auto"===t,parse:t=>t}],pi=t=>mi.find(hi(t));function fi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||rt(t))}const gi=new Set(["brightness","contrast","saturate","opacity"]);function yi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Jt)||[];if(!i)return t;const r=n.replace(i,"");let s=gi.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const vi=/\b([a-z-]*)\(.*?\)/gu,xi={...Se,getAnimatableNone:t=>{const e=t.match(vi);return e?e.map(yi).join(" "):t}},bi={...Kt,transform:Math.round},wi={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,backgroundPositionX:le,backgroundPositionY:le,...{rotate:oe,rotateX:oe,rotateY:oe,rotateZ:oe,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:oe,skewX:oe,skewY:oe,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:qt,originX:ue,originY:ue,originZ:le},zIndex:bi,fillOpacity:qt,strokeOpacity:qt,numOctaves:bi},Si={...wi,color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:xi,WebkitFilter:xi},Ci=t=>Si[t];function Ti(t,e){let n=Ci(t);return n!==xi&&(n=Se),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Pi=new Set(["auto","none","0"]);class ki extends Un{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Yt(i))){const r=ci(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ui.has(n)||2!==t.length)return;const[i,r]=t,s=pi(i),o=pi(r);if(s!==o)if(Ln(s)&&Ln(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Bn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||fi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Pi.has(e)&&ve(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=Ti(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Bn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,s=n[r];n[r]=Bn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ei=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ni{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Wt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Wt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&ft(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new dt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Bt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return mt(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(t,e){return new Ni(t,e)}const{schedule:Mi,cancel:Vi}=jt(queueMicrotask,!1),Di={x:!1,y:!1};function Li(){return Di.x||Di.y}function Ri(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=n?.[t]??i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function ji(t){return!("touch"===t.pointerType||Li())}const Bi=(t,e)=>!!e&&(t===e||Bi(t,e.parentElement)),Fi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Oi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const zi=new WeakSet;function Ii(t){return e=>{"Enter"===e.key&&t(e)}}function $i(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Wi(t){return Fi(t)&&!Li()}function Ui(t,e,n={}){const[i,r,s]=Ri(t,n),o=t=>{const i=t.currentTarget;if(!Wi(t))return;zi.add(i);const s=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),zi.has(i)&&zi.delete(i),Wi(t)&&"function"==typeof s&&s(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||Bi(i,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),ri(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ii(()=>{if(zi.has(n))return;$i(n,"down");const t=Ii(()=>{$i(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>$i(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),e=t,Oi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}function Hi(t){return it(t)&&"ownerSVGElement"in t}const _i=t=>Boolean(t&&t.getVelocity),Yi=[...mi,me,Se],Xi=s({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ki extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ri(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qi({children:e,isPresent:n,anchorX:r}){const s=c(),a=o(null),l=o({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=d(Xi);return u(()=>{const{width:t,height:e,top:i,left:o,right:c}=l.current;if(n||!a.current||!t||!e)return;const d="left"===r?`left: ${o}`:`right: ${c}`;a.current.dataset.motionPopId=s;const u=document.createElement("style");return h&&(u.nonce=h),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(u)&&document.head.removeChild(u)}},[n]),t(Ki,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Gi=({children:e,initial:n,isPresent:r,onExitComplete:s,custom:o,presenceAffectsLayout:a,mode:l,anchorX:d})=>{const u=Y(Zi),m=c();let p=!0,f=h(()=>(p=!1,{id:m,initial:n,isPresent:r,custom:o,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;s&&s()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[r,u,s]);return a&&p&&(f={...f}),h(()=>{u.forEach((t,e)=>u.set(e,!1))},[r]),i.useEffect(()=>{!r&&!u.size&&s&&s()},[r]),"popLayout"===l&&(e=t(qi,{isPresent:r,anchorX:d,children:e})),t(q.Provider,{value:f,children:e})};function Zi(){return new Map}function Ji(t=!0){const e=d(q);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=c();l(()=>{if(t)return r(s)},[t]);const o=m(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,o]:[!0]}const Qi=t=>t.key||"";function tr(t){const e=[];return p.forEach(t,t=>{f(t)&&e.push(t)}),e}const er=({children:e,custom:i,initial:r=!0,onExitComplete:s,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:u="left"})=>{const[m,p]=Ji(c),f=h(()=>tr(e),[e]),y=c&&!m?[]:f.map(Qi),v=o(!0),x=o(f),b=Y(()=>new Map),[w,S]=g(f),[C,T]=g(f);K(()=>{v.current=!1,x.current=f;for(let t=0;t<C.length;t++){const e=Qi(C[t]);y.includes(e)?b.delete(e):!0!==b.get(e)&&b.set(e,!1)}},[C,y.length,y.join("-")]);const P=[];if(f!==w){let t=[...f];for(let e=0;e<C.length;e++){const n=C[e],i=Qi(n);y.includes(i)||(t.splice(e,0,n),P.push(n))}return"wait"===l&&P.length&&(t=P),T(tr(t)),S(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&C.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:k}=d(_);return t(n,{children:C.map(e=>{const n=Qi(e),o=!(c&&!m)&&(f===C||y.includes(n));return t(Gi,{isPresent:o,initial:!(v.current&&!r)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:o?void 0:()=>{if(!b.has(n))return;b.set(n,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(k?.(),T(x.current),c&&p?.(),s&&s())},anchorX:u,children:e},n)})})},nr=s({strict:!1}),ir={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},rr={};for(const t in ir)rr[t]={isEnabled:e=>ir[t].some(t=>!!e[t])};const sr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function or(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||sr.has(t)}let ar=t=>!or(t);try{"function"==typeof(lr=require("@emotion/is-prop-valid").default)&&(ar=t=>t.startsWith("on")?!or(t):lr(t))}catch{}var lr;function cr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&ft(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const dr=s({});function ur(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function hr(t){return"string"==typeof t||Array.isArray(t)}const mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pr=["initial",...mr];function fr(t){return ur(t.animate)||pr.some(e=>hr(t[e]))}function gr(t){return Boolean(fr(t)||t.variants)}function yr(t){const{initial:e,animate:n}=function(t,e){if(fr(t)){const{initial:e,animate:n}=t;return{initial:!1===e||hr(e)?e:void 0,animate:hr(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,d(dr));return h(()=>({initial:e,animate:n}),[vr(e),vr(n)])}function vr(t){return Array.isArray(t)?t.join(" "):t}const xr=Symbol.for("motionComponentSymbol");function br(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function wr(t,e,n){return m(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):br(n)&&(n.current=i))},[e])}const Sr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cr="data-"+Sr("framerAppearId"),Tr=s({});function Pr(t,e,n,i,r){const{visualElement:s}=d(dr),a=d(nr),c=d(q),h=d(Xi).reducedMotion,m=o(null);i=i||a.renderer,!m.current&&i&&(m.current=i(t,{visualState:e,parent:s,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=m.current,f=d(Tr);!p||p.projection||!r||"html"!==p.type&&"svg"!==p.type||function(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:kr(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:Boolean(o)||a&&br(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:c})}(m.current,n,r,f);const g=o(!1);u(()=>{p&&g.current&&p.update(n,c)});const y=n[Cr],v=o(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return K(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Mi.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),l(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),p}function kr(t){if(t)return!1!==t.options.allowProjection?t.projection:kr(t.parent)}function Er({preloadedFeatures:n,createVisualElement:i,useRender:r,useVisualState:s,Component:o}){function a(a,l){let c;const u={...d(Xi),...a,layoutId:Nr(a)},{isStatic:h}=u,m=yr(a),p=s(a,h);if(!h&&X){!function(t,e){const n=d(nr).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Q(!1,e):tt(!1,e)}}(u,n);const t=function(t){const{drag:e,layout:n}=rr;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,m.visualElement=Pr(o,p,u,i,t.ProjectionNode)}return e(dr.Provider,{value:m,children:[c&&m.visualElement?t(c,{visualElement:m.visualElement,...u}):null,r(o,a,wr(p,m.visualElement,l),p,h,m.visualElement)]})}n&&function(t){for(const e in t)rr[e]={...rr[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const l=y(a);return l[xr]=o,l}function Nr({layoutId:t}){const e=d(_).id;return e&&void 0!==t?e+"-"+t:t}const Ar={};function Mr(t,{layout:e,layoutId:n}){return Dn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ar[t]||"opacity"===t)}const Vr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dr=Vn.length;function Lr(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Dn.has(t))o=!0;else if(Ht(t))r[t]=n;else{const e=Ei(n,wi[t]);t.startsWith("origin")?(a=!0,s[t]=e):i[t]=e}}if(e.transform||(o||n?i.transform=function(t,e,n){let i="",r=!0;for(let s=0;s<Dr;s++){const o=Vn[s],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Ei(a,wi[o]);l||(r=!1,i+=`${Vr[o]||o}(${t}) `),n&&(e[o]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=s;i.transformOrigin=`${t} ${e} ${n}`}}const Rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jr(t,e,n){for(const i in e)_i(e[i])||Mr(i,n)||(t[i]=e[i])}function Br(t,e){const n={};return jr(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return h(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Lr(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Fr(t,e){const n={},i=Br(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},zr={offset:"strokeDashoffset",array:"strokeDasharray"};function Ir(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,d){if(Lr(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:h}=t;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?Or:zr;t[s.offset]=le.transform(-i);const o=le.transform(e),a=le.transform(n);t[s.array]=`${o} ${a}`}(u,r,s,o,!1)}const $r=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Wr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ur(t,e,n,i){const r=h(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ir(n,e,Wr(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};jr(e,t.style,t),r.style={...e,...r.style}}return r}const Hr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _r(t){return"string"==typeof t&&!t.includes("-")&&!!(Hr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Yr(t=!1){return(e,n,i,{latestValues:r},s)=>{const o=(_r(e)?Ur:Fr)(n,r,s,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(ar(r)||!0===n&&or(r)||!e&&!or(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...o,ref:i}:{},{children:c}=n,d=h(()=>_i(c)?c.get():c,[c]);return x(e,{...l,children:d})}}function Xr(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Kr(t,e,n,i){if("function"==typeof e){const[r,s]=Xr(i);e=e(void 0!==n?n:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,s]=Xr(i);e=e(void 0!==n?n:t.custom,r,s)}return e}function qr(t){return _i(t)?t.get():t}const Gr=t=>(e,n)=>{const i=d(dr),r=d(q),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:Zr(n,i,r,t),renderState:e()}}(t,e,i,r);return n?s():Y(s)};function Zr(t,e,n,i){const r={},s=i(t,{});for(const t in s)r[t]=qr(s[t]);let{initial:o,animate:a}=t;const l=fr(t),c=gr(t);e&&c&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const u=d?a:o;if(u&&"boolean"!=typeof u&&!ur(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Kr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}function Jr(t,e,n){const{style:i}=t,r={};for(const s in i)(_i(i[s])||e.style&&_i(e.style[s])||Mr(s,t)||void 0!==n?.getValue(s)?.liveStyle)&&(r[s]=i[s]);return r}const Qr={useVisualState:Gr({scrapeMotionValuesFromProps:Jr,createRenderState:Rr})};function ts(t,e,n){const i=Jr(t,e,n);for(const n in t)if(_i(t[n])||_i(e[n])){i[-1!==Vn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const es={useVisualState:Gr({scrapeMotionValuesFromProps:ts,createRenderState:$r})};function ns(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Er({..._r(n)?es:Qr,preloadedFeatures:t,useRender:Yr(i),createVisualElement:e,Component:n})}}function is(t,e,n){const i=t.getProps();return Kr(i,e,void 0!==n?n:i.custom,t)}const rs=t=>Array.isArray(t);function ss(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function os(t){return rs(t)?t[t.length-1]||0:t}function as(t,e){const n=t.getValue("willChange");if(i=n,Boolean(_i(i)&&i.add))return n.add(e);if(!n&&et.WillChange){const n=new et.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function ls(t){return t.props[Cr]}const cs=t=>null!==t;const ds={type:"spring",stiffness:500,damping:25,restSpeed:10},us={type:"keyframes",duration:.8},hs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ms=(t,{keyframes:e})=>e.length>2?us:Dn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ds:hs;const ps=(t,e,n,i={},r,s)=>o=>{const a=di(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=ut(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||Object.assign(d,ms(t,d)),d.duration&&(d.duration=ut(d.duration)),d.repeatDelay&&(d.repeatDelay=ut(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),(et.instantAnimations||et.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!s&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(cs),s=e&&"loop"!==n&&e%2==1?0:r.length-1;return s&&void 0!==i?i:r[s]}(d.keyframes,a);if(void 0!==t)return void Bt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new bn(d):new ai(d)};function fs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gs(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(s=i);const l=[],c=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||c&&fs(c,e))continue;const o={delay:n,...di(s||{},e)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(r)&&r===d&&!o.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=ls(t);if(n){const t=window.MotionHandoffAnimation(n,e,Bt);null!==t&&(o.startTime=t,u=!0)}}as(t,e),i.start(ps(e,i,r,t.shouldReduceMotion&&ui.has(e)?{type:!1}:o,t,u));const h=i.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{Bt.update(()=>{o&&function(t,e){const n=is(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const e in s)ss(t,e,os(s[e]))}(t,o)})}),l}function ys(t,e,n={}){const i=is(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>Promise.all(gs(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,i=0,r=1,s){const o=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(vs).forEach((t,i)=>{t.notify("AnimationStart",e),o.push(ys(t,e,{...s,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,s+i,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[s,o]:[o,s];return t().then(()=>e())}return Promise.all([s(),o(n.delay)])}function vs(t,e){return t.sortNodePosition(e)}function xs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const bs=pr.length;function ws(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&ws(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<bs;n++){const i=pr[n],r=t.props[i];(hr(r)||!1===r)&&(e[i]=r)}return e}const Ss=[...mr].reverse(),Cs=mr.length;function Ts(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>ys(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=ys(t,e,n);else{const r="function"==typeof e?is(t,e,n.custom):e;i=Promise.all(gs(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Ps(t){let e=Ts(t),n=Ns(),i=!0;const r=e=>(n,i)=>{const r=is(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function s(s){const{props:o}=t,a=ws(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<Cs;e++){const h=Ss[e],m=n[h],p=void 0!==o[h]?o[h]:a[h],f=hr(p),g=h===s?m.isActive:null;!1===g&&(u=e);let y=p===a[h]&&p!==o[h]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...d},!m.isActive&&null===g||!p&&!m.prevProp||ur(p)||"boolean"==typeof p)continue;const v=ks(m.prevProp,p);let x=v||h===s&&m.isActive&&!y&&f||e>u&&f,b=!1;const w=Array.isArray(p)?p:[p];let S=w.reduce(r(h),{});!1===g&&(S={});const{prevResolvedValues:C={}}=m,T={...C,...S},P=e=>{x=!0,c.has(e)&&(b=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=S[t],n=C[t];if(d.hasOwnProperty(t))continue;let i=!1;i=rs(e)&&rs(n)?!xs(e,n):e!==n,i?null!=e?P(t):c.add(t):void 0!==e&&c.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=S,m.isActive&&(d={...d,...S}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||b)&&l.push(...w.map(t=>({animation:t,options:{type:h}})))}if(c.size){const e={};if("boolean"!=typeof o.initial){const n=is(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=s(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ns(),i=!0}}}function ks(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!xs(e,t)}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ns(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class As{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Ms=0;const Vs={animation:{Feature:class extends As{constructor(t){super(t),t.animationState||(t.animationState=Ps(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ur(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends As{constructor(){super(...arguments),this.id=Ms++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ds(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Ls(t){return{point:{x:t.pageX,y:t.pageY}}}function Rs(t,e,n,i){return Ds(t,e,(t=>e=>Fi(e)&&t(e,Ls(e)))(n),i)}function js({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bs(t){return t.max-t.min}function Fs(t,e,n,i=.5){t.origin=i,t.originPoint=Pe(e.min,e.max,t.origin),t.scale=Bs(n)/Bs(e),t.translate=Pe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Os(t,e,n,i){Fs(t.x,e.x,n.x,i?i.originX:void 0),Fs(t.y,e.y,n.y,i?i.originY:void 0)}function zs(t,e,n){t.min=n.min+e.min,t.max=t.min+Bs(e)}function Is(t,e,n){t.min=e.min-n.min,t.max=t.min+Bs(e)}function $s(t,e,n){Is(t.x,e.x,n.x),Is(t.y,e.y,n.y)}const Ws=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Us(t){return[t("x"),t("y")]}function Hs(t){return void 0===t||1===t}function _s({scale:t,scaleX:e,scaleY:n}){return!Hs(t)||!Hs(e)||!Hs(n)}function Ys(t){return _s(t)||Xs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xs(t){return Ks(t.x)||Ks(t.y)}function Ks(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function Gs(t,e,n,i,r){return void 0!==r&&(t=qs(t,r,i)),qs(t,n,i)+e}function Zs(t,e=0,n=1,i,r){t.min=Gs(t.min,e,n,i,r),t.max=Gs(t.max,e,n,i,r)}function Js(t,{x:e,y:n}){Zs(t.x,e.translate,e.scale,e.originPoint),Zs(t.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,to=1.0000000000001;function eo(t,e){t.min=t.min+e,t.max=t.max+e}function no(t,e,n,i,r=.5){Zs(t,e,n,Pe(t.min,t.max,r),i)}function io(t,e){no(t.x,e.x,e.scaleX,e.scale,e.originX),no(t.y,e.y,e.scaleY,e.scale,e.originY)}function ro(t,e){return js(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const so=({current:t})=>t?t.ownerDocument.defaultView:null,oo=(t,e)=>Math.abs(t-e);class ao{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=uo(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=oo(t.x,e.x),i=oo(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Ot;this.history.push({...i,timestamp:r});const{onStart:s,onMove:o}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=lo(e,this.transformPagePoint),Bt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=uo("pointercancel"===t.type?this.lastMoveEventInfo:lo(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Fi(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const s=lo(Ls(t),this.transformPagePoint),{point:o}=s,{timestamp:a}=Ot;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,uo(s,this.history)),this.removeListeners=lt(Rs(this.contextWindow,"pointermove",this.handlePointerMove),Rs(this.contextWindow,"pointerup",this.handlePointerUp),Rs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ft(this.updatePoint)}}function lo(t,e){return e?{point:e(t.point)}:t}function co(t,e){return{x:t.x-e.x,y:t.y-e.y}}function uo({point:t},e){return{point:t,delta:co(t,mo(e)),offset:co(t,ho(e)),velocity:po(e,.1)}}function ho(t){return t[0]}function mo(t){return t[t.length-1]}function po(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=mo(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>ut(e)));)n--;if(!i)return{x:0,y:0};const s=ht(r.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fo(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function go(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const yo=.35;function vo(t,e,n){return{min:xo(t,e),max:xo(t,n)}}function xo(t,e){return"number"==typeof t?t:t[e]||0}const bo=new WeakMap;class wo{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ao(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ls(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(s=n)||"y"===s?Di[s]?null:(Di[s]=!0,()=>{Di[s]=!1}):Di.x||Di.y?null:(Di.x=Di.y=!0,()=>{Di.x=Di.y=!1}),!this.openDragLock))return;var s;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Us(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ae.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Bs(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),r&&Bt.postRender(()=>r(t,e)),as(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(o),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Us(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:so(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&Bt.postRender(()=>r(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!So(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Pe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Pe(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&br(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:fo(t.x,n,r),y:fo(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=yo){return!1===t?t=0:!0===t&&(t=yo),{x:vo(t,"left","right"),y:vo(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Us(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!br(t))return!1;const n=t.current;tt(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=ro(t,n),{scroll:r}=e;return r&&(eo(i.x,r.offset.x),eo(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:go(t.x,e.x),y:go(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=js(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Us(o=>{if(!So(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[o]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return as(this.visualElement,t),n.start(ps(t,n,0,e,this.visualElement,!1))}stopAnimation(){Us(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Us(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Us(e=>{const{drag:n}=this.getProps();if(!So(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e];r.set(t[e]-Pe(n,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!br(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Us(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Bs(t),r=Bs(e);return r>i?n=ct(e.min,e.max-i,t.min):i>r&&(n=ct(t.min,t.max-r,e.min)),J(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Us(e=>{if(!So(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];n.set(Pe(r,s,i[e]))})}addListeners(){if(!this.visualElement.current)return;bo.set(this.visualElement,this);const t=Rs(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();br(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Bt.read(e);const r=Ds(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Us(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:s=yo,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function So(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Co=t=>(e,n)=>{t&&Bt.postRender(()=>t(e,n))};const To={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Po(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ko={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!le.test(t))return t;t=parseFloat(t)}return`${Po(t,e.target.x)}% ${Po(t,e.target.y)}%`}},Eo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Se.parse(t);if(r.length>5)return i;const s=Se.createTransformer(t),o="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=Pe(a,l,.5);return"number"==typeof r[2+o]&&(r[2+o]/=c),"number"==typeof r[3+o]&&(r[3+o]/=c),s(r)}};class No extends b{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;!function(t){for(const e in t)Ar[e]=t[e],Ht(e)&&(Ar[e].isCSSVariable=!0)}(Mo),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),To.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:s}=n;return s?(s.isPresent=r,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?s.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?s.promote():s.relegate()||Bt.postRender(()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ao(e){const[n,i]=Ji(),r=d(_);return t(No,{...e,layoutGroup:r,switchLayoutGroup:d(Tr),isPresent:n,safeToRemove:i})}const Mo={borderRadius:{...ko,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomLeftRadius:ko,borderBottomRightRadius:ko,boxShadow:Eo};const Vo=(t,e)=>t.depth-e.depth;class Do{constructor(){this.children=[],this.isDirty=!1}add(t){G(this.children,t),this.isDirty=!0}remove(t){Z(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vo),this.isDirty=!1,this.children.forEach(t)}}const Lo=["TopLeft","TopRight","BottomLeft","BottomRight"],Ro=Lo.length,jo=t=>"string"==typeof t?parseFloat(t):t,Bo=t=>"number"==typeof t||le.test(t);function Fo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Oo=Io(0,.5,Pt),zo=Io(.5,.95,ot);function Io(t,e,n){return i=>i<t?0:i>e?1:n(ct(t,e,i))}function $o(t,e){t.min=e.min,t.max=e.max}function Wo(t,e){$o(t.x,e.x),$o(t.y,e.y)}function Uo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ho(t,e,n,i,r){return t=qs(t-=e,1/n,i),void 0!==r&&(t=qs(t,1/r,i)),t}function _o(t,e,[n,i,r],s,o){!function(t,e=0,n=1,i=.5,r,s=t,o=t){ae.test(e)&&(e=parseFloat(e),e=Pe(o.min,o.max,e/100)-o.min);if("number"!=typeof e)return;let a=Pe(s.min,s.max,i);t===s&&(a-=e),t.min=Ho(t.min,e,n,a,r),t.max=Ho(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,s,o)}const Yo=["x","scaleX","originX"],Xo=["y","scaleY","originY"];function Ko(t,e,n,i){_o(t.x,e,Yo,n?n.x:void 0,i?i.x:void 0),_o(t.y,e,Xo,n?n.y:void 0,i?i.y:void 0)}function qo(t){return 0===t.translate&&1===t.scale}function Go(t){return qo(t.x)&&qo(t.y)}function Zo(t,e){return t.min===e.min&&t.max===e.max}function Jo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Qo(t,e){return Jo(t.x,e.x)&&Jo(t.y,e.y)}function ta(t){return Bs(t.x)/Bs(t.y)}function ea(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class na{constructor(){this.members=[]}add(t){G(this.members,t),t.scheduleRender()}remove(t){if(Z(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ia=["","X","Y","Z"],ra={visibility:"hidden"};let sa=0;function oa(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function aa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ls(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Bt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&aa(i)}function la({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=sa++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ua),this.nodes.forEach(va),this.nodes.forEach(xa),this.nodes.forEach(ha)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Do)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new dt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=Hi(e)&&!(Hi(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Wt.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(Ft(i),t(s-e))};return Bt.setup(i,!0),()=>Ft(i)}(i,250),To.hasAnimatedSinceResize&&(To.hasAnimatedSinceResize=!1,this.nodes.forEach(ya))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Pa,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Qo(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...di(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||ya(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ft(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ba),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(pa);this.isUpdating||this.nodes.forEach(fa),this.isUpdating=!1,this.nodes.forEach(ga),this.nodes.forEach(ca),this.nodes.forEach(da),this.clearAllSnapshots();const t=Wt.now();Ot.delta=J(0,1e3/60,t-Ot.timestamp),Ot.timestamp=t,Ot.isProcessing=!0,zt.update.process(Ot),zt.preRender.process(Ot),zt.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ma),this.sharedNodes.forEach(wa)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Bs(this.snapshot.measuredBox.x)||Bs(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Go(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Ys(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Na((i=n).x),Na(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ma))){const{scroll:t}=this.root;t&&(eo(e.x,t.offset.x),eo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Wo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:s}=i;i!==this.root&&r&&s.layoutScroll&&(r.wasRoot&&Wo(e,t),eo(e.x,r.offset.x),eo(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Wo(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&io(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Ys(i.latestValues)&&io(n,i.latestValues)}return Ys(this.latestValues)&&io(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Wo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Ys(n.latestValues))continue;_s(n.latestValues)&&n.updateSnapshot();const i=Ws();Wo(i,n.measurePageBox()),Ko(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Ys(this.latestValues)&&Ko(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Ot.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$s(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,o,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,a=this.relativeParent.target,zs(s.x,o.x,a.x),zs(s.y,o.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Wo(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):Wo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$s(this.relativeTargetOrigin,this.target,t.target),Wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!_s(this.parent.latestValues)&&!Xs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;Wo(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,o=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let s,o;e.x=e.y=1;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:r}=s.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&io(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Js(t,o)),i&&Ys(s.latestValues)&&io(t,s.latestValues))}e.x<to&&e.x>Qs&&(e.x=1),e.y<to&&e.y>Qs&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Uo(this.prevProjectionDelta.x,this.projectionDelta.x),Uo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Os(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===s&&this.treeScale.y===o&&ea(this.projectionDelta.x,this.prevProjectionDelta.x)&&ea(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const o={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ta));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,m,p,f,g;Sa(s.x,t.x,n),Sa(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($s(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=n,Ca(m.x,p.x,f.x,g),Ca(m.y,p.y,f.y,g),u&&(l=this.relativeTarget,h=u,Zo(l.x,h.x)&&Zo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Wo(u,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,s){r?(t.opacity=Pe(0,n.opacity??1,Oo(i)),t.opacityExit=Pe(e.opacity??1,0,zo(i))):s&&(t.opacity=Pe(e.opacity??1,n.opacity??1,i));for(let r=0;r<Ro;r++){const s=`border${Lo[r]}Radius`;let o=Fo(e,s),a=Fo(n,s);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Bo(o)===Bo(a)?(t[s]=Math.max(Pe(jo(o),jo(a),i),0),(ae.test(a)||ae.test(o))&&(t[s]+="%")):t[s]=a)}(e.rotate||n.rotate)&&(t.rotate=Pe(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bt.update(()=>{To.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=_i(t)?t:Ai(t);return i.start(ps("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Bs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Bs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Wo(e,n),io(e,r),Os(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new na);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&oa("z",t,i,this.animationValues);for(let e=0;e<ia.length;e++)oa(`rotate${ia[e]}`,t,i,this.animationValues),oa(`skew${ia[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ra;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=qr(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=qr(t?.pointerEvents)||""),this.hasProjected&&!Ys(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const r=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=n?.z||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:s,skewX:o,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),s&&(i+=`rotateY(${s}deg) `),o&&(i+=`skewX(${o}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),n&&(e.transform=n(r,e.transform));const{x:s,y:o}=this.projectionDelta;e.transformOrigin=`${100*s.origin}% ${100*o.origin}% 0`,i.animationValues?e.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:e.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in Ar){if(void 0===r[t])continue;const{correct:n,applyTo:s,isCSSVariable:o}=Ar[t],a="none"===e.transform?r[t]:n(r[t],i);if(s){const t=s.length;for(let n=0;n<t;n++)e[s[n]]=a}else o?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?qr(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(pa),this.root.sharedNodes.clear()}}}function ca(t){t.updateLayout()}function da(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,s=e.source!==t.layout.source;"size"===r?Us(t=>{const i=s?e.measuredBox[t]:e.layoutBox[t],r=Bs(i);i.min=n[t].min,i.max=i.min+r}):Aa(r,e.layoutBox,n)&&Us(i=>{const r=s?e.measuredBox[i]:e.layoutBox[i],o=Bs(n[i]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Os(o,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?Os(a,t.applyTransform(i,!0),e.measuredBox):Os(a,n,e.layoutBox);const l=!Go(o);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:s}=i;if(r&&s){const o={x:{min:0,max:0},y:{min:0,max:0}};$s(o,e.layoutBox,r.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};$s(a,n,s.layoutBox),Qo(o,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ua(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ha(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ma(t){t.clearSnapshot()}function pa(t){t.clearMeasurements()}function fa(t){t.isLayoutDirty=!1}function ga(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ya(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function va(t){t.resolveTargetDelta()}function xa(t){t.calcProjection()}function ba(t){t.resetSkewAndRotation()}function wa(t){t.removeLeadSnapshot()}function Sa(t,e,n){t.translate=Pe(e.translate,0,n),t.scale=Pe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ca(t,e,n,i){t.min=Pe(e.min,n.min,i),t.max=Pe(e.max,n.max,i)}function Ta(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Pa={duration:.45,ease:[.4,0,.1,1]},ka=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ea=ka("applewebkit/")&&!ka("chrome/")?Math.round:ot;function Na(t){t.min=Ea(t.min),t.max=Ea(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=ta(e),r=ta(n),s=.2,!(Math.abs(i-r)<=s));var i,r,s}function Ma(t){return t!==t.root&&t.scroll?.wasRoot}const Va=la({attachResizeListener:(t,e)=>Ds(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Da={current:void 0},La=la({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Da.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Da.current=t}return Da.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ra={pan:{Feature:class extends As{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new ao(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:so(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Co(t),onStart:Co(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Bt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends As{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new wo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:La,MeasureLayout:Ao}};function ja(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&Bt.postRender(()=>r(e,Ls(e)))}function Ba(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&Bt.postRender(()=>r(e,Ls(e)))}const Fa=new WeakMap,Oa=new WeakMap,za=t=>{const e=Fa.get(t.target);e&&e(t)},Ia=t=>{t.forEach(za)};function $a(t,e,n){const i=function({root:t,...e}){const n=t||document;Oa.has(n)||Oa.set(n,{});const i=Oa.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Ia,{root:t,...e})),i[r]}(e);return Fa.set(t,n),i.observe(t),()=>{Fa.delete(t),i.unobserve(t)}}const Wa={some:0,all:1};const Ua={inView:{Feature:class extends As{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Wa[i]};return $a(this.node.current,s,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends As{mount(){const{current:t}=this.node;t&&(this.unmount=Ui(t,(t,e)=>(Ba(this.node,e,"Start"),(t,{success:e})=>Ba(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends As{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(Ds(this.node.current,"focus",()=>this.onFocus()),Ds(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends As{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,s]=Ri(t,n),o=t=>{if(!ji(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const s=t=>{ji(t)&&(i(t),n.removeEventListener("pointerleave",s))};n.addEventListener("pointerleave",s,r)};return i.forEach(t=>{t.addEventListener("pointerenter",o,r)}),s}(t,(t,e)=>(ja(this.node,e,"Start"),t=>ja(this.node,t,"End"))))}unmount(){}}}},Ha={layout:{ProjectionNode:La,MeasureLayout:Ao}},_a={current:null},Ya={current:!1};function Xa(){if(Ya.current=!0,X)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_a.current=t.matches;t.addListener(e),e()}else _a.current=!1}const Ka=new WeakMap;const qa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ga{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Un,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Wt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Bt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=fr(e),this.isVariantNode=gr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==a[t]&&_i(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Ka.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ya.current||Xa(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||_a.current),"production"!==process.env.NODE_ENV&&ft(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Dn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Bt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rr){const e=rr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<qa.length;e++){const n=qa[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],s=n[i];if(_i(r))t.addValue(i,r);else if(_i(s))t.addValue(i,Ai(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(nt(n)||rt(n))?n=parseFloat(n):(i=n,!Yi.find(hi(i))&&Se.test(e)&&(n=Ti(t,e))),this.setBaseTarget(t,_i(n)?n.get():n)),_i(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Kr(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||_i(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new dt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Za extends Ga{constructor(){super(...arguments),this.KeyframeResolver=ki}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_i(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ja(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class Qa extends Za{constructor(){super(...arguments),this.type="html",this.renderInstance=Ja}readValueFromInstance(t,e){if(Dn.has(e))return this.projection?.isProjecting?Nn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),r=(Ht(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ro(t,e)}build(t,e,n){Lr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Jr(t,e,n)}}const tl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class el extends Za{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ws}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Dn.has(e)){const t=Ci(e);return t&&t.default||0}return e=tl.has(e)?e:Sr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ts(t,e,n)}build(t,e,n){Ir(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ja(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(tl.has(n)?n:Sr(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Wr(t.tagName),super.mount(t)}}const nl=(t,e)=>_r(t)?new el(e):new Qa(e,{allowProjection:t!==v}),il=cr(ns({...Vs,...Ua,...Ra,...Ha},nl));function rl(){!Ya.current&&Xa();const[t]=g(_a.current);return"production"!==process.env.NODE_ENV&&ft(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),t}const sl=({isOpen:i,onClose:r,onToggle:s,menuItems:a,logoUrl:c,logoAlt:d="Logo",systemName:u="PASS",defaultLogoUrl:m,dashboardPath:p,className:f="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:y="fixed inset-0 bg-black bg-opacity-25 z-40",desktopMenuClassName:v="h-full flex flex-col",showBottomMenu:x=!0,bottomMenuItems:b=[{id:"settings",label:"Configuración",icon:W,action:()=>{}},{id:"help",label:"Ayuda",icon:z,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:I,action:()=>{}}],activePath:w="",onNavigate:S,children:C,performanceMode:T="auto",fpsThreshold:P,fpsSampleSize:k,compatibilityMode:E=!1,onPerformanceModeChange:N})=>{const[A,M]=g(new Set),{effectiveMode:V}=function({mode:t="auto",fpsThreshold:e=45,fpsSampleSize:n=90,compatibilityFlag:i=!1,onModeChange:r}={}){const[s,a]=g(!1),[c,d]=g(!1),u=o("full");l(()=>{if("undefined"==typeof window||"full"===t||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>a(e.matches);return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[t]),l(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||s||i)return;let r=0,o=0,a=performance.now(),l=null;const c=Math.min(Math.max(30,n),240),u=t=>{const n=t-a;a=t,r>0&&(o+=1e3/n),r+=1,r>=c?o/(r-1||1)<e&&d(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,s,i,n,e]);const m=h(()=>"full"===t||"lite"===t?t:i||s||c?"lite":"full",[t,i,s,c]);return l(()=>{r?u.current!==m&&(r(m),u.current=m):u.current=m},[m,r]),{effectiveMode:m,prefersReducedMotion:s,detectedLowPerformance:c,compatibilityFlag:i}}({mode:T,fpsThreshold:P,fpsSampleSize:k,compatibilityFlag:E,onModeChange:N}),D="lite"===V,L=h(()=>D?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:i?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[D,i]),R=h(()=>D?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[D]),j="string"==typeof m&&""!==m.trim()?m:void 0,B="string"==typeof c&&""!==c.trim()?c:j,$=t=>w.includes(t),H=t=>{S&&S(t),r()},_=(n,i=!1)=>e(il.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${i?"pr-4 pl-10":"px-4"} ${$(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>H(n.path),children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(O,{className:"w-4 h-4 transition-transform "+($(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),Y=n=>{const i=A.has(n.id);return e("div",{className:"mb-2",children:[e(il.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void M(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(F,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),D?i&&t("div",{className:"pt-2 space-y-1",children:n.children.map(t=>_(t,!0))}):t(er,{initial:!1,children:i&&t(il.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.22,ease:[.33,1,.68,1]},className:"overflow-hidden pt-2 space-y-1",style:{willChange:"transform, opacity"},children:n.children.map(t=>_(t,!0))},`${n.id}-content`)})]},n.id)},X=e("div",{className:v,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("button",{type:"button",onClick:()=>{p&&H(p)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t("div",{className:"w-8 h-8 flex items-center justify-center",children:B?t("img",{src:B,alt:d,className:"h-full object-contain"}):t("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:u.charAt(0)})})}),t("h1",{className:"text-lg font-bold text-gray-800",children:u})]}),t("button",{onClick:r,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(U,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:a.map(t=>"folder"===t.type?Y(t.data):_(t.data))})}),x&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:b.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),C&&t("div",{className:"p-4 border-t border-gray-200",children:C})]});return e(n,{children:[D?i&&t("div",{className:y,style:R,onClick:r,"data-motion-mode":V}):t(er,{initial:!1,children:i&&t(il.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:y,style:R,onClick:r})}),D?t("div",{className:f,style:L,"data-motion-mode":V,children:X}):t(il.div,{initial:!1,animate:{x:i?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:f,style:L,"data-motion-mode":V,children:X})]})};function ol(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function al(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const ll=t=>{if("85"===t)return"/back85";if("87"===t)return"/back87";if("undefined"!=typeof window){if(window.location.hostname.toLowerCase().includes("seguimiento"))return"/back85"}return"/back87"},cl=(t,e)=>al(void 0,void 0,void 0,function*(){const n=`${ll(t)}/student/downloadExcel/${e||"PASS"}`;return(yield S.get(n,{responseType:"blob"})).data}),dl=(t,e,n)=>al(void 0,void 0,void 0,function*(){const i=`${ll(e)}/student/uploadExcel`,r=new FormData;r.append("receivedExcelFile",t),"85"===e&&n&&r.append("clientName",n);return(yield S.post(i,r,{transformRequest:[t=>t]})).data}),ul=({backend:e,label:n="Descargar Lista de Estudiantes en Excel",fileName:i="students.xlsx",className:r,variant:s="primary",clientName:o,onSuccess:a,onError:l})=>{const[c,d]=g(!1);return t(T,{variant:s,onClick:()=>al(void 0,void 0,void 0,function*(){var t,n,r,s,c,u,h;try{d(!0);let t=o;if("85"===e&&!t){const{value:e}=yield w.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void d(!1);t=e}const n=yield cl(e,t),r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=i,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(r),yield w.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),null==a||a()}catch(e){console.error("Download students excel failed",e);let i="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const o=e;i=null!==(h=null!==(c=null!==(r=null===(n=null===(t=null==o?void 0:o.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.message)&&void 0!==r?r:"string"==typeof(null===(s=null==o?void 0:o.response)||void 0===s?void 0:s.data)?o.response.data:void 0)&&void 0!==c?c:(null===(u=null==o?void 0:o.response)||void 0===u?void 0:u.statusText)?`Error ${o.response.status}: ${o.response.statusText}`:void 0)&&void 0!==h?h:i,yield w.fire({title:"Error en la descarga",text:i,icon:"error",confirmButtonText:"OK"}),null==l||l(e)}finally{d(!1)}}),className:r,children:c?"Descargando...":n})},hl=({backend:i,label:r="Cargar Lista de Estudiantes en Excel",className:s,variant:a="primary",clientName:l,onSuccess:c,onError:d})=>{const u=o(null),[h,m]=g(!1);return e(n,{children:[t(T,{variant:a,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:s,children:h?"Subiendo...":r}),t("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>al(void 0,void 0,void 0,function*(){var e,n,r,s,o,a,h,p;const f=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!f)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(f.name)))if(0!==f.size)try{m(!0);let t=l;if("85"===i&&!t){const{value:e}=yield w.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield dl(f,i,t);let n="El archivo se ha cargado correctamente";(null==e?void 0:e.message)?n=e.message:"string"==typeof e&&(n=e),yield w.fire({title:"¡Carga exitosa!",text:n,icon:"success",confirmButtonText:"OK"}),null==c||c()}catch(t){console.error("Upload students excel failed",t),console.error("Error details:",t);let e="Hubo un problema al subir el archivo";const i=t;e=null!==(p=null!==(a=null!==(s=null===(r=null===(n=null==i?void 0:i.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.message)&&void 0!==s?s:"string"==typeof(null===(o=null==i?void 0:i.response)||void 0===o?void 0:o.data)?i.response.data:void 0)&&void 0!==a?a:(null===(h=null==i?void 0:i.response)||void 0===h?void 0:h.statusText)?`Error ${i.response.status}: ${i.response.statusText}`:void 0)&&void 0!==p?p:e,yield w.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),null==d||d(t)}finally{u.current&&(u.current.value=""),m(!1)}else yield w.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else yield w.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})})})]})},ml=({items:n,selectedItem:i=null,onSelectionChange:r,placeholder:s="Seleccionar elemento",searchPlaceholder:a="Buscar...",className:d="",disabled:u=!1,searchBy:p="both",caseSensitive:f=!1,exactMatch:y=!0,renderItem:v,renderSelectedItem:x})=>{const[b,w]=g(!1),[S,C]=g(""),T=o(null),P=o(null),k=o(null),E=o([]),N=c();l(()=>{const t=t=>{T.current&&!T.current.contains(t.target)&&w(!1)};if(b)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[b]),l(()=>{b&&k.current&&k.current.focus()},[b]),l(()=>{b||C("")},[b]);const A=h(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=f?n:n.toLowerCase();return t.filter(t=>{const e=f?t.name:t.name.toLowerCase(),n=f?t.id:t.id.toLowerCase();if(y)switch(p){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(p){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,S),[n,S,f,y,p]),[M,V]=g(-1),D=m(()=>{w(!1)},[]),L=t=>{var e;r(t),D(),null===(e=P.current)||void 0===e||e.focus()},R=()=>{u||w(!b)},j=m(t=>{A.length&&V(e=>((-1===e?1===t?-1:0:e)+t+A.length)%A.length)},[A.length]);l(()=>{if(b){const t=i?A.findIndex(t=>t.id===i.id):-1;-1!==t?V(t):A.length?V(t=>t>=0&&t<A.length?t:0):V(-1)}else V(-1)},[b,A,i]),l(()=>{if(M<0)return;const t=E.current[M];null==t||t.scrollIntoView({block:"nearest"})},[M]);return E.current=[],e("div",{ref:T,className:`relative w-full ${d}`,onKeyDown:t=>{var e;if(u)return;const n=t.target,i=n===P.current;if(!b)return void(!i||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),R()));if("Escape"===t.key)return t.preventDefault(),D(),void(null===(e=P.current)||void 0===e||e.focus());if(n instanceof HTMLButtonElement)return;const r=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),j(1);break;case"ArrowUp":t.preventDefault(),j(-1);break;case"Enter":M>=0&&M<A.length&&(t.preventDefault(),L(A[M]));break;case" ":case"Spacebar":if(r)break;M>=0&&M<A.length&&(t.preventDefault(),L(A[M]))}},children:[e("div",{ref:P,className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${u?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${b?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:R,role:"button",tabIndex:u?-1:0,"aria-haspopup":"listbox","aria-expanded":b,"aria-disabled":u,children:[t("div",{className:"flex-1 truncate",children:t("span",i?{className:"text-gray-900",children:x?x(i):i.name}:{className:"text-gray-500",children:s})}),e("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!u&&t("button",{type:"button",onClick:t=>{t.stopPropagation(),r(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t("div",{className:"text-gray-400 transition-transform duration-200 "+(b?"rotate-180":""),children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),b&&e("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t("div",{className:"p-2 border-b border-gray-100",children:e("div",{className:"relative",children:[t("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t("input",{ref:k,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:a,value:S,onChange:t=>C(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":N})]})}),t("div",{id:N,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":M>=0?`${N}-option-${M}`:void 0,children:0===A.length?t("div",{className:"px-3 py-2 text-sm text-gray-500",children:S?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):A.map((e,n)=>t("div",{id:`${N}-option-${n}`,ref:t=>{E.current[n]=t},className:"px-3 py-2 text-sm cursor-pointer transition-colors duration-200 border-b border-gray-50 last:border-b-0 "+(M===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>L(e),role:"option","aria-selected":(null==i?void 0:i.id)===e.id,onMouseEnter:()=>V(n),children:v?v(e):t("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},pl=({items:i,selectedItems:r=[],onSelectionChange:s,placeholder:a="Seleccionar elementos",searchPlaceholder:c="Buscar...",className:d="",disabled:u=!1,searchBy:h="both",caseSensitive:m=!1,exactMatch:p=!0,maxSelectedDisplay:f=3,renderItem:y,renderSelectedItem:v,renderSelectedBadge:x})=>{const[b,w]=g(!1),[S,C]=g(""),T=o(null),P=o(null);l(()=>{const t=t=>{T.current&&!T.current.contains(t.target)&&w(!1)};if(b)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[b]),l(()=>{b&&P.current&&P.current.focus()},[b]),l(()=>{b||C("")},[b]);const k=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=m?n:n.toLowerCase();return t.filter(t=>{const e=m?t.name:t.name.toLowerCase(),n=m?t.id:t.id.toLowerCase();if(p)switch(h){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(h){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(i,S),E=t=>r.some(e=>e.id===t.id),N=t=>{s(r.filter(e=>e.id!==t.id))},A=()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),M=()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),V=({item:n,onRemove:i})=>e("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium bg-primary-botech-100 text-primary-botech-800 rounded-md",children:[v?v(n):n.name,t("button",{type:"button",onClick:t=>{t.stopPropagation(),i()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t(A,{})})]}),D=r.slice(0,f),L=r.length-f;return e("div",{ref:T,className:`relative w-full ${d}`,children:[e("div",{className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${u?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${b?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{u||w(!b)},children:[t("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===r.length?t("span",{className:"text-gray-500",children:a}):e(n,{children:[D.map(e=>t("div",{onClick:t=>t.stopPropagation(),children:x?x(e,()=>N(e)):t(V,{item:e,onRemove:()=>N(e)})},e.id)),L>0&&e("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",L," más"]})]})}),e("div",{className:"flex items-center space-x-1 ml-2",children:[r.length>0&&!u&&t("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t(A,{})}),t("div",{className:"text-gray-400 transition-transform duration-200 "+(b?"rotate-180":""),children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),b&&e("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t("div",{className:"p-2 border-b border-gray-100",children:e("div",{className:"relative",children:[t("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t("input",{ref:P,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:c,value:S,onChange:t=>C(t.target.value),onClick:t=>t.stopPropagation()})]})}),r.length>0&&e("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[r.length," elemento(s) seleccionado(s)"]}),t("div",{className:"max-h-60 overflow-auto",children:0===k.length?t("div",{className:"px-3 py-2 text-sm text-gray-500",children:S?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):k.map(n=>{const i=E(n);return e("div",{className:`\n px-3 py-2 text-sm cursor-pointer transition-colors duration-200 \n border-b border-gray-50 last:border-b-0 flex items-center justify-between\n ${i?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{E(t)?s(r.filter(e=>e.id!==t.id)):s([...r,t])})(n),children:[t("div",{className:"flex-1",children:y?y(n):t("span",{className:""+(i?"text-primary-botech-900 font-medium":"text-gray-900"),children:n.name})}),i&&t("div",{className:"ml-2 text-primary-botech-600",children:t(M,{})})]},n.id)})})]})]})};function fl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}function gl(t){return j({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"},child:[]}]})(t)}function yl(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(t)}function vl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(t)}function xl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"},child:[]}]})(t)}function bl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(t)}function wl(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(t)}function Sl(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z"},child:[]}]})(t)}function Cl(t){return j({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(t)}function Tl(t){return j({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"},child:[]}]})(t)}function Pl(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(t)}const kl=n=>{var{title:i,description:r,onClose:s,showCloseIcon:o=!0,icon:a,actions:l,className:c=""}=n,d=ol(n,["title","description","onClose","showCloseIcon","icon","actions","className"]);return e("div",Object.assign({className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${c}`},d,{children:[e("div",{className:"flex items-start gap-3 min-w-0",children:[a&&t("span",{className:"mt-0.5 text-white text-xl",children:a}),e("div",{className:"flex-1 min-w-0",children:[i&&t("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:i}),r&&t("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:r})]})]}),e("div",{className:"flex items-center gap-2",children:[l,o&&t("button",{type:"button","aria-label":"Cerrar",onClick:s,className:"shrink-0 inline-flex items-center justify-center rounded-md p-2 text-white hover:text-gray-200 hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white/50",children:t(Cl,{className:"text-xl"})})]})]}))},El=e=>{var{className:n=""}=e,i=ol(e,["className"]);return t("div",Object.assign({className:`p-4 sm:p-6 ${n}`},i))},Nl=e=>{var{className:n=""}=e,i=ol(e,["className"]);return t("div",Object.assign({className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${n}`},i))},Al={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const Ml=({open:n,onClose:i,title:r,description:s,size:a="md",footer:c,showCloseIcon:d=!0,hideHeader:u=!1,closeOnEsc:h=!0,closeOnClickOutside:p=!0,className:f="",children:g,initialFocusRef:y,headerClassName:v,overlayClassName:x,headerIcon:b,headerActions:w,zIndex:S,animate:T=!1})=>{const P=o(null),k=o(null),E=rl(),N=T&&!E;var A;l(()=>{if(!A)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[A=n]),function(t,e,n){l(()=>{if(!t)return;const i=e.current;if(!i)return;const r=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],s=()=>Array.from(i.querySelectorAll(r.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),o=document.activeElement;((null==n?void 0:n.current)||s()[0]||i).focus();const a=t=>{if("Tab"!==t.key)return;const e=s();if(0===e.length)return;const n=e[0],r=e[e.length-1];t.shiftKey?document.activeElement!==n&&document.activeElement!==i||(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{var t;document.removeEventListener("keydown",a),null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o)}},[t,e,n])}(n,P,y);const M=m(t=>{n&&"Escape"===t.key&&h&&(t.stopPropagation(),i())},[n,h,i]);l(()=>{if(n)return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[n,M]);const V=e("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:S?{zIndex:S}:void 0,"aria-hidden":!n,ref:k,children:[t("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{p&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),e("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":s?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Al[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${f}`,onClick:t=>t.stopPropagation(),ref:P,children:[!u&&t(kl,{title:r,description:s,onClose:i,showCloseIcon:d,className:v,icon:b,actions:w}),t("div",{className:"flex-1 overflow-y-auto",children:g}),c&&t(Nl,{children:c})]})]}),D=t(er,{children:n&&e("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:S?{zIndex:S}:void 0,"aria-hidden":!n,ref:k,children:[t(il.button,{type:"button","aria-label":"Cerrar modal",initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},onClick:()=>{p&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),e(il.div,{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":s?"bo-modal-description":void 0,initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Al[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${f}`,onClick:t=>t.stopPropagation(),ref:P,children:[!u&&t(kl,{title:r,description:s,onClose:i,showCloseIcon:d,className:v,icon:b,actions:w}),t("div",{className:"flex-1 overflow-y-auto",children:g}),c&&t(Nl,{children:c})]})]})}),L=N?D:n?V:null;return"undefined"!=typeof document?C(L,document.body):L};function Vl(t=!1){const[e,n]=g(t);return{open:e,onOpen:m(()=>n(!0),[]),onClose:m(()=>n(!1),[]),toggle:m(()=>n(t=>!t),[]),setOpen:n}}var Dl,Ll,Rl;Ml.Header=kl,Ml.Body=El,Ml.Footer=Nl,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(Dl||(Dl={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(Ll||(Ll={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(Rl||(Rl={}));const jl=t=>{switch(t){case Dl.CENTER:return"text-center";case Dl.RIGHT:return"text-right";default:return"text-left"}},Bl=t=>{switch(t){case Rl.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case Rl.LG:return{header:"px-6 py-4 text-base",cell:"px-6 py-4 text-base",table:"text-base"};default:return{header:"px-3 md:px-6 py-3 text-sm",cell:"px-3 md:px-6 py-4 text-sm",table:"text-sm"}}},Fl=t=>t%2==0?"bg-white":"bg-gray-50",Ol=({columns:n,size:i,hasActions:r})=>{const s=Bl(i);return t("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:e("tr",{children:[n.map(e=>t("th",{className:`${s.header} ${jl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),r&&t("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},zl=({columns:n,data:i,renderActions:r,size:s,onRowClick:o})=>{const a=Bl(s);return t("tbody",{children:i.map((i,s)=>e("tr",{className:`${Fl(s)} hover:bg-gray-100 transition-colors duration-150 ${o?"cursor-pointer":""}`,onClick:()=>null==o?void 0:o(i),children:[n.map(e=>t("td",{className:`${a.cell} ${jl(e.alignment)} ${e.className||""}`,children:e.accessor(i)},e.key)),r&&t("td",{className:`${a.cell} text-center sticky right-0 ${Fl(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:r(i)})]},s))})},Il=({columns:n,data:i,renderActions:r,size:s=Rl.MD,className:a="",onRowClick:c,isLoading:d=!1,emptyMessage:u="No hay datos disponibles"})=>{const h=o(null),{visibleData:m}=((t,e)=>{const[n,i]=g(t);return l(()=>{const n=()=>{if(!e.current)return;const n=e.current.getBoundingClientRect(),r=window.innerHeight-n.top-100,s=Math.max(1,Math.floor(r/60));i(t.slice(0,s))};n();const r=()=>{n()};window.addEventListener("resize",r);const s=new ResizeObserver(n);return e.current&&s.observe(e.current),()=>{window.removeEventListener("resize",r),s.disconnect()}},[t,e]),{visibleData:n}})(i,h);return d?t("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t("div",{className:"flex items-center justify-center py-8",children:t("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t("div",{className:"text-center py-8",children:t("p",{className:"text-gray-500",children:u})})}):t("div",{ref:h,className:`w-full shadow-md sm:rounded-lg bg-white ${a}`,children:t("div",{className:"overflow-x-auto",children:e("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t(Ol,{columns:n,size:s,hasActions:!!r}),t(zl,{columns:n,data:m,renderActions:r,size:s,onRowClick:c})]})})})},$l=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),Wl={datos_basicos:Tl,transporte:fl,contacto:wl},Ul={nombres:Tl,apellidos:Tl,curso:function(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"},child:[]}]})(t)},codigoFamilia:function(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)},transporte:fl,saleSolo:function(t){return j({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z"},child:[]}]})(t)},bajaSolo:function(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"},child:[]}]})(t)},direccionCasa:function(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"},child:[]}]})(t)},rfid:function(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z"},child:[]}]})(t)},idSchoolRegistration:yl},Hl={informacion_general:Tl,ultimas_novedades:yl,personas_autorizadas:Pl,ultimos_movimientos:xl},_l={INGRESO:function(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(t)},SALIDA:function(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(t)}},Yl="#FFFFFF",Xl="#F7F9FC",Kl="#E5E9F2",ql="#0F172A",Gl="#64748B",Zl="#94A3B8",Jl="#111F4B",Ql="#E2E8FF",tc="#1D4ED8",ec={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"},nc=({open:n,onClose:i,context:r="pass",student:s,generalGroups:o,sections:a=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:m=!1,error:p,onReload:f})=>{const[y,v]=g(!0),[x,b]=g(!1),[w,S]=g("desktop");l(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;S(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const C="mobile"===w,P="tablet"===w;l(()=>{if(m)v(!0),b(!1);else if(c){v(!0),b(!1);const t=new Image;t.onload=()=>{v(!1)},t.onerror=()=>{v(!1),b(!0)},t.src=c}else v(!1),b(!0)},[c,m]),l(()=>{n||(v(!0),b(!1))},[n,s.id]);const k=h(()=>{var t,e,n,i,r,a,l,c,d,u;const h=null!=o?o:[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:null!==(t=s.nombres)&&void 0!==t?t:""},{id:"apellidos",label:"Apellidos",value:null!==(e=s.apellidos)&&void 0!==e?e:""},{id:"curso",label:"Curso",value:null!==(n=s.curso)&&void 0!==n?n:""},{id:"codigoFamilia",label:"Código familia",value:null!==(i=s.codigoFamilia)&&void 0!==i?i:""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:null!==(r=s.transporte)&&void 0!==r?r:""},{id:"saleSolo",label:"Sale solo",value:null!==(a=s.saleSolo)&&void 0!==a?a:""},{id:"bajaSolo",label:"Baja solo",value:null!==(l=s.bajaSolo)&&void 0!==l?l:""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:null!==(c=s.direccionCasa)&&void 0!==c?c:""},{id:"rfid",label:"RFID",value:null!==(d=s.rfid)&&void 0!==d?d:""},{id:"idSchoolRegistration",label:"Registro escolar",value:null!==(u=s.idSchoolRegistration)&&void 0!==u?u:""}]}];return{id:"informacion_general",title:ec.informacion_general,items:h}},[o,s]),E=h(()=>{var t,e;return`${null!==(t=s.nombres)&&void 0!==t?t:""} ${null!==(e=s.apellidos)&&void 0!==e?e:""}`.trim()},[s.nombres,s.apellidos]),N=n=>{switch(n.id){case"ultimas_novedades":return(i=n.items).length?t("div",{className:"space-y-4",children:i.map(n=>e("article",{className:"rounded-2xl border border-blue-200 bg-gradient-to-br from-blue-50 to-blue-100/50 p-4 text-sm shadow-sm ring-1 ring-blue-100",style:{borderRadius:24,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, rgba(219, 234, 254, 0.7) 100%)",padding:20,boxShadow:"0 18px 32px rgba(59, 130, 246, 0.15)"},children:[e("header",{className:"flex items-center justify-between",children:[e("span",{className:"inline-flex items-center gap-2 rounded-full bg-blue-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-blue-800",children:[t(yl,{className:"h-3.5 w-3.5"})," ",n.tipo]}),e("time",{dateTime:n.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t(gl,{className:"h-3.5 w-3.5"}),$l(n.fecha)]})]}),e("div",{className:"mt-3 space-y-2 text-blue-900",children:[e("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t("span",{className:"text-sm font-bold",children:n.estado})]}),e("p",{className:"text-sm",children:[t("span",{className:"font-semibold",children:"Responsable:"})," ",n.responsable]}),t("p",{className:"text-sm leading-relaxed",children:n.descripcion})]}),n.respuesta&&e("p",{className:"rounded-xl bg-white/70 px-3 py-2 text-sm text-blue-900 shadow-inner ring-1 ring-blue-100",children:[t("span",{className:"font-semibold",children:"Respuesta:"})," ",n.respuesta]})]},n.id))}):t("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(n=>n.length?t("div",{className:"grid gap-4",children:n.map(n=>e("article",{className:"rounded-2xl border border-emerald-200 bg-gradient-to-br from-emerald-50 to-emerald-100/40 p-4 text-sm shadow-sm ring-1 ring-emerald-100",style:{borderRadius:24,border:"1px solid #A7F3D0",background:"linear-gradient(135deg, #ECFDF5 0%, rgba(209, 250, 229, 0.65) 100%)",padding:20,boxShadow:"0 18px 32px rgba(16, 185, 129, 0.12)"},children:[e("header",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center gap-3",children:[t("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-white text-emerald-600 shadow-inner ring-1 ring-emerald-100",children:t(Pl,{className:"h-5 w-5"})}),e("div",{children:[t("span",{className:"text-sm font-semibold text-emerald-900",children:n.nombreCompleto}),e("p",{className:"text-xs text-emerald-700",children:[n.tipoDocumento," • ",n.numeroDocumento]})]})]}),t("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:n.estado})]}),e("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t("dd",{className:"text-sm font-semibold",children:n.codigoFamilia})]}),e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),e("dd",{className:"text-sm font-semibold",children:[n.vigencia.desde," – ",n.vigencia.hasta]})]}),e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t("dd",{className:"text-sm font-semibold",children:n.autorizadoPor})]})]})]},`${n.numeroDocumento}-${n.vigencia.desde}`))}):t("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(n.items);case"ultimos_movimientos":return(n=>n.length?e("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t("div",{className:"absolute left-[1.15rem] top-3 bottom-3 w-px bg-slate-200",style:{position:"absolute",left:28,top:12,bottom:12,width:2,backgroundColor:Kl}}),n.map((n,i)=>{var r;const s=null!==(r=_l[n.tipo.toUpperCase()])&&void 0!==r?r:xl;return e("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t("div",{className:"absolute left-0 top-1 flex h-10 w-10 items-center justify-center rounded-full bg-white text-slate-600 shadow-sm ring-1 ring-slate-200",style:{position:"absolute",left:6,top:4,width:46,height:46,borderRadius:"50%",backgroundColor:Yl,color:Gl,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${Kl}`},children:t(s,{size:16})}),e("div",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm ring-1 ring-slate-100",style:{borderRadius:24,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[e("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t("span",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-700",children:n.tipo}),t("time",{dateTime:n.fecha,children:$l(n.fecha)})]}),e("div",{className:"mt-3 space-y-2 text-slate-700",children:[e("p",{children:[t("span",{className:"font-semibold",children:"Lector:"})," ",n.lector.descripcion," (",n.lector.id,")"]}),n.observaciones&&t("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:n.observaciones})]})]})]},`${n.fecha}-${i}`)})]}):t("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(n.items);case"paradas":return(n=>n.length?t("div",{className:"student-summary-paradas",style:{display:"grid",gap:C?14:P?16:18},children:n.map((n,i)=>{var r,s,o,a;const l=`Parada ${null!==(r=n.orden)&&void 0!==r?r:i+1}`,c=null!==(s=n.time)&&void 0!==s?s:n.horaProgramada;return e("article",{style:{borderRadius:24,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[e("header",{style:{display:"flex",flexDirection:C?"column":"row",alignItems:C?"flex-start":"center",justifyContent:"space-between",gap:16},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t(wl,{size:20})}),e("div",{children:[t("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:l}),t("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:ql},children:null!==(o=n.address)&&void 0!==o?o:"Dirección no disponible"})]})]}),c&&e("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:C?"6px 12px":"6px 14px",backgroundColor:Xl,border:`1px solid ${Kl}`,fontSize:12,fontWeight:600,color:Gl},children:[t(vl,{size:12}),c]})]}),e("div",{style:{marginTop:16,display:"grid",gap:C?10:12,gridTemplateColumns:C?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[n.estado&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Estado"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.estado})]}),n.horaReal&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Hora real"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.horaReal})]}),n.observaciones&&t("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${Kl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:n.observaciones})}),n.coordinates&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Coordenadas"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:[n.coordinates.lat.toFixed(6),", ",n.coordinates.lng.toFixed(6)]})]})]})]},null!==(a=n.id)&&void 0!==a?a:`${i}`)})}):t("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(n.items);case"recorridos":return(n=>n.length?t("div",{className:"student-summary-recorridos",style:{display:"grid",gap:C?16:P?18:20},children:n.map(n=>{var i,r,s,o;return e("article",{style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[e("header",{style:{display:"flex",flexDirection:C?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t("div",{style:{width:C?42:46,height:C?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t(Sl,{size:C?18:20})}),e("div",{children:[t("p",{style:{margin:0,fontSize:C?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:"Recorrido"}),t("p",{style:{margin:"4px 0 0",fontSize:C?15:16,fontWeight:600,color:ql},children:n.nombreRecorrido}),n.tipoRecorrido&&t("p",{style:{margin:"2px 0 0",fontSize:C?12:13,color:Gl},children:n.tipoRecorrido})]})]}),e("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[n.estadoActual&&t("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:n.estadoActual}),n.numeroFlota&&e("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Xl,color:Gl,fontSize:12,fontWeight:600},children:["Flota ",n.numeroFlota]}),n.placaBus&&t("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Xl,color:Gl,fontSize:12,fontWeight:600},children:n.placaBus})]})]}),e("div",{style:{marginTop:20,display:"grid",gap:C?12:14,gridTemplateColumns:C?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(n.horaInicio||n.horaFin)&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Horario"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:[null!==(i=n.horaInicio)&&void 0!==i?i:"—"," – ",null!==(r=n.horaFin)&&void 0!==r?r:"—"]})]}),(n.nombreAuxiliar||n.nombreOperario)&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Equipo"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:["Auxiliar: ",null!==(s=n.nombreAuxiliar)&&void 0!==s?s:"—"]}),e("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:ql},children:["Operario: ",null!==(o=n.nombreOperario)&&void 0!==o?o:"—"]})]}),n.diasRecorrido&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Días programados"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.diasRecorrido})]})]}),n.ultimoEvento&&t("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:n.ultimoEvento})]},n.idRecorrido)})}):t("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(n.items);default:return null}var i},A=null!=a?a:[];return e(Ml,{open:n,onClose:i,size:"xl",overlayClassName:"z-[1000]",className:"z-[1001] [&_.modal-content]:!max-h-[80vh] [&_.modal-body]:!max-h-none [&_.modal-body]:!overflow-visible",title:d,description:u,children:[e(El,{className:"px-4 pb-6",children:[p&&e("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t("p",{className:"mt-1",children:p}),f&&t(T,{variant:"secondary",onClick:f,className:"mt-3",children:"Reintentar"})]}),e("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:C?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[e("div",{className:"student-summary-layout",style:{display:"grid",gap:C?20:P?24:28,gridTemplateColumns:C||P?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:C?20:P?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:C?18:24},children:[t("div",{style:{position:"relative",width:C?110:P?128:140,height:C?110:P?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${Yl}`,backgroundColor:Xl,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:y?t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Xl},children:t("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t("img",{src:c,alt:E||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Xl,color:Gl},children:t(Tl,{size:C?48:P?56:60})})}),e("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t("h2",{style:{margin:0,fontSize:C?18:22,fontWeight:600,color:ql},children:E||"Nombre no disponible"}),s.curso&&e("p",{style:{margin:0,fontSize:C?13:15,color:Gl},children:["Curso"," ",t("span",{style:{fontWeight:600,color:"#4338CA"},children:s.curso})]})]}),e("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[s.id&&e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:Xl,border:`1px solid ${Kl}`,borderRadius:20,padding:C?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:C?200:240},children:[t("span",{style:{fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl,fontWeight:700},children:"Identificador estudiante"}),t("span",{style:{fontSize:17,fontWeight:600,color:ql},children:s.id})]}),e("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:Ql,color:tc,letterSpacing:"0.04em"},children:["Contexto: ",r.toUpperCase()]})]})]})}),t("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(n=>{var i;const r=null!==(i=Hl[n.id])&&void 0!==i?i:bl,s=C?1:P?2:3,o=Math.min(Math.max(n.items.length,1),s);return e("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[e("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:C?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:C?0:4},children:[t("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?46:56,height:C?46:56,borderRadius:18,backgroundColor:Jl,color:Yl,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t(r,{size:C?18:22})}),e("div",{children:[t("h3",{style:{margin:0,fontSize:C?16:18,fontWeight:600,color:ql},children:n.title}),t("p",{style:{margin:"6px 0 0",fontSize:C?13:14,color:Gl},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t("div",{className:"student-summary-general__grid",style:{display:"grid",gap:C?14:P?18:20,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:n.items.map(n=>{var i;const s=null!==(i=Wl[n.id])&&void 0!==i?i:r;return e("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:C?16:P?18:20,display:"flex",flexDirection:"column",gap:14},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${Kl}`},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:Xl,color:Gl},children:t(s,{size:20})}),t("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:ql},children:n.title})]}),t("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.rows.map(n=>{var i;const r=null!==(i=Ul[n.id])&&void 0!==i?i:bl;return e("div",{style:{display:"flex",alignItems:"center",gap:C?10:12,borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?36:40,height:C?36:40,borderRadius:"50%",backgroundColor:Yl,color:Gl,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t(r,{size:C?14:16})}),e("div",{style:{minWidth:0},children:[t("p",{style:{margin:0,fontSize:C?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:n.label}),t("p",{style:{margin:"4px 0 0",fontSize:C?13:14,fontWeight:600,color:ql,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(s=n.value,null==s?"—":"string"==typeof s?s.trim()?s:"—":s)})]})]},n.id);var s})})]},n.id)})})]})})(k)})]}),A.length>0?t("div",{className:"student-summary-modules",style:{display:"grid",gap:C?18:P?20:24,gridTemplateColumns:C?"1fr":P?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:A.map(n=>{var i,r,s,o;const a=null!==(i=Hl[n.id])&&void 0!==i?i:bl,l=null!==(s=null!==(r=n.title)&&void 0!==r?r:ec[n.id])&&void 0!==s?s:"Sección";return e("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:C?18:P?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[e("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?40:46,height:C?40:46,borderRadius:16,backgroundColor:Xl,color:Gl},children:t(a,{size:C?18:20})}),e("div",{children:[t("h3",{style:{margin:0,fontSize:C?15:17,fontWeight:600,color:ql},children:l}),(null===(o=n.meta)||void 0===o?void 0:o.maxItems)&&e("p",{style:{margin:"6px 0 0",fontSize:12,color:Gl},children:["Mostrando hasta ",n.meta.maxItems," registros recientes."]})]})]}),t("div",{className:"flex-1",children:N(n)})]},n.id)})}):!m&&!p&&t("div",{className:"flex h-48 items-center justify-center",children:t("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t(Nl,{children:t(T,{variant:"secondary",onClick:i,children:"Cerrar"})})]})};function ic(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(t)}function rc(){return t("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:e("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t("div",{className:"flex items-center justify-center",children:e("div",{className:"relative flex flex-col items-center",children:[t("div",{className:"h-80 w-4 bg-gray-700"}),e("div",{className:"absolute top-4 flex h-auto w-auto min-w-[12rem] flex-col items-center justify-center rounded-lg bg-primary-botech text-white shadow-lg p-4",children:[t("div",{className:"flex-1 mb-2",children:e("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t("span",{className:"text-4xl font-bold",children:"404"}),t("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),e("div",{className:"space-y-3",children:[t("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t("p",{className:"text-gray-600",children:"Parece que estás esperando en una parada de autobús que no está en nuestra ruta. La página que buscas no se encuentra disponible."})]}),e("button",{className:"flex items-center gap-2 bg-primary-botech hover:bg-primary-botech/90 text-white px-4 py-2 rounded",onClick:()=>{window.location.href="/"},children:[t(ic,{className:"h-4 w-4"}),t("span",{children:"Volver a la ruta principal"})]})]})})}function sc(t,e){return Object.keys(t).filter(t=>-1===e.indexOf(t)).map(t=>({key:t,header:t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim(),accessor:e=>{var n;return null!==(n=e[t])&&void 0!==n?n:"-"}}))}export{T as Button,ul as DownloadStudentsExcelButton,Il as GenericTable,H as Header,P as IconButton,Ml as Modal,El as ModalBody,Nl as ModalFooter,kl as ModalHeader,pl as MultiSelector,rc as NotFound,sl as Sidebar,ml as SingleSelector,nc as StudentSummaryModal,hl as UploadStudentsExcelButton,cl as downloadStudentsExcel,sc as generateTableColumns,ll as getBackendPrefix,dl as uploadStudentsExcel,Vl as useModal};
1
+ import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import*as i from"react";import r,{createContext as s,useRef as o,useLayoutEffect as a,useEffect as l,useId as c,useContext as d,useInsertionEffect as u,useMemo as h,useCallback as m,Children as p,isValidElement as f,useState as g,forwardRef as y,Fragment as v,createElement as x,Component as b}from"react";import w from"sweetalert2";import S from"axios";import{createPortal as C}from"react-dom";const T=({variant:e="primary",size:n="md",onClick:i,children:r,className:s="",disabled:o=!1})=>t("button",{className:`rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[n]} ${{primary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:o?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"}[e]} ${s}`,onClick:o?void 0:i,disabled:o,children:r}),P=({leftIcon:n,rightIcon:i,children:r,onClick:s,className:o="",variant:a="primary",size:l="md",disabled:c=!1})=>e("button",{type:"button",className:`inline-flex items-center gap-2 rounded font-medium transition-colors duration-300 ease-in-out ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2",lg:"px-6 py-3 text-lg"}[l]} ${{primary:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-primary-botech hover:bg-primary-botech-400 text-white cursor-pointer",secondary:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-800 cursor-pointer",danger:c?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-red-500 hover:bg-red-600 text-white cursor-pointer"}[a]} ${o}`,onClick:c?void 0:s,disabled:c,children:[n&&t("span",{className:"flex items-center",children:n}),r,i&&t("span",{className:"flex items-center",children:i})]});var k={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},E=r.createContext&&r.createContext(k),N=["attr","size","title"];function A(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){if(e.indexOf(i)>=0)continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},M.apply(this,arguments)}function V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?V(Object(n),!0).forEach(function(e){L(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function L(t,e,n){var i;return(e="symbol"==typeof(i=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"))?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t){return t&&t.map((t,e)=>r.createElement(t.tag,D({key:e},t.attr),R(t.child)))}function j(t){return e=>r.createElement(B,M({attr:D({},t.attr)},e),R(t.child))}function B(t){var e=e=>{var n,{attr:i,size:s,title:o}=t,a=A(t,N),l=s||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),r.createElement("svg",M({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,a,{className:n,style:D(D({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),o&&r.createElement("title",null,o),t.children)};return void 0!==E?r.createElement(E.Consumer,null,t=>e(t)):e(k)}function F(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(t)}function O(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(t)}function z(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(t)}function I(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",y1:"12",x2:"9",y2:"12"},child:[]}]})(t)}function $(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(t)}function W(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(t)}function U(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(t)}const H=({title:n,description:i,logoUrl:r,defaultLogoUrl:s,logoAlt:o="Logo",systemName:a="PASS",systemSubtitle:l="Sistema Escolar",onMenuToggle:c,showPageInfo:d=!0,className:u="flex flex-col sm:flex-row sm:items-end bg-primary-botech text-white p-3 sm:p-4 shadow-lg gap-3 sm:gap-0 justify-between",logoClassName:h="h-8 sm:h-10 object-contain",titleClassName:m="text-lg sm:text-xl font-bold",descriptionClassName:p="text-xs sm:text-sm opacity-80"})=>{const f="string"==typeof s&&""!==s.trim()?s:void 0,g="string"==typeof r&&""!==r.trim()?r:f;return e("div",{className:u,children:[e("div",{className:"flex items-center gap-3 sm:gap-4",children:[t("button",{onClick:c,className:"p-2 rounded-lg hover:bg-primary-botech-600 transition-colors focus:outline-none focus:ring-2 focus:ring-white focus:ring-opacity-20 flex-shrink-0","aria-label":"Abrir menú",children:t($,{className:"w-5 h-5 sm:w-6 sm:h-6"})}),e("div",{className:"flex items-center min-w-0 flex-1",children:[t("div",{className:"flex items-center justify-center mr-2 sm:mr-3 flex-shrink-0",children:g?t("img",{src:g,alt:o,className:h}):t("div",{className:"w-8 h-8 sm:w-10 sm:h-10 bg-white bg-opacity-20 rounded-lg flex items-center justify-center border border-white border-opacity-30",children:t("span",{className:"text-white font-bold text-sm sm:text-lg",children:a.charAt(0)})})}),e("div",{className:"min-w-0 flex-1",children:[t("h1",{className:m,children:a}),t("p",{className:p,children:l})]})]})]}),d&&e("div",{className:"text-left sm:text-right pt-2 sm:border-t-0 sm:pt-0",children:[t("h2",{className:"text-base sm:text-lg font-semibold",children:n}),t("p",{className:"text-xs sm:text-sm leading-tight opacity-80 truncate",children:i})]})]})},_=s({});function Y(t){const e=o(null);return null===e.current&&(e.current=t()),e.current}const X="undefined"!=typeof window,K=X?a:l,q=s(null);function G(t,e){-1===t.indexOf(e)&&t.push(e)}function Z(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let Q=()=>{},tt=()=>{};"production"!==process.env.NODE_ENV&&(Q=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},tt=(t,e)=>{if(!t)throw new Error(e)});const et={},nt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function it(t){return"object"==typeof t&&null!==t}const rt=t=>/^0[^.\s]+$/u.test(t);function st(t){let e;return()=>(void 0===e&&(e=t()),e)}const ot=t=>t,at=(t,e)=>n=>e(t(n)),lt=(...t)=>t.reduce(at),ct=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class dt{constructor(){this.subscriptions=[]}add(t){return G(this.subscriptions,t),()=>Z(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ut=t=>1e3*t,ht=t=>t/1e3;function mt(t,e){return e?t*(1e3/e):0}const pt=new Set;function ft(t,e,n){t||pt.has(e)||(console.warn(e),n&&console.warn(n),pt.add(e))}const gt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function yt(t,e,n,i){if(t===e&&n===i)return ot;const r=e=>function(t,e,n,i,r){let s,o,a=0;do{o=e+(n-e)/2,s=gt(o,i,r)-t,s>0?n=o:e=o}while(Math.abs(s)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:gt(r(t),e,i)}const vt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xt=t=>e=>1-t(1-e),bt=yt(.33,1.53,.69,.99),wt=xt(bt),St=vt(wt),Ct=t=>(t*=2)<1?.5*wt(t):.5*(2-Math.pow(2,-10*(t-1))),Tt=t=>1-Math.sin(Math.acos(t)),Pt=xt(Tt),kt=vt(Tt),Et=yt(.42,0,1,1),Nt=yt(0,0,.58,1),At=yt(.42,0,.58,1),Mt=t=>Array.isArray(t)&&"number"==typeof t[0],Vt={linear:ot,easeIn:Et,easeInOut:At,easeOut:Nt,circIn:Tt,circInOut:kt,circOut:Pt,backIn:wt,backInOut:St,backOut:bt,anticipate:Ct},Dt=t=>{if(Mt(t)){tt(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,r]=t;return yt(e,n,i,r)}return"string"==typeof t?(tt(void 0!==Vt[t],`Invalid easing type '${t}'`),Vt[t]):t},Lt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Rt={value:null,addProjectionMetrics:null};function jt(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Lt.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,r=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){o.has(e)&&(d.schedule(e),t()),l++,e(a)}const d={schedule:(t,e=!1,s=!1)=>{const a=s&&r?n:i;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),o.delete(t)},process:t=>{a=t,r?s=!0:(r=!0,[n,i]=[i,n],n.forEach(c),e&&Rt.value&&Rt.value.frameloop[e].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(t)))}};return d}(s,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:p}=o,f=()=>{const s=et.useManualTiming?r.timestamp:performance.now();n=!1,et.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),m.process(r),p.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:Lt.reduce((e,s)=>{const a=o[s];return e[s]=(e,s=!1,o=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(f)),a.schedule(e,s,o)),e},{}),cancel:t=>{for(let e=0;e<Lt.length;e++)o[Lt[e]].cancel(t)},state:r,steps:o}}const{schedule:Bt,cancel:Ft,state:Ot,steps:zt}=jt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:ot,!0);let It;function $t(){It=void 0}const Wt={now:()=>(void 0===It&&Wt.set(Ot.isProcessing||et.useManualTiming?Ot.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask($t)}},Ut=t=>e=>"string"==typeof e&&e.startsWith(t),Ht=Ut("--"),_t=Ut("var(--"),Yt=t=>!!_t(t)&&Xt.test(t.split("/*")[0].trim()),Xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},qt={...Kt,transform:t=>J(0,1,t)},Gt={...Kt,default:1},Zt=t=>Math.round(1e5*t)/1e5,Jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Qt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,te=(t,e)=>n=>Boolean("string"==typeof n&&Qt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ee=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,s,o,a]=i.match(Jt);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ne={...Kt,transform:t=>Math.round((t=>J(0,255,t))(t))},ie={test:te("rgb","red"),parse:ee("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ne.transform(t)+", "+ne.transform(e)+", "+ne.transform(n)+", "+Zt(qt.transform(i))+")"};const re={test:te("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:ie.transform},se=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),oe=se("deg"),ae=se("%"),le=se("px"),ce=se("vh"),de=se("vw"),ue=(()=>({...ae,parse:t=>ae.parse(t)/100,transform:t=>ae.transform(100*t)}))(),he={test:te("hsl","hue"),parse:ee("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ae.transform(Zt(e))+", "+ae.transform(Zt(n))+", "+Zt(qt.transform(i))+")"},me={test:t=>ie.test(t)||re.test(t)||he.test(t),parse:t=>ie.test(t)?ie.parse(t):he.test(t)?he.parse(t):re.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ie.transform(t):he.transform(t),getAnimatableNone:t=>{const e=me.parse(t);return e.alpha=0,me.transform(e)}},pe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const fe="number",ge="color",ye=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ve(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const o=e.replace(ye,t=>(me.test(t)?(i.color.push(s),r.push(ge),n.push(me.parse(t))):t.startsWith("var(")?(i.var.push(s),r.push("var"),n.push(t)):(i.number.push(s),r.push(fe),n.push(parseFloat(t))),++s,"${}")).split("${}");return{values:n,split:o,indexes:i,types:r}}function xe(t){return ve(t).values}function be(t){const{split:e,types:n}=ve(t),i=e.length;return t=>{let r="";for(let s=0;s<i;s++)if(r+=e[s],void 0!==t[s]){const e=n[s];r+=e===fe?Zt(t[s]):e===ge?me.transform(t[s]):t[s]}return r}}const we=t=>"number"==typeof t?0:me.test(t)?me.getAnimatableNone(t):t;const Se={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Jt)?.length||0)+(t.match(pe)?.length||0)>0},parse:xe,createTransformer:be,getAnimatableNone:function(t){const e=xe(t);return be(t)(e.map(we))}};function Ce(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Te(t,e){return n=>n>0?e:t}const Pe=(t,e,n)=>t+(e-t)*n,ke=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},Ee=[re,ie,he];function Ne(t){const e=(n=t,Ee.find(t=>t.test(n)));var n;if(Q(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(e))return!1;let i=e.parse(t);return e===he&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,s=0,o=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=Ce(a,i,t+1/3),s=Ce(a,i,t),o=Ce(a,i,t-1/3)}else r=s=o=n;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*o),alpha:i}}(i)),i}const Ae=(t,e)=>{const n=Ne(t),i=Ne(e);if(!n||!i)return Te(t,e);const r={...n};return t=>(r.red=ke(n.red,i.red,t),r.green=ke(n.green,i.green,t),r.blue=ke(n.blue,i.blue,t),r.alpha=Pe(n.alpha,i.alpha,t),ie.transform(r))},Me=new Set(["none","hidden"]);function Ve(t,e){return n=>Pe(t,e,n)}function De(t){return"number"==typeof t?Ve:"string"==typeof t?Yt(t)?Te:me.test(t)?Ae:je:Array.isArray(t)?Le:"object"==typeof t?me.test(t)?Ae:Re:Te}function Le(t,e){const n=[...t],i=n.length,r=t.map((t,n)=>De(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function Re(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=De(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const je=(t,e)=>{const n=Se.createTransformer(e),i=ve(t),r=ve(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Me.has(t)&&!r.values.length||Me.has(e)&&!i.values.length?function(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):lt(Le(function(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const s=e.types[r],o=t.indexes[s][i[s]],a=t.values[o]??0;n[r]=a,i[s]++}return n}(i,r),r.values),n):(Q(!0,`Complex values '${t}' and '${e}' 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.`),Te(t,e))};function Be(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Pe(t,e,n);return De(t)(t,e)}const Fe=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Bt.update(e,t),stop:()=>Ft(e),now:()=>Ot.isProcessing?Ot.timestamp:Wt.now()}},Oe=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)i+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ze=2e4;function Ie(t){let e=0;let n=t.next(e);for(;!n.done&&e<ze;)e+=50,n=t.next(e);return e>=ze?1/0:e}function $e(t,e,n){const i=Math.max(e-5,0);return mt(n-t(i),e-i)}const We=100,Ue=10,He=1,_e=0,Ye=800,Xe=.3,Ke=.3,qe={granular:.01,default:2},Ge={granular:.005,default:.5},Ze=.01,Je=10,Qe=.05,tn=1,en=.001;function nn({duration:t=Ye,bounce:e=Xe,velocity:n=_e,mass:i=He}){let r,s;Q(t<=ut(Je),"Spring duration must be 10 seconds or less");let o=1-e;o=J(Qe,tn,o),t=J(Ze,Je,ht(t)),o<1?(r=e=>{const i=e*o,r=i*t,s=i-n,a=sn(e,o),l=Math.exp(-r);return en-s/a*l},s=e=>{const i=e*o*t,s=i*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=sn(Math.pow(e,2),o);return(-r(e)+en>0?-1:1)*((s-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<rn;n++)i-=t(i)/e(i);return i}(r,s,5/t);if(t=ut(t),isNaN(a))return{stiffness:We,damping:Ue,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*o*Math.sqrt(i*e),duration:t}}}const rn=12;function sn(t,e){return t*Math.sqrt(1-e*e)}const on=["duration","bounce"],an=["stiffness","damping","mass"];function ln(t,e){return e.some(e=>void 0!==t[e])}function cn(t=Ke,e=Xe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:m}=function(t){let e={velocity:_e,stiffness:We,damping:Ue,mass:He,isResolvedFromDuration:!1,...t};if(!ln(t,an)&&ln(t,on))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,s=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:He,stiffness:r,damping:s}}else{const n=nn(t);e={...e,...n,mass:He},e.isResolvedFromDuration=!0}return e}({...n,velocity:-ht(n.velocity||0)}),p=h||0,f=c/(2*Math.sqrt(l*d)),g=o-s,y=ht(Math.sqrt(l/d)),v=Math.abs(g)<5;let x;if(i||(i=v?qe.granular:qe.default),r||(r=v?Ge.granular:Ge.default),f<1){const t=sn(y,f);x=e=>{const n=Math.exp(-f*y*e);return o-n*((p+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>o-Math.exp(-y*t)*(g+(p+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return o-n*((p+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const b={calculatedDuration:m&&u||null,next:t=>{const e=x(t);if(m)a.done=t>=u;else{let n=0===t?p:0;f<1&&(n=0===t?ut(p):$e(x,t,e));const s=Math.abs(n)<=i,l=Math.abs(o-e)<=r;a.done=s&&l}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(Ie(b),ze),e=Oe(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=u+p,g=void 0===o?f:o(f);g!==f&&(p=g-u);const y=t=>-p*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let b,w;const S=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=cn({keyframes:[h.value,m(h.value)],velocity:$e(v,t,h.value),damping:r,stiffness:s,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),S(t)),void 0!==b&&t>=b?w.next(t-b):(!e&&x(t),h)}}}function un(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(tt(s===e.length,"Both input and output ranges must be the same length"),1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],r=n||et.mix||Be,s=t.length-1;for(let n=0;n<s;n++){let s=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||ot:e;s=lt(t,s)}i.push(s)}return i}(e,i,r),l=a.length,c=n=>{if(o&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const r=ct(t[i],t[i+1],n);return a[i](r)};return n?e=>c(J(t[0],t[s-1],e)):c}function hn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ct(0,e,i);t.push(Pe(n,1,r))}}(e,t.length-1),e}function mn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Dt):Dt(i),s={done:!1,value:e[0]},o=function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:hn(e),t),a=un(o,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map(()=>c||At).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(s.value=a(e),s.done=e>=t,s)}}cn.applyToOptions=t=>{const e=function(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(Ie(i),ze);return{type:"keyframes",ease:t=>i.next(r*t).value/e,duration:ht(r)}}(t,100,cn);return t.ease=e.ease,t.duration=ut(e.duration),t.type="keyframes",t};const pn=t=>null!==t;function fn(t,{repeat:e,repeatType:n="loop"},i,r=1){const s=t.filter(pn),o=r<0||e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}const gn={decay:dn,inertia:dn,tween:mn,keyframes:mn,spring:cn};function yn(t){"string"==typeof t.type&&(t.type=gn[t.type])}class vn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const xn=t=>t/100;class bn extends vn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Wt.now()&&this.tick(Wt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;yn(t);const{type:e=mn,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:s=0}=t;let{keyframes:o}=t;const a=e||mn;"production"!==process.env.NODE_ENV&&a!==mn&&tt(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),a!==mn&&"number"!=typeof o[0]&&(this.mixKeyframes=lt(xn,Be(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=Ie(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:d,repeatType:u,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(d){const t=Math.min(this.currentTime,i)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===u?(n=1-n,h&&(n-=h/o)):"mirror"===u&&(x=s)),v=J(0,1,n)*o}const b=y?{done:!1,value:c[0]}:x.next(v);r&&(b.value=r(b.value));let{done:w}=b;y||null===a||(w=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&m!==dn&&(b.value=fn(c,this.options,f,this.speed)),p&&p(b.value),S&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return ht(this.calculatedDuration)}get time(){return ht(this.currentTime)}set time(t){t=ut(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ht(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fe,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Wt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const wn=t=>180*t/Math.PI,Sn=t=>{const e=wn(Math.atan2(t[1],t[0]));return Tn(e)},Cn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Sn,rotateZ:Sn,skewX:t=>wn(Math.atan(t[1])),skewY:t=>wn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Tn=t=>((t%=360)<0&&(t+=360),t),Pn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),kn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),En={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pn,scaleY:kn,scale:t=>(Pn(t)+kn(t))/2,rotateX:t=>Tn(wn(Math.atan2(t[6],t[5]))),rotateY:t=>Tn(wn(Math.atan2(-t[2],t[0]))),rotateZ:Sn,rotate:Sn,skewX:t=>wn(Math.atan(t[4])),skewY:t=>wn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Nn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||"none"===t)return Nn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=En,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Cn,r=e}if(!r)return Nn(e);const s=i[e],o=r[1].split(",").map(Mn);return"function"==typeof s?s(o):o[s]}function Mn(t){return parseFloat(t.trim())}const Vn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dn=(()=>new Set(Vn))(),Ln=t=>t===Kt||t===le,Rn=new Set(["x","y","z"]),jn=Vn.filter(t=>!Rn.has(t));const Bn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};Bn.translateX=Bn.x,Bn.translateY=Bn.y;const Fn=new Set;let On=!1,zn=!1,In=!1;function $n(){if(zn){const t=Array.from(Fn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return jn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}zn=!1,On=!1,Fn.forEach(t=>t.complete(In)),Fn.clear()}function Wn(){Fn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zn=!0)})}class Un{constructor(t,e,n,i,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fn.add(this),On||(On=!0,Bt.read(Wn),Bt.resolveKeyframes($n))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const r=i?.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,s);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=s),i&&void 0===r&&i.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fn.delete(this)}cancel(){"scheduled"===this.state&&(Fn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Hn=st(()=>void 0!==window.ScrollTimeline),_n={};function Yn(t,e){const n=st(t);return()=>_n[e]??n()}const Xn=Yn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Kn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kn([0,.65,.55,1]),circOut:Kn([.55,0,1,.45]),backIn:Kn([.31,.01,.66,-.59]),backOut:Kn([.33,1.53,.69,.99])};function Gn(t,e){return t?"function"==typeof t?Xn()?Oe(t,e):"ease-out":Mt(t)?Kn(t):Array.isArray(t)?t.map(t=>Gn(t,e)||qn.easeOut):qn[t]:void 0}function Zn(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[e]:n};l&&(d.offset=l);const u=Gn(a,r);Array.isArray(u)&&(d.easing=u);const h={delay:i,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:"reverse"===o?"alternate":"normal"};c&&(h.pseudoElement=c);return t.animate(d,h)}function Jn(t){return"function"==typeof t&&"applyToOptions"in t}class Qn extends vn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:i,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=s,this.options=t,tt("string"!=typeof t.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:t,...e}){return Jn(t)&&Xn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=Zn(e,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=fn(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,n){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,n):t.style[e]=n}(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ht(Number(t))}get time(){return ht(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ut(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Hn()?(this.animation.timeline=t,ot):e(this)}}const ti={anticipate:Ct,backInOut:St,circInOut:kt};function ei(t){"string"==typeof t.ease&&t.ease in ti&&(t.ease=ti[t.ease])}class ni extends Qn{constructor(t){ei(t),yn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:r,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new bn({...s,autoplay:!1}),a=ut(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const ii=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Se.test(t)&&"0"!==t||t.startsWith("url(")));function ri(t){return it(t)&&"offsetHeight"in t}const si=new Set(["opacity","clipPath","filter","transform"]),oi=st(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class ai extends vn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s="loop",keyframes:o,name:a,motionValue:l,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wt.now();const u={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:s,name:a,motionValue:l,element:c,...d},h=c?.KeyframeResolver||Un;this.keyframeResolver=new h(o,(t,e,n)=>this.onKeyframesResolved(t,e,u,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,i){this.keyframeResolver=void 0;const{name:r,type:s,velocity:o,delay:a,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Wt.now(),function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const s=t[t.length-1],o=ii(r,e),a=ii(s,e);return Q(o===a,`You are trying to animate ${e} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Jn(n))&&i)}(t,r,s,o)||(!et.instantAnimations&&a||c?.(fn(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const d={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},u=!l&&function(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:s,type:o}=t;if(!ri(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return oi()&&n&&si.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==r&&0!==s&&"inertia"!==o}(d)?new ni({...d,element:d.motionValue.owner.current}):new bn(d);u.finished.then(()=>this.notifyFinished()).catch(ot),this.pendingTimeline&&(this.stopTimeline=u.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=u}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),In=!0,Wn(),$n(),In=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const li=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ci(t,e,n=1){tt(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,r]=function(t){const e=li.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const t=s.trim();return nt(t)?parseFloat(t):t}return Yt(r)?ci(r,e,n+1):r}function di(t,e){return t?.[e]??t?.default??t}const ui=new Set(["width","height","top","left","right","bottom",...Vn]),hi=t=>e=>e.test(t),mi=[Kt,le,ae,oe,de,ce,{test:t=>"auto"===t,parse:t=>t}],pi=t=>mi.find(hi(t));function fi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||rt(t))}const gi=new Set(["brightness","contrast","saturate","opacity"]);function yi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Jt)||[];if(!i)return t;const r=n.replace(i,"");let s=gi.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const vi=/\b([a-z-]*)\(.*?\)/gu,xi={...Se,getAnimatableNone:t=>{const e=t.match(vi);return e?e.map(yi).join(" "):t}},bi={...Kt,transform:Math.round},wi={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,backgroundPositionX:le,backgroundPositionY:le,...{rotate:oe,rotateX:oe,rotateY:oe,rotateZ:oe,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:oe,skewX:oe,skewY:oe,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:qt,originX:ue,originY:ue,originZ:le},zIndex:bi,fillOpacity:qt,strokeOpacity:qt,numOctaves:bi},Si={...wi,color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:xi,WebkitFilter:xi},Ci=t=>Si[t];function Ti(t,e){let n=Ci(t);return n!==xi&&(n=Se),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Pi=new Set(["auto","none","0"]);class ki extends Un{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),Yt(i))){const r=ci(i,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ui.has(n)||2!==t.length)return;const[i,r]=t,s=pi(i),o=pi(r);if(s!==o)if(Ln(s)&&Ln(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Bn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||fi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!Pi.has(e)&&ve(e).values.length&&(i=t[r]),r++}if(i&&n)for(const r of e)t[r]=Ti(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Bn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const r=n.length-1,s=n[r];n[r]=Bn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ei=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ni{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Wt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Wt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&ft(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new dt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Bt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return mt(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ai(t,e){return new Ni(t,e)}const{schedule:Mi,cancel:Vi}=jt(queueMicrotask,!1),Di={x:!1,y:!1};function Li(){return Di.x||Di.y}function Ri(t,e){const n=function(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=n?.[t]??i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function ji(t){return!("touch"===t.pointerType||Li())}const Bi=(t,e)=>!!e&&(t===e||Bi(t,e.parentElement)),Fi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Oi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const zi=new WeakSet;function Ii(t){return e=>{"Enter"===e.key&&t(e)}}function $i(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Wi(t){return Fi(t)&&!Li()}function Ui(t,e,n={}){const[i,r,s]=Ri(t,n),o=t=>{const i=t.currentTarget;if(!Wi(t))return;zi.add(i);const s=e(i,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),zi.has(i)&&zi.delete(i),Wi(t)&&"function"==typeof s&&s(t,{success:e})},a=t=>{o(t,i===window||i===document||n.useGlobalTarget||Bi(i,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),ri(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ii(()=>{if(zi.has(n))return;$i(n,"down");const t=Ii(()=>{$i(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>$i(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,r)),e=t,Oi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}function Hi(t){return it(t)&&"ownerSVGElement"in t}const _i=t=>Boolean(t&&t.getVelocity),Yi=[...mi,me,Se],Xi=s({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ki extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=ri(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qi({children:e,isPresent:n,anchorX:r}){const s=c(),a=o(null),l=o({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=d(Xi);return u(()=>{const{width:t,height:e,top:i,left:o,right:c}=l.current;if(n||!a.current||!t||!e)return;const d="left"===r?`left: ${o}`:`right: ${c}`;a.current.dataset.motionPopId=s;const u=document.createElement("style");return h&&(u.nonce=h),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.contains(u)&&document.head.removeChild(u)}},[n]),t(Ki,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(e,{ref:a})})}const Gi=({children:e,initial:n,isPresent:r,onExitComplete:s,custom:o,presenceAffectsLayout:a,mode:l,anchorX:d})=>{const u=Y(Zi),m=c();let p=!0,f=h(()=>(p=!1,{id:m,initial:n,isPresent:r,custom:o,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;s&&s()},register:t=>(u.set(t,!1),()=>u.delete(t))}),[r,u,s]);return a&&p&&(f={...f}),h(()=>{u.forEach((t,e)=>u.set(e,!1))},[r]),i.useEffect(()=>{!r&&!u.size&&s&&s()},[r]),"popLayout"===l&&(e=t(qi,{isPresent:r,anchorX:d,children:e})),t(q.Provider,{value:f,children:e})};function Zi(){return new Map}function Ji(t=!0){const e=d(q);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=c();l(()=>{if(t)return r(s)},[t]);const o=m(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,o]:[!0]}const Qi=t=>t.key||"";function tr(t){const e=[];return p.forEach(t,t=>{f(t)&&e.push(t)}),e}const er=({children:e,custom:i,initial:r=!0,onExitComplete:s,presenceAffectsLayout:a=!0,mode:l="sync",propagate:c=!1,anchorX:u="left"})=>{const[m,p]=Ji(c),f=h(()=>tr(e),[e]),y=c&&!m?[]:f.map(Qi),v=o(!0),x=o(f),b=Y(()=>new Map),[w,S]=g(f),[C,T]=g(f);K(()=>{v.current=!1,x.current=f;for(let t=0;t<C.length;t++){const e=Qi(C[t]);y.includes(e)?b.delete(e):!0!==b.get(e)&&b.set(e,!1)}},[C,y.length,y.join("-")]);const P=[];if(f!==w){let t=[...f];for(let e=0;e<C.length;e++){const n=C[e],i=Qi(n);y.includes(i)||(t.splice(e,0,n),P.push(n))}return"wait"===l&&P.length&&(t=P),T(tr(t)),S(f),null}"production"!==process.env.NODE_ENV&&"wait"===l&&C.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:k}=d(_);return t(n,{children:C.map(e=>{const n=Qi(e),o=!(c&&!m)&&(f===C||y.includes(n));return t(Gi,{isPresent:o,initial:!(v.current&&!r)&&void 0,custom:i,presenceAffectsLayout:a,mode:l,onExitComplete:o?void 0:()=>{if(!b.has(n))return;b.set(n,!0);let t=!0;b.forEach(e=>{e||(t=!1)}),t&&(k?.(),T(x.current),c&&p?.(),s&&s())},anchorX:u,children:e},n)})})},nr=s({strict:!1}),ir={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},rr={};for(const t in ir)rr[t]={isEnabled:e=>ir[t].some(t=>!!e[t])};const sr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function or(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||sr.has(t)}let ar=t=>!or(t);try{"function"==typeof(lr=require("@emotion/is-prop-valid").default)&&(ar=t=>t.startsWith("on")?!or(t):lr(t))}catch{}var lr;function cr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>("production"!==process.env.NODE_ENV&&ft(!1,"motion() is deprecated. Use motion.create() instead."),t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const dr=s({});function ur(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function hr(t){return"string"==typeof t||Array.isArray(t)}const mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pr=["initial",...mr];function fr(t){return ur(t.animate)||pr.some(e=>hr(t[e]))}function gr(t){return Boolean(fr(t)||t.variants)}function yr(t){const{initial:e,animate:n}=function(t,e){if(fr(t)){const{initial:e,animate:n}=t;return{initial:!1===e||hr(e)?e:void 0,animate:hr(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,d(dr));return h(()=>({initial:e,animate:n}),[vr(e),vr(n)])}function vr(t){return Array.isArray(t)?t.join(" "):t}const xr=Symbol.for("motionComponentSymbol");function br(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function wr(t,e,n){return m(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):br(n)&&(n.current=i))},[e])}const Sr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cr="data-"+Sr("framerAppearId"),Tr=s({});function Pr(t,e,n,i,r){const{visualElement:s}=d(dr),a=d(nr),c=d(q),h=d(Xi).reducedMotion,m=o(null);i=i||a.renderer,!m.current&&i&&(m.current=i(t,{visualState:e,parent:s,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=m.current,f=d(Tr);!p||p.projection||!r||"html"!==p.type&&"svg"!==p.type||function(t,e,n,i){const{layoutId:r,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:kr(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:Boolean(o)||a&&br(a),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:i,crossfade:d,layoutScroll:l,layoutRoot:c})}(m.current,n,r,f);const g=o(!1);u(()=>{p&&g.current&&p.update(n,c)});const y=n[Cr],v=o(Boolean(y)&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return K(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Mi.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),l(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1))}),p}function kr(t){if(t)return!1!==t.options.allowProjection?t.projection:kr(t.parent)}function Er({preloadedFeatures:n,createVisualElement:i,useRender:r,useVisualState:s,Component:o}){function a(a,l){let c;const u={...d(Xi),...a,layoutId:Nr(a)},{isStatic:h}=u,m=yr(a),p=s(a,h);if(!h&&X){!function(t,e){const n=d(nr).strict;if("production"!==process.env.NODE_ENV&&e&&n){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Q(!1,e):tt(!1,e)}}(u,n);const t=function(t){const{drag:e,layout:n}=rr;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);c=t.MeasureLayout,m.visualElement=Pr(o,p,u,i,t.ProjectionNode)}return e(dr.Provider,{value:m,children:[c&&m.visualElement?t(c,{visualElement:m.visualElement,...u}):null,r(o,a,wr(p,m.visualElement,l),p,h,m.visualElement)]})}n&&function(t){for(const e in t)rr[e]={...rr[e],...t[e]}}(n),a.displayName=`motion.${"string"==typeof o?o:`create(${o.displayName??o.name??""})`}`;const l=y(a);return l[xr]=o,l}function Nr({layoutId:t}){const e=d(_).id;return e&&void 0!==t?e+"-"+t:t}const Ar={};function Mr(t,{layout:e,layoutId:n}){return Dn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ar[t]||"opacity"===t)}const Vr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dr=Vn.length;function Lr(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Dn.has(t))o=!0;else if(Ht(t))r[t]=n;else{const e=Ei(n,wi[t]);t.startsWith("origin")?(a=!0,s[t]=e):i[t]=e}}if(e.transform||(o||n?i.transform=function(t,e,n){let i="",r=!0;for(let s=0;s<Dr;s++){const o=Vn[s],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Ei(a,wi[o]);l||(r=!1,i+=`${Vr[o]||o}(${t}) `),n&&(e[o]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=s;i.transformOrigin=`${t} ${e} ${n}`}}const Rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jr(t,e,n){for(const i in e)_i(e[i])||Mr(i,n)||(t[i]=e[i])}function Br(t,e){const n={};return jr(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return h(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Lr(n,e,t),Object.assign({},n.vars,n.style)},[e])}(t,e)),n}function Fr(t,e){const n={},i=Br(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},zr={offset:"strokeDashoffset",array:"strokeDasharray"};function Ir(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:o=0,...a},l,c,d){if(Lr(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:h}=t;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),void 0!==e&&(u.x=e),void 0!==n&&(u.y=n),void 0!==i&&(u.scale=i),void 0!==r&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?Or:zr;t[s.offset]=le.transform(-i);const o=le.transform(e),a=le.transform(n);t[s.array]=`${o} ${a}`}(u,r,s,o,!1)}const $r=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Wr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ur(t,e,n,i){const r=h(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ir(n,e,Wr(i),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[e]);if(t.style){const e={};jr(e,t.style,t),r.style={...e,...r.style}}return r}const Hr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _r(t){return"string"==typeof t&&!t.includes("-")&&!!(Hr.indexOf(t)>-1||/[A-Z]/u.test(t))}function Yr(t=!1){return(e,n,i,{latestValues:r},s)=>{const o=(_r(e)?Ur:Fr)(n,r,s,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(ar(r)||!0===n&&or(r)||!e&&!or(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==v?{...a,...o,ref:i}:{},{children:c}=n,d=h(()=>_i(c)?c.get():c,[c]);return x(e,{...l,children:d})}}function Xr(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Kr(t,e,n,i){if("function"==typeof e){const[r,s]=Xr(i);e=e(void 0!==n?n:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,s]=Xr(i);e=e(void 0!==n?n:t.custom,r,s)}return e}function qr(t){return _i(t)?t.get():t}const Gr=t=>(e,n)=>{const i=d(dr),r=d(q),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:Zr(n,i,r,t),renderState:e()}}(t,e,i,r);return n?s():Y(s)};function Zr(t,e,n,i){const r={},s=i(t,{});for(const t in s)r[t]=qr(s[t]);let{initial:o,animate:a}=t;const l=fr(t),c=gr(t);e&&c&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const u=d?a:o;if(u&&"boolean"!=typeof u&&!ur(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=Kr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(r[t]=e)}for(const e in t)r[e]=t[e]}}}return r}function Jr(t,e,n){const{style:i}=t,r={};for(const s in i)(_i(i[s])||e.style&&_i(e.style[s])||Mr(s,t)||void 0!==n?.getValue(s)?.liveStyle)&&(r[s]=i[s]);return r}const Qr={useVisualState:Gr({scrapeMotionValuesFromProps:Jr,createRenderState:Rr})};function ts(t,e,n){const i=Jr(t,e,n);for(const n in t)if(_i(t[n])||_i(e[n])){i[-1!==Vn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const es={useVisualState:Gr({scrapeMotionValuesFromProps:ts,createRenderState:$r})};function ns(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Er({..._r(n)?es:Qr,preloadedFeatures:t,useRender:Yr(i),createVisualElement:e,Component:n})}}function is(t,e,n){const i=t.getProps();return Kr(i,e,void 0!==n?n:i.custom,t)}const rs=t=>Array.isArray(t);function ss(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ai(n))}function os(t){return rs(t)?t[t.length-1]||0:t}function as(t,e){const n=t.getValue("willChange");if(i=n,Boolean(_i(i)&&i.add))return n.add(e);if(!n&&et.WillChange){const n=new et.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function ls(t){return t.props[Cr]}const cs=t=>null!==t;const ds={type:"spring",stiffness:500,damping:25,restSpeed:10},us={type:"keyframes",duration:.8},hs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ms=(t,{keyframes:e})=>e.length>2?us:Dn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ds:hs;const ps=(t,e,n,i={},r,s)=>o=>{const a=di(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=ut(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||Object.assign(d,ms(t,d)),d.duration&&(d.duration=ut(d.duration)),d.repeatDelay&&(d.repeatDelay=ut(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),(et.instantAnimations||et.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!s&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(cs),s=e&&"loop"!==n&&e%2==1?0:r.length-1;return s&&void 0!==i?i:r[s]}(d.keyframes,a);if(void 0!==t)return void Bt.update(()=>{d.onUpdate(t),d.onComplete()})}return a.isSync?new bn(d):new ai(d)};function fs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function gs(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(s=i);const l=[],c=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||c&&fs(c,e))continue;const o={delay:n,...di(s||{},e)},d=i.get();if(void 0!==d&&!i.isAnimating&&!Array.isArray(r)&&r===d&&!o.velocity)continue;let u=!1;if(window.MotionHandoffAnimation){const n=ls(t);if(n){const t=window.MotionHandoffAnimation(n,e,Bt);null!==t&&(o.startTime=t,u=!0)}}as(t,e),i.start(ps(e,i,r,t.shouldReduceMotion&&ui.has(e)?{type:!1}:o,t,u));const h=i.animation;h&&l.push(h)}return o&&Promise.all(l).then(()=>{Bt.update(()=>{o&&function(t,e){const n=is(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const e in s)ss(t,e,os(s[e]))}(t,o)})}),l}function ys(t,e,n={}){const i=is(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>Promise.all(gs(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,n=0,i=0,r=1,s){const o=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(vs).forEach((t,i)=>{t.notify("AnimationStart",e),o.push(ys(t,e,{...s,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(o)}(t,e,s+i,o,a,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[t,e]="beforeChildren"===a?[s,o]:[o,s];return t().then(()=>e())}return Promise.all([s(),o(n.delay)])}function vs(t,e){return t.sortNodePosition(e)}function xs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const bs=pr.length;function ws(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&ws(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<bs;n++){const i=pr[n],r=t.props[i];(hr(r)||!1===r)&&(e[i]=r)}return e}const Ss=[...mr].reverse(),Cs=mr.length;function Ts(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map(e=>ys(t,e,n));i=Promise.all(r)}else if("string"==typeof e)i=ys(t,e,n);else{const r="function"==typeof e?is(t,e,n.custom):e;i=Promise.all(gs(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}(t,e,n)))}function Ps(t){let e=Ts(t),n=Ns(),i=!0;const r=e=>(n,i)=>{const r=is(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(r){const{transition:t,transitionEnd:e,...i}=r;n={...n,...i,...e}}return n};function s(s){const{props:o}=t,a=ws(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<Cs;e++){const h=Ss[e],m=n[h],p=void 0!==o[h]?o[h]:a[h],f=hr(p),g=h===s?m.isActive:null;!1===g&&(u=e);let y=p===a[h]&&p!==o[h]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...d},!m.isActive&&null===g||!p&&!m.prevProp||ur(p)||"boolean"==typeof p)continue;const v=ks(m.prevProp,p);let x=v||h===s&&m.isActive&&!y&&f||e>u&&f,b=!1;const w=Array.isArray(p)?p:[p];let S=w.reduce(r(h),{});!1===g&&(S={});const{prevResolvedValues:C={}}=m,T={...C,...S},P=e=>{x=!0,c.has(e)&&(b=!0,c.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=S[t],n=C[t];if(d.hasOwnProperty(t))continue;let i=!1;i=rs(e)&&rs(n)?!xs(e,n):e!==n,i?null!=e?P(t):c.add(t):void 0!==e&&c.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=S,m.isActive&&(d={...d,...S}),i&&t.blockInitialAnimation&&(x=!1);x&&(!(y&&v)||b)&&l.push(...w.map(t=>({animation:t,options:{type:h}})))}if(c.size){const e={};if("boolean"!=typeof o.initial){const n=is(t,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==o.initial&&o.initial!==o.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:s,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const r=s(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ns(),i=!0}}}function ks(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!xs(e,t)}function Es(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ns(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class As{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Ms=0;const Vs={animation:{Feature:class extends As{constructor(t){super(t),t.animationState||(t.animationState=Ps(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ur(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends As{constructor(){super(...arguments),this.id=Ms++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Ds(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function Ls(t){return{point:{x:t.pageX,y:t.pageY}}}function Rs(t,e,n,i){return Ds(t,e,(t=>e=>Fi(e)&&t(e,Ls(e)))(n),i)}function js({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bs(t){return t.max-t.min}function Fs(t,e,n,i=.5){t.origin=i,t.originPoint=Pe(e.min,e.max,t.origin),t.scale=Bs(n)/Bs(e),t.translate=Pe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Os(t,e,n,i){Fs(t.x,e.x,n.x,i?i.originX:void 0),Fs(t.y,e.y,n.y,i?i.originY:void 0)}function zs(t,e,n){t.min=n.min+e.min,t.max=t.min+Bs(e)}function Is(t,e,n){t.min=e.min-n.min,t.max=t.min+Bs(e)}function $s(t,e,n){Is(t.x,e.x,n.x),Is(t.y,e.y,n.y)}const Ws=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Us(t){return[t("x"),t("y")]}function Hs(t){return void 0===t||1===t}function _s({scale:t,scaleX:e,scaleY:n}){return!Hs(t)||!Hs(e)||!Hs(n)}function Ys(t){return _s(t)||Xs(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Xs(t){return Ks(t.x)||Ks(t.y)}function Ks(t){return t&&"0%"!==t}function qs(t,e,n){return n+e*(t-n)}function Gs(t,e,n,i,r){return void 0!==r&&(t=qs(t,r,i)),qs(t,n,i)+e}function Zs(t,e=0,n=1,i,r){t.min=Gs(t.min,e,n,i,r),t.max=Gs(t.max,e,n,i,r)}function Js(t,{x:e,y:n}){Zs(t.x,e.translate,e.scale,e.originPoint),Zs(t.y,n.translate,n.scale,n.originPoint)}const Qs=.999999999999,to=1.0000000000001;function eo(t,e){t.min=t.min+e,t.max=t.max+e}function no(t,e,n,i,r=.5){Zs(t,e,n,Pe(t.min,t.max,r),i)}function io(t,e){no(t.x,e.x,e.scaleX,e.scale,e.originX),no(t.y,e.y,e.scaleY,e.scale,e.originY)}function ro(t,e){return js(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const so=({current:t})=>t?t.ownerDocument.defaultView:null,oo=(t,e)=>Math.abs(t-e);class ao{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=uo(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=oo(t.x,e.x),i=oo(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Ot;this.history.push({...i,timestamp:r});const{onStart:s,onMove:o}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=lo(e,this.transformPagePoint),Bt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=uo("pointercancel"===t.type?this.lastMoveEventInfo:lo(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Fi(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const s=lo(Ls(t),this.transformPagePoint),{point:o}=s,{timestamp:a}=Ot;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,uo(s,this.history)),this.removeListeners=lt(Rs(this.contextWindow,"pointermove",this.handlePointerMove),Rs(this.contextWindow,"pointerup",this.handlePointerUp),Rs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ft(this.updatePoint)}}function lo(t,e){return e?{point:e(t.point)}:t}function co(t,e){return{x:t.x-e.x,y:t.y-e.y}}function uo({point:t},e){return{point:t,delta:co(t,mo(e)),offset:co(t,ho(e)),velocity:po(e,.1)}}function ho(t){return t[0]}function mo(t){return t[t.length-1]}function po(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=mo(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>ut(e)));)n--;if(!i)return{x:0,y:0};const s=ht(r.timestamp-i.timestamp);if(0===s)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fo(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function go(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const yo=.35;function vo(t,e,n){return{min:xo(t,e),max:xo(t,n)}}function xo(t,e){return"number"==typeof t?t:t[e]||0}const bo=new WeakMap;class wo{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new ao(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Ls(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(s=n)||"y"===s?Di[s]?null:(Di[s]=!0,()=>{Di[s]=!1}):Di.x||Di.y?null:(Di.x=Di.y=!0,()=>{Di.x=Di.y=!1}),!this.openDragLock))return;var s;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Us(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ae.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Bs(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),r&&Bt.postRender(()=>r(t,e)),as(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(o),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),s&&s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Us(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:so(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&Bt.postRender(()=>r(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!So(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Pe(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Pe(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&br(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:fo(t.x,n,r),y:fo(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=yo){return!1===t?t=0:!0===t&&(t=yo),{x:vo(t,"left","right"),y:vo(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Us(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!br(t))return!1;const n=t.current;tt(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=ro(t,n),{scroll:r}=e;return r&&(eo(i.x,r.offset.x),eo(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:go(t.x,e.x),y:go(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=js(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=Us(o=>{if(!So(o,e,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[o]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)});return Promise.all(l).then(o)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return as(this.visualElement,t),n.start(ps(t,n,0,e,this.visualElement,!1))}stopAnimation(){Us(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Us(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Us(e=>{const{drag:n}=this.getProps();if(!So(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.layoutBox[e];r.set(t[e]-Pe(n,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!br(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Us(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Bs(t),r=Bs(e);return r>i?n=ct(e.min,e.max-i,t.min):i>r&&(n=ct(t.min,t.max-r,e.min)),J(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Us(e=>{if(!So(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];n.set(Pe(r,s,i[e]))})}addListeners(){if(!this.visualElement.current)return;bo.set(this.visualElement,this);const t=Rs(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();br(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Bt.read(e);const r=Ds(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Us(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:s=yo,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:s,dragMomentum:o}}}function So(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Co=t=>(e,n)=>{t&&Bt.postRender(()=>t(e,n))};const To={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Po(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ko={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!le.test(t))return t;t=parseFloat(t)}return`${Po(t,e.target.x)}% ${Po(t,e.target.y)}%`}},Eo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Se.parse(t);if(r.length>5)return i;const s=Se.createTransformer(t),o="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const c=Pe(a,l,.5);return"number"==typeof r[2+o]&&(r[2+o]/=c),"number"==typeof r[3+o]&&(r[3+o]/=c),s(r)}};class No extends b{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;!function(t){for(const e in t)Ar[e]=t[e],Ht(e)&&(Ar[e].isCSSVariable=!0)}(Mo),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),To.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,{projection:s}=n;return s?(s.isPresent=r,i||t.layoutDependency!==e||void 0===e||t.isPresent!==r?s.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?s.promote():s.relegate()||Bt.postRender(()=>{const t=s.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ao(e){const[n,i]=Ji(),r=d(_);return t(No,{...e,layoutGroup:r,switchLayoutGroup:d(Tr),isPresent:n,safeToRemove:i})}const Mo={borderRadius:{...ko,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomLeftRadius:ko,borderBottomRightRadius:ko,boxShadow:Eo};const Vo=(t,e)=>t.depth-e.depth;class Do{constructor(){this.children=[],this.isDirty=!1}add(t){G(this.children,t),this.isDirty=!0}remove(t){Z(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vo),this.isDirty=!1,this.children.forEach(t)}}const Lo=["TopLeft","TopRight","BottomLeft","BottomRight"],Ro=Lo.length,jo=t=>"string"==typeof t?parseFloat(t):t,Bo=t=>"number"==typeof t||le.test(t);function Fo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Oo=Io(0,.5,Pt),zo=Io(.5,.95,ot);function Io(t,e,n){return i=>i<t?0:i>e?1:n(ct(t,e,i))}function $o(t,e){t.min=e.min,t.max=e.max}function Wo(t,e){$o(t.x,e.x),$o(t.y,e.y)}function Uo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ho(t,e,n,i,r){return t=qs(t-=e,1/n,i),void 0!==r&&(t=qs(t,1/r,i)),t}function _o(t,e,[n,i,r],s,o){!function(t,e=0,n=1,i=.5,r,s=t,o=t){ae.test(e)&&(e=parseFloat(e),e=Pe(o.min,o.max,e/100)-o.min);if("number"!=typeof e)return;let a=Pe(s.min,s.max,i);t===s&&(a-=e),t.min=Ho(t.min,e,n,a,r),t.max=Ho(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,s,o)}const Yo=["x","scaleX","originX"],Xo=["y","scaleY","originY"];function Ko(t,e,n,i){_o(t.x,e,Yo,n?n.x:void 0,i?i.x:void 0),_o(t.y,e,Xo,n?n.y:void 0,i?i.y:void 0)}function qo(t){return 0===t.translate&&1===t.scale}function Go(t){return qo(t.x)&&qo(t.y)}function Zo(t,e){return t.min===e.min&&t.max===e.max}function Jo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Qo(t,e){return Jo(t.x,e.x)&&Jo(t.y,e.y)}function ta(t){return Bs(t.x)/Bs(t.y)}function ea(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class na{constructor(){this.members=[]}add(t){G(this.members,t),t.scheduleRender()}remove(t){if(Z(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const ia=["","X","Y","Z"],ra={visibility:"hidden"};let sa=0;function oa(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function aa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ls(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Bt,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&aa(i)}function la({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=e?.()){this.id=sa++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ua),this.nodes.forEach(va),this.nodes.forEach(xa),this.nodes.forEach(ha)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Do)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new dt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;var n;this.isSVG=Hi(e)&&!(Hi(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Wt.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(Ft(i),t(s-e))};return Bt.setup(i,!0),()=>Ft(i)}(i,250),To.hasAnimatedSinceResize&&(To.hasAnimatedSinceResize=!1,this.nodes.forEach(ya))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Pa,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Qo(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...di(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||ya(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ft(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ba),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&aa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(pa);this.isUpdating||this.nodes.forEach(fa),this.isUpdating=!1,this.nodes.forEach(ga),this.nodes.forEach(ca),this.nodes.forEach(da),this.clearAllSnapshots();const t=Wt.now();Ot.delta=J(0,1e3/60,t-Ot.timestamp),Ot.timestamp=t,Ot.isProcessing=!0,zt.update.process(Ot),zt.preRender.process(Ot),zt.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ma),this.sharedNodes.forEach(wa)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Bs(this.snapshot.measuredBox.x)||Bs(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Go(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Ys(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Na((i=n).x),Na(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ma))){const{scroll:t}=this.root;t&&(eo(e.x,t.offset.x),eo(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Wo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:r,options:s}=i;i!==this.root&&r&&s.layoutScroll&&(r.wasRoot&&Wo(e,t),eo(e.x,r.offset.x),eo(e.y,r.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Wo(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&io(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Ys(i.latestValues)&&io(n,i.latestValues)}return Ys(this.latestValues)&&io(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Wo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Ys(n.latestValues))continue;_s(n.latestValues)&&n.updateSnapshot();const i=Ws();Wo(i,n.measurePageBox()),Ko(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Ys(this.latestValues)&&Ko(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:r}=this.options;if(this.layout&&(i||r)){if(this.resolvedRelativeTargetAt=Ot.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$s(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,o,a;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,a=this.relativeParent.target,zs(s.x,o.x,a.x),zs(s.y,o.y,a.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Wo(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):Wo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$s(this.relativeTargetOrigin,this.target,t.target),Wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!_s(this.parent.latestValues)&&!Xs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(n=!1),n)return;const{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!r)return;Wo(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,o=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let s,o;e.x=e.y=1;for(let a=0;a<r;a++){s=n[a],o=s.projectionDelta;const{visualElement:r}=s.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&io(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Js(t,o)),i&&Ys(s.latestValues)&&io(t,s.latestValues))}e.x<to&&e.x>Qs&&(e.x=1),e.y<to&&e.y>Qs&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Uo(this.prevProjectionDelta.x,this.projectionDelta.x),Uo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Os(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===s&&this.treeScale.y===o&&ea(this.projectionDelta.x,this.prevProjectionDelta.x)&&ea(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const o={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ta));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,m,p,f,g;Sa(s.x,t.x,n),Sa(s.y,t.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($s(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=o,g=n,Ca(m.x,p.x,f.x,g),Ca(m.y,p.y,f.y,g),u&&(l=this.relativeTarget,h=u,Zo(l.x,h.x)&&Zo(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),Wo(u,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,s){r?(t.opacity=Pe(0,n.opacity??1,Oo(i)),t.opacityExit=Pe(e.opacity??1,0,zo(i))):s&&(t.opacity=Pe(e.opacity??1,n.opacity??1,i));for(let r=0;r<Ro;r++){const s=`border${Lo[r]}Radius`;let o=Fo(e,s),a=Fo(n,s);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Bo(o)===Bo(a)?(t[s]=Math.max(Pe(jo(o),jo(a),i),0),(ae.test(a)||ae.test(o))&&(t[s]+="%")):t[s]=a)}(e.rotate||n.rotate)&&(t.rotate=Pe(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bt.update(()=>{To.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ai(0)),this.currentAnimation=function(t,e,n){const i=_i(t)?t:Ai(t);return i.start(ps("",i,e,n)),i.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Bs(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Bs(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Wo(e,n),io(e,r),Os(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new na);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&oa("z",t,i,this.animationValues);for(let e=0;e<ia.length;e++)oa(`rotate${ia[e]}`,t,i,this.animationValues),oa(`skew${ia[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ra;const e={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.opacity="",e.pointerEvents=qr(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none",e;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=qr(t?.pointerEvents)||""),this.hasProjected&&!Ys(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1),e}const r=i.animationValues||i.latestValues;this.applyTransformsToTarget(),e.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,o=n?.z||0;if((r||s||o)&&(i=`translate3d(${r}px, ${s}px, ${o}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:s,skewX:o,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),s&&(i+=`rotateY(${s}deg) `),o&&(i+=`skewX(${o}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),n&&(e.transform=n(r,e.transform));const{x:s,y:o}=this.projectionDelta;e.transformOrigin=`${100*s.origin}% ${100*o.origin}% 0`,i.animationValues?e.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:e.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in Ar){if(void 0===r[t])continue;const{correct:n,applyTo:s,isCSSVariable:o}=Ar[t],a="none"===e.transform?r[t]:n(r[t],i);if(s){const t=s.length;for(let n=0;n<t;n++)e[s[n]]=a}else o?this.options.visualElement.renderState.vars[t]=a:e[t]=a}return this.options.layoutId&&(e.pointerEvents=i===this?qr(t?.pointerEvents)||"":"none"),e}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(pa),this.root.sharedNodes.clear()}}}function ca(t){t.updateLayout()}function da(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,s=e.source!==t.layout.source;"size"===r?Us(t=>{const i=s?e.measuredBox[t]:e.layoutBox[t],r=Bs(i);i.min=n[t].min,i.max=i.min+r}):Aa(r,e.layoutBox,n)&&Us(i=>{const r=s?e.measuredBox[i]:e.layoutBox[i],o=Bs(n[i]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+o)});const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Os(o,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?Os(a,t.applyTransform(i,!0),e.measuredBox):Os(a,n,e.layoutBox);const l=!Go(o);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:s}=i;if(r&&s){const o={x:{min:0,max:0},y:{min:0,max:0}};$s(o,e.layoutBox,r.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};$s(a,n,s.layoutBox),Qo(o,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ua(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ha(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ma(t){t.clearSnapshot()}function pa(t){t.clearMeasurements()}function fa(t){t.isLayoutDirty=!1}function ga(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ya(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function va(t){t.resolveTargetDelta()}function xa(t){t.calcProjection()}function ba(t){t.resetSkewAndRotation()}function wa(t){t.removeLeadSnapshot()}function Sa(t,e,n){t.translate=Pe(e.translate,0,n),t.scale=Pe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ca(t,e,n,i){t.min=Pe(e.min,n.min,i),t.max=Pe(e.max,n.max,i)}function Ta(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Pa={duration:.45,ease:[.4,0,.1,1]},ka=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ea=ka("applewebkit/")&&!ka("chrome/")?Math.round:ot;function Na(t){t.min=Ea(t.min),t.max=Ea(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=ta(e),r=ta(n),s=.2,!(Math.abs(i-r)<=s));var i,r,s}function Ma(t){return t!==t.root&&t.scroll?.wasRoot}const Va=la({attachResizeListener:(t,e)=>Ds(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Da={current:void 0},La=la({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Da.current){const t=new Va({});t.mount(window),t.setOptions({layoutScroll:!0}),Da.current=t}return Da.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ra={pan:{Feature:class extends As{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new ao(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:so(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Co(t),onStart:Co(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Bt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends As{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new wo(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:La,MeasureLayout:Ao}};function ja(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const r=i["onHover"+n];r&&Bt.postRender(()=>r(e,Ls(e)))}function Ba(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const r=i["onTap"+("End"===n?"":n)];r&&Bt.postRender(()=>r(e,Ls(e)))}const Fa=new WeakMap,Oa=new WeakMap,za=t=>{const e=Fa.get(t.target);e&&e(t)},Ia=t=>{t.forEach(za)};function $a(t,e,n){const i=function({root:t,...e}){const n=t||document;Oa.has(n)||Oa.set(n,{});const i=Oa.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Ia,{root:t,...e})),i[r]}(e);return Fa.set(t,n),i.observe(t),()=>{Fa.delete(t),i.unobserve(t)}}const Wa={some:0,all:1};const Ua={inView:{Feature:class extends As{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,s={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Wa[i]};return $a(this.node.current,s,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),s=e?n:i;s&&s(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends As{mount(){const{current:t}=this.node;t&&(this.unmount=Ui(t,(t,e)=>(Ba(this.node,e,"Start"),(t,{success:e})=>Ba(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends As{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(Ds(this.node.current,"focus",()=>this.onFocus()),Ds(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends As{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,n={}){const[i,r,s]=Ri(t,n),o=t=>{if(!ji(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const s=t=>{ji(t)&&(i(t),n.removeEventListener("pointerleave",s))};n.addEventListener("pointerleave",s,r)};return i.forEach(t=>{t.addEventListener("pointerenter",o,r)}),s}(t,(t,e)=>(ja(this.node,e,"Start"),t=>ja(this.node,t,"End"))))}unmount(){}}}},Ha={layout:{ProjectionNode:La,MeasureLayout:Ao}},_a={current:null},Ya={current:!1};function Xa(){if(Ya.current=!0,X)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_a.current=t.matches;t.addListener(e),e()}else _a.current=!1}const Ka=new WeakMap;const qa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ga{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Un,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Wt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Bt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=fr(e),this.isVariantNode=gr(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==a[t]&&_i(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Ka.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Ya.current||Xa(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||_a.current),"production"!==process.env.NODE_ENV&&ft(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Dn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Bt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rr){const e=rr[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<qa.length;e++){const n=qa[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],s=n[i];if(_i(r))t.addValue(i,r);else if(_i(s))t.addValue(i,Ai(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Ai(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Ai(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=n&&("string"==typeof n&&(nt(n)||rt(n))?n=parseFloat(n):(i=n,!Yi.find(hi(i))&&Se.test(e)&&(n=Ti(t,e))),this.setBaseTarget(t,_i(n)?n.get():n)),_i(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=Kr(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||_i(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new dt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Za extends Ga{constructor(){super(...arguments),this.KeyframeResolver=ki}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_i(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ja(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}class Qa extends Za{constructor(){super(...arguments),this.type="html",this.renderInstance=Ja}readValueFromInstance(t,e){if(Dn.has(e))return this.projection?.isProjecting?Nn(e):((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),r=(Ht(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ro(t,e)}build(t,e,n){Lr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Jr(t,e,n)}}const tl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);class el extends Za{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ws}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Dn.has(e)){const t=Ci(e);return t&&t.default||0}return e=tl.has(e)?e:Sr(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return ts(t,e,n)}build(t,e,n){Ir(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ja(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(tl.has(n)?n:Sr(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Wr(t.tagName),super.mount(t)}}const nl=(t,e)=>_r(t)?new el(e):new Qa(e,{allowProjection:t!==v}),il=cr(ns({...Vs,...Ua,...Ra,...Ha},nl));function rl(){!Ya.current&&Xa();const[t]=g(_a.current);return"production"!==process.env.NODE_ENV&&ft(!0!==t,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),t}const sl=({isOpen:i,onClose:r,onToggle:s,menuItems:a,logoUrl:c,logoAlt:d="Logo",systemName:u="PASS",defaultLogoUrl:m,dashboardPath:p,className:f="fixed inset-y-0 left-0 z-50 w-80 bg-white shadow-xl",overlayClassName:y="fixed inset-0 bg-black/25 z-40",desktopMenuClassName:v="h-full flex flex-col",showBottomMenu:x=!0,bottomMenuItems:b=[{id:"settings",label:"Configuración",icon:W,action:()=>{}},{id:"help",label:"Ayuda",icon:z,action:()=>{}},{id:"logout",label:"Cerrar Sesión",icon:I,action:()=>{}}],activePath:w="",onNavigate:S,children:C,performanceMode:T="auto",fpsThreshold:P,fpsSampleSize:k,compatibilityMode:E=!1,onPerformanceModeChange:N})=>{const[A,M]=g(new Set),{effectiveMode:V}=function({mode:t="auto",fpsThreshold:e=45,fpsSampleSize:n=90,compatibilityFlag:i=!1,onModeChange:r}={}){const[s,a]=g(!1),[c,d]=g(!1),u=o("full");l(()=>{if("undefined"==typeof window||"full"===t||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>a(e.matches);return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[t]),l(()=>{if("undefined"==typeof window||"undefined"==typeof performance||"auto"!==t||s||i)return;let r=0,o=0,a=performance.now(),l=null;const c=Math.min(Math.max(30,n),240),u=t=>{const n=t-a;a=t,r>0&&(o+=1e3/n),r+=1,r>=c?o/(r-1||1)<e&&d(!0):l=window.requestAnimationFrame(u)};return l=window.requestAnimationFrame(u),()=>{null!==l&&window.cancelAnimationFrame(l)}},[t,s,i,n,e]);const m=h(()=>"full"===t||"lite"===t?t:i||s||c?"lite":"full",[t,i,s,c]);return l(()=>{r?u.current!==m&&(r(m),u.current=m):u.current=m},[m,r]),{effectiveMode:m,prefersReducedMotion:s,detectedLowPerformance:c,compatibilityFlag:i}}({mode:T,fpsThreshold:P,fpsSampleSize:k,compatibilityFlag:E,onModeChange:N}),D="lite"===V,L=h(()=>D?{boxShadow:"0 4px 12px rgba(15, 23, 42, 0.12)",backgroundColor:"rgba(255, 255, 255, 0.96)",transform:i?"translateX(0)":"translateX(-100%)",transition:"none"}:{willChange:"transform"},[D,i]),R=h(()=>D?{backgroundColor:"rgba(15, 23, 42, 0.28)"}:{willChange:"opacity"},[D]),j="string"==typeof m&&""!==m.trim()?m:void 0,B="string"==typeof c&&""!==c.trim()?c:j,$=t=>w.includes(t),H=t=>{S&&S(t),r()},_=(n,i=!1)=>e(il.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:`w-full flex items-center justify-between py-3 rounded-lg transition-colors group ${i?"pr-4 pl-10":"px-4"} ${$(n.path)?"bg-primary-botech text-white":"text-gray-700 hover:bg-gray-100"}`,onClick:()=>H(n.path),children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(O,{className:"w-4 h-4 transition-transform "+($(n.path)?"rotate-90":"group-hover:translate-x-1")})]},n.id),Y=n=>{const i=A.has(n.id);return e("div",{className:"mb-2",children:[e(il.button,{whileHover:D?void 0:{scale:1.01},whileTap:D?void 0:{scale:.99},transition:D?{duration:.1}:{duration:.16,ease:[.4,0,.2,1]},style:D?void 0:{willChange:"transform"},className:"w-full flex items-center justify-between px-4 py-3 rounded-lg transition-colors group text-gray-700 hover:bg-gray-100",onClick:()=>{return t=n.id,void M(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[e("div",{className:"flex items-center space-x-3",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"font-medium text-sm",children:n.label})]}),t(F,{className:"w-4 h-4 transition-transform "+(i?"rotate-180":"")})]}),D?i&&t("div",{className:"pt-2 space-y-1",children:n.children.map(t=>_(t,!0))}):t(er,{initial:!1,children:i&&t(il.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.22,ease:[.33,1,.68,1]},className:"overflow-hidden pt-2 space-y-1",style:{willChange:"transform, opacity"},children:n.children.map(t=>_(t,!0))},`${n.id}-content`)})]},n.id)},X=e("div",{className:v,children:[e("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e("button",{type:"button",onClick:()=>{p&&H(p)},className:"flex items-center space-x-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-botech rounded-lg",children:[t("div",{className:"w-8 h-8 flex items-center justify-center",children:B?t("img",{src:B,alt:d,className:"h-full object-contain"}):t("div",{className:"h-full w-full bg-primary-botech rounded-lg flex items-center justify-center",children:t("span",{className:"text-white font-bold text-sm",children:u.charAt(0)})})}),t("h1",{className:"text-lg font-bold text-gray-800",children:u})]}),t("button",{onClick:r,className:"p-1 rounded-lg text-gray-500 hover:bg-gray-100 transition-colors",children:t(U,{className:"w-5 h-5"})})]}),t("div",{className:"flex-1 overflow-y-auto p-4",children:t("nav",{className:"space-y-2",children:a.map(t=>"folder"===t.type?Y(t.data):_(t.data))})}),x&&t("div",{className:"p-4 border-t border-gray-200",children:t("div",{className:"space-y-2",children:b.map(n=>e("button",{onClick:n.action,className:"w-full flex items-center space-x-3 px-4 py-2 rounded-lg text-gray-700 hover:bg-gray-100 transition-colors",children:[t(n.icon,{className:"w-5 h-5"}),t("span",{className:"text-sm",children:n.label})]},n.id))})}),C&&t("div",{className:"p-4 border-t border-gray-200",children:C})]});return e(n,{children:[D?i&&t("div",{className:y,style:R,onClick:r,"data-motion-mode":V}):t(er,{initial:!1,children:i&&t(il.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:[.25,1,.5,1]},className:y,style:R,onClick:r})}),D?t("div",{className:f,style:L,"data-motion-mode":V,children:X}):t(il.div,{initial:!1,animate:{x:i?0:"-100%",opacity:1},transition:{type:"spring",stiffness:280,damping:32,mass:.9},className:f,style:L,"data-motion-mode":V,children:X})]})};function ol(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function al(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,a)}l((i=i.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const ll=t=>{if("85"===t)return"/back85";if("87"===t)return"/back87";if("undefined"!=typeof window){if(window.location.hostname.toLowerCase().includes("seguimiento"))return"/back85"}return"/back87"},cl=(t,e)=>al(void 0,void 0,void 0,function*(){const n=`${ll(t)}/student/downloadExcel/${e||"PASS"}`;return(yield S.get(n,{responseType:"blob"})).data}),dl=(t,e,n)=>al(void 0,void 0,void 0,function*(){const i=`${ll(e)}/student/uploadExcel`,r=new FormData;r.append("receivedExcelFile",t),"85"===e&&n&&r.append("clientName",n);return(yield S.post(i,r,{transformRequest:[t=>t]})).data}),ul=({backend:e,label:n="Descargar Lista de Estudiantes en Excel",fileName:i="students.xlsx",className:r,variant:s="primary",clientName:o,onSuccess:a,onError:l})=>{const[c,d]=g(!1);return t(T,{variant:s,onClick:()=>al(void 0,void 0,void 0,function*(){var t,n,r,s,c,u,h;try{d(!0);let t=o;if("85"===e&&!t){const{value:e}=yield w.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void d(!1);t=e}const n=yield cl(e,t),r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=i,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(r),yield w.fire({title:"¡Descarga exitosa!",text:"El archivo se ha descargado correctamente",icon:"success",confirmButtonText:"OK"}),null==a||a()}catch(e){console.error("Download students excel failed",e);let i="No se pudo descargar el archivo. Por favor, inténtelo nuevamente.";const o=e;i=null!==(h=null!==(c=null!==(r=null===(n=null===(t=null==o?void 0:o.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.message)&&void 0!==r?r:"string"==typeof(null===(s=null==o?void 0:o.response)||void 0===s?void 0:s.data)?o.response.data:void 0)&&void 0!==c?c:(null===(u=null==o?void 0:o.response)||void 0===u?void 0:u.statusText)?`Error ${o.response.status}: ${o.response.statusText}`:void 0)&&void 0!==h?h:i,yield w.fire({title:"Error en la descarga",text:i,icon:"error",confirmButtonText:"OK"}),null==l||l(e)}finally{d(!1)}}),className:r,children:c?"Descargando...":n})},hl=({backend:i,label:r="Cargar Lista de Estudiantes en Excel",className:s,variant:a="primary",clientName:l,onSuccess:c,onError:d})=>{const u=o(null),[h,m]=g(!1);return e(n,{children:[t(T,{variant:a,onClick:()=>{var t;null===(t=u.current)||void 0===t||t.click()},className:s,children:h?"Subiendo...":r}),t("input",{type:"file",accept:".xlsx,.xls",ref:u,className:"hidden",onChange:t=>al(void 0,void 0,void 0,function*(){var e,n,r,s,o,a,h,p;const f=null===(e=t.target.files)||void 0===e?void 0:e[0];if(!f)return;if([/\.xlsx$/i,/\.xls$/i].some(t=>t.test(f.name)))if(0!==f.size)try{m(!0);let t=l;if("85"===i&&!t){const{value:e}=yield w.fire({title:"Cliente requerido",text:"Ingrese el nombre del cliente:",input:"text",inputPlaceholder:"Ej: GIMNASIO FEMENINO",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",inputValidator:t=>{if(!t||""===t.trim())return"El nombre del cliente es requerido"}});if(!e)return void m(!1);t=e}const e=yield dl(f,i,t);let n="El archivo se ha cargado correctamente";(null==e?void 0:e.message)?n=e.message:"string"==typeof e&&(n=e),yield w.fire({title:"¡Carga exitosa!",text:n,icon:"success",confirmButtonText:"OK"}),null==c||c()}catch(t){console.error("Upload students excel failed",t),console.error("Error details:",t);let e="Hubo un problema al subir el archivo";const i=t;e=null!==(p=null!==(a=null!==(s=null===(r=null===(n=null==i?void 0:i.response)||void 0===n?void 0:n.data)||void 0===r?void 0:r.message)&&void 0!==s?s:"string"==typeof(null===(o=null==i?void 0:i.response)||void 0===o?void 0:o.data)?i.response.data:void 0)&&void 0!==a?a:(null===(h=null==i?void 0:i.response)||void 0===h?void 0:h.statusText)?`Error ${i.response.status}: ${i.response.statusText}`:void 0)&&void 0!==p?p:e,yield w.fire({title:"Error en la carga",text:e,icon:"error",confirmButtonText:"OK"}),null==d||d(t)}finally{u.current&&(u.current.value=""),m(!1)}else yield w.fire({title:"Archivo vacío",text:"El archivo seleccionado está vacío",icon:"warning",confirmButtonText:"OK"});else yield w.fire({title:"Archivo inválido",text:"El archivo debe ser un Excel (.xlsx o .xls)",icon:"warning",confirmButtonText:"OK"})})})]})},ml=({items:n,selectedItem:i=null,onSelectionChange:r,placeholder:s="Seleccionar elemento",searchPlaceholder:a="Buscar...",className:d="",disabled:u=!1,searchBy:p="both",caseSensitive:f=!1,exactMatch:y=!0,renderItem:v,renderSelectedItem:x})=>{const[b,w]=g(!1),[S,C]=g(""),T=o(null),P=o(null),k=o(null),E=o([]),N=c();l(()=>{const t=t=>{T.current&&!T.current.contains(t.target)&&w(!1)};if(b)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[b]),l(()=>{b&&k.current&&k.current.focus()},[b]),l(()=>{b||C("")},[b]);const A=h(()=>((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=f?n:n.toLowerCase();return t.filter(t=>{const e=f?t.name:t.name.toLowerCase(),n=f?t.id:t.id.toLowerCase();if(y)switch(p){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(p){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(n,S),[n,S,f,y,p]),[M,V]=g(-1),D=m(()=>{w(!1)},[]),L=t=>{var e;r(t),D(),null===(e=P.current)||void 0===e||e.focus()},R=()=>{u||w(!b)},j=m(t=>{A.length&&V(e=>((-1===e?1===t?-1:0:e)+t+A.length)%A.length)},[A.length]);l(()=>{if(b){const t=i?A.findIndex(t=>t.id===i.id):-1;-1!==t?V(t):A.length?V(t=>t>=0&&t<A.length?t:0):V(-1)}else V(-1)},[b,A,i]),l(()=>{if(M<0)return;const t=E.current[M];null==t||t.scrollIntoView({block:"nearest"})},[M]);return E.current=[],e("div",{ref:T,className:`relative w-full ${d}`,onKeyDown:t=>{var e;if(u)return;const n=t.target,i=n===P.current;if(!b)return void(!i||"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),R()));if("Escape"===t.key)return t.preventDefault(),D(),void(null===(e=P.current)||void 0===e||e.focus());if(n instanceof HTMLButtonElement)return;const r=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement;switch(t.key){case"ArrowDown":t.preventDefault(),j(1);break;case"ArrowUp":t.preventDefault(),j(-1);break;case"Enter":M>=0&&M<A.length&&(t.preventDefault(),L(A[M]));break;case" ":case"Spacebar":if(r)break;M>=0&&M<A.length&&(t.preventDefault(),L(A[M]))}},children:[e("div",{ref:P,className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${u?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${b?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:R,role:"button",tabIndex:u?-1:0,"aria-haspopup":"listbox","aria-expanded":b,"aria-disabled":u,children:[t("div",{className:"flex-1 truncate",children:t("span",i?{className:"text-gray-900",children:x?x(i):i.name}:{className:"text-gray-500",children:s})}),e("div",{className:"flex items-center space-x-1 ml-2",children:[i&&!u&&t("button",{type:"button",onClick:t=>{t.stopPropagation(),r(null)},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),{})}),t("div",{className:"text-gray-400 transition-transform duration-200 "+(b?"rotate-180":""),children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),b&&e("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t("div",{className:"p-2 border-b border-gray-100",children:e("div",{className:"relative",children:[t("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t("input",{ref:k,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:a,value:S,onChange:t=>C(t.target.value),onClick:t=>t.stopPropagation(),"aria-autocomplete":"list","aria-controls":N})]})}),t("div",{id:N,className:"max-h-60 overflow-auto",role:"listbox","aria-activedescendant":M>=0?`${N}-option-${M}`:void 0,children:0===A.length?t("div",{className:"px-3 py-2 text-sm text-gray-500",children:S?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):A.map((e,n)=>t("div",{id:`${N}-option-${n}`,ref:t=>{E.current[n]=t},className:"px-3 py-2 text-sm cursor-pointer transition-colors duration-200 border-b border-gray-50 last:border-b-0 "+(M===n?"bg-primary-botech-100":"hover:bg-primary-botech-50"),onClick:()=>L(e),role:"option","aria-selected":(null==i?void 0:i.id)===e.id,onMouseEnter:()=>V(n),children:v?v(e):t("span",{className:"text-gray-900",children:e.name})},e.id))})]})]})},pl=({items:i,selectedItems:r=[],onSelectionChange:s,placeholder:a="Seleccionar elementos",searchPlaceholder:c="Buscar...",className:d="",disabled:u=!1,searchBy:h="both",caseSensitive:m=!1,exactMatch:p=!0,maxSelectedDisplay:f=3,renderItem:y,renderSelectedItem:v,renderSelectedBadge:x})=>{const[b,w]=g(!1),[S,C]=g(""),T=o(null),P=o(null);l(()=>{const t=t=>{T.current&&!T.current.contains(t.target)&&w(!1)};if(b)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[b]),l(()=>{b&&P.current&&P.current.focus()},[b]),l(()=>{b||C("")},[b]);const k=((t,e)=>{if(!e.trim())return t;const n=e.trim(),i=m?n:n.toLowerCase();return t.filter(t=>{const e=m?t.name:t.name.toLowerCase(),n=m?t.id:t.id.toLowerCase();if(p)switch(h){case"name":return e===i;case"id":return n===i;case"both":return e===i||n===i;default:return!1}else switch(h){case"name":return e.includes(i);case"id":return n.includes(i);case"both":return e.includes(i)||n.includes(i);default:return!1}})})(i,S),E=t=>r.some(e=>e.id===t.id),N=t=>{s(r.filter(e=>e.id!==t.id))},A=()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),M=()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),V=({item:n,onRemove:i})=>e("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium bg-primary-botech-100 text-primary-botech-800 rounded-md",children:[v?v(n):n.name,t("button",{type:"button",onClick:t=>{t.stopPropagation(),i()},className:"ml-1 text-primary-botech-600 hover:text-primary-botech-800 transition-colors duration-200",children:t(A,{})})]}),D=r.slice(0,f),L=r.length-f;return e("div",{ref:T,className:`relative w-full ${d}`,children:[e("div",{className:`\n min-h-10 w-full flex items-center justify-between px-3 py-2 \n text-sm bg-white border border-gray-300 rounded-md shadow-sm cursor-pointer\n transition-colors duration-200\n ${u?"bg-gray-100 text-gray-400 cursor-not-allowed border-gray-200":"hover:border-primary-botech-400 focus-within:border-primary-botech focus-within:ring-1 focus-within:ring-primary-botech"}\n ${b?"border-primary-botech ring-1 ring-primary-botech":""}\n `,onClick:()=>{u||w(!b)},children:[t("div",{className:"flex-1 flex flex-wrap gap-1 items-center",children:0===r.length?t("span",{className:"text-gray-500",children:a}):e(n,{children:[D.map(e=>t("div",{onClick:t=>t.stopPropagation(),children:x?x(e,()=>N(e)):t(V,{item:e,onRemove:()=>N(e)})},e.id)),L>0&&e("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-md",children:["+",L," más"]})]})}),e("div",{className:"flex items-center space-x-1 ml-2",children:[r.length>0&&!u&&t("button",{type:"button",onClick:t=>{t.stopPropagation(),s([])},className:"text-gray-400 hover:text-gray-600 transition-colors duration-200",children:t(A,{})}),t("div",{className:"text-gray-400 transition-transform duration-200 "+(b?"rotate-180":""),children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),{})})]})]}),b&&e("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg",children:[t("div",{className:"p-2 border-b border-gray-100",children:e("div",{className:"relative",children:[t("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:t(()=>t("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),{})}),t("input",{ref:P,type:"text",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-primary-botech focus:border-primary-botech",placeholder:c,value:S,onChange:t=>C(t.target.value),onClick:t=>t.stopPropagation()})]})}),r.length>0&&e("div",{className:"px-3 py-2 text-xs text-gray-600 bg-gray-50 border-b border-gray-100",children:[r.length," elemento(s) seleccionado(s)"]}),t("div",{className:"max-h-60 overflow-auto",children:0===k.length?t("div",{className:"px-3 py-2 text-sm text-gray-500",children:S?"No se encontraron coincidencias exactas":"No hay elementos disponibles"}):k.map(n=>{const i=E(n);return e("div",{className:`\n px-3 py-2 text-sm cursor-pointer transition-colors duration-200 \n border-b border-gray-50 last:border-b-0 flex items-center justify-between\n ${i?"bg-primary-botech-50 hover:bg-primary-botech-100":"hover:bg-gray-50"}\n `,onClick:()=>(t=>{E(t)?s(r.filter(e=>e.id!==t.id)):s([...r,t])})(n),children:[t("div",{className:"flex-1",children:y?y(n):t("span",{className:""+(i?"text-primary-botech-900 font-medium":"text-gray-900"),children:n.name})}),i&&t("div",{className:"ml-2 text-primary-botech-600",children:t(M,{})})]},n.id)})})]})]})};function fl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M488 128h-8V80c0-44.8-99.2-80-224-80S32 35.2 32 80v48h-8c-13.25 0-24 10.74-24 24v80c0 13.25 10.75 24 24 24h8v160c0 17.67 14.33 32 32 32v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h192v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h6.4c16 0 25.6-12.8 25.6-25.6V256h8c13.25 0 24-10.75 24-24v-80c0-13.26-10.75-24-24-24zM112 400c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm16-112c-17.67 0-32-14.33-32-32V128c0-17.67 14.33-32 32-32h256c17.67 0 32 14.33 32 32v128c0 17.67-14.33 32-32 32H128zm272 112c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}function gl(t){return j({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M436 160H12c-6.627 0-12-5.373-12-12v-36c0-26.51 21.49-48 48-48h48V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h128V12c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v52h48c26.51 0 48 21.49 48 48v36c0 6.627-5.373 12-12 12zM12 192h424c6.627 0 12 5.373 12 12v260c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V204c0-6.627 5.373-12 12-12zm333.296 95.947l-28.169-28.398c-4.667-4.705-12.265-4.736-16.97-.068L194.12 364.665l-45.98-46.352c-4.667-4.705-12.266-4.736-16.971-.068l-28.397 28.17c-4.705 4.667-4.736 12.265-.068 16.97l82.601 83.269c4.667 4.705 12.265 4.736 16.97.068l142.953-141.805c4.705-4.667 4.736-12.265.068-16.97z"},child:[]}]})(t)}function yl(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM96 424c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm0-96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zm96-192c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm128 368c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-96c0 4.4-3.6 8-8 8H168c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"},child:[]}]})(t)}function vl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(t)}function xl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"},child:[]}]})(t)}function bl(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(t)}function wl(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"},child:[]}]})(t)}function Sl(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M573.19 402.67l-139.79-320C428.43 71.29 417.6 64 405.68 64h-97.59l2.45 23.16c.5 4.72-3.21 8.84-7.96 8.84h-29.16c-4.75 0-8.46-4.12-7.96-8.84L267.91 64h-97.59c-11.93 0-22.76 7.29-27.73 18.67L2.8 402.67C-6.45 423.86 8.31 448 30.54 448h196.84l10.31-97.68c.86-8.14 7.72-14.32 15.91-14.32h68.8c8.19 0 15.05 6.18 15.91 14.32L348.62 448h196.84c22.23 0 36.99-24.14 27.73-45.33zM260.4 135.16a8 8 0 0 1 7.96-7.16h39.29c4.09 0 7.53 3.09 7.96 7.16l4.6 43.58c.75 7.09-4.81 13.26-11.93 13.26h-40.54c-7.13 0-12.68-6.17-11.93-13.26l4.59-43.58zM315.64 304h-55.29c-9.5 0-16.91-8.23-15.91-17.68l5.07-48c.86-8.14 7.72-14.32 15.91-14.32h45.15c8.19 0 15.05 6.18 15.91 14.32l5.07 48c1 9.45-6.41 17.68-15.91 17.68z"},child:[]}]})(t)}function Cl(t){return j({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(t)}function Tl(t){return j({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"},child:[]}]})(t)}function Pl(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(t)}const kl=n=>{var{title:i,description:r,onClose:s,showCloseIcon:o=!0,icon:a,actions:l,className:c=""}=n,d=ol(n,["title","description","onClose","showCloseIcon","icon","actions","className"]);return e("div",Object.assign({className:`flex items-center justify-between gap-4 p-4 sm:p-6 bg-primary-botech text-white sm:rounded-t-xl ${c}`},d,{children:[e("div",{className:"flex items-start gap-3 min-w-0",children:[a&&t("span",{className:"mt-0.5 text-white text-xl",children:a}),e("div",{className:"flex-1 min-w-0",children:[i&&t("h2",{className:"text-xl font-semibold text-white",id:"bo-modal-title",children:i}),r&&t("p",{className:"mt-1 text-sm text-white/80",id:"bo-modal-description",children:r})]})]}),e("div",{className:"flex items-center gap-2",children:[l,o&&t("button",{type:"button","aria-label":"Cerrar",onClick:s,className:"shrink-0 inline-flex items-center justify-center rounded-md p-2 text-white hover:text-gray-200 hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white/50",children:t(Cl,{className:"text-xl"})})]})]}))},El=e=>{var{className:n=""}=e,i=ol(e,["className"]);return t("div",Object.assign({className:`p-4 sm:p-6 ${n}`},i))},Nl=e=>{var{className:n=""}=e,i=ol(e,["className"]);return t("div",Object.assign({className:`flex justify-end gap-3 p-3 sm:p-4 border-t border-gray-200 bg-gray-50 ${n}`},i))},Al={sm:"sm:max-w-sm",md:"sm:max-w-2xl",lg:"sm:max-w-4xl",xl:"sm:max-w-6xl"};const Ml=({open:n,onClose:i,title:r,description:s,size:a="md",footer:c,showCloseIcon:d=!0,hideHeader:u=!1,closeOnEsc:h=!0,closeOnClickOutside:p=!0,className:f="",children:g,initialFocusRef:y,headerClassName:v,overlayClassName:x,headerIcon:b,headerActions:w,zIndex:S,animate:T=!1})=>{const P=o(null),k=o(null),E=rl(),N=T&&!E;var A;l(()=>{if(!A)return;const{overflow:t}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[A=n]),function(t,e,n){l(()=>{if(!t)return;const i=e.current;if(!i)return;const r=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],s=()=>Array.from(i.querySelectorAll(r.join(","))).filter(t=>!t.hasAttribute("disabled")&&!t.getAttribute("aria-hidden")),o=document.activeElement;((null==n?void 0:n.current)||s()[0]||i).focus();const a=t=>{if("Tab"!==t.key)return;const e=s();if(0===e.length)return;const n=e[0],r=e[e.length-1];t.shiftKey?document.activeElement!==n&&document.activeElement!==i||(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault())};return document.addEventListener("keydown",a),()=>{var t;document.removeEventListener("keydown",a),null===(t=null==o?void 0:o.focus)||void 0===t||t.call(o)}},[t,e,n])}(n,P,y);const M=m(t=>{n&&"Escape"===t.key&&h&&(t.stopPropagation(),i())},[n,h,i]);l(()=>{if(n)return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[n,M]);const V=e("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:S?{zIndex:S}:void 0,"aria-hidden":!n,ref:k,children:[t("button",{type:"button","aria-label":"Cerrar modal",onClick:()=>{p&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),e("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":s?"bo-modal-description":void 0,className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Al[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${f}`,onClick:t=>t.stopPropagation(),ref:P,children:[!u&&t(kl,{title:r,description:s,onClose:i,showCloseIcon:d,className:v,icon:b,actions:w}),t("div",{className:"flex-1 overflow-y-auto",children:g}),c&&t(Nl,{children:c})]})]}),D=t(er,{children:n&&e("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center",style:S?{zIndex:S}:void 0,"aria-hidden":!n,ref:k,children:[t(il.button,{type:"button","aria-label":"Cerrar modal",initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},onClick:()=>{p&&i()},className:`fixed inset-0 bg-black/50 ${null!=x?x:""}`}),e(il.div,{role:"dialog","aria-modal":"true","aria-labelledby":r?"bo-modal-title":void 0,"aria-describedby":s?"bo-modal-description":void 0,initial:"hidden",animate:"visible",exit:"exit",variants:{hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},transition:{duration:.12,ease:"linear"},className:`relative w-screen h-[100dvh] sm:w-full sm:h-auto ${Al[a]} sm:mx-4 sm:max-h-[90vh] overflow-hidden sm:rounded-xl bg-white shadow-2xl ring-1 ring-black/5 flex flex-col ${f}`,onClick:t=>t.stopPropagation(),ref:P,children:[!u&&t(kl,{title:r,description:s,onClose:i,showCloseIcon:d,className:v,icon:b,actions:w}),t("div",{className:"flex-1 overflow-y-auto",children:g}),c&&t(Nl,{children:c})]})]})}),L=N?D:n?V:null;return"undefined"!=typeof document?C(L,document.body):L};function Vl(t=!1){const[e,n]=g(t);return{open:e,onOpen:m(()=>n(!0),[]),onClose:m(()=>n(!1),[]),toggle:m(()=>n(t=>!t),[]),setOpen:n}}var Dl,Ll,Rl;Ml.Header=kl,Ml.Body=El,Ml.Footer=Nl,function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(Dl||(Dl={})),function(t){t.EVEN="even",t.ODD="odd",t.HOVER="hover"}(Ll||(Ll={})),function(t){t.SM="sm",t.MD="md",t.LG="lg"}(Rl||(Rl={}));const jl=t=>{switch(t){case Dl.CENTER:return"text-center";case Dl.RIGHT:return"text-right";default:return"text-left"}},Bl=t=>{switch(t){case Rl.SM:return{header:"px-2 py-2 text-xs",cell:"px-2 py-2 text-xs",table:"text-xs"};case Rl.LG:return{header:"px-6 py-4 text-base",cell:"px-6 py-4 text-base",table:"text-base"};default:return{header:"px-3 md:px-6 py-3 text-sm",cell:"px-3 md:px-6 py-4 text-sm",table:"text-sm"}}},Fl=t=>t%2==0?"bg-white":"bg-gray-50",Ol=({columns:n,size:i,hasActions:r})=>{const s=Bl(i);return t("thead",{className:"text-xs text-gray-700 uppercase bg-gray-50 sticky top-0 z-10",children:e("tr",{children:[n.map(e=>t("th",{className:`${s.header} ${jl(e.alignment)} ${e.className||""}`,style:e.width?{width:e.width}:void 0,children:e.header},e.key)),r&&t("th",{className:`${s.header} text-center sticky right-0 bg-gray-50`,children:"ACCIONES"})]})})},zl=({columns:n,data:i,renderActions:r,size:s,onRowClick:o})=>{const a=Bl(s);return t("tbody",{children:i.map((i,s)=>e("tr",{className:`${Fl(s)} hover:bg-gray-100 transition-colors duration-150 ${o?"cursor-pointer":""}`,onClick:()=>null==o?void 0:o(i),children:[n.map(e=>t("td",{className:`${a.cell} ${jl(e.alignment)} ${e.className||""}`,children:e.accessor(i)},e.key)),r&&t("td",{className:`${a.cell} text-center sticky right-0 ${Fl(s)} shadow-[-2px_0_4px_rgba(0,0,0,0.1)]`,children:r(i)})]},s))})},Il=({columns:n,data:i,renderActions:r,size:s=Rl.MD,className:a="",onRowClick:c,isLoading:d=!1,emptyMessage:u="No hay datos disponibles"})=>{const h=o(null),{visibleData:m}=((t,e)=>{const[n,i]=g(t);return l(()=>{const n=()=>{if(!e.current)return;const n=e.current.getBoundingClientRect(),r=window.innerHeight-n.top-100,s=Math.max(1,Math.floor(r/60));i(t.slice(0,s))};n();const r=()=>{n()};window.addEventListener("resize",r);const s=new ResizeObserver(n);return e.current&&s.observe(e.current),()=>{window.removeEventListener("resize",r),s.disconnect()}},[t,e]),{visibleData:n}})(i,h);return d?t("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t("div",{className:"flex items-center justify-center py-8",children:t("div",{"data-testid":"loading-spinner",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})})}):0===i.length?t("div",{className:"w-full shadow-md sm:rounded-lg bg-white",children:t("div",{className:"text-center py-8",children:t("p",{className:"text-gray-500",children:u})})}):t("div",{ref:h,className:`w-full shadow-md sm:rounded-lg bg-white ${a}`,children:t("div",{className:"overflow-x-auto",children:e("table",{className:"w-full text-left text-gray-500",style:{minWidth:"max-content"},children:[t(Ol,{columns:n,size:s,hasActions:!!r}),t(zl,{columns:n,data:m,renderActions:r,size:s,onRowClick:c})]})})})},$l=t=>new Intl.DateTimeFormat("es-CO",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),Wl={datos_basicos:Tl,transporte:fl,contacto:wl},Ul={nombres:Tl,apellidos:Tl,curso:function(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.34 153.2L343.4 67.5c-15.2-4.67-31.6-4.67-46.79 0L17.66 153.2c-23.54 7.23-23.54 38.36 0 45.59l48.63 14.94c-10.67 13.19-17.23 29.28-17.88 46.9C38.78 266.15 32 276.11 32 288c0 10.78 5.68 19.85 13.86 25.65L20.33 428.53C18.11 438.52 25.71 448 35.94 448h56.11c10.24 0 17.84-9.48 15.62-19.47L82.14 313.65C90.32 307.85 96 298.78 96 288c0-11.57-6.47-21.25-15.66-26.87.76-15.02 8.44-28.3 20.69-36.72L296.6 284.5c9.06 2.78 26.44 6.25 46.79 0l278.95-85.7c23.55-7.24 23.55-38.36 0-45.6zM352.79 315.09c-28.53 8.76-52.84 3.92-65.59 0l-145.02-44.55L128 384c0 35.35 85.96 64 192 64s192-28.65 192-64l-14.18-113.47-145.03 44.56z"},child:[]}]})(t)},codigoFamilia:function(t){return j({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)},transporte:fl,saleSolo:function(t){return j({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M208 96c26.5 0 48-21.5 48-48S234.5 0 208 0s-48 21.5-48 48 21.5 48 48 48zm94.5 149.1l-23.3-11.8-9.7-29.4c-14.7-44.6-55.7-75.8-102.2-75.9-36-.1-55.9 10.1-93.3 25.2-21.6 8.7-39.3 25.2-49.7 46.2L17.6 213c-7.8 15.8-1.5 35 14.2 42.9 15.6 7.9 34.6 1.5 42.5-14.3L81 228c3.5-7 9.3-12.5 16.5-15.4l26.8-10.8-15.2 60.7c-5.2 20.8.4 42.9 14.9 58.8l59.9 65.4c7.2 7.9 12.3 17.4 14.9 27.7l18.3 73.3c4.3 17.1 21.7 27.6 38.8 23.3 17.1-4.3 27.6-21.7 23.3-38.8l-22.2-89c-2.6-10.3-7.7-19.9-14.9-27.7l-45.5-49.7 17.2-68.7 5.5 16.5c5.3 16.1 16.7 29.4 31.7 37l23.3 11.8c15.6 7.9 34.6 1.5 42.5-14.3 7.7-15.7 1.4-35.1-14.3-43zM73.6 385.8c-3.2 8.1-8 15.4-14.2 21.5l-50 50.1c-12.5 12.5-12.5 32.8 0 45.3s32.7 12.5 45.2 0l59.4-59.4c6.1-6.1 10.9-13.4 14.2-21.5l13.5-33.8c-55.3-60.3-38.7-41.8-47.4-53.7l-20.7 51.5z"},child:[]}]})(t)},bajaSolo:function(t){return j({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M120 72c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.764-32.235 72-72 72s-72-32.236-72-72zm254.627 1.373c-12.496-12.497-32.758-12.497-45.254 0L242.745 160H141.254L54.627 73.373c-12.496-12.497-32.758-12.497-45.254 0-12.497 12.497-12.497 32.758 0 45.255L104 213.254V480c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V368h16v112c0 17.673 14.327 32 32 32h16c17.673 0 32-14.327 32-32V213.254l94.627-94.627c12.497-12.497 12.497-32.757 0-45.254z"},child:[]}]})(t)},direccionCasa:function(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"},child:[]}]})(t)},rfid:function(t){return j({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 32H48C21.5 32 0 53.5 0 80v16h576V80c0-26.5-21.5-48-48-48zM0 432c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V128H0v304zm352-232c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zm0 64c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16zM176 192c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM67.1 396.2C75.5 370.5 99.6 352 128 352h8.2c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h8.2c28.4 0 52.5 18.5 60.9 44.2 3.2 9.9-5.2 19.8-15.6 19.8H82.7c-10.4 0-18.8-10-15.6-19.8z"},child:[]}]})(t)},idSchoolRegistration:yl},Hl={informacion_general:Tl,ultimas_novedades:yl,personas_autorizadas:Pl,ultimos_movimientos:xl},_l={INGRESO:function(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 448h-84c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h84c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32h-84c-6.6 0-12-5.4-12-12V76c0-6.6 5.4-12 12-12h84c53 0 96 43 96 96v192c0 53-43 96-96 96zm-47-201L201 79c-15-15-41-4.5-41 17v96H24c-13.3 0-24 10.7-24 24v96c0 13.3 10.7 24 24 24h136v96c0 21.5 26 32 41 17l168-168c9.3-9.4 9.3-24.6 0-34z"},child:[]}]})(t)},SALIDA:function(t){return j({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z"},child:[]}]})(t)}},Yl="#FFFFFF",Xl="#F7F9FC",Kl="#E5E9F2",ql="#0F172A",Gl="#64748B",Zl="#94A3B8",Jl="#111F4B",Ql="#E2E8FF",tc="#1D4ED8",ec={informacion_general:"Información general",ultimas_novedades:"Últimas novedades",personas_autorizadas:"Personas autorizadas",ultimos_movimientos:"Últimos movimientos"},nc=({open:n,onClose:i,context:r="pass",student:s,generalGroups:o,sections:a=[],photoUrl:c,title:d="Resumen del estudiante",description:u="Información consolidada del estudiante.",loading:m=!1,error:p,onReload:f})=>{const[y,v]=g(!0),[x,b]=g(!1),[w,S]=g("desktop");l(()=>{if("undefined"==typeof window)return;const t=()=>{const t=window.innerWidth;S(t<768?"mobile":t<1200?"tablet":"desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const C="mobile"===w,P="tablet"===w;l(()=>{if(m)v(!0),b(!1);else if(c){v(!0),b(!1);const t=new Image;t.onload=()=>{v(!1)},t.onerror=()=>{v(!1),b(!0)},t.src=c}else v(!1),b(!0)},[c,m]),l(()=>{n||(v(!0),b(!1))},[n,s.id]);const k=h(()=>{var t,e,n,i,r,a,l,c,d,u;const h=null!=o?o:[{id:"datos_basicos",title:"Datos básicos",rows:[{id:"nombres",label:"Nombres",value:null!==(t=s.nombres)&&void 0!==t?t:""},{id:"apellidos",label:"Apellidos",value:null!==(e=s.apellidos)&&void 0!==e?e:""},{id:"curso",label:"Curso",value:null!==(n=s.curso)&&void 0!==n?n:""},{id:"codigoFamilia",label:"Código familia",value:null!==(i=s.codigoFamilia)&&void 0!==i?i:""}]},{id:"transporte",title:"Transporte",rows:[{id:"transporte",label:"Transporte",value:null!==(r=s.transporte)&&void 0!==r?r:""},{id:"saleSolo",label:"Sale solo",value:null!==(a=s.saleSolo)&&void 0!==a?a:""},{id:"bajaSolo",label:"Baja solo",value:null!==(l=s.bajaSolo)&&void 0!==l?l:""}]},{id:"contacto",title:"Contacto y registro",rows:[{id:"direccionCasa",label:"Dirección casa",value:null!==(c=s.direccionCasa)&&void 0!==c?c:""},{id:"rfid",label:"RFID",value:null!==(d=s.rfid)&&void 0!==d?d:""},{id:"idSchoolRegistration",label:"Registro escolar",value:null!==(u=s.idSchoolRegistration)&&void 0!==u?u:""}]}];return{id:"informacion_general",title:ec.informacion_general,items:h}},[o,s]),E=h(()=>{var t,e;return`${null!==(t=s.nombres)&&void 0!==t?t:""} ${null!==(e=s.apellidos)&&void 0!==e?e:""}`.trim()},[s.nombres,s.apellidos]),N=n=>{switch(n.id){case"ultimas_novedades":return(i=n.items).length?t("div",{className:"space-y-4",children:i.map(n=>e("article",{className:"rounded-2xl border border-blue-200 bg-gradient-to-br from-blue-50 to-blue-100/50 p-4 text-sm shadow-sm ring-1 ring-blue-100",style:{borderRadius:24,border:"1px solid #BFDBFE",background:"linear-gradient(135deg, #EFF6FF 0%, rgba(219, 234, 254, 0.7) 100%)",padding:20,boxShadow:"0 18px 32px rgba(59, 130, 246, 0.15)"},children:[e("header",{className:"flex items-center justify-between",children:[e("span",{className:"inline-flex items-center gap-2 rounded-full bg-blue-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-blue-800",children:[t(yl,{className:"h-3.5 w-3.5"})," ",n.tipo]}),e("time",{dateTime:n.fecha,className:"flex items-center gap-2 text-xs font-medium text-blue-700",children:[t(gl,{className:"h-3.5 w-3.5"}),$l(n.fecha)]})]}),e("div",{className:"mt-3 space-y-2 text-blue-900",children:[e("p",{className:"text-xs font-semibold uppercase tracking-wide text-blue-600",children:["Estado: ",t("span",{className:"text-sm font-bold",children:n.estado})]}),e("p",{className:"text-sm",children:[t("span",{className:"font-semibold",children:"Responsable:"})," ",n.responsable]}),t("p",{className:"text-sm leading-relaxed",children:n.descripcion})]}),n.respuesta&&e("p",{className:"rounded-xl bg-white/70 px-3 py-2 text-sm text-blue-900 shadow-inner ring-1 ring-blue-100",children:[t("span",{className:"font-semibold",children:"Respuesta:"})," ",n.respuesta]})]},n.id))}):t("p",{className:"text-sm text-gray-500",children:"Sin novedades recientes."});case"personas_autorizadas":return(n=>n.length?t("div",{className:"grid gap-4",children:n.map(n=>e("article",{className:"rounded-2xl border border-emerald-200 bg-gradient-to-br from-emerald-50 to-emerald-100/40 p-4 text-sm shadow-sm ring-1 ring-emerald-100",style:{borderRadius:24,border:"1px solid #A7F3D0",background:"linear-gradient(135deg, #ECFDF5 0%, rgba(209, 250, 229, 0.65) 100%)",padding:20,boxShadow:"0 18px 32px rgba(16, 185, 129, 0.12)"},children:[e("header",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center gap-3",children:[t("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-white text-emerald-600 shadow-inner ring-1 ring-emerald-100",children:t(Pl,{className:"h-5 w-5"})}),e("div",{children:[t("span",{className:"text-sm font-semibold text-emerald-900",children:n.nombreCompleto}),e("p",{className:"text-xs text-emerald-700",children:[n.tipoDocumento," • ",n.numeroDocumento]})]})]}),t("span",{className:"rounded-full bg-emerald-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-emerald-700",children:n.estado})]}),e("dl",{className:"mt-4 grid gap-3 text-xs text-emerald-900 sm:grid-cols-2",children:[e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Código familia"}),t("dd",{className:"text-sm font-semibold",children:n.codigoFamilia})]}),e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Vigencia"}),e("dd",{className:"text-sm font-semibold",children:[n.vigencia.desde," – ",n.vigencia.hasta]})]}),e("div",{className:"rounded-xl bg-white/70 px-3 py-2 shadow-inner ring-1 ring-emerald-100 sm:col-span-2",children:[t("dt",{className:"text-[0.65rem] font-semibold uppercase tracking-wide text-emerald-600",children:"Autorizado por"}),t("dd",{className:"text-sm font-semibold",children:n.autorizadoPor})]})]})]},`${n.numeroDocumento}-${n.vigencia.desde}`))}):t("p",{className:"text-sm text-gray-500",children:"No hay personas autorizadas registradas."}))(n.items);case"ultimos_movimientos":return(n=>n.length?e("div",{className:"relative space-y-4 text-sm",style:{position:"relative"},children:[t("div",{className:"absolute left-[1.15rem] top-3 bottom-3 w-px bg-slate-200",style:{position:"absolute",left:28,top:12,bottom:12,width:2,backgroundColor:Kl}}),n.map((n,i)=>{var r;const s=null!==(r=_l[n.tipo.toUpperCase()])&&void 0!==r?r:xl;return e("div",{className:"relative pl-14",style:{position:"relative",paddingLeft:74},children:[t("div",{className:"absolute left-0 top-1 flex h-10 w-10 items-center justify-center rounded-full bg-white text-slate-600 shadow-sm ring-1 ring-slate-200",style:{position:"absolute",left:6,top:4,width:46,height:46,borderRadius:"50%",backgroundColor:Yl,color:Gl,display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 16px 30px rgba(15, 23, 42, 0.08)",border:`1px solid ${Kl}`},children:t(s,{size:16})}),e("div",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm ring-1 ring-slate-100",style:{borderRadius:24,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:20,boxShadow:"0 18px 32px rgba(15, 23, 42, 0.08)"},children:[e("header",{className:"flex items-center justify-between text-xs text-slate-500",children:[t("span",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold uppercase tracking-wide text-slate-700",children:n.tipo}),t("time",{dateTime:n.fecha,children:$l(n.fecha)})]}),e("div",{className:"mt-3 space-y-2 text-slate-700",children:[e("p",{children:[t("span",{className:"font-semibold",children:"Lector:"})," ",n.lector.descripcion," (",n.lector.id,")"]}),n.observaciones&&t("p",{className:"rounded-xl bg-slate-50 px-3 py-2 text-sm shadow-inner ring-1 ring-slate-100",children:n.observaciones})]})]})]},`${n.fecha}-${i}`)})]}):t("p",{className:"text-sm text-gray-500",children:"Sin movimientos recientes."}))(n.items);case"paradas":return(n=>n.length?t("div",{className:"student-summary-paradas",style:{display:"grid",gap:C?14:P?16:18},children:n.map((n,i)=>{var r,s,o,a;const l=`Parada ${null!==(r=n.orden)&&void 0!==r?r:i+1}`,c=null!==(s=n.time)&&void 0!==s?s:n.horaProgramada;return e("article",{style:{borderRadius:24,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:20,boxShadow:"0 20px 38px rgba(59, 130, 246, 0.08)"},children:[e("header",{style:{display:"flex",flexDirection:C?"column":"row",alignItems:C?"flex-start":"center",justifyContent:"space-between",gap:16},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t("div",{style:{width:44,height:44,borderRadius:14,backgroundColor:"#EFF6FF",color:"#1D4ED8",display:"flex",alignItems:"center",justifyContent:"center"},children:t(wl,{size:20})}),e("div",{children:[t("p",{style:{margin:0,fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:l}),t("p",{style:{margin:"4px 0 0",fontSize:15,fontWeight:600,color:ql},children:null!==(o=n.address)&&void 0!==o?o:"Dirección no disponible"})]})]}),c&&e("span",{style:{display:"inline-flex",alignItems:"center",gap:8,borderRadius:999,padding:C?"6px 12px":"6px 14px",backgroundColor:Xl,border:`1px solid ${Kl}`,fontSize:12,fontWeight:600,color:Gl},children:[t(vl,{size:12}),c]})]}),e("div",{style:{marginTop:16,display:"grid",gap:C?10:12,gridTemplateColumns:C?"1fr":"repeat(auto-fit, minmax(180px, 1fr))"},children:[n.estado&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Estado"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.estado})]}),n.horaReal&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Hora real"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.horaReal})]}),n.observaciones&&t("div",{style:{borderRadius:18,backgroundColor:"#EEF2FF",border:`1px solid ${Kl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:t("p",{style:{margin:0,fontSize:12,fontWeight:600,color:"#4338CA"},children:n.observaciones})}),n.coordinates&&e("div",{style:{borderRadius:18,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:"12px 16px",gridColumn:"1 / -1"},children:[t("p",{style:{margin:0,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Coordenadas"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:[n.coordinates.lat.toFixed(6),", ",n.coordinates.lng.toFixed(6)]})]})]})]},null!==(a=n.id)&&void 0!==a?a:`${i}`)})}):t("p",{className:"text-sm text-gray-500",children:"Sin paradas registradas."}))(n.items);case"recorridos":return(n=>n.length?t("div",{className:"student-summary-recorridos",style:{display:"grid",gap:C?16:P?18:20},children:n.map(n=>{var i,r,s,o;return e("article",{style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:22,boxShadow:"0 22px 44px rgba(79, 70, 229, 0.1)"},children:[e("header",{style:{display:"flex",flexDirection:C?"column":"row",alignItems:"flex-start",justifyContent:"space-between",gap:18},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12},children:[t("div",{style:{width:C?42:46,height:C?42:46,borderRadius:16,backgroundColor:"#EDE9FE",color:"#4338CA",display:"flex",alignItems:"center",justifyContent:"center"},children:t(Sl,{size:C?18:20})}),e("div",{children:[t("p",{style:{margin:0,fontSize:C?11:12,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:"Recorrido"}),t("p",{style:{margin:"4px 0 0",fontSize:C?15:16,fontWeight:600,color:ql},children:n.nombreRecorrido}),n.tipoRecorrido&&t("p",{style:{margin:"2px 0 0",fontSize:C?12:13,color:Gl},children:n.tipoRecorrido})]})]}),e("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-end"},children:[n.estadoActual&&t("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:"#E0E7FF",color:"#312E81",fontSize:12,fontWeight:600},children:n.estadoActual}),n.numeroFlota&&e("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Xl,color:Gl,fontSize:12,fontWeight:600},children:["Flota ",n.numeroFlota]}),n.placaBus&&t("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 12px":"6px 14px",borderRadius:999,backgroundColor:Xl,color:Gl,fontSize:12,fontWeight:600},children:n.placaBus})]})]}),e("div",{style:{marginTop:20,display:"grid",gap:C?12:14,gridTemplateColumns:C?"1fr":"repeat(auto-fit, minmax(220px, 1fr))"},children:[(n.horaInicio||n.horaFin)&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Horario"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:[null!==(i=n.horaInicio)&&void 0!==i?i:"—"," – ",null!==(r=n.horaFin)&&void 0!==r?r:"—"]})]}),(n.nombreAuxiliar||n.nombreOperario)&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Equipo"}),e("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:["Auxiliar: ",null!==(s=n.nombreAuxiliar)&&void 0!==s?s:"—"]}),e("p",{style:{margin:"2px 0 0",fontSize:14,fontWeight:600,color:ql},children:["Operario: ",null!==(o=n.nombreOperario)&&void 0!==o?o:"—"]})]}),n.diasRecorrido&&e("div",{style:{borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px"},children:[t("p",{style:{margin:0,fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:700,color:Zl},children:"Días programados"}),t("p",{style:{margin:"6px 0 0",fontSize:14,fontWeight:600,color:ql},children:n.diasRecorrido})]})]}),n.ultimoEvento&&t("div",{style:{marginTop:18,borderRadius:20,backgroundColor:"#EEF2FF",border:`1px solid ${Kl}`,padding:C?"12px 16px":"14px 18px",color:"#312E81",fontSize:14,fontWeight:600},children:n.ultimoEvento})]},n.idRecorrido)})}):t("p",{className:"text-sm text-gray-500",children:"Sin recorridos asociados."}))(n.items);default:return null}var i},A=null!=a?a:[];return e(Ml,{open:n,onClose:i,size:"xl",overlayClassName:"z-[1000]",className:"z-[1001] [&_.modal-content]:!max-h-[80vh] [&_.modal-body]:!max-h-none [&_.modal-body]:!overflow-visible",title:d,description:u,children:[e(El,{className:"px-4 pb-6",children:[p&&e("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700",children:[t("p",{className:"font-semibold",children:"No se pudo cargar el resumen."}),t("p",{className:"mt-1",children:p}),f&&t(T,{variant:"secondary",onClick:f,className:"mt-3",children:"Reintentar"})]}),e("div",{className:"space-y-8 px-1",style:{display:"flex",flexDirection:"column",gap:C?24:32,maxWidth:1180,margin:"0 auto",width:"100%"},children:[e("div",{className:"student-summary-layout",style:{display:"grid",gap:C?20:P?24:28,gridTemplateColumns:C||P?"1fr":"minmax(320px, 360px) minmax(640px, 1fr)",alignItems:"stretch",width:"100%"},children:[t("aside",{className:"student-summary-profile",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:C?20:P?26:32,textAlign:"center",boxShadow:"0 26px 48px rgba(15, 23, 42, 0.1)"},children:e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:C?18:24},children:[t("div",{style:{position:"relative",width:C?110:P?128:140,height:C?110:P?128:140,overflow:"hidden",borderRadius:"50%",border:`4px solid ${Yl}`,backgroundColor:Xl,boxShadow:"0 20px 40px rgba(15, 23, 42, 0.14)"},children:y?t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Xl},children:t("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-slate-500"})}):c&&!x?t("img",{src:c,alt:E||"Foto del estudiante",style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}):t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",backgroundColor:Xl,color:Gl},children:t(Tl,{size:C?48:P?56:60})})}),e("div",{style:{display:"flex",flexDirection:"column",gap:8,alignItems:"center"},children:[t("h2",{style:{margin:0,fontSize:C?18:22,fontWeight:600,color:ql},children:E||"Nombre no disponible"}),s.curso&&e("p",{style:{margin:0,fontSize:C?13:15,color:Gl},children:["Curso"," ",t("span",{style:{fontWeight:600,color:"#4338CA"},children:s.curso})]})]}),e("div",{style:{display:"flex",flexDirection:"column",gap:12,alignItems:"center"},children:[s.id&&e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6,backgroundColor:Xl,border:`1px solid ${Kl}`,borderRadius:20,padding:C?"10px 16px":"12px 20px",boxShadow:"0 14px 28px rgba(15, 23, 42, 0.08)",minWidth:C?200:240},children:[t("span",{style:{fontSize:C?10:11,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl,fontWeight:700},children:"Identificador estudiante"}),t("span",{style:{fontSize:17,fontWeight:600,color:ql},children:s.id})]}),e("span",{style:{display:"inline-flex",alignItems:"center",padding:C?"5px 14px":"6px 16px",borderRadius:999,fontSize:12,fontWeight:600,backgroundColor:Ql,color:tc,letterSpacing:"0.04em"},children:["Contexto: ",r.toUpperCase()]})]})]})}),t("div",{className:"student-summary-general-wrapper",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:32,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:(n=>{var i;const r=null!==(i=Hl[n.id])&&void 0!==i?i:bl,s=C?1:P?2:3,o=Math.min(Math.max(n.items.length,1),s);return e("section",{className:"student-summary-general",style:{display:"flex",flexDirection:"column",gap:24},children:[e("header",{className:"student-summary-general__header",style:{display:"flex",flexDirection:C?"column":"row",gap:16,alignItems:"flex-start",paddingLeft:C?0:4},children:[t("div",{className:"student-summary-general__header-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?46:56,height:C?46:56,borderRadius:18,backgroundColor:Jl,color:Yl,boxShadow:"0 18px 30px rgba(17, 24, 39, 0.18)"},children:t(r,{size:C?18:22})}),e("div",{children:[t("h3",{style:{margin:0,fontSize:C?16:18,fontWeight:600,color:ql},children:n.title}),t("p",{style:{margin:"6px 0 0",fontSize:C?13:14,color:Gl},children:"Información clave agrupada en tarjetas para una lectura rápida."})]})]}),t("div",{className:"student-summary-general__grid",style:{display:"grid",gap:C?14:P?18:20,gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:n.items.map(n=>{var i;const s=null!==(i=Wl[n.id])&&void 0!==i?i:r;return e("article",{className:"student-summary-card",style:{borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,boxShadow:"0 18px 35px rgba(15, 23, 42, 0.08)",padding:C?16:P?18:20,display:"flex",flexDirection:"column",gap:14},children:[e("div",{style:{display:"flex",alignItems:"center",gap:12,paddingBottom:12,borderBottom:`1px solid ${Kl}`},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:16,backgroundColor:Xl,color:Gl},children:t(s,{size:20})}),t("h4",{style:{margin:0,fontSize:14,fontWeight:600,color:ql},children:n.title})]}),t("div",{style:{display:"flex",flexDirection:"column",gap:12},children:n.rows.map(n=>{var i;const r=null!==(i=Ul[n.id])&&void 0!==i?i:bl;return e("div",{style:{display:"flex",alignItems:"center",gap:C?10:12,borderRadius:20,backgroundColor:Xl,border:`1px solid ${Kl}`,padding:C?"10px 14px":"12px 16px",boxShadow:"0 12px 22px rgba(15, 23, 42, 0.05)"},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?36:40,height:C?36:40,borderRadius:"50%",backgroundColor:Yl,color:Gl,boxShadow:"0 12px 20px rgba(15, 23, 42, 0.06)"},children:t(r,{size:C?14:16})}),e("div",{style:{minWidth:0},children:[t("p",{style:{margin:0,fontSize:C?10:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:Zl},children:n.label}),t("p",{style:{margin:"4px 0 0",fontSize:C?13:14,fontWeight:600,color:ql,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:(s=n.value,null==s?"—":"string"==typeof s?s.trim()?s:"—":s)})]})]},n.id);var s})})]},n.id)})})]})})(k)})]}),A.length>0?t("div",{className:"student-summary-modules",style:{display:"grid",gap:C?18:P?20:24,gridTemplateColumns:C?"1fr":P?"repeat(auto-fit, minmax(300px, 1fr))":"repeat(auto-fit, minmax(360px, 1fr))"},children:A.map(n=>{var i,r,s,o;const a=null!==(i=Hl[n.id])&&void 0!==i?i:bl,l=null!==(s=null!==(r=n.title)&&void 0!==r?r:ec[n.id])&&void 0!==s?s:"Sección";return e("section",{className:"student-summary-module",style:{display:"flex",flexDirection:"column",gap:16,borderRadius:26,border:`1px solid ${Kl}`,backgroundColor:Yl,padding:C?18:P?22:24,boxShadow:"0 24px 45px rgba(15, 23, 42, 0.08)"},children:[e("header",{style:{display:"flex",gap:14,alignItems:"flex-start"},children:[t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:C?40:46,height:C?40:46,borderRadius:16,backgroundColor:Xl,color:Gl},children:t(a,{size:C?18:20})}),e("div",{children:[t("h3",{style:{margin:0,fontSize:C?15:17,fontWeight:600,color:ql},children:l}),(null===(o=n.meta)||void 0===o?void 0:o.maxItems)&&e("p",{style:{margin:"6px 0 0",fontSize:12,color:Gl},children:["Mostrando hasta ",n.meta.maxItems," registros recientes."]})]})]}),t("div",{className:"flex-1",children:N(n)})]},n.id)})}):!m&&!p&&t("div",{className:"flex h-48 items-center justify-center",children:t("span",{className:"text-sm text-gray-500",children:"Sin información adicional disponible."})})]})]}),t(Nl,{children:t(T,{variant:"secondary",onClick:i,children:"Cerrar"})})]})};function ic(t){return j({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(t)}function rc(){return t("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-50",children:e("div",{className:"container flex max-w-md flex-col items-center justify-center gap-8 px-4 py-16 text-center",children:[t("div",{className:"flex items-center justify-center",children:e("div",{className:"relative flex flex-col items-center",children:[t("div",{className:"h-80 w-4 bg-gray-700"}),e("div",{className:"top-4 flex h-auto w-auto min-w-[12rem] flex-col items-center justify-center rounded-lg bg-primary-botech text-white shadow-lg p-4",children:[t("div",{className:"flex-1 mb-2",children:e("h1",{className:"text-xl/4 text-white font-seguimiento-h",children:["BO-TECH ",t("span",{className:"text-sm block",children:"SEGUIMIENTO"})]})}),t("span",{className:"text-4xl font-bold",children:"404"}),t("span",{className:"text-xs mt-1",children:"RUTA NO ENCONTRADA"})]})]})}),e("div",{className:"space-y-3",children:[t("h2",{className:"text-2xl font-bold tracking-tight text-gray-900",children:"¡Esta parada no existe!"}),t("p",{className:"text-gray-600",children:"Parece que estás esperando en una parada de autobús que no está en nuestra ruta. La página que buscas no se encuentra disponible."})]}),e("button",{className:"flex items-center gap-2 bg-primary-botech hover:bg-primary-botech/90 text-white px-4 py-2 rounded",onClick:()=>{window.location.href="/"},children:[t(ic,{className:"h-4 w-4"}),t("span",{children:"Volver a la ruta principal"})]})]})})}function sc(t,e){return Object.keys(t).filter(t=>-1===e.indexOf(t)).map(t=>({key:t,header:t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim(),accessor:e=>{var n;return null!==(n=e[t])&&void 0!==n?n:"-"}}))}export{T as Button,ul as DownloadStudentsExcelButton,Il as GenericTable,H as Header,P as IconButton,Ml as Modal,El as ModalBody,Nl as ModalFooter,kl as ModalHeader,pl as MultiSelector,rc as NotFound,sl as Sidebar,ml as SingleSelector,nc as StudentSummaryModal,hl as UploadStudentsExcelButton,cl as downloadStudentsExcel,sc as generateTableColumns,ll as getBackendPrefix,dl as uploadStudentsExcel,Vl as useModal};
2
2
  //# sourceMappingURL=index.js.map